@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-cdo59qhx.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { map, tap } from 'rxjs/operators';\nimport {\n MatAutocompleteModule,\n MatAutocompleteSelectedEvent,\n MatAutocompleteTrigger,\n} from '@angular/material/autocomplete';\nimport { Observable, BehaviorSubject, combineLatest } from 'rxjs';\nimport { ENTER } from '@angular/cdk/keycodes';\n\nimport { MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatOptionModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { OptionComponent } from '../option';\nimport { MatIconModule } from '@angular/material/icon';\nimport {\n AutocompleteChiplistFieldConfig,\n AbstractAutocompleteComponent,\n DEFAULT_EMPTY_OPTIONS_MESSAGE,\n SelectOption,\n} from '../../utils';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n\nconst defaultConfig: Partial<AutocompleteChiplistFieldConfig> = {\n chipsSelectable: true,\n areChipsRemovable: true,\n tabToSelect: true,\n autoActiveFirstOption: true,\n imageUrlParam: 'image',\n typeDebounceTime: 500,\n allowDuplicates: false,\n duplicateCompareFunction: (chip, option) => chip.value === option.value,\n separatorKeyCodes: [ENTER],\n emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,\n};\n\n@Component({\n selector: 'crispr-autocomplete-chiplist-field',\n templateUrl: './autocomplete-chiplist-field.component.html',\n styleUrls: ['./autocomplete-chiplist-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatAutocompleteModule,\n MatInputModule,\n MatOptionModule,\n MatChipsModule,\n MatIconModule,\n FormValidationHandlerModule,\n ],\n})\nexport class AutocompleteChiplistFieldComponent\n extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig>\n implements OnInit\n{\n defaultConfig = defaultConfig;\n chips$ = new BehaviorSubject<SelectOption[]>([]);\n remainingOptions$: Observable<SelectOption[]>;\n selectedChip: SelectOption = null;\n controlValue$ = this.chips$.pipe(\n tap((chips) => {\n this.control.setValue(chips.map((chip) => chip.value));\n })\n );\n\n // We need use ViewChild twice on the same template ref to access as different types\n // - the MatAutocompleteTrigger is used to for selecting value on tab\n // - the ElementRef<HTMLInputElement> is used to clear the value from input element on selection\n @ViewChild('autoInput', { read: MatAutocompleteTrigger })\n chipInput: MatAutocompleteTrigger;\n @ViewChild('autoInput') chipInputRef: ElementRef<HTMLInputElement>;\n\n ngOnInit() {\n super.ngOnInit();\n this.remainingOptions$ = combineLatest([this.chips$, this.options$]).pipe(\n map(([chips, options]) => {\n return this.config.allowDuplicates\n ? options\n : options?.filter((option) => {\n return !chips.some((chip) =>\n this.config.duplicateCompareFunction(chip, option)\n );\n });\n })\n );\n }\n\n setControlValue(value: SelectOption[]) {\n if (value) {\n this.chips$.next(value);\n }\n }\n\n // handles mat selecting\n handleSelect(event: MatAutocompleteSelectedEvent) {\n const selectedOption: SelectOption = event.option.value as SelectOption;\n this.chips$.next([...this.chips$.value, selectedOption]);\n this.chipInputRef.nativeElement.value = '';\n this.autocompleteInputControl.setValue('');\n // setTimeout needed because the panel thinks it's still open at this point\n setTimeout(() => this.chipInput.openPanel());\n }\n\n /**\n * To follow ARIA standards we want to select the active option on blur.\n * matChipInputAddOnBlur should do this but it causes buggy behaviour\n * @param event blur event that triggers the handle blur\n */\n handleTab(_event: FocusEvent) {\n if (\n this.chipInput.activeOption &&\n (this.config.tabToSelect || this.config.addChipOnBlur)\n ) {\n const chip = this.chipInput.activeOption.value;\n this.chips$.next([...this.chips$.value, chip]);\n }\n }\n\n /**\n * Handles selection via key tokens passed through separatorKeyCodes property\n * NOTE: If TAB is used focus does not move on to next component\n * @param event\n */\n handleTokenEnd(event: MatChipInputEvent) {\n if (this.chipInput.activeOption) {\n this.chipInput.activeOption.select();\n }\n event.chipInput?.clear();\n }\n\n mapToLabel(option: SelectOption) {\n return option ? option.label : '';\n }\n\n removeChip(removedChip: SelectOption) {\n const remainingChips: SelectOption[] = this.chips$.value.filter(\n (chip) => chip !== removedChip\n );\n this.chips$.next(remainingChips);\n }\n\n highlightChip(chip: SelectOption) {\n if(this.config.chipsSelectable) {\n this.selectedChip = chip\n }\n }\n \n blurField() {\n console.log('blur')\n this.selectedChip = null;\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n\n <mat-chip-grid\n #chipList>\n <!-- [selectable]=\"config.chipsSelectable\" -->\n <mat-chip-row\n class=\"refinement-chip\"\n *ngFor=\"let chip of controlValue$ | async; let i = index\"\n [removable]=\"config.areChipsRemovable\"\n [highlighted]=\"chip?.value === selectedChip?.value\"\n (click)=\"highlightChip(chip)\"\n (removed)=\"removeChip(chip)\">\n <span *ngIf=\"chip.imageUrl as imageUrl\" class=\"image-container\">\n <img [src]=\"imageUrl\" alt=\"image of {{chip.label}}\">\n </span>\n {{chip.label}}\n <mat-icon\n matChipRemove\n *ngIf=\"config.areChipsRemovable\">\n cancel\n </mat-icon>\n </mat-chip-row>\n <input class=\"hidden-error-directive-anchor\" (blur)=\"blurField()\"\n [formControlName]=\"config.controlName\" type=\"text\"/>\n\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config.placeholder\"\n [matChipInputFor]=\"chipList\"\n [matAutocomplete]=\"auto\"\n (keydown.tab)=\"handleTab($event)\"\n [matChipInputSeparatorKeyCodes]=\"config.separatorKeyCodes\"\n (matChipInputTokenEnd)=\"handleTokenEnd($event)\"\n role=\"searchbox\"\n type=\"text\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n (blur)=\"blurField()\"\n #autoInput/>\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info \">\n </crispr-info>\n\n </mat-chip-grid>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"this.config.autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"mapToLabel\">\n <ng-container *ngIf=\"remainingOptions$ | async as remainingOptions; else emptyOption\">\n <ng-container *ngIf=\"remainingOptions.length > 0; else emptyOption\">\n <mat-option\n *ngFor=\"let option of remainingOptions$ | async\"\n [value]=\"option\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n </ng-container>\n\n </ng-container>\n <ng-template #emptyOption>\n <mat-option disabled=\"true\">\n {{config.emptyOptionsMessage}}\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n</crispr-field-container>\n"],"names":["i6","i8","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAkCA,MAAM,aAAa,GAA6C;AAC9D,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,gBAAgB,EAAE,GAAG;AACrB,IAAA,eAAe,E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|
3
|
-
import * as i5 from '@angular/material/input';
|
|
4
|
-
import { MatInputModule } from '@angular/material/input';
|
|
5
|
-
import * as i1 from '@angular/common';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
-
import * as i2 from '@angular/forms';
|
|
8
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
-
import * as i3 from '@angular/material/form-field';
|
|
10
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
11
|
-
import * as i7 from '@tft/form-validation-handler';
|
|
12
|
-
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
13
|
-
import { crisprControlMixin, CrisprFieldComponent, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
|
|
14
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
15
|
-
import 'rxjs';
|
|
16
|
-
import 'rxjs/operators';
|
|
17
|
-
import '@angular/material/button';
|
|
18
|
-
import '@angular/material/tooltip';
|
|
19
|
-
import '@angular/material/progress-bar';
|
|
20
|
-
|
|
21
|
-
/* eslint-disable @nx/enforce-module-boundaries */
|
|
22
|
-
const InputFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
23
|
-
class InputFieldComponent extends InputFieldMixin {
|
|
24
|
-
constructor() {
|
|
25
|
-
super();
|
|
26
|
-
this.defaultConfig = { inputType: 'text' };
|
|
27
|
-
}
|
|
28
|
-
ngOnInit() {
|
|
29
|
-
super.ngOnInit();
|
|
30
|
-
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: InputFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: InputFieldComponent, isStandalone: true, selector: "crispr-input-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 <mat-label>\n {{config.label}}\n </mat-label>\n <input\n [type]=\"config.inputType\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [maxlength]=\"config.maxLength\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\"\n [pattern]=\"config.pattern\"\n [spellcheck]=\"config.spellcheck\"\n [autocomplete]=\"config.autoComplete\"\n [autocapitalize]=\"config.autoCapitalize\">\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n matSuffix\n *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n\n</crispr-field-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "ngmodule", type: MatIconModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
33
|
-
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: InputFieldComponent, decorators: [{
|
|
35
|
-
type: Component,
|
|
36
|
-
args: [{ selector: 'crispr-input-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
37
|
-
CommonModule,
|
|
38
|
-
InfoComponent,
|
|
39
|
-
ReactiveFormsModule,
|
|
40
|
-
FieldContainerComponent,
|
|
41
|
-
MatFormFieldModule,
|
|
42
|
-
MatInputModule,
|
|
43
|
-
FormValidationHandlerModule,
|
|
44
|
-
MatIconModule
|
|
45
|
-
], 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 <mat-label>\n {{config.label}}\n </mat-label>\n <input\n [type]=\"config.inputType\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [maxlength]=\"config.maxLength\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\"\n [pattern]=\"config.pattern\"\n [spellcheck]=\"config.spellcheck\"\n [autocomplete]=\"config.autoComplete\"\n [autocapitalize]=\"config.autoCapitalize\">\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n matSuffix\n *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n\n</crispr-field-container>\n" }]
|
|
46
|
-
}], ctorParameters: () => [] });
|
|
47
|
-
|
|
48
|
-
export { InputFieldComponent };
|
|
49
|
-
//# sourceMappingURL=tft-crispr-forms-index-kJUZksiq.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-kJUZksiq.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/input-field/input-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n InputFieldConfig,\n crisprControlMixin,\n CrisprFieldComponent,\n} from '../../utils';\nimport { MatIconModule } from '@angular/material/icon';\n\nconst InputFieldMixin =\n crisprControlMixin<InputFieldConfig>(CrisprFieldComponent);\n@Component({\n selector: 'crispr-input-field',\n templateUrl: './input-field.component.html',\n styleUrls: ['./input-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatFormFieldModule,\n MatInputModule,\n FormValidationHandlerModule,\n MatIconModule\n ],\n})\nexport class InputFieldComponent extends InputFieldMixin implements OnInit {\n\n defaultConfig: Partial<InputFieldConfig> = {inputType: 'text'};\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label>\n {{config.label}}\n </mat-label>\n <input\n [type]=\"config.inputType\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [maxlength]=\"config.maxLength\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\"\n [pattern]=\"config.pattern\"\n [spellcheck]=\"config.spellcheck\"\n [autocomplete]=\"config.autoComplete\"\n [autocapitalize]=\"config.autoCapitalize\">\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n matSuffix\n *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n\n</crispr-field-container>\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAgBA,MAAM,eAAe,GACnB,kBAAkB,CAAmB,oBA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OAAA,EAAA,IAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,+CAAA,EAAA,MAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAClB,cAAc,EACd,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,yHAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,2BAA2B,sPAC3B,aAAa,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAjB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,mBAGb,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,cAAc;wBACd,2BAA2B;wBAC3B,aAAa;AACd,qBAAA,EAAA,QAAA,EAAA,0kCAAA,EAAA,CAAA;;;;;"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';
|
|
3
|
-
import * as i4 from '@angular/material/select';
|
|
4
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
5
|
-
import * as i1 from '@angular/common';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
-
import * as i2 from '@angular/material/checkbox';
|
|
8
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
9
|
-
import * as i2$1 from '@angular/forms';
|
|
10
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
11
|
-
import * as i3 from '@angular/material/form-field';
|
|
12
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
13
|
-
import { O as OptionComponent } from './tft-crispr-forms-index-BC1uV7T_.mjs';
|
|
14
|
-
import * as i7 from '@tft/form-validation-handler';
|
|
15
|
-
import { FormValidationHandlerModule } from '@tft/form-validation-handler';
|
|
16
|
-
import { crisprControlMixin, CrisprFieldComponent, observablifyOptions, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
|
|
17
|
-
import * as i4$1 from '@angular/material/core';
|
|
18
|
-
import 'rxjs';
|
|
19
|
-
import 'rxjs/operators';
|
|
20
|
-
import '@angular/material/button';
|
|
21
|
-
import '@angular/material/icon';
|
|
22
|
-
import '@angular/material/input';
|
|
23
|
-
import '@angular/material/tooltip';
|
|
24
|
-
import '@angular/material/progress-bar';
|
|
25
|
-
|
|
26
|
-
/* eslint-disable @nx/enforce-module-boundaries */
|
|
27
|
-
const SelectFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
28
|
-
class SelectFieldComponent extends SelectFieldMixin {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
this.defaultConfig = {
|
|
32
|
-
enableToggleAll: false,
|
|
33
|
-
color: 'primary',
|
|
34
|
-
};
|
|
35
|
-
this.allSelected = false;
|
|
36
|
-
}
|
|
37
|
-
ngOnInit() {
|
|
38
|
-
super.ngOnInit();
|
|
39
|
-
// options$ can be passed as an array, promise that resolves array, or observable that resolves array
|
|
40
|
-
// this functions accounts for all possibilities and converts to observable that resolves array
|
|
41
|
-
this.options$ = observablifyOptions(this.config.options, this.group);
|
|
42
|
-
}
|
|
43
|
-
ngAfterViewInit() {
|
|
44
|
-
if (this.config.multiple &&
|
|
45
|
-
this.config.enableToggleAll &&
|
|
46
|
-
this.selectField.options?.length === this.value?.length) {
|
|
47
|
-
this.allSelected = true;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
toggleAll(isSelected) {
|
|
51
|
-
if (isSelected) {
|
|
52
|
-
this.selectField.options.forEach((option) => option.deselect());
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
this.selectField.options.forEach((option) => option.select());
|
|
56
|
-
}
|
|
57
|
-
this.allSelected = !this.allSelected;
|
|
58
|
-
}
|
|
59
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
60
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: SelectFieldComponent, isStandalone: true, selector: "crispr-select-field", viewQueries: [{ propertyName: "selectField", first: true, predicate: ["selectField"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControlName]=\"config.controlName\"\n [placeholder]=\"config.placeholder\"\n [multiple]=\"config.multiple\">\n\n <mat-checkbox\n [color]=\"config.color\"\n [checked]=\"allSelected\"\n *ngIf=\"config?.multiple && config.enableToggleAll\"\n (click)=\"toggleAll(allSelected)\">\n Select All\n </mat-checkbox>\n <mat-option\n *ngFor=\"let option of options$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\n\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n", styles: ["mat-checkbox{display:block;padding:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "component", type: OptionComponent, selector: "crispr-option", inputs: ["option"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatFormFieldModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
|
|
61
|
-
}
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: SelectFieldComponent, decorators: [{
|
|
63
|
-
type: Component,
|
|
64
|
-
args: [{ selector: 'crispr-select-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
65
|
-
CommonModule,
|
|
66
|
-
InfoComponent,
|
|
67
|
-
OptionComponent,
|
|
68
|
-
MatCheckboxModule,
|
|
69
|
-
MatSelectModule,
|
|
70
|
-
ReactiveFormsModule,
|
|
71
|
-
FormValidationHandlerModule,
|
|
72
|
-
FieldContainerComponent,
|
|
73
|
-
MatFormFieldModule,
|
|
74
|
-
], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControlName]=\"config.controlName\"\n [placeholder]=\"config.placeholder\"\n [multiple]=\"config.multiple\">\n\n <mat-checkbox\n [color]=\"config.color\"\n [checked]=\"allSelected\"\n *ngIf=\"config?.multiple && config.enableToggleAll\"\n (click)=\"toggleAll(allSelected)\">\n Select All\n </mat-checkbox>\n <mat-option\n *ngFor=\"let option of options$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\n\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n", styles: ["mat-checkbox{display:block;padding:16px}\n"] }]
|
|
75
|
-
}], propDecorators: { selectField: [{
|
|
76
|
-
type: ViewChild,
|
|
77
|
-
args: ['selectField']
|
|
78
|
-
}] } });
|
|
79
|
-
|
|
80
|
-
export { SelectFieldComponent };
|
|
81
|
-
//# sourceMappingURL=tft-crispr-forms-index-xbMIxY3P.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tft-crispr-forms-index-xbMIxY3P.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/select-field/select-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/select-field/select-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewChild,\n AfterViewInit,\n} from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { MatSelect, MatSelectModule } from '@angular/material/select';\nimport { ThemePalette } from '@angular/material/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { OptionComponent } from '../option';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { InfoComponent } from '../info';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n observablifyOptions,\n CrisprFieldComponent,\n crisprControlMixin,\n SelectFieldConfig,\n SelectOption,\n} from '../../utils';\n\nconst SelectFieldMixin =\n crisprControlMixin<SelectFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-select-field',\n templateUrl: './select-field.component.html',\n styleUrls: ['./select-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n MatCheckboxModule,\n MatSelectModule,\n ReactiveFormsModule,\n FormValidationHandlerModule,\n FieldContainerComponent,\n MatFormFieldModule,\n ],\n})\nexport class SelectFieldComponent\n extends SelectFieldMixin\n implements OnInit, AfterViewInit\n{\n defaultConfig = {\n enableToggleAll: false,\n color: 'primary' as ThemePalette,\n };\n options$: Observable<SelectOption[]>;\n allSelected = false;\n\n @ViewChild('selectField') selectField: MatSelect;\n\n ngOnInit() {\n super.ngOnInit();\n // options$ can be passed as an array, promise that resolves array, or observable that resolves array\n // this functions accounts for all possibilities and converts to observable that resolves array\n this.options$ = observablifyOptions(this.config.options, this.group);\n }\n\n ngAfterViewInit() {\n if (\n this.config.multiple &&\n this.config.enableToggleAll &&\n this.selectField.options?.length === (this.value as any[])?.length\n ) {\n this.allSelected = true;\n }\n }\n\n toggleAll(isSelected: boolean) {\n if (isSelected) {\n this.selectField.options.forEach((option) => option.deselect());\n } else {\n this.selectField.options.forEach((option) => option.select());\n }\n this.allSelected = !this.allSelected;\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControlName]=\"config.controlName\"\n [placeholder]=\"config.placeholder\"\n [multiple]=\"config.multiple\">\n\n <mat-checkbox\n [color]=\"config.color\"\n [checked]=\"allSelected\"\n *ngIf=\"config?.multiple && config.enableToggleAll\"\n (click)=\"toggleAll(allSelected)\">\n Select All\n </mat-checkbox>\n <mat-option\n *ngFor=\"let option of options$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\n\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n"],"names":["i6"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA4BA,MAAM,gBAAgB,GACpB,kBAAkB,CAAoB,oBAAoB,CAAC,CAAC;AAoBxD,MAAO,oBACX,SAAQ,gBAAgB,CAAA;AAnB1B,IAAA,WAAA,GAAA;;AAsBE,QAAA,IAAA,CAAA,aAAa,GAAG;AACd,YAAA,eAAe,EAAE,KAAK;AACtB,YAAA,KAAK,EAAE,SAAyB;SACjC,CAAC;QAEF,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AA6BrB,KAAA;IAzBC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;;;AAGjB,QAAA,IAAI,CAAC,QAAQ,GAAG,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KACtE;IAED,eAAe,GAAA;AACb,QAAA,IACE,IAAI,CAAC,MAAM,CAAC,QAAQ;YACpB,IAAI,CAAC,MAAM,CAAC,eAAe;AAC3B,YAAA,I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AAA,MAAA,EAAA,CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACnB,2BAA2B,EAC3B,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,8GACvB,kBAAkB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAlBhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,mBAGd,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,iBAAiB;wBACjB,eAAe;wBACf,mBAAmB;wBACnB,2BAA2B;wBAC3B,uBAAuB;wBACvB,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,uuCAAA,EAAA,MAAA,EAAA,CAAA,4CAAA,CAAA,EAAA,CAAA;8BAayB,WAAW,EAAA,CAAA;sBAApC,SAAS;uBAAC,aAAa,CAAA;;;;;"}
|
package/index.d.ts
DELETED
package/public-api.d.ts
DELETED
package/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/public_api';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@angular/common";
|
|
3
|
-
import * as i2 from "@angular/forms";
|
|
4
|
-
import * as i3 from "@tft/form-validation-handler";
|
|
5
|
-
import * as i4 from "./form-group-list/form-group-list.component";
|
|
6
|
-
import * as i5 from "./ui/field-container/field-container.component";
|
|
7
|
-
import * as i6 from "./field.directive";
|
|
8
|
-
import * as i7 from "./display-field.directive";
|
|
9
|
-
import * as i8 from "./sub-group/sub-group.module";
|
|
10
|
-
import * as i9 from "./pipes/crispr-pipes.module";
|
|
11
|
-
import * as i10 from "./form/form.component";
|
|
12
|
-
export declare class CrisprFormsModule {
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormsModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprFormsModule, never, [typeof i1.CommonModule, typeof i2.ReactiveFormsModule, typeof i3.FormValidationHandlerModule, typeof i4.FormGroupListComponent, typeof i5.FieldContainerComponent, typeof i6.CrisprFieldDirective, typeof i7.CrisprDisplayFieldDirective, typeof i8.SubGroupModule, typeof i9.CrisprPipesModule, typeof i10.CrisprFormComponent], [typeof i10.CrisprFormComponent, typeof i5.FieldContainerComponent]>;
|
|
15
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<CrisprFormsModule>;
|
|
16
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef, OnInit, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { ControlValue } from './utils';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class CrisprDisplayFieldDirective implements OnInit {
|
|
6
|
-
private container;
|
|
7
|
-
private cdr;
|
|
8
|
-
group: FormGroup;
|
|
9
|
-
/**
|
|
10
|
-
* value setter updates the control's value as well
|
|
11
|
-
*/
|
|
12
|
-
_value: ControlValue | any[];
|
|
13
|
-
set value(value: ControlValue | any[]);
|
|
14
|
-
get value(): ControlValue | any[];
|
|
15
|
-
private component;
|
|
16
|
-
index?: number;
|
|
17
|
-
private componentInstance;
|
|
18
|
-
constructor(container: ViewContainerRef, cdr: ChangeDetectorRef);
|
|
19
|
-
ngOnInit(): Promise<void>;
|
|
20
|
-
updateComponentValue(value: ControlValue | any[]): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprDisplayFieldDirective, never>;
|
|
22
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CrisprDisplayFieldDirective, "[crisprDisplayField]", never, { "group": { "alias": "group"; "required": false; }; "value": { "alias": "value"; "required": false; }; "component": { "alias": "component"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { FormGroupListComponent } from './form-group-list/form-group-list.component';
|
|
2
|
-
import type { SubGroupComponent } from './sub-group/sub-group.component';
|
|
3
|
-
import type { HeadingComponent } from './ui';
|
|
4
|
-
import type { ImageUploadFieldComponent } from './ui/image-upload-field';
|
|
5
|
-
import type { DatepickerFieldComponent } from './ui/datepicker-field';
|
|
6
|
-
import type { CheckboxFieldComponent } from './ui/checkbox-field';
|
|
7
|
-
import type { TextareaFieldComponent } from './ui/textarea-field';
|
|
8
|
-
import type { AutocompleteFieldComponent } from './ui/autocomplete-field';
|
|
9
|
-
import type { SelectFieldComponent } from './ui/select-field';
|
|
10
|
-
import type { InputFieldComponent } from './ui/input-field';
|
|
11
|
-
import type { RadioFieldComponent } from './ui/radio-field';
|
|
12
|
-
import type { FileUploadFieldComponent } from './ui/file-upload-field';
|
|
13
|
-
import type { SliderFieldComponent } from './ui/slider-field';
|
|
14
|
-
import type { DividerComponent } from './ui/divider';
|
|
15
|
-
import type { ButtonComponent } from './ui/button';
|
|
16
|
-
import type { UnitConversionFieldComponent } from './ui/unit-conversion-field';
|
|
17
|
-
import type { AutocompleteChiplistFieldComponent } from './ui/autocomplete-chiplist-field';
|
|
18
|
-
import { MapFieldComponent } from './ui/map';
|
|
19
|
-
export declare const FIELD_COMPONENTS: {
|
|
20
|
-
groupList: () => Promise<typeof FormGroupListComponent>;
|
|
21
|
-
subGroup: () => Promise<typeof SubGroupComponent>;
|
|
22
|
-
button: () => Promise<typeof ButtonComponent>;
|
|
23
|
-
input: () => Promise<typeof InputFieldComponent>;
|
|
24
|
-
select: () => Promise<typeof SelectFieldComponent>;
|
|
25
|
-
radio: () => Promise<typeof RadioFieldComponent>;
|
|
26
|
-
autocomplete: () => Promise<typeof AutocompleteFieldComponent>;
|
|
27
|
-
autocompleteChiplist: () => Promise<typeof AutocompleteChiplistFieldComponent>;
|
|
28
|
-
map: () => Promise<typeof MapFieldComponent>;
|
|
29
|
-
textarea: () => Promise<typeof TextareaFieldComponent>;
|
|
30
|
-
checkbox: () => Promise<typeof CheckboxFieldComponent>;
|
|
31
|
-
slider: () => Promise<typeof SliderFieldComponent>;
|
|
32
|
-
datepicker: () => Promise<typeof DatepickerFieldComponent>;
|
|
33
|
-
fileUpload: () => Promise<typeof FileUploadFieldComponent>;
|
|
34
|
-
imageUpload: () => Promise<typeof ImageUploadFieldComponent>;
|
|
35
|
-
heading: () => Promise<typeof HeadingComponent>;
|
|
36
|
-
divider: () => Promise<typeof DividerComponent>;
|
|
37
|
-
unitConversion: () => Promise<typeof UnitConversionFieldComponent>;
|
|
38
|
-
};
|
|
39
|
-
export declare function isControlComponent(component: CrisprFieldComponentType): component is CrisprControlComponentType;
|
|
40
|
-
export declare function isControlOrButtonComponent(component: CrisprFieldComponentType): component is CrisprControlOrButton;
|
|
41
|
-
export type CrisprControlOrButton = CrisprControlComponentType | ButtonComponent;
|
|
42
|
-
export type CrisprControlComponentType = InputFieldComponent | SelectFieldComponent | RadioFieldComponent | SubGroupComponent | FormGroupListComponent | AutocompleteFieldComponent | AutocompleteChiplistFieldComponent | TextareaFieldComponent | CheckboxFieldComponent | SliderFieldComponent | FileUploadFieldComponent | ImageUploadFieldComponent | DatepickerFieldComponent | UnitConversionFieldComponent | MapFieldComponent;
|
|
43
|
-
export type ComponentKeys = keyof typeof FIELD_COMPONENTS;
|
|
44
|
-
export type CrisprFieldComponentType = CrisprControlComponentType | HeadingComponent | DividerComponent | ButtonComponent;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef, Renderer2, OnInit, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { CrisprFieldComponentType } from './field-component-map.const';
|
|
4
|
-
import { AnyFieldConfig, ControlValue } from './utils';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class CrisprFieldDirective implements OnInit {
|
|
7
|
-
private container;
|
|
8
|
-
private renderer;
|
|
9
|
-
private cdr;
|
|
10
|
-
config: AnyFieldConfig;
|
|
11
|
-
group: FormGroup;
|
|
12
|
-
/**
|
|
13
|
-
* value setter updates the control's value as well
|
|
14
|
-
*/
|
|
15
|
-
_value: ControlValue | any[];
|
|
16
|
-
set value(value: ControlValue | any[]);
|
|
17
|
-
get value(): ControlValue | any[];
|
|
18
|
-
component: CrisprFieldComponentType;
|
|
19
|
-
constructor(container: ViewContainerRef, renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
20
|
-
ngOnInit(): Promise<void>;
|
|
21
|
-
updateComponentValue(value: ControlValue | any[]): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFieldDirective, never>;
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CrisprFieldDirective, "[crisprField]", never, { "config": { "alias": "config"; "required": false; }; "group": { "alias": "group"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, ElementRef, OnInit } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { ControlGroupValue, FormConfig } from '../utils';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class CrisprFormComponent implements OnInit {
|
|
7
|
-
config: FormConfig;
|
|
8
|
-
form: FormGroup;
|
|
9
|
-
value: ControlGroupValue;
|
|
10
|
-
submitted: EventEmitter<FormGroup<any>>;
|
|
11
|
-
valueChanges: Observable<any>;
|
|
12
|
-
statusChanges: Observable<string>;
|
|
13
|
-
submitTrigger: ElementRef<HTMLButtonElement>;
|
|
14
|
-
ngOnInit(): void;
|
|
15
|
-
handleSubmit(): void;
|
|
16
|
-
triggerSubmit(): void;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CrisprFormComponent, "crispr-form", never, { "config": { "alias": "config"; "required": false; }; "form": { "alias": "form"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "submitted": "submitted"; "valueChanges": "valueChanges"; "statusChanges": "statusChanges"; }, never, never, true, never>;
|
|
19
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { OnInit, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { FormGroup, FormArray } from '@angular/forms';
|
|
3
|
-
import { FormGroupListConfig } from '../utils';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
declare const FormGroupListMixin: {
|
|
6
|
-
new (): {
|
|
7
|
-
config: FormGroupListConfig;
|
|
8
|
-
group: FormGroup;
|
|
9
|
-
control: import("@angular/forms").AbstractControl;
|
|
10
|
-
_value: import("../utils").ControlValue;
|
|
11
|
-
value: any;
|
|
12
|
-
ngOnInit(): void;
|
|
13
|
-
setControlValue(value: import("../utils").ControlValue): void;
|
|
14
|
-
defaultConfig?: Partial<FormGroupListConfig>;
|
|
15
|
-
applyDefaultConfig(): void;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare class FormGroupListComponent extends FormGroupListMixin implements OnInit {
|
|
19
|
-
private cdr;
|
|
20
|
-
defaultConfig: Partial<FormGroupListConfig>;
|
|
21
|
-
group: FormGroup;
|
|
22
|
-
control: FormArray;
|
|
23
|
-
/**
|
|
24
|
-
* By setting this to true when adding/removing items from array,
|
|
25
|
-
* we can block original values from overwriting form values
|
|
26
|
-
* */
|
|
27
|
-
blockValue: boolean;
|
|
28
|
-
selectedIndex: number;
|
|
29
|
-
constructor(cdr: ChangeDetectorRef);
|
|
30
|
-
ngOnInit(): void;
|
|
31
|
-
setControlValue(values: any[]): void;
|
|
32
|
-
clickDelete(index: number): void;
|
|
33
|
-
clickAdd(): void;
|
|
34
|
-
addGroup(value?: any): void;
|
|
35
|
-
deleteGroup(index: number): void;
|
|
36
|
-
clickEditItem(index: number): void;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupListComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormGroupListComponent, "crispr-form-group-list", never, {}, {}, never, never, true, never>;
|
|
39
|
-
}
|
|
40
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './form-group-list.component';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./initial-control-value.pipe";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
export declare class CrisprPipesModule {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprPipesModule, never>;
|
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprPipesModule, [typeof i1.InitialControlValuePipe], [typeof i2.CommonModule], [typeof i1.InitialControlValuePipe]>;
|
|
7
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<CrisprPipesModule>;
|
|
8
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { ControlValue, AnyFieldConfig } from '../utils';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class InitialControlValuePipe implements PipeTransform {
|
|
5
|
-
transform(initialFormValue: {
|
|
6
|
-
[key: string]: ControlValue | any;
|
|
7
|
-
}, fieldConfig: AnyFieldConfig): unknown;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InitialControlValuePipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<InitialControlValuePipe, "initialControlValue", false>;
|
|
10
|
-
}
|
package/src/lib/public_api.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { SubGroupConfig } from '../utils';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
declare const FormGroupMixin: {
|
|
6
|
-
new (): {
|
|
7
|
-
config: SubGroupConfig;
|
|
8
|
-
group: FormGroup;
|
|
9
|
-
control: import("@angular/forms").AbstractControl;
|
|
10
|
-
_value: import("../utils").ControlValue;
|
|
11
|
-
value: any;
|
|
12
|
-
ngOnInit(): void;
|
|
13
|
-
setControlValue(value: import("../utils").ControlValue): void;
|
|
14
|
-
defaultConfig?: Partial<SubGroupConfig>;
|
|
15
|
-
applyDefaultConfig(): void;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare class SubGroupComponent extends FormGroupMixin implements OnInit {
|
|
19
|
-
group: FormGroup;
|
|
20
|
-
ngOnInit(): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SubGroupComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SubGroupComponent, "crispr-sub-group", never, {}, {}, never, never, false, never>;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./sub-group.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "../field.directive";
|
|
5
|
-
import * as i4 from "../ui/field-container/field-container.component";
|
|
6
|
-
import * as i5 from "../pipes/crispr-pipes.module";
|
|
7
|
-
import * as i6 from "@tft/form-validation-handler";
|
|
8
|
-
export declare class SubGroupModule {
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SubGroupModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SubGroupModule, [typeof i1.SubGroupComponent], [typeof i2.CommonModule, typeof i3.CrisprFieldDirective, typeof i4.FieldContainerComponent, typeof i5.CrisprPipesModule, typeof i6.FormValidationHandlerModule], [typeof i1.SubGroupComponent]>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SubGroupModule>;
|
|
12
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { OnInit, ElementRef } from '@angular/core';
|
|
2
|
-
import { MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
|
|
3
|
-
import { Observable, BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { MatChipInputEvent } from '@angular/material/chips';
|
|
5
|
-
import { AutocompleteChiplistFieldConfig, AbstractAutocompleteComponent, SelectOption } from '../../utils';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class AutocompleteChiplistFieldComponent extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig> implements OnInit {
|
|
8
|
-
defaultConfig: Partial<AutocompleteChiplistFieldConfig>;
|
|
9
|
-
chips$: BehaviorSubject<SelectOption[]>;
|
|
10
|
-
remainingOptions$: Observable<SelectOption[]>;
|
|
11
|
-
selectedChip: SelectOption;
|
|
12
|
-
controlValue$: Observable<SelectOption[]>;
|
|
13
|
-
chipInput: MatAutocompleteTrigger;
|
|
14
|
-
chipInputRef: ElementRef<HTMLInputElement>;
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
setControlValue(value: SelectOption[]): void;
|
|
17
|
-
handleSelect(event: MatAutocompleteSelectedEvent): void;
|
|
18
|
-
/**
|
|
19
|
-
* To follow ARIA standards we want to select the active option on blur.
|
|
20
|
-
* matChipInputAddOnBlur should do this but it causes buggy behaviour
|
|
21
|
-
* @param event blur event that triggers the handle blur
|
|
22
|
-
*/
|
|
23
|
-
handleTab(_event: FocusEvent): void;
|
|
24
|
-
/**
|
|
25
|
-
* Handles selection via key tokens passed through separatorKeyCodes property
|
|
26
|
-
* NOTE: If TAB is used focus does not move on to next component
|
|
27
|
-
* @param event
|
|
28
|
-
*/
|
|
29
|
-
handleTokenEnd(event: MatChipInputEvent): void;
|
|
30
|
-
mapToLabel(option: SelectOption): string;
|
|
31
|
-
removeChip(removedChip: SelectOption): void;
|
|
32
|
-
highlightChip(chip: SelectOption): void;
|
|
33
|
-
blurField(): void;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteChiplistFieldComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteChiplistFieldComponent, "crispr-autocomplete-chiplist-field", never, {}, {}, never, never, true, never>;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public-api';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './autocomplete-chiplist-field.component';
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { OnInit, ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
-
import { MatAutocompleteTrigger, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
3
|
-
import { Subscription } from 'rxjs';
|
|
4
|
-
import { SelectOption, AbstractAutocompleteComponent, AutocompleteFieldConfig } from '../../utils';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class AutocompleteFieldComponent extends AbstractAutocompleteComponent<AutocompleteFieldConfig> implements OnInit, OnDestroy {
|
|
7
|
-
defaultConfig: Partial<AutocompleteFieldConfig>;
|
|
8
|
-
autoInput: MatAutocompleteTrigger;
|
|
9
|
-
autoInputRef: ElementRef<HTMLInputElement>;
|
|
10
|
-
clearFieldSubscription: Subscription;
|
|
11
|
-
ngOnInit(): void;
|
|
12
|
-
ngOnDestroy(): void;
|
|
13
|
-
setControlValue(value: SelectOption): void;
|
|
14
|
-
/**
|
|
15
|
-
* The material autocomplete defaults to displaying the options value instead of its label.
|
|
16
|
-
* We only have the value from the selected option to work with, so we have to pass the options
|
|
17
|
-
* through a function called in the template and return the function that the material displayWith
|
|
18
|
-
* input is expecting.
|
|
19
|
-
* @param options the array of options to search for option with corresponding value
|
|
20
|
-
*/
|
|
21
|
-
displayLabel(options: SelectOption[]): (value: unknown) => string;
|
|
22
|
-
handleSelect(event: MatAutocompleteSelectedEvent): void;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteFieldComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteFieldComponent, "crispr-autocomplete-field", never, {}, {}, never, never, true, never>;
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public-api';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './autocomplete-field.component';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { CrisprFieldComponent, ButtonConfig } from '../../utils';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ButtonComponent extends CrisprFieldComponent<ButtonConfig> implements OnInit {
|
|
7
|
-
group: FormGroup;
|
|
8
|
-
defaultConfig: Partial<ButtonConfig>;
|
|
9
|
-
formValid$: Observable<boolean>;
|
|
10
|
-
get matButtonClass(): string;
|
|
11
|
-
ngOnInit(): void;
|
|
12
|
-
handleClick(group: FormGroup, event: MouseEvent): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "crispr-button", never, {}, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './public-api';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './button.component';
|