@tft/crispr-forms 21.0.2 → 21.0.4

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 (55) hide show
  1. package/fesm2022/tft-crispr-forms-autocomplete-field.component-CpEWI7bT.mjs +95 -0
  2. package/fesm2022/tft-crispr-forms-autocomplete-field.component-CpEWI7bT.mjs.map +1 -0
  3. package/fesm2022/tft-crispr-forms-index-BICpK-GR.mjs +2 -0
  4. package/fesm2022/tft-crispr-forms-index-BICpK-GR.mjs.map +1 -0
  5. package/fesm2022/tft-crispr-forms-index-CG3cLos3.mjs +88 -0
  6. package/fesm2022/tft-crispr-forms-index-CG3cLos3.mjs.map +1 -0
  7. package/fesm2022/tft-crispr-forms-index-CLJ89Dev.mjs +73 -0
  8. package/fesm2022/tft-crispr-forms-index-CLJ89Dev.mjs.map +1 -0
  9. package/fesm2022/tft-crispr-forms-index-CvTUJeC6.mjs +39 -0
  10. package/fesm2022/tft-crispr-forms-index-CvTUJeC6.mjs.map +1 -0
  11. package/fesm2022/tft-crispr-forms-index-D6cKptyg.mjs +36 -0
  12. package/fesm2022/tft-crispr-forms-index-D6cKptyg.mjs.map +1 -0
  13. package/fesm2022/tft-crispr-forms-index-DAx6Am4i.mjs +40 -0
  14. package/fesm2022/tft-crispr-forms-index-DAx6Am4i.mjs.map +1 -0
  15. package/fesm2022/{tft-crispr-forms-index-BQFuEW6x.mjs → tft-crispr-forms-index-DEu5NqmR.mjs} +3 -3
  16. package/fesm2022/tft-crispr-forms-index-DEu5NqmR.mjs.map +1 -0
  17. package/fesm2022/tft-crispr-forms-index-DOpDpDdt.mjs +179 -0
  18. package/fesm2022/tft-crispr-forms-index-DOpDpDdt.mjs.map +1 -0
  19. package/fesm2022/tft-crispr-forms-index-DW1QGkrv.mjs +137 -0
  20. package/fesm2022/tft-crispr-forms-index-DW1QGkrv.mjs.map +1 -0
  21. package/fesm2022/tft-crispr-forms-index-DuvnSHLl.mjs +39 -0
  22. package/fesm2022/tft-crispr-forms-index-DuvnSHLl.mjs.map +1 -0
  23. package/fesm2022/tft-crispr-forms-index-DvrD-Lli.mjs +190 -0
  24. package/fesm2022/tft-crispr-forms-index-DvrD-Lli.mjs.map +1 -0
  25. package/fesm2022/tft-crispr-forms-index-usD7jUs3.mjs +68 -0
  26. package/fesm2022/tft-crispr-forms-index-usD7jUs3.mjs.map +1 -0
  27. package/fesm2022/tft-crispr-forms.mjs +60 -53
  28. package/fesm2022/tft-crispr-forms.mjs.map +1 -1
  29. package/package.json +1 -1
  30. package/types/tft-crispr-forms.d.ts +14 -14
  31. package/fesm2022/tft-crispr-forms-autocomplete-field.component-ChocHy3F.mjs +0 -95
  32. package/fesm2022/tft-crispr-forms-autocomplete-field.component-ChocHy3F.mjs.map +0 -1
  33. package/fesm2022/tft-crispr-forms-index-BQFuEW6x.mjs.map +0 -1
  34. package/fesm2022/tft-crispr-forms-index-BZ9V1Ec-.mjs +0 -39
  35. package/fesm2022/tft-crispr-forms-index-BZ9V1Ec-.mjs.map +0 -1
  36. package/fesm2022/tft-crispr-forms-index-BkCdLt5V.mjs +0 -40
  37. package/fesm2022/tft-crispr-forms-index-BkCdLt5V.mjs.map +0 -1
  38. package/fesm2022/tft-crispr-forms-index-Bypm5YtY.mjs +0 -137
  39. package/fesm2022/tft-crispr-forms-index-Bypm5YtY.mjs.map +0 -1
  40. package/fesm2022/tft-crispr-forms-index-C9gYJRzb.mjs +0 -182
  41. package/fesm2022/tft-crispr-forms-index-C9gYJRzb.mjs.map +0 -1
  42. package/fesm2022/tft-crispr-forms-index-CFwkbxFk.mjs +0 -88
  43. package/fesm2022/tft-crispr-forms-index-CFwkbxFk.mjs.map +0 -1
  44. package/fesm2022/tft-crispr-forms-index-DEctfeGr.mjs +0 -2
  45. package/fesm2022/tft-crispr-forms-index-DEctfeGr.mjs.map +0 -1
  46. package/fesm2022/tft-crispr-forms-index-DcrZSpdk.mjs +0 -73
  47. package/fesm2022/tft-crispr-forms-index-DcrZSpdk.mjs.map +0 -1
  48. package/fesm2022/tft-crispr-forms-index-DmaDlaNf.mjs +0 -68
  49. package/fesm2022/tft-crispr-forms-index-DmaDlaNf.mjs.map +0 -1
  50. package/fesm2022/tft-crispr-forms-index-Hsgr_WHO.mjs +0 -190
  51. package/fesm2022/tft-crispr-forms-index-Hsgr_WHO.mjs.map +0 -1
  52. package/fesm2022/tft-crispr-forms-index-gORcx6V1.mjs +0 -36
  53. package/fesm2022/tft-crispr-forms-index-gORcx6V1.mjs.map +0 -1
  54. package/fesm2022/tft-crispr-forms-index-lrhnilye.mjs +0 -39
  55. package/fesm2022/tft-crispr-forms-index-lrhnilye.mjs.map +0 -1
@@ -23,7 +23,7 @@ class RadioFieldComponent extends CrisprControlComponent {
23
23
  this.options$ = observablifyOptions(this.config().options, this.group());
24
24
  }
25
25
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: RadioFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
26
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: RadioFieldComponent, isStandalone: true, selector: "crispr-radio-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-radio-group\n [formControl]=\"control()\"\n [color]=\"config().color\">\n @for (option of options$ | async; track option) {\n <mat-radio-button class=\"example-radio-button\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n }\n </mat-radio-group>\n</crispr-field-container>\n", styles: ["mat-radio-button{padding:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
26
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: RadioFieldComponent, isStandalone: true, selector: "crispr-radio-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-radio-group\n [attr.data-testid]=\"testId()\"\n [formControl]=\"control()\"\n [color]=\"config().color\">\n @for (option of options$ | async; track option) {\n <mat-radio-button class=\"example-radio-button\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n }\n </mat-radio-group>\n</crispr-field-container>\n", styles: ["mat-radio-button{padding:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
27
27
  }
28
28
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: RadioFieldComponent, decorators: [{
29
29
  type: Component,
@@ -33,8 +33,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
33
33
  FieldContainerComponent,
34
34
  MatRadioModule,
35
35
  FormValidationHandlerModule,
36
- ], standalone: true, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-radio-group\n [formControl]=\"control()\"\n [color]=\"config().color\">\n @for (option of options$ | async; track option) {\n <mat-radio-button class=\"example-radio-button\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n }\n </mat-radio-group>\n</crispr-field-container>\n", styles: ["mat-radio-button{padding:12px}\n"] }]
36
+ ], standalone: true, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-radio-group\n [attr.data-testid]=\"testId()\"\n [formControl]=\"control()\"\n [color]=\"config().color\">\n @for (option of options$ | async; track option) {\n <mat-radio-button class=\"example-radio-button\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n }\n </mat-radio-group>\n</crispr-field-container>\n", styles: ["mat-radio-button{padding:12px}\n"] }]
37
37
  }] });
38
38
 
39
39
  export { RadioFieldComponent };
40
- //# sourceMappingURL=tft-crispr-forms-index-BQFuEW6x.mjs.map
40
+ //# sourceMappingURL=tft-crispr-forms-index-DEu5NqmR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-index-DEu5NqmR.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/radio-field/radio-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/radio-field/radio-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { MatRadioModule } from '@angular/material/radio';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { RadioFieldConfig, SelectOption, observablifyOptions } from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\n@Component({\n selector: 'crispr-radio-field',\n templateUrl: './radio-field.component.html',\n styleUrls: ['./radio-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatRadioModule,\n FormValidationHandlerModule,\n ],\n standalone: true\n})\nexport class RadioFieldComponent extends CrisprControlComponent<RadioFieldConfig> implements OnInit {\n defaultConfig = {};\n options$: Observable<SelectOption[]>;\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","<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-radio-group\n [attr.data-testid]=\"testId()\"\n [formControl]=\"control()\"\n [color]=\"config().color\">\n @for (option of options$ | async; track option) {\n <mat-radio-button class=\"example-radio-button\" [value]=\"option.value\">\n {{option.label}}\n </mat-rad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AoB,EAAA,eAAA,EAGb,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACL,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBACd,2BAA2B;AAC9B,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,+bAAA,EAAA,MAAA,EAAA,CAAA,kCAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,179 @@
1
+ import * as i1$2 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, ChangeDetectorRef, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
5
+ import * as i1 from '@angular/forms';
6
+ import { NgControl, ReactiveFormsModule } from '@angular/forms';
7
+ import * as i1$1 from '@angular/material/button';
8
+ import { MatButtonModule } from '@angular/material/button';
9
+ import * as i2$1 from '@angular/material/form-field';
10
+ import { MatFormFieldModule } from '@angular/material/form-field';
11
+ import * as i2 from '@angular/material/icon';
12
+ import { MatIconModule } from '@angular/material/icon';
13
+ import * as i3 from '@angular/material/input';
14
+ import { MatInputModule } from '@angular/material/input';
15
+ import { DomSanitizer } from '@angular/platform-browser';
16
+ import imageCompression from 'browser-image-compression';
17
+ import { Subject, combineLatest, of } from 'rxjs';
18
+ import { shareReplay, switchMap, map, tap, startWith } from 'rxjs/operators';
19
+ import * as i6 from '@tft/form-validation-handler';
20
+ import { FormValidationHandlerModule } from '@tft/form-validation-handler';
21
+ import { CrisprControlComponent, convertBytesToMb, FieldContainerComponent, SelectedFileComponent, FileDropzoneDirective } from './tft-crispr-forms.mjs';
22
+
23
+ /* eslint-disable @nx/enforce-module-boundaries */
24
+ class ImageUploadFieldComponent extends CrisprControlComponent {
25
+ constructor() {
26
+ super();
27
+ this.ngControl = inject(NgControl, { optional: true, self: true });
28
+ this.domSanitizer = inject(DomSanitizer);
29
+ this.cdr = inject(ChangeDetectorRef);
30
+ this.defaultConfig = {
31
+ // allowMultipleFiles: false,
32
+ acceptedTypes: 'image/*',
33
+ dropZoneText: 'DROP FILE HERE',
34
+ selectFilesButtonType: 'button',
35
+ selectButtonText: 'SELECT',
36
+ showClearFilesButton: true,
37
+ clearFilesButtonText: 'CLEAR',
38
+ resetFilesButtonText: 'RESET',
39
+ imagePreviewHeight: '250px',
40
+ compressImage: false,
41
+ targetCompressedImageFileSizeMb: 0.4,
42
+ minCompressionThresholdMb: 0.6,
43
+ useWebWorker: true,
44
+ };
45
+ this.inputImageFileSubject = new Subject();
46
+ this.inputImageFile$ = this.inputImageFileSubject
47
+ .asObservable()
48
+ .pipe(shareReplay(1));
49
+ this.compressedFile$ = this.inputImageFile$.pipe(switchMap(async (file) => {
50
+ if (!file || !(file instanceof File))
51
+ return null;
52
+ const { compressImage, targetCompressedImageFileSizeMb, minCompressionThresholdMb, maxWidthOrHeight, useWebWorker, } = this.config();
53
+ const fileSizeMb = convertBytesToMb(file.size);
54
+ const shouldCompress = compressImage &&
55
+ targetCompressedImageFileSizeMb < fileSizeMb &&
56
+ minCompressionThresholdMb < fileSizeMb;
57
+ if (shouldCompress) {
58
+ const options = {
59
+ // Use maxWidthOrHeight if it was provided, else use target compressed size
60
+ ...(maxWidthOrHeight
61
+ ? { maxWidthOrHeight }
62
+ : { maxSizeMB: targetCompressedImageFileSizeMb }),
63
+ useWebWorker,
64
+ maxIterations: 30,
65
+ onProgress: (progress) => {
66
+ this.progress = progress;
67
+ this.cdr.detectChanges();
68
+ },
69
+ };
70
+ return await imageCompression(file, options);
71
+ }
72
+ else
73
+ return file;
74
+ }), map((compressedFile) => {
75
+ if (!compressedFile)
76
+ return compressedFile;
77
+ const { type, name, lastModified } = compressedFile;
78
+ return new File([compressedFile], this.config().fileName || name, {
79
+ type,
80
+ lastModified,
81
+ });
82
+ }), tap((file) => {
83
+ // only set the value if there is a file because resetToInitialValue sets the control value
84
+ // to initial value and clears the compressed image, so setting it to null here would undo that
85
+ if (file) {
86
+ this.control().setValue(file);
87
+ }
88
+ if (file || this.value) {
89
+ this.control().markAsTouched();
90
+ setTimeout(() => {
91
+ this.cdr.detectChanges();
92
+ }, 100);
93
+ }
94
+ }), shareReplay(1));
95
+ this.compressedImageUrlString$ = this.compressedFile$.pipe(switchMap(async (file) => {
96
+ if (!file)
97
+ return null;
98
+ const compressedStringImage = await imageCompression.getDataUrlFromFile(file);
99
+ return this.domSanitizer.bypassSecurityTrustResourceUrl(compressedStringImage);
100
+ }), shareReplay(1));
101
+ this.isUploaded = false;
102
+ const ngControl = this.ngControl;
103
+ if (this.ngControl != null) {
104
+ // Setting the value accessor directly (instead of using
105
+ // the providers) to avoid running into a circular import.
106
+ ngControl.valueAccessor = this;
107
+ }
108
+ }
109
+ ngOnInit() {
110
+ super.ngOnInit();
111
+ this.imageSrcUrl$ = combineLatest([
112
+ this.compressedImageUrlString$.pipe(startWith(null)),
113
+ this.control().valueChanges.pipe(startWith(this.value()), map((controlValue) => {
114
+ if (!controlValue)
115
+ return null;
116
+ if (controlValue instanceof File)
117
+ return null;
118
+ return (this.config().mapInputValueToUrl?.(controlValue) ||
119
+ controlValue);
120
+ })),
121
+ ]).pipe(map(([compressedImageUrlString, controlUrl]) => {
122
+ return compressedImageUrlString || controlUrl || null;
123
+ }));
124
+ this.disabled$ = this.config().disabledCallback
125
+ ? this.config().disabledCallback(this.group())
126
+ : of(false);
127
+ }
128
+ filesChanged(files) {
129
+ if (files && files.length > 0) {
130
+ const imageFile = files[0];
131
+ // We clear the control here so that it is invalid while compressing
132
+ // the input pipeline will take care of resetting it
133
+ this.control().patchValue(null);
134
+ // this.control().setErrors({compressing: {loadingMessage: 'Please wait while file compresses'}});
135
+ this.control().markAsTouched();
136
+ this.inputImageFileSubject.next(imageFile);
137
+ }
138
+ }
139
+ clearFileInput() {
140
+ this.inputImageFileSubject.next(null);
141
+ this.fileInputRef.nativeElement.value = '';
142
+ this.control().patchValue(null);
143
+ this.control().markAsTouched();
144
+ this.isUploaded = false;
145
+ }
146
+ resetToInitialValue(initialValue) {
147
+ this.inputImageFileSubject.next(null);
148
+ this.control().patchValue(initialValue);
149
+ this.isUploaded = false;
150
+ }
151
+ writeValue(value) { }
152
+ registerOnChange(fn) {
153
+ this.onChange = fn;
154
+ }
155
+ registerOnTouched(fn) { }
156
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ImageUploadFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
157
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: ImageUploadFieldComponent, isStandalone: true, selector: "crispr-image-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\n <mat-form-field floatLabel=\"always\"\n [attr.data-testid]=\"testId()\"\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n <mat-label>{{config().label}}</mat-label>\n <input [formControlName]=\"config().controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n [accept]=\"config().acceptedTypes\"\n (change)=\"filesChanged($event.target.files)\"/>\n <div class=\"ui-container\">\n\n <div class=\"image-preview\" [style.height]=\"config().imagePreviewHeight\">\n @if ((progress < 100) && inputImageFile$ | async; as file) {\n <crispr-selected-file\n [color]=\"config().color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"'Compressing: ' + file.name\"\n [showProgress]=\"true\"\n [progress]=\"progress\">\n </crispr-selected-file>\n } @else {\n <!-- <img *ngIf=\"(initialUrlString$ | async) as initialUrlString;\" [src]=\"initialUrlString\" alt=\"\"> -->\n @if (imageSrcUrl$ | async; as srcUrl) {\n <img [src]=\"srcUrl\" alt=\"\">\n } @else {\n <div class=\"drop-container\"\n [crisprFileDropzone]=\"!(disabled$ | async)\"\n (fileDrop)=\"filesChanged($event)\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config().dropZoneText}}</h2>\n </div>\n }\n }\n\n </div>\n\n\n\n <!-- </ng-template> -->\n @if (true) {\n <div class=\"button-container\">\n <button\n mat-button\n (click)=\"clearFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>delete</mat-icon>\n {{config().clearFilesButtonText}}\n </button>\n @if (value()) {\n <button\n mat-button\n (click)=\"resetToInitialValue(value())\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>replay</mat-icon>\n {{config().resetFilesButtonText}}\n </button>\n }\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async)\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config().controlName\">\n <mat-icon>\n camera\n </mat-icon>\n SELECT\n </button>\n </div>\n }\n </div>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n</mat-form-field>\n\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0}:host ::ng-deep .mat-mdc-form-field .mat-button-wrapper{display:flex;flex-direction:column;align-items:center;padding-top:8px}:host .ui-container{display:flex;flex-direction:column}:host .ui-container .image-preview{display:flex;flex-direction:column;align-content:space-between;justify-content:center;align-items:center;margin:8px 0;flex-grow:1}:host .ui-container .image-preview crispr-selected-file{width:100%}:host .ui-container .image-preview .drop-container{display:flex;box-sizing:border-box;flex-direction:column;align-items:center;border:3px dashed gray;height:100%;width:100%;align-content:center;justify-content:center;border-radius:8px}:host .ui-container .image-preview .drop-container .drop-icon{height:32px;width:32px;font-size:36px}:host .ui-container .image-preview .drop-container .mat-h2{margin:0}:host .ui-container .image-preview img{height:inherit;max-width:100%}:host .ui-container .button-container{display:flex;flex-direction:var(--image-upload-button-container-direction);justify-content:flex-end}:host .ui-container .button-container button{margin-left:8px}:host input{position:absolute;max-height:0;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: SelectedFileComponent, selector: "crispr-selected-file", inputs: ["fileName", "progress", "showProgress", "color"] }, { kind: "directive", type: FileDropzoneDirective, selector: "[crisprFileDropzone]", inputs: ["crisprFileDropzone"], outputs: ["fileDrop"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
158
+ }
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: ImageUploadFieldComponent, decorators: [{
160
+ type: Component,
161
+ args: [{ selector: 'crispr-image-upload-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
162
+ CommonModule,
163
+ FieldContainerComponent,
164
+ ReactiveFormsModule,
165
+ MatIconModule,
166
+ MatButtonModule,
167
+ MatFormFieldModule,
168
+ MatInputModule,
169
+ SelectedFileComponent,
170
+ FileDropzoneDirective,
171
+ FormValidationHandlerModule,
172
+ ], standalone: true, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-form-field floatLabel=\"always\"\n [attr.data-testid]=\"testId()\"\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n <mat-label>{{config().label}}</mat-label>\n <input [formControlName]=\"config().controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n [accept]=\"config().acceptedTypes\"\n (change)=\"filesChanged($event.target.files)\"/>\n <div class=\"ui-container\">\n\n <div class=\"image-preview\" [style.height]=\"config().imagePreviewHeight\">\n @if ((progress < 100) && inputImageFile$ | async; as file) {\n <crispr-selected-file\n [color]=\"config().color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"'Compressing: ' + file.name\"\n [showProgress]=\"true\"\n [progress]=\"progress\">\n </crispr-selected-file>\n } @else {\n <!-- <img *ngIf=\"(initialUrlString$ | async) as initialUrlString;\" [src]=\"initialUrlString\" alt=\"\"> -->\n @if (imageSrcUrl$ | async; as srcUrl) {\n <img [src]=\"srcUrl\" alt=\"\">\n } @else {\n <div class=\"drop-container\"\n [crisprFileDropzone]=\"!(disabled$ | async)\"\n (fileDrop)=\"filesChanged($event)\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config().dropZoneText}}</h2>\n </div>\n }\n }\n\n </div>\n\n\n\n <!-- </ng-template> -->\n @if (true) {\n <div class=\"button-container\">\n <button\n mat-button\n (click)=\"clearFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>delete</mat-icon>\n {{config().clearFilesButtonText}}\n </button>\n @if (value()) {\n <button\n mat-button\n (click)=\"resetToInitialValue(value())\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>replay</mat-icon>\n {{config().resetFilesButtonText}}\n </button>\n }\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async)\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config().controlName\">\n <mat-icon>\n camera\n </mat-icon>\n SELECT\n </button>\n </div>\n }\n </div>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n</mat-form-field>\n\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0}:host ::ng-deep .mat-mdc-form-field .mat-button-wrapper{display:flex;flex-direction:column;align-items:center;padding-top:8px}:host .ui-container{display:flex;flex-direction:column}:host .ui-container .image-preview{display:flex;flex-direction:column;align-content:space-between;justify-content:center;align-items:center;margin:8px 0;flex-grow:1}:host .ui-container .image-preview crispr-selected-file{width:100%}:host .ui-container .image-preview .drop-container{display:flex;box-sizing:border-box;flex-direction:column;align-items:center;border:3px dashed gray;height:100%;width:100%;align-content:center;justify-content:center;border-radius:8px}:host .ui-container .image-preview .drop-container .drop-icon{height:32px;width:32px;font-size:36px}:host .ui-container .image-preview .drop-container .mat-h2{margin:0}:host .ui-container .image-preview img{height:inherit;max-width:100%}:host .ui-container .button-container{display:flex;flex-direction:var(--image-upload-button-container-direction);justify-content:flex-end}:host .ui-container .button-container button{margin-left:8px}:host input{position:absolute;max-height:0;visibility:hidden}\n"] }]
173
+ }], ctorParameters: () => [], propDecorators: { fileInputRef: [{
174
+ type: ViewChild,
175
+ args: ['fileInput']
176
+ }] } });
177
+
178
+ export { ImageUploadFieldComponent };
179
+ //# sourceMappingURL=tft-crispr-forms-index-DOpDpDdt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-index-DOpDpDdt.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/image-upload-field/image-upload-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/image-upload-field/image-upload-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { CommonModule } from '@angular/common';\nimport { Component, ElementRef, ViewChild, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, inject } from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport imageCompression from 'browser-image-compression';\nimport { combineLatest, Observable, of, Subject } from 'rxjs';\nimport { map, shareReplay, startWith, switchMap, tap } from 'rxjs/operators';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FileDropzoneDirective } from '../file-dropzone';\nimport { SelectedFileComponent } from '../selected-file';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n convertBytesToMb,\n ImageUploadFieldConfig,\n} from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\n@Component({\n selector: 'crispr-image-upload-field',\n templateUrl: './image-upload-field.component.html',\n styleUrls: ['./image-upload-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FieldContainerComponent,\n ReactiveFormsModule,\n MatIconModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n SelectedFileComponent,\n FileDropzoneDirective,\n FormValidationHandlerModule,\n ],\n standalone: true\n})\nexport class ImageUploadFieldComponent\n extends CrisprControlComponent<ImageUploadFieldConfig>\n implements OnInit, ControlValueAccessor\n{\n ngControl = inject(NgControl, { optional: true, self: true });\n private domSanitizer = inject(DomSanitizer);\n private cdr = inject(ChangeDetectorRef);\n\n onChange: () => void;\n\n defaultConfig: Partial<ImageUploadFieldConfig> = {\n // allowMultipleFiles: false,\n acceptedTypes: 'image/*',\n dropZoneText: 'DROP FILE HERE',\n selectFilesButtonType: 'button',\n selectButtonText: 'SELECT',\n showClearFilesButton: true,\n clearFilesButtonText: 'CLEAR',\n resetFilesButtonText: 'RESET',\n imagePreviewHeight: '250px',\n compressImage: false,\n targetCompressedImageFileSizeMb: 0.4,\n minCompressionThresholdMb: 0.6,\n useWebWorker: true,\n };\n\n private inputImageFileSubject = new Subject<File | null>();\n inputImageFile$ = this.inputImageFileSubject\n .asObservable()\n .pipe(shareReplay(1));\n /**\n * the compression progress\n */\n progress: number | undefined;\n\n compressedFile$: Observable<File> = this.inputImageFile$.pipe(\n switchMap(async (file) => {\n if (!file || !(file instanceof File)) return null;\n const {\n compressImage,\n targetCompressedImageFileSizeMb,\n minCompressionThresholdMb,\n maxWidthOrHeight,\n useWebWorker,\n } = this.config();\n const fileSizeMb = convertBytesToMb(file.size);\n const shouldCompress =\n compressImage &&\n targetCompressedImageFileSizeMb < fileSizeMb &&\n minCompressionThresholdMb < fileSizeMb;\n if (shouldCompress) {\n const options = {\n // Use maxWidthOrHeight if it was provided, else use target compressed size\n ...(maxWidthOrHeight\n ? { maxWidthOrHeight }\n : { maxSizeMB: targetCompressedImageFileSizeMb }),\n useWebWorker,\n maxIterations: 30,\n onProgress: (progress: number) => {\n this.progress = progress;\n this.cdr.detectChanges();\n },\n };\n return await imageCompression(file, options);\n } else return file;\n }),\n map((compressedFile: File) => {\n if (!compressedFile) return compressedFile;\n const { type, name, lastModified } = compressedFile;\n return new File([compressedFile], this.config().fileName || name, {\n type,\n lastModified,\n });\n }),\n tap((file) => {\n // only set the value if there is a file because resetToInitialValue sets the control value\n // to initial value and clears the compressed image, so setting it to null here would undo that\n if (file) {\n this.control().setValue(file);\n }\n if (file || this.value) {\n this.control().markAsTouched();\n setTimeout(() => {\n this.cdr.detectChanges();\n }, 100);\n }\n }),\n shareReplay(1)\n );\n\n compressedImageUrlString$: Observable<string | null> =\n this.compressedFile$.pipe(\n switchMap(async (file) => {\n if (!file) return null;\n const compressedStringImage = await imageCompression.getDataUrlFromFile(\n file\n );\n return this.domSanitizer.bypassSecurityTrustResourceUrl(\n compressedStringImage\n ) as string;\n }),\n shareReplay(1)\n );\n\n // This is what is displayed by the image preview\n imageSrcUrl$: Observable<string | null>;\n\n @ViewChild('fileInput') fileInputRef: ElementRef;\n\n selectedFiles: FileList;\n\n isUploaded = false;\n\n disabled$: Observable<boolean>;\n\n constructor() {\n super();\n const ngControl = this.ngControl;\n\n if (this.ngControl != null) {\n // Setting the value accessor directly (instead of using\n // the providers) to avoid running into a circular import.\n ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.imageSrcUrl$ = combineLatest([\n this.compressedImageUrlString$.pipe(startWith(null)),\n this.control().valueChanges.pipe(\n startWith(this.value()),\n map((controlValue): string => {\n if (!controlValue) return null;\n if (controlValue instanceof File) return null;\n return (\n this.config().mapInputValueToUrl?.(controlValue) ||\n (controlValue as string)\n );\n })\n ),\n ]).pipe(\n map(([compressedImageUrlString, controlUrl]) => {\n return compressedImageUrlString || controlUrl || null;\n })\n );\n this.disabled$ = this.config().disabledCallback\n ? this.config().disabledCallback(this.group())\n : of(false);\n }\n\n filesChanged(files: FileList): void {\n if (files && files.length > 0) {\n const imageFile = files[0];\n // We clear the control here so that it is invalid while compressing\n // the input pipeline will take care of resetting it\n this.control().patchValue(null);\n // this.control().setErrors({compressing: {loadingMessage: 'Please wait while file compresses'}});\n this.control().markAsTouched();\n this.inputImageFileSubject.next(imageFile);\n }\n }\n\n clearFileInput(): void {\n this.inputImageFileSubject.next(null);\n this.fileInputRef.nativeElement.value = '';\n this.control().patchValue(null);\n this.control().markAsTouched();\n this.isUploaded = false;\n }\n\n resetToInitialValue(initialValue: string): void {\n this.inputImageFileSubject.next(null);\n this.control().patchValue(initialValue);\n this.isUploaded = false;\n }\n\n writeValue(value: null) {}\n\n registerOnChange(fn: () => void) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void) {}\n}\n","<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-form-field floatLabel=\"always\"\n [attr.data-testid]=\"testId()\"\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n <mat-label>{{config().label}}</mat-label>\n <input [formControlName]=\"config().controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n [accept]=\"config().acceptedTypes\"\n (change)=\"filesChanged($event.target.files)\"/>\n <div class=\"ui-container\">\n\n <div class=\"image-preview\" [style.height]=\"config().imagePreviewHeight\">\n @if ((progress < 100) && inputImageFile$ | async; as file) {\n <crispr-selected-file\n [color]=\"config().color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"'Compressing: ' + file.name\"\n [showProgress]=\"true\"\n [progress]=\"progress\">\n </crispr-selected-file>\n } @else {\n <!-- <img *ngIf=\"(initialUrlString$ | async) as initialUrlString;\" [src]=\"initialUrlString\" alt=\"\"> -->\n @if (imageSrcUrl$ | async; as srcUrl) {\n <img [src]=\"srcUrl\" alt=\"\">\n } @else {\n <div class=\"drop-container\"\n [crisprFileDropzone]=\"!(disabled$ | async)\"\n (fileDrop)=\"filesChanged($event)\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config().dropZoneText}}</h2>\n </div>\n }\n }\n\n </div>\n\n\n\n <!-- </ng-template> -->\n @if (true) {\n <div class=\"button-container\">\n <button\n mat-button\n (click)=\"clearFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>delete</mat-icon>\n {{config().clearFilesButtonText}}\n </button>\n @if (value()) {\n <button\n mat-button\n (click)=\"resetToInitialValue(value())\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>replay</mat-icon>\n {{config().resetFilesButtonText}}\n </button>\n }\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async)\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config().controlName\">\n <mat-icon>\n camera\n </mat-icon>\n SELECT\n </button>\n </div>\n }\n </div>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n</mat-form-field>\n\n</crispr-field-container>\n"],"names":["i3","i4","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AA6CM,MAAO,yBACX,SAAQ,sBAA8C,CAAA;AAkHtD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAhHT,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACr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,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACrB,2BAA2B,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;2FAItB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAnBrC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,EAAA,eAAA,EAGpB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACL,YAAY;wBACZ,uBAAuB;wBACvB,mBAAmB;wBACnB,aAAa;wBACb,eAAe;wBACf,kBAAkB;wBAClB,cAAc;wBACd,qBAAqB;wBACrB,qBAAqB;wBACrB,2BAA2B;AAC9B,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,g3FAAA,EAAA,MAAA,EAAA,CAAA,ysCAAA,CAAA,EAAA;;sBA6GjB,SAAS;uBAAC,WAAW;;;;;"}
@@ -0,0 +1,137 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { tap, map } from 'rxjs/operators';
4
+ import * as i2 from '@angular/material/autocomplete';
5
+ import { MatAutocompleteModule, MatAutocompleteTrigger } from '@angular/material/autocomplete';
6
+ import { BehaviorSubject, combineLatest } from 'rxjs';
7
+ import { ENTER } from '@angular/cdk/keycodes';
8
+ import * as i5 from '@angular/material/chips';
9
+ import { MatChipsModule } from '@angular/material/chips';
10
+ import * as i1$1 from '@angular/common';
11
+ import { CommonModule } from '@angular/common';
12
+ import * as i1 from '@angular/forms';
13
+ import { ReactiveFormsModule } from '@angular/forms';
14
+ import { MatOptionModule } from '@angular/material/core';
15
+ import * as i3 from '@angular/material/input';
16
+ import { MatInputModule } from '@angular/material/input';
17
+ import { O as OptionComponent } from './tft-crispr-forms-index-UAYeTe3L.mjs';
18
+ import * as i2$2 from '@angular/material/icon';
19
+ import { MatIconModule } from '@angular/material/icon';
20
+ import { DEFAULT_EMPTY_OPTIONS_MESSAGE, AbstractAutocompleteComponent, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
21
+ import * as i6 from '@tft/form-validation-handler';
22
+ import { FormValidationHandlerModule } from '@tft/form-validation-handler';
23
+ import * as i2$1 from '@angular/material/form-field';
24
+
25
+ /* eslint-disable @nx/enforce-module-boundaries */
26
+ const defaultConfig = {
27
+ chipsSelectable: true,
28
+ areChipsRemovable: true,
29
+ tabToSelect: true,
30
+ autoActiveFirstOption: true,
31
+ imageUrlParam: 'image',
32
+ typeDebounceTime: 500,
33
+ allowDuplicates: false,
34
+ duplicateCompareFunction: (chip, option) => chip.value === option.value,
35
+ separatorKeyCodes: [ENTER],
36
+ emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,
37
+ };
38
+ class AutocompleteChiplistFieldComponent extends AbstractAutocompleteComponent {
39
+ constructor() {
40
+ super(...arguments);
41
+ this.defaultConfig = defaultConfig;
42
+ this.chips$ = new BehaviorSubject([]);
43
+ this.selectedChip = null;
44
+ this.controlValue$ = this.chips$.pipe(tap((chips) => {
45
+ this.control().setValue(chips.map((chip) => chip.value));
46
+ }));
47
+ }
48
+ ngOnInit() {
49
+ super.ngOnInit();
50
+ this.remainingOptions$ = combineLatest([this.chips$, this.options$]).pipe(map(([chips, options]) => {
51
+ return this.config().allowDuplicates
52
+ ? options
53
+ : options?.filter((option) => {
54
+ return !chips.some((chip) => this.config().duplicateCompareFunction(chip, option));
55
+ });
56
+ }));
57
+ }
58
+ setControlValue(value) {
59
+ if (value) {
60
+ this.chips$.next(value);
61
+ }
62
+ }
63
+ // handles mat selecting
64
+ handleSelect(event) {
65
+ const selectedOption = event.option.value;
66
+ this.chips$.next([...this.chips$.value, selectedOption]);
67
+ this.chipInputRef.nativeElement.value = '';
68
+ this.autocompleteInputControl.setValue('');
69
+ // setTimeout needed because the panel thinks it's still open at this point
70
+ setTimeout(() => this.chipInput.openPanel());
71
+ }
72
+ /**
73
+ * To follow ARIA standards we want to select the active option on blur.
74
+ * matChipInputAddOnBlur should do this but it causes buggy behaviour
75
+ * @param event blur event that triggers the handle blur
76
+ */
77
+ handleTab(_event) {
78
+ if (this.chipInput.activeOption &&
79
+ (this.config().tabToSelect || this.config().addChipOnBlur)) {
80
+ const chip = this.chipInput.activeOption.value;
81
+ this.chips$.next([...this.chips$.value, chip]);
82
+ }
83
+ }
84
+ /**
85
+ * Handles selection via key tokens passed through separatorKeyCodes property
86
+ * NOTE: If TAB is used focus does not move on to next component
87
+ * @param event
88
+ */
89
+ handleTokenEnd(event) {
90
+ if (this.chipInput.activeOption) {
91
+ this.chipInput.activeOption.select();
92
+ }
93
+ event.chipInput?.clear();
94
+ }
95
+ mapToLabel(option) {
96
+ return option ? option.label : '';
97
+ }
98
+ removeChip(removedChip) {
99
+ const remainingChips = this.chips$.value.filter((chip) => chip !== removedChip);
100
+ this.chips$.next(remainingChips);
101
+ }
102
+ highlightChip(chip) {
103
+ if (this.config().chipsSelectable) {
104
+ this.selectedChip = chip;
105
+ }
106
+ }
107
+ blurField() {
108
+ this.selectedChip = null;
109
+ }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AutocompleteChiplistFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
111
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: AutocompleteChiplistFieldComponent, isStandalone: true, selector: "crispr-autocomplete-chiplist-field", viewQueries: [{ propertyName: "chipInput", first: true, predicate: ["autoInput"], descendants: true, read: MatAutocompleteTrigger }, { propertyName: "chipInputRef", first: true, predicate: ["autoInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\" [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n\n <mat-chip-grid #chipList>\n <!-- [selectable]=\"config().chipsSelectable\" -->\n @for (chip of controlValue$ | async; track chip; let i = $index) {\n <mat-chip-row class=\"refinement-chip\" [removable]=\"config().areChipsRemovable\"\n [highlighted]=\"chip?.value === selectedChip?.value\" (click)=\"highlightChip(chip)\" (removed)=\"removeChip(chip)\">\n @if (chip.imageUrl) {<img [src]=\"chip.imageUrl\" matChipAvatar alt=\"image of {{chip.label}}\">}\n {{chip.label}}\n @if (config().areChipsRemovable) {<mat-icon matChipRemove>cancel</mat-icon>}\n </mat-chip-row>\n }\n <input class=\"hidden-error-directive-anchor\" (blur)=\"blurField()\" [formControlName]=\"config().controlName\"\n type=\"text\" />\n\n <input matInput [formControl]=\"autocompleteInputControl\" [placeholder]=\"config().placeholder\"\n [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" (keydown.tab)=\"handleTab($event)\"\n [matChipInputSeparatorKeyCodes]=\"config().separatorKeyCodes\" (matChipInputTokenEnd)=\"handleTokenEnd($event)\"\n role=\"searchbox\" type=\"text\" autocapitalize=\"off\" autocorrect=\"off\" spellcheck=\"false\" (blur)=\"blurField()\"\n #autoInput />\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info \"></crispr-info>}\n\n </mat-chip-grid>\n <mat-autocomplete #auto=\"matAutocomplete\" [autoActiveFirstOption]=\"this.config().autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\" [displayWith]=\"mapToLabel\">\n @if (remainingOptions$ | async; as remainingOptions) {\n @if (remainingOptions.length > 0) {\n @for (option of remainingOptions$ | async; track option.value) {\n <mat-option [value]=\"option\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>", styles: [".refinement-chip .image-container{width:26px;height:26px;border-radius:50%;overflow:hidden;margin:-2px 4px -2px -8px}.refinement-chip .image-container img{width:100%;height:100%;object-fit:cover}.hidden-error-directive-anchor{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "component", type: OptionComponent, selector: "crispr-option", inputs: ["option"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "directive", type: i5.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i5.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
112
+ }
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AutocompleteChiplistFieldComponent, decorators: [{
114
+ type: Component,
115
+ args: [{ selector: 'crispr-autocomplete-chiplist-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
116
+ CommonModule,
117
+ InfoComponent,
118
+ OptionComponent,
119
+ ReactiveFormsModule,
120
+ FieldContainerComponent,
121
+ MatAutocompleteModule,
122
+ MatInputModule,
123
+ MatOptionModule,
124
+ MatChipsModule,
125
+ MatIconModule,
126
+ FormValidationHandlerModule,
127
+ ], standalone: true, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\" [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n\n <mat-chip-grid #chipList>\n <!-- [selectable]=\"config().chipsSelectable\" -->\n @for (chip of controlValue$ | async; track chip; let i = $index) {\n <mat-chip-row class=\"refinement-chip\" [removable]=\"config().areChipsRemovable\"\n [highlighted]=\"chip?.value === selectedChip?.value\" (click)=\"highlightChip(chip)\" (removed)=\"removeChip(chip)\">\n @if (chip.imageUrl) {<img [src]=\"chip.imageUrl\" matChipAvatar alt=\"image of {{chip.label}}\">}\n {{chip.label}}\n @if (config().areChipsRemovable) {<mat-icon matChipRemove>cancel</mat-icon>}\n </mat-chip-row>\n }\n <input class=\"hidden-error-directive-anchor\" (blur)=\"blurField()\" [formControlName]=\"config().controlName\"\n type=\"text\" />\n\n <input matInput [formControl]=\"autocompleteInputControl\" [placeholder]=\"config().placeholder\"\n [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" (keydown.tab)=\"handleTab($event)\"\n [matChipInputSeparatorKeyCodes]=\"config().separatorKeyCodes\" (matChipInputTokenEnd)=\"handleTokenEnd($event)\"\n role=\"searchbox\" type=\"text\" autocapitalize=\"off\" autocorrect=\"off\" spellcheck=\"false\" (blur)=\"blurField()\"\n #autoInput />\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info \"></crispr-info>}\n\n </mat-chip-grid>\n <mat-autocomplete #auto=\"matAutocomplete\" [autoActiveFirstOption]=\"this.config().autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\" [displayWith]=\"mapToLabel\">\n @if (remainingOptions$ | async; as remainingOptions) {\n @if (remainingOptions.length > 0) {\n @for (option of remainingOptions$ | async; track option.value) {\n <mat-option [value]=\"option\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>", styles: [".refinement-chip .image-container{width:26px;height:26px;border-radius:50%;overflow:hidden;margin:-2px 4px -2px -8px}.refinement-chip .image-container img{width:100%;height:100%;object-fit:cover}.hidden-error-directive-anchor{display:none}\n"] }]
128
+ }], propDecorators: { chipInput: [{
129
+ type: ViewChild,
130
+ args: ['autoInput', { read: MatAutocompleteTrigger }]
131
+ }], chipInputRef: [{
132
+ type: ViewChild,
133
+ args: ['autoInput']
134
+ }] } });
135
+
136
+ export { AutocompleteChiplistFieldComponent };
137
+ //# sourceMappingURL=tft-crispr-forms-index-DW1QGkrv.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-index-DW1QGkrv.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 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 standalone: true\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 this.selectedChip = null;\n }\n}\n","<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\" [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n\n <mat-chip-grid #chipList>\n <!-- [selectable]=\"config().chipsSelectable\" -->\n @for (chip of controlValue$ | async; track chip; let i = $index) {\n <mat-chip-row class=\"refinement-chip\" [removable]=\"config().areChipsRemovable\"\n [highlighted]=\"chip?.value === selectedChip?.value\" (click)=\"highlightChip(chip)\" (removed)=\"removeChip(chip)\">\n @if (chip.imageUrl) {<img [src]=\"chip.imageUrl\" matChipAvatar alt=\"image of {{chip.label}}\">}\n {{chip.label}}\n @if (config().areChipsRemovable) {<mat-icon matChipRemove>cancel</mat-icon>}\n </mat-chip-row>\n }\n <input class=\"hidden-error-directive-anchor\" (blur)=\"blurField()\" [formControlName]=\"config().controlName\"\n type=\"text\" />\n\n <input matInput [formControl]=\"autocompleteInputControl\" [placeholder]=\"config().placeholder\"\n [matChipInputFor]=\"chipList\" [matAutocomplete]=\"auto\" (keydown.tab)=\"handleTab($event)\"\n [matChipInputSeparatorKeyCodes]=\"config().separatorKeyCodes\" (matChipInputTokenEnd)=\"handleTokenEnd($event)\"\n role=\"searchbox\" type=\"text\" autocapitalize=\"off\" autocorrect=\"off\" spellcheck=\"false\" (blur)=\"blurField()\"\n #autoInput />\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info \"></crispr-info>}\n\n </mat-chip-grid>\n <mat-autocomplete #auto=\"matAutocomplete\" [autoActiveFirstOption]=\"this.config().autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\" [displayWith]=\"mapToLabel\">\n @if (remainingOptions$ | async; as remainingOptions) {\n @if (remainingOptions.length > 0) {\n @for (option of remainingOptions$ | async; track option.value) {\n <mat-option [value]=\"option\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-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,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,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,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;2FAItB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBApB9C,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,EAAA,eAAA,EAG7B,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACL,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,mBAAmB;wBACnB,uBAAuB;wBACvB,qBAAqB;wBACrB,cAAc;wBACd,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,2BAA2B;AAC9B,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,ynFAAA,EAAA,MAAA,EAAA,CAAA,mPAAA,CAAA,EAAA;;sBAmBjB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;;sBAEvD,SAAS;uBAAC,WAAW;;;;;"}
@@ -0,0 +1,39 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import * as i2 from '@angular/material/form-field';
6
+ import { MatFormFieldModule } from '@angular/material/form-field';
7
+ import * as i3 from '@angular/material/input';
8
+ import { MatInputModule } from '@angular/material/input';
9
+ import * as i6 from '@tft/form-validation-handler';
10
+ import { FormValidationHandlerModule } from '@tft/form-validation-handler';
11
+ import { CrisprControlComponent, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
12
+
13
+ /* eslint-disable @nx/enforce-module-boundaries */
14
+ const defaultConfig = { rows: 5 };
15
+ class TextareaFieldComponent extends CrisprControlComponent {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.defaultConfig = defaultConfig;
19
+ }
20
+ ngOnInit() {
21
+ super.ngOnInit();
22
+ }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: TextareaFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: TextareaFieldComponent, isStandalone: true, selector: "crispr-textarea-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <textarea [rows]=\"config().rows\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\">\n </textarea>\n @if (config().info) {<crispr-info [info]=\"config().info\"></crispr-info>}\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().hint && control().valid) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n</crispr-field-container>", styles: ["crispr-info{position:absolute;top:.75em;right:-.25em}\n"], dependencies: [{ kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: TextareaFieldComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: 'crispr-textarea-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
29
+ InfoComponent,
30
+ ReactiveFormsModule,
31
+ FieldContainerComponent,
32
+ MatFormFieldModule,
33
+ MatInputModule,
34
+ FormValidationHandlerModule
35
+ ], standalone: true, template: "<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <textarea [rows]=\"config().rows\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\">\n </textarea>\n @if (config().info) {<crispr-info [info]=\"config().info\"></crispr-info>}\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().hint && control().valid) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n</crispr-field-container>", styles: ["crispr-info{position:absolute;top:.75em;right:-.25em}\n"] }]
36
+ }] });
37
+
38
+ export { TextareaFieldComponent };
39
+ //# sourceMappingURL=tft-crispr-forms-index-DuvnSHLl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-index-DuvnSHLl.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/textarea-field/textarea-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/textarea-field/textarea-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n TextareaFieldConfig,\n} from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\nconst defaultConfig: Partial<TextareaFieldConfig> = { rows: 5 };\n\n@Component({\n selector: 'crispr-textarea-field',\n templateUrl: './textarea-field.component.html',\n styleUrls: ['./textarea-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n InfoComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatFormFieldModule,\n MatInputModule,\n FormValidationHandlerModule\n ],\n standalone: true\n})\nexport class TextareaFieldComponent\n extends CrisprControlComponent<TextareaFieldConfig>\n implements OnInit\n{\n defaultConfig = defaultConfig;\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container [config]=\"config()\" [group]=\"group()\">\n <mat-form-field [attr.data-testid]=\"testId()\" [color]=\"config().color\" [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <textarea [rows]=\"config().rows\" matInput [placeholder]=\"config().placeholder\"\n [formControlName]=\"config().controlName\">\n </textarea>\n @if (config().info) {<crispr-info [info]=\"config().info\"></crispr-info>}\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().hint && control().valid) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n\n</crispr-field-container>"],"names":["i4"],"mappings":";;;;;;;;;;;;AAAA;AAcA,MAAM,aAAa,GAAiC,EAAE,IAAI,EAAE,CAAC,EAAE;AAiBzD,MAAO,sBACX,SAAQ,sBAA2C,CAAA;AAhBrD,IAAA,WAAA,GAAA;;QAmBE,IAAA,CAAA,aAAa,GAAG,aAAa;AAK9B,IAAA;IAHC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE;IAClB;8GARW,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EA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