Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 1x 1x 1x 1x 1x 18x 18x 18x 18x | import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { Observable } from 'rxjs'; import { IntersectionStatus } from 'ish-core/directives/intersection-observer-util'; import { TactonFacade } from '../../../facades/tacton.facade'; import { TactonProductConfigurationHelper } from '../../../models/tacton-product-configuration/tacton-product-configuration.helper'; import { TactonProductConfigurationGroup } from '../../../models/tacton-product-configuration/tacton-product-configuration.model'; @Component({ selector: 'ish-tacton-group', templateUrl: './tacton-group.component.html', changeDetection: ChangeDetectionStrategy.OnPush, }) export class TactonGroupComponent { @Input({ required: true }) group: TactonProductConfigurationGroup; @Input() level = 0; constructor(private facade: TactonFacade) {} isGroup = TactonProductConfigurationHelper.isGroup; isParameter = TactonProductConfigurationHelper.isParameter; getImageUrl(picture: string): Observable<string> { return this.facade.getImageUrl$(picture); } onIntersection(name: string, event: IntersectionStatus) { Iif (this.level === 1 && event === 'Visible') { this.facade.setCurrentGroup(name); } } } |