@tft/crispr-forms 18.0.1 → 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 +300 -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 -3
- 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 -53
- 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 -7
- 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-BC1uV7T_.mjs +0 -19
- package/fesm2022/tft-crispr-forms-index-BC1uV7T_.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BDJfgpKH.mjs +0 -142
- package/fesm2022/tft-crispr-forms-index-BDJfgpKH.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BVwoi2lw.mjs +0 -49
- package/fesm2022/tft-crispr-forms-index-BVwoi2lw.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-Bbcv75sh.mjs +0 -48
- package/fesm2022/tft-crispr-forms-index-Bbcv75sh.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs +0 -110
- package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-BwC11k3P.mjs +0 -73
- package/fesm2022/tft-crispr-forms-index-BwC11k3P.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CN4M4eEo.mjs +0 -50
- package/fesm2022/tft-crispr-forms-index-CN4M4eEo.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CP5Jn6EK.mjs +0 -63
- package/fesm2022/tft-crispr-forms-index-CP5Jn6EK.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-CYzZB0sA.mjs +0 -54
- package/fesm2022/tft-crispr-forms-index-CYzZB0sA.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-C_YTy6il.mjs +0 -102
- package/fesm2022/tft-crispr-forms-index-C_YTy6il.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-Cpu5cwLo.mjs +0 -80
- package/fesm2022/tft-crispr-forms-index-Cpu5cwLo.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DLa8K3lm.mjs +0 -36
- package/fesm2022/tft-crispr-forms-index-DLa8K3lm.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DNTOjcVZ.mjs +0 -49
- package/fesm2022/tft-crispr-forms-index-DNTOjcVZ.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DYHyL8s6.mjs +0 -57
- package/fesm2022/tft-crispr-forms-index-DYHyL8s6.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-DhIYxOdD.mjs +0 -185
- package/fesm2022/tft-crispr-forms-index-DhIYxOdD.mjs.map +0 -1
- package/fesm2022/tft-crispr-forms-index-o78Cm3Kf.mjs +0 -91
- package/fesm2022/tft-crispr-forms-index-o78Cm3Kf.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 -2
- 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 -32
- 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 -6
- 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 -13
- 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.1.tgz +0 -0
|
@@ -0,0 +1,887 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, DestroyRef, EventEmitter, WritableSignal, Signal, ChangeDetectorRef, OnDestroy, ElementRef, AfterContentInit, AfterViewInit, Renderer2, ViewContainerRef, PipeTransform } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import * as _angular_forms from '@angular/forms';
|
|
5
|
+
import { ValidatorFn, FormGroup, AbstractControl, FormControl, FormArray, ControlValueAccessor, NgControl } from '@angular/forms';
|
|
6
|
+
import * as i6 from '@tft/form-validation-handler';
|
|
7
|
+
import { ErrorDictionary } from '@tft/form-validation-handler';
|
|
8
|
+
import { ThemePalette } from '@angular/material/core';
|
|
9
|
+
import * as rxjs from 'rxjs';
|
|
10
|
+
import { Observable, Subscription, BehaviorSubject, merge } from 'rxjs';
|
|
11
|
+
import { TooltipPosition } from '@angular/material/tooltip';
|
|
12
|
+
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
13
|
+
import { MatCalendarCellClassFunction } from '@angular/material/datepicker';
|
|
14
|
+
import { ComponentType, Portal } from '@angular/cdk/portal';
|
|
15
|
+
import { GoogleMap, MapGeocoder, MapInfoWindow, MapMarker } from '@angular/google-maps';
|
|
16
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
17
|
+
import { MatAutocompleteTrigger, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
18
|
+
import { MatSelect } from '@angular/material/select';
|
|
19
|
+
import { MatChipInputEvent } from '@angular/material/chips';
|
|
20
|
+
import { ConnectionPositionPair } from '@angular/cdk/overlay';
|
|
21
|
+
|
|
22
|
+
declare function valueIn(values: string[]): rxjs.OperatorFunction<string, boolean>;
|
|
23
|
+
|
|
24
|
+
declare enum ControlType {
|
|
25
|
+
AUTOCOMPLETE = "autocomplete",
|
|
26
|
+
AUTOCOMPLETE_CHIPLIST = "autocompleteChiplist",
|
|
27
|
+
BUTTON = "button",
|
|
28
|
+
CHECKBOX = "checkbox",
|
|
29
|
+
CUSTOM = "custom",
|
|
30
|
+
DATEPICKER = "datepicker",
|
|
31
|
+
DIVIDER = "divider",
|
|
32
|
+
FILE_UPLOAD = "fileUpload",
|
|
33
|
+
GROUP_LIST = "groupList",
|
|
34
|
+
HEADING = "heading",
|
|
35
|
+
IMAGE_UPLOAD = "imageUpload",
|
|
36
|
+
INPUT = "input",
|
|
37
|
+
MAP = "map",
|
|
38
|
+
RADIO = "radio",
|
|
39
|
+
SELECT = "select",
|
|
40
|
+
SLIDER = "slider",
|
|
41
|
+
SUB_GROUP = "subGroup",
|
|
42
|
+
TEXTAREA = "textarea",
|
|
43
|
+
UNIT_CONVERSION = "unitConversion"
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The base interface for all the fields in the form's config
|
|
47
|
+
*/
|
|
48
|
+
interface CrisprFieldConfig {
|
|
49
|
+
controlType?: ControlType;
|
|
50
|
+
classes?: string[];
|
|
51
|
+
component?: any;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A utility type that returns the keys of a type if one is passed otherwise return string type
|
|
55
|
+
*/
|
|
56
|
+
type RestrictedControlName<M> = M extends null ? string : keyof M;
|
|
57
|
+
/**
|
|
58
|
+
* The base interface for all control configs
|
|
59
|
+
*/
|
|
60
|
+
interface CrisprControlConfig<M = null> extends CrisprFieldConfig {
|
|
61
|
+
controlName: RestrictedControlName<M>;
|
|
62
|
+
controlType: ControlType;
|
|
63
|
+
validators?: ValidatorFn[];
|
|
64
|
+
computeValue?: (group: FormGroup) => Observable<unknown>;
|
|
65
|
+
disabledCallback?: (group: FormGroup) => Observable<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Hide the control when disabled
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
hideDisabled?: boolean;
|
|
71
|
+
heading?: HeadingConfig;
|
|
72
|
+
hint?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Holds properties for control fields that describe field behavior to users
|
|
76
|
+
*/
|
|
77
|
+
interface FieldDescriptors {
|
|
78
|
+
label: string;
|
|
79
|
+
info?: Info;
|
|
80
|
+
fieldSuffix?: string;
|
|
81
|
+
placeholder?: string;
|
|
82
|
+
}
|
|
83
|
+
interface MatFieldProperties {
|
|
84
|
+
appearance?: MatFormFieldAppearance;
|
|
85
|
+
color?: ThemePalette;
|
|
86
|
+
}
|
|
87
|
+
interface Info {
|
|
88
|
+
content: string;
|
|
89
|
+
tooltipPosition?: TooltipPosition;
|
|
90
|
+
iconName?: string;
|
|
91
|
+
}
|
|
92
|
+
interface AbstractGroupConfig<C extends CrisprFieldConfig = AnyFieldConfig> {
|
|
93
|
+
fields?: (AnyFieldConfig | C)[];
|
|
94
|
+
}
|
|
95
|
+
interface FormConfig<C = AnyFieldConfig> extends AbstractGroupConfig<C> {
|
|
96
|
+
classes?: string[];
|
|
97
|
+
errorDictionary?: ErrorDictionary;
|
|
98
|
+
autoComplete?: string;
|
|
99
|
+
/** @deprecated use autoComplete */
|
|
100
|
+
autocomplete?: string;
|
|
101
|
+
validators?: ValidatorFn[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Configuration for SubGroup components
|
|
105
|
+
*/
|
|
106
|
+
interface SubGroupConfig extends CrisprControlConfig, AbstractGroupConfig<any> {
|
|
107
|
+
controlType: ControlType.SUB_GROUP;
|
|
108
|
+
}
|
|
109
|
+
type AnyFieldConfig = InputFieldConfig | SelectFieldConfig | RadioFieldConfig | FormGroupListConfig | SubGroupConfig | AutocompleteFieldConfig | AutocompleteChiplistFieldConfig | TextareaFieldConfig | CheckboxFieldConfig | DatepickerFieldConfig | MapFieldConfig | SliderFieldConfig | FileUploadFieldConfig | ImageUploadFieldConfig | HeadingConfig | ButtonConfig | DividerConfig | UnitConversionFieldConfig;
|
|
110
|
+
type ControlValue<T = any> = boolean | string | number | Date | SelectOption | SelectOption[] | ControlGroupValue | T;
|
|
111
|
+
type ControlGroupValue = {
|
|
112
|
+
[key: string]: ControlValue;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
interface InputFieldConfig extends CrisprControlConfig, FieldDescriptors, MatFieldProperties {
|
|
116
|
+
controlType: ControlType.INPUT;
|
|
117
|
+
inputType?: InputType;
|
|
118
|
+
min?: number;
|
|
119
|
+
max?: number;
|
|
120
|
+
maxLength?: number;
|
|
121
|
+
step?: number;
|
|
122
|
+
pattern?: string;
|
|
123
|
+
autofocus?: boolean;
|
|
124
|
+
spellcheck?: boolean;
|
|
125
|
+
autoComplete?: string;
|
|
126
|
+
autoCapitalize?: 'off' | 'on';
|
|
127
|
+
}
|
|
128
|
+
type InputType = 'color' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week';
|
|
129
|
+
|
|
130
|
+
interface SelectFieldConfig extends Omit<CrisprControlConfig, 'placeholder'>, FieldDescriptors, MatFieldProperties {
|
|
131
|
+
controlType: ControlType.SELECT;
|
|
132
|
+
emptyOptionsMessage?: string;
|
|
133
|
+
multiple?: boolean;
|
|
134
|
+
enableToggleAll?: boolean;
|
|
135
|
+
options: OptionsType;
|
|
136
|
+
}
|
|
137
|
+
type OptionsType = SelectOption[] | Observable<SelectOption[]> | OptionsCallback | Promise<SelectOption[]>;
|
|
138
|
+
type OptionsCallback = (group?: FormGroup) => OptionsType;
|
|
139
|
+
type ReactiveOptionsCallback = (group?: FormGroup) => Observable<SelectOption[]>;
|
|
140
|
+
type AutocompleteOptionsCallback = (group?: FormGroup, searchTerm?: string) => OptionsType;
|
|
141
|
+
interface SelectOption {
|
|
142
|
+
label: string;
|
|
143
|
+
value: any;
|
|
144
|
+
imageUrl?: string;
|
|
145
|
+
info?: Info;
|
|
146
|
+
}
|
|
147
|
+
declare const DEFAULT_EMPTY_OPTIONS_MESSAGE = "No Items";
|
|
148
|
+
|
|
149
|
+
interface RadioFieldConfig extends Omit<CrisprControlConfig, 'placeholder'>, Omit<FieldDescriptors, 'label'>, MatFieldProperties {
|
|
150
|
+
controlType: ControlType.RADIO;
|
|
151
|
+
options: OptionsType;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
interface AbstractAutocompleteFieldConfig extends CrisprControlConfig, FieldDescriptors, MatFieldProperties {
|
|
155
|
+
typeToEmit?: boolean;
|
|
156
|
+
typeDebounceTime?: number;
|
|
157
|
+
emptyOptionsMessage?: string;
|
|
158
|
+
options: AutocompleteOptionsCallback;
|
|
159
|
+
autoActiveFirstOption?: boolean;
|
|
160
|
+
imageUrlParam?: string;
|
|
161
|
+
displayWith?: (options: SelectOption[]) => (value: unknown) => string;
|
|
162
|
+
}
|
|
163
|
+
interface AutocompleteFieldConfig extends AbstractAutocompleteFieldConfig {
|
|
164
|
+
controlType: ControlType.AUTOCOMPLETE;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
interface AutocompleteChiplistFieldConfig extends AbstractAutocompleteFieldConfig, FieldDescriptors, MatFieldProperties {
|
|
168
|
+
controlType: ControlType.AUTOCOMPLETE_CHIPLIST;
|
|
169
|
+
autoActiveFirstOption?: boolean;
|
|
170
|
+
chipsSelectable?: boolean;
|
|
171
|
+
areChipsRemovable?: boolean;
|
|
172
|
+
allowDuplicates?: boolean;
|
|
173
|
+
duplicateCompareFunction?: (chip: SelectOption, availableOption: SelectOption) => boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Pass in any key codes to use for selection
|
|
176
|
+
*/
|
|
177
|
+
separatorKeyCodes?: number[];
|
|
178
|
+
tabToSelect?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* @deprecated replaced with tabToSelect as it is more accurate
|
|
181
|
+
*/
|
|
182
|
+
addChipOnBlur?: boolean;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
interface CheckboxFieldConfig extends CrisprControlConfig, Pick<FieldDescriptors, 'label' | 'info'>, Pick<MatFieldProperties, 'color'> {
|
|
186
|
+
controlType: ControlType.CHECKBOX;
|
|
187
|
+
labelPosition?: 'before' | 'after';
|
|
188
|
+
inline?: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface TextareaFieldConfig extends CrisprControlConfig, FieldDescriptors, MatFieldProperties {
|
|
192
|
+
controlType: ControlType.TEXTAREA;
|
|
193
|
+
rows?: number;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
interface DatepickerFieldConfig extends CrisprControlConfig, Pick<FieldDescriptors, 'label'>, MatFieldProperties {
|
|
197
|
+
controlType: ControlType.DATEPICKER;
|
|
198
|
+
min?: Date;
|
|
199
|
+
max?: Date;
|
|
200
|
+
startView?: 'month' | 'year' | 'multi-year';
|
|
201
|
+
startAt?: Date | ((group: FormGroup) => Observable<Date>) | null;
|
|
202
|
+
touchUi?: boolean;
|
|
203
|
+
datepickerFilter?: (date: Date) => boolean;
|
|
204
|
+
cellClassFunction?: MatCalendarCellClassFunction<Date>;
|
|
205
|
+
dateClass?: (parentGroup: FormGroup) => Observable<MatCalendarCellClassFunction<Date>>;
|
|
206
|
+
/**
|
|
207
|
+
* Pass a component into mat-datepicker-actions component see [docs](https://material.angular.io/components/datepicker/overview#confirmation-action-buttons)
|
|
208
|
+
*/
|
|
209
|
+
datepickerActions?: ComponentType<any>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
interface SliderFieldConfig extends CrisprControlConfig, Pick<FieldDescriptors, 'label' | 'info'>, Pick<MatFieldProperties, 'color'> {
|
|
213
|
+
controlType: ControlType.SLIDER;
|
|
214
|
+
displayWith?: (value: number) => string | number;
|
|
215
|
+
max?: number;
|
|
216
|
+
min?: number;
|
|
217
|
+
step?: number;
|
|
218
|
+
discrete?: boolean;
|
|
219
|
+
tickInterval?: number | 'auto';
|
|
220
|
+
displayLimits?: boolean;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
interface FormGroupListConfig extends CrisprControlConfig {
|
|
224
|
+
controlType: ControlType.GROUP_LIST;
|
|
225
|
+
itemConfig: SubGroupConfig;
|
|
226
|
+
itemLabelBuilder?: (index: number) => string;
|
|
227
|
+
/** The number of list items that a user can delete */
|
|
228
|
+
minListLength?: number;
|
|
229
|
+
/** If no items are passed as an initial value, should an initial empty item be created */
|
|
230
|
+
displayInitialItem?: boolean;
|
|
231
|
+
addButtonColor?: ThemePalette;
|
|
232
|
+
addButtonLabel?: string;
|
|
233
|
+
displayItemComponent?: any;
|
|
234
|
+
/**
|
|
235
|
+
* @deprecated Please use addButtonLabel, addItemLabel will be removed in the next major release
|
|
236
|
+
*/
|
|
237
|
+
addItemLabel?: string;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
interface ButtonConfig extends CrisprFieldConfig, MatFieldProperties {
|
|
241
|
+
label?: string;
|
|
242
|
+
controlType: ControlType.BUTTON;
|
|
243
|
+
type?: 'submit' | 'reset' | 'button';
|
|
244
|
+
callback?: (group?: FormGroup, event?: MouseEvent) => unknown;
|
|
245
|
+
buttonType?: MatButtonType;
|
|
246
|
+
color?: ThemePalette;
|
|
247
|
+
icon?: string;
|
|
248
|
+
info?: Omit<Info, 'iconName'>;
|
|
249
|
+
disabledOnInvalidForm?: boolean;
|
|
250
|
+
}
|
|
251
|
+
type ButtonType = 'submit' | 'reset' | 'button';
|
|
252
|
+
type MatButtonType = 'raised' | 'flat' | 'stroked' | 'icon';
|
|
253
|
+
|
|
254
|
+
interface HeadingConfig extends Omit<CrisprFieldConfig, 'controlType'>, Omit<FieldDescriptors, 'placeholder' | 'fieldSuffix'> {
|
|
255
|
+
controlType?: ControlType.HEADING;
|
|
256
|
+
typographyClass?: string;
|
|
257
|
+
label: string;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
type DividerConfig = Omit<CrisprFieldConfig, 'label'> & {
|
|
261
|
+
controlType?: ControlType.DIVIDER;
|
|
262
|
+
vertical?: boolean;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
type UnitConversionFieldConfig<ST = unknown, UT = unknown> = CrisprControlConfig & FieldDescriptors & MatFieldProperties & {
|
|
266
|
+
controlType: ControlType.UNIT_CONVERSION;
|
|
267
|
+
/**
|
|
268
|
+
* Used convert config value to displayed value on initialization
|
|
269
|
+
*/
|
|
270
|
+
initialDisplayValueConversion: (value?: ST, displayedUnit?: UT) => number;
|
|
271
|
+
/**
|
|
272
|
+
* The function to convert the display value into the stored value as the display value changes
|
|
273
|
+
*/
|
|
274
|
+
storedValueConversion: (value?: string, displayedUnit?: UT) => number;
|
|
275
|
+
min?: number;
|
|
276
|
+
max?: number;
|
|
277
|
+
autofocus?: boolean;
|
|
278
|
+
step?: number;
|
|
279
|
+
} & ({
|
|
280
|
+
showUnitSelect: true;
|
|
281
|
+
/**
|
|
282
|
+
* A callback function that returns the options to be used by the unit select field. Can be used just like select field options.
|
|
283
|
+
*/
|
|
284
|
+
selectableUnits: (group: FormGroup) => OptionsType;
|
|
285
|
+
/**
|
|
286
|
+
* Display unit to use on component initialization and when unit not user selectable i.e. showUnitSelect: false
|
|
287
|
+
*/
|
|
288
|
+
initialDisplayUnit: UT;
|
|
289
|
+
} | {
|
|
290
|
+
showUnitSelect: false;
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
interface AbstractUploadComponent {
|
|
294
|
+
isUploaded: boolean;
|
|
295
|
+
fileProgress: Observable<number>[];
|
|
296
|
+
disabled$: Observable<boolean>;
|
|
297
|
+
}
|
|
298
|
+
type FileUploadFieldConfig = CrisprControlConfig & MatFieldProperties & {
|
|
299
|
+
controlType: ControlType.FILE_UPLOAD;
|
|
300
|
+
label: string;
|
|
301
|
+
filesChanged?: (parentGroup: FormGroup, files: FileList) => void;
|
|
302
|
+
allowMultipleFiles?: boolean;
|
|
303
|
+
showClearFilesButton?: boolean;
|
|
304
|
+
acceptedTypes?: string;
|
|
305
|
+
selectFilesButtonType?: ButtonType;
|
|
306
|
+
selectButtonText?: string;
|
|
307
|
+
clearFilesButtonText?: string;
|
|
308
|
+
dropZoneText?: string;
|
|
309
|
+
} & (EnabledUploadButtonConfig | DisabledUploadButtonConfig);
|
|
310
|
+
interface EnabledUploadButtonConfig {
|
|
311
|
+
uploadFiles: (parentGroup: FormGroup, files: FileList, uploadComponent: AbstractUploadComponent) => Promise<unknown> | unknown;
|
|
312
|
+
showUploadProgress?: boolean;
|
|
313
|
+
disableOnUpload?: boolean;
|
|
314
|
+
uploadButtonType?: ButtonType;
|
|
315
|
+
uploadButtonText?: string;
|
|
316
|
+
}
|
|
317
|
+
type DisabledUploadButtonConfig = NeverProps<EnabledUploadButtonConfig>;
|
|
318
|
+
type NeverProps<T> = {
|
|
319
|
+
[P in keyof T]?: never;
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
type ImageUploadFieldConfig = CrisprControlConfig & MatFieldProperties & {
|
|
323
|
+
controlType: ControlType.IMAGE_UPLOAD;
|
|
324
|
+
label: string;
|
|
325
|
+
filesChanged?: (parentGroup: FormGroup, file: File) => void;
|
|
326
|
+
/**
|
|
327
|
+
* The file types to accept. The onus is on the consuming developer to limit these to file types compatible with usage.
|
|
328
|
+
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
|
|
329
|
+
*/
|
|
330
|
+
acceptedTypes: string;
|
|
331
|
+
fileName?: string;
|
|
332
|
+
showClearFilesButton?: boolean;
|
|
333
|
+
selectFilesButtonType?: ButtonType;
|
|
334
|
+
selectButtonText?: string;
|
|
335
|
+
clearFilesButtonText?: string;
|
|
336
|
+
resetFilesButtonText?: string;
|
|
337
|
+
dropZoneText?: string;
|
|
338
|
+
/**
|
|
339
|
+
* If the input value of the control is not a string of the src
|
|
340
|
+
* url to the image, this function allows consumers to map their
|
|
341
|
+
* input value into one
|
|
342
|
+
*/
|
|
343
|
+
mapInputValueToUrl?: (inputValue: unknown) => string;
|
|
344
|
+
/**
|
|
345
|
+
* Should the field compress the image after loading it
|
|
346
|
+
* @default false
|
|
347
|
+
*/
|
|
348
|
+
compressImage?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* The target size of the compressed image
|
|
351
|
+
*/
|
|
352
|
+
targetCompressedImageFileSizeMb?: number;
|
|
353
|
+
/**
|
|
354
|
+
* The minimum file size in MB required to trigger compression. Useful for preventing compression on files near the target compression size.
|
|
355
|
+
* @default .7
|
|
356
|
+
*/
|
|
357
|
+
minCompressionThresholdMb?: number;
|
|
358
|
+
/**
|
|
359
|
+
* The maximum height or width of the compressed image
|
|
360
|
+
* @default undefined
|
|
361
|
+
*/
|
|
362
|
+
maxWidthOrHeight?: number;
|
|
363
|
+
/**
|
|
364
|
+
* When true runs compression using a web worker, otherwise compression happens on the main thread.
|
|
365
|
+
* @default true
|
|
366
|
+
*/
|
|
367
|
+
useWebWorker?: boolean;
|
|
368
|
+
/**
|
|
369
|
+
* The height of the image preview container
|
|
370
|
+
*/
|
|
371
|
+
imagePreviewHeight?: string;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
type MapFieldConfig<OMT = unknown> = CrisprControlConfig & MatFieldProperties & FieldDescriptors & {
|
|
375
|
+
controlType: ControlType.MAP;
|
|
376
|
+
label: string;
|
|
377
|
+
center?: google.maps.LatLngLiteral;
|
|
378
|
+
location?: string;
|
|
379
|
+
options?: google.maps.MapOptions;
|
|
380
|
+
debounceTime?: number;
|
|
381
|
+
markers?: (map: GoogleMap, group: FormGroup) => Observable<TftMapMarker[]>;
|
|
382
|
+
infoWindowTemplateBuilder?: TemplateBuilder<TftMapMarker>;
|
|
383
|
+
valueDisplayKey?: string;
|
|
384
|
+
onMove?: (map: GoogleMap, group: FormGroup) => OMT;
|
|
385
|
+
};
|
|
386
|
+
type TftMapMarker<DT = unknown> = google.maps.marker.AdvancedMarkerElementOptions & {
|
|
387
|
+
value: DT;
|
|
388
|
+
};
|
|
389
|
+
type TemplateBuilder<T> = (props: T) => string;
|
|
390
|
+
|
|
391
|
+
declare abstract class CrisprFieldComponent<C extends CrisprFieldConfig> {
|
|
392
|
+
defaultConfig?: Partial<C>;
|
|
393
|
+
set inputConfig(config: C);
|
|
394
|
+
private updateConfig;
|
|
395
|
+
config: i0.WritableSignal<C>;
|
|
396
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFieldComponent<any>, never>;
|
|
397
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CrisprFieldComponent<any>, never, never, { "inputConfig": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
declare class CrisprControlComponent<C extends CrisprControlConfig> extends CrisprFieldComponent<C> implements OnInit {
|
|
401
|
+
destroyRef: DestroyRef;
|
|
402
|
+
group: i0.WritableSignal<FormGroup<any>>;
|
|
403
|
+
set inputGroup(group: ControlValue);
|
|
404
|
+
control: i0.Signal<AbstractControl<any, any, any>>;
|
|
405
|
+
valueChanges: EventEmitter<ControlValue>;
|
|
406
|
+
value: i0.WritableSignal<any>;
|
|
407
|
+
set inputValue(value: ControlValue);
|
|
408
|
+
constructor();
|
|
409
|
+
ngOnInit(): void;
|
|
410
|
+
setControlValue(value: ControlValue): void;
|
|
411
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprControlComponent<any>, never>;
|
|
412
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CrisprControlComponent<any>, never, never, { "inputGroup": { "alias": "group"; "required": false; }; "inputValue": { "alias": "value"; "required": false; }; }, { "valueChanges": "valueChanges"; }, never, never, true, never>;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
type AutocompleteConfigTypes = AutocompleteFieldConfig | AutocompleteChiplistFieldConfig;
|
|
416
|
+
declare class AbstractAutocompleteComponent<C> extends CrisprControlComponent<AutocompleteConfigTypes> implements OnInit {
|
|
417
|
+
autocompleteInputControl: FormControl<string>;
|
|
418
|
+
options$: Observable<SelectOption[]>;
|
|
419
|
+
config: i0.WritableSignal<AutocompleteConfigTypes & C>;
|
|
420
|
+
ngOnInit(): void;
|
|
421
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractAutocompleteComponent<any>, never>;
|
|
422
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractAutocompleteComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
declare abstract class CrisprDisplayFieldComponent extends CrisprControlComponent<CrisprControlConfig> implements OnInit {
|
|
426
|
+
index?: number;
|
|
427
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprDisplayFieldComponent, never>;
|
|
428
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CrisprDisplayFieldComponent, never, never, {}, {}, never, never, true, never>;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* builds out form group based on config
|
|
433
|
+
* @param config a configuration for a form group
|
|
434
|
+
* @param value an object of initial values to pass in
|
|
435
|
+
* @param group the form group to modify and build out
|
|
436
|
+
*/
|
|
437
|
+
declare function buildFormGroupFromConfig(config: FormConfig, value?: any, group?: FormGroup): FormGroup<any>;
|
|
438
|
+
|
|
439
|
+
declare function callOptionsIfFunction(options: OptionsType | AutocompleteOptionsCallback, parentGroup?: FormGroup, searchString?: string): OptionsType;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Analyze the config and build a form control to spec. Notice we don't use FormBuilder here
|
|
443
|
+
* as we want to keep this function pure.
|
|
444
|
+
* @param controlConfig the configuration object for the control to build
|
|
445
|
+
* @param value an initial value to use if passed in
|
|
446
|
+
*/
|
|
447
|
+
declare function createControlForType(controlConfig: AnyFieldConfig, value?: ControlValue): _angular_forms.FormGroup<any> | FormArray<any> | FormControl<any>;
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* A basic filter function that filters the search string against the label of the options object
|
|
451
|
+
* @param options the array of options to filter
|
|
452
|
+
* @param searchString the string from the input
|
|
453
|
+
*/
|
|
454
|
+
declare function filterOptionsByLabel(options: SelectOption[], searchString: string): SelectOption[];
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Determines if the field config is for a form control (not a divider, heading or other non-control field)
|
|
458
|
+
*/
|
|
459
|
+
declare function isControlConfig(fieldConfig: CrisprFieldConfig): fieldConfig is CrisprControlConfig;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* The user can give us select options as an array, a function that resolves to a promise,
|
|
463
|
+
* or an observable. This functions consumes any of those and returns an observable that
|
|
464
|
+
* resolves an array of options
|
|
465
|
+
*
|
|
466
|
+
* @param options the options passed in from the config
|
|
467
|
+
* @param emptyMessageOption the message to display when the array is empty
|
|
468
|
+
*/
|
|
469
|
+
declare function observablifyOptions(options: OptionsType, parentGroup: FormGroup, searchString?: string): Observable<SelectOption[]>;
|
|
470
|
+
|
|
471
|
+
declare function convertBytesToMb(bytes: number): number;
|
|
472
|
+
declare function maxFileSizeValidator(maxFileSize: number): ValidatorFn;
|
|
473
|
+
declare function allowedFileExtValidator(allowedFileExtensions: string[], onlyAllowFiles?: boolean): ValidatorFn;
|
|
474
|
+
declare function allowedFileType(matchExp: string | RegExp): ValidatorFn;
|
|
475
|
+
|
|
476
|
+
declare class FormGroupListComponent extends CrisprControlComponent<FormGroupListConfig> implements OnInit {
|
|
477
|
+
private cdr;
|
|
478
|
+
defaultConfig: Partial<FormGroupListConfig>;
|
|
479
|
+
group: WritableSignal<FormGroup>;
|
|
480
|
+
control: Signal<FormArray>;
|
|
481
|
+
/**
|
|
482
|
+
* By setting this to true when adding/removing items from array,
|
|
483
|
+
* we can block original values from overwriting form values
|
|
484
|
+
* */
|
|
485
|
+
blockValue: boolean;
|
|
486
|
+
selectedIndex: number;
|
|
487
|
+
constructor(cdr: ChangeDetectorRef);
|
|
488
|
+
ngOnInit(): void;
|
|
489
|
+
setControlValue(values: any[]): void;
|
|
490
|
+
clickDelete(index: number): void;
|
|
491
|
+
clickAdd(): void;
|
|
492
|
+
addGroup(value?: any): void;
|
|
493
|
+
deleteGroup(index: number): void;
|
|
494
|
+
clickEditItem(index: number): void;
|
|
495
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupListComponent, never>;
|
|
496
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormGroupListComponent, "crispr-form-group-list", never, {}, {}, never, never, true, never>;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
declare class FieldContainerComponent implements OnInit, OnDestroy {
|
|
500
|
+
config: CrisprControlConfig;
|
|
501
|
+
group: FormGroup;
|
|
502
|
+
inlineField: boolean;
|
|
503
|
+
disabled$: Observable<boolean>;
|
|
504
|
+
subs: Subscription[];
|
|
505
|
+
ngOnInit(): void;
|
|
506
|
+
ngOnDestroy(): void;
|
|
507
|
+
/**
|
|
508
|
+
* Connects user defined disabledCallback function to the the view, so that the control is enabled/disabled
|
|
509
|
+
* appropriately. It also will hide disabled fields in the UI unless `hideDisabled` is set to
|
|
510
|
+
* false in the controls config
|
|
511
|
+
* @param group used to get valueChanges from control
|
|
512
|
+
* @param config configuration object used to
|
|
513
|
+
*/
|
|
514
|
+
connectDisabledCallback(group: FormGroup, config?: CrisprControlConfig): Observable<boolean>;
|
|
515
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldContainerComponent, never>;
|
|
516
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldContainerComponent, "crispr-field-container", never, { "config": { "alias": "config"; "required": false; }; "group": { "alias": "group"; "required": false; }; "inlineField": { "alias": "inlineField"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
declare class SubGroupComponent extends CrisprControlComponent<SubGroupConfig> implements OnInit {
|
|
520
|
+
ngOnInit(): void;
|
|
521
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubGroupComponent, never>;
|
|
522
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubGroupComponent, "crispr-sub-group", never, {}, {}, never, never, false, never>;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
declare class FileDropzoneDirective {
|
|
526
|
+
fileDrop: EventEmitter<FileList>;
|
|
527
|
+
crisprFileDropzone: boolean;
|
|
528
|
+
onDrop($event: DragEvent): void;
|
|
529
|
+
onDragOver($event: DragEvent): void;
|
|
530
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileDropzoneDirective, never>;
|
|
531
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileDropzoneDirective, "[crisprFileDropzone]", never, { "crisprFileDropzone": { "alias": "crisprFileDropzone"; "required": false; }; }, { "fileDrop": "fileDrop"; }, never, never, true, never>;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
declare class FileUploadFieldComponent extends CrisprControlComponent<FileUploadFieldConfig> implements OnInit, ControlValueAccessor {
|
|
535
|
+
ngControl: NgControl;
|
|
536
|
+
onChange: () => void;
|
|
537
|
+
defaultConfig: Partial<FileUploadFieldConfig>;
|
|
538
|
+
fileInputRef: ElementRef;
|
|
539
|
+
selectedFiles: i0.WritableSignal<FileList>;
|
|
540
|
+
selectedFilesArray: i0.Signal<File[]>;
|
|
541
|
+
isUploaded: boolean;
|
|
542
|
+
fileProgress: Observable<number>[];
|
|
543
|
+
disabled$: Observable<boolean>;
|
|
544
|
+
constructor(ngControl: NgControl);
|
|
545
|
+
ngOnInit(): void;
|
|
546
|
+
filesChanged(files: FileList): void;
|
|
547
|
+
uploadFiles(): void;
|
|
548
|
+
resetFileInput(): void;
|
|
549
|
+
writeValue(value: null): void;
|
|
550
|
+
registerOnChange(fn: () => void): void;
|
|
551
|
+
registerOnTouched(fn: () => void): void;
|
|
552
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadFieldComponent, [{ optional: true; self: true; }]>;
|
|
553
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadFieldComponent, "crispr-file-upload-field", never, {}, {}, never, never, true, never>;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
declare class SelectedFileComponent {
|
|
557
|
+
fileName: string;
|
|
558
|
+
progress: number;
|
|
559
|
+
showProgress: boolean;
|
|
560
|
+
color: ThemePalette;
|
|
561
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectedFileComponent, never>;
|
|
562
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectedFileComponent, "crispr-selected-file", never, { "fileName": { "alias": "fileName"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; "showProgress": { "alias": "showProgress"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
declare class HeadingComponent extends CrisprFieldComponent<HeadingConfig> {
|
|
566
|
+
defaultConfig: Partial<HeadingConfig>;
|
|
567
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeadingComponent, never>;
|
|
568
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HeadingComponent, "crispr-heading", never, {}, {}, never, never, true, never>;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
declare class InfoComponent {
|
|
572
|
+
info: Info;
|
|
573
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InfoComponent, never>;
|
|
574
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfoComponent, "crispr-info", never, { "info": { "alias": "info"; "required": false; }; }, {}, never, never, true, never>;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
declare class ImageUploadFieldComponent extends CrisprControlComponent<ImageUploadFieldConfig> implements OnInit, ControlValueAccessor {
|
|
578
|
+
ngControl: NgControl;
|
|
579
|
+
private domSanitizer;
|
|
580
|
+
private cdr;
|
|
581
|
+
onChange: () => void;
|
|
582
|
+
defaultConfig: Partial<ImageUploadFieldConfig>;
|
|
583
|
+
private inputImageFileSubject;
|
|
584
|
+
inputImageFile$: Observable<File>;
|
|
585
|
+
/**
|
|
586
|
+
* the compression progress
|
|
587
|
+
*/
|
|
588
|
+
progress: number | undefined;
|
|
589
|
+
compressedFile$: Observable<File>;
|
|
590
|
+
compressedImageUrlString$: Observable<string | null>;
|
|
591
|
+
imageSrcUrl$: Observable<string | null>;
|
|
592
|
+
fileInputRef: ElementRef;
|
|
593
|
+
selectedFiles: FileList;
|
|
594
|
+
isUploaded: boolean;
|
|
595
|
+
disabled$: Observable<boolean>;
|
|
596
|
+
constructor(ngControl: NgControl, domSanitizer: DomSanitizer, cdr: ChangeDetectorRef);
|
|
597
|
+
ngOnInit(): void;
|
|
598
|
+
filesChanged(files: FileList): void;
|
|
599
|
+
clearFileInput(): void;
|
|
600
|
+
resetToInitialValue(initialValue: string): void;
|
|
601
|
+
writeValue(value: null): void;
|
|
602
|
+
registerOnChange(fn: () => void): void;
|
|
603
|
+
registerOnTouched(fn: () => void): void;
|
|
604
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageUploadFieldComponent, [{ optional: true; self: true; }, null, null]>;
|
|
605
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageUploadFieldComponent, "crispr-image-upload-field", never, {}, {}, never, never, true, never>;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
declare class DatepickerFieldComponent extends CrisprControlComponent<DatepickerFieldConfig> implements OnInit, AfterContentInit {
|
|
609
|
+
defaultConfig: Partial<DatepickerFieldConfig>;
|
|
610
|
+
dateClass: MatCalendarCellClassFunction<Date>;
|
|
611
|
+
dateClass$: Observable<MatCalendarCellClassFunction<Date>>;
|
|
612
|
+
startAt$: Observable<Date>;
|
|
613
|
+
/** A portal containing the footer component type for this calendar. */
|
|
614
|
+
calendarFooterPortal: Portal<any>;
|
|
615
|
+
ngOnInit(): void;
|
|
616
|
+
ngAfterContentInit(): void;
|
|
617
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerFieldComponent, never>;
|
|
618
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerFieldComponent, "crispr-datepicker-field", never, {}, {}, never, never, true, never>;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
declare class CheckboxFieldComponent extends CrisprControlComponent<CheckboxFieldConfig> implements OnInit {
|
|
622
|
+
defaultConfig: Partial<CheckboxFieldConfig>;
|
|
623
|
+
ngOnInit(): void;
|
|
624
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxFieldComponent, never>;
|
|
625
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxFieldComponent, "crispr-checkbox-field", never, {}, {}, never, never, true, never>;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
declare class TextareaFieldComponent extends CrisprControlComponent<TextareaFieldConfig> implements OnInit {
|
|
629
|
+
defaultConfig: Partial<TextareaFieldConfig>;
|
|
630
|
+
ngOnInit(): void;
|
|
631
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaFieldComponent, never>;
|
|
632
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextareaFieldComponent, "crispr-textarea-field", never, {}, {}, never, never, true, never>;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
declare class AutocompleteFieldComponent extends AbstractAutocompleteComponent<AutocompleteFieldConfig> implements OnInit, OnDestroy {
|
|
636
|
+
defaultConfig: Partial<AutocompleteFieldConfig>;
|
|
637
|
+
autoInput: MatAutocompleteTrigger;
|
|
638
|
+
autoInputRef: ElementRef<HTMLInputElement>;
|
|
639
|
+
clearFieldSubscription: Subscription;
|
|
640
|
+
ngOnInit(): void;
|
|
641
|
+
ngOnDestroy(): void;
|
|
642
|
+
setControlValue(value: SelectOption): void;
|
|
643
|
+
/**
|
|
644
|
+
* The material autocomplete defaults to displaying the options value instead of its label.
|
|
645
|
+
* We only have the value from the selected option to work with, so we have to pass the options
|
|
646
|
+
* through a function called in the template and return the function that the material displayWith
|
|
647
|
+
* input is expecting.
|
|
648
|
+
* @param options the array of options to search for option with corresponding value
|
|
649
|
+
*/
|
|
650
|
+
displayLabel(options: SelectOption[]): (value: unknown) => string;
|
|
651
|
+
handleSelect(event: MatAutocompleteSelectedEvent): void;
|
|
652
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteFieldComponent, never>;
|
|
653
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteFieldComponent, "crispr-autocomplete-field", never, {}, {}, never, never, true, never>;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
declare class SelectFieldComponent extends CrisprControlComponent<SelectFieldConfig> implements OnInit, AfterViewInit {
|
|
657
|
+
defaultConfig: {
|
|
658
|
+
enableToggleAll: boolean;
|
|
659
|
+
color: ThemePalette;
|
|
660
|
+
};
|
|
661
|
+
options$: Observable<SelectOption[]>;
|
|
662
|
+
allSelected: boolean;
|
|
663
|
+
selectField: MatSelect;
|
|
664
|
+
ngOnInit(): void;
|
|
665
|
+
ngAfterViewInit(): void;
|
|
666
|
+
toggleAll(isSelected: boolean): void;
|
|
667
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectFieldComponent, never>;
|
|
668
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectFieldComponent, "crispr-select-field", never, {}, {}, never, never, true, never>;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
declare class InputFieldComponent extends CrisprControlComponent<InputFieldConfig> implements OnInit {
|
|
672
|
+
defaultConfig: Partial<InputFieldConfig>;
|
|
673
|
+
constructor();
|
|
674
|
+
ngOnInit(): void;
|
|
675
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputFieldComponent, never>;
|
|
676
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputFieldComponent, "crispr-input-field", never, {}, {}, never, never, true, never>;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
declare class RadioFieldComponent extends CrisprControlComponent<RadioFieldConfig> implements OnInit {
|
|
680
|
+
defaultConfig: {};
|
|
681
|
+
options$: Observable<SelectOption[]>;
|
|
682
|
+
ngOnInit(): void;
|
|
683
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadioFieldComponent, never>;
|
|
684
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioFieldComponent, "crispr-radio-field", never, {}, {}, never, never, true, never>;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
declare class SliderFieldComponent extends CrisprControlComponent<SliderFieldConfig> implements OnInit {
|
|
688
|
+
defaultConfig: Partial<SliderFieldConfig>;
|
|
689
|
+
constructor();
|
|
690
|
+
ngOnInit(): void;
|
|
691
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SliderFieldComponent, never>;
|
|
692
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SliderFieldComponent, "crispr-slider-field", never, {}, {}, never, never, true, never>;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
declare class DividerComponent extends CrisprFieldComponent<DividerConfig> {
|
|
696
|
+
defaultConfig: {};
|
|
697
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DividerComponent, never>;
|
|
698
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DividerComponent, "crispr-divider", never, {}, {}, never, never, true, never>;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
declare class ButtonComponent extends CrisprFieldComponent<ButtonConfig> implements OnInit {
|
|
702
|
+
defaultConfig: Partial<ButtonConfig>;
|
|
703
|
+
formValid$: Observable<boolean>;
|
|
704
|
+
group: i0.WritableSignal<FormGroup<any>>;
|
|
705
|
+
set inputGroup(group: ControlValue);
|
|
706
|
+
get matButtonClass(): string;
|
|
707
|
+
ngOnInit(): void;
|
|
708
|
+
handleClick(group: FormGroup, event: MouseEvent): void;
|
|
709
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
|
|
710
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "crispr-button", never, { "inputGroup": { "alias": "group"; "required": false; }; }, {}, never, never, true, never>;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
declare class UnitConversionFieldComponent extends CrisprControlComponent<UnitConversionFieldConfig> implements OnInit, OnDestroy {
|
|
714
|
+
defaultConfig: Partial<UnitConversionFieldConfig>;
|
|
715
|
+
displayValueControl: FormControl<any>;
|
|
716
|
+
unitSelectControl: FormControl<any>;
|
|
717
|
+
unitOptions$: Observable<SelectOption[]>;
|
|
718
|
+
transformationSubscription: Subscription;
|
|
719
|
+
ngOnInit(): void;
|
|
720
|
+
ngOnDestroy(): void;
|
|
721
|
+
setInitialDisplayValue(storedValue: any, unit: unknown): void;
|
|
722
|
+
/**
|
|
723
|
+
* We override the 'setControlValue' we inherited from crisprControlMixin and add our custom logic,
|
|
724
|
+
* This function gets called onInit because were object oriented. it's so great, so great that I'm
|
|
725
|
+
* typing a paragraph to explain what the hell is going on...
|
|
726
|
+
* @param value the initial value for the control passed down from the form components input
|
|
727
|
+
*/
|
|
728
|
+
setControlValue(value: any): void;
|
|
729
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UnitConversionFieldComponent, never>;
|
|
730
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnitConversionFieldComponent, "crispr-unit-conversion-field", never, {}, {}, never, never, true, never>;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
declare class AutocompleteChiplistFieldComponent extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig> implements OnInit {
|
|
734
|
+
defaultConfig: Partial<AutocompleteChiplistFieldConfig>;
|
|
735
|
+
chips$: BehaviorSubject<SelectOption[]>;
|
|
736
|
+
remainingOptions$: Observable<SelectOption[]>;
|
|
737
|
+
selectedChip: SelectOption;
|
|
738
|
+
controlValue$: Observable<SelectOption[]>;
|
|
739
|
+
chipInput: MatAutocompleteTrigger;
|
|
740
|
+
chipInputRef: ElementRef<HTMLInputElement>;
|
|
741
|
+
ngOnInit(): void;
|
|
742
|
+
setControlValue(value: SelectOption[]): void;
|
|
743
|
+
handleSelect(event: MatAutocompleteSelectedEvent): void;
|
|
744
|
+
/**
|
|
745
|
+
* To follow ARIA standards we want to select the active option on blur.
|
|
746
|
+
* matChipInputAddOnBlur should do this but it causes buggy behaviour
|
|
747
|
+
* @param event blur event that triggers the handle blur
|
|
748
|
+
*/
|
|
749
|
+
handleTab(_event: FocusEvent): void;
|
|
750
|
+
/**
|
|
751
|
+
* Handles selection via key tokens passed through separatorKeyCodes property
|
|
752
|
+
* NOTE: If TAB is used focus does not move on to next component
|
|
753
|
+
* @param event
|
|
754
|
+
*/
|
|
755
|
+
handleTokenEnd(event: MatChipInputEvent): void;
|
|
756
|
+
mapToLabel(option: SelectOption): string;
|
|
757
|
+
removeChip(removedChip: SelectOption): void;
|
|
758
|
+
highlightChip(chip: SelectOption): void;
|
|
759
|
+
blurField(): void;
|
|
760
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteChiplistFieldComponent, never>;
|
|
761
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteChiplistFieldComponent, "crispr-autocomplete-chiplist-field", never, {}, {}, never, never, true, never>;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
declare class MapFieldComponent extends CrisprControlComponent<MapFieldConfig> implements OnInit {
|
|
765
|
+
/**
|
|
766
|
+
* The overlay is positioned to align the top-right corner with the origin's bottom-right corner,
|
|
767
|
+
* and the top-left corner with the origin's bottom-left corner.
|
|
768
|
+
*/
|
|
769
|
+
overlayPositions: ConnectionPositionPair[];
|
|
770
|
+
geoCoder: MapGeocoder;
|
|
771
|
+
renderer: Renderer2;
|
|
772
|
+
domSanitizer: DomSanitizer;
|
|
773
|
+
infoWindow: i0.Signal<MapInfoWindow>;
|
|
774
|
+
selectedMarker: i0.WritableSignal<TftMapMarker>;
|
|
775
|
+
mapOpen: i0.WritableSignal<boolean>;
|
|
776
|
+
mapComponent: i0.Signal<GoogleMap>;
|
|
777
|
+
defaultConfig: Partial<MapFieldConfig>;
|
|
778
|
+
locationControl: FormControl<string>;
|
|
779
|
+
locationGroup: FormGroup<{
|
|
780
|
+
location: FormControl<string>;
|
|
781
|
+
}>;
|
|
782
|
+
locationConfig: AutocompleteFieldConfig;
|
|
783
|
+
inputCenter: rxjs.Observable<google.maps.LatLngLiteral>;
|
|
784
|
+
center: typeof merge;
|
|
785
|
+
currentMap: BehaviorSubject<GoogleMap>;
|
|
786
|
+
displayValue: i0.Signal<string>;
|
|
787
|
+
currentMarkers: i0.Signal<TftMapMarker[]>;
|
|
788
|
+
onMapInit(event: GoogleMap): void;
|
|
789
|
+
ngOnInit(): void;
|
|
790
|
+
onMarkerClick(clickedMarker: MapMarker): void;
|
|
791
|
+
selectMarker(marker: TftMapMarker): void;
|
|
792
|
+
onBoundsChanged(bounds: google.maps.LatLngBounds): void;
|
|
793
|
+
onMove(map: GoogleMap, group: FormGroup): void;
|
|
794
|
+
onSelectLocation(suggestion: google.maps.places.AutocompletePrediction): Promise<void>;
|
|
795
|
+
openMap(): void;
|
|
796
|
+
closeMap(): void;
|
|
797
|
+
getDisplay(value: any): string;
|
|
798
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapFieldComponent, never>;
|
|
799
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MapFieldComponent, "crispr-map", never, {}, {}, never, never, true, never>;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
type CrisprControlComponentType = InputFieldComponent | SelectFieldComponent | RadioFieldComponent | SubGroupComponent | FormGroupListComponent | AutocompleteFieldComponent | AutocompleteChiplistFieldComponent | TextareaFieldComponent | CheckboxFieldComponent | SliderFieldComponent | FileUploadFieldComponent | ImageUploadFieldComponent | DatepickerFieldComponent | UnitConversionFieldComponent | MapFieldComponent;
|
|
803
|
+
type CrisprFieldComponentType = CrisprControlComponentType | HeadingComponent | DividerComponent | ButtonComponent;
|
|
804
|
+
|
|
805
|
+
declare class CrisprFieldDirective implements OnInit {
|
|
806
|
+
private container;
|
|
807
|
+
private renderer;
|
|
808
|
+
private cdr;
|
|
809
|
+
config: AnyFieldConfig;
|
|
810
|
+
group: FormGroup;
|
|
811
|
+
/**
|
|
812
|
+
* value setter updates the control's value as well
|
|
813
|
+
*/
|
|
814
|
+
_value: ControlValue | any[];
|
|
815
|
+
set value(value: ControlValue | any[]);
|
|
816
|
+
get value(): ControlValue | any[];
|
|
817
|
+
component: CrisprFieldComponentType;
|
|
818
|
+
constructor(container: ViewContainerRef, renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
819
|
+
ngOnInit(): Promise<void>;
|
|
820
|
+
updateComponentValue(value: ControlValue): void;
|
|
821
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFieldDirective, never>;
|
|
822
|
+
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>;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
declare class CrisprDisplayFieldDirective implements OnInit {
|
|
826
|
+
private container;
|
|
827
|
+
private cdr;
|
|
828
|
+
group: FormGroup;
|
|
829
|
+
/**
|
|
830
|
+
* value setter updates the control's value as well
|
|
831
|
+
*/
|
|
832
|
+
_value: ControlValue | any[];
|
|
833
|
+
set value(value: ControlValue | any[]);
|
|
834
|
+
get value(): ControlValue | any[];
|
|
835
|
+
private component;
|
|
836
|
+
index?: number;
|
|
837
|
+
private componentInstance;
|
|
838
|
+
constructor(container: ViewContainerRef, cdr: ChangeDetectorRef);
|
|
839
|
+
ngOnInit(): Promise<void>;
|
|
840
|
+
updateComponentValue(value: ControlValue | any[]): void;
|
|
841
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprDisplayFieldDirective, never>;
|
|
842
|
+
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>;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
declare class InitialControlValuePipe implements PipeTransform {
|
|
846
|
+
transform(initialFormValue: {
|
|
847
|
+
[key: string]: ControlValue | any;
|
|
848
|
+
}, fieldConfig: AnyFieldConfig): unknown;
|
|
849
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InitialControlValuePipe, never>;
|
|
850
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<InitialControlValuePipe, "initialControlValue", false>;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
declare class CrisprPipesModule {
|
|
854
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprPipesModule, never>;
|
|
855
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprPipesModule, [typeof InitialControlValuePipe], [typeof i2.CommonModule], [typeof InitialControlValuePipe]>;
|
|
856
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CrisprPipesModule>;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
declare class SubGroupModule {
|
|
860
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SubGroupModule, never>;
|
|
861
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SubGroupModule, [typeof SubGroupComponent], [typeof i2.CommonModule, typeof CrisprFieldDirective, typeof FieldContainerComponent, typeof CrisprPipesModule, typeof i6.FormValidationHandlerModule], [typeof SubGroupComponent]>;
|
|
862
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SubGroupModule>;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
declare class CrisprFormComponent implements OnInit {
|
|
866
|
+
config: FormConfig;
|
|
867
|
+
form: FormGroup;
|
|
868
|
+
value: ControlGroupValue;
|
|
869
|
+
submitted: EventEmitter<FormGroup<any>>;
|
|
870
|
+
valueChanges: Observable<any>;
|
|
871
|
+
statusChanges: Observable<string>;
|
|
872
|
+
submitTrigger: ElementRef<HTMLButtonElement>;
|
|
873
|
+
ngOnInit(): void;
|
|
874
|
+
handleSubmit(): void;
|
|
875
|
+
triggerSubmit(): void;
|
|
876
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormComponent, never>;
|
|
877
|
+
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>;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
declare class CrisprFormsModule {
|
|
881
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CrisprFormsModule, never>;
|
|
882
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CrisprFormsModule, never, [typeof i2.CommonModule, typeof _angular_forms.ReactiveFormsModule, typeof i6.FormValidationHandlerModule, typeof FormGroupListComponent, typeof FieldContainerComponent, typeof CrisprFieldDirective, typeof CrisprDisplayFieldDirective, typeof SubGroupModule, typeof CrisprPipesModule, typeof CrisprFormComponent], [typeof CrisprFormComponent, typeof FieldContainerComponent]>;
|
|
883
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<CrisprFormsModule>;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export { AbstractAutocompleteComponent, ControlType, CrisprControlComponent, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, FileUploadFieldComponent, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn };
|
|
887
|
+
export type { AbstractAutocompleteFieldConfig, AbstractGroupConfig, AbstractUploadComponent, AnyFieldConfig, AutocompleteChiplistFieldConfig, AutocompleteFieldConfig, AutocompleteOptionsCallback, ButtonConfig, ButtonType, CheckboxFieldConfig, ControlGroupValue, ControlValue, CrisprControlConfig, CrisprFieldConfig, DatepickerFieldConfig, DividerConfig, EnabledUploadButtonConfig, FieldDescriptors, FileUploadFieldConfig, FormConfig, FormGroupListConfig, HeadingConfig, ImageUploadFieldConfig, Info, InputFieldConfig, MapFieldConfig, MatFieldProperties, OptionsCallback, OptionsType, RadioFieldConfig, ReactiveOptionsCallback, SelectFieldConfig, SelectOption, SliderFieldConfig, SubGroupConfig, TemplateBuilder, TextareaFieldConfig, TftMapMarker, UnitConversionFieldConfig };
|