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A,cAAA0I,EAAAxG,QAAAK,eAAA,KAAAmG,EAAAxG,QAAAK,eAAAT,QAAA,GAiBnB9B,MAAA,GAAsDA,MAAtD,uBAAA0I,EAAAmO,6BAAsD7W,CAAD,s/BCTjEwG,CAA6B","names":["GetPatternsService","_GetPatternsService","constructor","patterns","finishings","finishingTemplates","this","getPatterns","patternType","machineQualityId","colorSetId","weaveStructureId","exludeColors","getAllPatternsParameters","includeDrawings","PatternType","REST_ZONE_PATTERNS","getRestZonesPatterns","FREE_ZONE_PATTERNS","getFreeZonesPatterns","JUTE_PATTERNS","getJutePatterns","JUTE_PATTERNS_OR_DRAWINGS","getJutePatternsOrDrawing","WEAVE_PATTERNS_OR_DRAWINGS","getWeavePatternsOrDrawing","CUTBAR_PATTERNS","getCutbarPatterns","FOLDING_TYPES_PATTERNS","getFoldingTypesPatterns","getAllRestZonePatterns","getAllFreeZonePatterns","getAllJutePatterns","getJutePatternsOrDrawings","excludeColors","getWeavePatternsOrDrawings","getPatternsForCutbarForMachineQuality","getFoldingTypes","i0","PATTERNS","FINISHINGS","FINISHING_TEMPLATES","factory","ɵfac","providedIn","ContainsVisualisationDataPipe","_ContainsVisualisationDataPipe","transform","patternVisualisation","hasVisualisationData","pure","_r2","patternIndex_r3","index","ctx_r3","openWeavePatternPreviewDialog","patternVisualisation_r5","PatternExampleComponent_ng_container_0_div_1_ng_container_2_ng_container_1_ng_template_3_Template","PatternExampleComponent_ng_container_0_div_1_ng_container_2_ng_container_1_div_5_Template","placeholder_r6","PatternExampleComponent_ng_container_0_div_1_ng_container_2_ng_container_1_Template","numberOfPatternVisualisationsToShow","PatternExampleComponent_ng_container_0_div_1_ng_container_2_Template","_r1","value","patternVisualisations_r7","numberOfHiddenPatternVisualisations","PatternExampleComponent_ng_container_0_div_1_Template","length","PatternExampleComponent","_PatternExampleComponent","BaseComponent","pattern","_pattern$weavingChore2","_pattern","WeavePattern","colorVisualisation","visualisations","find","visualisation","type","PatternVisualisationType","COLOR","_pattern$weavingChore","AssertionUtils","isNullOrUndefined","canShowColor","splice","indexOf","weavingChores","push","PATTERN","weaveQualityType","WeaveQualityType","CARPET","patternVisualisations","next","dialogBuilderFactoryService","elementRef","getPatternVisualisationByPatternId","super","patternReceived","EventEmitter","BehaviorSubject","combineLatest","pipe","distinctUntilChanged","previousNumberOfPatternVisualisationsToShow","previousPatternVisualisations","currentNumberOfPatternVisualisationsToShow","currentPatternVisualisations","map","thumbnailsContainerOffsetWidth","undefined","containerOffsetWidth","ngAfterViewInit","_this$pattern","resizeObserver","ResizeObserver","onResize","container","observe","nativeElement","box","thumbnailsContainer","subscribeToPatternVisualisations","every","emit","agInit","params","cloneDeep","data","refresh","patternIndex","getBuilder","withClass","withCustomBackdrop","withWidth","withHeight","withMaxWidth","withMaxHeight","openDialog","PatternPreviewDialogComponent","ngOnDestroy","disconnect","getThumbnailsContainerOffsetWidth","_this$thumbnailsConta","offsetWidth","getContainerOffsetWidth","_this$container","getButtonOffsetWidth","plusButton","calculateNumberOfPatternVisualisationsToShow","numberOfVisualisationsToShowRoundedDown","Math","floor","max","observePatternBeforeVisible","debounceTime","filter","some","observeIntersection","isIntersecting","switchMap","forkJoin","execute","weavePatternId","id","takeUntil","unSubscribeOnViewDestroy","subscribe","i1","i2","selectors","viewQuery","rf","ctx","ElementRef","PatternExampleComponent_ng_container_0_Template","AddPatternComponent","_AddPatternComponent","formBuilder","translate","closeAddPattern","addedPattern","patternTranslationKey","addPatternCommand","ngOnInit","addPatternForm","group","name","control","image","Validators","required","AsyncUniqueValidator","createValidator","controls","markAsTouched","canShowErrorForFormControl","error","formControlName","canShowErrorForErrorCodeAndFormControlForFormGroup","add","saving","patternName","finalize","finalizeSaving","Pattern","DrawingPatternVisualisation","_error$errorContext","isEqual","BackendErrorCodeEnum","errorContext","errorCode","MISSING_COLORS","openAlertDialog","titleText","instant","count","messageText","message","DialogType","INFORMATION","close","CLASS_NAME_DIALOG","MAT_DIALOG_DATA","inputs","outputs","features","decls","vars","consts","template","AddPatternComponent_mat_error_13_Template","AddPatternComponent_mat_error_14_Template","_c1","_c0","invalid","pending","$event","ctx_r2","onSelectedMenuItemChange","menuItems","selectedMenuItem","_r4","patternImageInput_r5","click","openAddPattern","target","files","isColorMenuItemSelected","_r6","showOnlyDefaultsChanged","gridOptionsForListOfColorPatterns","listOfPatterns","gridOptionsForListOfDrawingPatterns","SelectPatternComponent_section_0_vdw_tabs_menu_5_Template","SelectPatternComponent_section_0_div_7_Template","SelectPatternComponent_section_0_vdw_slide_toggle_9_Template","SelectPatternComponent_section_0_ag_grid_angular_11_Template","SelectPatternComponent_section_0_ag_grid_angular_12_Template","selectPattern","_c3","_c2","showPatternTypeFilter","allowPatternCreation","canShowOnlyDefaultToggle","isPatternTypeFolding","canSelectPattern","_r7","SelectPatternComponent","_SelectPatternComponent","dialogRef","drawingImageUploadHelper","colDefBuilderFactory","gridOptionsBuilderFactoryService","getPatternsService","changeDetectorRef","l10nIntlService","_data$weaveStructureI","_data$machineQualityI","_data$colorSetId","_data$excludeColors","addingPattern","translationKey","DRAWING","IMAGE","rowClickedObservable","Subject","selectedMenuItemIndex","patternItemTranslationKey","get","showOnlyDefaultToggle","isEmpty","listOfGridOptions","setGridOptionsForListOfPatterns","subscribeToRowClickAndPatternVisualisation","_this$drawingPatterns","_this$colorPatternsGr","listOfGridApis","drawingPatternsGrid","api","colorPatternsGrid","getSelectedPattern","uploadFilesWithCustomResultAction","DrawingType","BMP","isNil","updateSize","addPanelClass","removePanelClass","menuItem","change","includes","showOnlyDefaults","patternsCall","onlyRecommended","detectChanges","getColumnDefsForListOfPatterns","GridIdentifier","SELECT_COLOR_PATTERN","withHeaderHeight","withRowHeight","withGetRowId","getRowId","withOnCellDoubleClicked","withOnRowDataUpdated","AgGridUtils","onRowDataUpdated","withOnRowClicked","withLoadingOverlay","scale","withNoRowsOverlay","titleParam","hideDescription","withOnFirstDataRendered","setTimeout","deselectAll","withIsExternalFilterPresent","withDoesExternalFilterPass","node","doesExternalFilterPass","build","getColumnDefsForListOfDrawings","SELECT_DRAWING_PATTERN","withColIdAndField","withHeaderName","withComparator","StringUtils","stringEndingWithNumberComparator","withValueGetter","toString","withLockVisible","withField","withNumericMultiFilter","withRightAlignment","withCellRenderer","withSortable","withoutFilter","withSuppressSizeToFit","MANCHON","withColId","withTooltipField","withTooltipValueGetter","drawing","ColorPatternVisualisation","patternId","buildAgGridCellTextWithUnit","widthInPixels","Unit","PIXEL","buildAgGridCellTooltipWithUnit","heightInPixels","buildAgGridCellTextWithUnitConversion","sizeInBytes","BYTE","KILOBYTE","buildAgGridCellTooltipWithUnitConversion","withDate","withDateMultiFilter","getActiveGridApi","getSelectedRows","_this$drawingPatterns2","_this$colorPatternsGr2","forEach","Array","isArray","asObservable","activeGridApi","i3","i4","i5","SelectPatternComponent_section_0_Template","SelectPatternComponent_app_add_pattern_1_Template","patternIndex_r2","setSelectedPatternVisualisation","indexOfSelectedPatternVisualisation","patternVisualisation_r4","PatternPreviewDialogComponent_div_2_div_1_Template","_PatternPreviewDialogComponent","_data$pattern","_data$pattern2","selectedPatternVisualisation","amountOfPatternVisualisations","onKeyPressed","event","code","hostBindings","PatternPreviewDialogComponent_div_2_Template"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./apps/texconnect/src/app/presentation/components/select-pattern/get-patterns.service.ts","./apps/texconnect/src/app/presentation/components/select-pattern/pattern-example/contains-visualisation-data.pipe.ts","./apps/texconnect/src/app/presentation/components/select-pattern/pattern-example/pattern-example.component.html","./apps/texconnect/src/app/presentation/components/select-pattern/pattern-example/pattern-example.component.ts","./apps/texconnect/src/app/presentation/components/select-pattern/pattern-type.enum.ts","./apps/texconnect/src/app/presentation/components/select-pattern/add-pattern/add-pattern.component.html","./apps/texconnect/src/app/presentation/components/select-pattern/add-pattern/add-pattern.component.ts","./apps/texconnect/src/app/presentation/components/select-pattern/select-pattern.component.html","./apps/texconnect/src/app/presentation/components/select-pattern/select-pattern.component.ts","./apps/texconnect/src/app/presentation/pages/textile-data/weave-structure/add/grid-weave-pattern-preview/pattern-preview-dialog/pattern-preview-dialog.component.html","./apps/texconnect/src/app/presentation/pages/textile-data/weave-structure/add/grid-weave-pattern-preview/pattern-preview-dialog/pattern-preview-dialog.component.ts"],"sourcesContent":["import {Inject, Injectable} from '@angular/core';\nimport {Pattern} from '@domain/pattern';\nimport {CutbarPattern} from '@domain/textile-data/finishing-and-finishing-template/finishing/cutbar-pattern';\nimport {FINISHING_TEMPLATES, FinishingTemplates} from '@infrastructure/http/finishing-template/finishing-templates';\nimport {Finishings, FINISHINGS, GetAllFinishingsParameters} from '@infrastructure/http/finishing/finishings';\nimport {Patterns, PATTERNS} from '@infrastructure/http/patterns/patterns';\nimport {Observable} from 'rxjs';\nimport {PatternType} from './pattern-type.enum';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GetPatternsService {\n public constructor(\n @Inject(PATTERNS) private readonly patterns: Patterns,\n @Inject(FINISHINGS) private readonly finishings: Finishings,\n @Inject(FINISHING_TEMPLATES) private readonly finishingTemplates: FinishingTemplates\n ) {}\n\n public getPatterns(\n patternType: PatternType,\n machineQualityId?: number,\n colorSetId?: number,\n weaveStructureId?: number,\n exludeColors?: boolean,\n getAllPatternsParameters?: Partial,\n includeDrawings?: boolean\n ): Observable {\n switch (patternType) {\n case PatternType.REST_ZONE_PATTERNS:\n return this.getRestZonesPatterns(machineQualityId, colorSetId);\n case PatternType.FREE_ZONE_PATTERNS:\n return this.getFreeZonesPatterns(machineQualityId);\n case PatternType.JUTE_PATTERNS:\n return this.getJutePatterns(machineQualityId, colorSetId);\n case PatternType.JUTE_PATTERNS_OR_DRAWINGS:\n return this.getJutePatternsOrDrawing(weaveStructureId);\n case PatternType.WEAVE_PATTERNS_OR_DRAWINGS:\n return this.getWeavePatternsOrDrawing(weaveStructureId, exludeColors);\n case PatternType.CUTBAR_PATTERNS:\n return this.getCutbarPatterns(getAllPatternsParameters, includeDrawings);\n case PatternType.FOLDING_TYPES_PATTERNS:\n return this.getFoldingTypesPatterns(weaveStructureId);\n }\n }\n\n private getRestZonesPatterns(machineQualityId: number, colorSetId: number): Observable {\n return this.patterns.getAllRestZonePatterns(machineQualityId, colorSetId);\n }\n\n private getFreeZonesPatterns(machineQualityId: number): Observable {\n return this.patterns.getAllFreeZonePatterns(machineQualityId);\n }\n\n private getJutePatterns(machineQualityId: number, colorSetId: number): Observable {\n return this.patterns.getAllJutePatterns(machineQualityId, colorSetId);\n }\n\n private getJutePatternsOrDrawing(weaveStructureId: number): Observable {\n return this.patterns.getJutePatternsOrDrawings(weaveStructureId);\n }\n\n private getWeavePatternsOrDrawing(weaveStructureId: number, excludeColors: boolean): Observable {\n return this.patterns.getWeavePatternsOrDrawings(weaveStructureId, excludeColors);\n }\n\n private getCutbarPatterns(getAllPatternsParameters: Partial, includeDrawings?: boolean): Observable {\n return this.finishings.getPatternsForCutbarForMachineQuality(getAllPatternsParameters, includeDrawings);\n }\n\n private getFoldingTypesPatterns(weaveStructureId: number): Observable {\n return weaveStructureId ? this.finishings.getFoldingTypes(weaveStructureId) : this.finishingTemplates.getFoldingTypes();\n }\n}\n","import {Pipe, PipeTransform} from '@angular/core';\nimport {PatternVisualisation} from '@domain/pattern-visualisation';\n\n@Pipe({\n name: 'containsVisualisationData'\n})\nexport class ContainsVisualisationDataPipe implements PipeTransform {\n public transform(patternVisualisation: PatternVisualisation): boolean {\n return patternVisualisation?.hasVisualisationData();\n }\n}\n","\n
\n \n patternIndex\">\n
\n \n
\n \n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n","import {AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewChild} from '@angular/core';\nimport {Pattern} from '@domain/pattern';\nimport {PatternVisualisation} from '@domain/pattern-visualisation';\nimport {PatternVisualisationType} from '@domain/pattern-visualisation-type.enum';\nimport {WeavePattern} from '@domain/textile-data/weave-structure/weave-pattern/weave-pattern';\nimport {GetPatternVisualisationByPatternId} from '@infrastructure/http/patterns/get-pattern-visualisation-by-pattern-id';\nimport {WeaveQualityType} from '@presentation/pages/textile-data/machine-quality/overview/weave-quality-type.enum';\nimport {PatternPreviewDialogComponent} from '@presentation/pages/textile-data/weave-structure/add/grid-weave-pattern-preview/pattern-preview-dialog/pattern-preview-dialog.component';\nimport {AssertionUtils, BaseComponent, DialogBuilderFactoryService, observeIntersection} from '@vdw/angular-component-library';\nimport {ICellRendererAngularComp} from 'ag-grid-angular';\nimport {ICellRendererParams} from 'ag-grid-community';\nimport {cloneDeep} from 'lodash-es';\nimport {BehaviorSubject, combineLatest, forkJoin} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, filter, map, switchMap, takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'app-pattern-example',\n templateUrl: './pattern-example.component.html',\n styleUrls: ['./pattern-example.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class PatternExampleComponent extends BaseComponent implements ICellRendererAngularComp, AfterViewInit, OnDestroy {\n @Input() public weaveStructureId: number;\n @Input() public weaveQualityType: WeaveQualityType;\n @Input() public canShowColor: boolean;\n @Input() public observePatternBeforeVisible: boolean;\n @Input() public set pattern(pattern: Pattern | WeavePattern) {\n this._pattern = pattern instanceof WeavePattern ? pattern.pattern : pattern;\n\n const colorVisualisation = this._pattern.visualisations.find((visualisation: PatternVisualisation) => visualisation.type === PatternVisualisationType.COLOR);\n if (!AssertionUtils.isNullOrUndefined(colorVisualisation) && !AssertionUtils.isNullOrUndefined(this.canShowColor)) {\n this._pattern.visualisations.splice(this._pattern.visualisations.indexOf(colorVisualisation), 1);\n if (pattern.weavingChores?.length && this.canShowColor) {\n this._pattern.visualisations.push(colorVisualisation);\n }\n }\n\n const patternVisualisation = this._pattern.visualisations.find((visualisation: PatternVisualisation) => visualisation.type === PatternVisualisationType.PATTERN);\n if (!AssertionUtils.isNullOrUndefined(patternVisualisation) && !AssertionUtils.isNullOrUndefined(this.weaveQualityType) && !pattern.weavingChores?.length) {\n this._pattern.visualisations.splice(this._pattern.visualisations.indexOf(patternVisualisation), 1);\n if (this.weaveQualityType === WeaveQualityType.CARPET) {\n this._pattern.visualisations.push(patternVisualisation);\n }\n }\n\n this.patternVisualisations.next(this._pattern.visualisations);\n }\n\n public get pattern(): Pattern {\n return this._pattern;\n }\n\n @Output() public patternReceived = new EventEmitter();\n\n @ViewChild('container') public container: ElementRef;\n @ViewChild('plusButton', {read: ElementRef}) public plusButton;\n @ViewChild('thumbnailsContainer') public thumbnailsContainer: ElementRef;\n\n public numberOfPatternVisualisationsToShow = new BehaviorSubject(1);\n public patternVisualisations: BehaviorSubject = new BehaviorSubject([]);\n public numberOfHiddenPatternVisualisations = combineLatest([this.numberOfPatternVisualisationsToShow, this.patternVisualisations]).pipe(\n distinctUntilChanged(\n (\n [previousNumberOfPatternVisualisationsToShow, previousPatternVisualisations]: [number, PatternVisualisation[]],\n [currentNumberOfPatternVisualisationsToShow, currentPatternVisualisations]: [number, PatternVisualisation[]]\n ) => previousNumberOfPatternVisualisationsToShow === currentNumberOfPatternVisualisationsToShow && previousPatternVisualisations.length === currentPatternVisualisations.length\n ),\n map(([numberOfPatternVisualisationsToShow, patternVisualisations]: [number, PatternVisualisation[]]) => patternVisualisations.length - numberOfPatternVisualisationsToShow)\n );\n\n private _pattern: Pattern;\n private resizeObserver: ResizeObserver;\n private thumbnailsContainerOffsetWidth = new BehaviorSubject(undefined);\n private containerOffsetWidth = new BehaviorSubject(undefined);\n\n public constructor(\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly elementRef: ElementRef,\n private readonly getPatternVisualisationByPatternId: GetPatternVisualisationByPatternId\n ) {\n super();\n }\n\n public ngAfterViewInit(): void {\n this.resizeObserver = new ResizeObserver(() => this.onResize());\n if (this.container) {\n this.resizeObserver.observe(this.container.nativeElement, {box: 'border-box'});\n }\n if (this.thumbnailsContainer) {\n this.resizeObserver.observe(this.thumbnailsContainer.nativeElement, {box: 'border-box'});\n }\n\n this.subscribeToPatternVisualisations();\n\n if (this.pattern?.visualisations?.every((visualisation: PatternVisualisation) => visualisation.hasVisualisationData())) {\n this.patternReceived.emit();\n }\n }\n\n public agInit(params: ICellRendererParams & {visualisations: PatternVisualisation[]} & {weaveStructureId: number}): void {\n const pattern = cloneDeep(params.data as Pattern);\n if (!AssertionUtils.isNullOrUndefined(params.visualisations)) {\n pattern.visualisations = params.visualisations;\n }\n\n this.pattern = pattern;\n this.weaveStructureId = params.weaveStructureId;\n }\n\n public refresh(params: any): boolean {\n return false;\n }\n\n public openWeavePatternPreviewDialog(patternIndex: number = 0): void {\n this.dialogBuilderFactoryService\n .getBuilder()\n .withClass(['overflow-hidden-dialog', 'box-shadow-none-dialog'])\n .withCustomBackdrop('white-backdrop')\n .withWidth('fit-content')\n .withHeight('fit-content')\n .withMaxWidth('100vw')\n .withMaxHeight('100vh')\n .openDialog(PatternPreviewDialogComponent, {pattern: this.pattern, index: patternIndex});\n }\n\n public ngOnDestroy(): void {\n this.resizeObserver.disconnect();\n super.ngOnDestroy();\n }\n\n private getThumbnailsContainerOffsetWidth(): void {\n if (this.thumbnailsContainer?.nativeElement?.offsetWidth) {\n this.thumbnailsContainerOffsetWidth.next(this.thumbnailsContainer.nativeElement.offsetWidth);\n }\n }\n\n private getContainerOffsetWidth(): void {\n if (this.container?.nativeElement?.offsetWidth) {\n this.containerOffsetWidth.next(this.container.nativeElement.offsetWidth);\n }\n }\n\n private getButtonOffsetWidth(): number {\n return this.plusButton.nativeElement.offsetWidth;\n }\n\n private calculateNumberOfPatternVisualisationsToShow(): void {\n this.getThumbnailsContainerOffsetWidth();\n this.getContainerOffsetWidth();\n if (this.containerOffsetWidth.value > this.thumbnailsContainerOffsetWidth.value * this.pattern.visualisations.length) {\n this.numberOfPatternVisualisationsToShow.next(this.pattern.visualisations.length);\n } else {\n const numberOfVisualisationsToShowRoundedDown = Math.floor((this.containerOffsetWidth.value - this.getButtonOffsetWidth() - 4) / this.thumbnailsContainerOffsetWidth.value);\n this.numberOfPatternVisualisationsToShow.next(Math.max(numberOfVisualisationsToShowRoundedDown, 1));\n }\n }\n\n private onResize(): void {\n this.calculateNumberOfPatternVisualisationsToShow();\n }\n\n private subscribeToPatternVisualisations(): void {\n const patternObservable = this.observePatternBeforeVisible\n ? this.patternVisualisations.pipe(\n debounceTime(250),\n filter((patternVisualisations: PatternVisualisation[]) =>\n patternVisualisations.some((visualisation: PatternVisualisation) => !AssertionUtils.isNullOrUndefined(visualisation) && !visualisation.hasVisualisationData())\n ),\n map((patternVisualisations: PatternVisualisation[]) => patternVisualisations.filter((visualisation: PatternVisualisation) => !visualisation.hasVisualisationData()))\n )\n : combineLatest([this.patternVisualisations, observeIntersection(this.elementRef.nativeElement)]).pipe(\n debounceTime(250),\n filter(\n ([visualisations, isIntersecting]: [PatternVisualisation[], boolean]) =>\n isIntersecting && visualisations.some((visualisation: PatternVisualisation) => !AssertionUtils.isNullOrUndefined(visualisation) && !visualisation.hasVisualisationData())\n ),\n map(([patternVisualisations]: [PatternVisualisation[], boolean]) => patternVisualisations.filter((visualisation: PatternVisualisation) => !visualisation.hasVisualisationData()))\n );\n\n patternObservable\n .pipe(\n switchMap((visualisations: PatternVisualisation[]) =>\n forkJoin(\n visualisations.map((visualisation: PatternVisualisation) =>\n this.getPatternVisualisationByPatternId.execute({weavePatternId: this.pattern.id, type: visualisation.type, weaveStructureId: this.weaveStructureId})\n )\n )\n ),\n takeUntil(this.unSubscribeOnViewDestroy)\n )\n .subscribe((patternVisualisations: PatternVisualisation[]) => {\n this.pattern.visualisations = patternVisualisations;\n\n this.patternVisualisations.next(patternVisualisations);\n this.patternReceived.emit();\n });\n }\n}\n","export enum PatternType {\n REST_ZONE_PATTERNS,\n FREE_ZONE_PATTERNS,\n JUTE_PATTERNS,\n JUTE_PATTERNS_OR_DRAWINGS,\n WEAVE_PATTERNS_OR_DRAWINGS,\n CUTBAR_PATTERNS,\n FOLDING_TYPES_PATTERNS\n}\n","
\n \n
\n
\n
\n \n {{ 'GENERAL.NAME' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.REQUIRED' | bmsTranslate }}\n \n \n {{ 'GENERAL.ERRORS.NAME_DUPLICATE' | bmsTranslate }}\n \n \n \n
\n
\n
\n \n \n
\n","import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {BackendErrorCodeEnum} from '@application/helper/backend-error-code.enum';\nimport {AsyncUniqueValidator} from '@application/validators/async-unique-validator';\nimport {DrawingPatternVisualisation} from '@domain/drawing-pattern-visualisation';\nimport {Pattern} from '@domain/pattern';\nimport {DrawingImage} from '@domain/production-schedule/drawing-image';\nimport {PATTERNS, Patterns} from '@infrastructure/http/patterns/patterns';\nimport {BaseComponent, canShowErrorForErrorCodeAndFormControlForFormGroup, DialogBuilderFactoryService, DialogType, TranslateService, UnhandledBackendError} from '@vdw/angular-component-library';\nimport {isEqual} from 'lodash-es';\nimport {Observable} from 'rxjs';\nimport {finalize, takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'app-add-pattern',\n templateUrl: './add-pattern.component.html',\n styleUrls: ['./add-pattern.component.scss']\n})\nexport class AddPatternComponent extends BaseComponent implements OnInit {\n public static readonly CLASS_NAME_DIALOG = 'add-pattern-dialog';\n\n @Input() public image: DrawingImage;\n @Output() public closeAddPattern: EventEmitter = new EventEmitter();\n @Output() public addedPattern: EventEmitter = new EventEmitter();\n\n public addPatternForm: FormGroup<{name: FormControl}>;\n public patternTranslationKey: string;\n\n private readonly addPatternCommand: (name: string, imageData: string) => Observable;\n\n public constructor(\n @Inject(PATTERNS) private readonly patterns: Patterns,\n @Inject(MAT_DIALOG_DATA) data: {patternTranslationKey: string; addPatternCommand: (name: string, imageData: string) => Observable},\n private readonly formBuilder: FormBuilder,\n private readonly dialogBuilderFactoryService: DialogBuilderFactoryService,\n private readonly translate: TranslateService\n ) {\n super();\n\n this.patternTranslationKey = data.patternTranslationKey;\n this.addPatternCommand = data.addPatternCommand;\n }\n\n public ngOnInit(): void {\n this.addPatternForm = this.formBuilder.group({\n name: this.formBuilder.control(this.image.name, Validators.required, AsyncUniqueValidator.createValidator(this.patterns, null))\n });\n\n this.addPatternForm.controls.name.markAsTouched();\n }\n\n public canShowErrorForFormControl(error: string, formControlName: string): boolean {\n return canShowErrorForErrorCodeAndFormControlForFormGroup(error, formControlName, this.addPatternForm);\n }\n\n public add(): void {\n this.saving = true;\n\n const patternName = this.addPatternForm.controls.name.value;\n\n this.addPatternCommand(patternName, this.image.data)\n .pipe(finalize(this.finalizeSaving()), takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe({\n next: (id: number) => {\n this.addedPattern.emit(new Pattern(id, patternName, [new DrawingPatternVisualisation(this.image.data)]));\n },\n error: (error: UnhandledBackendError) => {\n if (isEqual(BackendErrorCodeEnum[error?.errorContext?.errorCode], BackendErrorCodeEnum.MISSING_COLORS)) {\n this.dialogBuilderFactoryService.getBuilder().openAlertDialog({\n titleText: this.translate.instant('TEXTILE_DATA.WEAVE_STRUCTURE.WEAVE_STRUCTURE', {count: 1}),\n messageText: error.message,\n type: DialogType.INFORMATION\n });\n } else {\n throw error;\n }\n }\n });\n }\n\n public close(): void {\n this.closeAddPattern.emit();\n }\n}\n","
\n \n \n
\n
\n \n \n \n \n
\n
\n \n
\n
\n
\n \n \n \n \n
\n \n
\n\n\n","import {AfterViewInit, ChangeDetectorRef, Component, Inject, OnInit, ViewChild} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {GridIdentifier} from '@application/grids/grid-identifier.enum';\nimport {DrawingImageUploadHelper} from '@application/helper/drawing/drawing-image-upload-helper';\nimport {StringUtils} from '@application/helper/string-utils';\nimport {ColorPatternVisualisation} from '@domain/color-pattern-visualisation';\nimport {Pattern} from '@domain/pattern';\nimport {PatternVisualisation} from '@domain/pattern-visualisation';\nimport {PatternVisualisationType} from '@domain/pattern-visualisation-type.enum';\nimport {DrawingImage} from '@domain/production-schedule/drawing-image';\nimport {DrawingType} from '@domain/production-schedule/drawing-type.enum';\nimport {GetAllFinishingsParameters} from '@infrastructure/http/finishing/finishings';\nimport {PatternExampleComponent} from '@presentation/components/select-pattern/pattern-example/pattern-example.component';\nimport {SelectPatternComponentMatDialogConfigDataInterface} from '@presentation/components/select-pattern/select-pattern-component-mat-dialog-config.interface';\nimport {\n AgGridUtils,\n AssertionUtils,\n BaseComponent,\n ColDefBuilderFactoryService,\n GridOptionsBuilderFactoryService,\n NoDataOverlayComponentParams,\n OverlayComponentParams,\n SelectGridDialog,\n TabsMenuItem,\n TranslateService,\n Unit\n} from '@vdw/angular-component-library';\nimport {AgGridAngular} from 'ag-grid-angular';\nimport {ColDef, FirstDataRenderedEvent, GetRowIdParams, GridApi, GridOptions, ICellRendererParams, ITooltipParams, RowDataUpdatedEvent, RowNode, ValueGetterParams} from 'ag-grid-community';\nimport {L10nIntlService} from 'angular-l10n';\nimport {get, isNil} from 'lodash-es';\nimport {Subject} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {AddPatternComponent} from './add-pattern/add-pattern.component';\nimport {GetPatternsService} from './get-patterns.service';\nimport {PatternType} from './pattern-type.enum';\n\n@Component({\n templateUrl: './select-pattern.component.html',\n styleUrls: ['./select-pattern.component.scss']\n})\nexport class SelectPatternComponent extends BaseComponent implements OnInit, SelectGridDialog, AfterViewInit {\n @ViewChild('colorPatternsGrid') public colorPatternsGrid: AgGridAngular;\n @ViewChild('drawingPatternsGrid') public drawingPatternsGrid: AgGridAngular;\n public patternType: PatternType;\n public listOfPatterns: Pattern[];\n public listOfGridOptions: GridOptions[];\n public listOfGridApis: GridApi[];\n public allowPatternCreation: boolean;\n public image: DrawingImage;\n public patternTranslationKey: string;\n public showPatternTypeFilter: boolean;\n public addingPattern = false;\n public canShowOnlyDefaultToggle = false;\n public selectedMenuItem: TabsMenuItem;\n public menuItems: TabsMenuItem[] = [\n {\n value: [PatternVisualisationType.COLOR, PatternVisualisationType.PATTERN],\n translationKey: 'GENERAL.PATTERN.WEAVE_STRUCTURE_PATTERNS'\n },\n {\n value: [PatternVisualisationType.DRAWING, PatternVisualisationType.IMAGE],\n translationKey: 'GENERAL.PATTERN.DRAWINGS'\n }\n ];\n\n public canSelectPattern: boolean;\n\n private rowClickedObservable = new Subject();\n\n private readonly weaveStructureId: number;\n private readonly machineQualityId: number;\n private readonly colorSetId: number;\n private readonly excludeColors: boolean;\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) data: SelectPatternComponentMatDialogConfigDataInterface,\n private readonly dialogRef: MatDialogRef,\n private readonly translate: TranslateService,\n private readonly drawingImageUploadHelper: DrawingImageUploadHelper,\n private readonly colDefBuilderFactory: ColDefBuilderFactoryService,\n private readonly gridOptionsBuilderFactoryService: GridOptionsBuilderFactoryService,\n private readonly getPatternsService: GetPatternsService,\n private readonly changeDetectorRef: ChangeDetectorRef,\n private readonly l10nIntlService: L10nIntlService\n ) {\n super();\n this.selectedMenuItem = data.selectedMenuItemIndex ? this.menuItems[data.selectedMenuItemIndex] : this.menuItems[0];\n if (!AssertionUtils.isNullOrUndefined(data.patternItemTranslationKey)) {\n this.selectedMenuItem.translationKey = data.patternItemTranslationKey;\n }\n this.patternTranslationKey = data.patternTranslationKey;\n this.patternType = data.patternType;\n this.weaveStructureId = data.weaveStructureId ?? null;\n this.machineQualityId = data.machineQualityId ?? null;\n this.colorSetId = data.colorSetId ?? null;\n this.excludeColors = data.excludeColors ?? null;\n this.allowPatternCreation = get(data, 'allowPatternCreation', false);\n this.showPatternTypeFilter = get(data, 'showPatternTypeFilter', true);\n this.drawingImageUploadHelper.unSubscribeOnViewDestroy = this.unSubscribeOnViewDestroy;\n this.canShowOnlyDefaultToggle = data.showOnlyDefaultToggle;\n }\n\n public get gridOptionsForListOfColorPatterns(): GridOptions {\n return !AssertionUtils.isEmpty(this.listOfGridOptions) ? this.listOfGridOptions[0] : null;\n }\n\n public get gridOptionsForListOfDrawingPatterns(): GridOptions {\n return !AssertionUtils.isEmpty(this.listOfGridOptions) && this.listOfGridOptions.length > 1 ? this.listOfGridOptions[1] : null;\n }\n\n public ngOnInit(): void {\n this.getPatterns();\n this.setGridOptionsForListOfPatterns();\n this.subscribeToRowClickAndPatternVisualisation();\n }\n\n public ngAfterViewInit(): void {\n this.listOfGridApis = [this.drawingPatternsGrid?.api, this.colorPatternsGrid?.api];\n }\n\n public selectPattern(pattern: Pattern = this.getSelectedPattern()): void {\n this.dialogRef.close(pattern);\n }\n\n public openAddPattern(files: File[]): void {\n this.drawingImageUploadHelper.uploadFilesWithCustomResultAction(files, [DrawingType.BMP], (image: DrawingImage) => {\n if (!isNil(image)) {\n this.addingPattern = true;\n this.image = image;\n this.dialogRef.updateSize();\n this.dialogRef.addPanelClass(AddPatternComponent.CLASS_NAME_DIALOG);\n }\n });\n }\n\n public closeAddPattern(): void {\n this.addingPattern = false;\n this.dialogRef.removePanelClass(AddPatternComponent.CLASS_NAME_DIALOG);\n }\n\n public onSelectedMenuItemChange(menuItem: TabsMenuItem): void {\n this.selectedMenuItem = menuItem;\n }\n\n public showOnlyDefaultsChanged(change: boolean): void {\n this.getPatterns(change);\n }\n\n public isColorMenuItemSelected(): boolean {\n return this.selectedMenuItem.value.includes(PatternVisualisationType.COLOR);\n }\n\n public isPatternTypeFolding(): boolean {\n return this.patternType === PatternType.FOLDING_TYPES_PATTERNS;\n }\n\n private getPatterns(showOnlyDefaults: boolean = true): void {\n const getAllPatternsParameters: Partial = {\n onlyRecommended: showOnlyDefaults,\n machineQualityId: this.machineQualityId,\n weaveStructureId: this.machineQualityId ? null : this.weaveStructureId\n };\n\n const patternsCall = this.getPatternsService.getPatterns(this.patternType, this.machineQualityId, this.colorSetId, this.weaveStructureId, this.excludeColors, getAllPatternsParameters, true);\n if (patternsCall) {\n patternsCall.pipe(takeUntil(this.unSubscribeOnViewDestroy)).subscribe((patterns: Pattern[]) => {\n this.listOfPatterns = patterns;\n this.changeDetectorRef.detectChanges();\n });\n }\n }\n\n private setGridOptionsForListOfPatterns(): void {\n this.listOfGridOptions = [\n this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefsForListOfPatterns(), GridIdentifier.SELECT_COLOR_PATTERN)\n .withHeaderHeight(32)\n .withRowHeight(112)\n .withGetRowId((params: GetRowIdParams) => this.getRowId(params))\n .withOnCellDoubleClicked(() => this.selectPattern())\n .withOnRowDataUpdated(({api}: RowDataUpdatedEvent) => AgGridUtils.onRowDataUpdated(api))\n .withOnRowClicked(() => this.rowClickedObservable.next())\n .withLoadingOverlay({\n scale: 0.7\n } as OverlayComponentParams)\n .withNoRowsOverlay({\n scale: 0.7,\n titleParam: 'GENERAL.PATTERN.PATTERN',\n hideDescription: true\n } as NoDataOverlayComponentParams)\n .withOnFirstDataRendered((params: FirstDataRenderedEvent) => setTimeout(() => params.api.deselectAll()))\n .withIsExternalFilterPresent(() => this.showPatternTypeFilter)\n .withDoesExternalFilterPass((node: RowNode) => this.doesExternalFilterPass(node))\n .build(),\n this.gridOptionsBuilderFactoryService\n .getBuilder(this.getColumnDefsForListOfDrawings(), GridIdentifier.SELECT_DRAWING_PATTERN)\n .withHeaderHeight(32)\n .withRowHeight(112)\n .withGetRowId((params: GetRowIdParams) => this.getRowId(params))\n .withOnCellDoubleClicked(() => this.selectPattern())\n .withOnRowDataUpdated(({api}: RowDataUpdatedEvent) => AgGridUtils.onRowDataUpdated(api))\n .withOnRowClicked(() => this.rowClickedObservable.next())\n .withLoadingOverlay({\n scale: 0.7\n } as OverlayComponentParams)\n .withNoRowsOverlay({\n scale: 0.7,\n titleParam: 'GENERAL.PATTERN.PATTERN',\n hideDescription: true\n } as NoDataOverlayComponentParams)\n .withOnFirstDataRendered((params: FirstDataRenderedEvent) => setTimeout(() => params.api.deselectAll()))\n .withIsExternalFilterPresent(() => this.showPatternTypeFilter)\n .withDoesExternalFilterPass((node: RowNode) => this.doesExternalFilterPass(node))\n .build()\n ];\n }\n\n private getColumnDefsForListOfPatterns(): ColDef[] {\n return [\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('name', true)\n .withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.PATTERN_NUMBER')\n .withComparator(StringUtils.stringEndingWithNumberComparator)\n .withValueGetter((params: ValueGetterParams): string => {\n const pattern: Pattern = params.data;\n return pattern.id.toString();\n })\n .withLockVisible()\n .build(),\n this.colDefBuilderFactory.getBuilder().withHeaderName('GENERAL.TYPE').withField('type', true).build(),\n this.colDefBuilderFactory.getBuilder().withHeaderName('GENERAL.COMMENT').withField('comment', true).build(),\n this.colDefBuilderFactory.getBuilder().withField('weavingChores', true).withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.WEAVING_CHORES').build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.X_SIZE', 1, false, 'GENERAL.UNIT.DENTS')\n .withField('xSizeInDents', true)\n .withNumericMultiFilter()\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.Y_SIZE', 1, false, 'GENERAL.UNIT.COLOR_LINES')\n .withField('ySizeInColorlines', true)\n .withNumericMultiFilter()\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.X_SIZE', 1, false, 'GENERAL.UNIT.FRAMES', 2)\n .withField('xSizeInFrames', true)\n .withNumericMultiFilter()\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('TEXTILE_DATA.WEAVE_STRUCTURE.Y_SIZE', 1, false, 'GENERAL.UNIT.PICKS')\n .withField('ySizeInPicks', true)\n .withNumericMultiFilter()\n .withRightAlignment()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('GENERAL.PATTERN.PREVIEW_CROSS_SECTION')\n .withCellRenderer(PatternExampleComponent, (params: ICellRendererParams) => {\n return {\n weaveStructureId: this.weaveStructureId,\n visualisations: (params.data as Pattern).visualisations.filter((visualisation: PatternVisualisation) => visualisation.type === PatternVisualisationType.PATTERN)\n };\n })\n .withSortable(false)\n .withoutFilter()\n .withSuppressSizeToFit()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('GENERAL.PATTERN.PREVIEW_MANCHON')\n .withCellRenderer(PatternExampleComponent, (params: ICellRendererParams) => {\n return {\n weaveStructureId: this.weaveStructureId,\n visualisations: (params.data as Pattern).visualisations.filter((visualisation: PatternVisualisation) => visualisation.type === PatternVisualisationType.MANCHON)\n };\n })\n .withSortable(false)\n .withoutFilter()\n .withSuppressSizeToFit()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('GENERAL.PREVIEW')\n .withCellRenderer(PatternExampleComponent, (params: ICellRendererParams) => {\n return {\n weaveStructureId: this.weaveStructureId,\n visualisations: (params.data as Pattern).visualisations.filter((visualisation: PatternVisualisation) => visualisation.type === PatternVisualisationType.COLOR)\n };\n })\n .withSortable(false)\n .withoutFilter()\n .withSuppressSizeToFit()\n .build()\n ];\n }\n\n private getColumnDefsForListOfDrawings(): ColDef[] {\n return [\n this.colDefBuilderFactory\n .getBuilder()\n .withColId('name')\n .withHeaderName('GENERAL.NAME')\n .withTooltipField('name')\n .withTooltipValueGetter((params: ITooltipParams) => params.data.name)\n .withComparator(StringUtils.stringEndingWithNumberComparator)\n .withValueGetter((params: ValueGetterParams): string => {\n const drawing: Pattern = params.data;\n\n return drawing instanceof Pattern && drawing.visualisations[0] instanceof ColorPatternVisualisation\n ? this.translate.instant('PRODUCTION_ORDER.WEAVE_PLAN.FREE_ZONE.PATTERN_NAME', {patternId: drawing.id})\n : drawing.name;\n })\n .withLockVisible()\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('widthInPixels')\n .withHeaderName('GENERAL.DIMENSIONS.WIDTH')\n .withRightAlignment()\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithUnit(params.data.widthInPixels, Unit.PIXEL, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PIXEL, this.l10nIntlService))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('heightInPixels')\n .withHeaderName('GENERAL.DIMENSIONS.HEIGHT')\n .withRightAlignment()\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithUnit(params.data.heightInPixels, Unit.PIXEL, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnit(params.value, Unit.PIXEL, this.l10nIntlService))\n .build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withColIdAndField('sizeInBytes')\n .withHeaderName('BMSCONFIG.DEVICE_TEMPLATES.COUNTERS.SIZE')\n .withRightAlignment()\n .withCellRenderer((params: ICellRendererParams) => AgGridUtils.buildAgGridCellTextWithUnitConversion(params.data.sizeInBytes, Unit.BYTE, Unit.KILOBYTE, this.l10nIntlService))\n .withTooltipValueGetter((params: ITooltipParams) => AgGridUtils.buildAgGridCellTooltipWithUnitConversion(params.value, Unit.BYTE, Unit.KILOBYTE, this.l10nIntlService))\n .build(),\n this.colDefBuilderFactory.getBuilder().withField('dateCreated').withHeaderName('GENERAL.DATETIME.DATE').withDate().withDateMultiFilter().build(),\n this.colDefBuilderFactory\n .getBuilder()\n .withHeaderName('GENERAL.PREVIEW')\n .withCellRenderer(PatternExampleComponent, {weaveStructureId: this.weaveStructureId})\n .withoutFilter()\n .withSortable(false)\n .build()\n ];\n }\n\n private getSelectedPattern(): Pattern {\n return this.getActiveGridApi().getSelectedRows()[0];\n }\n\n private getActiveGridApi(): GridApi {\n return this.isPatternTypeFolding() || !this.isColorMenuItemSelected() ? this.drawingPatternsGrid?.api : this.colorPatternsGrid?.api;\n }\n\n private getRowId(params: GetRowIdParams): string {\n let visualisations = '';\n params.data.visualisations.forEach((patternVisualisation: PatternVisualisation) => {\n visualisations += `_${PatternVisualisationType[patternVisualisation.type]}`;\n });\n return `${params.data.id}${visualisations}`;\n }\n\n private doesExternalFilterPass(node: RowNode): boolean {\n const pattern = node.data as Pattern;\n\n if (Array.isArray(this.selectedMenuItem.value)) {\n return this.selectedMenuItem.value.includes(pattern.visualisations[0].type);\n }\n return pattern.visualisations[0].type === this.selectedMenuItem.value;\n }\n\n private subscribeToRowClickAndPatternVisualisation(): void {\n this.rowClickedObservable\n .asObservable()\n .pipe(takeUntil(this.unSubscribeOnViewDestroy))\n .subscribe(() => {\n const activeGridApi = this.getActiveGridApi();\n setTimeout(() => (this.canSelectPattern = activeGridApi && activeGridApi.getSelectedRows().length > 0));\n });\n }\n}\n","
\n
\n
1\">\n \n \n
\n \n
\n \n
\n
\n
\n \n
\n
\n","import {Component, HostListener, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA} from '@angular/material/dialog';\nimport {Pattern} from '@domain/pattern';\nimport {PatternVisualisation} from '@domain/pattern-visualisation';\n\n@Component({\n selector: 'app-pattern-preview-dialog',\n templateUrl: './pattern-preview-dialog.component.html',\n styleUrls: ['./pattern-preview-dialog.component.scss']\n})\nexport class PatternPreviewDialogComponent {\n public pattern: Pattern;\n public selectedPatternVisualisation: PatternVisualisation;\n public indexOfSelectedPatternVisualisation: number;\n public amountOfPatternVisualisations: number;\n\n public constructor(@Inject(MAT_DIALOG_DATA) public data: any) {\n this.pattern = data.pattern;\n this.selectedPatternVisualisation = data.pattern?.visualisations[data.index];\n this.amountOfPatternVisualisations = data.pattern?.visualisations?.length;\n this.indexOfSelectedPatternVisualisation = data.index;\n }\n\n @HostListener('document:keydown', ['$event'])\n public onKeyPressed(event: KeyboardEvent): void {\n if (this.amountOfPatternVisualisations <= 1) {\n return;\n }\n\n let index = this.indexOfSelectedPatternVisualisation;\n if (event.code === 'ArrowRight') {\n index++;\n }\n if (event.code === 'ArrowLeft') {\n index--;\n }\n index %= this.amountOfPatternVisualisations;\n index < 0 ? this.setSelectedPatternVisualisation(this.amountOfPatternVisualisations - 1) : this.setSelectedPatternVisualisation(index);\n }\n\n public setSelectedPatternVisualisation(indexOfSelectedPatternVisualisation: number): void {\n this.indexOfSelectedPatternVisualisation = indexOfSelectedPatternVisualisation;\n this.selectedPatternVisualisation = this.pattern.visualisations[indexOfSelectedPatternVisualisation];\n }\n}\n"],"x_google_ignoreList":[]}