@tft/crispr-forms 17.0.0 → 18.0.1
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.
- package/esm2022/src/lib/crispr-forms.module.mjs +4 -4
- package/esm2022/src/lib/display-field.directive.mjs +4 -4
- package/esm2022/src/lib/field-component-map.const.mjs +2 -1
- package/esm2022/src/lib/field.directive.mjs +4 -4
- package/esm2022/src/lib/form/form.component.mjs +3 -3
- package/esm2022/src/lib/form-group-list/form-group-list.component.mjs +4 -4
- package/esm2022/src/lib/pipes/crispr-pipes.module.mjs +4 -4
- package/esm2022/src/lib/pipes/initial-control-value.pipe.mjs +3 -3
- package/esm2022/src/lib/sub-group/sub-group.component.mjs +3 -3
- package/esm2022/src/lib/sub-group/sub-group.module.mjs +4 -4
- package/esm2022/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +4 -4
- package/esm2022/src/lib/ui/autocomplete-field/autocomplete-field.component.mjs +4 -4
- package/esm2022/src/lib/ui/button/button.component.mjs +4 -4
- package/esm2022/src/lib/ui/checkbox-field/checkbox-field.component.mjs +3 -3
- package/esm2022/src/lib/ui/datepicker-field/datepicker-field.component.mjs +4 -4
- package/esm2022/src/lib/ui/divider/divider.component.mjs +3 -3
- package/esm2022/src/lib/ui/field-container/field-container.component.mjs +4 -4
- package/esm2022/src/lib/ui/file-dropzone/file-dropzone.directive.mjs +4 -4
- package/esm2022/src/lib/ui/file-upload-field/file-upload-field.component.mjs +4 -4
- package/esm2022/src/lib/ui/heading/heading.component.mjs +3 -3
- package/esm2022/src/lib/ui/image-upload-field/image-upload-field.component.mjs +4 -4
- package/esm2022/src/lib/ui/info/info.component.mjs +3 -3
- package/esm2022/src/lib/ui/input-field/input-field.component.mjs +3 -3
- package/esm2022/src/lib/ui/map/index.mjs +2 -0
- package/esm2022/src/lib/ui/map/map-field.component.mjs +53 -0
- package/esm2022/src/lib/ui/map/public-api.mjs +2 -0
- package/esm2022/src/lib/ui/option/option.component.mjs +3 -3
- package/esm2022/src/lib/ui/radio-field/radio-field.component.mjs +3 -3
- package/esm2022/src/lib/ui/select-field/select-field.component.mjs +4 -4
- package/esm2022/src/lib/ui/selected-file/selected-file.component.mjs +3 -3
- package/esm2022/src/lib/ui/slider-field/slider-field.component.mjs +3 -3
- package/esm2022/src/lib/ui/textarea-field/textarea-field.component.mjs +3 -3
- package/esm2022/src/lib/ui/unit-conversion-field/unit-conversion-field.component.mjs +4 -4
- package/esm2022/src/lib/utils/abstracts/autocomplete-field.abstract.mjs +3 -3
- package/esm2022/src/lib/utils/abstracts/crispr-control.mixin.mjs +1 -1
- package/esm2022/src/lib/utils/abstracts/crispr-display-field.abstract.mjs +3 -3
- package/esm2022/src/lib/utils/abstracts/crispr-field.abstract.mjs +3 -3
- package/esm2022/src/lib/utils/functions/buildFormGroupFromConfig.mjs +1 -1
- package/esm2022/src/lib/utils/functions/image-compression.helpers.mjs +1 -1
- package/esm2022/src/lib/utils/models/crispr-field.config.mjs +4 -3
- package/esm2022/src/lib/utils/models/index.mjs +2 -1
- package/esm2022/src/lib/utils/models/map-field.config.mjs +2 -0
- package/esm2022/src/lib/utils/operators/form.operators.mjs +1 -1
- package/fesm2022/{tft-crispr-forms-index-2dAn0905.mjs → tft-crispr-forms-index-BC1uV7T_.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-2dAn0905.mjs.map → tft-crispr-forms-index-BC1uV7T_.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-rRi6OMY6.mjs → tft-crispr-forms-index-BDJfgpKH.mjs} +5 -5
- package/fesm2022/{tft-crispr-forms-index-rRi6OMY6.mjs.map → tft-crispr-forms-index-BDJfgpKH.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-CZdi06Jj.mjs → tft-crispr-forms-index-BVwoi2lw.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-CZdi06Jj.mjs.map → tft-crispr-forms-index-BVwoi2lw.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-OLo2t0tl.mjs → tft-crispr-forms-index-Bbcv75sh.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-OLo2t0tl.mjs.map → tft-crispr-forms-index-Bbcv75sh.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-BfR4XbYi.mjs → tft-crispr-forms-index-BdOC-6h3.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-BfR4XbYi.mjs.map → tft-crispr-forms-index-BdOC-6h3.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-xAaInTLg.mjs → tft-crispr-forms-index-BwC11k3P.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-xAaInTLg.mjs.map → tft-crispr-forms-index-BwC11k3P.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-OT7kkOgd.mjs → tft-crispr-forms-index-CN4M4eEo.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-OT7kkOgd.mjs.map → tft-crispr-forms-index-CN4M4eEo.mjs.map} +1 -1
- package/fesm2022/tft-crispr-forms-index-CP5Jn6EK.mjs +63 -0
- package/fesm2022/tft-crispr-forms-index-CP5Jn6EK.mjs.map +1 -0
- package/fesm2022/{tft-crispr-forms-index-Ukk3WgS2.mjs → tft-crispr-forms-index-CYzZB0sA.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-Ukk3WgS2.mjs.map → tft-crispr-forms-index-CYzZB0sA.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-DE8VOdBd.mjs → tft-crispr-forms-index-C_YTy6il.mjs} +5 -5
- package/fesm2022/{tft-crispr-forms-index-DE8VOdBd.mjs.map → tft-crispr-forms-index-C_YTy6il.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-CFUop3Cq.mjs → tft-crispr-forms-index-Cpu5cwLo.mjs} +5 -5
- package/fesm2022/{tft-crispr-forms-index-CFUop3Cq.mjs.map → tft-crispr-forms-index-Cpu5cwLo.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-76UuF0AI.mjs → tft-crispr-forms-index-DLa8K3lm.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-76UuF0AI.mjs.map → tft-crispr-forms-index-DLa8K3lm.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-C5X0mk3N.mjs → tft-crispr-forms-index-DNTOjcVZ.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-C5X0mk3N.mjs.map → tft-crispr-forms-index-DNTOjcVZ.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-C_I9vjqf.mjs → tft-crispr-forms-index-DYHyL8s6.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-C_I9vjqf.mjs.map → tft-crispr-forms-index-DYHyL8s6.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-BXwiulEX.mjs → tft-crispr-forms-index-DhIYxOdD.mjs} +4 -4
- package/fesm2022/{tft-crispr-forms-index-BXwiulEX.mjs.map → tft-crispr-forms-index-DhIYxOdD.mjs.map} +1 -1
- package/fesm2022/{tft-crispr-forms-index-CFdMVgM0.mjs → tft-crispr-forms-index-o78Cm3Kf.mjs} +5 -5
- package/fesm2022/{tft-crispr-forms-index-CFdMVgM0.mjs.map → tft-crispr-forms-index-o78Cm3Kf.mjs.map} +1 -1
- package/fesm2022/tft-crispr-forms.mjs +72 -70
- package/fesm2022/tft-crispr-forms.mjs.map +1 -1
- package/package.json +7 -13
- package/src/lib/field-component-map.const.d.ts +3 -1
- package/src/lib/form-group-list/form-group-list.component.d.ts +4 -4
- package/src/lib/sub-group/sub-group.component.d.ts +4 -4
- package/src/lib/ui/checkbox-field/checkbox-field.component.d.ts +4 -4
- package/src/lib/ui/datepicker-field/datepicker-field.component.d.ts +4 -4
- package/src/lib/ui/file-upload-field/file-upload-field.component.d.ts +4 -4
- package/src/lib/ui/image-upload-field/image-upload-field.component.d.ts +4 -4
- package/src/lib/ui/input-field/input-field.component.d.ts +4 -4
- package/src/lib/ui/map/index.d.ts +1 -0
- package/src/lib/ui/map/map-field.component.d.ts +32 -0
- package/src/lib/ui/map/public-api.d.ts +1 -0
- package/src/lib/ui/radio-field/radio-field.component.d.ts +4 -4
- package/src/lib/ui/select-field/select-field.component.d.ts +4 -4
- package/src/lib/ui/slider-field/slider-field.component.d.ts +4 -4
- package/src/lib/ui/textarea-field/textarea-field.component.d.ts +4 -4
- package/src/lib/ui/unit-conversion-field/unit-conversion-field.component.d.ts +4 -4
- package/src/lib/utils/abstracts/autocomplete-field.abstract.d.ts +4 -4
- package/src/lib/utils/abstracts/crispr-display-field.abstract.d.ts +4 -4
- package/src/lib/utils/index.d.ts +0 -4
- package/src/lib/utils/models/crispr-field.config.d.ts +5 -4
- package/src/lib/utils/models/index.d.ts +1 -0
- package/src/lib/utils/models/map-field.config.d.ts +13 -0
- package/tft-crispr-forms-18.0.1.tgz +0 -0
- package/esm2022/src/lib/utils/tft-crispr-forms-src-lib-utils.mjs +0 -5
- package/fesm2022/tft-crispr-forms-src-lib-utils.mjs +0 -278
- package/fesm2022/tft-crispr-forms-src-lib-utils.mjs.map +0 -1
- package/src/lib/utils/README.md +0 -3
- package/tft-crispr-forms-17.0.0.tgz +0 -0
package/fesm2022/{tft-crispr-forms-index-CFdMVgM0.mjs.map → tft-crispr-forms-index-o78Cm3Kf.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-CFdMVgM0.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/unit-conversion-field/unit-conversion-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/unit-conversion-field/unit-conversion-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n OnDestroy,\n} from '@angular/core';\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\nimport { MatOptionModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { combineLatest, Observable, Subscription } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { OptionComponent } from '../option';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n observablifyOptions,\n SelectOption,\n UnitConversionFieldConfig,\n} from '../../utils';\n\nconst defaultConfig: Partial<UnitConversionFieldConfig> = {};\nconst UnitConversionFieldMixin =\n crisprControlMixin<UnitConversionFieldConfig>(CrisprFieldComponent);\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'crispr-unit-conversion-field',\n templateUrl: './unit-conversion-field.component.html',\n styleUrls: ['./unit-conversion-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatInputModule,\n MatSelectModule,\n MatOptionModule,\n FormValidationHandlerModule,\n ],\n})\nexport class UnitConversionFieldComponent\n extends UnitConversionFieldMixin\n implements OnInit, OnDestroy\n{\n defaultConfig = defaultConfig;\n\n displayValueControl = new FormControl();\n unitSelectControl = new FormControl();\n unitOptions$: Observable<SelectOption[]>;\n\n transformationSubscription: Subscription;\n\n ngOnInit() {\n super.ngOnInit();\n // TODO: Validators need work. validation is tricky because the input needs to be validated against but the validator will compare against the controls value\n // this.displayValueControl.setValidators(this.config.validators);\n\n const controlValuePipeline: Observable<string>[] = [\n this.displayValueControl.valueChanges.pipe(\n startWith(this.displayValueControl.value)\n ),\n ];\n // setup all required pieces when showing a field for selecting units\n if (this.config.showUnitSelect) {\n this.unitOptions$ = observablifyOptions(\n this.config.selectableUnits,\n this.group\n );\n controlValuePipeline.push(\n this.unitSelectControl.valueChanges.pipe(\n startWith(this.config?.initialDisplayUnit || null)\n )\n );\n this.unitSelectControl.setValue(this.config?.initialDisplayUnit || null);\n }\n\n this.transformationSubscription = combineLatest(\n controlValuePipeline\n ).subscribe(([displayValue, unitValue]) => {\n const computedValue = this.config.storedValueConversion(\n displayValue,\n unitValue\n );\n this.control.setValue(computedValue);\n });\n }\n\n ngOnDestroy() {\n this.transformationSubscription.unsubscribe();\n }\n\n setInitialDisplayValue(storedValue: any, unit: unknown) {\n const initialDisplayValue = this.config.initialDisplayValueConversion(\n storedValue || null,\n unit\n );\n this.displayValueControl.setValue(initialDisplayValue);\n }\n\n /**\n * We override the 'setControlValue' we inherited from crisprControlMixin and add our custom logic,\n * This function gets called onInit because were object oriented. it's so great, so great that I'm\n * typing a paragraph to explain what the hell is going on...\n * @param value the initial value for the control passed down from the form components input\n */\n setControlValue(value) {\n const initialUnitValue = this.config.showUnitSelect\n ? this.config?.initialDisplayUnit\n : null;\n this.setInitialDisplayValue(value, initialUnitValue);\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [style.width.%]=\"config.showUnitSelect ? 60 : 100\"\n class=\"number-field\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n type=\"number\"\n matInput\n [formControl]=\"displayValueControl\"\n [placeholder]=\"config.placeholder\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\">\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 </mat-form-field>\n\n <mat-form-field\n *ngIf=\"config.showUnitSelect\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\"\n class=\"unit-field\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControl]=\"unitSelectControl\">\n\n <mat-option\n *ngFor=\"let option of unitOptions$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\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":["i3","i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA0BA,MAAM,aAAa,GAAuC,EAAE,CAAC;AAC7D,MAAM,wBAAwB,GAC5B,kBAAkB,CAA4B,oBAAoB,CAAC,CAAC;AAqBhE,MAAO,4BACX,SAAQ,wBAAwB,CAAA;AApBlC,IAAA,WAAA,GAAA;;QAuBE,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;AAE9B,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,WAAW,EAAE,CAAC;AACxC,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,WAAW,EAAE,CAAC;AAgEvC,KAAA;IA3DC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;;;AAIjB,QAAA,MAAM,oBAAoB,GAAyB;AACjD,YAAA,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,IAAI,CACxC,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAC1C;SACF,CAAC;;AAEF,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;AAC9B,YAAA,IAAI,CAAC,YAAY,GAAG,mBAAmB,CACrC,IAAI,CAAC,MAAM,CAAC,eAAe,EAC3B,IAAI,CAAC,KAAK,CACX,CAAC;YACF,oBAAoB,CAAC,IAAI,CACvB,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,IAAI,CACtC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,kBAAkB,IAAI,IAAI,CAAC,CACnD,CACF,CAAC;AACF,YAAA,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,kBAAkB,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A,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,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,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAnBxC,SAAS;AAEE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,mBAGvB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBACd,eAAe;wBACf,eAAe;wBACf,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,mgDAAA,EAAA,MAAA,EAAA,CAAA,yFAAA,CAAA,EAAA,CAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"tft-crispr-forms-index-o78Cm3Kf.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/unit-conversion-field/unit-conversion-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/unit-conversion-field/unit-conversion-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n OnDestroy,\n} from '@angular/core';\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\nimport { MatOptionModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { combineLatest, Observable, Subscription } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { OptionComponent } from '../option';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n observablifyOptions,\n SelectOption,\n UnitConversionFieldConfig,\n} from '../../utils';\n\nconst defaultConfig: Partial<UnitConversionFieldConfig> = {};\nconst UnitConversionFieldMixin =\n crisprControlMixin<UnitConversionFieldConfig>(CrisprFieldComponent);\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'crispr-unit-conversion-field',\n templateUrl: './unit-conversion-field.component.html',\n styleUrls: ['./unit-conversion-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatInputModule,\n MatSelectModule,\n MatOptionModule,\n FormValidationHandlerModule,\n ],\n})\nexport class UnitConversionFieldComponent\n extends UnitConversionFieldMixin\n implements OnInit, OnDestroy\n{\n defaultConfig = defaultConfig;\n\n displayValueControl = new FormControl();\n unitSelectControl = new FormControl();\n unitOptions$: Observable<SelectOption[]>;\n\n transformationSubscription: Subscription;\n\n ngOnInit() {\n super.ngOnInit();\n // TODO: Validators need work. validation is tricky because the input needs to be validated against but the validator will compare against the controls value\n // this.displayValueControl.setValidators(this.config.validators);\n\n const controlValuePipeline: Observable<string>[] = [\n this.displayValueControl.valueChanges.pipe(\n startWith(this.displayValueControl.value)\n ),\n ];\n // setup all required pieces when showing a field for selecting units\n if (this.config.showUnitSelect) {\n this.unitOptions$ = observablifyOptions(\n this.config.selectableUnits,\n this.group\n );\n controlValuePipeline.push(\n this.unitSelectControl.valueChanges.pipe(\n startWith(this.config?.initialDisplayUnit || null)\n )\n );\n this.unitSelectControl.setValue(this.config?.initialDisplayUnit || null);\n }\n\n this.transformationSubscription = combineLatest(\n controlValuePipeline\n ).subscribe(([displayValue, unitValue]) => {\n const computedValue = this.config.storedValueConversion(\n displayValue,\n unitValue\n );\n this.control.setValue(computedValue);\n });\n }\n\n ngOnDestroy() {\n this.transformationSubscription.unsubscribe();\n }\n\n setInitialDisplayValue(storedValue: any, unit: unknown) {\n const initialDisplayValue = this.config.initialDisplayValueConversion(\n storedValue || null,\n unit\n );\n this.displayValueControl.setValue(initialDisplayValue);\n }\n\n /**\n * We override the 'setControlValue' we inherited from crisprControlMixin and add our custom logic,\n * This function gets called onInit because were object oriented. it's so great, so great that I'm\n * typing a paragraph to explain what the hell is going on...\n * @param value the initial value for the control passed down from the form components input\n */\n setControlValue(value) {\n const initialUnitValue = this.config.showUnitSelect\n ? this.config?.initialDisplayUnit\n : null;\n this.setInitialDisplayValue(value, initialUnitValue);\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [style.width.%]=\"config.showUnitSelect ? 60 : 100\"\n class=\"number-field\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n type=\"number\"\n matInput\n [formControl]=\"displayValueControl\"\n [placeholder]=\"config.placeholder\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\">\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 </mat-form-field>\n\n <mat-form-field\n *ngIf=\"config.showUnitSelect\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\"\n class=\"unit-field\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControl]=\"unitSelectControl\">\n\n <mat-option\n *ngFor=\"let option of unitOptions$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\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":["i3","i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA0BA,MAAM,aAAa,GAAuC,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AA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,mBAGvB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBACd,eAAe;wBACf,eAAe;wBACf,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,mgDAAA,EAAA,MAAA,EAAA,CAAA,yFAAA,CAAA,EAAA,CAAA;;;;;"}
|
|
@@ -55,10 +55,11 @@ var ControlType;
|
|
|
55
55
|
ControlType["DATEPICKER"] = "datepicker";
|
|
56
56
|
ControlType["DIVIDER"] = "divider";
|
|
57
57
|
ControlType["FILE_UPLOAD"] = "fileUpload";
|
|
58
|
+
ControlType["GROUP_LIST"] = "groupList";
|
|
58
59
|
ControlType["HEADING"] = "heading";
|
|
59
|
-
ControlType["INPUT"] = "input";
|
|
60
60
|
ControlType["IMAGE_UPLOAD"] = "imageUpload";
|
|
61
|
-
ControlType["
|
|
61
|
+
ControlType["INPUT"] = "input";
|
|
62
|
+
ControlType["MAP"] = "map";
|
|
62
63
|
ControlType["RADIO"] = "radio";
|
|
63
64
|
ControlType["SELECT"] = "select";
|
|
64
65
|
ControlType["SLIDER"] = "slider";
|
|
@@ -102,10 +103,10 @@ class CrisprFieldComponent {
|
|
|
102
103
|
applyDefaultConfig() {
|
|
103
104
|
this.config = this.defaultConfig ? { ...this.defaultConfig, ...this.config } : this.config;
|
|
104
105
|
}
|
|
105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
106
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
106
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
107
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.3", type: CrisprFieldComponent, isStandalone: true, ngImport: i0 }); }
|
|
107
108
|
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFieldComponent, decorators: [{
|
|
109
110
|
type: Directive,
|
|
110
111
|
args: [{
|
|
111
112
|
standalone: true
|
|
@@ -268,41 +269,42 @@ class AbstractAutocompleteComponent extends AbstractAutocompleteFieldMixin {
|
|
|
268
269
|
// this is needed to have the options panel to open on focus
|
|
269
270
|
startWith(''), debounceTime(this.config.typeDebounceTime), map((searchText) => typeof searchText === 'string' ? searchText?.trim() : ''), distinctUntilChanged(), switchMap((searchText) => observablifyOptions(this.config.options, this.group, searchText)), shareReplay(1));
|
|
270
271
|
}
|
|
271
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
272
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
272
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: AbstractAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
273
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.3", type: AbstractAutocompleteComponent, usesInheritance: true, ngImport: i0 }); }
|
|
273
274
|
}
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: AbstractAutocompleteComponent, decorators: [{
|
|
275
276
|
type: Directive
|
|
276
277
|
}] });
|
|
277
278
|
|
|
278
279
|
const CrisprDisplayFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
279
280
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
280
281
|
class CrisprDisplayFieldComponent extends CrisprDisplayFieldMixin {
|
|
281
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
282
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
282
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprDisplayFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
283
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.3", type: CrisprDisplayFieldComponent, usesInheritance: true, ngImport: i0 }); }
|
|
283
284
|
}
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprDisplayFieldComponent, decorators: [{
|
|
285
286
|
type: Directive
|
|
286
287
|
}] });
|
|
287
288
|
|
|
288
289
|
const FIELD_COMPONENTS = {
|
|
289
290
|
groupList: () => Promise.resolve().then(function () { return index$1; }).then(({ FormGroupListComponent }) => FormGroupListComponent),
|
|
290
291
|
subGroup: () => Promise.resolve().then(function () { return index; }).then(({ SubGroupComponent }) => SubGroupComponent),
|
|
291
|
-
button: () => import('./tft-crispr-forms-index-
|
|
292
|
-
input: () => import('./tft-crispr-forms-index-
|
|
293
|
-
select: () => import('./tft-crispr-forms-index-
|
|
294
|
-
radio: () => import('./tft-crispr-forms-index-
|
|
295
|
-
autocomplete: () => import('./tft-crispr-forms-index-
|
|
296
|
-
autocompleteChiplist: () => import('./tft-crispr-forms-index-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
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-CP5Jn6EK.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),
|
|
303
305
|
heading: () => Promise.resolve().then(function () { return index$2; }).then(({ HeadingComponent }) => HeadingComponent),
|
|
304
|
-
divider: () => import('./tft-crispr-forms-index-
|
|
305
|
-
unitConversion: () => import('./tft-crispr-forms-index-
|
|
306
|
+
divider: () => import('./tft-crispr-forms-index-DLa8K3lm.mjs').then(({ DividerComponent }) => DividerComponent),
|
|
307
|
+
unitConversion: () => import('./tft-crispr-forms-index-o78Cm3Kf.mjs').then(({ UnitConversionFieldComponent }) => UnitConversionFieldComponent),
|
|
306
308
|
};
|
|
307
309
|
function isControlComponent(component) {
|
|
308
310
|
return component && isControlConfig(component.config) && 'value' in component; // || component.config.controlType === ControlType.BUTTON;
|
|
@@ -360,10 +362,10 @@ class CrisprFieldDirective {
|
|
|
360
362
|
this.cdr.detectChanges();
|
|
361
363
|
}
|
|
362
364
|
}
|
|
363
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
364
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
365
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFieldDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
366
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.3", type: CrisprFieldDirective, isStandalone: true, selector: "[crisprField]", inputs: { config: "config", group: "group", value: "value" }, ngImport: i0 }); }
|
|
365
367
|
}
|
|
366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFieldDirective, decorators: [{
|
|
367
369
|
type: Directive,
|
|
368
370
|
args: [{
|
|
369
371
|
selector: '[crisprField]',
|
|
@@ -384,10 +386,10 @@ class InitialControlValuePipe {
|
|
|
384
386
|
? initialFormValue[fieldConfig.controlName] || null
|
|
385
387
|
: null;
|
|
386
388
|
}
|
|
387
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
388
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: InitialControlValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
390
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.3", ngImport: i0, type: InitialControlValuePipe, name: "initialControlValue" }); }
|
|
389
391
|
}
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: InitialControlValuePipe, decorators: [{
|
|
391
393
|
type: Pipe,
|
|
392
394
|
args: [{
|
|
393
395
|
name: 'initialControlValue',
|
|
@@ -395,11 +397,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
395
397
|
}] });
|
|
396
398
|
|
|
397
399
|
class CrisprPipesModule {
|
|
398
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
399
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
400
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
400
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
401
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.3", ngImport: i0, type: CrisprPipesModule, declarations: [InitialControlValuePipe], imports: [CommonModule], exports: [InitialControlValuePipe] }); }
|
|
402
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprPipesModule, imports: [CommonModule] }); }
|
|
401
403
|
}
|
|
402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
404
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprPipesModule, decorators: [{
|
|
403
405
|
type: NgModule,
|
|
404
406
|
args: [{
|
|
405
407
|
imports: [
|
|
@@ -434,10 +436,10 @@ class CrisprFormComponent {
|
|
|
434
436
|
triggerSubmit() {
|
|
435
437
|
this.submitTrigger.nativeElement.click();
|
|
436
438
|
}
|
|
437
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
438
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
439
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
440
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: CrisprFormComponent, isStandalone: true, selector: "crispr-form", inputs: { config: "config", form: "form", value: "value" }, outputs: { submitted: "submitted", valueChanges: "valueChanges", statusChanges: "statusChanges" }, viewQueries: [{ propertyName: "submitTrigger", first: true, predicate: ["submitTrigger"], descendants: true }], ngImport: i0, template: "<form\n class=\"crispr-form\"\n [ngClass]=\"config.classes\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleSubmit()\"\n [autocomplete]=\"config.autocomplete || 'off'\"\n [errorDictionary]=\"config.errorDictionary\"\n #ngFormElement=\"ngForm\">\n\n <ng-container\n *ngFor=\"let field of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"form\">\n </ng-container>\n <!-- Hidden button, programmatically clicked when crispr form triggerSubmit function called.\n Uses a hidden button with type=\"submit\" because it will trigger both native form submit event\n (which the error handler has to listen for) and ngSubmit event -->\n <button #submitTrigger class=\"submit-trigger\" type=\"submit\">\n </button>\n</form>\n", styles: [".submit-trigger{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: CrisprFieldDirective, selector: "[crisprField]", inputs: ["config", "group", "value"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsFormDirective, selector: "form", inputs: ["errorDictionary"] }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "ngmodule", type: CrisprPipesModule }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }], preserveWhitespaces: true }); }
|
|
439
441
|
}
|
|
440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFormComponent, decorators: [{
|
|
441
443
|
type: Component,
|
|
442
444
|
args: [{ selector: 'crispr-form', standalone: true, imports: [
|
|
443
445
|
CommonModule,
|
|
@@ -480,10 +482,10 @@ class FileDropzoneDirective {
|
|
|
480
482
|
$event.preventDefault();
|
|
481
483
|
}
|
|
482
484
|
}
|
|
483
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
484
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
485
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileDropzoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
486
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.3", type: FileDropzoneDirective, isStandalone: true, selector: "[crisprFileDropzone]", inputs: { crisprFileDropzone: "crisprFileDropzone" }, outputs: { fileDrop: "fileDrop" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)" } }, ngImport: i0 }); }
|
|
485
487
|
}
|
|
486
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileDropzoneDirective, decorators: [{
|
|
487
489
|
type: Directive,
|
|
488
490
|
args: [{
|
|
489
491
|
selector: '[crisprFileDropzone]',
|
|
@@ -502,10 +504,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
502
504
|
}] } });
|
|
503
505
|
|
|
504
506
|
class SelectedFileComponent {
|
|
505
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
506
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
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 }); }
|
|
507
509
|
}
|
|
508
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SelectedFileComponent, decorators: [{
|
|
509
511
|
type: Component,
|
|
510
512
|
args: [{ selector: 'crispr-selected-file', standalone: true, imports: [
|
|
511
513
|
CommonModule,
|
|
@@ -522,10 +524,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
522
524
|
}] } });
|
|
523
525
|
|
|
524
526
|
class InfoComponent {
|
|
525
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
526
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
527
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
528
|
+
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 }); }
|
|
527
529
|
}
|
|
528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: InfoComponent, decorators: [{
|
|
529
531
|
type: Component,
|
|
530
532
|
args: [{ selector: 'crispr-info', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
531
533
|
CommonModule,
|
|
@@ -544,10 +546,10 @@ class HeadingComponent extends CrisprFieldComponent {
|
|
|
544
546
|
super(...arguments);
|
|
545
547
|
this.defaultConfig = defaultConfig$1;
|
|
546
548
|
}
|
|
547
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
548
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: HeadingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
550
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: HeadingComponent, isStandalone: true, selector: "crispr-heading", inputs: { config: "config" }, usesInheritance: true, ngImport: i0, template: " <label\n *ngIf=\"!!config?.label\"\n [ngClass]=\"config.typographyClass\">\n {{ config.label }}\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n </label>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i3$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
549
551
|
}
|
|
550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: HeadingComponent, decorators: [{
|
|
551
553
|
type: Component,
|
|
552
554
|
args: [{ selector: 'crispr-heading', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, MatFormFieldModule, InfoComponent], template: " <label\n *ngIf=\"!!config?.label\"\n [ngClass]=\"config.typographyClass\">\n {{ config.label }}\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n </label>\n", styles: [":host{display:block}\n"] }]
|
|
553
555
|
}], propDecorators: { config: [{
|
|
@@ -591,10 +593,10 @@ class FieldContainerComponent {
|
|
|
591
593
|
tap((shouldDisable) => shouldDisable ? control.disable() : control.enable()))
|
|
592
594
|
: of(false);
|
|
593
595
|
}
|
|
594
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
595
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
596
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FieldContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
597
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: FieldContainerComponent, isStandalone: true, selector: "crispr-field-container", inputs: { config: "config", group: "group", inlineField: "inlineField" }, ngImport: i0, template: "<div\n *ngIf=\"(disabled$ | async) ? !config.hideDisabled : true\"\n [ngClass]=\"config.classes\"\n [class.inline-field]=\"inlineField\"\n class=\"field-container\">\n\n <crispr-heading\n *ngIf=\"config.heading\"\n [config]=\"config.heading\">\n </crispr-heading>\n\n <ng-content>\n </ng-content>\n\n</div>\n", styles: ["::ng-deep mat-form-field.mat-mdc-form-field{display:block;padding:.25em 0}.inline-field{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: HeadingComponent, selector: "crispr-heading", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
596
598
|
}
|
|
597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FieldContainerComponent, decorators: [{
|
|
598
600
|
type: Component,
|
|
599
601
|
args: [{ selector: 'crispr-field-container', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, HeadingComponent], template: "<div\n *ngIf=\"(disabled$ | async) ? !config.hideDisabled : true\"\n [ngClass]=\"config.classes\"\n [class.inline-field]=\"inlineField\"\n class=\"field-container\">\n\n <crispr-heading\n *ngIf=\"config.heading\"\n [config]=\"config.heading\">\n </crispr-heading>\n\n <ng-content>\n </ng-content>\n\n</div>\n", styles: ["::ng-deep mat-form-field.mat-mdc-form-field{display:block;padding:.25em 0}.inline-field{display:inline-block}\n"] }]
|
|
600
602
|
}], propDecorators: { config: [{
|
|
@@ -644,10 +646,10 @@ class CrisprDisplayFieldDirective {
|
|
|
644
646
|
this.componentInstance.value = value;
|
|
645
647
|
this.cdr.detectChanges();
|
|
646
648
|
}
|
|
647
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
648
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprDisplayFieldDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
650
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.3", type: CrisprDisplayFieldDirective, isStandalone: true, selector: "[crisprDisplayField]", inputs: { group: "group", value: "value", component: "component", index: "index" }, ngImport: i0 }); }
|
|
649
651
|
}
|
|
650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprDisplayFieldDirective, decorators: [{
|
|
651
653
|
type: Directive,
|
|
652
654
|
args: [{
|
|
653
655
|
selector: '[crisprDisplayField]',
|
|
@@ -724,10 +726,10 @@ class FormGroupListComponent extends FormGroupListMixin {
|
|
|
724
726
|
clickEditItem(index) {
|
|
725
727
|
this.selectedIndex = index;
|
|
726
728
|
}
|
|
727
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
728
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
729
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FormGroupListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
730
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: FormGroupListComponent, isStandalone: true, selector: "crispr-form-group-list", usesInheritance: true, ngImport: i0, template: "\n<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [formGroup]=\"group\">\n\n <div [formArrayName]=\"config.controlName\">\n\n <!-- Don't add trackBy function, it confuses the state of the array -->\n <ng-container *ngFor=\"let itemControl of control?.controls; let i = index; let last = last\">\n <ng-container *ngIf=\"!config.displayItemComponent || i === selectedIndex || (last && selectedIndex ?? true); else display\">\n <!-- TODO: use content projection to allow custom item label component -->\n <div class=\"item-header\">\n <span class=\"mat-h2\"> {{ config.itemLabelBuilder ? config.itemLabelBuilder(i) : 'Item ' + (i + 1) }} </span>\n <button\n mat-icon-button\n type=\"button\"\n *ngIf=\"i + 1 > config.minListLength\">\n <mat-icon (click)=\"clickDelete(i)\">delete</mat-icon>\n </button>\n </div>\n <div\n [formGroup]=\"itemControl\">\n <!-- TODO: if chiplists didn't need to have labels mixed in with their values we could use [value]=\"control.value\" below -->\n <ng-container\n *ngFor=\"let field of config.itemConfig.fields;\"\n crisprField\n [value]=\"blockValue ? null : value && value[i] | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"itemControl\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #display>\n <div\n class=\"display-field-container\"\n crisprDisplayField\n [component]=\"config.displayItemComponent\"\n [value]=\"itemControl.value\"\n [index]=\"i\">\n <button mat-icon-button (click)=\"clickEditItem(i)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <div class=\"group-footer\">\n <button\n type=\"button\"\n class=\"add\"\n mat-raised-button\n [color]=\"config.addButtonColor\"\n (click)=\"clickAdd()\">\n {{config.addItemLabel || config.addButtonLabel}}\n </button>\n </div>\n\n</crispr-field-container>\n", styles: [".item-header{display:flex;justify-content:space-between}.group-footer{display:flex;justify-content:flex-end}.group-footer button.add{margin-bottom:16px}.display-field-container{position:relative}.display-field-container button{position:absolute;top:0;right:0}\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: "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: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: CrisprFieldDirective, selector: "[crisprField]", inputs: ["config", "group", "value"] }, { kind: "directive", type: CrisprDisplayFieldDirective, selector: "[crisprDisplayField]", inputs: ["group", "value", "component", "index"] }, { kind: "ngmodule", type: CrisprPipesModule }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
729
731
|
}
|
|
730
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FormGroupListComponent, decorators: [{
|
|
731
733
|
type: Component,
|
|
732
734
|
args: [{ selector: 'crispr-form-group-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
733
735
|
CommonModule,
|
|
@@ -752,29 +754,29 @@ class SubGroupComponent extends FormGroupMixin {
|
|
|
752
754
|
ngOnInit() {
|
|
753
755
|
super.ngOnInit();
|
|
754
756
|
}
|
|
755
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
756
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
757
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SubGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
758
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: SubGroupComponent, selector: "crispr-sub-group", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <ng-container\n *ngFor=\"let fieldConfig of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : fieldConfig\"\n [config]=\"fieldConfig\"\n [group]=\"control\">\n </ng-container>\n</crispr-field-container>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: CrisprFieldDirective, selector: "[crisprField]", inputs: ["config", "group", "value"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }], preserveWhitespaces: true }); }
|
|
757
759
|
}
|
|
758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SubGroupComponent, decorators: [{
|
|
759
761
|
type: Component,
|
|
760
762
|
args: [{ selector: 'crispr-sub-group', template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <ng-container\n *ngFor=\"let fieldConfig of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : fieldConfig\"\n [config]=\"fieldConfig\"\n [group]=\"control\">\n </ng-container>\n</crispr-field-container>\n\n" }]
|
|
761
763
|
}] });
|
|
762
764
|
|
|
763
765
|
class SubGroupModule {
|
|
764
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
765
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
766
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SubGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
767
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.3", ngImport: i0, type: SubGroupModule, declarations: [SubGroupComponent], imports: [CommonModule,
|
|
766
768
|
CrisprFieldDirective,
|
|
767
769
|
FieldContainerComponent,
|
|
768
770
|
CrisprPipesModule,
|
|
769
771
|
// TODO: Does this need to be here?
|
|
770
772
|
FormValidationHandlerModule], exports: [SubGroupComponent] }); }
|
|
771
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
773
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SubGroupModule, imports: [CommonModule,
|
|
772
774
|
FieldContainerComponent,
|
|
773
775
|
CrisprPipesModule,
|
|
774
776
|
// TODO: Does this need to be here?
|
|
775
777
|
FormValidationHandlerModule] }); }
|
|
776
778
|
}
|
|
777
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SubGroupModule, decorators: [{
|
|
778
780
|
type: NgModule,
|
|
779
781
|
args: [{
|
|
780
782
|
imports: [
|
|
@@ -801,8 +803,8 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
801
803
|
});
|
|
802
804
|
|
|
803
805
|
class CrisprFormsModule {
|
|
804
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
805
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
806
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
807
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.3", ngImport: i0, type: CrisprFormsModule, imports: [CommonModule,
|
|
806
808
|
ReactiveFormsModule,
|
|
807
809
|
FormValidationHandlerModule,
|
|
808
810
|
FormGroupListComponent,
|
|
@@ -812,7 +814,7 @@ class CrisprFormsModule {
|
|
|
812
814
|
SubGroupModule,
|
|
813
815
|
CrisprPipesModule,
|
|
814
816
|
CrisprFormComponent], exports: [CrisprFormComponent, FieldContainerComponent] }); }
|
|
815
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
817
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFormsModule, imports: [CommonModule,
|
|
816
818
|
ReactiveFormsModule,
|
|
817
819
|
FormValidationHandlerModule,
|
|
818
820
|
FormGroupListComponent,
|
|
@@ -821,7 +823,7 @@ class CrisprFormsModule {
|
|
|
821
823
|
CrisprPipesModule,
|
|
822
824
|
CrisprFormComponent] }); }
|
|
823
825
|
}
|
|
824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFormsModule, decorators: [{
|
|
825
827
|
type: NgModule,
|
|
826
828
|
args: [{
|
|
827
829
|
imports: [
|