@tft/crispr-forms 18.0.0 → 18.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/esm2022/src/lib/public_api.mjs +2 -1
  2. package/esm2022/src/lib/ui/public-api.mjs +2 -1
  3. package/fesm2022/{tft-crispr-forms-index-DLa8K3lm.mjs → tft-crispr-forms-index-3_zzaLSn.mjs} +3 -2
  4. package/fesm2022/tft-crispr-forms-index-3_zzaLSn.mjs.map +1 -0
  5. package/fesm2022/{tft-crispr-forms-index-CYzZB0sA.mjs → tft-crispr-forms-index-BHUGuVwS.mjs} +3 -2
  6. package/fesm2022/{tft-crispr-forms-index-CYzZB0sA.mjs.map → tft-crispr-forms-index-BHUGuVwS.mjs.map} +1 -1
  7. package/fesm2022/{tft-crispr-forms-index-DYHyL8s6.mjs → tft-crispr-forms-index-CAFXSHea.mjs} +3 -2
  8. package/fesm2022/tft-crispr-forms-index-CAFXSHea.mjs.map +1 -0
  9. package/fesm2022/{tft-crispr-forms-index-o78Cm3Kf.mjs → tft-crispr-forms-index-CN1GmYGC.mjs} +2 -2
  10. package/fesm2022/{tft-crispr-forms-index-o78Cm3Kf.mjs.map → tft-crispr-forms-index-CN1GmYGC.mjs.map} +1 -1
  11. package/fesm2022/{tft-crispr-forms-index-BwC11k3P.mjs → tft-crispr-forms-index-CvnyvJJ_.mjs} +2 -2
  12. package/fesm2022/{tft-crispr-forms-index-BwC11k3P.mjs.map → tft-crispr-forms-index-CvnyvJJ_.mjs.map} +1 -1
  13. package/fesm2022/{tft-crispr-forms-index-DhIYxOdD.mjs → tft-crispr-forms-index-DKwMd-o-.mjs} +2 -2
  14. package/fesm2022/{tft-crispr-forms-index-DhIYxOdD.mjs.map → tft-crispr-forms-index-DKwMd-o-.mjs.map} +1 -1
  15. package/fesm2022/{tft-crispr-forms-index-BVwoi2lw.mjs → tft-crispr-forms-index-De3tRDbo.mjs} +2 -2
  16. package/fesm2022/{tft-crispr-forms-index-BVwoi2lw.mjs.map → tft-crispr-forms-index-De3tRDbo.mjs.map} +1 -1
  17. package/fesm2022/{tft-crispr-forms-index-D8oUGVGX.mjs → tft-crispr-forms-index-DiNlBPaX.mjs} +3 -2
  18. package/fesm2022/{tft-crispr-forms-index-D8oUGVGX.mjs.map → tft-crispr-forms-index-DiNlBPaX.mjs.map} +1 -1
  19. package/fesm2022/{tft-crispr-forms-index-C_YTy6il.mjs → tft-crispr-forms-index-DkkAr7Yr.mjs} +2 -2
  20. package/fesm2022/{tft-crispr-forms-index-C_YTy6il.mjs.map → tft-crispr-forms-index-DkkAr7Yr.mjs.map} +1 -1
  21. package/fesm2022/{tft-crispr-forms-index-Bbcv75sh.mjs → tft-crispr-forms-index-DseuVavm.mjs} +3 -2
  22. package/fesm2022/tft-crispr-forms-index-DseuVavm.mjs.map +1 -0
  23. package/fesm2022/{tft-crispr-forms-index-CN4M4eEo.mjs → tft-crispr-forms-index-T4Ook6pV.mjs} +3 -2
  24. package/fesm2022/tft-crispr-forms-index-T4Ook6pV.mjs.map +1 -0
  25. package/fesm2022/{tft-crispr-forms-index-BDJfgpKH.mjs → tft-crispr-forms-index-cdo59qhx.mjs} +2 -2
  26. package/fesm2022/{tft-crispr-forms-index-BDJfgpKH.mjs.map → tft-crispr-forms-index-cdo59qhx.mjs.map} +1 -1
  27. package/fesm2022/{tft-crispr-forms-index-DNTOjcVZ.mjs → tft-crispr-forms-index-kJUZksiq.mjs} +2 -2
  28. package/fesm2022/{tft-crispr-forms-index-DNTOjcVZ.mjs.map → tft-crispr-forms-index-kJUZksiq.mjs.map} +1 -1
  29. package/fesm2022/{tft-crispr-forms-index-Cpu5cwLo.mjs → tft-crispr-forms-index-xbMIxY3P.mjs} +3 -2
  30. package/fesm2022/{tft-crispr-forms-index-Cpu5cwLo.mjs.map → tft-crispr-forms-index-xbMIxY3P.mjs.map} +1 -1
  31. package/fesm2022/tft-crispr-forms.mjs +133 -39
  32. package/fesm2022/tft-crispr-forms.mjs.map +1 -1
  33. package/package.json +7 -7
  34. package/src/lib/public_api.d.ts +1 -0
  35. package/src/lib/ui/public-api.d.ts +1 -0
  36. package/tft-crispr-forms-18.0.2.tgz +0 -0
  37. package/fesm2022/tft-crispr-forms-index-Bbcv75sh.mjs.map +0 -1
  38. package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs +0 -110
  39. package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs.map +0 -1
  40. package/fesm2022/tft-crispr-forms-index-CN4M4eEo.mjs.map +0 -1
  41. package/fesm2022/tft-crispr-forms-index-DLa8K3lm.mjs.map +0 -1
  42. package/fesm2022/tft-crispr-forms-index-DYHyL8s6.mjs.map +0 -1
  43. package/tft-crispr-forms-18.0.0.tgz +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-index-T4Ook6pV.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/checkbox-field/checkbox-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/checkbox-field/checkbox-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n CheckboxFieldConfig,\n} from '../../utils';\nimport { InfoComponent } from '../info';\n\nconst defaultConfig: Partial<CheckboxFieldConfig> = {\n labelPosition: 'after',\n inline: false,\n};\nconst CheckboxFieldMixin =\n crisprControlMixin<CheckboxFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-checkbox-field',\n templateUrl: './checkbox-field.component.html',\n styleUrls: ['./checkbox-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n MatCheckboxModule,\n ReactiveFormsModule,\n FieldContainerComponent,\n FormValidationHandlerModule,\n ],\n})\nexport class CheckboxFieldComponent\n extends CheckboxFieldMixin\n implements OnInit\n{\n defaultConfig = defaultConfig;\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [inlineField]=\"config.inline\">\n <div\n [formGroup]=\"group\">\n <mat-checkbox\n [color]=\"config.color\"\n [labelPosition]=\"config.labelPosition\"\n [formControlName]=\"config.controlName\">\n {{config.label}}\n <crispr-info\n matSuffix *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </mat-checkbox>\n </div>\n</crispr-field-container>\n"],"names":["i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAcA,MAAM,aAAa,GAAiC;AAClD,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,MAAM,EAAE,KAAK;CACd,CAAC;AACF,MAAM,kBAAkB,GACtB,kBAAkB,CAAsB,oBAAoB,CAAC,CAAC;AAiB1D,MAAO,sBACX,SAAQ,kBAAkB,CAAA;AAhB5B,IAAA,WAAA,GAAA;;QAmBE,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;AAI/B,KAAA;IAHC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;8GAPU,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,ECpCnC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,yeAkBA,EDUI,MAAA,EA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AA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,8GACvB,2BAA2B,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,8BAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGlB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAflC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,iBAAiB;wBACjB,mBAAmB;wBACnB,uBAAuB;wBACvB,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,yeAAA,EAAA,MAAA,EAAA,CAAA,6BAAA,CAAA,EAAA,CAAA;;;;;"}
@@ -23,8 +23,8 @@ import * as i7$1 from '@tft/form-validation-handler';
23
23
  import { FormValidationHandlerModule } from '@tft/form-validation-handler';
24
24
  import * as i3$1 from '@angular/material/form-field';
25
25
  import '@angular/material/button';
26
- import '@angular/material/progress-bar';
27
26
  import '@angular/material/tooltip';
27
+ import '@angular/material/progress-bar';
28
28
 
29
29
  /* eslint-disable @nx/enforce-module-boundaries */
30
30
  const defaultConfig = {
@@ -139,4 +139,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
139
139
  }] } });
140
140
 
141
141
  export { AutocompleteChiplistFieldComponent };
142
- //# sourceMappingURL=tft-crispr-forms-index-BDJfgpKH.mjs.map
142
+ //# sourceMappingURL=tft-crispr-forms-index-cdo59qhx.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tft-crispr-forms-index-BDJfgpKH.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { map, tap } from 'rxjs/operators';\nimport {\n MatAutocompleteModule,\n MatAutocompleteSelectedEvent,\n MatAutocompleteTrigger,\n} from '@angular/material/autocomplete';\nimport { Observable, BehaviorSubject, combineLatest } from 'rxjs';\nimport { ENTER } from '@angular/cdk/keycodes';\n\nimport { MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatOptionModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { OptionComponent } from '../option';\nimport { MatIconModule } from '@angular/material/icon';\nimport {\n AutocompleteChiplistFieldConfig,\n AbstractAutocompleteComponent,\n DEFAULT_EMPTY_OPTIONS_MESSAGE,\n SelectOption,\n} from '../../utils';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n\nconst defaultConfig: Partial<AutocompleteChiplistFieldConfig> = {\n chipsSelectable: true,\n areChipsRemovable: true,\n tabToSelect: true,\n autoActiveFirstOption: true,\n imageUrlParam: 'image',\n typeDebounceTime: 500,\n allowDuplicates: false,\n duplicateCompareFunction: (chip, option) => chip.value === option.value,\n separatorKeyCodes: [ENTER],\n emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,\n};\n\n@Component({\n selector: 'crispr-autocomplete-chiplist-field',\n templateUrl: './autocomplete-chiplist-field.component.html',\n styleUrls: ['./autocomplete-chiplist-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatAutocompleteModule,\n MatInputModule,\n MatOptionModule,\n MatChipsModule,\n MatIconModule,\n FormValidationHandlerModule,\n ],\n})\nexport class AutocompleteChiplistFieldComponent\n extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig>\n implements OnInit\n{\n defaultConfig = defaultConfig;\n chips$ = new BehaviorSubject<SelectOption[]>([]);\n remainingOptions$: Observable<SelectOption[]>;\n selectedChip: SelectOption = null;\n controlValue$ = this.chips$.pipe(\n tap((chips) => {\n this.control.setValue(chips.map((chip) => chip.value));\n })\n );\n\n // We need use ViewChild twice on the same template ref to access as different types\n // - the MatAutocompleteTrigger is used to for selecting value on tab\n // - the ElementRef<HTMLInputElement> is used to clear the value from input element on selection\n @ViewChild('autoInput', { read: MatAutocompleteTrigger })\n chipInput: MatAutocompleteTrigger;\n @ViewChild('autoInput') chipInputRef: ElementRef<HTMLInputElement>;\n\n ngOnInit() {\n super.ngOnInit();\n this.remainingOptions$ = combineLatest([this.chips$, this.options$]).pipe(\n map(([chips, options]) => {\n return this.config.allowDuplicates\n ? options\n : options?.filter((option) => {\n return !chips.some((chip) =>\n this.config.duplicateCompareFunction(chip, option)\n );\n });\n })\n );\n }\n\n setControlValue(value: SelectOption[]) {\n if (value) {\n this.chips$.next(value);\n }\n }\n\n // handles mat selecting\n handleSelect(event: MatAutocompleteSelectedEvent) {\n const selectedOption: SelectOption = event.option.value as SelectOption;\n this.chips$.next([...this.chips$.value, selectedOption]);\n this.chipInputRef.nativeElement.value = '';\n this.autocompleteInputControl.setValue('');\n // setTimeout needed because the panel thinks it's still open at this point\n setTimeout(() => this.chipInput.openPanel());\n }\n\n /**\n * To follow ARIA standards we want to select the active option on blur.\n * matChipInputAddOnBlur should do this but it causes buggy behaviour\n * @param event blur event that triggers the handle blur\n */\n handleTab(_event: FocusEvent) {\n if (\n this.chipInput.activeOption &&\n (this.config.tabToSelect || this.config.addChipOnBlur)\n ) {\n const chip = this.chipInput.activeOption.value;\n this.chips$.next([...this.chips$.value, chip]);\n }\n }\n\n /**\n * Handles selection via key tokens passed through separatorKeyCodes property\n * NOTE: If TAB is used focus does not move on to next component\n * @param event\n */\n handleTokenEnd(event: MatChipInputEvent) {\n if (this.chipInput.activeOption) {\n this.chipInput.activeOption.select();\n }\n event.chipInput?.clear();\n }\n\n mapToLabel(option: SelectOption) {\n return option ? option.label : '';\n }\n\n removeChip(removedChip: SelectOption) {\n const remainingChips: SelectOption[] = this.chips$.value.filter(\n (chip) => chip !== removedChip\n );\n this.chips$.next(remainingChips);\n }\n\n highlightChip(chip: SelectOption) {\n if(this.config.chipsSelectable) {\n this.selectedChip = chip\n }\n }\n \n blurField() {\n console.log('blur')\n this.selectedChip = null;\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n\n <mat-chip-grid\n #chipList>\n <!-- [selectable]=\"config.chipsSelectable\" -->\n <mat-chip-row\n class=\"refinement-chip\"\n *ngFor=\"let chip of controlValue$ | async; let i = index\"\n [removable]=\"config.areChipsRemovable\"\n [highlighted]=\"chip?.value === selectedChip?.value\"\n (click)=\"highlightChip(chip)\"\n (removed)=\"removeChip(chip)\">\n <span *ngIf=\"chip.imageUrl as imageUrl\" class=\"image-container\">\n <img [src]=\"imageUrl\" alt=\"image of {{chip.label}}\">\n </span>\n {{chip.label}}\n <mat-icon\n matChipRemove\n *ngIf=\"config.areChipsRemovable\">\n cancel\n </mat-icon>\n </mat-chip-row>\n <input class=\"hidden-error-directive-anchor\" (blur)=\"blurField()\"\n [formControlName]=\"config.controlName\" type=\"text\"/>\n\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config.placeholder\"\n [matChipInputFor]=\"chipList\"\n [matAutocomplete]=\"auto\"\n (keydown.tab)=\"handleTab($event)\"\n [matChipInputSeparatorKeyCodes]=\"config.separatorKeyCodes\"\n (matChipInputTokenEnd)=\"handleTokenEnd($event)\"\n role=\"searchbox\"\n type=\"text\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n (blur)=\"blurField()\"\n #autoInput/>\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info \">\n </crispr-info>\n\n </mat-chip-grid>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"this.config.autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"mapToLabel\">\n <ng-container *ngIf=\"remainingOptions$ | async as remainingOptions; else emptyOption\">\n <ng-container *ngIf=\"remainingOptions.length > 0; else emptyOption\">\n <mat-option\n *ngFor=\"let option of remainingOptions$ | async\"\n [value]=\"option\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n </ng-container>\n\n </ng-container>\n <ng-template #emptyOption>\n <mat-option disabled=\"true\">\n {{config.emptyOptionsMessage}}\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n</crispr-field-container>\n"],"names":["i6","i8","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAkCA,MAAM,a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AAW,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAA;gBAEhC,YAAY,EAAA,CAAA;sBAAnC,SAAS;uBAAC,WAAW,CAAA;;;;;"}
1
+ {"version":3,"file":"tft-crispr-forms-index-cdo59qhx.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { map, tap } from 'rxjs/operators';\nimport {\n MatAutocompleteModule,\n MatAutocompleteSelectedEvent,\n MatAutocompleteTrigger,\n} from '@angular/material/autocomplete';\nimport { Observable, BehaviorSubject, combineLatest } from 'rxjs';\nimport { ENTER } from '@angular/cdk/keycodes';\n\nimport { MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatOptionModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { OptionComponent } from '../option';\nimport { MatIconModule } from '@angular/material/icon';\nimport {\n AutocompleteChiplistFieldConfig,\n AbstractAutocompleteComponent,\n DEFAULT_EMPTY_OPTIONS_MESSAGE,\n SelectOption,\n} from '../../utils';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n\nconst defaultConfig: Partial<AutocompleteChiplistFieldConfig> = {\n chipsSelectable: true,\n areChipsRemovable: true,\n tabToSelect: true,\n autoActiveFirstOption: true,\n imageUrlParam: 'image',\n typeDebounceTime: 500,\n allowDuplicates: false,\n duplicateCompareFunction: (chip, option) => chip.value === option.value,\n separatorKeyCodes: [ENTER],\n emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,\n};\n\n@Component({\n selector: 'crispr-autocomplete-chiplist-field',\n templateUrl: './autocomplete-chiplist-field.component.html',\n styleUrls: ['./autocomplete-chiplist-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatAutocompleteModule,\n MatInputModule,\n MatOptionModule,\n MatChipsModule,\n MatIconModule,\n FormValidationHandlerModule,\n ],\n})\nexport class AutocompleteChiplistFieldComponent\n extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig>\n implements OnInit\n{\n defaultConfig = defaultConfig;\n chips$ = new BehaviorSubject<SelectOption[]>([]);\n remainingOptions$: Observable<SelectOption[]>;\n selectedChip: SelectOption = null;\n controlValue$ = this.chips$.pipe(\n tap((chips) => {\n this.control.setValue(chips.map((chip) => chip.value));\n })\n );\n\n // We need use ViewChild twice on the same template ref to access as different types\n // - the MatAutocompleteTrigger is used to for selecting value on tab\n // - the ElementRef<HTMLInputElement> is used to clear the value from input element on selection\n @ViewChild('autoInput', { read: MatAutocompleteTrigger })\n chipInput: MatAutocompleteTrigger;\n @ViewChild('autoInput') chipInputRef: ElementRef<HTMLInputElement>;\n\n ngOnInit() {\n super.ngOnInit();\n this.remainingOptions$ = combineLatest([this.chips$, this.options$]).pipe(\n map(([chips, options]) => {\n return this.config.allowDuplicates\n ? options\n : options?.filter((option) => {\n return !chips.some((chip) =>\n this.config.duplicateCompareFunction(chip, option)\n );\n });\n })\n );\n }\n\n setControlValue(value: SelectOption[]) {\n if (value) {\n this.chips$.next(value);\n }\n }\n\n // handles mat selecting\n handleSelect(event: MatAutocompleteSelectedEvent) {\n const selectedOption: SelectOption = event.option.value as SelectOption;\n this.chips$.next([...this.chips$.value, selectedOption]);\n this.chipInputRef.nativeElement.value = '';\n this.autocompleteInputControl.setValue('');\n // setTimeout needed because the panel thinks it's still open at this point\n setTimeout(() => this.chipInput.openPanel());\n }\n\n /**\n * To follow ARIA standards we want to select the active option on blur.\n * matChipInputAddOnBlur should do this but it causes buggy behaviour\n * @param event blur event that triggers the handle blur\n */\n handleTab(_event: FocusEvent) {\n if (\n this.chipInput.activeOption &&\n (this.config.tabToSelect || this.config.addChipOnBlur)\n ) {\n const chip = this.chipInput.activeOption.value;\n this.chips$.next([...this.chips$.value, chip]);\n }\n }\n\n /**\n * Handles selection via key tokens passed through separatorKeyCodes property\n * NOTE: If TAB is used focus does not move on to next component\n * @param event\n */\n handleTokenEnd(event: MatChipInputEvent) {\n if (this.chipInput.activeOption) {\n this.chipInput.activeOption.select();\n }\n event.chipInput?.clear();\n }\n\n mapToLabel(option: SelectOption) {\n return option ? option.label : '';\n }\n\n removeChip(removedChip: SelectOption) {\n const remainingChips: SelectOption[] = this.chips$.value.filter(\n (chip) => chip !== removedChip\n );\n this.chips$.next(remainingChips);\n }\n\n highlightChip(chip: SelectOption) {\n if(this.config.chipsSelectable) {\n this.selectedChip = chip\n }\n }\n \n blurField() {\n console.log('blur')\n this.selectedChip = null;\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n\n <mat-chip-grid\n #chipList>\n <!-- [selectable]=\"config.chipsSelectable\" -->\n <mat-chip-row\n class=\"refinement-chip\"\n *ngFor=\"let chip of controlValue$ | async; let i = index\"\n [removable]=\"config.areChipsRemovable\"\n [highlighted]=\"chip?.value === selectedChip?.value\"\n (click)=\"highlightChip(chip)\"\n (removed)=\"removeChip(chip)\">\n <span *ngIf=\"chip.imageUrl as imageUrl\" class=\"image-container\">\n <img [src]=\"imageUrl\" alt=\"image of {{chip.label}}\">\n </span>\n {{chip.label}}\n <mat-icon\n matChipRemove\n *ngIf=\"config.areChipsRemovable\">\n cancel\n </mat-icon>\n </mat-chip-row>\n <input class=\"hidden-error-directive-anchor\" (blur)=\"blurField()\"\n [formControlName]=\"config.controlName\" type=\"text\"/>\n\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config.placeholder\"\n [matChipInputFor]=\"chipList\"\n [matAutocomplete]=\"auto\"\n (keydown.tab)=\"handleTab($event)\"\n [matChipInputSeparatorKeyCodes]=\"config.separatorKeyCodes\"\n (matChipInputTokenEnd)=\"handleTokenEnd($event)\"\n role=\"searchbox\"\n type=\"text\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n (blur)=\"blurField()\"\n #autoInput/>\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info \">\n </crispr-info>\n\n </mat-chip-grid>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"this.config.autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"mapToLabel\">\n <ng-container *ngIf=\"remainingOptions$ | async as remainingOptions; else emptyOption\">\n <ng-container *ngIf=\"remainingOptions.length > 0; else emptyOption\">\n <mat-option\n *ngFor=\"let option of remainingOptions$ | async\"\n [value]=\"option\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n </ng-container>\n\n </ng-container>\n <ng-template #emptyOption>\n <mat-option disabled=\"true\">\n {{config.emptyOptionsMessage}}\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n</crispr-field-container>\n"],"names":["i6","i8","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAkCA,MAAM,aAAa,GAA6C;AAC9D,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA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@angular/material/icon';
15
15
  import 'rxjs';
16
16
  import 'rxjs/operators';
17
17
  import '@angular/material/button';
18
- import '@angular/material/progress-bar';
19
18
  import '@angular/material/tooltip';
19
+ import '@angular/material/progress-bar';
20
20
 
21
21
  /* eslint-disable @nx/enforce-module-boundaries */
22
22
  const InputFieldMixin = crisprControlMixin(CrisprFieldComponent);
@@ -46,4 +46,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
46
46
  }], ctorParameters: () => [] });
47
47
 
48
48
  export { InputFieldComponent };
49
- //# sourceMappingURL=tft-crispr-forms-index-DNTOjcVZ.mjs.map
49
+ //# sourceMappingURL=tft-crispr-forms-index-kJUZksiq.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tft-crispr-forms-index-DNTOjcVZ.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n InputFieldConfig,\n crisprControlMixin,\n CrisprFieldComponent,\n} from '../../utils';\nimport { MatIconModule } from '@angular/material/icon';\n\nconst InputFieldMixin =\n crisprControlMixin<InputFieldConfig>(CrisprFieldComponent);\n@Component({\n selector: 'crispr-input-field',\n templateUrl: './input-field.component.html',\n styleUrls: ['./input-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatFormFieldModule,\n MatInputModule,\n FormValidationHandlerModule,\n MatIconModule\n ],\n})\nexport class InputFieldComponent extends InputFieldMixin implements OnInit {\n\n defaultConfig: Partial<InputFieldConfig> = {inputType: 'text'};\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label>\n {{config.label}}\n </mat-label>\n <input\n [type]=\"config.inputType\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [maxlength]=\"config.maxLength\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\"\n [pattern]=\"config.pattern\"\n [spellcheck]=\"config.spellcheck\"\n [autocomplete]=\"config.autoComplete\"\n [autocapitalize]=\"config.autoCapitalize\">\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n matSuffix\n *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n\n</crispr-field-container>\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAgBA,MAAM,eAAe,GACnB,kBAAkB,CAAmB,oBAAoB,CAAC,CAAC;AAkBvD,MAAO,mBAAoB,SAAQ,eAAe,CAAA;AAGtD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AAFV,QAAA,IAAA,CAAA,aAAa,GAA8B,EAAC,SAAS,EAAE,MAAM,EAAC,CAAC;KAG9D;IAED,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;8GATU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,IAAA,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AA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,2BAA2B,sPAC3B,aAAa,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAjB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,mBAGb,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,cAAc;wBACd,2BAA2B;wBAC3B,aAAa;AACd,qBAAA,EAAA,QAAA,EAAA,0kCAAA,EAAA,CAAA;;;;;"}
1
+ {"version":3,"file":"tft-crispr-forms-index-kJUZksiq.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n InputFieldConfig,\n crisprControlMixin,\n CrisprFieldComponent,\n} from '../../utils';\nimport { MatIconModule } from '@angular/material/icon';\n\nconst InputFieldMixin =\n crisprControlMixin<InputFieldConfig>(CrisprFieldComponent);\n@Component({\n selector: 'crispr-input-field',\n templateUrl: './input-field.component.html',\n styleUrls: ['./input-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatFormFieldModule,\n MatInputModule,\n FormValidationHandlerModule,\n MatIconModule\n ],\n})\nexport class InputFieldComponent extends InputFieldMixin implements OnInit {\n\n defaultConfig: Partial<InputFieldConfig> = {inputType: 'text'};\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label>\n {{config.label}}\n </mat-label>\n <input\n [type]=\"config.inputType\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [maxlength]=\"config.maxLength\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\"\n [pattern]=\"config.pattern\"\n [spellcheck]=\"config.spellcheck\"\n [autocomplete]=\"config.autoComplete\"\n [autocapitalize]=\"config.autoCapitalize\">\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n matSuffix\n *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n\n</crispr-field-container>\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAgBA,MAAM,eAAe,GACnB,kBAAkB,CAAmB,oBAAoB,CAAC,CAAC;AAkBvD,MAAO,mBAAoB,SAAQ,eAAe,CAAA;AAGtD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AAFV,QAAA,IAAA,CAAA,aAAa,GAA8B,EAAC,SAAS,EAAE,MAAM,EAAC,C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EAAA,UAAA,EAAA,IAAA,EAClB,cAAc,EACd,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,yHAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,2BAA2B,sPAC3B,aAAa,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAjB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,mBAGb,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,cAAc;wBACd,2BAA2B;wBAC3B,aAAa;AACd,qBAAA,EAAA,QAAA,EAAA,0kCAAA,EAAA,CAAA;;;;;"}
@@ -19,8 +19,9 @@ import 'rxjs';
19
19
  import 'rxjs/operators';
20
20
  import '@angular/material/button';
21
21
  import '@angular/material/icon';
22
- import '@angular/material/progress-bar';
22
+ import '@angular/material/input';
23
23
  import '@angular/material/tooltip';
24
+ import '@angular/material/progress-bar';
24
25
 
25
26
  /* eslint-disable @nx/enforce-module-boundaries */
26
27
  const SelectFieldMixin = crisprControlMixin(CrisprFieldComponent);
@@ -77,4 +78,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
77
78
  }] } });
78
79
 
79
80
  export { SelectFieldComponent };
80
- //# sourceMappingURL=tft-crispr-forms-index-Cpu5cwLo.mjs.map
81
+ //# sourceMappingURL=tft-crispr-forms-index-xbMIxY3P.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tft-crispr-forms-index-Cpu5cwLo.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/select-field/select-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/select-field/select-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewChild,\n AfterViewInit,\n} from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { MatSelect, MatSelectModule } from '@angular/material/select';\nimport { ThemePalette } from '@angular/material/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { OptionComponent } from '../option';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { InfoComponent } from '../info';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n observablifyOptions,\n CrisprFieldComponent,\n crisprControlMixin,\n SelectFieldConfig,\n SelectOption,\n} from '../../utils';\n\nconst SelectFieldMixin =\n crisprControlMixin<SelectFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-select-field',\n templateUrl: './select-field.component.html',\n styleUrls: ['./select-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n MatCheckboxModule,\n MatSelectModule,\n ReactiveFormsModule,\n FormValidationHandlerModule,\n FieldContainerComponent,\n MatFormFieldModule,\n ],\n})\nexport class SelectFieldComponent\n extends SelectFieldMixin\n implements OnInit, AfterViewInit\n{\n defaultConfig = {\n enableToggleAll: false,\n color: 'primary' as ThemePalette,\n };\n options$: Observable<SelectOption[]>;\n allSelected = false;\n\n @ViewChild('selectField') selectField: MatSelect;\n\n ngOnInit() {\n super.ngOnInit();\n // options$ can be passed as an array, promise that resolves array, or observable that resolves array\n // this functions accounts for all possibilities and converts to observable that resolves array\n this.options$ = observablifyOptions(this.config.options, this.group);\n }\n\n ngAfterViewInit() {\n if (\n this.config.multiple &&\n this.config.enableToggleAll &&\n this.selectField.options?.length === (this.value as any[])?.length\n ) {\n this.allSelected = true;\n }\n }\n\n toggleAll(isSelected: boolean) {\n if (isSelected) {\n this.selectField.options.forEach((option) => option.deselect());\n } else {\n this.selectField.options.forEach((option) => option.select());\n }\n this.allSelected = !this.allSelected;\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControlName]=\"config.controlName\"\n [placeholder]=\"config.placeholder\"\n [multiple]=\"config.multiple\">\n\n <mat-checkbox\n [color]=\"config.color\"\n [checked]=\"allSelected\"\n *ngIf=\"config?.multiple && config.enableToggleAll\"\n (click)=\"toggleAll(allSelected)\">\n Select All\n </mat-checkbox>\n <mat-option\n *ngFor=\"let option of options$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\n\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n"],"names":["i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA4BA,MAAM,gBAAgB,GACpB,kBAAkB,CAAoB,oBAAoB,CAAC,CAAC;AAoBxD,MAAO,oBACX,SAAQ,gBAAgB,CAAA;AAnB1B,IAAA,WAAA,GAAA;;AA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iBAAiB;wBACjB,eAAe;wBACf,mBAAmB;wBACnB,2BAA2B;wBAC3B,uBAAuB;wBACvB,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,uuCAAA,EAAA,MAAA,EAAA,CAAA,4CAAA,CAAA,EAAA,CAAA;8BAayB,WAAW,EAAA,CAAA;sBAApC,SAAS;uBAAC,aAAa,CAAA;;;;;"}
1
+ {"version":3,"file":"tft-crispr-forms-index-xbMIxY3P.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/select-field/select-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/select-field/select-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewChild,\n AfterViewInit,\n} from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { MatSelect, MatSelectModule } from '@angular/material/select';\nimport { ThemePalette } from '@angular/material/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { OptionComponent } from '../option';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { InfoComponent } from '../info';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n observablifyOptions,\n CrisprFieldComponent,\n crisprControlMixin,\n SelectFieldConfig,\n SelectOption,\n} from '../../utils';\n\nconst SelectFieldMixin =\n crisprControlMixin<SelectFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-select-field',\n templateUrl: './select-field.component.html',\n styleUrls: ['./select-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n MatCheckboxModule,\n MatSelectModule,\n ReactiveFormsModule,\n FormValidationHandlerModule,\n FieldContainerComponent,\n MatFormFieldModule,\n ],\n})\nexport class SelectFieldComponent\n extends SelectFieldMixin\n implements OnInit, AfterViewInit\n{\n defaultConfig = {\n enableToggleAll: false,\n color: 'primary' as ThemePalette,\n };\n options$: Observable<SelectOption[]>;\n allSelected = false;\n\n @ViewChild('selectField') selectField: MatSelect;\n\n ngOnInit() {\n super.ngOnInit();\n // options$ can be passed as an array, promise that resolves array, or observable that resolves array\n // this functions accounts for all possibilities and converts to observable that resolves array\n this.options$ = observablifyOptions(this.config.options, this.group);\n }\n\n ngAfterViewInit() {\n if (\n this.config.multiple &&\n this.config.enableToggleAll &&\n this.selectField.options?.length === (this.value as any[])?.length\n ) {\n this.allSelected = true;\n }\n }\n\n toggleAll(isSelected: boolean) {\n if (isSelected) {\n this.selectField.options.forEach((option) => option.deselect());\n } else {\n this.selectField.options.forEach((option) => option.select());\n }\n this.allSelected = !this.allSelected;\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControlName]=\"config.controlName\"\n [placeholder]=\"config.placeholder\"\n [multiple]=\"config.multiple\">\n\n <mat-checkbox\n [color]=\"config.color\"\n [checked]=\"allSelected\"\n *ngIf=\"config?.multiple && config.enableToggleAll\"\n (click)=\"toggleAll(allSelected)\">\n Select All\n </mat-checkbox>\n <mat-option\n *ngFor=\"let option of options$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\n\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n"],"names":["i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA4BA,MAAM,gBA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BAAqB,mBAGd,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,iBAAiB;wBACjB,eAAe;wBACf,mBAAmB;wBACnB,2BAA2B;wBAC3B,uBAAuB;wBACvB,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,uuCAAA,EAAA,MAAA,EAAA,CAAA,4CAAA,CAAA,EAAA,CAAA;8BAayB,WAAW,EAAA,CAAA;sBAApC,SAAS;uBAAC,aAAa,CAAA;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, Pipe, NgModule, EventEmitter, Component, Output, ViewChild, HostListener, ChangeDetectionStrategy } from '@angular/core';
2
+ import { Directive, Input, Pipe, NgModule, EventEmitter, Component, Output, ViewChild, HostListener, ChangeDetectionStrategy, Optional, Self } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/forms';
@@ -12,12 +12,14 @@ import * as i2$2 from '@angular/material/button';
12
12
  import { MatButtonModule } from '@angular/material/button';
13
13
  import * as i3 from '@angular/material/icon';
14
14
  import { MatIconModule } from '@angular/material/icon';
15
- import * as i2$1 from '@angular/material/progress-bar';
16
- import { MatProgressBarModule } from '@angular/material/progress-bar';
17
15
  import * as i3$2 from '@angular/material/form-field';
18
16
  import { MatFormFieldModule } from '@angular/material/form-field';
17
+ import * as i5 from '@angular/material/input';
18
+ import { MatInputModule } from '@angular/material/input';
19
19
  import * as i3$1 from '@angular/material/tooltip';
20
20
  import { MatTooltipModule } from '@angular/material/tooltip';
21
+ import * as i2$1 from '@angular/material/progress-bar';
22
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
21
23
 
22
24
  function valueIn(values) {
23
25
  return map((value) => {
@@ -289,22 +291,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
289
291
  const FIELD_COMPONENTS = {
290
292
  groupList: () => Promise.resolve().then(function () { return index$1; }).then(({ FormGroupListComponent }) => FormGroupListComponent),
291
293
  subGroup: () => Promise.resolve().then(function () { return index; }).then(({ SubGroupComponent }) => SubGroupComponent),
292
- button: () => import('./tft-crispr-forms-index-DYHyL8s6.mjs').then(({ ButtonComponent }) => ButtonComponent),
293
- input: () => import('./tft-crispr-forms-index-DNTOjcVZ.mjs').then(({ InputFieldComponent }) => InputFieldComponent),
294
- select: () => import('./tft-crispr-forms-index-Cpu5cwLo.mjs').then(({ SelectFieldComponent }) => SelectFieldComponent),
295
- radio: () => import('./tft-crispr-forms-index-Bbcv75sh.mjs').then(({ RadioFieldComponent }) => RadioFieldComponent),
296
- autocomplete: () => import('./tft-crispr-forms-index-C_YTy6il.mjs').then(({ AutocompleteFieldComponent }) => AutocompleteFieldComponent),
297
- autocompleteChiplist: () => import('./tft-crispr-forms-index-BDJfgpKH.mjs').then(({ AutocompleteChiplistFieldComponent }) => AutocompleteChiplistFieldComponent),
298
- map: () => import('./tft-crispr-forms-index-D8oUGVGX.mjs').then(({ MapFieldComponent }) => MapFieldComponent),
299
- textarea: () => import('./tft-crispr-forms-index-BVwoi2lw.mjs').then(({ TextareaFieldComponent }) => TextareaFieldComponent),
300
- checkbox: () => import('./tft-crispr-forms-index-CN4M4eEo.mjs').then(({ CheckboxFieldComponent }) => CheckboxFieldComponent),
301
- slider: () => import('./tft-crispr-forms-index-CYzZB0sA.mjs').then(({ SliderFieldComponent }) => SliderFieldComponent),
302
- datepicker: () => import('./tft-crispr-forms-index-BwC11k3P.mjs').then(({ DatepickerFieldComponent }) => DatepickerFieldComponent),
303
- fileUpload: () => import('./tft-crispr-forms-index-BdOC-6h3.mjs').then(({ FileUploadFieldComponent }) => FileUploadFieldComponent),
304
- imageUpload: () => import('./tft-crispr-forms-index-DhIYxOdD.mjs').then(({ ImageUploadFieldComponent }) => ImageUploadFieldComponent),
294
+ button: () => import('./tft-crispr-forms-index-CAFXSHea.mjs').then(({ ButtonComponent }) => ButtonComponent),
295
+ input: () => import('./tft-crispr-forms-index-kJUZksiq.mjs').then(({ InputFieldComponent }) => InputFieldComponent),
296
+ select: () => import('./tft-crispr-forms-index-xbMIxY3P.mjs').then(({ SelectFieldComponent }) => SelectFieldComponent),
297
+ radio: () => import('./tft-crispr-forms-index-DseuVavm.mjs').then(({ RadioFieldComponent }) => RadioFieldComponent),
298
+ autocomplete: () => import('./tft-crispr-forms-index-DkkAr7Yr.mjs').then(({ AutocompleteFieldComponent }) => AutocompleteFieldComponent),
299
+ autocompleteChiplist: () => import('./tft-crispr-forms-index-cdo59qhx.mjs').then(({ AutocompleteChiplistFieldComponent }) => AutocompleteChiplistFieldComponent),
300
+ map: () => import('./tft-crispr-forms-index-DiNlBPaX.mjs').then(({ MapFieldComponent }) => MapFieldComponent),
301
+ textarea: () => import('./tft-crispr-forms-index-De3tRDbo.mjs').then(({ TextareaFieldComponent }) => TextareaFieldComponent),
302
+ checkbox: () => import('./tft-crispr-forms-index-T4Ook6pV.mjs').then(({ CheckboxFieldComponent }) => CheckboxFieldComponent),
303
+ slider: () => import('./tft-crispr-forms-index-BHUGuVwS.mjs').then(({ SliderFieldComponent }) => SliderFieldComponent),
304
+ datepicker: () => import('./tft-crispr-forms-index-CvnyvJJ_.mjs').then(({ DatepickerFieldComponent }) => DatepickerFieldComponent),
305
+ fileUpload: () => Promise.resolve().then(function () { return index$3; }).then(({ FileUploadFieldComponent }) => FileUploadFieldComponent),
306
+ imageUpload: () => import('./tft-crispr-forms-index-DKwMd-o-.mjs').then(({ ImageUploadFieldComponent }) => ImageUploadFieldComponent),
305
307
  heading: () => Promise.resolve().then(function () { return index$2; }).then(({ HeadingComponent }) => HeadingComponent),
306
- divider: () => import('./tft-crispr-forms-index-DLa8K3lm.mjs').then(({ DividerComponent }) => DividerComponent),
307
- unitConversion: () => import('./tft-crispr-forms-index-o78Cm3Kf.mjs').then(({ UnitConversionFieldComponent }) => UnitConversionFieldComponent),
308
+ divider: () => import('./tft-crispr-forms-index-3_zzaLSn.mjs').then(({ DividerComponent }) => DividerComponent),
309
+ unitConversion: () => import('./tft-crispr-forms-index-CN1GmYGC.mjs').then(({ UnitConversionFieldComponent }) => UnitConversionFieldComponent),
308
310
  };
309
311
  function isControlComponent(component) {
310
312
  return component && isControlConfig(component.config) && 'value' in component; // || component.config.controlType === ControlType.BUTTON;
@@ -503,26 +505,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
503
505
  args: ['dragover', ['$event']]
504
506
  }] } });
505
507
 
506
- class SelectedFileComponent {
507
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SelectedFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
508
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: SelectedFileComponent, isStandalone: true, selector: "crispr-selected-file", inputs: { fileName: "fileName", progress: "progress", showProgress: "showProgress", color: "color" }, ngImport: i0, template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n *ngIf=\"showProgress\"\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n</mat-progress-bar>\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], preserveWhitespaces: true }); }
509
- }
510
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SelectedFileComponent, decorators: [{
511
- type: Component,
512
- args: [{ selector: 'crispr-selected-file', standalone: true, imports: [
513
- CommonModule,
514
- MatProgressBarModule
515
- ], template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n *ngIf=\"showProgress\"\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n</mat-progress-bar>\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"] }]
516
- }], propDecorators: { fileName: [{
517
- type: Input
518
- }], progress: [{
519
- type: Input
520
- }], showProgress: [{
521
- type: Input
522
- }], color: [{
523
- type: Input
524
- }] } });
525
-
526
508
  class InfoComponent {
527
509
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
528
510
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: InfoComponent, isStandalone: true, selector: "crispr-info", inputs: { info: "info" }, ngImport: i0, template: "<mat-icon\n *ngIf=\"info\"\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\">\n {{info.iconName || 'info'}}\n</mat-icon>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
@@ -607,10 +589,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
607
589
  type: Input
608
590
  }] } });
609
591
 
592
+ class SelectedFileComponent {
593
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SelectedFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
594
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: SelectedFileComponent, isStandalone: true, selector: "crispr-selected-file", inputs: { fileName: "fileName", progress: "progress", showProgress: "showProgress", color: "color" }, ngImport: i0, template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n *ngIf=\"showProgress\"\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n</mat-progress-bar>\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], preserveWhitespaces: true }); }
595
+ }
596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SelectedFileComponent, decorators: [{
597
+ type: Component,
598
+ args: [{ selector: 'crispr-selected-file', standalone: true, imports: [
599
+ CommonModule,
600
+ MatProgressBarModule
601
+ ], template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n *ngIf=\"showProgress\"\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n</mat-progress-bar>\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"] }]
602
+ }], propDecorators: { fileName: [{
603
+ type: Input
604
+ }], progress: [{
605
+ type: Input
606
+ }], showProgress: [{
607
+ type: Input
608
+ }], color: [{
609
+ type: Input
610
+ }] } });
611
+
612
+ /* eslint-disable @nx/enforce-module-boundaries */
613
+ const FileUploadFieldMixin = crisprControlMixin(CrisprFieldComponent);
614
+ class FileUploadFieldComponent extends FileUploadFieldMixin {
615
+ // ngControl: NgControl = null;
616
+ constructor(ngControl) {
617
+ super();
618
+ this.ngControl = ngControl;
619
+ this.defaultConfig = {
620
+ allowMultipleFiles: false,
621
+ acceptedTypes: '*.*',
622
+ dropZoneText: 'DROP FILE HERE',
623
+ selectFilesButtonType: 'button',
624
+ selectButtonText: 'SELECT',
625
+ showClearFilesButton: true,
626
+ clearFilesButtonText: 'CLEAR',
627
+ uploadButtonText: 'UPLOAD',
628
+ uploadButtonType: 'button',
629
+ showUploadProgress: false,
630
+ disableOnUpload: true,
631
+ };
632
+ this.isUploaded = false;
633
+ this.fileProgress = [];
634
+ if (this.ngControl != null) {
635
+ // Setting the value accessor directly (instead of using
636
+ // the providers) to avoid running into a circular import.
637
+ ngControl.valueAccessor = this;
638
+ }
639
+ }
640
+ ngOnInit() {
641
+ super.ngOnInit();
642
+ this.disabled$ = this.config.disabledCallback
643
+ ? this.config.disabledCallback(this.group)
644
+ : of(false);
645
+ }
646
+ filesChanged(files) {
647
+ if (files && files.length > 0) {
648
+ this.selectedFiles = files;
649
+ this.control.patchValue(files);
650
+ }
651
+ }
652
+ uploadFiles() {
653
+ if (this.selectedFiles && this.config.uploadFiles) {
654
+ this.isUploaded = true;
655
+ this.config.uploadFiles(this.group, this.selectedFiles, this);
656
+ }
657
+ }
658
+ resetFileInput() {
659
+ this.fileInputRef.nativeElement.value = '';
660
+ this.control.patchValue(null);
661
+ this.isUploaded = false;
662
+ }
663
+ writeValue(value) {
664
+ // clear file input
665
+ // this.host.nativeElement.value = '';
666
+ // this.file = null;
667
+ }
668
+ registerOnChange(fn) {
669
+ this.onChange = fn;
670
+ }
671
+ registerOnTouched(fn) { }
672
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileUploadFieldComponent, deps: [{ token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
673
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: FileUploadFieldComponent, isStandalone: true, selector: "crispr-file-upload-field", viewQueries: [{ propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: SelectedFileComponent, selector: "crispr-selected-file", inputs: ["fileName", "progress", "showProgress", "color"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "directive", type: FileDropzoneDirective, selector: "[crisprFileDropzone]", inputs: ["crisprFileDropzone"], outputs: ["fileDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
674
+ }
675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileUploadFieldComponent, decorators: [{
676
+ type: Component,
677
+ args: [{ selector: 'crispr-file-upload-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
678
+ CommonModule,
679
+ FieldContainerComponent,
680
+ ReactiveFormsModule,
681
+ MatIconModule,
682
+ MatButtonModule,
683
+ MatFormFieldModule,
684
+ MatInputModule,
685
+ SelectedFileComponent,
686
+ FormValidationHandlerModule,
687
+ FileDropzoneDirective,
688
+ ], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"] }]
689
+ }], ctorParameters: () => [{ type: i2.NgControl, decorators: [{
690
+ type: Optional
691
+ }, {
692
+ type: Self
693
+ }] }], propDecorators: { fileInputRef: [{
694
+ type: ViewChild,
695
+ args: ['fileInput']
696
+ }] } });
697
+
698
+ var index$3 = /*#__PURE__*/Object.freeze({
699
+ __proto__: null,
700
+ FileUploadFieldComponent: FileUploadFieldComponent
701
+ });
702
+
610
703
  var index$2 = /*#__PURE__*/Object.freeze({
611
704
  __proto__: null,
612
705
  FieldContainerComponent: FieldContainerComponent,
613
706
  FileDropzoneDirective: FileDropzoneDirective,
707
+ FileUploadFieldComponent: FileUploadFieldComponent,
614
708
  HeadingComponent: HeadingComponent,
615
709
  InfoComponent: InfoComponent,
616
710
  SelectedFileComponent: SelectedFileComponent
@@ -846,5 +940,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
846
940
  * Generated bundle index. Do not edit.
847
941
  */
848
942
 
849
- export { AbstractAutocompleteComponent, ControlType, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, crisprControlMixin, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn };
943
+ export { AbstractAutocompleteComponent, ControlType, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, FileUploadFieldComponent, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, crisprControlMixin, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn };
850
944
  //# sourceMappingURL=tft-crispr-forms.mjs.map