@tft/crispr-forms 18.0.2 → 19.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -112
- package/fesm2022/tft-crispr-forms-autocomplete-field.component-jdr2Hr6I.mjs +95 -0
- package/fesm2022/tft-crispr-forms-autocomplete-field.component-jdr2Hr6I.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-BHv9E1Y2.mjs +36 -0
- package/fesm2022/tft-crispr-forms-index-BHv9E1Y2.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-BIhGbdgn.mjs +68 -0
- package/fesm2022/tft-crispr-forms-index-BIhGbdgn.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-BQFuEW6x.mjs +40 -0
- package/fesm2022/tft-crispr-forms-index-BQFuEW6x.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-BWsxn34Q.mjs +2 -0
- package/fesm2022/tft-crispr-forms-index-BWsxn34Q.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-Bh8kDfe4.mjs +39 -0
- package/fesm2022/tft-crispr-forms-index-Bh8kDfe4.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-C9gYJRzb.mjs +182 -0
- package/fesm2022/tft-crispr-forms-index-C9gYJRzb.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-ClPQl_5D.mjs +137 -0
- package/fesm2022/tft-crispr-forms-index-ClPQl_5D.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-DCRLl0jR.mjs +190 -0
- package/fesm2022/tft-crispr-forms-index-DCRLl0jR.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-Dx-HIAiX.mjs +39 -0
- package/fesm2022/tft-crispr-forms-index-Dx-HIAiX.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-Dyx5SqHu.mjs +88 -0
- package/fesm2022/tft-crispr-forms-index-Dyx5SqHu.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-LX0Bvkjk.mjs +73 -0
- package/fesm2022/tft-crispr-forms-index-LX0Bvkjk.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-UAYeTe3L.mjs +17 -0
- package/fesm2022/tft-crispr-forms-index-UAYeTe3L.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-UvEVbwnf.mjs +41 -0
- package/fesm2022/tft-crispr-forms-index-UvEVbwnf.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-joNvlmny.mjs +61 -0
- package/fesm2022/tft-crispr-forms-index-joNvlmny.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms-index-kjMTlZoq.mjs +24 -0
- package/fesm2022/tft-crispr-forms-index-kjMTlZoq.mjs.map +1 -0
- package/fesm2022/tft-crispr-forms.mjs +206 -175
- package/fesm2022/tft-crispr-forms.mjs.map +1 -1
- package/package.json +3 -5
- package/tft-crispr-forms-19.0.2.tgz +0 -0
- package/types/tft-crispr-forms.d.ts +887 -0
- package/esm2022/public-api.mjs +0 -4
- package/esm2022/src/index.mjs +0 -2
- package/esm2022/src/lib/crispr-forms.module.mjs +0 -55
- package/esm2022/src/lib/display-field.directive.mjs +0 -52
- package/esm2022/src/lib/field-component-map.const.mjs +0 -29
- package/esm2022/src/lib/field.directive.mjs +0 -69
- package/esm2022/src/lib/form/form.component.mjs +0 -62
- package/esm2022/src/lib/form-group-list/form-group-list.component.mjs +0 -97
- package/esm2022/src/lib/form-group-list/index.mjs +0 -2
- package/esm2022/src/lib/pipes/crispr-pipes.module.mjs +0 -24
- package/esm2022/src/lib/pipes/initial-control-value.pipe.mjs +0 -20
- package/esm2022/src/lib/public_api.mjs +0 -4
- package/esm2022/src/lib/sub-group/index.mjs +0 -3
- package/esm2022/src/lib/sub-group/sub-group.component.mjs +0 -20
- package/esm2022/src/lib/sub-group/sub-group.module.mjs +0 -42
- package/esm2022/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +0 -138
- package/esm2022/src/lib/ui/autocomplete-chiplist-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/autocomplete-chiplist-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/autocomplete-field/autocomplete-field.component.mjs +0 -95
- package/esm2022/src/lib/ui/autocomplete-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/autocomplete-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/button/button.component.mjs +0 -52
- package/esm2022/src/lib/ui/button/index.mjs +0 -2
- package/esm2022/src/lib/ui/button/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/checkbox-field/checkbox-field.component.mjs +0 -42
- package/esm2022/src/lib/ui/checkbox-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/checkbox-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/datepicker-field/datepicker-field.component.mjs +0 -66
- package/esm2022/src/lib/ui/datepicker-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/datepicker-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/divider/divider.component.mjs +0 -25
- package/esm2022/src/lib/ui/divider/index.mjs +0 -2
- package/esm2022/src/lib/ui/divider/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/field-container/field-container.component.mjs +0 -59
- package/esm2022/src/lib/ui/field-container/index.mjs +0 -2
- package/esm2022/src/lib/ui/field-container/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/file-dropzone/file-dropzone.directive.mjs +0 -40
- package/esm2022/src/lib/ui/file-dropzone/index.mjs +0 -2
- package/esm2022/src/lib/ui/file-dropzone/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/file-upload-field/file-upload-field.component.mjs +0 -107
- package/esm2022/src/lib/ui/file-upload-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/file-upload-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/heading/heading.component.mjs +0 -27
- package/esm2022/src/lib/ui/heading/index.mjs +0 -2
- package/esm2022/src/lib/ui/heading/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/image-upload-field/image-upload-field.component.mjs +0 -184
- package/esm2022/src/lib/ui/image-upload-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/image-upload-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/index.mjs +0 -2
- package/esm2022/src/lib/ui/info/index.mjs +0 -2
- package/esm2022/src/lib/ui/info/info.component.mjs +0 -23
- package/esm2022/src/lib/ui/info/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/input-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/input-field/input-field.component.mjs +0 -43
- package/esm2022/src/lib/ui/input-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/map/index.mjs +0 -2
- package/esm2022/src/lib/ui/map/map-field.component.mjs +0 -22
- package/esm2022/src/lib/ui/map/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/option/index.mjs +0 -2
- package/esm2022/src/lib/ui/option/option.component.mjs +0 -16
- package/esm2022/src/lib/ui/option/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/public-api.mjs +0 -8
- package/esm2022/src/lib/ui/radio-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/radio-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/radio-field/radio-field.component.mjs +0 -39
- package/esm2022/src/lib/ui/select-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/select-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/select-field/select-field.component.mjs +0 -73
- package/esm2022/src/lib/ui/selected-file/index.mjs +0 -2
- package/esm2022/src/lib/ui/selected-file/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/selected-file/selected-file.component.mjs +0 -26
- package/esm2022/src/lib/ui/slider-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/slider-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/slider-field/slider-field.component.mjs +0 -46
- package/esm2022/src/lib/ui/textarea-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/textarea-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/textarea-field/textarea-field.component.mjs +0 -42
- package/esm2022/src/lib/ui/unit-conversion-field/index.mjs +0 -2
- package/esm2022/src/lib/ui/unit-conversion-field/public-api.mjs +0 -2
- package/esm2022/src/lib/ui/unit-conversion-field/unit-conversion-field.component.mjs +0 -86
- package/esm2022/src/lib/utils/abstracts/autocomplete-field.abstract.mjs +0 -30
- package/esm2022/src/lib/utils/abstracts/crispr-control.mixin.mjs +0 -27
- package/esm2022/src/lib/utils/abstracts/crispr-display-field.abstract.mjs +0 -14
- package/esm2022/src/lib/utils/abstracts/crispr-field.abstract.mjs +0 -19
- package/esm2022/src/lib/utils/abstracts/index.mjs +0 -5
- package/esm2022/src/lib/utils/functions/buildFormGroupFromConfig.mjs +0 -28
- package/esm2022/src/lib/utils/functions/callOptionsIfFunction.mjs +0 -4
- package/esm2022/src/lib/utils/functions/createControlForType.mjs +0 -19
- package/esm2022/src/lib/utils/functions/filterOptionsByLabel.mjs +0 -11
- package/esm2022/src/lib/utils/functions/image-compression.helpers.mjs +0 -50
- package/esm2022/src/lib/utils/functions/index.mjs +0 -8
- package/esm2022/src/lib/utils/functions/isControlConfig.mjs +0 -7
- package/esm2022/src/lib/utils/functions/observablifyOptions.mjs +0 -29
- package/esm2022/src/lib/utils/index.mjs +0 -2
- package/esm2022/src/lib/utils/models/autocomplete-chiplist-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/autocomplete-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/button.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/checkbox-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/crispr-field.config.mjs +0 -24
- package/esm2022/src/lib/utils/models/datepicker-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/divider.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/file-upload-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/form-group-list.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/heading.config.mjs +0 -3
- package/esm2022/src/lib/utils/models/image-upload-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/index.mjs +0 -19
- package/esm2022/src/lib/utils/models/input-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/map-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/radio-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/select-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/slider-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/textarea-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/models/unit-conversion-field.config.mjs +0 -2
- package/esm2022/src/lib/utils/operators/form.operators.mjs +0 -24
- package/esm2022/src/lib/utils/operators/index.mjs +0 -2
- package/esm2022/src/lib/utils/public-api.mjs +0 -5
- package/esm2022/tft-crispr-forms.mjs +0 -5
- package/fesm2022/tft-crispr-forms-index-3_zzaLSn.mjs +0 -37
- package/fesm2022/tft-crispr-forms-index-3_zzaLSn.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BC1uV7T_.mjs +0 -19
- package/fesm2022/tft-crispr-forms-index-BC1uV7T_.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BHUGuVwS.mjs +0 -55
- package/fesm2022/tft-crispr-forms-index-BHUGuVwS.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CAFXSHea.mjs +0 -58
- package/fesm2022/tft-crispr-forms-index-CAFXSHea.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CN1GmYGC.mjs +0 -91
- package/fesm2022/tft-crispr-forms-index-CN1GmYGC.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CvnyvJJ_.mjs +0 -73
- package/fesm2022/tft-crispr-forms-index-CvnyvJJ_.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DKwMd-o-.mjs +0 -185
- package/fesm2022/tft-crispr-forms-index-DKwMd-o-.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-De3tRDbo.mjs +0 -49
- package/fesm2022/tft-crispr-forms-index-De3tRDbo.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DiNlBPaX.mjs +0 -35
- package/fesm2022/tft-crispr-forms-index-DiNlBPaX.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DkkAr7Yr.mjs +0 -102
- package/fesm2022/tft-crispr-forms-index-DkkAr7Yr.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DseuVavm.mjs +0 -49
- package/fesm2022/tft-crispr-forms-index-DseuVavm.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-T4Ook6pV.mjs +0 -51
- package/fesm2022/tft-crispr-forms-index-T4Ook6pV.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-cdo59qhx.mjs +0 -142
- package/fesm2022/tft-crispr-forms-index-cdo59qhx.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-kJUZksiq.mjs +0 -49
- package/fesm2022/tft-crispr-forms-index-kJUZksiq.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-xbMIxY3P.mjs +0 -81
- package/fesm2022/tft-crispr-forms-index-xbMIxY3P.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/public-api.d.ts +0 -3
- package/src/index.d.ts +0 -1
- package/src/lib/crispr-forms.module.d.ts +0 -16
- package/src/lib/display-field.directive.d.ts +0 -23
- package/src/lib/field-component-map.const.d.ts +0 -44
- package/src/lib/field.directive.d.ts +0 -24
- package/src/lib/form/form.component.d.ts +0 -19
- package/src/lib/form-group-list/form-group-list.component.d.ts +0 -40
- package/src/lib/form-group-list/index.d.ts +0 -1
- package/src/lib/pipes/crispr-pipes.module.d.ts +0 -8
- package/src/lib/pipes/initial-control-value.pipe.d.ts +0 -10
- package/src/lib/public_api.d.ts +0 -3
- package/src/lib/sub-group/index.d.ts +0 -2
- package/src/lib/sub-group/sub-group.component.d.ts +0 -24
- package/src/lib/sub-group/sub-group.module.d.ts +0 -12
- package/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.d.ts +0 -36
- package/src/lib/ui/autocomplete-chiplist-field/index.d.ts +0 -1
- package/src/lib/ui/autocomplete-chiplist-field/public-api.d.ts +0 -1
- package/src/lib/ui/autocomplete-field/autocomplete-field.component.d.ts +0 -25
- package/src/lib/ui/autocomplete-field/index.d.ts +0 -1
- package/src/lib/ui/autocomplete-field/public-api.d.ts +0 -1
- package/src/lib/ui/button/button.component.d.ts +0 -15
- package/src/lib/ui/button/index.d.ts +0 -1
- package/src/lib/ui/button/public-api.d.ts +0 -1
- package/src/lib/ui/checkbox-field/checkbox-field.component.d.ts +0 -23
- package/src/lib/ui/checkbox-field/index.d.ts +0 -1
- package/src/lib/ui/checkbox-field/public-api.d.ts +0 -1
- package/src/lib/ui/datepicker-field/datepicker-field.component.d.ts +0 -32
- package/src/lib/ui/datepicker-field/index.d.ts +0 -1
- package/src/lib/ui/datepicker-field/public-api.d.ts +0 -1
- package/src/lib/ui/divider/divider.component.d.ts +0 -9
- package/src/lib/ui/divider/index.d.ts +0 -1
- package/src/lib/ui/divider/public-api.d.ts +0 -1
- package/src/lib/ui/field-container/field-container.component.d.ts +0 -24
- package/src/lib/ui/field-container/index.d.ts +0 -1
- package/src/lib/ui/field-container/public-api.d.ts +0 -1
- package/src/lib/ui/file-dropzone/file-dropzone.directive.d.ts +0 -10
- package/src/lib/ui/file-dropzone/index.d.ts +0 -1
- package/src/lib/ui/file-dropzone/public-api.d.ts +0 -1
- package/src/lib/ui/file-upload-field/file-upload-field.component.d.ts +0 -39
- package/src/lib/ui/file-upload-field/index.d.ts +0 -1
- package/src/lib/ui/file-upload-field/public-api.d.ts +0 -1
- package/src/lib/ui/heading/heading.component.d.ts +0 -8
- package/src/lib/ui/heading/index.d.ts +0 -1
- package/src/lib/ui/heading/public-api.d.ts +0 -1
- package/src/lib/ui/image-upload-field/image-upload-field.component.d.ts +0 -50
- package/src/lib/ui/image-upload-field/index.d.ts +0 -1
- package/src/lib/ui/image-upload-field/public-api.d.ts +0 -1
- package/src/lib/ui/index.d.ts +0 -1
- package/src/lib/ui/info/index.d.ts +0 -1
- package/src/lib/ui/info/info.component.d.ts +0 -7
- package/src/lib/ui/info/public-api.d.ts +0 -1
- package/src/lib/ui/input-field/index.d.ts +0 -1
- package/src/lib/ui/input-field/input-field.component.d.ts +0 -24
- package/src/lib/ui/input-field/public-api.d.ts +0 -1
- package/src/lib/ui/map/index.d.ts +0 -1
- package/src/lib/ui/map/map-field.component.d.ts +0 -23
- package/src/lib/ui/map/public-api.d.ts +0 -1
- package/src/lib/ui/option/index.d.ts +0 -1
- package/src/lib/ui/option/option.component.d.ts +0 -7
- package/src/lib/ui/option/public-api.d.ts +0 -1
- package/src/lib/ui/public-api.d.ts +0 -7
- package/src/lib/ui/radio-field/index.d.ts +0 -1
- package/src/lib/ui/radio-field/public-api.d.ts +0 -1
- package/src/lib/ui/radio-field/radio-field.component.d.ts +0 -25
- package/src/lib/ui/select-field/index.d.ts +0 -1
- package/src/lib/ui/select-field/public-api.d.ts +0 -1
- package/src/lib/ui/select-field/select-field.component.d.ts +0 -34
- package/src/lib/ui/selected-file/index.d.ts +0 -1
- package/src/lib/ui/selected-file/public-api.d.ts +0 -1
- package/src/lib/ui/selected-file/selected-file.component.d.ts +0 -10
- package/src/lib/ui/slider-field/index.d.ts +0 -1
- package/src/lib/ui/slider-field/public-api.d.ts +0 -1
- package/src/lib/ui/slider-field/slider-field.component.d.ts +0 -24
- package/src/lib/ui/textarea-field/index.d.ts +0 -1
- package/src/lib/ui/textarea-field/public-api.d.ts +0 -1
- package/src/lib/ui/textarea-field/textarea-field.component.d.ts +0 -23
- package/src/lib/ui/unit-conversion-field/index.d.ts +0 -1
- package/src/lib/ui/unit-conversion-field/public-api.d.ts +0 -1
- package/src/lib/ui/unit-conversion-field/unit-conversion-field.component.d.ts +0 -38
- package/src/lib/utils/abstracts/autocomplete-field.abstract.d.ts +0 -28
- package/src/lib/utils/abstracts/crispr-control.mixin.d.ts +0 -16
- package/src/lib/utils/abstracts/crispr-display-field.abstract.d.ts +0 -22
- package/src/lib/utils/abstracts/crispr-field.abstract.d.ts +0 -11
- package/src/lib/utils/abstracts/index.d.ts +0 -4
- package/src/lib/utils/functions/buildFormGroupFromConfig.d.ts +0 -9
- package/src/lib/utils/functions/callOptionsIfFunction.d.ts +0 -3
- package/src/lib/utils/functions/createControlForType.d.ts +0 -9
- package/src/lib/utils/functions/filterOptionsByLabel.d.ts +0 -7
- package/src/lib/utils/functions/image-compression.helpers.d.ts +0 -5
- package/src/lib/utils/functions/index.d.ts +0 -7
- package/src/lib/utils/functions/isControlConfig.d.ts +0 -5
- package/src/lib/utils/functions/observablifyOptions.d.ts +0 -12
- package/src/lib/utils/index.d.ts +0 -1
- package/src/lib/utils/models/autocomplete-chiplist-field.config.d.ts +0 -20
- package/src/lib/utils/models/autocomplete-field.config.d.ts +0 -14
- package/src/lib/utils/models/button.config.d.ts +0 -17
- package/src/lib/utils/models/checkbox-field.config.d.ts +0 -6
- package/src/lib/utils/models/crispr-field.config.d.ts +0 -98
- package/src/lib/utils/models/datepicker-field.config.d.ts +0 -20
- package/src/lib/utils/models/divider.config.d.ts +0 -5
- package/src/lib/utils/models/file-upload-field.config.d.ts +0 -33
- package/src/lib/utils/models/form-group-list.config.d.ts +0 -18
- package/src/lib/utils/models/heading.config.d.ts +0 -6
- package/src/lib/utils/models/image-upload-field.config.d.ts +0 -54
- package/src/lib/utils/models/index.d.ts +0 -18
- package/src/lib/utils/models/input-field.config.d.ts +0 -16
- package/src/lib/utils/models/map-field.config.d.ts +0 -5
- package/src/lib/utils/models/radio-field.config.d.ts +0 -6
- package/src/lib/utils/models/select-field.config.d.ts +0 -21
- package/src/lib/utils/models/slider-field.config.d.ts +0 -11
- package/src/lib/utils/models/textarea-field.config.d.ts +0 -5
- package/src/lib/utils/models/unit-conversion-field.config.d.ts +0 -30
- package/src/lib/utils/operators/form.operators.d.ts +0 -1
- package/src/lib/utils/operators/index.d.ts +0 -1
- package/src/lib/utils/public-api.d.ts +0 -4
- package/tft-crispr-forms-18.0.2.tgz +0 -0
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { signal, Input, Directive, inject, DestroyRef, computed, EventEmitter, effect, Output, Pipe, NgModule, ViewChild, Component, HostListener, ChangeDetectionStrategy, Optional, Self } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i1$1 from '@angular/forms';
|
|
6
6
|
import { FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i6 from '@tft/form-validation-handler';
|
|
8
8
|
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
9
9
|
import { from, of, isObservable } from 'rxjs';
|
|
10
10
|
import { map, startWith, debounceTime, distinctUntilChanged, switchMap, shareReplay, tap } from 'rxjs/operators';
|
|
11
|
-
import
|
|
11
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
|
+
import * as i1$3 from '@angular/material/button';
|
|
12
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
13
|
-
import * as
|
|
14
|
+
import * as i2 from '@angular/material/icon';
|
|
14
15
|
import { MatIconModule } from '@angular/material/icon';
|
|
15
|
-
import * as
|
|
16
|
+
import * as i2$2 from '@angular/material/form-field';
|
|
16
17
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
17
|
-
import * as
|
|
18
|
+
import * as i3 from '@angular/material/input';
|
|
18
19
|
import { MatInputModule } from '@angular/material/input';
|
|
19
|
-
import * as
|
|
20
|
+
import * as i2$1 from '@angular/material/tooltip';
|
|
20
21
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
21
|
-
import * as
|
|
22
|
+
import * as i1$2 from '@angular/material/progress-bar';
|
|
22
23
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
23
24
|
|
|
24
25
|
function valueIn(values) {
|
|
@@ -70,51 +71,6 @@ var ControlType;
|
|
|
70
71
|
ControlType["UNIT_CONVERSION"] = "unitConversion";
|
|
71
72
|
})(ControlType || (ControlType = {}));
|
|
72
73
|
|
|
73
|
-
;
|
|
74
|
-
|
|
75
|
-
function crisprControlMixin(BaseClass) {
|
|
76
|
-
return class extends BaseClass {
|
|
77
|
-
set value(value) {
|
|
78
|
-
this.setControlValue(value);
|
|
79
|
-
this._value = value;
|
|
80
|
-
}
|
|
81
|
-
get value() {
|
|
82
|
-
return this._value;
|
|
83
|
-
}
|
|
84
|
-
ngOnInit() {
|
|
85
|
-
super.ngOnInit();
|
|
86
|
-
this.control = this.group.get(this.config.controlName);
|
|
87
|
-
this.setControlValue(this.value);
|
|
88
|
-
// setTimeouts are ugly but this seems to be the only way to get the computed field to compute initial values
|
|
89
|
-
setTimeout(() => {
|
|
90
|
-
this.control.updateValueAndValidity();
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
setControlValue(value) {
|
|
94
|
-
if (value && this.control && this.config.controlType !== ControlType.SUB_GROUP) {
|
|
95
|
-
this.control.setValue(value);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
class CrisprFieldComponent {
|
|
102
|
-
ngOnInit() {
|
|
103
|
-
this.applyDefaultConfig();
|
|
104
|
-
}
|
|
105
|
-
applyDefaultConfig() {
|
|
106
|
-
this.config = this.defaultConfig ? { ...this.defaultConfig, ...this.config } : this.config;
|
|
107
|
-
}
|
|
108
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
109
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.3", type: CrisprFieldComponent, isStandalone: true, ngImport: i0 }); }
|
|
110
|
-
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CrisprFieldComponent, decorators: [{
|
|
112
|
-
type: Directive,
|
|
113
|
-
args: [{
|
|
114
|
-
standalone: true
|
|
115
|
-
}]
|
|
116
|
-
}] });
|
|
117
|
-
|
|
118
74
|
/**
|
|
119
75
|
* Analyze the config and build a form control to spec. Notice we don't use FormBuilder here
|
|
120
76
|
* as we want to keep this function pure.
|
|
@@ -255,65 +211,145 @@ function allowedFileType(matchExp) {
|
|
|
255
211
|
};
|
|
256
212
|
}
|
|
257
213
|
|
|
258
|
-
|
|
214
|
+
class CrisprFieldComponent {
|
|
215
|
+
constructor() {
|
|
216
|
+
this.config = signal(null, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
217
|
+
}
|
|
218
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
219
|
+
set inputConfig(config) {
|
|
220
|
+
this.updateConfig(config);
|
|
221
|
+
}
|
|
222
|
+
updateConfig(inputConfig) {
|
|
223
|
+
const mergedConfig = this.defaultConfig ? { ...this.defaultConfig, ...inputConfig } : inputConfig;
|
|
224
|
+
this.config.set(mergedConfig);
|
|
225
|
+
}
|
|
226
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
227
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: CrisprFieldComponent, isStandalone: true, inputs: { inputConfig: ["config", "inputConfig"] }, ngImport: i0 }); }
|
|
228
|
+
}
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFieldComponent, decorators: [{
|
|
230
|
+
type: Directive,
|
|
231
|
+
args: [{
|
|
232
|
+
standalone: true
|
|
233
|
+
}]
|
|
234
|
+
}], propDecorators: { inputConfig: [{
|
|
235
|
+
type: Input,
|
|
236
|
+
args: [{ alias: 'config' }]
|
|
237
|
+
}] } });
|
|
238
|
+
|
|
239
|
+
class CrisprControlComponent extends CrisprFieldComponent {
|
|
240
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
241
|
+
set inputGroup(group) {
|
|
242
|
+
this.group.set(group);
|
|
243
|
+
}
|
|
244
|
+
/*
|
|
245
|
+
* Having the input alias allows us to consume these components in the traditional Angular way as well as progammatically in the form builder
|
|
246
|
+
*/
|
|
247
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
248
|
+
set inputValue(value) {
|
|
249
|
+
this.value.set(value);
|
|
250
|
+
}
|
|
251
|
+
constructor() {
|
|
252
|
+
super();
|
|
253
|
+
this.destroyRef = inject(DestroyRef);
|
|
254
|
+
this.group = signal(null, ...(ngDevMode ? [{ debugName: "group" }] : []));
|
|
255
|
+
this.control = computed(() => this.group()?.get(this.config().controlName), ...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
256
|
+
this.valueChanges = new EventEmitter();
|
|
257
|
+
this.value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
258
|
+
effect(() => {
|
|
259
|
+
this.setControlValue(this.value());
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
ngOnInit() {
|
|
263
|
+
this.control().valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
|
|
264
|
+
this.valueChanges.emit(value);
|
|
265
|
+
});
|
|
266
|
+
// this.setControlValue(this.value);
|
|
267
|
+
// setTimeouts are ugly but this seems to be the only way to get the computed field to compute initial values
|
|
268
|
+
setTimeout(() => {
|
|
269
|
+
this.control().updateValueAndValidity();
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
setControlValue(value) {
|
|
273
|
+
if (value && this.control() && this.config().controlType !== ControlType.SUB_GROUP) {
|
|
274
|
+
this.control().setValue(value);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
278
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: CrisprControlComponent, isStandalone: true, inputs: { inputGroup: ["group", "inputGroup"], inputValue: ["value", "inputValue"] }, outputs: { valueChanges: "valueChanges" }, usesInheritance: true, ngImport: i0 }); }
|
|
279
|
+
}
|
|
280
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprControlComponent, decorators: [{
|
|
281
|
+
type: Directive,
|
|
282
|
+
args: [{
|
|
283
|
+
standalone: true
|
|
284
|
+
}]
|
|
285
|
+
}], ctorParameters: () => [], propDecorators: { inputGroup: [{
|
|
286
|
+
type: Input,
|
|
287
|
+
args: [{ alias: 'group' }]
|
|
288
|
+
}], valueChanges: [{
|
|
289
|
+
type: Output
|
|
290
|
+
}], inputValue: [{
|
|
291
|
+
type: Input,
|
|
292
|
+
args: [{ alias: 'value' }]
|
|
293
|
+
}] } });
|
|
294
|
+
|
|
259
295
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
260
|
-
class AbstractAutocompleteComponent extends
|
|
296
|
+
class AbstractAutocompleteComponent extends CrisprControlComponent {
|
|
261
297
|
constructor() {
|
|
262
298
|
super(...arguments);
|
|
263
299
|
// we need a separate control for the UI because of the way the material autocomplete chiplist works
|
|
264
300
|
this.autocompleteInputControl = new FormControl('');
|
|
301
|
+
this.config = signal(null, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
265
302
|
}
|
|
266
303
|
ngOnInit() {
|
|
267
304
|
super.ngOnInit();
|
|
268
|
-
this.group.addControl(this.config.controlName, new FormControl());
|
|
269
|
-
// filter options by the search string using either the default filter function or one passed in through config
|
|
305
|
+
this.group().addControl(this.config().controlName, new FormControl());
|
|
306
|
+
// filter options by the search string using either the default filter function or one passed in through config()
|
|
270
307
|
this.options$ = this.autocompleteInputControl.valueChanges.pipe(
|
|
271
308
|
// this is needed to have the options panel to open on focus
|
|
272
|
-
startWith(''), debounceTime(this.config.typeDebounceTime), map((searchText) => typeof searchText === 'string' ? searchText?.trim() : ''), distinctUntilChanged(), switchMap((searchText) => observablifyOptions(this.config.options, this.group, searchText)), shareReplay(1));
|
|
309
|
+
startWith(''), debounceTime(this.config().typeDebounceTime), map((searchText) => typeof searchText === 'string' ? searchText?.trim() : ''), distinctUntilChanged(), switchMap((searchText) => observablifyOptions(this.config().options, this.group(), searchText)), shareReplay(1));
|
|
273
310
|
}
|
|
274
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
275
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
311
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AbstractAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
312
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: AbstractAutocompleteComponent, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
276
313
|
}
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AbstractAutocompleteComponent, decorators: [{
|
|
278
315
|
type: Directive
|
|
279
316
|
}] });
|
|
280
317
|
|
|
281
|
-
const CrisprDisplayFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
282
318
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
283
|
-
class CrisprDisplayFieldComponent extends
|
|
284
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
285
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
319
|
+
class CrisprDisplayFieldComponent extends CrisprControlComponent {
|
|
320
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprDisplayFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
321
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: CrisprDisplayFieldComponent, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
|
|
286
322
|
}
|
|
287
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
323
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprDisplayFieldComponent, decorators: [{
|
|
288
324
|
type: Directive
|
|
289
325
|
}] });
|
|
290
326
|
|
|
291
327
|
const FIELD_COMPONENTS = {
|
|
292
328
|
groupList: () => Promise.resolve().then(function () { return index$1; }).then(({ FormGroupListComponent }) => FormGroupListComponent),
|
|
293
329
|
subGroup: () => Promise.resolve().then(function () { return index; }).then(({ SubGroupComponent }) => SubGroupComponent),
|
|
294
|
-
button: () => import('./tft-crispr-forms-index-
|
|
295
|
-
input: () => import('./tft-crispr-forms-index-
|
|
296
|
-
select: () => import('./tft-crispr-forms-index-
|
|
297
|
-
radio: () => import('./tft-crispr-forms-index-
|
|
298
|
-
autocomplete: () => import('./tft-crispr-forms-index-
|
|
299
|
-
autocompleteChiplist: () => import('./tft-crispr-forms-index-
|
|
300
|
-
map: () => import('./tft-crispr-forms-index-
|
|
301
|
-
textarea: () => import('./tft-crispr-forms-index-
|
|
302
|
-
checkbox: () => import('./tft-crispr-forms-index-
|
|
303
|
-
slider: () => import('./tft-crispr-forms-index-
|
|
304
|
-
datepicker: () => import('./tft-crispr-forms-index-
|
|
330
|
+
button: () => import('./tft-crispr-forms-index-joNvlmny.mjs').then(({ ButtonComponent }) => ButtonComponent),
|
|
331
|
+
input: () => import('./tft-crispr-forms-index-UvEVbwnf.mjs').then(({ InputFieldComponent }) => InputFieldComponent),
|
|
332
|
+
select: () => import('./tft-crispr-forms-index-LX0Bvkjk.mjs').then(({ SelectFieldComponent }) => SelectFieldComponent),
|
|
333
|
+
radio: () => import('./tft-crispr-forms-index-BQFuEW6x.mjs').then(({ RadioFieldComponent }) => RadioFieldComponent),
|
|
334
|
+
autocomplete: () => import('./tft-crispr-forms-index-BWsxn34Q.mjs').then(({ AutocompleteFieldComponent }) => AutocompleteFieldComponent),
|
|
335
|
+
autocompleteChiplist: () => import('./tft-crispr-forms-index-ClPQl_5D.mjs').then(({ AutocompleteChiplistFieldComponent }) => AutocompleteChiplistFieldComponent),
|
|
336
|
+
map: () => import('./tft-crispr-forms-index-DCRLl0jR.mjs').then(({ MapFieldComponent }) => MapFieldComponent),
|
|
337
|
+
textarea: () => import('./tft-crispr-forms-index-Dx-HIAiX.mjs').then(({ TextareaFieldComponent }) => TextareaFieldComponent),
|
|
338
|
+
checkbox: () => import('./tft-crispr-forms-index-Bh8kDfe4.mjs').then(({ CheckboxFieldComponent }) => CheckboxFieldComponent),
|
|
339
|
+
slider: () => import('./tft-crispr-forms-index-BHv9E1Y2.mjs').then(({ SliderFieldComponent }) => SliderFieldComponent),
|
|
340
|
+
datepicker: () => import('./tft-crispr-forms-index-BIhGbdgn.mjs').then(({ DatepickerFieldComponent }) => DatepickerFieldComponent),
|
|
305
341
|
fileUpload: () => Promise.resolve().then(function () { return index$3; }).then(({ FileUploadFieldComponent }) => FileUploadFieldComponent),
|
|
306
|
-
imageUpload: () => import('./tft-crispr-forms-index-
|
|
342
|
+
imageUpload: () => import('./tft-crispr-forms-index-C9gYJRzb.mjs').then(({ ImageUploadFieldComponent }) => ImageUploadFieldComponent),
|
|
307
343
|
heading: () => Promise.resolve().then(function () { return index$2; }).then(({ HeadingComponent }) => HeadingComponent),
|
|
308
|
-
divider: () => import('./tft-crispr-forms-index-
|
|
309
|
-
unitConversion: () => import('./tft-crispr-forms-index-
|
|
344
|
+
divider: () => import('./tft-crispr-forms-index-kjMTlZoq.mjs').then(({ DividerComponent }) => DividerComponent),
|
|
345
|
+
unitConversion: () => import('./tft-crispr-forms-index-Dyx5SqHu.mjs').then(({ UnitConversionFieldComponent }) => UnitConversionFieldComponent),
|
|
310
346
|
};
|
|
311
347
|
function isControlComponent(component) {
|
|
312
|
-
return component && isControlConfig(component.config) && 'value' in component;
|
|
348
|
+
return component && isControlConfig(component.config()) && 'value' in component;
|
|
313
349
|
}
|
|
314
350
|
function isControlOrButtonComponent(component) {
|
|
315
351
|
return (isControlComponent(component) ||
|
|
316
|
-
component.config.controlType === ControlType.BUTTON);
|
|
352
|
+
component.config().controlType === ControlType.BUTTON);
|
|
317
353
|
}
|
|
318
354
|
|
|
319
355
|
class CrisprFieldDirective {
|
|
@@ -338,9 +374,9 @@ class CrisprFieldDirective {
|
|
|
338
374
|
(await FIELD_COMPONENTS[this.config.controlType]());
|
|
339
375
|
const componentRef = this.container.createComponent(component);
|
|
340
376
|
this.component = componentRef.instance;
|
|
341
|
-
this.component.config
|
|
377
|
+
this.component.config.set(this.config);
|
|
342
378
|
if (isControlOrButtonComponent(this.component)) {
|
|
343
|
-
|
|
379
|
+
componentRef.setInput('group', this.group);
|
|
344
380
|
}
|
|
345
381
|
this.updateComponentValue(this.value);
|
|
346
382
|
// adds any config classes to the dynamically generated component
|
|
@@ -359,15 +395,15 @@ class CrisprFieldDirective {
|
|
|
359
395
|
}
|
|
360
396
|
updateComponentValue(value) {
|
|
361
397
|
if (isControlComponent(this.component)) {
|
|
362
|
-
this.component.value
|
|
398
|
+
this.component.value.set(value);
|
|
363
399
|
// SubGroups won't populate without this detectChanges
|
|
364
400
|
this.cdr.detectChanges();
|
|
365
401
|
}
|
|
366
402
|
}
|
|
367
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
368
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFieldDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
404
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: CrisprFieldDirective, isStandalone: true, selector: "[crisprField]", inputs: { config: "config", group: "group", value: "value" }, ngImport: i0 }); }
|
|
369
405
|
}
|
|
370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFieldDirective, decorators: [{
|
|
371
407
|
type: Directive,
|
|
372
408
|
args: [{
|
|
373
409
|
selector: '[crisprField]',
|
|
@@ -388,22 +424,23 @@ class InitialControlValuePipe {
|
|
|
388
424
|
? initialFormValue[fieldConfig.controlName] || null
|
|
389
425
|
: null;
|
|
390
426
|
}
|
|
391
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
392
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InitialControlValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
428
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: InitialControlValuePipe, isStandalone: false, name: "initialControlValue" }); }
|
|
393
429
|
}
|
|
394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InitialControlValuePipe, decorators: [{
|
|
395
431
|
type: Pipe,
|
|
396
432
|
args: [{
|
|
397
433
|
name: 'initialControlValue',
|
|
434
|
+
standalone: false
|
|
398
435
|
}]
|
|
399
436
|
}] });
|
|
400
437
|
|
|
401
438
|
class CrisprPipesModule {
|
|
402
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
403
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
404
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
439
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
440
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: CrisprPipesModule, declarations: [InitialControlValuePipe], imports: [CommonModule], exports: [InitialControlValuePipe] }); }
|
|
441
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprPipesModule, imports: [CommonModule] }); }
|
|
405
442
|
}
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprPipesModule, decorators: [{
|
|
407
444
|
type: NgModule,
|
|
408
445
|
args: [{
|
|
409
446
|
imports: [
|
|
@@ -438,18 +475,18 @@ class CrisprFormComponent {
|
|
|
438
475
|
triggerSubmit() {
|
|
439
476
|
this.submitTrigger.nativeElement.click();
|
|
440
477
|
}
|
|
441
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
442
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
478
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
479
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", 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 @for (field of config.fields; track field) {\n <ng-container\n crisprField\n [value]=\"value | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"form\">\n </ng-container>\n }\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: CrisprFieldDirective, selector: "[crisprField]", inputs: ["config", "group", "value"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsFormDirective, selector: "form", inputs: ["errorDictionary"] }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "ngmodule", type: CrisprPipesModule }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }], preserveWhitespaces: true }); }
|
|
443
480
|
}
|
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFormComponent, decorators: [{
|
|
445
482
|
type: Component,
|
|
446
|
-
args: [{ selector: 'crispr-form',
|
|
483
|
+
args: [{ selector: 'crispr-form', imports: [
|
|
447
484
|
CommonModule,
|
|
448
485
|
CrisprFieldDirective,
|
|
449
486
|
ReactiveFormsModule,
|
|
450
487
|
FormValidationHandlerModule,
|
|
451
488
|
CrisprPipesModule,
|
|
452
|
-
], 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
|
|
489
|
+
], 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 @for (field of config.fields; track field) {\n <ng-container\n crisprField\n [value]=\"value | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"form\">\n </ng-container>\n }\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"] }]
|
|
453
490
|
}], propDecorators: { config: [{
|
|
454
491
|
type: Input
|
|
455
492
|
}], form: [{
|
|
@@ -484,10 +521,10 @@ class FileDropzoneDirective {
|
|
|
484
521
|
$event.preventDefault();
|
|
485
522
|
}
|
|
486
523
|
}
|
|
487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
488
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
524
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FileDropzoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
525
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: FileDropzoneDirective, isStandalone: true, selector: "[crisprFileDropzone]", inputs: { crisprFileDropzone: "crisprFileDropzone" }, outputs: { fileDrop: "fileDrop" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)" } }, ngImport: i0 }); }
|
|
489
526
|
}
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FileDropzoneDirective, decorators: [{
|
|
491
528
|
type: Directive,
|
|
492
529
|
args: [{
|
|
493
530
|
selector: '[crisprFileDropzone]',
|
|
@@ -506,16 +543,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
|
|
|
506
543
|
}] } });
|
|
507
544
|
|
|
508
545
|
class InfoComponent {
|
|
509
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
510
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
546
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
547
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: InfoComponent, isStandalone: true, selector: "crispr-info", inputs: { info: "info" }, ngImport: i0, template: "@if (info) {\n <mat-icon\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\">\n {{info.iconName || 'info'}}\n </mat-icon>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
511
548
|
}
|
|
512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: InfoComponent, decorators: [{
|
|
513
550
|
type: Component,
|
|
514
|
-
args: [{ selector: 'crispr-info', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
515
|
-
CommonModule,
|
|
551
|
+
args: [{ selector: 'crispr-info', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
516
552
|
MatIconModule,
|
|
517
553
|
MatTooltipModule
|
|
518
|
-
], template: "<mat-icon\n
|
|
554
|
+
], template: "@if (info) {\n <mat-icon\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\">\n {{info.iconName || 'info'}}\n </mat-icon>\n}\n" }]
|
|
519
555
|
}], propDecorators: { info: [{
|
|
520
556
|
type: Input
|
|
521
557
|
}] } });
|
|
@@ -528,15 +564,13 @@ class HeadingComponent extends CrisprFieldComponent {
|
|
|
528
564
|
super(...arguments);
|
|
529
565
|
this.defaultConfig = defaultConfig$1;
|
|
530
566
|
}
|
|
531
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
532
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: HeadingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
568
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: HeadingComponent, isStandalone: true, selector: "crispr-heading", usesInheritance: true, ngImport: i0, template: "@if (!!config()?.label) {\n <label\n [ngClass]=\"config().typographyClass\">\n {{ config().label }}\n @if (config().info) {\n <crispr-info\n matSuffix\n [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n}\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
533
569
|
}
|
|
534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: HeadingComponent, decorators: [{
|
|
535
571
|
type: Component,
|
|
536
|
-
args: [{ selector: 'crispr-heading', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
537
|
-
}]
|
|
538
|
-
type: Input
|
|
539
|
-
}] } });
|
|
572
|
+
args: [{ selector: 'crispr-heading', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatFormFieldModule, InfoComponent], standalone: true, template: "@if (!!config()?.label) {\n <label\n [ngClass]=\"config().typographyClass\">\n {{ config().label }}\n @if (config().info) {\n <crispr-info\n matSuffix\n [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n}\n", styles: [":host{display:block}\n"] }]
|
|
573
|
+
}] });
|
|
540
574
|
|
|
541
575
|
class FieldContainerComponent {
|
|
542
576
|
constructor() {
|
|
@@ -575,12 +609,12 @@ class FieldContainerComponent {
|
|
|
575
609
|
tap((shouldDisable) => shouldDisable ? control.disable() : control.enable()))
|
|
576
610
|
: of(false);
|
|
577
611
|
}
|
|
578
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
579
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FieldContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: FieldContainerComponent, isStandalone: true, selector: "crispr-field-container", inputs: { config: "config", group: "group", inlineField: "inlineField" }, ngImport: i0, template: "@if ((disabled$ | async) ? !config.hideDisabled : true) {\n <div\n [ngClass]=\"config.classes\"\n [class.inline-field]=\"inlineField\"\n class=\"field-container\">\n @if (config.heading) {\n <crispr-heading\n [config]=\"config.heading\">\n </crispr-heading>\n }\n <ng-content>\n </ng-content>\n </div>\n}\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: "component", type: HeadingComponent, selector: "crispr-heading" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
580
614
|
}
|
|
581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FieldContainerComponent, decorators: [{
|
|
582
616
|
type: Component,
|
|
583
|
-
args: [{ selector: 'crispr-field-container', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
617
|
+
args: [{ selector: 'crispr-field-container', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, HeadingComponent], template: "@if ((disabled$ | async) ? !config.hideDisabled : true) {\n <div\n [ngClass]=\"config.classes\"\n [class.inline-field]=\"inlineField\"\n class=\"field-container\">\n @if (config.heading) {\n <crispr-heading\n [config]=\"config.heading\">\n </crispr-heading>\n }\n <ng-content>\n </ng-content>\n </div>\n}\n", styles: ["::ng-deep mat-form-field.mat-mdc-form-field{display:block;padding:.25em 0}.inline-field{display:inline-block}\n"] }]
|
|
584
618
|
}], propDecorators: { config: [{
|
|
585
619
|
type: Input
|
|
586
620
|
}], group: [{
|
|
@@ -590,15 +624,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
|
|
|
590
624
|
}] } });
|
|
591
625
|
|
|
592
626
|
class SelectedFileComponent {
|
|
593
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
594
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
627
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SelectedFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
628
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", 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@if (showProgress) {\n <mat-progress-bar\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n </mat-progress-bar>\n}\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1$2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], preserveWhitespaces: true }); }
|
|
595
629
|
}
|
|
596
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SelectedFileComponent, decorators: [{
|
|
597
631
|
type: Component,
|
|
598
|
-
args: [{ selector: 'crispr-selected-file',
|
|
599
|
-
CommonModule,
|
|
632
|
+
args: [{ selector: 'crispr-selected-file', imports: [
|
|
600
633
|
MatProgressBarModule
|
|
601
|
-
], template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n
|
|
634
|
+
], template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n@if (showProgress) {\n <mat-progress-bar\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n </mat-progress-bar>\n}\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"] }]
|
|
602
635
|
}], propDecorators: { fileName: [{
|
|
603
636
|
type: Input
|
|
604
637
|
}], progress: [{
|
|
@@ -610,8 +643,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
|
|
|
610
643
|
}] } });
|
|
611
644
|
|
|
612
645
|
/* eslint-disable @nx/enforce-module-boundaries */
|
|
613
|
-
|
|
614
|
-
class FileUploadFieldComponent extends FileUploadFieldMixin {
|
|
646
|
+
class FileUploadFieldComponent extends CrisprControlComponent {
|
|
615
647
|
// ngControl: NgControl = null;
|
|
616
648
|
constructor(ngControl) {
|
|
617
649
|
super();
|
|
@@ -629,6 +661,8 @@ class FileUploadFieldComponent extends FileUploadFieldMixin {
|
|
|
629
661
|
showUploadProgress: false,
|
|
630
662
|
disableOnUpload: true,
|
|
631
663
|
};
|
|
664
|
+
this.selectedFiles = signal(null, ...(ngDevMode ? [{ debugName: "selectedFiles" }] : []));
|
|
665
|
+
this.selectedFilesArray = computed(() => Array.from(this.selectedFiles()), ...(ngDevMode ? [{ debugName: "selectedFilesArray" }] : []));
|
|
632
666
|
this.isUploaded = false;
|
|
633
667
|
this.fileProgress = [];
|
|
634
668
|
if (this.ngControl != null) {
|
|
@@ -639,25 +673,25 @@ class FileUploadFieldComponent extends FileUploadFieldMixin {
|
|
|
639
673
|
}
|
|
640
674
|
ngOnInit() {
|
|
641
675
|
super.ngOnInit();
|
|
642
|
-
this.disabled$ = this.config.disabledCallback
|
|
643
|
-
? this.config.disabledCallback(this.group)
|
|
676
|
+
this.disabled$ = this.config().disabledCallback
|
|
677
|
+
? this.config().disabledCallback(this.group())
|
|
644
678
|
: of(false);
|
|
645
679
|
}
|
|
646
680
|
filesChanged(files) {
|
|
647
681
|
if (files && files.length > 0) {
|
|
648
|
-
this.selectedFiles
|
|
649
|
-
this.control.patchValue(files);
|
|
682
|
+
this.selectedFiles.set(files);
|
|
683
|
+
this.control().patchValue(files);
|
|
650
684
|
}
|
|
651
685
|
}
|
|
652
686
|
uploadFiles() {
|
|
653
|
-
if (this.selectedFiles && this.config.uploadFiles) {
|
|
687
|
+
if (this.selectedFiles() && this.config().uploadFiles) {
|
|
654
688
|
this.isUploaded = true;
|
|
655
|
-
this.config.uploadFiles(this.group, this.selectedFiles, this);
|
|
689
|
+
this.config().uploadFiles(this.group(), this.selectedFiles(), this);
|
|
656
690
|
}
|
|
657
691
|
}
|
|
658
692
|
resetFileInput() {
|
|
659
693
|
this.fileInputRef.nativeElement.value = '';
|
|
660
|
-
this.control.patchValue(null);
|
|
694
|
+
this.control().patchValue(null);
|
|
661
695
|
this.isUploaded = false;
|
|
662
696
|
}
|
|
663
697
|
writeValue(value) {
|
|
@@ -669,12 +703,12 @@ class FileUploadFieldComponent extends FileUploadFieldMixin {
|
|
|
669
703
|
this.onChange = fn;
|
|
670
704
|
}
|
|
671
705
|
registerOnTouched(fn) { }
|
|
672
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
673
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
706
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FileUploadFieldComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
707
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: FileUploadFieldComponent, isStandalone: true, selector: "crispr-file-upload-field", viewQueries: [{ propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config().color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config().disableOnUpload && isUploaded)\"\n [formGroup]=\"group()\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config().controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config().acceptedTypes\"\n [multiple]=\"config().allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config().label}}</mat-label>\n\n @if ((selectedFiles()?.length === 0)) {\n <div class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config().dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config().disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config().controlName\">\n {{config().selectButtonText}}\n </button>\n </div>\n } @else {\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n @for (file of selectedFilesArray(); track file; let i = $index) {\n <crispr-selected-file\n [color]=\"config().color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config().showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n }\n </div>\n </div>\n }\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n </mat-form-field>\n @if ((selectedFiles())?.length > 0) {\n <div class=\"button-container\">\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config().disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config().clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n @if (!!config().uploadFiles) {\n <button\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config().disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config().uploadButtonText\">\n {{ config().uploadButtonText }}\n </button>\n }\n </div>\n }\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.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$3.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$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$2.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: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "directive", type: FileDropzoneDirective, selector: "[crisprFileDropzone]", inputs: ["crisprFileDropzone"], outputs: ["fileDrop"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
674
708
|
}
|
|
675
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FileUploadFieldComponent, decorators: [{
|
|
676
710
|
type: Component,
|
|
677
|
-
args: [{ selector: 'crispr-file-upload-field', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
711
|
+
args: [{ selector: 'crispr-file-upload-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
678
712
|
CommonModule,
|
|
679
713
|
FieldContainerComponent,
|
|
680
714
|
ReactiveFormsModule,
|
|
@@ -685,8 +719,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
|
|
|
685
719
|
SelectedFileComponent,
|
|
686
720
|
FormValidationHandlerModule,
|
|
687
721
|
FileDropzoneDirective,
|
|
688
|
-
], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n
|
|
689
|
-
}], ctorParameters: () => [{ type:
|
|
722
|
+
], standalone: true, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config().color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config().disableOnUpload && isUploaded)\"\n [formGroup]=\"group()\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config().controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config().acceptedTypes\"\n [multiple]=\"config().allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config().label}}</mat-label>\n\n @if ((selectedFiles()?.length === 0)) {\n <div class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config().dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config().disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config().controlName\">\n {{config().selectButtonText}}\n </button>\n </div>\n } @else {\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n @for (file of selectedFilesArray(); track file; let i = $index) {\n <crispr-selected-file\n [color]=\"config().color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config().showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n }\n </div>\n </div>\n }\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n </mat-form-field>\n @if ((selectedFiles())?.length > 0) {\n <div class=\"button-container\">\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config().disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config().clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n @if (!!config().uploadFiles) {\n <button\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config().disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config().uploadButtonText\">\n {{ config().uploadButtonText }}\n </button>\n }\n </div>\n }\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"] }]
|
|
723
|
+
}], ctorParameters: () => [{ type: i1$1.NgControl, decorators: [{
|
|
690
724
|
type: Optional
|
|
691
725
|
}, {
|
|
692
726
|
type: Self
|
|
@@ -740,10 +774,10 @@ class CrisprDisplayFieldDirective {
|
|
|
740
774
|
this.componentInstance.value = value;
|
|
741
775
|
this.cdr.detectChanges();
|
|
742
776
|
}
|
|
743
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
744
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
777
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprDisplayFieldDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
778
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: CrisprDisplayFieldDirective, isStandalone: true, selector: "[crisprDisplayField]", inputs: { group: "group", value: "value", component: "component", index: "index" }, ngImport: i0 }); }
|
|
745
779
|
}
|
|
746
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprDisplayFieldDirective, decorators: [{
|
|
747
781
|
type: Directive,
|
|
748
782
|
args: [{
|
|
749
783
|
selector: '[crisprDisplayField]',
|
|
@@ -763,8 +797,7 @@ const defaultConfig = {
|
|
|
763
797
|
addButtonLabel: 'ADD ITEM',
|
|
764
798
|
minListLength: 1,
|
|
765
799
|
};
|
|
766
|
-
|
|
767
|
-
class FormGroupListComponent extends FormGroupListMixin {
|
|
800
|
+
class FormGroupListComponent extends CrisprControlComponent {
|
|
768
801
|
constructor(cdr) {
|
|
769
802
|
super();
|
|
770
803
|
this.cdr = cdr;
|
|
@@ -781,16 +814,16 @@ class FormGroupListComponent extends FormGroupListMixin {
|
|
|
781
814
|
// TODO: this is required to ngFor of controls in template, must be a better way
|
|
782
815
|
}
|
|
783
816
|
setControlValue(values) {
|
|
784
|
-
if (this.control) {
|
|
817
|
+
if (this.control()) {
|
|
785
818
|
if (values?.length > 0) {
|
|
786
819
|
// clear any existing values so that new values don't concatenate onto the old
|
|
787
|
-
const currentValues = this.control.value;
|
|
820
|
+
const currentValues = this.control().value;
|
|
788
821
|
if (currentValues.length) {
|
|
789
|
-
this.control.clear();
|
|
822
|
+
this.control().clear();
|
|
790
823
|
}
|
|
791
824
|
values.forEach((value) => this.addGroup(value));
|
|
792
825
|
}
|
|
793
|
-
else if (this.config.displayInitialItem) {
|
|
826
|
+
else if (this.config().displayInitialItem) {
|
|
794
827
|
this.addGroup();
|
|
795
828
|
}
|
|
796
829
|
// needed to ensure new array items render
|
|
@@ -808,25 +841,24 @@ class FormGroupListComponent extends FormGroupListMixin {
|
|
|
808
841
|
this.addGroup();
|
|
809
842
|
}
|
|
810
843
|
addGroup(value = null) {
|
|
811
|
-
this.control.push(createControlForType(this.config.itemConfig, value));
|
|
844
|
+
this.control().push(createControlForType(this.config().itemConfig, value));
|
|
812
845
|
// needed to ensure new array items render
|
|
813
846
|
setTimeout(() => {
|
|
814
847
|
this.cdr.detectChanges();
|
|
815
848
|
});
|
|
816
849
|
}
|
|
817
850
|
deleteGroup(index) {
|
|
818
|
-
this.control.removeAt(index);
|
|
851
|
+
this.control().removeAt(index);
|
|
819
852
|
}
|
|
820
853
|
clickEditItem(index) {
|
|
821
854
|
this.selectedIndex = index;
|
|
822
855
|
}
|
|
823
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
824
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
856
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FormGroupListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
857
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: FormGroupListComponent, isStandalone: true, selector: "crispr-form-group-list", usesInheritance: true, ngImport: i0, template: "<crispr-field-container [config]=\"config\" [group]=\"group()\" [formGroup]=\"group()\">\n\n <div [formArrayName]=\"config().controlName\">\n\n <!-- Don't add trackBy function, it confuses the state of the array -->\n @for (itemControl of control()?.controls; track itemControl; let i = $index; let last = $last) {\n @if (!config().displayItemComponent || i === selectedIndex || (last && selectedIndex ?? true)) {\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 @if (i + 1 > config().minListLength) {\n <button mat-icon-button type=\"button\">\n <mat-icon (click)=\"clickDelete(i)\">delete</mat-icon>\n </button>\n }\n </div>\n <div [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 @for (field of config().itemConfig.fields; track field) {\n <ng-container crisprField [value]=\"blockValue ? null : value && value[i] | initialControlValue : field\"\n [config]=\"field\" [group]=\"itemControl\">\n </ng-container>\n }\n </div>\n } @else {\n <div class=\"display-field-container\" crisprDisplayField [component]=\"config().displayItemComponent\"\n [value]=\"itemControl.value\" [index]=\"i\">\n <button mat-icon-button (click)=\"clickEditItem(i)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n }\n <ng-template #display>\n <div class=\"display-field-container\" crisprDisplayField [component]=\"config().displayItemComponent\"\n [value]=\"itemControl.value\" [index]=\"i\">\n <button mat-icon-button (click)=\"clickEditItem(i)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </ng-template>\n }\n </div>\n <div class=\"group-footer\">\n <button type=\"button\" class=\"add\" mat-raised-button [color]=\"config().addButtonColor\" (click)=\"clickAdd()\">\n {{config().addItemLabel || config().addButtonLabel}}\n </button>\n </div>\n\n</crispr-field-container>", 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: MatButtonModule }, { kind: "component", type: i1$3.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: "component", type: i1$3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.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: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.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: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
825
858
|
}
|
|
826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: FormGroupListComponent, decorators: [{
|
|
827
860
|
type: Component,
|
|
828
|
-
args: [{ selector: 'crispr-form-group-list', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
829
|
-
CommonModule,
|
|
861
|
+
args: [{ selector: 'crispr-form-group-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
830
862
|
MatButtonModule,
|
|
831
863
|
MatIconModule,
|
|
832
864
|
FieldContainerComponent,
|
|
@@ -834,8 +866,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
|
|
|
834
866
|
CrisprFieldDirective,
|
|
835
867
|
CrisprDisplayFieldDirective,
|
|
836
868
|
CrisprPipesModule,
|
|
837
|
-
FormValidationHandlerModule
|
|
838
|
-
], template: "
|
|
869
|
+
FormValidationHandlerModule
|
|
870
|
+
], standalone: true, template: "<crispr-field-container [config]=\"config\" [group]=\"group()\" [formGroup]=\"group()\">\n\n <div [formArrayName]=\"config().controlName\">\n\n <!-- Don't add trackBy function, it confuses the state of the array -->\n @for (itemControl of control()?.controls; track itemControl; let i = $index; let last = $last) {\n @if (!config().displayItemComponent || i === selectedIndex || (last && selectedIndex ?? true)) {\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 @if (i + 1 > config().minListLength) {\n <button mat-icon-button type=\"button\">\n <mat-icon (click)=\"clickDelete(i)\">delete</mat-icon>\n </button>\n }\n </div>\n <div [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 @for (field of config().itemConfig.fields; track field) {\n <ng-container crisprField [value]=\"blockValue ? null : value && value[i] | initialControlValue : field\"\n [config]=\"field\" [group]=\"itemControl\">\n </ng-container>\n }\n </div>\n } @else {\n <div class=\"display-field-container\" crisprDisplayField [component]=\"config().displayItemComponent\"\n [value]=\"itemControl.value\" [index]=\"i\">\n <button mat-icon-button (click)=\"clickEditItem(i)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n }\n <ng-template #display>\n <div class=\"display-field-container\" crisprDisplayField [component]=\"config().displayItemComponent\"\n [value]=\"itemControl.value\" [index]=\"i\">\n <button mat-icon-button (click)=\"clickEditItem(i)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </ng-template>\n }\n </div>\n <div class=\"group-footer\">\n <button type=\"button\" class=\"add\" mat-raised-button [color]=\"config().addButtonColor\" (click)=\"clickAdd()\">\n {{config().addItemLabel || config().addButtonLabel}}\n </button>\n </div>\n\n</crispr-field-container>", 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"] }]
|
|
839
871
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
840
872
|
|
|
841
873
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
@@ -843,34 +875,33 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
843
875
|
FormGroupListComponent: FormGroupListComponent
|
|
844
876
|
});
|
|
845
877
|
|
|
846
|
-
|
|
847
|
-
class SubGroupComponent extends FormGroupMixin {
|
|
878
|
+
class SubGroupComponent extends CrisprControlComponent {
|
|
848
879
|
ngOnInit() {
|
|
849
880
|
super.ngOnInit();
|
|
850
881
|
}
|
|
851
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
882
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SubGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
883
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: SubGroupComponent, isStandalone: false, selector: "crispr-sub-group", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n @for (fieldConfig of config().fields; track fieldConfig) {\n <ng-container\n crisprField\n [value]=\"value | initialControlValue : fieldConfig\"\n [config]=\"fieldConfig\"\n [group]=\"control\">\n </ng-container>\n }\n</crispr-field-container>\n\n", styles: [""], dependencies: [{ 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 }); }
|
|
853
884
|
}
|
|
854
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
885
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SubGroupComponent, decorators: [{
|
|
855
886
|
type: Component,
|
|
856
|
-
args: [{ selector: 'crispr-sub-group', template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n
|
|
887
|
+
args: [{ selector: 'crispr-sub-group', standalone: false, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n @for (fieldConfig of config().fields; track fieldConfig) {\n <ng-container\n crisprField\n [value]=\"value | initialControlValue : fieldConfig\"\n [config]=\"fieldConfig\"\n [group]=\"control\">\n </ng-container>\n }\n</crispr-field-container>\n\n" }]
|
|
857
888
|
}] });
|
|
858
889
|
|
|
859
890
|
class SubGroupModule {
|
|
860
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
861
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
891
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SubGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
892
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: SubGroupModule, declarations: [SubGroupComponent], imports: [CommonModule,
|
|
862
893
|
CrisprFieldDirective,
|
|
863
894
|
FieldContainerComponent,
|
|
864
895
|
CrisprPipesModule,
|
|
865
896
|
// TODO: Does this need to be here?
|
|
866
897
|
FormValidationHandlerModule], exports: [SubGroupComponent] }); }
|
|
867
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
898
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SubGroupModule, imports: [CommonModule,
|
|
868
899
|
FieldContainerComponent,
|
|
869
900
|
CrisprPipesModule,
|
|
870
901
|
// TODO: Does this need to be here?
|
|
871
902
|
FormValidationHandlerModule] }); }
|
|
872
903
|
}
|
|
873
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SubGroupModule, decorators: [{
|
|
874
905
|
type: NgModule,
|
|
875
906
|
args: [{
|
|
876
907
|
imports: [
|
|
@@ -897,8 +928,8 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
897
928
|
});
|
|
898
929
|
|
|
899
930
|
class CrisprFormsModule {
|
|
900
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
901
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
932
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.6", ngImport: i0, type: CrisprFormsModule, imports: [CommonModule,
|
|
902
933
|
ReactiveFormsModule,
|
|
903
934
|
FormValidationHandlerModule,
|
|
904
935
|
FormGroupListComponent,
|
|
@@ -908,7 +939,7 @@ class CrisprFormsModule {
|
|
|
908
939
|
SubGroupModule,
|
|
909
940
|
CrisprPipesModule,
|
|
910
941
|
CrisprFormComponent], exports: [CrisprFormComponent, FieldContainerComponent] }); }
|
|
911
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
942
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFormsModule, imports: [CommonModule,
|
|
912
943
|
ReactiveFormsModule,
|
|
913
944
|
FormValidationHandlerModule,
|
|
914
945
|
FormGroupListComponent,
|
|
@@ -917,7 +948,7 @@ class CrisprFormsModule {
|
|
|
917
948
|
CrisprPipesModule,
|
|
918
949
|
CrisprFormComponent] }); }
|
|
919
950
|
}
|
|
920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
951
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: CrisprFormsModule, decorators: [{
|
|
921
952
|
type: NgModule,
|
|
922
953
|
args: [{
|
|
923
954
|
imports: [
|
|
@@ -940,5 +971,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImpor
|
|
|
940
971
|
* Generated bundle index. Do not edit.
|
|
941
972
|
*/
|
|
942
973
|
|
|
943
|
-
export { AbstractAutocompleteComponent, ControlType, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, FileUploadFieldComponent, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType,
|
|
974
|
+
export { AbstractAutocompleteComponent, ControlType, CrisprControlComponent, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, FileUploadFieldComponent, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn };
|
|
944
975
|
//# sourceMappingURL=tft-crispr-forms.mjs.map
|