@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
package/README.md
CHANGED
|
@@ -1,173 +1,172 @@
|
|
|
1
|
-
#
|
|
2
|
-
### Build forms like DNA builds life
|
|
3
|
-
<a href="https://www.npmjs.com/package/@tft/interact">
|
|
4
|
-
<img alt="npm latest version" src="https://img.shields.io/npm/v/@tft/interact/latest.svg">
|
|
5
|
-
</a>
|
|
1
|
+
# crispr-forms
|
|
6
2
|
|
|
3
|
+
**Build complex forms dynamically from a configuration object.**
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
CRISPR Forms is an Angular library that allows you to build forms by providing a configuration object. This abstracts the template work, allowing you to focus on business logic. It is built on top of Angular Material.
|
|
9
6
|
|
|
7
|
+
[Interactive Docs](https://stackblitz.com/github/nayfin/tft-documentation)
|
|
10
8
|
|
|
11
|
-
##
|
|
9
|
+
## Architecture Overview
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
At its core, CRISPR Forms is a component that dynamically generates form fields based on a configuration you provide.
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
- **`<crispr-form>` component:** The main component you'll use. You pass it a `FormConfig` object, and it renders the form.
|
|
14
|
+
- **`FormConfig`:** A configuration object that defines the entire form, including its fields, validation, and behavior.
|
|
15
|
+
- **Field Components:** The library includes a variety of pre-built field components for different types of inputs (e.g., text input, select, datepicker). These are located in `libs/crispr-forms/src/lib/ui`.
|
|
16
|
+
- **Dynamic Field Generation:** A directive (`field.directive.ts`) and a component map (`field-component-map.const.ts`) work together to dynamically instantiate the correct field component based on the `controlType` specified in the field's configuration.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
## Key Concepts
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- Checkbox
|
|
23
|
-
- Input
|
|
24
|
-
- Select
|
|
25
|
-
- Textarea
|
|
26
|
-
- Slider
|
|
27
|
-
- Datepicker
|
|
28
|
-
- Button
|
|
29
|
-
- Heading
|
|
30
|
-
- Divider
|
|
20
|
+
- **`FormConfig`:** The main configuration object for the entire form. It contains an array of `FieldConfig` objects.
|
|
21
|
+
- **`FieldConfig`:** A base interface for all field configurations. Each field type extends this with its own specific options. These configuration interfaces are located in `libs/crispr-forms/src/lib/utils/models`.
|
|
22
|
+
- **`ControlType`:** An enum that specifies the type of field to render (e.g., `ControlType.INPUT`, `ControlType.SELECT`).
|
|
31
23
|
|
|
32
|
-
|
|
24
|
+
## Installation
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
- computed values: field values based on one or many other field values (fieldC === fieldA * fieldB)
|
|
36
|
-
- dynamically disabled fields: disable a field reactively based on other field(s) values
|
|
37
|
-
- configurations to handle all the features of each Angular Material field
|
|
26
|
+
CRISPR Forms requires Angular Material.
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
Install the package and its peer dependency:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install @tft/crispr-forms @tft/form-validation-handler
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Add Angular Material:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ng add @angular/material
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The datepicker field requires `date-fns`:
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
```bash
|
|
43
|
+
npm i date-fns @angular/material-date-fns-adapter
|
|
44
|
+
```
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
`npm i date-fns @angular/material-date-fns-adapter`
|
|
46
|
+
You also need to provide `MAT_DATE_LOCALE` in your root module:
|
|
45
47
|
|
|
46
|
-
You will have also have to provide value for `MAT_DATE_LOCALE` in your root module.
|
|
47
48
|
```ts
|
|
48
49
|
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
|
49
50
|
import { enUS } from 'date-fns/locale';
|
|
50
51
|
|
|
51
|
-
|
|
52
52
|
@NgModule({
|
|
53
|
-
...
|
|
53
|
+
// ...
|
|
54
54
|
providers: [
|
|
55
55
|
{
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
provide: MAT_DATE_LOCALE,
|
|
57
|
+
useValue: enUS,
|
|
58
58
|
},
|
|
59
59
|
],
|
|
60
|
-
})
|
|
60
|
+
})
|
|
61
|
+
export class AppModule {}
|
|
61
62
|
```
|
|
62
63
|
|
|
63
|
-
<!-- Next, you'll need our sister library `npm i --save @tft/form-validation-handler` this enables automatic user messages on invalid fields. -->
|
|
64
|
-
There are default messages for all the built in Angular validators, but they can easily overwritten by setting the `errorDictionary` field on the `config` input. Custom messages can also be created for custom validators.
|
|
65
|
-
|
|
66
64
|
## Usage
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Interactive documentation can be found on Stackblitz [here](https://stackblitz.com/github/nayfin/tft-documentation), with editable examples for most features.
|
|
66
|
+
Provide a `FormConfig` object to the `<crispr-form>` component.
|
|
71
67
|
|
|
72
|
-
In
|
|
68
|
+
**In your component's template:**
|
|
73
69
|
|
|
74
70
|
```html
|
|
75
|
-
<crispr-form
|
|
76
|
-
[config]="config"
|
|
77
|
-
(submitted)="handleSubmit($event)">
|
|
78
|
-
</crispr-form>
|
|
71
|
+
<crispr-form [config]="config" (submitted)="handleSubmit($event)"></crispr-form>
|
|
79
72
|
```
|
|
80
|
-
In `some-component.ts` we define the `config` and `handleSubmit` function.
|
|
81
73
|
|
|
82
|
-
|
|
83
|
-
export class DemoComponent implements OnInit {
|
|
74
|
+
**In your component's class:**
|
|
84
75
|
|
|
76
|
+
```ts
|
|
77
|
+
import { Component } from '@angular/core';
|
|
78
|
+
import { FormConfig, ControlType } from '@tft/crispr-forms';
|
|
79
|
+
import { Validators } from '@angular/forms';
|
|
80
|
+
|
|
81
|
+
@Component({
|
|
82
|
+
selector: 'app-my-form',
|
|
83
|
+
templateUrl: './my-form.component.html',
|
|
84
|
+
})
|
|
85
|
+
export class MyFormComponent {
|
|
85
86
|
config: FormConfig = {
|
|
86
87
|
fields: [
|
|
87
|
-
// a basic input field in the form with the following configuration
|
|
88
88
|
{
|
|
89
89
|
controlType: ControlType.INPUT,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
validators: [Validators.required, Validators.minLength(5)],
|
|
90
|
+
controlName: 'name',
|
|
91
|
+
label: 'Name',
|
|
92
|
+
validators: [Validators.required],
|
|
94
93
|
},
|
|
95
94
|
{
|
|
96
95
|
controlType: ControlType.SELECT,
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
controlName: 'role',
|
|
97
|
+
label: 'Role',
|
|
99
98
|
options: [
|
|
100
|
-
{label: '
|
|
101
|
-
{label: '
|
|
99
|
+
{ label: 'Admin', value: 'admin' },
|
|
100
|
+
{ label: 'User', value: 'user' },
|
|
102
101
|
],
|
|
103
|
-
placeholder: 'I am a placeholder in a text input',
|
|
104
|
-
validators: [Validators.required, Validators.minLength(5)],
|
|
105
102
|
},
|
|
106
|
-
]
|
|
103
|
+
],
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
handleSubmit(event: any) {
|
|
107
|
+
console.log(event);
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
```
|
|
110
111
|
|
|
112
|
+
## Supported Fields
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
The following field types are supported:
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
- Autocomplete
|
|
117
|
+
- Autocomplete Chiplist
|
|
118
|
+
- Button
|
|
119
|
+
- Checkbox
|
|
120
|
+
- Datepicker
|
|
121
|
+
- Divider
|
|
122
|
+
- File Upload
|
|
123
|
+
- Form Group List
|
|
124
|
+
- Heading
|
|
125
|
+
- Image Upload
|
|
126
|
+
- Input
|
|
127
|
+
- Map
|
|
128
|
+
- Radio Buttons
|
|
129
|
+
- Select
|
|
130
|
+
- Slider
|
|
131
|
+
- Sub Group
|
|
132
|
+
- Textarea
|
|
133
|
+
- Unit Conversion
|
|
115
134
|
|
|
116
|
-
##
|
|
135
|
+
## Creating a Custom Field
|
|
117
136
|
|
|
118
|
-
|
|
137
|
+
To create a new field type for CRISPR Forms, follow these steps:
|
|
119
138
|
|
|
120
|
-
|
|
139
|
+
1. **Generate a new component:**
|
|
121
140
|
|
|
122
|
-
|
|
141
|
+
```bash
|
|
142
|
+
ng g c <your-field-name> --project=crispr-forms
|
|
143
|
+
```
|
|
123
144
|
|
|
124
|
-
|
|
125
|
-
|
|
145
|
+
2. **Define the configuration interface:**
|
|
146
|
+
Create a new file `libs/crispr-forms/src/lib/utils/models/<your-field-name>.config.ts`. This file will define the configuration interface for your new field. It should extend the base `FieldConfig`.
|
|
126
147
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
fields: [
|
|
130
|
-
{
|
|
131
|
-
component: CustomInputComponent,
|
|
132
|
-
controlType: ControlType.CUSTOM,
|
|
133
|
-
controlName: 'customComponent',
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
Examples of how to extend current field behavior available [here](https://stackblitz.com/github/nayfin/tft-documentation?file=src%2Fapp%2Fcrispr-forms-demo%2Ffeatures%2Finfo%2Finfo.component.ts0)
|
|
138
|
-
|
|
139
|
-
## Breaking Changest v13 => v14
|
|
140
|
-
|
|
141
|
-
### Switch from MomentDateAdaptor to FnsDateAdapter
|
|
142
|
-
|
|
143
|
-
With momentjs shifting into maintenance mode, it no longer makes sense to use the `MomentDateAdaptor`, so we've switched to the `FnsDateAdapter`. This means that for `DatepickerFieldConfig`s the `datepickerFilter`, `cellClassFunction`, `dateClass` properties, instances of `Moment` will need to be replaced with `Date`.
|
|
144
|
-
|
|
145
|
-
#### v13
|
|
146
|
-
|
|
147
|
-
```ts
|
|
148
|
-
datepickerFilter?: (date: Moment) => boolean;
|
|
149
|
-
cellClassFunction?: MatCalendarCellClassFunction<Moment>;
|
|
150
|
-
dateClass?: (parentGroup: FormGroup) => Observable<MatCalendarCellClassFunction<Moment>>;
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
#### v14
|
|
154
|
-
```ts
|
|
155
|
-
datepickerFilter?: (date: Date) => boolean;
|
|
156
|
-
cellClassFunction?: MatCalendarCellClassFunction<Date>;
|
|
157
|
-
dateClass?: (parentGroup: FormGroup) => Observable<MatCalendarCellClassFunction<Date>>;
|
|
158
|
-
```
|
|
148
|
+
```ts
|
|
149
|
+
import { FieldConfig } from './crispr-field.config';
|
|
159
150
|
|
|
160
|
-
|
|
151
|
+
export interface YourFieldConfig extends FieldConfig {
|
|
152
|
+
// your custom properties here
|
|
153
|
+
}
|
|
154
|
+
```
|
|
161
155
|
|
|
156
|
+
3. **Update `crispr-field.config.ts`:**
|
|
157
|
+
In `libs/crispr-forms/src/lib/utils/models/crispr-field.config.ts`:
|
|
158
|
+
- Add your new config to the `AnyFieldConfig` type.
|
|
159
|
+
- Add an entry to the `ControlType` enum.
|
|
162
160
|
|
|
161
|
+
4. **Create the component:**
|
|
162
|
+
Your new component should extend `CrisprControlComponent` and implement the necessary logic.
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
5. **Map the component:**
|
|
165
|
+
In `libs/crispr-forms/src/lib/field-component-map.const.ts`:
|
|
166
|
+
- Add your new component class to the `FIELD_COMPONENTS` array and the `CrisprControlComponent` type.
|
|
165
167
|
|
|
166
|
-
|
|
168
|
+
## Advanced Features
|
|
167
169
|
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
- Radio button
|
|
172
|
-
- Slide toggle
|
|
173
|
-
- Button toggle
|
|
170
|
+
- **Computed Values:** Field values can be calculated based on the values of other fields.
|
|
171
|
+
- **Dynamically Disabled Fields:** Fields can be disabled reactively based on the values of other fields.
|
|
172
|
+
- **Custom Components:** You can pass your own custom components to be rendered as fields.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/material/autocomplete';
|
|
4
|
+
import { MatAutocompleteModule, MatAutocompleteTrigger } from '@angular/material/autocomplete';
|
|
5
|
+
import * as i1$1 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i1 from '@angular/forms';
|
|
8
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import * as i3 from '@angular/material/input';
|
|
10
|
+
import { MatInputModule } from '@angular/material/input';
|
|
11
|
+
import { MatOptionModule } from '@angular/material/core';
|
|
12
|
+
import { O as OptionComponent } from './tft-crispr-forms-index-UAYeTe3L.mjs';
|
|
13
|
+
import * as i6 from '@tft/form-validation-handler';
|
|
14
|
+
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
15
|
+
import { DEFAULT_EMPTY_OPTIONS_MESSAGE, AbstractAutocompleteComponent, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
|
|
16
|
+
import * as i2$1 from '@angular/material/form-field';
|
|
17
|
+
|
|
18
|
+
/* eslint-disable @nx/enforce-module-boundaries */
|
|
19
|
+
const defaultConfig = {
|
|
20
|
+
autoActiveFirstOption: true,
|
|
21
|
+
typeDebounceTime: 500,
|
|
22
|
+
emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,
|
|
23
|
+
};
|
|
24
|
+
class AutocompleteFieldComponent extends AbstractAutocompleteComponent {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.defaultConfig = defaultConfig;
|
|
28
|
+
}
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
super.ngOnInit();
|
|
31
|
+
this.clearFieldSubscription =
|
|
32
|
+
this.autocompleteInputControl.valueChanges.subscribe((text) => {
|
|
33
|
+
if (typeof text === 'string' && text?.trim() === '') {
|
|
34
|
+
this.control().setValue(null);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
ngOnDestroy() {
|
|
39
|
+
this.clearFieldSubscription.unsubscribe();
|
|
40
|
+
}
|
|
41
|
+
setControlValue(value) {
|
|
42
|
+
if (this.control() && value) {
|
|
43
|
+
// sets the initial value on the control if one is passed
|
|
44
|
+
this.control().setValue(value.value || '');
|
|
45
|
+
this.autocompleteInputControl.setValue(value.label || '');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The material autocomplete defaults to displaying the options value instead of its label.
|
|
50
|
+
* We only have the value from the selected option to work with, so we have to pass the options
|
|
51
|
+
* through a function called in the template and return the function that the material displayWith
|
|
52
|
+
* input is expecting.
|
|
53
|
+
* @param options the array of options to search for option with corresponding value
|
|
54
|
+
*/
|
|
55
|
+
displayLabel(options) {
|
|
56
|
+
if (this.config().displayWith) {
|
|
57
|
+
return this.config().displayWith(options);
|
|
58
|
+
}
|
|
59
|
+
return (value) => {
|
|
60
|
+
const label = !!options && Array.isArray(options)
|
|
61
|
+
? options.find((option) => JSON.stringify(option.value) === JSON.stringify(value))?.label
|
|
62
|
+
: value;
|
|
63
|
+
return label;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
handleSelect(event) {
|
|
67
|
+
this.control().setValue(event.option.value);
|
|
68
|
+
this.autoInputRef.nativeElement.blur();
|
|
69
|
+
}
|
|
70
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AutocompleteFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
71
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: AutocompleteFieldComponent, isStandalone: true, selector: "crispr-autocomplete-field", viewQueries: [{ propertyName: "autoInput", first: true, predicate: ["autoInput"], descendants: true, read: MatAutocompleteTrigger }, { propertyName: "autoInputRef", first: true, predicate: ["autoInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "\n<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-form-field\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n\n <input class=\"hidden-error-directive-anchor\" [formControlName]=\"config().controlName\" type=\"text\"/>\n\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config().placeholder\"\n [matAutocomplete]=\"auto\"\n role=\"textbox\"\n type=\"textbox\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n #autoInput>\n\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info \"></crispr-info>}\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"config().autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"displayLabel(options$ | async)\">\n\n @if (options$ | async; as options) {\n @if (options.length > 0) {\n @for (option of options; track option) {\n <mat-option\n [value]=\"option.value\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n", styles: [".hidden-error-directive-anchor{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "component", type: OptionComponent, selector: "crispr-option", inputs: ["option"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
72
|
+
}
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: AutocompleteFieldComponent, decorators: [{
|
|
74
|
+
type: Component,
|
|
75
|
+
args: [{ selector: 'crispr-autocomplete-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
76
|
+
CommonModule,
|
|
77
|
+
InfoComponent,
|
|
78
|
+
OptionComponent,
|
|
79
|
+
ReactiveFormsModule,
|
|
80
|
+
FieldContainerComponent,
|
|
81
|
+
MatAutocompleteModule,
|
|
82
|
+
MatInputModule,
|
|
83
|
+
MatOptionModule,
|
|
84
|
+
FormValidationHandlerModule,
|
|
85
|
+
], standalone: true, template: "\n<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-form-field\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n\n <input class=\"hidden-error-directive-anchor\" [formControlName]=\"config().controlName\" type=\"text\"/>\n\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config().placeholder\"\n [matAutocomplete]=\"auto\"\n role=\"textbox\"\n type=\"textbox\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n #autoInput>\n\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info \"></crispr-info>}\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"config().autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"displayLabel(options$ | async)\">\n\n @if (options$ | async; as options) {\n @if (options.length > 0) {\n @for (option of options; track option) {\n <mat-option\n [value]=\"option.value\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n", styles: [".hidden-error-directive-anchor{display:none}\n"] }]
|
|
86
|
+
}], propDecorators: { autoInput: [{
|
|
87
|
+
type: ViewChild,
|
|
88
|
+
args: ['autoInput', { read: MatAutocompleteTrigger }]
|
|
89
|
+
}], autoInputRef: [{
|
|
90
|
+
type: ViewChild,
|
|
91
|
+
args: ['autoInput']
|
|
92
|
+
}] } });
|
|
93
|
+
|
|
94
|
+
export { AutocompleteFieldComponent as A };
|
|
95
|
+
//# sourceMappingURL=tft-crispr-forms-autocomplete-field.component-jdr2Hr6I.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tft-crispr-forms-autocomplete-field.component-jdr2Hr6I.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/autocomplete-field/autocomplete-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/autocomplete-field/autocomplete-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ViewChild,\n ChangeDetectionStrategy,\n ElementRef,\n OnDestroy,\n} from '@angular/core';\nimport {\n MatAutocompleteTrigger,\n MatAutocompleteSelectedEvent,\n MatAutocompleteModule,\n} from '@angular/material/autocomplete';\n\nimport { Subscription } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatOptionModule } from '@angular/material/core';\nimport { OptionComponent } from '../option';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n\nimport { FieldContainerComponent } from '../field-container';\nimport {\n SelectOption,\n AbstractAutocompleteComponent,\n AutocompleteFieldConfig,\n DEFAULT_EMPTY_OPTIONS_MESSAGE,\n} from '../../utils';\nimport { InfoComponent } from '../info';\n\nconst defaultConfig: Partial<AutocompleteFieldConfig> = {\n autoActiveFirstOption: true,\n typeDebounceTime: 500,\n emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,\n};\n\n@Component({\n selector: 'crispr-autocomplete-field',\n templateUrl: './autocomplete-field.component.html',\n styleUrls: ['./autocomplete-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatAutocompleteModule,\n MatInputModule,\n MatOptionModule,\n FormValidationHandlerModule,\n ],\n standalone: true\n})\nexport class AutocompleteFieldComponent\n extends AbstractAutocompleteComponent<AutocompleteFieldConfig>\n implements OnInit, OnDestroy\n{\n defaultConfig = defaultConfig;\n @ViewChild('autoInput', { read: MatAutocompleteTrigger })\n autoInput: MatAutocompleteTrigger;\n @ViewChild('autoInput') autoInputRef: ElementRef<HTMLInputElement>;\n\n clearFieldSubscription: Subscription;\n\n ngOnInit() {\n super.ngOnInit();\n this.clearFieldSubscription =\n this.autocompleteInputControl.valueChanges.subscribe((text: string) => {\n if (typeof text === 'string' && text?.trim() === '') {\n this.control().setValue(null);\n }\n });\n }\n\n ngOnDestroy() {\n this.clearFieldSubscription.unsubscribe();\n }\n\n setControlValue(value: SelectOption) {\n if (this.control() && value) {\n // sets the initial value on the control if one is passed\n this.control().setValue(value.value || '');\n this.autocompleteInputControl.setValue(value.label || '');\n }\n }\n\n /**\n * The material autocomplete defaults to displaying the options value instead of its label.\n * We only have the value from the selected option to work with, so we have to pass the options\n * through a function called in the template and return the function that the material displayWith\n * input is expecting.\n * @param options the array of options to search for option with corresponding value\n */\n displayLabel(options: SelectOption[]) {\n if (this.config().displayWith) {\n return this.config().displayWith(options);\n }\n return (value: any) => {\n const label: string =\n !!options && Array.isArray(options)\n ? options.find(\n (option) => JSON.stringify(option.value) === JSON.stringify(value)\n )?.label\n : value;\n return label;\n };\n }\n\n handleSelect(event: MatAutocompleteSelectedEvent) {\n this.control().setValue(event.option.value);\n this.autoInputRef.nativeElement.blur();\n }\n}\n","\n<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n\n <mat-form-field\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n\n <input class=\"hidden-error-directive-anchor\" [formControlName]=\"config().controlName\" type=\"text\"/>\n\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config().placeholder\"\n [matAutocomplete]=\"auto\"\n role=\"textbox\"\n type=\"textbox\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n #autoInput>\n\n @if (config().fieldSuffix) {<span matSuffix>{{config().fieldSuffix}}</span>}\n @if (config().info) {<crispr-info matSuffix [info]=\"config().info \"></crispr-info>}\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"config().autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"displayLabel(options$ | async)\">\n\n @if (options$ | async; as options) {\n @if (options.length > 0) {\n @for (option of options; track option) {\n <mat-option\n [value]=\"option.value\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n } @else {\n <mat-option disabled=\"true\">\n {{config().emptyOptionsMessage}}\n </mat-option>\n }\n </mat-autocomplete>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n"],"names":["i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAgCA,MAAM,aAAa,GAAqC;AACtD,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,gBAAgB,EAAE,GAAG;AACrB,IAAA,mBAAmB,EAAE,6BAA6B;CACnD;AAoBK,MAAO,0BACX,SAAQ,6BAAsD,CAAA;AAnBhE,IAAA,WAAA,GAAA;;QAsBE,IAAA,CAAA,aAAa,GAAG,aAAa;AAuD9B,IAAA;IAhDC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE;AAChB,QAAA,IAAI,CAAC,sBAAsB;YACzB,IAAI,CAAC,wBAAwB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,IAAY,KAAI;AACpE,gBAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;oBACnD,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;gBAC/B;AACF,YAAA,CAAC,CAAC;IACN;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,sBAAsB,CAAC,WAAW,EAAE;IAC3C;AAEA,IAAA,eAAe,CAAC,KAAmB,EAAA;AACjC,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,KAAK,EAAE;;AAE3B,YAAA,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;YAC1C,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;QAC3D;IACF;AAEA;;;;;;AAMG;AACH,IAAA,YAAY,CAAC,OAAuB,EAAA;AAClC,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,WAAW,EA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QAAA,EAAA,sCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;2FAItB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAlBtC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,EAAA,eAAA,EAGpB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACL,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,mBAAmB;wBACnB,uBAAuB;wBACvB,qBAAqB;wBACrB,cAAc;wBACd,eAAe;wBACf,2BAA2B;AAC9B,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,k1DAAA,EAAA,MAAA,EAAA,CAAA,gDAAA,CAAA,EAAA;;sBAOjB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;;sBAEvD,SAAS;uBAAC,WAAW;;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/material/slider';
|
|
4
|
+
import { MatSliderModule } from '@angular/material/slider';
|
|
5
|
+
import * as i1 from '@angular/forms';
|
|
6
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import { CrisprControlComponent, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
|
|
8
|
+
|
|
9
|
+
/* eslint-disable @nx/enforce-module-boundaries */
|
|
10
|
+
const defaultConfig = {
|
|
11
|
+
displayLimits: true,
|
|
12
|
+
displayWith: (val) => val,
|
|
13
|
+
};
|
|
14
|
+
class SliderFieldComponent extends CrisprControlComponent {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.defaultConfig = defaultConfig;
|
|
18
|
+
}
|
|
19
|
+
ngOnInit() {
|
|
20
|
+
super.ngOnInit();
|
|
21
|
+
}
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SliderFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: SliderFieldComponent, isStandalone: true, selector: "crispr-slider-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n @if (config().label) {\n <label>\n {{config().label}}\n @if (config().info) {\n <crispr-info\n [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n }\n <div class=\"slider-container\">\n @if (config().displayLimits) {\n <span>\n {{config().min}}\n </span>\n }\n <mat-slider\n [discrete]=\"config().discrete\"\n [displayWith]=\"config().displayWith\"\n class=\"example-margin\"\n [formGroup]=\"group()\"\n [max]=\"config().max\"\n [min]=\"config().min\"\n [step]=\"config().step\">\n <input matSliderThumb\n [formControlName]=\"config().controlName\">\n </mat-slider>\n @if (config().displayLimits) {\n <span>\n {{config().max}}\n </span>\n }\n </div>\n\n</crispr-field-container>\n\n", styles: [".slider-container{display:flex;align-items:center}.slider-container mat-slider{flex:1}\n"], dependencies: [{ kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatSliderModule }, { kind: "component", type: i2.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i2.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: SliderFieldComponent, decorators: [{
|
|
26
|
+
type: Component,
|
|
27
|
+
args: [{ selector: 'crispr-slider-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
28
|
+
InfoComponent,
|
|
29
|
+
FieldContainerComponent,
|
|
30
|
+
ReactiveFormsModule,
|
|
31
|
+
MatSliderModule
|
|
32
|
+
], standalone: true, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n @if (config().label) {\n <label>\n {{config().label}}\n @if (config().info) {\n <crispr-info\n [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n }\n <div class=\"slider-container\">\n @if (config().displayLimits) {\n <span>\n {{config().min}}\n </span>\n }\n <mat-slider\n [discrete]=\"config().discrete\"\n [displayWith]=\"config().displayWith\"\n class=\"example-margin\"\n [formGroup]=\"group()\"\n [max]=\"config().max\"\n [min]=\"config().min\"\n [step]=\"config().step\">\n <input matSliderThumb\n [formControlName]=\"config().controlName\">\n </mat-slider>\n @if (config().displayLimits) {\n <span>\n {{config().max}}\n </span>\n }\n </div>\n\n</crispr-field-container>\n\n", styles: [".slider-container{display:flex;align-items:center}.slider-container mat-slider{flex:1}\n"] }]
|
|
33
|
+
}], ctorParameters: () => [] });
|
|
34
|
+
|
|
35
|
+
export { SliderFieldComponent };
|
|
36
|
+
//# sourceMappingURL=tft-crispr-forms-index-BHv9E1Y2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tft-crispr-forms-index-BHv9E1Y2.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/slider-field/slider-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/slider-field/slider-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { MatSliderModule } from '@angular/material/slider';\n\nimport { ReactiveFormsModule } from '@angular/forms';\n// import { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n SliderFieldConfig\n} from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\nconst defaultConfig: Partial<SliderFieldConfig> = { \n displayLimits: true,\n displayWith: (val) => val,\n};\n\n\n@Component({\n selector: 'crispr-slider-field',\n templateUrl: './slider-field.component.html',\n styleUrls: ['./slider-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n InfoComponent,\n FieldContainerComponent,\n ReactiveFormsModule,\n MatSliderModule\n ],\n standalone: true\n})\nexport class SliderFieldComponent extends CrisprControlComponent<SliderFieldConfig> implements OnInit {\n defaultConfig = defaultConfig;\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n @if (config().label) {\n <label>\n {{config().label}}\n @if (config().info) {\n <crispr-info\n [info]=\"config().info\">\n </crispr-info>\n }\n </label>\n }\n <div class=\"slider-container\">\n @if (config().displayLimits) {\n <span>\n {{config().min}}\n </span>\n }\n <mat-slider\n [discrete]=\"config().discrete\"\n [displayWith]=\"config().displayWith\"\n class=\"example-margin\"\n [formGroup]=\"group()\"\n [max]=\"config().max\"\n [min]=\"config().min\"\n [step]=\"config().step\">\n <input matSliderThumb\n [formControlName]=\"config().controlName\">\n </mat-slider>\n @if (config().displayLimits) {\n <span>\n {{config().max}}\n </span>\n }\n </div>\n\n</crispr-field-container>\n\n"],"names":[],"mappings":";;;;;;;;AAAA;AAaA,MAAM,aAAa,GAA+B;AAChD,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG;CAC1B;AAgBK,MAAO,oBAAqB,SAAQ,sBAAyC,CAAA;AAEjF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;QAFT,IAAA,CAAA,aAAa,GAAG,aAAa;IAG7B;IAEA,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE;IAClB;8GARW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChCjC,k5BAuCA,EAAA,MAAA,EAAA,CAAA,0FAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDdQ,aAAa,0EACb,uBAAuB,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,OAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACvB,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EA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AAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;2FAIV,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAAA,eAAA,EAGd,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACL,aAAa;wBACb,uBAAuB;wBACvB,mBAAmB;wBACnB;AACH,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,k5BAAA,EAAA,MAAA,EAAA,CAAA,0FAAA,CAAA,EAAA;;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/datepicker';
|
|
4
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
5
|
+
import { MatDateFnsModule } from '@angular/material-date-fns-adapter';
|
|
6
|
+
import { of } from 'rxjs';
|
|
7
|
+
import * as i5 from '@angular/cdk/portal';
|
|
8
|
+
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
9
|
+
import * as i2 from '@angular/material/form-field';
|
|
10
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
+
import * as i1$2 from '@angular/common';
|
|
12
|
+
import { CommonModule } from '@angular/common';
|
|
13
|
+
import * as i1$1 from '@angular/forms';
|
|
14
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
15
|
+
import * as i3 from '@angular/material/input';
|
|
16
|
+
import { MatInputModule } from '@angular/material/input';
|
|
17
|
+
import * as i6 from '@tft/form-validation-handler';
|
|
18
|
+
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
19
|
+
import { CrisprControlComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
|
|
20
|
+
|
|
21
|
+
/* eslint-disable @nx/enforce-module-boundaries */
|
|
22
|
+
const defaultConfig = {
|
|
23
|
+
startView: 'month',
|
|
24
|
+
};
|
|
25
|
+
class DatepickerFieldComponent extends CrisprControlComponent {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.defaultConfig = defaultConfig;
|
|
29
|
+
}
|
|
30
|
+
ngOnInit() {
|
|
31
|
+
super.ngOnInit();
|
|
32
|
+
const config = this.config();
|
|
33
|
+
this.startAt$ =
|
|
34
|
+
config.startAt instanceof Date
|
|
35
|
+
? of(config.startAt)
|
|
36
|
+
: config.startAt instanceof Function
|
|
37
|
+
? config.startAt(this.group())
|
|
38
|
+
: of(null);
|
|
39
|
+
this.dateClass = config?.cellClassFunction || null;
|
|
40
|
+
this.dateClass$ = config.dateClass
|
|
41
|
+
? config?.dateClass(this.group())
|
|
42
|
+
: of(() => '');
|
|
43
|
+
}
|
|
44
|
+
ngAfterContentInit() {
|
|
45
|
+
if (this.config().datepickerActions) {
|
|
46
|
+
this.calendarFooterPortal = new ComponentPortal(this.config().datepickerActions);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DatepickerFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
50
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: DatepickerFieldComponent, isStandalone: true, selector: "crispr-datepicker-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <input\n matInput\n [formControlName]=\"config().controlName\"\n [min]=\"config().min\"\n [max]=\"config().max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config().datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config().touchUi\"\n [startView]=\"config().startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n @if (calendarFooterPortal) {\n <mat-datepicker-actions>\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i1.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: 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: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDateFnsModule }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i5.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i6.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i6.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DatepickerFieldComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{ selector: 'crispr-datepicker-field', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
55
|
+
CommonModule,
|
|
56
|
+
FieldContainerComponent,
|
|
57
|
+
MatDatepickerModule,
|
|
58
|
+
MatFormFieldModule,
|
|
59
|
+
ReactiveFormsModule,
|
|
60
|
+
MatInputModule,
|
|
61
|
+
MatDateFnsModule,
|
|
62
|
+
PortalModule,
|
|
63
|
+
FormValidationHandlerModule,
|
|
64
|
+
], standalone: true, template: "<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <input\n matInput\n [formControlName]=\"config().controlName\"\n [min]=\"config().min\"\n [max]=\"config().max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config().datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config().touchUi\"\n [startView]=\"config().startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n @if (calendarFooterPortal) {\n <mat-datepicker-actions>\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n\n" }]
|
|
65
|
+
}] });
|
|
66
|
+
|
|
67
|
+
export { DatepickerFieldComponent };
|
|
68
|
+
//# sourceMappingURL=tft-crispr-forms-index-BIhGbdgn.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tft-crispr-forms-index-BIhGbdgn.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/datepicker-field/datepicker-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/datepicker-field/datepicker-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n AfterContentInit,\n} from '@angular/core';\nimport {\n MatCalendarCellClassFunction,\n MatDatepickerModule,\n} from '@angular/material/datepicker';\nimport { MatDateFnsModule } from '@angular/material-date-fns-adapter';\nimport { Observable, of } from 'rxjs';\nimport { ComponentPortal, Portal, PortalModule } from '@angular/cdk/portal';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n DatepickerFieldConfig,\n} from '../../utils';\nimport { CrisprControlComponent } from '../../utils/abstracts/crispr-control.abstract';\n\nconst defaultConfig: Partial<DatepickerFieldConfig> = {\n startView: 'month',\n};\n\n@Component({\n selector: 'crispr-datepicker-field',\n templateUrl: './datepicker-field.component.html',\n styleUrls: ['./datepicker-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FieldContainerComponent,\n MatDatepickerModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatInputModule,\n MatDateFnsModule,\n PortalModule,\n FormValidationHandlerModule,\n ],\n standalone: true\n})\nexport class DatepickerFieldComponent\n extends CrisprControlComponent<DatepickerFieldConfig>\n implements OnInit, AfterContentInit\n{\n defaultConfig = defaultConfig;\n\n dateClass: MatCalendarCellClassFunction<Date>;\n dateClass$: Observable<MatCalendarCellClassFunction<Date>>;\n startAt$: Observable<Date>;\n\n /** A portal containing the footer component type for this calendar. */\n calendarFooterPortal: Portal<any>;\n\n ngOnInit() {\n super.ngOnInit();\n const config = this.config();\n this.startAt$ =\n config.startAt instanceof Date\n ? of(config.startAt)\n : config.startAt instanceof Function\n ? config.startAt(this.group())\n : of(null);\n this.dateClass = config?.cellClassFunction || null;\n this.dateClass$ = config.dateClass\n ? config?.dateClass(this.group())\n : of(() => '');\n }\n\n ngAfterContentInit() {\n if (this.config().datepickerActions) {\n this.calendarFooterPortal = new ComponentPortal(\n this.config().datepickerActions\n );\n }\n }\n\n // handleSelectedChange(event, picker: MatDatepicker<unknown>) {\n // console.log({event, picker})\n // if(this.config.selectedChange) {\n // this.config.selectedChange(event, picker);\n // }\n // }\n}\n","<crispr-field-container\n [config]=\"config()\"\n [group]=\"group()\">\n <mat-form-field\n [color]=\"config().color\"\n [appearance]=\"config().appearance\"\n [formGroup]=\"group()\">\n @if (config().label) {<mat-label>{{config().label}}</mat-label>}\n <input\n matInput\n [formControlName]=\"config().controlName\"\n [min]=\"config().min\"\n [max]=\"config().max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config().datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config().touchUi\"\n [startView]=\"config().startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n @if (calendarFooterPortal) {\n <mat-datepicker-actions>\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n\n @if (config().hint && (control().valid || !control().touched)) {<mat-hint>{{config().hint}}</mat-hint>}\n\n </mat-form-field>\n</crispr-field-container>\n\n"],"names":["i4","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAyBA,MAAM,aAAa,GAAmC;AACpD,IAAA,SAAS,EAAE,OAAO;CACnB;AAoBK,MAAO,wBACX,SAAQ,sBAA6C,CAAA;AAnBvD,IAAA,WAAA,GAAA;;QAsBE,IAAA,CAAA,aAAa,GAAG,aAAa;AAsC9B,IAAA;IA7BC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE;AAChB,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE;AAC5B,QAAA,IAAI,CAAC,QAAQ;YACX,MAAM,CAAC,OAAO,YAAY;AACxB,kBAAE,EAAE,CAAC,MAAM,CAAC,OAAO;AACnB,kBA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