@tft/crispr-forms 12.2.20 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -69
- package/esm2020/index.mjs +2 -0
- package/esm2020/lib/abstracts/autocomplete-field.abstract.mjs +30 -0
- package/esm2020/lib/abstracts/crispr-control.mixin.mjs +27 -0
- package/esm2020/lib/abstracts/crispr-field.abstract.mjs +17 -0
- package/esm2020/lib/abstracts/index.mjs +4 -0
- package/esm2020/lib/crispr-forms.module.mjs +66 -0
- package/esm2020/lib/field-component-map.const.mjs +25 -0
- package/esm2020/lib/field-container/field-container.component.mjs +85 -0
- package/esm2020/lib/field-container/index.mjs +2 -0
- package/esm2020/lib/field.directive.mjs +77 -0
- package/esm2020/lib/form/form.component.mjs +54 -0
- package/esm2020/lib/form-group-list/form-group-list.component.mjs +51 -0
- package/esm2020/lib/form-group-list/form-group-list.module.mjs +54 -0
- package/esm2020/lib/form-group-list/index.mjs +3 -0
- package/esm2020/lib/form.helpers.mjs +185 -0
- package/esm2020/lib/form.operators.mjs +24 -0
- package/esm2020/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +111 -0
- package/esm2020/lib/material/autocomplete-field/autocomplete-field.component.mjs +70 -0
- package/esm2020/lib/material/button/button.component.mjs +35 -0
- package/esm2020/lib/material/checkbox-field/checkbox-field.component.mjs +31 -0
- package/esm2020/lib/material/datepicker-field/datepicker-field.component.mjs +45 -0
- package/esm2020/lib/material/divider/divider.component.mjs +22 -0
- package/esm2020/lib/material/file-upload/file-dropzone.directive.mjs +39 -0
- package/esm2020/lib/material/file-upload/file-upload.component.mjs +145 -0
- package/esm2020/lib/material/file-upload/index.mjs +3 -0
- package/esm2020/lib/material/heading/heading.component.mjs +54 -0
- package/esm2020/lib/material/image-upload-field/image-compression.helpers.mjs +4 -0
- package/esm2020/lib/material/image-upload-field/image-upload-field.component.mjs +213 -0
- package/esm2020/lib/material/image-upload-field/index.mjs +2 -0
- package/esm2020/lib/material/index.mjs +18 -0
- package/esm2020/lib/material/info/info.component.mjs +46 -0
- package/esm2020/lib/material/input-field/input-field.component.mjs +27 -0
- package/esm2020/lib/material/material.module.mjs +200 -0
- package/esm2020/lib/material/option/index.mjs +2 -0
- package/esm2020/lib/material/option/option.component.mjs +14 -0
- package/esm2020/lib/material/radio-field/radio-field.component.mjs +29 -0
- package/esm2020/lib/material/select-field/select-field.component.mjs +58 -0
- package/esm2020/lib/material/selected-file/selected-file.component.mjs +47 -0
- package/esm2020/lib/material/slider-field/slider-field.component.mjs +30 -0
- package/esm2020/lib/material/textarea-field/textarea-field.component.mjs +28 -0
- package/esm2020/lib/material/unit-conversion-field/unit-conversion-field.component.mjs +69 -0
- package/esm2020/lib/models/autocomplete-chiplist-field.config.mjs +2 -0
- package/esm2020/lib/models/autocomplete-field.config.mjs +2 -0
- package/esm2020/lib/models/button.config.mjs +2 -0
- package/esm2020/lib/models/checkbox-field.config.mjs +2 -0
- package/esm2020/lib/models/crispr-field.config.mjs +23 -0
- package/esm2020/lib/models/datepicker-field.config.mjs +2 -0
- package/esm2020/lib/models/divider.config.mjs +2 -0
- package/esm2020/lib/models/file-upload-field.config.mjs +2 -0
- package/esm2020/lib/models/form-group-list.config.mjs +2 -0
- package/esm2020/lib/models/heading.config.mjs +3 -0
- package/esm2020/lib/models/image-upload-field.config.mjs +2 -0
- package/esm2020/lib/models/index.mjs +18 -0
- package/esm2020/lib/models/input-field.config.mjs +2 -0
- package/esm2020/lib/models/radio-field.config.mjs +2 -0
- package/esm2020/lib/models/select-field.config.mjs +2 -0
- package/esm2020/lib/models/slider-field.config.mjs +2 -0
- package/esm2020/lib/models/textarea-field.config.mjs +2 -0
- package/esm2020/lib/models/unit-conversion-field.config.mjs +2 -0
- package/esm2020/lib/pipes/crispr-pipes.module.mjs +26 -0
- package/esm2020/lib/pipes/initial-control-value.pipe.mjs +20 -0
- package/esm2020/lib/public_api.mjs +10 -0
- package/esm2020/lib/sub-group/index.mjs +3 -0
- package/esm2020/lib/sub-group/sub-group.component.mjs +20 -0
- package/esm2020/lib/sub-group/sub-group.module.mjs +45 -0
- package/esm2020/tft-crispr-forms.mjs +5 -0
- package/fesm2015/tft-crispr-forms.mjs +1883 -0
- package/fesm2015/tft-crispr-forms.mjs.map +1 -0
- package/fesm2020/tft-crispr-forms.mjs +1875 -0
- package/fesm2020/tft-crispr-forms.mjs.map +1 -0
- package/lib/abstracts/autocomplete-field.abstract.d.ts +4 -1
- package/lib/abstracts/crispr-control.mixin.d.ts +1 -1
- package/lib/abstracts/crispr-field.abstract.d.ts +4 -1
- package/lib/crispr-forms.module.d.ts +14 -0
- package/lib/field-component-map.const.d.ts +21 -20
- package/lib/field-container/field-container.component.d.ts +11 -1
- package/lib/field-container/index.d.ts +1 -0
- package/lib/field.directive.d.ts +14 -5
- package/lib/form/form.component.d.ts +6 -1
- package/lib/form-group-list/form-group-list.component.d.ts +4 -1
- package/lib/form-group-list/form-group-list.module.d.ts +15 -0
- package/lib/form-group-list/index.d.ts +2 -0
- package/lib/form.helpers.d.ts +1 -1
- package/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.d.ts +3 -0
- package/lib/material/autocomplete-field/autocomplete-field.component.d.ts +4 -1
- package/lib/material/button/button.component.d.ts +3 -0
- package/lib/material/checkbox-field/checkbox-field.component.d.ts +3 -0
- package/lib/material/datepicker-field/datepicker-field.component.d.ts +3 -0
- package/lib/material/divider/divider.component.d.ts +3 -0
- package/lib/material/file-upload/file-dropzone.directive.d.ts +3 -0
- package/lib/material/file-upload/file-upload.component.d.ts +20 -2
- package/lib/material/file-upload/index.d.ts +2 -0
- package/lib/material/heading/heading.component.d.ts +12 -1
- package/lib/material/image-upload-field/image-compression.helpers.d.ts +1 -0
- package/lib/material/image-upload-field/image-upload-field.component.d.ts +63 -0
- package/lib/material/image-upload-field/index.d.ts +1 -0
- package/lib/material/index.d.ts +4 -1
- package/lib/material/info/info.component.d.ts +12 -1
- package/lib/material/input-field/input-field.component.d.ts +3 -0
- package/lib/material/material.module.d.ts +42 -0
- package/lib/material/option/index.d.ts +1 -0
- package/lib/material/option/option.component.d.ts +3 -0
- package/lib/material/radio-field/radio-field.component.d.ts +3 -0
- package/lib/material/select-field/select-field.component.d.ts +3 -0
- package/lib/material/selected-file/selected-file.component.d.ts +10 -0
- package/lib/material/slider-field/slider-field.component.d.ts +3 -0
- package/lib/material/textarea-field/textarea-field.component.d.ts +3 -0
- package/lib/material/unit-conversion-field/unit-conversion-field.component.d.ts +3 -0
- package/lib/models/autocomplete-field.config.d.ts +2 -1
- package/lib/models/button.config.d.ts +3 -2
- package/lib/models/crispr-field.config.d.ts +8 -7
- package/lib/models/file-upload-field.config.d.ts +3 -2
- package/lib/models/image-upload-field.config.d.ts +47 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/input-field.config.d.ts +1 -1
- package/lib/models/radio-field.config.d.ts +1 -1
- package/lib/models/unit-conversion-field.config.d.ts +0 -1
- package/lib/pipes/crispr-pipes.module.d.ts +8 -0
- package/lib/pipes/initial-control-value.pipe.d.ts +3 -0
- package/lib/public_api.d.ts +1 -0
- package/lib/sub-group/index.d.ts +2 -0
- package/lib/sub-group/sub-group.component.d.ts +3 -0
- package/lib/sub-group/sub-group.module.d.ts +12 -0
- package/package.json +30 -15
- package/tft-crispr-forms-13.0.1.tgz +0 -0
- package/tft-crispr-forms.d.ts +1 -25
- package/bundles/tft-crispr-forms.umd.js +0 -1719
- package/bundles/tft-crispr-forms.umd.js.map +0 -1
- package/esm2015/index.js +0 -2
- package/esm2015/index.js.map +0 -1
- package/esm2015/index.metadata.json +0 -1
- package/esm2015/lib/abstracts/autocomplete-field.abstract.js +0 -27
- package/esm2015/lib/abstracts/autocomplete-field.abstract.js.map +0 -1
- package/esm2015/lib/abstracts/autocomplete-field.abstract.metadata.json +0 -1
- package/esm2015/lib/abstracts/crispr-control.mixin.js +0 -27
- package/esm2015/lib/abstracts/crispr-control.mixin.js.map +0 -1
- package/esm2015/lib/abstracts/crispr-control.mixin.metadata.json +0 -1
- package/esm2015/lib/abstracts/crispr-field.abstract.js +0 -14
- package/esm2015/lib/abstracts/crispr-field.abstract.js.map +0 -1
- package/esm2015/lib/abstracts/crispr-field.abstract.metadata.json +0 -1
- package/esm2015/lib/abstracts/index.js +0 -4
- package/esm2015/lib/abstracts/index.js.map +0 -1
- package/esm2015/lib/abstracts/index.metadata.json +0 -1
- package/esm2015/lib/crispr-forms.module.js +0 -41
- package/esm2015/lib/crispr-forms.module.js.map +0 -1
- package/esm2015/lib/crispr-forms.module.metadata.json +0 -1
- package/esm2015/lib/crispr-forms.module.ngfactory.js.map +0 -1
- package/esm2015/lib/field-component-map.const.js +0 -28
- package/esm2015/lib/field-component-map.const.js.map +0 -1
- package/esm2015/lib/field-component-map.const.metadata.json +0 -1
- package/esm2015/lib/field-container/field-container.component.js +0 -57
- package/esm2015/lib/field-container/field-container.component.js.map +0 -1
- package/esm2015/lib/field-container/field-container.component.metadata.json +0 -1
- package/esm2015/lib/field-container/field-container.component.ngfactory.js.map +0 -1
- package/esm2015/lib/field-container/field-container.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/field.directive.js +0 -55
- package/esm2015/lib/field.directive.js.map +0 -1
- package/esm2015/lib/field.directive.metadata.json +0 -1
- package/esm2015/lib/field.directive.ngfactory.js.map +0 -1
- package/esm2015/lib/form/form.component.js +0 -40
- package/esm2015/lib/form/form.component.js.map +0 -1
- package/esm2015/lib/form/form.component.metadata.json +0 -1
- package/esm2015/lib/form/form.component.ngfactory.js.map +0 -1
- package/esm2015/lib/form/form.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/form-group-list/form-group-list.component.js +0 -44
- package/esm2015/lib/form-group-list/form-group-list.component.js.map +0 -1
- package/esm2015/lib/form-group-list/form-group-list.component.metadata.json +0 -1
- package/esm2015/lib/form-group-list/form-group-list.component.ngfactory.js.map +0 -1
- package/esm2015/lib/form-group-list/form-group-list.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/form.helpers.js +0 -186
- package/esm2015/lib/form.helpers.js.map +0 -1
- package/esm2015/lib/form.helpers.metadata.json +0 -1
- package/esm2015/lib/form.operators.js +0 -24
- package/esm2015/lib/form.operators.js.map +0 -1
- package/esm2015/lib/form.operators.metadata.json +0 -1
- package/esm2015/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.js +0 -101
- package/esm2015/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.js.map +0 -1
- package/esm2015/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.metadata.json +0 -1
- package/esm2015/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/autocomplete-field/autocomplete-field.component.js +0 -57
- package/esm2015/lib/material/autocomplete-field/autocomplete-field.component.js.map +0 -1
- package/esm2015/lib/material/autocomplete-field/autocomplete-field.component.metadata.json +0 -1
- package/esm2015/lib/material/autocomplete-field/autocomplete-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/autocomplete-field/autocomplete-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/button/button.component.js +0 -30
- package/esm2015/lib/material/button/button.component.js.map +0 -1
- package/esm2015/lib/material/button/button.component.metadata.json +0 -1
- package/esm2015/lib/material/button/button.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/button/button.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/checkbox-field/checkbox-field.component.js +0 -25
- package/esm2015/lib/material/checkbox-field/checkbox-field.component.js.map +0 -1
- package/esm2015/lib/material/checkbox-field/checkbox-field.component.metadata.json +0 -1
- package/esm2015/lib/material/checkbox-field/checkbox-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/checkbox-field/checkbox-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/datepicker-field/datepicker-field.component.js +0 -45
- package/esm2015/lib/material/datepicker-field/datepicker-field.component.js.map +0 -1
- package/esm2015/lib/material/datepicker-field/datepicker-field.component.metadata.json +0 -1
- package/esm2015/lib/material/datepicker-field/datepicker-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/datepicker-field/datepicker-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/divider/divider.component.js +0 -20
- package/esm2015/lib/material/divider/divider.component.js.map +0 -1
- package/esm2015/lib/material/divider/divider.component.metadata.json +0 -1
- package/esm2015/lib/material/divider/divider.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/divider/divider.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/file-upload/file-dropzone.directive.js +0 -31
- package/esm2015/lib/material/file-upload/file-dropzone.directive.js.map +0 -1
- package/esm2015/lib/material/file-upload/file-dropzone.directive.metadata.json +0 -1
- package/esm2015/lib/material/file-upload/file-dropzone.directive.ngfactory.js.map +0 -1
- package/esm2015/lib/material/file-upload/file-upload.component.js +0 -80
- package/esm2015/lib/material/file-upload/file-upload.component.js.map +0 -1
- package/esm2015/lib/material/file-upload/file-upload.component.metadata.json +0 -1
- package/esm2015/lib/material/file-upload/file-upload.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/file-upload/file-upload.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/heading/heading.component.js +0 -23
- package/esm2015/lib/material/heading/heading.component.js.map +0 -1
- package/esm2015/lib/material/heading/heading.component.metadata.json +0 -1
- package/esm2015/lib/material/heading/heading.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/heading/heading.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/index.js +0 -15
- package/esm2015/lib/material/index.js.map +0 -1
- package/esm2015/lib/material/index.metadata.json +0 -1
- package/esm2015/lib/material/info/info.component.js +0 -15
- package/esm2015/lib/material/info/info.component.js.map +0 -1
- package/esm2015/lib/material/info/info.component.metadata.json +0 -1
- package/esm2015/lib/material/info/info.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/info/info.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/input-field/input-field.component.js +0 -22
- package/esm2015/lib/material/input-field/input-field.component.js.map +0 -1
- package/esm2015/lib/material/input-field/input-field.component.metadata.json +0 -1
- package/esm2015/lib/material/input-field/input-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/input-field/input-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/material.module.js +0 -107
- package/esm2015/lib/material/material.module.js.map +0 -1
- package/esm2015/lib/material/material.module.metadata.json +0 -1
- package/esm2015/lib/material/material.module.ngfactory.js.map +0 -1
- package/esm2015/lib/material/option/option.component.js +0 -15
- package/esm2015/lib/material/option/option.component.js.map +0 -1
- package/esm2015/lib/material/option/option.component.metadata.json +0 -1
- package/esm2015/lib/material/option/option.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/option/option.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/radio-field/radio-field.component.js +0 -25
- package/esm2015/lib/material/radio-field/radio-field.component.js.map +0 -1
- package/esm2015/lib/material/radio-field/radio-field.component.metadata.json +0 -1
- package/esm2015/lib/material/radio-field/radio-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/radio-field/radio-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/select-field/select-field.component.js +0 -50
- package/esm2015/lib/material/select-field/select-field.component.js.map +0 -1
- package/esm2015/lib/material/select-field/select-field.component.metadata.json +0 -1
- package/esm2015/lib/material/select-field/select-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/select-field/select-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/selected-file/selected-file.component.js +0 -17
- package/esm2015/lib/material/selected-file/selected-file.component.js.map +0 -1
- package/esm2015/lib/material/selected-file/selected-file.component.metadata.json +0 -1
- package/esm2015/lib/material/selected-file/selected-file.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/selected-file/selected-file.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/slider-field/slider-field.component.js +0 -26
- package/esm2015/lib/material/slider-field/slider-field.component.js.map +0 -1
- package/esm2015/lib/material/slider-field/slider-field.component.metadata.json +0 -1
- package/esm2015/lib/material/slider-field/slider-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/slider-field/slider-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/textarea-field/textarea-field.component.js +0 -22
- package/esm2015/lib/material/textarea-field/textarea-field.component.js.map +0 -1
- package/esm2015/lib/material/textarea-field/textarea-field.component.metadata.json +0 -1
- package/esm2015/lib/material/textarea-field/textarea-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/textarea-field/textarea-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/material/unit-conversion-field/unit-conversion-field.component.js +0 -63
- package/esm2015/lib/material/unit-conversion-field/unit-conversion-field.component.js.map +0 -1
- package/esm2015/lib/material/unit-conversion-field/unit-conversion-field.component.metadata.json +0 -1
- package/esm2015/lib/material/unit-conversion-field/unit-conversion-field.component.ngfactory.js.map +0 -1
- package/esm2015/lib/material/unit-conversion-field/unit-conversion-field.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/models/autocomplete-chiplist-field.config.js +0 -2
- package/esm2015/lib/models/autocomplete-chiplist-field.config.js.map +0 -1
- package/esm2015/lib/models/autocomplete-chiplist-field.config.metadata.json +0 -1
- package/esm2015/lib/models/autocomplete-field.config.js +0 -2
- package/esm2015/lib/models/autocomplete-field.config.js.map +0 -1
- package/esm2015/lib/models/autocomplete-field.config.metadata.json +0 -1
- package/esm2015/lib/models/button.config.js +0 -2
- package/esm2015/lib/models/button.config.js.map +0 -1
- package/esm2015/lib/models/button.config.metadata.json +0 -1
- package/esm2015/lib/models/checkbox-field.config.js +0 -2
- package/esm2015/lib/models/checkbox-field.config.js.map +0 -1
- package/esm2015/lib/models/checkbox-field.config.metadata.json +0 -1
- package/esm2015/lib/models/crispr-field.config.js +0 -22
- package/esm2015/lib/models/crispr-field.config.js.map +0 -1
- package/esm2015/lib/models/crispr-field.config.metadata.json +0 -1
- package/esm2015/lib/models/datepicker-field.config.js +0 -2
- package/esm2015/lib/models/datepicker-field.config.js.map +0 -1
- package/esm2015/lib/models/datepicker-field.config.metadata.json +0 -1
- package/esm2015/lib/models/divider.config.js +0 -2
- package/esm2015/lib/models/divider.config.js.map +0 -1
- package/esm2015/lib/models/divider.config.metadata.json +0 -1
- package/esm2015/lib/models/file-upload-field.config.js +0 -2
- package/esm2015/lib/models/file-upload-field.config.js.map +0 -1
- package/esm2015/lib/models/file-upload-field.config.metadata.json +0 -1
- package/esm2015/lib/models/form-group-list.config.js +0 -2
- package/esm2015/lib/models/form-group-list.config.js.map +0 -1
- package/esm2015/lib/models/form-group-list.config.metadata.json +0 -1
- package/esm2015/lib/models/heading.config.js +0 -3
- package/esm2015/lib/models/heading.config.js.map +0 -1
- package/esm2015/lib/models/heading.config.metadata.json +0 -1
- package/esm2015/lib/models/index.js +0 -16
- package/esm2015/lib/models/index.js.map +0 -1
- package/esm2015/lib/models/index.metadata.json +0 -1
- package/esm2015/lib/models/input-field.config.js +0 -2
- package/esm2015/lib/models/input-field.config.js.map +0 -1
- package/esm2015/lib/models/input-field.config.metadata.json +0 -1
- package/esm2015/lib/models/radio-field.config.js +0 -2
- package/esm2015/lib/models/radio-field.config.js.map +0 -1
- package/esm2015/lib/models/radio-field.config.metadata.json +0 -1
- package/esm2015/lib/models/select-field.config.js +0 -2
- package/esm2015/lib/models/select-field.config.js.map +0 -1
- package/esm2015/lib/models/select-field.config.metadata.json +0 -1
- package/esm2015/lib/models/slider-field.config.js +0 -2
- package/esm2015/lib/models/slider-field.config.js.map +0 -1
- package/esm2015/lib/models/slider-field.config.metadata.json +0 -1
- package/esm2015/lib/models/textarea-field.config.js +0 -2
- package/esm2015/lib/models/textarea-field.config.js.map +0 -1
- package/esm2015/lib/models/textarea-field.config.metadata.json +0 -1
- package/esm2015/lib/models/unit-conversion-field.config.js +0 -2
- package/esm2015/lib/models/unit-conversion-field.config.js.map +0 -1
- package/esm2015/lib/models/unit-conversion-field.config.metadata.json +0 -1
- package/esm2015/lib/pipes/initial-control-value.pipe.js +0 -16
- package/esm2015/lib/pipes/initial-control-value.pipe.js.map +0 -1
- package/esm2015/lib/pipes/initial-control-value.pipe.metadata.json +0 -1
- package/esm2015/lib/pipes/initial-control-value.pipe.ngfactory.js.map +0 -1
- package/esm2015/lib/public_api.js +0 -9
- package/esm2015/lib/public_api.js.map +0 -1
- package/esm2015/lib/public_api.metadata.json +0 -1
- package/esm2015/lib/sub-group/sub-group.component.js +0 -17
- package/esm2015/lib/sub-group/sub-group.component.js.map +0 -1
- package/esm2015/lib/sub-group/sub-group.component.metadata.json +0 -1
- package/esm2015/lib/sub-group/sub-group.component.ngfactory.js.map +0 -1
- package/esm2015/lib/sub-group/sub-group.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/tft-crispr-forms.js +0 -30
- package/esm2015/tft-crispr-forms.js.map +0 -1
- package/esm2015/tft-crispr-forms.metadata.json +0 -1
- package/fesm2015/tft-crispr-forms.js +0 -1263
- package/fesm2015/tft-crispr-forms.js.map +0 -1
- package/tft-crispr-forms-12.2.20.tgz +0 -0
- package/tft-crispr-forms.metadata.json +0 -1
|
@@ -1,1719 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('@angular/forms'), require('rxjs/operators'), require('@angular/core'), require('@angular/material/autocomplete'), require('@angular/cdk/keycodes'), require('@angular/cdk/portal'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/button-toggle'), require('@angular/material/checkbox'), require('@angular/material/chips'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/radio'), require('@angular/material/select'), require('@angular/material/slide-toggle'), require('@angular/material/slider'), require('@angular/material/tooltip'), require('@angular/material/divider'), require('@angular/material/progress-bar'), require('@tft/form-validation-handler'), require('@angular/material-moment-adapter')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@tft/crispr-forms', ['exports', 'rxjs', '@angular/forms', 'rxjs/operators', '@angular/core', '@angular/material/autocomplete', '@angular/cdk/keycodes', '@angular/cdk/portal', '@angular/common', '@angular/material/button', '@angular/material/button-toggle', '@angular/material/checkbox', '@angular/material/chips', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/radio', '@angular/material/select', '@angular/material/slide-toggle', '@angular/material/slider', '@angular/material/tooltip', '@angular/material/divider', '@angular/material/progress-bar', '@tft/form-validation-handler', '@angular/material-moment-adapter'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.tft = global.tft || {}, global.tft['crispr-forms'] = {}), global.rxjs, global.ng.forms, global.rxjs.operators, global.ng.core, global.ng.material.autocomplete, global.ng.cdk.keycodes, global.ng.cdk.portal, global.ng.common, global.ng.material.button, global.ng.material.buttonToggle, global.ng.material.checkbox, global.ng.material.chips, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.radio, global.ng.material.select, global.ng.material.slideToggle, global.ng.material.slider, global.ng.material.tooltip, global.ng.material.divider, global.ng.material.progressBar, global.formValidationHandler, global.ng.materialMomentAdapter));
|
|
5
|
-
}(this, (function (exports, rxjs, forms, operators, core, autocomplete, keycodes, portal, common, button, buttonToggle, checkbox, chips, datepicker, formField, icon, input, radio, select, slideToggle, slider, tooltip, divider, progressBar, formValidationHandler, materialMomentAdapter) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var DEFAULT_EMPTY_OPTIONS_MESSAGE = 'No Items';
|
|
8
|
-
|
|
9
|
-
// export type ControlType = keyof typeof FIELD_COMPONENTS;
|
|
10
|
-
exports.ControlType = void 0;
|
|
11
|
-
(function (ControlType) {
|
|
12
|
-
ControlType["AUTOCOMPLETE"] = "autocomplete";
|
|
13
|
-
ControlType["AUTOCOMPLETE_CHIPLIST"] = "autocompleteChiplist";
|
|
14
|
-
ControlType["BUTTON"] = "button";
|
|
15
|
-
ControlType["CHECKBOX"] = "checkbox";
|
|
16
|
-
ControlType["CUSTOM"] = "custom";
|
|
17
|
-
ControlType["DATEPICKER"] = "datepicker";
|
|
18
|
-
ControlType["DIVIDER"] = "divider";
|
|
19
|
-
ControlType["FILE_UPLOAD"] = "fileUpload";
|
|
20
|
-
ControlType["HEADING"] = "heading";
|
|
21
|
-
ControlType["INPUT"] = "input";
|
|
22
|
-
ControlType["GROUP_LIST"] = "groupList";
|
|
23
|
-
ControlType["RADIO"] = "radio";
|
|
24
|
-
ControlType["SELECT"] = "select";
|
|
25
|
-
ControlType["SLIDER"] = "slider";
|
|
26
|
-
ControlType["SUB_GROUP"] = "subGroup";
|
|
27
|
-
ControlType["TEXTAREA"] = "textarea";
|
|
28
|
-
ControlType["UNIT_CONVERSION"] = "unitConversion";
|
|
29
|
-
})(exports.ControlType || (exports.ControlType = {}));
|
|
30
|
-
|
|
31
|
-
;
|
|
32
|
-
|
|
33
|
-
function valueIn(values) {
|
|
34
|
-
return operators.map(function (value) {
|
|
35
|
-
if (value) {
|
|
36
|
-
return values.some(function (v) {
|
|
37
|
-
if (isRegex(v)) {
|
|
38
|
-
var trimmedStringForRegex = v.substr(1, v.length - 2);
|
|
39
|
-
var regex = new RegExp(trimmedStringForRegex);
|
|
40
|
-
return regex.test(value);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return v === value;
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function isRegex(string) {
|
|
53
|
-
return string.startsWith('/') && string.endsWith('/');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Watches a single control for a list of values, returns true when field value matches any value in list
|
|
58
|
-
* unless an evaluate method is found on config, in which case that method is run on the returned boolean value
|
|
59
|
-
* @param group the direct parent of the field we want to watch
|
|
60
|
-
* @param config
|
|
61
|
-
*/
|
|
62
|
-
function checkControlForValues(group, config) {
|
|
63
|
-
// check that all the pieces we need are available
|
|
64
|
-
if (config && config.controlName && Array.isArray(config.values)) {
|
|
65
|
-
return getValueChanges(group, config.controlName).pipe(
|
|
66
|
-
// return a boolean, true if value is in the values being watch for, otherwise false
|
|
67
|
-
valueIn(config.values), operators.map(function (isValueInValues) {
|
|
68
|
-
// since we can only check if the value is in the list of watched values, the evaluate function gives us
|
|
69
|
-
// a chance to make other decisions based on if the boolean returned, e.g. return true if value not in watched values
|
|
70
|
-
if (config.evaluate && config.evaluate instanceof Function) {
|
|
71
|
-
return config.evaluate(isValueInValues);
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
return isValueInValues;
|
|
75
|
-
}
|
|
76
|
-
}));
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
//
|
|
80
|
-
return rxjs.of(true);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Watches a list of fields for individual lists of values returning true when any field contains one
|
|
85
|
-
* of the values being watched for, or optionally running a function on the array of resolved booleans
|
|
86
|
-
* from the listed fields and returning a boolean
|
|
87
|
-
* @param group the form group that has the fields to watch as direct descendants
|
|
88
|
-
* @param config the configuration to use when calling the function
|
|
89
|
-
*/
|
|
90
|
-
function checkControlsForValues(group, config) {
|
|
91
|
-
// if no config is passed we just want to show the field, so we return an observable of true
|
|
92
|
-
if (!config || !config.watchConfigs) {
|
|
93
|
-
return rxjs.of(true);
|
|
94
|
-
}
|
|
95
|
-
// we run checkControlForValues on every control in the list of WatchConfigs creating
|
|
96
|
-
// an array of Observable watching fields for values
|
|
97
|
-
var fieldTriggers = config.watchConfigs.map(function (watchConfig) {
|
|
98
|
-
// resolves a boolean, true when field value matches a watched value, otherwise false
|
|
99
|
-
return checkControlForValues(group, watchConfig);
|
|
100
|
-
});
|
|
101
|
-
return rxjs.combineLatest(fieldTriggers).pipe(operators.startWith([true]), operators.map(function (booleans) {
|
|
102
|
-
// if the user passed an evaluate function use it
|
|
103
|
-
if (config.evaluate && config.evaluate instanceof Function) {
|
|
104
|
-
return config.evaluate(booleans);
|
|
105
|
-
}
|
|
106
|
-
else { // otherwise we return true if any of the watched fields resolve to true
|
|
107
|
-
return booleans.some(function (bool) { return bool; });
|
|
108
|
-
}
|
|
109
|
-
}));
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Watches values on an array of fields, computing their values as they change
|
|
113
|
-
* @param group the group to get the fields from, for now it can only be the parent of the computed field
|
|
114
|
-
* @param computeFieldsConfig the configuration that drives the computation, holds the names to watch and the
|
|
115
|
-
* computation function that get called against the array of values
|
|
116
|
-
*/
|
|
117
|
-
function computeValueFromFields(group, computeFieldsConfig) {
|
|
118
|
-
// TODO: better checking
|
|
119
|
-
var controlNamesToWatch = computeFieldsConfig.controlNamesToWatch;
|
|
120
|
-
//creates an observable listener for each control in the controlNamesToWatch array
|
|
121
|
-
return rxjs.combineLatest(controlNamesToWatch.map(function (controlNameToWatch) { return getValueChanges(group, controlNameToWatch); })).pipe(
|
|
122
|
-
// each time a watched field values changes a new array of the latest field values is pipe through to the
|
|
123
|
-
// compute callback. Which runs the users logic on the values to compute this fields value
|
|
124
|
-
operators.map(function (valuesArray) { return computeFieldsConfig.computeCallback(valuesArray); }));
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* A simple wrapper for doing error checking around getting the valueChanges observable from a control on a form group
|
|
128
|
-
* @param group the form group we want to pull the observable from
|
|
129
|
-
* @param controlName the name of the control who's value we want to subscribe to
|
|
130
|
-
*/
|
|
131
|
-
function getValueChanges(group, controlName) {
|
|
132
|
-
var control = group.get(controlName);
|
|
133
|
-
if (!control) {
|
|
134
|
-
throw new Error("No control with controlName " + controlName);
|
|
135
|
-
}
|
|
136
|
-
return control.valueChanges;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* TODO: move to utils library after library is built
|
|
140
|
-
* Allows developer to pass an array of operators into the pipe of an Observable.
|
|
141
|
-
* Useful for creating function with a variable amount of operators to be run
|
|
142
|
-
* @param observable the observable to pass the operators to
|
|
143
|
-
* @param operators array of operators to pipe
|
|
144
|
-
*/
|
|
145
|
-
function pipeOperatorsIntoObservable(observable, operators) {
|
|
146
|
-
try {
|
|
147
|
-
return operators.reduce(function (obs, op) {
|
|
148
|
-
return obs.pipe(op);
|
|
149
|
-
}, observable);
|
|
150
|
-
}
|
|
151
|
-
catch (_a) {
|
|
152
|
-
console.error('Unable to pipe operators into observable');
|
|
153
|
-
return rxjs.of(null);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
function callOptionsIfFunction(options, parentGroup, searchString) {
|
|
157
|
-
return options instanceof Function ? options(parentGroup, searchString) : options;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* The user can give us select options as an array, a function that resolves to a promise,
|
|
161
|
-
* or an observable. This functions consumes any of those and returns an observable that
|
|
162
|
-
* resolves an array of options
|
|
163
|
-
*
|
|
164
|
-
* @param options the options passed in from the config
|
|
165
|
-
* @param emptyMessageOption the message to display when the array is empty
|
|
166
|
-
*/
|
|
167
|
-
function observablifyOptions(options, parentGroup, searchString) {
|
|
168
|
-
var calledOptions = callOptionsIfFunction(options, parentGroup, searchString);
|
|
169
|
-
// if options are a promise
|
|
170
|
-
return calledOptions instanceof Promise
|
|
171
|
-
// convert to observable
|
|
172
|
-
? rxjs.from(calledOptions)
|
|
173
|
-
// if array that isn't empty
|
|
174
|
-
: Array.isArray(calledOptions) && calledOptions.length
|
|
175
|
-
// convert to observable
|
|
176
|
-
? rxjs.of(calledOptions)
|
|
177
|
-
// if observable
|
|
178
|
-
: rxjs.isObservable(calledOptions)
|
|
179
|
-
// return it
|
|
180
|
-
? calledOptions
|
|
181
|
-
// else an empty array
|
|
182
|
-
: rxjs.of([]);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Determines if the field config is for a form control (not a divider, heading or other non-control field)
|
|
186
|
-
* */
|
|
187
|
-
function isControlConfig(fieldConfig) {
|
|
188
|
-
return 'controlName' in fieldConfig;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* builds out form group based on config
|
|
192
|
-
* @param config a configuration for a form group
|
|
193
|
-
* @param value an object of initial values to pass in
|
|
194
|
-
* @param group the form group to modify and build out
|
|
195
|
-
*/
|
|
196
|
-
function buildFormGroupFromConfig(config, value, group) {
|
|
197
|
-
if (value === void 0) { value = null; }
|
|
198
|
-
if (group === void 0) { group = new forms.FormGroup({}); }
|
|
199
|
-
config.fields.forEach(function (controlConfig) {
|
|
200
|
-
var _a;
|
|
201
|
-
if (isControlConfig(controlConfig)) {
|
|
202
|
-
// then add a control to the group using the controlName from configuration
|
|
203
|
-
var controlName = controlConfig.controlName;
|
|
204
|
-
// if there's a value object and it has a non-null/undefined value for this field use it.
|
|
205
|
-
// Otherwise, default to null
|
|
206
|
-
var controlValue = (_a = (value && value[controlName])) !== null && _a !== void 0 ? _a : null;
|
|
207
|
-
group.addControl(controlName, createControlForType(controlConfig, controlValue));
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
group.setValidators(config.validators);
|
|
211
|
-
return group;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Analyze the config and build a form control to spec. Notice we don't use FormBuilder here
|
|
215
|
-
* as we want to keep this function pure.
|
|
216
|
-
* @param controlConfig the configuration object for the control to build
|
|
217
|
-
* @param value an initial value to use if passed in
|
|
218
|
-
*/
|
|
219
|
-
function createControlForType(controlConfig, value) {
|
|
220
|
-
if (value === void 0) { value = null; }
|
|
221
|
-
// build form control out based on the control type
|
|
222
|
-
var control = controlConfig.controlType === exports.ControlType.SUB_GROUP
|
|
223
|
-
? buildFormGroupFromConfig(controlConfig, value)
|
|
224
|
-
: controlConfig.controlType === exports.ControlType.GROUP_LIST
|
|
225
|
-
? new forms.FormArray([], controlConfig.validators)
|
|
226
|
-
: new forms.FormControl(value || null, controlConfig.validators);
|
|
227
|
-
return control;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* A basic filter function that filters the search string against the label of the options object
|
|
231
|
-
* @param options the array of options to filter
|
|
232
|
-
* @param searchString the string from the input
|
|
233
|
-
*/
|
|
234
|
-
function filterOptionsByLabel(options, searchString) {
|
|
235
|
-
return options.filter(function (option) {
|
|
236
|
-
return option.label && option.label.toLowerCase().includes(searchString.toLowerCase());
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/*! *****************************************************************************
|
|
241
|
-
Copyright (c) Microsoft Corporation.
|
|
242
|
-
|
|
243
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
244
|
-
purpose with or without fee is hereby granted.
|
|
245
|
-
|
|
246
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
247
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
248
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
249
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
250
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
251
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
252
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
253
|
-
***************************************************************************** */
|
|
254
|
-
/* global Reflect, Promise */
|
|
255
|
-
var extendStatics = function (d, b) {
|
|
256
|
-
extendStatics = Object.setPrototypeOf ||
|
|
257
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
258
|
-
function (d, b) { for (var p in b)
|
|
259
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
260
|
-
d[p] = b[p]; };
|
|
261
|
-
return extendStatics(d, b);
|
|
262
|
-
};
|
|
263
|
-
function __extends(d, b) {
|
|
264
|
-
if (typeof b !== "function" && b !== null)
|
|
265
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
266
|
-
extendStatics(d, b);
|
|
267
|
-
function __() { this.constructor = d; }
|
|
268
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
269
|
-
}
|
|
270
|
-
var __assign = function () {
|
|
271
|
-
__assign = Object.assign || function __assign(t) {
|
|
272
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
273
|
-
s = arguments[i];
|
|
274
|
-
for (var p in s)
|
|
275
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
276
|
-
t[p] = s[p];
|
|
277
|
-
}
|
|
278
|
-
return t;
|
|
279
|
-
};
|
|
280
|
-
return __assign.apply(this, arguments);
|
|
281
|
-
};
|
|
282
|
-
function __rest(s, e) {
|
|
283
|
-
var t = {};
|
|
284
|
-
for (var p in s)
|
|
285
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
286
|
-
t[p] = s[p];
|
|
287
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
288
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
289
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
290
|
-
t[p[i]] = s[p[i]];
|
|
291
|
-
}
|
|
292
|
-
return t;
|
|
293
|
-
}
|
|
294
|
-
function __decorate(decorators, target, key, desc) {
|
|
295
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
296
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
297
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
298
|
-
else
|
|
299
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
300
|
-
if (d = decorators[i])
|
|
301
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
302
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
303
|
-
}
|
|
304
|
-
function __param(paramIndex, decorator) {
|
|
305
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
306
|
-
}
|
|
307
|
-
function __metadata(metadataKey, metadataValue) {
|
|
308
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
309
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
310
|
-
}
|
|
311
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
312
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
313
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
314
|
-
function fulfilled(value) { try {
|
|
315
|
-
step(generator.next(value));
|
|
316
|
-
}
|
|
317
|
-
catch (e) {
|
|
318
|
-
reject(e);
|
|
319
|
-
} }
|
|
320
|
-
function rejected(value) { try {
|
|
321
|
-
step(generator["throw"](value));
|
|
322
|
-
}
|
|
323
|
-
catch (e) {
|
|
324
|
-
reject(e);
|
|
325
|
-
} }
|
|
326
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
327
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
function __generator(thisArg, body) {
|
|
331
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
332
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
333
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
334
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
335
|
-
function step(op) {
|
|
336
|
-
if (f)
|
|
337
|
-
throw new TypeError("Generator is already executing.");
|
|
338
|
-
while (_)
|
|
339
|
-
try {
|
|
340
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
341
|
-
return t;
|
|
342
|
-
if (y = 0, t)
|
|
343
|
-
op = [op[0] & 2, t.value];
|
|
344
|
-
switch (op[0]) {
|
|
345
|
-
case 0:
|
|
346
|
-
case 1:
|
|
347
|
-
t = op;
|
|
348
|
-
break;
|
|
349
|
-
case 4:
|
|
350
|
-
_.label++;
|
|
351
|
-
return { value: op[1], done: false };
|
|
352
|
-
case 5:
|
|
353
|
-
_.label++;
|
|
354
|
-
y = op[1];
|
|
355
|
-
op = [0];
|
|
356
|
-
continue;
|
|
357
|
-
case 7:
|
|
358
|
-
op = _.ops.pop();
|
|
359
|
-
_.trys.pop();
|
|
360
|
-
continue;
|
|
361
|
-
default:
|
|
362
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
363
|
-
_ = 0;
|
|
364
|
-
continue;
|
|
365
|
-
}
|
|
366
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
367
|
-
_.label = op[1];
|
|
368
|
-
break;
|
|
369
|
-
}
|
|
370
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
371
|
-
_.label = t[1];
|
|
372
|
-
t = op;
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
if (t && _.label < t[2]) {
|
|
376
|
-
_.label = t[2];
|
|
377
|
-
_.ops.push(op);
|
|
378
|
-
break;
|
|
379
|
-
}
|
|
380
|
-
if (t[2])
|
|
381
|
-
_.ops.pop();
|
|
382
|
-
_.trys.pop();
|
|
383
|
-
continue;
|
|
384
|
-
}
|
|
385
|
-
op = body.call(thisArg, _);
|
|
386
|
-
}
|
|
387
|
-
catch (e) {
|
|
388
|
-
op = [6, e];
|
|
389
|
-
y = 0;
|
|
390
|
-
}
|
|
391
|
-
finally {
|
|
392
|
-
f = t = 0;
|
|
393
|
-
}
|
|
394
|
-
if (op[0] & 5)
|
|
395
|
-
throw op[1];
|
|
396
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
400
|
-
if (k2 === undefined)
|
|
401
|
-
k2 = k;
|
|
402
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
403
|
-
}) : (function (o, m, k, k2) {
|
|
404
|
-
if (k2 === undefined)
|
|
405
|
-
k2 = k;
|
|
406
|
-
o[k2] = m[k];
|
|
407
|
-
});
|
|
408
|
-
function __exportStar(m, o) {
|
|
409
|
-
for (var p in m)
|
|
410
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
411
|
-
__createBinding(o, m, p);
|
|
412
|
-
}
|
|
413
|
-
function __values(o) {
|
|
414
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
415
|
-
if (m)
|
|
416
|
-
return m.call(o);
|
|
417
|
-
if (o && typeof o.length === "number")
|
|
418
|
-
return {
|
|
419
|
-
next: function () {
|
|
420
|
-
if (o && i >= o.length)
|
|
421
|
-
o = void 0;
|
|
422
|
-
return { value: o && o[i++], done: !o };
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
426
|
-
}
|
|
427
|
-
function __read(o, n) {
|
|
428
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
429
|
-
if (!m)
|
|
430
|
-
return o;
|
|
431
|
-
var i = m.call(o), r, ar = [], e;
|
|
432
|
-
try {
|
|
433
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
434
|
-
ar.push(r.value);
|
|
435
|
-
}
|
|
436
|
-
catch (error) {
|
|
437
|
-
e = { error: error };
|
|
438
|
-
}
|
|
439
|
-
finally {
|
|
440
|
-
try {
|
|
441
|
-
if (r && !r.done && (m = i["return"]))
|
|
442
|
-
m.call(i);
|
|
443
|
-
}
|
|
444
|
-
finally {
|
|
445
|
-
if (e)
|
|
446
|
-
throw e.error;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
return ar;
|
|
450
|
-
}
|
|
451
|
-
/** @deprecated */
|
|
452
|
-
function __spread() {
|
|
453
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
454
|
-
ar = ar.concat(__read(arguments[i]));
|
|
455
|
-
return ar;
|
|
456
|
-
}
|
|
457
|
-
/** @deprecated */
|
|
458
|
-
function __spreadArrays() {
|
|
459
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
460
|
-
s += arguments[i].length;
|
|
461
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
462
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
463
|
-
r[k] = a[j];
|
|
464
|
-
return r;
|
|
465
|
-
}
|
|
466
|
-
function __spreadArray(to, from) {
|
|
467
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
468
|
-
to[j] = from[i];
|
|
469
|
-
return to;
|
|
470
|
-
}
|
|
471
|
-
function __await(v) {
|
|
472
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
473
|
-
}
|
|
474
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
475
|
-
if (!Symbol.asyncIterator)
|
|
476
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
477
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
478
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
479
|
-
function verb(n) { if (g[n])
|
|
480
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
481
|
-
function resume(n, v) { try {
|
|
482
|
-
step(g[n](v));
|
|
483
|
-
}
|
|
484
|
-
catch (e) {
|
|
485
|
-
settle(q[0][3], e);
|
|
486
|
-
} }
|
|
487
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
488
|
-
function fulfill(value) { resume("next", value); }
|
|
489
|
-
function reject(value) { resume("throw", value); }
|
|
490
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
491
|
-
resume(q[0][0], q[0][1]); }
|
|
492
|
-
}
|
|
493
|
-
function __asyncDelegator(o) {
|
|
494
|
-
var i, p;
|
|
495
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
496
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
497
|
-
}
|
|
498
|
-
function __asyncValues(o) {
|
|
499
|
-
if (!Symbol.asyncIterator)
|
|
500
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
501
|
-
var m = o[Symbol.asyncIterator], i;
|
|
502
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
503
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
504
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
505
|
-
}
|
|
506
|
-
function __makeTemplateObject(cooked, raw) {
|
|
507
|
-
if (Object.defineProperty) {
|
|
508
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
509
|
-
}
|
|
510
|
-
else {
|
|
511
|
-
cooked.raw = raw;
|
|
512
|
-
}
|
|
513
|
-
return cooked;
|
|
514
|
-
}
|
|
515
|
-
;
|
|
516
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
517
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
518
|
-
}) : function (o, v) {
|
|
519
|
-
o["default"] = v;
|
|
520
|
-
};
|
|
521
|
-
function __importStar(mod) {
|
|
522
|
-
if (mod && mod.__esModule)
|
|
523
|
-
return mod;
|
|
524
|
-
var result = {};
|
|
525
|
-
if (mod != null)
|
|
526
|
-
for (var k in mod)
|
|
527
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
528
|
-
__createBinding(result, mod, k);
|
|
529
|
-
__setModuleDefault(result, mod);
|
|
530
|
-
return result;
|
|
531
|
-
}
|
|
532
|
-
function __importDefault(mod) {
|
|
533
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
534
|
-
}
|
|
535
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
536
|
-
if (kind === "a" && !f)
|
|
537
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
538
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
539
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
540
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
541
|
-
}
|
|
542
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
543
|
-
if (kind === "m")
|
|
544
|
-
throw new TypeError("Private method is not writable");
|
|
545
|
-
if (kind === "a" && !f)
|
|
546
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
547
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
548
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
549
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
function crisprControlMixin(BaseClass) {
|
|
553
|
-
return /** @class */ (function (_super) {
|
|
554
|
-
__extends(class_1, _super);
|
|
555
|
-
function class_1() {
|
|
556
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
557
|
-
}
|
|
558
|
-
Object.defineProperty(class_1.prototype, "value", {
|
|
559
|
-
get: function () {
|
|
560
|
-
return this._value;
|
|
561
|
-
},
|
|
562
|
-
set: function (value) {
|
|
563
|
-
this.setControlValue(value);
|
|
564
|
-
this._value = value;
|
|
565
|
-
},
|
|
566
|
-
enumerable: false,
|
|
567
|
-
configurable: true
|
|
568
|
-
});
|
|
569
|
-
class_1.prototype.ngOnInit = function () {
|
|
570
|
-
var _this = this;
|
|
571
|
-
_super.prototype.ngOnInit.call(this);
|
|
572
|
-
this.control = this.group.get(this.config.controlName);
|
|
573
|
-
this.setControlValue(this.value);
|
|
574
|
-
// setTimeouts are ugly but this seems to be the only way to get the computed field to compute initial values
|
|
575
|
-
setTimeout(function () {
|
|
576
|
-
_this.control.updateValueAndValidity();
|
|
577
|
-
});
|
|
578
|
-
};
|
|
579
|
-
class_1.prototype.setControlValue = function (value) {
|
|
580
|
-
if (value && this.control && this.config.controlType !== exports.ControlType.SUB_GROUP) {
|
|
581
|
-
this.control.setValue(value);
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
return class_1;
|
|
585
|
-
}(BaseClass));
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
589
|
-
var CrisprFieldComponent = /** @class */ (function () {
|
|
590
|
-
function CrisprFieldComponent() {
|
|
591
|
-
}
|
|
592
|
-
CrisprFieldComponent.prototype.ngOnInit = function () {
|
|
593
|
-
this.applyDefaultConfig();
|
|
594
|
-
};
|
|
595
|
-
CrisprFieldComponent.prototype.applyDefaultConfig = function () {
|
|
596
|
-
this.config = this.defaultConfig ? Object.assign(Object.assign({}, this.defaultConfig), this.config) : this.config;
|
|
597
|
-
};
|
|
598
|
-
return CrisprFieldComponent;
|
|
599
|
-
}());
|
|
600
|
-
CrisprFieldComponent.decorators = [
|
|
601
|
-
{ type: core.Directive }
|
|
602
|
-
];
|
|
603
|
-
|
|
604
|
-
var AbstractAutocompleteFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
605
|
-
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
606
|
-
var AbstractAutocompleteComponent = /** @class */ (function (_super) {
|
|
607
|
-
__extends(AbstractAutocompleteComponent, _super);
|
|
608
|
-
function AbstractAutocompleteComponent() {
|
|
609
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
610
|
-
// we need a separate control for the UI because of the way the material autocomplete chiplist works
|
|
611
|
-
_this.autocompleteInputControl = new forms.FormControl('');
|
|
612
|
-
return _this;
|
|
613
|
-
}
|
|
614
|
-
AbstractAutocompleteComponent.prototype.ngOnInit = function () {
|
|
615
|
-
var _this = this;
|
|
616
|
-
_super.prototype.ngOnInit.call(this);
|
|
617
|
-
this.group.addControl(this.config.controlName, new forms.FormControl());
|
|
618
|
-
// filter options by the search string using either the default filter function or one passed in through config
|
|
619
|
-
this.options$ = this.autocompleteInputControl.valueChanges.pipe(
|
|
620
|
-
// this is needed to have the options panel to open on focus
|
|
621
|
-
operators.startWith(''), operators.debounceTime(this.config.typeDebounceTime), operators.distinctUntilChanged(), operators.map(function (searchText) { return searchText || ''; }), operators.switchMap(function (searchText) { return observablifyOptions(_this.config.options, _this.group, searchText); }));
|
|
622
|
-
};
|
|
623
|
-
return AbstractAutocompleteComponent;
|
|
624
|
-
}(AbstractAutocompleteFieldMixin));
|
|
625
|
-
AbstractAutocompleteComponent.decorators = [
|
|
626
|
-
{ type: core.Directive }
|
|
627
|
-
];
|
|
628
|
-
|
|
629
|
-
var InputFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
630
|
-
var InputFieldComponent = /** @class */ (function (_super) {
|
|
631
|
-
__extends(InputFieldComponent, _super);
|
|
632
|
-
function InputFieldComponent() {
|
|
633
|
-
var _this = _super.call(this) || this;
|
|
634
|
-
_this.defaultConfig = { inputType: 'text' };
|
|
635
|
-
return _this;
|
|
636
|
-
}
|
|
637
|
-
InputFieldComponent.prototype.ngOnInit = function () {
|
|
638
|
-
_super.prototype.ngOnInit.call(this);
|
|
639
|
-
};
|
|
640
|
-
return InputFieldComponent;
|
|
641
|
-
}(InputFieldMixin));
|
|
642
|
-
InputFieldComponent.decorators = [
|
|
643
|
-
{ type: core.Component, args: [{
|
|
644
|
-
selector: 'crispr-input-field',
|
|
645
|
-
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 *ngIf=\"config.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-form-field>\n\n\n</crispr-field-container>\n",
|
|
646
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
647
|
-
styles: [""]
|
|
648
|
-
},] }
|
|
649
|
-
];
|
|
650
|
-
InputFieldComponent.ctorParameters = function () { return []; };
|
|
651
|
-
|
|
652
|
-
var SelectFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
653
|
-
var SelectFieldComponent = /** @class */ (function (_super) {
|
|
654
|
-
__extends(SelectFieldComponent, _super);
|
|
655
|
-
function SelectFieldComponent() {
|
|
656
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
657
|
-
_this.defaultConfig = {
|
|
658
|
-
enableToggleAll: false,
|
|
659
|
-
color: 'primary'
|
|
660
|
-
};
|
|
661
|
-
_this.allSelected = false;
|
|
662
|
-
return _this;
|
|
663
|
-
}
|
|
664
|
-
SelectFieldComponent.prototype.ngOnInit = function () {
|
|
665
|
-
_super.prototype.ngOnInit.call(this);
|
|
666
|
-
// options$ can be passed as an array, promise that resolves array, or observable that resolves array
|
|
667
|
-
// this functions accounts for all possibilities and converts to observable that resolves array
|
|
668
|
-
this.options$ = observablifyOptions(this.config.options, this.group);
|
|
669
|
-
};
|
|
670
|
-
SelectFieldComponent.prototype.ngAfterViewInit = function () {
|
|
671
|
-
var _a, _b;
|
|
672
|
-
if (this.config.multiple
|
|
673
|
-
&& this.config.enableToggleAll
|
|
674
|
-
&& ((_a = this.selectField.options) === null || _a === void 0 ? void 0 : _a.length) === ((_b = this.value) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
675
|
-
this.allSelected = true;
|
|
676
|
-
}
|
|
677
|
-
};
|
|
678
|
-
SelectFieldComponent.prototype.toggleAll = function (isSelected) {
|
|
679
|
-
if (isSelected) {
|
|
680
|
-
this.selectField.options.forEach(function (option) { return option.deselect(); });
|
|
681
|
-
}
|
|
682
|
-
else {
|
|
683
|
-
this.selectField.options.forEach(function (option) { return option.select(); });
|
|
684
|
-
}
|
|
685
|
-
this.allSelected = !this.allSelected;
|
|
686
|
-
};
|
|
687
|
-
return SelectFieldComponent;
|
|
688
|
-
}(SelectFieldMixin));
|
|
689
|
-
SelectFieldComponent.decorators = [
|
|
690
|
-
{ type: core.Component, args: [{
|
|
691
|
-
selector: 'crispr-select-field',
|
|
692
|
-
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 </mat-form-field>\n\n</crispr-field-container>\n",
|
|
693
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
694
|
-
styles: ["mat-checkbox{display:block;padding:16px}"]
|
|
695
|
-
},] }
|
|
696
|
-
];
|
|
697
|
-
SelectFieldComponent.propDecorators = {
|
|
698
|
-
selectField: [{ type: core.ViewChild, args: ['selectField',] }]
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
var defaultConfig$8 = {
|
|
702
|
-
autoActiveFirstOption: true,
|
|
703
|
-
typeDebounceTime: 500,
|
|
704
|
-
emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE
|
|
705
|
-
};
|
|
706
|
-
var AutocompleteFieldComponent = /** @class */ (function (_super) {
|
|
707
|
-
__extends(AutocompleteFieldComponent, _super);
|
|
708
|
-
function AutocompleteFieldComponent() {
|
|
709
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
710
|
-
_this.defaultConfig = defaultConfig$8;
|
|
711
|
-
return _this;
|
|
712
|
-
}
|
|
713
|
-
AutocompleteFieldComponent.prototype.ngOnInit = function () {
|
|
714
|
-
_super.prototype.ngOnInit.call(this);
|
|
715
|
-
};
|
|
716
|
-
AutocompleteFieldComponent.prototype.setControlValue = function (value) {
|
|
717
|
-
if (this.control && value) {
|
|
718
|
-
// sets the initial value on the control if one is passed
|
|
719
|
-
this.control.setValue(value.value || '');
|
|
720
|
-
this.autocompleteInputControl.setValue(value.label || '');
|
|
721
|
-
}
|
|
722
|
-
};
|
|
723
|
-
/**
|
|
724
|
-
* The material autocomplete defaults to displaying the options value instead of its label.
|
|
725
|
-
* We only have the value from the selected option to work with, so we have to pass the options
|
|
726
|
-
* through a function called in the template and return the function that the material displayWith
|
|
727
|
-
* input is expecting.
|
|
728
|
-
* @param options the array of options to search for option with corresponding value
|
|
729
|
-
*/
|
|
730
|
-
AutocompleteFieldComponent.prototype.displayLabel = function (options) {
|
|
731
|
-
return function (value) {
|
|
732
|
-
var _a;
|
|
733
|
-
return !!options && Array.isArray(options)
|
|
734
|
-
? (_a = options.find(function (option) { return option.value === value; })) === null || _a === void 0 ? void 0 : _a.label
|
|
735
|
-
: value;
|
|
736
|
-
};
|
|
737
|
-
};
|
|
738
|
-
AutocompleteFieldComponent.prototype.handleSelect = function (event) {
|
|
739
|
-
this.control.setValue(event.option.value);
|
|
740
|
-
this.autoInputRef.nativeElement.blur();
|
|
741
|
-
};
|
|
742
|
-
return AutocompleteFieldComponent;
|
|
743
|
-
}(AbstractAutocompleteComponent));
|
|
744
|
-
AutocompleteFieldComponent.decorators = [
|
|
745
|
-
{ type: core.Component, args: [{
|
|
746
|
-
selector: 'crispr-autocomplete-field',
|
|
747
|
-
template: "\n<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config.placeholder\"\n [matAutocomplete]=\"auto\"\n role=\"textbox\"\n type=\"textbox\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n #autoInput>\n\n <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-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"config.autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"displayLabel(options$ | async)\">\n\n <ng-container *ngIf=\"options$ | async as options; else emptyOption\">\n <ng-container *ngIf=\"options.length > 0; else emptyOption\">\n <mat-option\n *ngFor=\"let option of options$ | async\"\n [value]=\"option.value\">\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\n </mat-autocomplete>\n </mat-form-field>\n</crispr-field-container>\n",
|
|
748
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
749
|
-
styles: [""]
|
|
750
|
-
},] }
|
|
751
|
-
];
|
|
752
|
-
AutocompleteFieldComponent.propDecorators = {
|
|
753
|
-
autoInput: [{ type: core.ViewChild, args: ['autoInput', { read: autocomplete.MatAutocompleteTrigger },] }],
|
|
754
|
-
autoInputRef: [{ type: core.ViewChild, args: ['autoInput',] }]
|
|
755
|
-
};
|
|
756
|
-
|
|
757
|
-
var ɵ0 = function (chip, option) { return chip.value === option.value; };
|
|
758
|
-
var defaultConfig$7 = {
|
|
759
|
-
chipsSelectable: true,
|
|
760
|
-
areChipsRemovable: true,
|
|
761
|
-
tabToSelect: true,
|
|
762
|
-
autoActiveFirstOption: true,
|
|
763
|
-
imageUrlParam: 'image',
|
|
764
|
-
typeDebounceTime: 500,
|
|
765
|
-
allowDuplicates: false,
|
|
766
|
-
duplicateCompareFunction: ɵ0,
|
|
767
|
-
separatorKeyCodes: [keycodes.ENTER],
|
|
768
|
-
emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,
|
|
769
|
-
};
|
|
770
|
-
var AutocompleteChiplistFieldComponent = /** @class */ (function (_super) {
|
|
771
|
-
__extends(AutocompleteChiplistFieldComponent, _super);
|
|
772
|
-
function AutocompleteChiplistFieldComponent() {
|
|
773
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
774
|
-
_this.defaultConfig = defaultConfig$7;
|
|
775
|
-
_this.chips$ = new rxjs.BehaviorSubject([]);
|
|
776
|
-
_this.controlValue$ = _this.chips$.pipe(operators.tap(function (chips) {
|
|
777
|
-
_this.control.setValue(chips.map(function (chip) { return chip.value; }));
|
|
778
|
-
}));
|
|
779
|
-
return _this;
|
|
780
|
-
}
|
|
781
|
-
AutocompleteChiplistFieldComponent.prototype.ngOnInit = function () {
|
|
782
|
-
var _this = this;
|
|
783
|
-
_super.prototype.ngOnInit.call(this);
|
|
784
|
-
this.remainingOptions$ = rxjs.combineLatest([
|
|
785
|
-
this.chips$,
|
|
786
|
-
this.options$
|
|
787
|
-
]).pipe(operators.map(function (_b) {
|
|
788
|
-
var _c = __read(_b, 2), chips = _c[0], options = _c[1];
|
|
789
|
-
return _this.config.allowDuplicates
|
|
790
|
-
? options
|
|
791
|
-
: options === null || options === void 0 ? void 0 : options.filter(function (option) {
|
|
792
|
-
return !chips.some(function (chip) { return _this.config.duplicateCompareFunction(chip, option); });
|
|
793
|
-
});
|
|
794
|
-
}));
|
|
795
|
-
};
|
|
796
|
-
AutocompleteChiplistFieldComponent.prototype.setControlValue = function (value) {
|
|
797
|
-
if (value) {
|
|
798
|
-
this.chips$.next(value);
|
|
799
|
-
}
|
|
800
|
-
};
|
|
801
|
-
// handles mat selecting
|
|
802
|
-
AutocompleteChiplistFieldComponent.prototype.handleSelect = function (event) {
|
|
803
|
-
var _this = this;
|
|
804
|
-
var selectedOption = event.option.value;
|
|
805
|
-
this.chips$.next(__spreadArray(__spreadArray([], __read(this.chips$.value)), [selectedOption]));
|
|
806
|
-
this.chipInputRef.nativeElement.value = '';
|
|
807
|
-
this.autocompleteInputControl.setValue('');
|
|
808
|
-
// setTimeout needed because the panel thinks it's still open at this point
|
|
809
|
-
setTimeout(function () { return _this.chipInput.openPanel(); });
|
|
810
|
-
};
|
|
811
|
-
/**
|
|
812
|
-
* To follow ARIA standards we want to select the active option on blur.
|
|
813
|
-
* matChipInputAddOnBlur should do this but it causes buggy behaviour
|
|
814
|
-
* @param event blur event that triggers the handle blur
|
|
815
|
-
*/
|
|
816
|
-
AutocompleteChiplistFieldComponent.prototype.handleTab = function (_event) {
|
|
817
|
-
if (this.chipInput.activeOption && (this.config.tabToSelect || this.config.addChipOnBlur)) {
|
|
818
|
-
var chip = this.chipInput.activeOption.value;
|
|
819
|
-
this.chips$.next(__spreadArray(__spreadArray([], __read(this.chips$.value)), [chip]));
|
|
820
|
-
}
|
|
821
|
-
};
|
|
822
|
-
/**
|
|
823
|
-
* Handles selection via key tokens passed through separatorKeyCodes propert
|
|
824
|
-
* NOTE: If TAB is used focus does not move on to next component
|
|
825
|
-
* @param event
|
|
826
|
-
*/
|
|
827
|
-
AutocompleteChiplistFieldComponent.prototype.handleTokenEnd = function (event) {
|
|
828
|
-
var _a;
|
|
829
|
-
if (this.chipInput.activeOption) {
|
|
830
|
-
this.chipInput.activeOption.select();
|
|
831
|
-
}
|
|
832
|
-
(_a = event.chipInput) === null || _a === void 0 ? void 0 : _a.clear();
|
|
833
|
-
};
|
|
834
|
-
AutocompleteChiplistFieldComponent.prototype.mapToLabel = function (option) {
|
|
835
|
-
return option ? option.label : '';
|
|
836
|
-
};
|
|
837
|
-
AutocompleteChiplistFieldComponent.prototype.removeChip = function (removedChip) {
|
|
838
|
-
var remainingChips = this.chips$.value.filter(function (chip) { return chip !== removedChip; });
|
|
839
|
-
this.chips$.next(remainingChips);
|
|
840
|
-
};
|
|
841
|
-
return AutocompleteChiplistFieldComponent;
|
|
842
|
-
}(AbstractAutocompleteComponent));
|
|
843
|
-
AutocompleteChiplistFieldComponent.decorators = [
|
|
844
|
-
{ type: core.Component, args: [{
|
|
845
|
-
selector: 'crispr-autocomplete-chiplist-field',
|
|
846
|
-
template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n\n <mat-chip-list\n #chipList>\n <mat-chip\n class=\"refinement-chip\"\n *ngFor=\"let chip of controlValue$ | async\"\n [selectable]=\"config.chipsSelectable\"\n [removable]=\"config.areChipsRemovable\"\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>\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 #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-list>\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\n </mat-form-field>\n</crispr-field-container>\n",
|
|
847
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
848
|
-
styles: [".refinement-chip .image-container{width:26px;height:26px;border-radius:50%;overflow:hidden;margin:-2px 4px -2px -8px}.refinement-chip .image-container img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}"]
|
|
849
|
-
},] }
|
|
850
|
-
];
|
|
851
|
-
AutocompleteChiplistFieldComponent.propDecorators = {
|
|
852
|
-
chipInput: [{ type: core.ViewChild, args: ['autoInput', { read: autocomplete.MatAutocompleteTrigger },] }],
|
|
853
|
-
chipInputRef: [{ type: core.ViewChild, args: ['autoInput',] }]
|
|
854
|
-
};
|
|
855
|
-
|
|
856
|
-
var defaultConfig$6 = {
|
|
857
|
-
labelPosition: 'after',
|
|
858
|
-
inline: false
|
|
859
|
-
};
|
|
860
|
-
var CheckboxFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
861
|
-
var CheckboxFieldComponent = /** @class */ (function (_super) {
|
|
862
|
-
__extends(CheckboxFieldComponent, _super);
|
|
863
|
-
function CheckboxFieldComponent() {
|
|
864
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
865
|
-
_this.defaultConfig = defaultConfig$6;
|
|
866
|
-
return _this;
|
|
867
|
-
}
|
|
868
|
-
CheckboxFieldComponent.prototype.ngOnInit = function () {
|
|
869
|
-
_super.prototype.ngOnInit.call(this);
|
|
870
|
-
};
|
|
871
|
-
return CheckboxFieldComponent;
|
|
872
|
-
}(CheckboxFieldMixin));
|
|
873
|
-
CheckboxFieldComponent.decorators = [
|
|
874
|
-
{ type: core.Component, args: [{
|
|
875
|
-
selector: 'crispr-checkbox-field',
|
|
876
|
-
template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [inlineField]=\"config.inline\">\n <div\n [formGroup]=\"group\">\n <mat-checkbox\n [color]=\"config.color\"\n [labelPosition]=\"config.labelPosition\"\n [formControlName]=\"config.controlName\">\n {{config.label}}\n <crispr-info\n matSuffix *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </mat-checkbox>\n </div>\n</crispr-field-container>\n",
|
|
877
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
878
|
-
styles: [""]
|
|
879
|
-
},] }
|
|
880
|
-
];
|
|
881
|
-
|
|
882
|
-
var defaultConfig$5 = { rows: 5 };
|
|
883
|
-
var TextareaFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
884
|
-
var TextareaFieldComponent = /** @class */ (function (_super) {
|
|
885
|
-
__extends(TextareaFieldComponent, _super);
|
|
886
|
-
function TextareaFieldComponent() {
|
|
887
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
888
|
-
_this.defaultConfig = defaultConfig$5;
|
|
889
|
-
return _this;
|
|
890
|
-
}
|
|
891
|
-
TextareaFieldComponent.prototype.ngOnInit = function () {
|
|
892
|
-
_super.prototype.ngOnInit.call(this);
|
|
893
|
-
};
|
|
894
|
-
return TextareaFieldComponent;
|
|
895
|
-
}(TextareaFieldMixin));
|
|
896
|
-
TextareaFieldComponent.decorators = [
|
|
897
|
-
{ type: core.Component, args: [{
|
|
898
|
-
selector: 'crispr-textarea-field',
|
|
899
|
-
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 *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <textarea\n [rows]=\"config.rows\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\">\n </textarea>\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 </mat-form-field>\n\n</crispr-field-container>\n",
|
|
900
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
901
|
-
styles: [""]
|
|
902
|
-
},] }
|
|
903
|
-
];
|
|
904
|
-
|
|
905
|
-
var defaultConfig$4 = { displayLimits: true };
|
|
906
|
-
var SliderFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
907
|
-
var SliderFieldComponent = /** @class */ (function (_super) {
|
|
908
|
-
__extends(SliderFieldComponent, _super);
|
|
909
|
-
function SliderFieldComponent() {
|
|
910
|
-
var _this = _super.call(this) || this;
|
|
911
|
-
_this.defaultConfig = defaultConfig$4;
|
|
912
|
-
return _this;
|
|
913
|
-
}
|
|
914
|
-
Object.defineProperty(SliderFieldComponent.prototype, "flexDirection", {
|
|
915
|
-
get: function () {
|
|
916
|
-
return this.config.vertical ? 'column' : 'row';
|
|
917
|
-
},
|
|
918
|
-
enumerable: false,
|
|
919
|
-
configurable: true
|
|
920
|
-
});
|
|
921
|
-
SliderFieldComponent.prototype.ngOnInit = function () {
|
|
922
|
-
_super.prototype.ngOnInit.call(this);
|
|
923
|
-
};
|
|
924
|
-
return SliderFieldComponent;
|
|
925
|
-
}(SliderFieldMixin));
|
|
926
|
-
SliderFieldComponent.decorators = [
|
|
927
|
-
{ type: core.Component, args: [{
|
|
928
|
-
selector: 'crispr-slider-field',
|
|
929
|
-
template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <div\n [formGroup]=\"group\">\n <label *ngIf=\"config.label\">\n {{config.label}}\n <crispr-info\n *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </label>\n <div class=\"slider-container\"\n [ngStyle]=\"{'flex-direction': flexDirection}\">\n <span *ngIf=\"config.displayLimits\">\n {{config.min}}\n </span>\n <mat-slider\n class=\"example-margin\"\n [formControlName]=\"config.controlName\"\n [invert]=\"config.invert\"\n [max]=\"config.max\"\n [min]=\"config.min\"\n [step]=\"config.step\"\n [thumbLabel]=\"config.thumbLabel\"\n [tickInterval]=\"config.tickInterval\"\n [vertical]=\"config.vertical\">\n </mat-slider>\n <span *ngIf=\"config.displayLimits\">\n {{config.max}}\n </span>\n </div>\n\n </div>\n</crispr-field-container>\n\n",
|
|
930
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
931
|
-
styles: [".slider-container{display:flex;align-items:center}.slider-container .mat-slider-horizontal{width:100%}"]
|
|
932
|
-
},] }
|
|
933
|
-
];
|
|
934
|
-
SliderFieldComponent.ctorParameters = function () { return []; };
|
|
935
|
-
|
|
936
|
-
var ButtonComponent = /** @class */ (function (_super) {
|
|
937
|
-
__extends(ButtonComponent, _super);
|
|
938
|
-
function ButtonComponent() {
|
|
939
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
940
|
-
_this.defaultConfig = { buttonType: 'raised', type: 'submit' };
|
|
941
|
-
return _this;
|
|
942
|
-
}
|
|
943
|
-
Object.defineProperty(ButtonComponent.prototype, "matButtonClass", {
|
|
944
|
-
get: function () {
|
|
945
|
-
return this.config.buttonType ? "mat-" + this.config.buttonType + "-button" : '';
|
|
946
|
-
},
|
|
947
|
-
enumerable: false,
|
|
948
|
-
configurable: true
|
|
949
|
-
});
|
|
950
|
-
ButtonComponent.prototype.ngOnInit = function () {
|
|
951
|
-
_super.prototype.ngOnInit.call(this);
|
|
952
|
-
this.formValid$ = this.group.statusChanges.pipe(operators.map(function (status) { return status === 'VALID'; }), operators.startWith(this.group.valid));
|
|
953
|
-
};
|
|
954
|
-
ButtonComponent.prototype.handleClick = function (group, event) {
|
|
955
|
-
if (this.config.callback) {
|
|
956
|
-
this.config.callback(group, event);
|
|
957
|
-
}
|
|
958
|
-
};
|
|
959
|
-
return ButtonComponent;
|
|
960
|
-
}(CrisprFieldComponent));
|
|
961
|
-
ButtonComponent.decorators = [
|
|
962
|
-
{ type: core.Component, args: [{
|
|
963
|
-
selector: 'crispr-button',
|
|
964
|
-
template: "<button\n [formGroup]=\"group\"\n mat-button\n [ngClass]=\"matButtonClass\"\n [color]=\"config.color\"\n [disabled]=\"config.disabledOnInvalidForm && !(formValid$ | async)\"\n [type]=\"config.type\"\n (click)=\"handleClick(group, $event)\"\n [matTooltip]=\"config.info?.content\"\n [matTooltipPosition]=\"config.info?.tooltipPosition || 'below'\">\n {{ config.label }}\n <mat-icon *ngIf=\"config.icon\">\n {{ config.icon}}\n </mat-icon>\n</button>\n\n",
|
|
965
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
966
|
-
styles: [""]
|
|
967
|
-
},] }
|
|
968
|
-
];
|
|
969
|
-
|
|
970
|
-
var defaultConfig$3 = {
|
|
971
|
-
startView: 'month',
|
|
972
|
-
};
|
|
973
|
-
var DatepickerFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
974
|
-
var DatepickerFieldComponent = /** @class */ (function (_super) {
|
|
975
|
-
__extends(DatepickerFieldComponent, _super);
|
|
976
|
-
function DatepickerFieldComponent() {
|
|
977
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
978
|
-
_this.defaultConfig = defaultConfig$3;
|
|
979
|
-
return _this;
|
|
980
|
-
// handleSelectedChange(event, picker: MatDatepicker<unknown>) {
|
|
981
|
-
// console.log({event, picker})
|
|
982
|
-
// if(this.config.selectedChange) {
|
|
983
|
-
// this.config.selectedChange(event, picker);
|
|
984
|
-
// }
|
|
985
|
-
// }
|
|
986
|
-
}
|
|
987
|
-
DatepickerFieldComponent.prototype.ngOnInit = function () {
|
|
988
|
-
var _a, _b;
|
|
989
|
-
_super.prototype.ngOnInit.call(this);
|
|
990
|
-
this.startAt$ = this.config.startAt instanceof Date
|
|
991
|
-
? rxjs.of(this.config.startAt)
|
|
992
|
-
: this.config.startAt instanceof Function
|
|
993
|
-
? this.config.startAt(this.group)
|
|
994
|
-
: rxjs.of(null);
|
|
995
|
-
this.dateClass = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.cellClassFunction) || null;
|
|
996
|
-
this.dateClass$ = this.config.dateClass ? (_b = this.config) === null || _b === void 0 ? void 0 : _b.dateClass(this.group) : rxjs.of(function () { return ''; });
|
|
997
|
-
};
|
|
998
|
-
DatepickerFieldComponent.prototype.ngAfterContentInit = function () {
|
|
999
|
-
if (this.config.datepickerActions) {
|
|
1000
|
-
this.calendarFooterPortal = new portal.ComponentPortal(this.config.datepickerActions);
|
|
1001
|
-
}
|
|
1002
|
-
};
|
|
1003
|
-
return DatepickerFieldComponent;
|
|
1004
|
-
}(DatepickerFieldMixin));
|
|
1005
|
-
DatepickerFieldComponent.decorators = [
|
|
1006
|
-
{ type: core.Component, args: [{
|
|
1007
|
-
selector: 'crispr-datepicker-field',
|
|
1008
|
-
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 *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n matInput\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config.datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config.touchUi\"\n [startView]=\"config.startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n <mat-datepicker-actions *ngIf=\"calendarFooterPortal\">\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n </mat-datepicker>\n\n </mat-form-field>\n</crispr-field-container>\n\n",
|
|
1009
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1010
|
-
styles: [""]
|
|
1011
|
-
},] }
|
|
1012
|
-
];
|
|
1013
|
-
|
|
1014
|
-
var FileUploadFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
1015
|
-
var FileUploadComponent = /** @class */ (function (_super) {
|
|
1016
|
-
__extends(FileUploadComponent, _super);
|
|
1017
|
-
// ngControl: NgControl = null;
|
|
1018
|
-
function FileUploadComponent(ngControl) {
|
|
1019
|
-
var _this = _super.call(this) || this;
|
|
1020
|
-
_this.ngControl = ngControl;
|
|
1021
|
-
_this.defaultConfig = {
|
|
1022
|
-
allowMultipleFiles: false,
|
|
1023
|
-
acceptedTypes: '*.*',
|
|
1024
|
-
dropZoneText: 'DROP FILE HERE',
|
|
1025
|
-
selectFilesButtonType: 'button',
|
|
1026
|
-
selectButtonText: 'SELECT',
|
|
1027
|
-
showClearFilesButton: true,
|
|
1028
|
-
clearFilesButtonText: 'CLEAR',
|
|
1029
|
-
uploadButtonText: 'UPLOAD',
|
|
1030
|
-
uploadButtonType: 'button',
|
|
1031
|
-
showUploadProgress: false,
|
|
1032
|
-
disableOnUpload: true
|
|
1033
|
-
};
|
|
1034
|
-
_this.isUploaded = false;
|
|
1035
|
-
_this.fileProgress = [];
|
|
1036
|
-
if (_this.ngControl != null) {
|
|
1037
|
-
// Setting the value accessor directly (instead of using
|
|
1038
|
-
// the providers) to avoid running into a circular import.
|
|
1039
|
-
ngControl.valueAccessor = _this;
|
|
1040
|
-
}
|
|
1041
|
-
return _this;
|
|
1042
|
-
}
|
|
1043
|
-
FileUploadComponent.prototype.ngOnInit = function () {
|
|
1044
|
-
_super.prototype.ngOnInit.call(this);
|
|
1045
|
-
this.disabled$ = this.config.disabledCallback
|
|
1046
|
-
? this.config.disabledCallback(this.group, this.config)
|
|
1047
|
-
: rxjs.of(false);
|
|
1048
|
-
};
|
|
1049
|
-
FileUploadComponent.prototype.filesChanged = function (files) {
|
|
1050
|
-
if (files && files.length > 0) {
|
|
1051
|
-
this.selectedFiles = files;
|
|
1052
|
-
this.control.patchValue(files);
|
|
1053
|
-
}
|
|
1054
|
-
};
|
|
1055
|
-
FileUploadComponent.prototype.uploadFiles = function () {
|
|
1056
|
-
if (this.selectedFiles && this.config.uploadFiles) {
|
|
1057
|
-
this.isUploaded = true;
|
|
1058
|
-
this.config.uploadFiles(this.group, this.selectedFiles, this);
|
|
1059
|
-
}
|
|
1060
|
-
};
|
|
1061
|
-
FileUploadComponent.prototype.resetFileInput = function () {
|
|
1062
|
-
this.fileInputRef.nativeElement.value = '';
|
|
1063
|
-
this.control.patchValue(null);
|
|
1064
|
-
this.isUploaded = false;
|
|
1065
|
-
};
|
|
1066
|
-
FileUploadComponent.prototype.writeValue = function (value) {
|
|
1067
|
-
// clear file input
|
|
1068
|
-
// this.host.nativeElement.value = '';
|
|
1069
|
-
// this.file = null;
|
|
1070
|
-
};
|
|
1071
|
-
FileUploadComponent.prototype.registerOnChange = function (fn) {
|
|
1072
|
-
this.onChange = fn;
|
|
1073
|
-
};
|
|
1074
|
-
FileUploadComponent.prototype.registerOnTouched = function (fn) {
|
|
1075
|
-
};
|
|
1076
|
-
return FileUploadComponent;
|
|
1077
|
-
}(FileUploadFieldMixin));
|
|
1078
|
-
FileUploadComponent.decorators = [
|
|
1079
|
-
{ type: core.Component, args: [{
|
|
1080
|
-
selector: 'crispr-file-upload',
|
|
1081
|
-
template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n",
|
|
1082
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1083
|
-
styles: [":host ::ng-deep .mat-form-field .mat-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}"]
|
|
1084
|
-
},] }
|
|
1085
|
-
];
|
|
1086
|
-
FileUploadComponent.ctorParameters = function () { return [
|
|
1087
|
-
{ type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] }
|
|
1088
|
-
]; };
|
|
1089
|
-
FileUploadComponent.propDecorators = {
|
|
1090
|
-
fileInputRef: [{ type: core.ViewChild, args: ['fileInput',] }]
|
|
1091
|
-
};
|
|
1092
|
-
|
|
1093
|
-
var defaultConfig$2 = {
|
|
1094
|
-
typographyClass: 'mat-h3'
|
|
1095
|
-
};
|
|
1096
|
-
var HeadingComponent = /** @class */ (function (_super) {
|
|
1097
|
-
__extends(HeadingComponent, _super);
|
|
1098
|
-
function HeadingComponent() {
|
|
1099
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1100
|
-
_this.defaultConfig = defaultConfig$2;
|
|
1101
|
-
return _this;
|
|
1102
|
-
}
|
|
1103
|
-
return HeadingComponent;
|
|
1104
|
-
}(CrisprFieldComponent));
|
|
1105
|
-
HeadingComponent.decorators = [
|
|
1106
|
-
{ type: core.Component, args: [{
|
|
1107
|
-
selector: 'crispr-heading',
|
|
1108
|
-
template: " <label\n *ngIf=\"!!config?.label\"\n [ngClass]=\"config.typographyClass\">\n {{ config.label }}\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n </label>\n",
|
|
1109
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1110
|
-
styles: [":host{display:block}"]
|
|
1111
|
-
},] }
|
|
1112
|
-
];
|
|
1113
|
-
HeadingComponent.propDecorators = {
|
|
1114
|
-
config: [{ type: core.Input }]
|
|
1115
|
-
};
|
|
1116
|
-
|
|
1117
|
-
var DividerComponent = /** @class */ (function (_super) {
|
|
1118
|
-
__extends(DividerComponent, _super);
|
|
1119
|
-
function DividerComponent() {
|
|
1120
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1121
|
-
// TODO: pull in type after configs are better organized
|
|
1122
|
-
_this.defaultConfig = {};
|
|
1123
|
-
return _this;
|
|
1124
|
-
}
|
|
1125
|
-
DividerComponent.prototype.ngOnInit = function () {
|
|
1126
|
-
_super.prototype.ngOnInit.call(this);
|
|
1127
|
-
};
|
|
1128
|
-
return DividerComponent;
|
|
1129
|
-
}(CrisprFieldComponent));
|
|
1130
|
-
DividerComponent.decorators = [
|
|
1131
|
-
{ type: core.Component, args: [{
|
|
1132
|
-
selector: 'crispr-divider',
|
|
1133
|
-
template: "<mat-divider [ngClass]=\"config.classes\"></mat-divider>",
|
|
1134
|
-
styles: [":host{display:block;padding:1em 0}::ng-deep.mat-divider.mat-divider-horizontal{position:relative}"]
|
|
1135
|
-
},] }
|
|
1136
|
-
];
|
|
1137
|
-
|
|
1138
|
-
var RadioFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
1139
|
-
var RadioFieldComponent = /** @class */ (function (_super) {
|
|
1140
|
-
__extends(RadioFieldComponent, _super);
|
|
1141
|
-
function RadioFieldComponent() {
|
|
1142
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1143
|
-
_this.defaultConfig = {};
|
|
1144
|
-
return _this;
|
|
1145
|
-
}
|
|
1146
|
-
RadioFieldComponent.prototype.ngOnInit = function () {
|
|
1147
|
-
_super.prototype.ngOnInit.call(this);
|
|
1148
|
-
// options$ can be passed as an array, promise that resolves array, or observable that resolves array
|
|
1149
|
-
// this functions accounts for all possibilities and converts to observable that resolves array
|
|
1150
|
-
this.options$ = observablifyOptions(this.config.options, this.group);
|
|
1151
|
-
};
|
|
1152
|
-
return RadioFieldComponent;
|
|
1153
|
-
}(RadioFieldMixin));
|
|
1154
|
-
RadioFieldComponent.decorators = [
|
|
1155
|
-
{ type: core.Component, args: [{
|
|
1156
|
-
selector: 'crispr-radio-field',
|
|
1157
|
-
template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-radio-group\n [formControl]=\"control\"\n [color]=\"config.color\">\n <mat-radio-button class=\"example-radio-button\" *ngFor=\"let option of options$ | async\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n </mat-radio-group>\n</crispr-field-container>\n",
|
|
1158
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1159
|
-
styles: ["mat-radio-button{padding:12px}"]
|
|
1160
|
-
},] }
|
|
1161
|
-
];
|
|
1162
|
-
|
|
1163
|
-
var defaultConfig$1 = {};
|
|
1164
|
-
var UnitConversionFieldMixin = crisprControlMixin(CrisprFieldComponent);
|
|
1165
|
-
var UnitConversionFieldComponent = /** @class */ (function (_super) {
|
|
1166
|
-
__extends(UnitConversionFieldComponent, _super);
|
|
1167
|
-
function UnitConversionFieldComponent() {
|
|
1168
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1169
|
-
_this.defaultConfig = defaultConfig$1;
|
|
1170
|
-
_this.displayValueControl = new forms.FormControl();
|
|
1171
|
-
_this.unitSelectControl = new forms.FormControl();
|
|
1172
|
-
return _this;
|
|
1173
|
-
}
|
|
1174
|
-
UnitConversionFieldComponent.prototype.ngOnInit = function () {
|
|
1175
|
-
var _this = this;
|
|
1176
|
-
var _a, _b;
|
|
1177
|
-
_super.prototype.ngOnInit.call(this);
|
|
1178
|
-
// TODO: Validators need work. validation is tricky because the input needs to be validated against but the validator will compare against the controls value
|
|
1179
|
-
// this.displayValueControl.setValidators(this.config.validators);
|
|
1180
|
-
var controlValuePipeline = [
|
|
1181
|
-
this.displayValueControl.valueChanges.pipe(operators.startWith(this.displayValueControl.value))
|
|
1182
|
-
];
|
|
1183
|
-
// setup all required pieces when showing a field for selecting units
|
|
1184
|
-
if (this.config.showUnitSelect) {
|
|
1185
|
-
this.unitOptions$ = observablifyOptions(this.config.selectableUnits, this.group);
|
|
1186
|
-
controlValuePipeline.push(this.unitSelectControl.valueChanges.pipe(operators.startWith(((_a = this.config) === null || _a === void 0 ? void 0 : _a.initialDisplayUnit) || null)));
|
|
1187
|
-
this.unitSelectControl.setValue(((_b = this.config) === null || _b === void 0 ? void 0 : _b.initialDisplayUnit) || null);
|
|
1188
|
-
}
|
|
1189
|
-
this.transformationSubscription = rxjs.combineLatest(controlValuePipeline).subscribe(function (_c) {
|
|
1190
|
-
var _d = __read(_c, 2), displayValue = _d[0], unitValue = _d[1];
|
|
1191
|
-
var computedValue = _this.config.storedValueConversion(displayValue, unitValue);
|
|
1192
|
-
_this.control.setValue(computedValue);
|
|
1193
|
-
});
|
|
1194
|
-
};
|
|
1195
|
-
UnitConversionFieldComponent.prototype.ngOnDestroy = function () {
|
|
1196
|
-
this.transformationSubscription.unsubscribe();
|
|
1197
|
-
};
|
|
1198
|
-
UnitConversionFieldComponent.prototype.setInitialDisplayValue = function (storedValue, unit) {
|
|
1199
|
-
var initialDisplayValue = this.config.initialDisplayValueConversion(storedValue || null, unit);
|
|
1200
|
-
this.displayValueControl.setValue(initialDisplayValue);
|
|
1201
|
-
};
|
|
1202
|
-
/**
|
|
1203
|
-
* We override the 'setControlValue' we inherited from crisprControlMixin and add our custom logic,
|
|
1204
|
-
* This function gets called onInit because were object oriented. it's so great, so great that I'm
|
|
1205
|
-
* typing a paragraph to explain what the hell is going on...
|
|
1206
|
-
* @param value the initial value for the control passed down from the form components input
|
|
1207
|
-
*/
|
|
1208
|
-
UnitConversionFieldComponent.prototype.setControlValue = function (value) {
|
|
1209
|
-
var _a;
|
|
1210
|
-
var initialUnitValue = this.config.showUnitSelect ? (_a = this.config) === null || _a === void 0 ? void 0 : _a.initialDisplayUnit : null;
|
|
1211
|
-
this.setInitialDisplayValue(value, initialUnitValue);
|
|
1212
|
-
};
|
|
1213
|
-
return UnitConversionFieldComponent;
|
|
1214
|
-
}(UnitConversionFieldMixin));
|
|
1215
|
-
UnitConversionFieldComponent.decorators = [
|
|
1216
|
-
{ type: core.Component, args: [{
|
|
1217
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1218
|
-
selector: 'crispr-unit-conversion-field',
|
|
1219
|
-
template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [style.width.%]=\"config.showUnitSelect ? 60 : 100\"\n class=\"number-field\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n type=\"number\"\n matInput\n [formControl]=\"displayValueControl\"\n [placeholder]=\"config.placeholder\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [step]=\"config.step\"\n [autofocus]=\"config.autofocus\"\n [autocomplete]=\"config.autoComplete\">\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n matSuffix\n *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </mat-form-field>\n\n <mat-form-field\n *ngIf=\"config.showUnitSelect\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\"\n class=\"unit-field\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <mat-select\n #selectField\n [formControl]=\"unitSelectControl\">\n\n <mat-option\n *ngFor=\"let option of unitOptions$ | async\"\n [value]=\"option.value\">\n <crispr-option [option]=\"option\">\n </crispr-option>\n </mat-option>\n\n </mat-select>\n\n <!-- <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 </mat-form-field>\n\n\n</crispr-field-container>\n",
|
|
1220
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1221
|
-
styles: [".unit-field{width:40%;margin-left:16px}:host ::ng-deep .field-container{display:flex}"]
|
|
1222
|
-
},] }
|
|
1223
|
-
];
|
|
1224
|
-
|
|
1225
|
-
var FieldContainerComponent = /** @class */ (function () {
|
|
1226
|
-
function FieldContainerComponent() {
|
|
1227
|
-
// boolean whether field-container is inline
|
|
1228
|
-
this.inlineField = false;
|
|
1229
|
-
this.subs = [];
|
|
1230
|
-
}
|
|
1231
|
-
FieldContainerComponent.prototype.ngOnInit = function () {
|
|
1232
|
-
var _this = this;
|
|
1233
|
-
this.disabled$ = this.connectDisabledCallback(this.group, this.config);
|
|
1234
|
-
// we tried moving this into afterViewChecked and afterContentChecked lifecycle hooks without any luck
|
|
1235
|
-
if (this.config.computeValue) {
|
|
1236
|
-
this.subs.push(this.config.computeValue(this.group).pipe(operators.distinctUntilChanged(), operators.tap(function (computedValue) { return _this.group.get(_this.config.controlName).setValue(computedValue); })).subscribe());
|
|
1237
|
-
}
|
|
1238
|
-
else if (this.config.computeFieldConfig) {
|
|
1239
|
-
console.warn("computeFieldConfig property is deprecated, please use computeValue. Example here: https://stackblitz.com/github/nayfin/tft-documentation?file=src%2Fapp%2Fcrispr-forms-demo%2Ffeatures%2Fcomputed-field%2Fcomputed-field.component.ts");
|
|
1240
|
-
this.subs.push(computeValueFromFields(this.group, this.config.computeFieldConfig).pipe(operators.distinctUntilChanged(), operators.tap(function (computedValue) { return _this.group.get(_this.config.controlName).setValue(computedValue); })).subscribe());
|
|
1241
|
-
}
|
|
1242
|
-
};
|
|
1243
|
-
FieldContainerComponent.prototype.ngOnDestroy = function () {
|
|
1244
|
-
this.subs.forEach(function (sub) { return sub.unsubscribe; });
|
|
1245
|
-
};
|
|
1246
|
-
/**
|
|
1247
|
-
* Connects user defined disabledCallback function to the the view, so that the control is enabled/disabled
|
|
1248
|
-
* appropriately. It also keeps the form will hide disabled fields in the UI unless `hideDisabled` is set to
|
|
1249
|
-
* false in the controls config
|
|
1250
|
-
* @param group used to get valueChanges from control
|
|
1251
|
-
* @param config configuration object used to
|
|
1252
|
-
*/
|
|
1253
|
-
FieldContainerComponent.prototype.connectDisabledCallback = function (group, config) {
|
|
1254
|
-
if (config === void 0) { config = null; }
|
|
1255
|
-
var control = group.get(config.controlName);
|
|
1256
|
-
// If the disabled$ function exists on the field config then call it with the disabledCallbackConfig
|
|
1257
|
-
// as a parameter otherwise return an observable of true.
|
|
1258
|
-
return (config === null || config === void 0 ? void 0 : config.disabledCallback) && config.disabledCallback instanceof Function
|
|
1259
|
-
? config.disabledCallback(group, config.disabledCallbackConfig || null).pipe(
|
|
1260
|
-
// This enables/disables when callback conditions are met
|
|
1261
|
-
operators.tap(function (shouldDisable) { return shouldDisable ? control.disable() : control.enable(); }))
|
|
1262
|
-
: rxjs.of(false);
|
|
1263
|
-
};
|
|
1264
|
-
return FieldContainerComponent;
|
|
1265
|
-
}());
|
|
1266
|
-
FieldContainerComponent.decorators = [
|
|
1267
|
-
{ type: core.Component, args: [{
|
|
1268
|
-
selector: 'crispr-field-container',
|
|
1269
|
-
template: "<div\n *ngIf=\"(disabled$ | async) ? !config.hideDisabled : true\"\n [ngClass]=\"config.classes\"\n [class.inline-field]=\"inlineField\"\n class=\"field-container\">\n\n <crispr-heading\n *ngIf=\"config.heading\"\n [config]=\"config.heading\">\n </crispr-heading>\n\n <ng-content>\n </ng-content>\n\n</div>\n",
|
|
1270
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1271
|
-
styles: ["::ng-deep mat-form-field.mat-form-field{display:block}.inline-field{display:inline-block}"]
|
|
1272
|
-
},] }
|
|
1273
|
-
];
|
|
1274
|
-
FieldContainerComponent.propDecorators = {
|
|
1275
|
-
config: [{ type: core.Input }],
|
|
1276
|
-
group: [{ type: core.Input }],
|
|
1277
|
-
inlineField: [{ type: core.Input }]
|
|
1278
|
-
};
|
|
1279
|
-
|
|
1280
|
-
var InfoComponent = /** @class */ (function () {
|
|
1281
|
-
function InfoComponent() {
|
|
1282
|
-
}
|
|
1283
|
-
return InfoComponent;
|
|
1284
|
-
}());
|
|
1285
|
-
InfoComponent.decorators = [
|
|
1286
|
-
{ type: core.Component, args: [{
|
|
1287
|
-
selector: 'crispr-info',
|
|
1288
|
-
template: "<mat-icon\n *ngIf=\"info\"\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\"\n matSuffix>\n info\n</mat-icon>\n",
|
|
1289
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1290
|
-
styles: ["mat-icon{font-size:1.2em;width:1em;height:1em;opacity:.8}"]
|
|
1291
|
-
},] }
|
|
1292
|
-
];
|
|
1293
|
-
InfoComponent.propDecorators = {
|
|
1294
|
-
info: [{ type: core.Input }]
|
|
1295
|
-
};
|
|
1296
|
-
|
|
1297
|
-
var OptionComponent = /** @class */ (function () {
|
|
1298
|
-
function OptionComponent() {
|
|
1299
|
-
}
|
|
1300
|
-
return OptionComponent;
|
|
1301
|
-
}());
|
|
1302
|
-
OptionComponent.decorators = [
|
|
1303
|
-
{ type: core.Component, args: [{
|
|
1304
|
-
selector: 'crispr-option',
|
|
1305
|
-
template: "<img\n *ngIf=\"option.imageUrl\"\n [src]=\"option.imageUrl\"\n alt=\"image of {{option.label}}\"\n style=\"vertical-align:middle;\"\n aria-hidden\n height=\"25\"/>\n{{ option.label }}\n",
|
|
1306
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1307
|
-
styles: [""]
|
|
1308
|
-
},] }
|
|
1309
|
-
];
|
|
1310
|
-
OptionComponent.propDecorators = {
|
|
1311
|
-
option: [{ type: core.Input }]
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
|
-
var SelectedFileComponent = /** @class */ (function () {
|
|
1315
|
-
function SelectedFileComponent() {
|
|
1316
|
-
}
|
|
1317
|
-
return SelectedFileComponent;
|
|
1318
|
-
}());
|
|
1319
|
-
SelectedFileComponent.decorators = [
|
|
1320
|
-
{ type: core.Component, args: [{
|
|
1321
|
-
selector: 'crispr-selected-file',
|
|
1322
|
-
template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n *ngIf=\"showProgress\"\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n</mat-progress-bar>\n",
|
|
1323
|
-
styles: ["mat-progress-bar{margin-bottom:8px}"]
|
|
1324
|
-
},] }
|
|
1325
|
-
];
|
|
1326
|
-
SelectedFileComponent.propDecorators = {
|
|
1327
|
-
fileName: [{ type: core.Input }],
|
|
1328
|
-
progress: [{ type: core.Input }],
|
|
1329
|
-
showProgress: [{ type: core.Input }],
|
|
1330
|
-
color: [{ type: core.Input }]
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
var FileDropzoneDirective = /** @class */ (function () {
|
|
1334
|
-
function FileDropzoneDirective() {
|
|
1335
|
-
this.fileDrop = new core.EventEmitter();
|
|
1336
|
-
this.crisprFileDropzone = true;
|
|
1337
|
-
}
|
|
1338
|
-
FileDropzoneDirective.prototype.onDrop = function ($event) {
|
|
1339
|
-
if (this.crisprFileDropzone) {
|
|
1340
|
-
$event.preventDefault();
|
|
1341
|
-
this.fileDrop.emit($event.dataTransfer.files);
|
|
1342
|
-
}
|
|
1343
|
-
};
|
|
1344
|
-
// Prevents DOM from trying to open file in browser
|
|
1345
|
-
FileDropzoneDirective.prototype.onDragOver = function ($event) {
|
|
1346
|
-
if (this.crisprFileDropzone) {
|
|
1347
|
-
$event.preventDefault();
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
|
-
return FileDropzoneDirective;
|
|
1351
|
-
}());
|
|
1352
|
-
FileDropzoneDirective.decorators = [
|
|
1353
|
-
{ type: core.Directive, args: [{
|
|
1354
|
-
selector: '[crisprFileDropzone]'
|
|
1355
|
-
},] }
|
|
1356
|
-
];
|
|
1357
|
-
FileDropzoneDirective.propDecorators = {
|
|
1358
|
-
fileDrop: [{ type: core.Output }],
|
|
1359
|
-
crisprFileDropzone: [{ type: core.Input }],
|
|
1360
|
-
onDrop: [{ type: core.HostListener, args: ['drop', ['$event'],] }],
|
|
1361
|
-
onDragOver: [{ type: core.HostListener, args: ['dragover', ['$event'],] }]
|
|
1362
|
-
};
|
|
1363
|
-
|
|
1364
|
-
// TODO: Should we import UI library?
|
|
1365
|
-
// Will the tree shaker shake the unused modules?
|
|
1366
|
-
var MAT_DESIGN_MODULES = [
|
|
1367
|
-
icon.MatIconModule,
|
|
1368
|
-
autocomplete.MatAutocompleteModule,
|
|
1369
|
-
datepicker.MatDatepickerModule,
|
|
1370
|
-
input.MatInputModule,
|
|
1371
|
-
radio.MatRadioModule,
|
|
1372
|
-
select.MatSelectModule,
|
|
1373
|
-
checkbox.MatCheckboxModule,
|
|
1374
|
-
chips.MatChipsModule,
|
|
1375
|
-
slider.MatSliderModule,
|
|
1376
|
-
slideToggle.MatSlideToggleModule,
|
|
1377
|
-
button.MatButtonModule,
|
|
1378
|
-
buttonToggle.MatButtonToggleModule,
|
|
1379
|
-
chips.MatChipsModule,
|
|
1380
|
-
tooltip.MatTooltipModule,
|
|
1381
|
-
formField.MatFormFieldModule,
|
|
1382
|
-
materialMomentAdapter.MatMomentDateModule,
|
|
1383
|
-
divider.MatDividerModule,
|
|
1384
|
-
progressBar.MatProgressBarModule,
|
|
1385
|
-
portal.PortalModule
|
|
1386
|
-
];
|
|
1387
|
-
var CRISPR_FIELDS = [
|
|
1388
|
-
FieldContainerComponent,
|
|
1389
|
-
InputFieldComponent,
|
|
1390
|
-
SelectFieldComponent,
|
|
1391
|
-
RadioFieldComponent,
|
|
1392
|
-
AutocompleteFieldComponent,
|
|
1393
|
-
AutocompleteChiplistFieldComponent,
|
|
1394
|
-
CheckboxFieldComponent,
|
|
1395
|
-
TextareaFieldComponent,
|
|
1396
|
-
DatepickerFieldComponent,
|
|
1397
|
-
SliderFieldComponent,
|
|
1398
|
-
ButtonComponent,
|
|
1399
|
-
HeadingComponent,
|
|
1400
|
-
DividerComponent,
|
|
1401
|
-
FileUploadComponent,
|
|
1402
|
-
UnitConversionFieldComponent
|
|
1403
|
-
];
|
|
1404
|
-
var MaterialModule = /** @class */ (function () {
|
|
1405
|
-
function MaterialModule() {
|
|
1406
|
-
}
|
|
1407
|
-
return MaterialModule;
|
|
1408
|
-
}());
|
|
1409
|
-
MaterialModule.decorators = [
|
|
1410
|
-
{ type: core.NgModule, args: [{
|
|
1411
|
-
imports: __spreadArray([
|
|
1412
|
-
common.CommonModule,
|
|
1413
|
-
forms.ReactiveFormsModule,
|
|
1414
|
-
formValidationHandler.FormValidationHandlerModule
|
|
1415
|
-
], __read(MAT_DESIGN_MODULES)),
|
|
1416
|
-
exports: __spreadArray(__spreadArray([], __read(MAT_DESIGN_MODULES)), __read(CRISPR_FIELDS)),
|
|
1417
|
-
declarations: __spreadArray(__spreadArray([], __read(CRISPR_FIELDS)), [
|
|
1418
|
-
InfoComponent,
|
|
1419
|
-
OptionComponent,
|
|
1420
|
-
SelectedFileComponent,
|
|
1421
|
-
FileDropzoneDirective,
|
|
1422
|
-
]),
|
|
1423
|
-
entryComponents: CRISPR_FIELDS
|
|
1424
|
-
},] }
|
|
1425
|
-
];
|
|
1426
|
-
|
|
1427
|
-
var CrisprFormComponent = /** @class */ (function () {
|
|
1428
|
-
function CrisprFormComponent() {
|
|
1429
|
-
this.form = new forms.FormGroup({});
|
|
1430
|
-
this.value = null;
|
|
1431
|
-
this.submitted = new core.EventEmitter();
|
|
1432
|
-
// proxy value and status change events through to consuming component
|
|
1433
|
-
this.valueChanges = this.form.valueChanges;
|
|
1434
|
-
this.statusChanges = this.form.statusChanges;
|
|
1435
|
-
this.subs = [];
|
|
1436
|
-
}
|
|
1437
|
-
CrisprFormComponent.prototype.ngOnInit = function () {
|
|
1438
|
-
// build out the form, note that we pass in the form as the third argument and the function modifies it
|
|
1439
|
-
buildFormGroupFromConfig(this.config, this.value, this.form);
|
|
1440
|
-
};
|
|
1441
|
-
CrisprFormComponent.prototype.handleSubmit = function () {
|
|
1442
|
-
this.form.markAllAsTouched();
|
|
1443
|
-
this.submitted.emit(this.form);
|
|
1444
|
-
};
|
|
1445
|
-
return CrisprFormComponent;
|
|
1446
|
-
}());
|
|
1447
|
-
CrisprFormComponent.decorators = [
|
|
1448
|
-
{ type: core.Component, args: [{
|
|
1449
|
-
selector: 'crispr-form',
|
|
1450
|
-
template: "<form\n class=\"crispr-form\"\n [ngClass]=\"config.classes\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleSubmit()\"\n [autocomplete]=\"config.autocomplete || 'off'\"\n [errorDictionary]=\"config.errorDictionary\">\n\n <ng-container\n *ngFor=\"let field of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"form\">\n </ng-container>\n\n</form>\n",
|
|
1451
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1452
|
-
styles: [""]
|
|
1453
|
-
},] }
|
|
1454
|
-
];
|
|
1455
|
-
CrisprFormComponent.propDecorators = {
|
|
1456
|
-
config: [{ type: core.Input }],
|
|
1457
|
-
form: [{ type: core.Input }],
|
|
1458
|
-
value: [{ type: core.Input }],
|
|
1459
|
-
submitted: [{ type: core.Output }],
|
|
1460
|
-
valueChanges: [{ type: core.Output }],
|
|
1461
|
-
statusChanges: [{ type: core.Output }]
|
|
1462
|
-
};
|
|
1463
|
-
|
|
1464
|
-
var defaultConfig = {
|
|
1465
|
-
addButtonLabel: 'ADD ITEM',
|
|
1466
|
-
minListLength: 1,
|
|
1467
|
-
};
|
|
1468
|
-
var FormGroupListMixin = crisprControlMixin(CrisprFieldComponent);
|
|
1469
|
-
var FormGroupListComponent = /** @class */ (function (_super) {
|
|
1470
|
-
__extends(FormGroupListComponent, _super);
|
|
1471
|
-
function FormGroupListComponent() {
|
|
1472
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
1473
|
-
_this.defaultConfig = defaultConfig;
|
|
1474
|
-
return _this;
|
|
1475
|
-
}
|
|
1476
|
-
FormGroupListComponent.prototype.ngOnInit = function () {
|
|
1477
|
-
_super.prototype.ngOnInit.call(this);
|
|
1478
|
-
// TODO: this is required to ngFor of controls in template, must be a better way
|
|
1479
|
-
this.formArray = this.control;
|
|
1480
|
-
};
|
|
1481
|
-
FormGroupListComponent.prototype.setControlValue = function (values) {
|
|
1482
|
-
var _this = this;
|
|
1483
|
-
if (this.control) {
|
|
1484
|
-
if ((values === null || values === void 0 ? void 0 : values.length) > 0) {
|
|
1485
|
-
values.forEach(function (value) { return _this.addGroup(value); });
|
|
1486
|
-
}
|
|
1487
|
-
else if (this.config.displayInitialItem) {
|
|
1488
|
-
this.addGroup();
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
};
|
|
1492
|
-
FormGroupListComponent.prototype.addGroup = function (value) {
|
|
1493
|
-
if (value === void 0) { value = null; }
|
|
1494
|
-
this.control.push(createControlForType(this.config.itemConfig, value));
|
|
1495
|
-
};
|
|
1496
|
-
FormGroupListComponent.prototype.deleteGroup = function (index) {
|
|
1497
|
-
this.control.removeAt(index);
|
|
1498
|
-
};
|
|
1499
|
-
return FormGroupListComponent;
|
|
1500
|
-
}(FormGroupListMixin));
|
|
1501
|
-
FormGroupListComponent.decorators = [
|
|
1502
|
-
{ type: core.Component, args: [{
|
|
1503
|
-
selector: 'crispr-form-group-list',
|
|
1504
|
-
template: "\n<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [formGroup]=\"group\">\n\n <div [formArrayName]=\"config.controlName\">\n <!-- TODO: add sortBy function -->\n <div *ngFor=\"let control of formArray?.controls; let i = index;\">\n <!-- TODO: use content projection to allow custom item label component -->\n <div class=\"item-header\">\n <span class=\"mat-h2\" *ngIf=\"config.itemLabelBuilder\"> {{ config.itemLabelBuilder(i) }} </span>\n <button\n mat-icon-button\n *ngIf=\"i + 1 > config.minListLength\">\n <mat-icon (click)=\"deleteGroup(i)\">delete</mat-icon>\n </button>\n </div>\n <div\n [formGroupName]=\"i\">\n <ng-container\n *ngFor=\"let field of config.itemConfig.fields;\"\n crisprField\n [config]=\"field\"\n [value]=\"value && value[i] | initialControlValue : field\"\n [group]=\"control\">\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"group-footer\">\n <button\n type=\"button\"\n class=\"add\"\n mat-raised-button\n [color]=\"config.addButtonColor\"\n (click)=\"addGroup()\">\n {{config.addItemLabel || config.addButtonLabel}}\n </button>\n </div>\n\n</crispr-field-container>\n",
|
|
1505
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1506
|
-
styles: [".item-header{display:flex;justify-content:space-between}.group-footer{display:flex;justify-content:flex-end}.group-footer button.add{margin-bottom:16px}"]
|
|
1507
|
-
},] }
|
|
1508
|
-
];
|
|
1509
|
-
|
|
1510
|
-
var FormGroupMixin = crisprControlMixin(CrisprFieldComponent);
|
|
1511
|
-
var SubGroupComponent = /** @class */ (function (_super) {
|
|
1512
|
-
__extends(SubGroupComponent, _super);
|
|
1513
|
-
function SubGroupComponent() {
|
|
1514
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1515
|
-
}
|
|
1516
|
-
SubGroupComponent.prototype.ngOnInit = function () {
|
|
1517
|
-
_super.prototype.ngOnInit.call(this);
|
|
1518
|
-
};
|
|
1519
|
-
return SubGroupComponent;
|
|
1520
|
-
}(FormGroupMixin));
|
|
1521
|
-
SubGroupComponent.decorators = [
|
|
1522
|
-
{ type: core.Component, args: [{
|
|
1523
|
-
selector: 'crispr-sub-group',
|
|
1524
|
-
template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <ng-container\n *ngFor=\"let fieldConfig of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : fieldConfig\"\n [config]=\"fieldConfig\"\n [group]=\"control\">\n </ng-container>\n</crispr-field-container>\n\n",
|
|
1525
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
1526
|
-
styles: [""]
|
|
1527
|
-
},] }
|
|
1528
|
-
];
|
|
1529
|
-
|
|
1530
|
-
// tslint:disable-next-line: max-line-length
|
|
1531
|
-
var FIELD_COMPONENTS = {
|
|
1532
|
-
button: ButtonComponent,
|
|
1533
|
-
input: InputFieldComponent,
|
|
1534
|
-
select: SelectFieldComponent,
|
|
1535
|
-
radio: RadioFieldComponent,
|
|
1536
|
-
subGroup: SubGroupComponent,
|
|
1537
|
-
groupList: FormGroupListComponent,
|
|
1538
|
-
autocomplete: AutocompleteFieldComponent,
|
|
1539
|
-
autocompleteChiplist: AutocompleteChiplistFieldComponent,
|
|
1540
|
-
textarea: TextareaFieldComponent,
|
|
1541
|
-
checkbox: CheckboxFieldComponent,
|
|
1542
|
-
slider: SliderFieldComponent,
|
|
1543
|
-
datepicker: DatepickerFieldComponent,
|
|
1544
|
-
fileUpload: FileUploadComponent,
|
|
1545
|
-
heading: HeadingComponent,
|
|
1546
|
-
divider: DividerComponent,
|
|
1547
|
-
unitConversion: UnitConversionFieldComponent
|
|
1548
|
-
};
|
|
1549
|
-
function isControlComponent(component) {
|
|
1550
|
-
return isControlConfig(component.config) || component.config.controlType === exports.ControlType.BUTTON;
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
var CrisprFieldDirective = /** @class */ (function () {
|
|
1554
|
-
function CrisprFieldDirective(resolver, container, renderer) {
|
|
1555
|
-
this.resolver = resolver;
|
|
1556
|
-
this.container = container;
|
|
1557
|
-
this.renderer = renderer;
|
|
1558
|
-
}
|
|
1559
|
-
CrisprFieldDirective.prototype.ngOnInit = function () {
|
|
1560
|
-
var _this = this;
|
|
1561
|
-
/**
|
|
1562
|
-
* create component and set values from config on its instance
|
|
1563
|
-
*/
|
|
1564
|
-
var component = this.config.component || FIELD_COMPONENTS[this.config.controlType];
|
|
1565
|
-
var factory = this.resolver.resolveComponentFactory(component);
|
|
1566
|
-
var componentRef = this.container.createComponent(factory);
|
|
1567
|
-
this.component = componentRef.instance;
|
|
1568
|
-
this.component.config = this.config;
|
|
1569
|
-
if (isControlComponent(this.component)) {
|
|
1570
|
-
this.component.group = this.group;
|
|
1571
|
-
if ('value' in this.component) {
|
|
1572
|
-
this.component.value = this.value;
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
|
-
// adds any config classes to the dynamically generated component
|
|
1576
|
-
// doing this here keeps us from having to extend a base component into each field component individually
|
|
1577
|
-
if (!this.config.classes)
|
|
1578
|
-
return;
|
|
1579
|
-
this.config.classes.forEach(function (klass) {
|
|
1580
|
-
// check for passing multiple classes in one array element
|
|
1581
|
-
if (klass.includes(' ')) {
|
|
1582
|
-
throw Error("Improperly formatted class. '" + klass + "' cannot contain spaces.");
|
|
1583
|
-
}
|
|
1584
|
-
else {
|
|
1585
|
-
_this.renderer.addClass(componentRef.location.nativeElement, klass);
|
|
1586
|
-
}
|
|
1587
|
-
});
|
|
1588
|
-
};
|
|
1589
|
-
return CrisprFieldDirective;
|
|
1590
|
-
}());
|
|
1591
|
-
CrisprFieldDirective.decorators = [
|
|
1592
|
-
{ type: core.Directive, args: [{
|
|
1593
|
-
selector: '[crisprField]'
|
|
1594
|
-
},] }
|
|
1595
|
-
];
|
|
1596
|
-
CrisprFieldDirective.ctorParameters = function () { return [
|
|
1597
|
-
{ type: core.ComponentFactoryResolver },
|
|
1598
|
-
{ type: core.ViewContainerRef },
|
|
1599
|
-
{ type: core.Renderer2 }
|
|
1600
|
-
]; };
|
|
1601
|
-
CrisprFieldDirective.propDecorators = {
|
|
1602
|
-
config: [{ type: core.Input }],
|
|
1603
|
-
group: [{ type: core.Input }],
|
|
1604
|
-
value: [{ type: core.Input }]
|
|
1605
|
-
};
|
|
1606
|
-
|
|
1607
|
-
var InitialControlValuePipe = /** @class */ (function () {
|
|
1608
|
-
function InitialControlValuePipe() {
|
|
1609
|
-
}
|
|
1610
|
-
// TODO: does changing any to unknown break anything?
|
|
1611
|
-
InitialControlValuePipe.prototype.transform = function (initialFormValue, fieldConfig) {
|
|
1612
|
-
return (initialFormValue && isControlConfig(fieldConfig))
|
|
1613
|
-
? initialFormValue[fieldConfig.controlName] || null
|
|
1614
|
-
: null;
|
|
1615
|
-
};
|
|
1616
|
-
return InitialControlValuePipe;
|
|
1617
|
-
}());
|
|
1618
|
-
InitialControlValuePipe.decorators = [
|
|
1619
|
-
{ type: core.Pipe, args: [{
|
|
1620
|
-
name: 'initialControlValue'
|
|
1621
|
-
},] }
|
|
1622
|
-
];
|
|
1623
|
-
|
|
1624
|
-
var CrisprFormsModule = /** @class */ (function () {
|
|
1625
|
-
function CrisprFormsModule() {
|
|
1626
|
-
}
|
|
1627
|
-
return CrisprFormsModule;
|
|
1628
|
-
}());
|
|
1629
|
-
CrisprFormsModule.decorators = [
|
|
1630
|
-
{ type: core.NgModule, args: [{
|
|
1631
|
-
imports: [
|
|
1632
|
-
common.CommonModule,
|
|
1633
|
-
forms.ReactiveFormsModule,
|
|
1634
|
-
formValidationHandler.FormValidationHandlerModule,
|
|
1635
|
-
MaterialModule
|
|
1636
|
-
],
|
|
1637
|
-
declarations: [
|
|
1638
|
-
CrisprFieldDirective,
|
|
1639
|
-
CrisprFormComponent,
|
|
1640
|
-
FormGroupListComponent,
|
|
1641
|
-
InitialControlValuePipe,
|
|
1642
|
-
SubGroupComponent,
|
|
1643
|
-
],
|
|
1644
|
-
exports: [
|
|
1645
|
-
CrisprFormComponent,
|
|
1646
|
-
MaterialModule
|
|
1647
|
-
],
|
|
1648
|
-
entryComponents: [
|
|
1649
|
-
FormGroupListComponent,
|
|
1650
|
-
SubGroupComponent
|
|
1651
|
-
],
|
|
1652
|
-
},] }
|
|
1653
|
-
];
|
|
1654
|
-
|
|
1655
|
-
/**
|
|
1656
|
-
* Generated bundle index. Do not edit.
|
|
1657
|
-
*/
|
|
1658
|
-
|
|
1659
|
-
exports.AbstractAutocompleteComponent = AbstractAutocompleteComponent;
|
|
1660
|
-
exports.AutocompleteChiplistFieldComponent = AutocompleteChiplistFieldComponent;
|
|
1661
|
-
exports.AutocompleteFieldComponent = AutocompleteFieldComponent;
|
|
1662
|
-
exports.ButtonComponent = ButtonComponent;
|
|
1663
|
-
exports.CheckboxFieldComponent = CheckboxFieldComponent;
|
|
1664
|
-
exports.CrisprFieldComponent = CrisprFieldComponent;
|
|
1665
|
-
exports.CrisprFormComponent = CrisprFormComponent;
|
|
1666
|
-
exports.CrisprFormsModule = CrisprFormsModule;
|
|
1667
|
-
exports.DEFAULT_EMPTY_OPTIONS_MESSAGE = DEFAULT_EMPTY_OPTIONS_MESSAGE;
|
|
1668
|
-
exports.DatepickerFieldComponent = DatepickerFieldComponent;
|
|
1669
|
-
exports.DividerComponent = DividerComponent;
|
|
1670
|
-
exports.FileUploadComponent = FileUploadComponent;
|
|
1671
|
-
exports.HeadingComponent = HeadingComponent;
|
|
1672
|
-
exports.InputFieldComponent = InputFieldComponent;
|
|
1673
|
-
exports.RadioFieldComponent = RadioFieldComponent;
|
|
1674
|
-
exports.SelectFieldComponent = SelectFieldComponent;
|
|
1675
|
-
exports.SliderFieldComponent = SliderFieldComponent;
|
|
1676
|
-
exports.TextareaFieldComponent = TextareaFieldComponent;
|
|
1677
|
-
exports.UnitConversionFieldComponent = UnitConversionFieldComponent;
|
|
1678
|
-
exports.buildFormGroupFromConfig = buildFormGroupFromConfig;
|
|
1679
|
-
exports.callOptionsIfFunction = callOptionsIfFunction;
|
|
1680
|
-
exports.checkControlForValues = checkControlForValues;
|
|
1681
|
-
exports.checkControlsForValues = checkControlsForValues;
|
|
1682
|
-
exports.computeValueFromFields = computeValueFromFields;
|
|
1683
|
-
exports.createControlForType = createControlForType;
|
|
1684
|
-
exports.crisprControlMixin = crisprControlMixin;
|
|
1685
|
-
exports.filterOptionsByLabel = filterOptionsByLabel;
|
|
1686
|
-
exports.isControlConfig = isControlConfig;
|
|
1687
|
-
exports.observablifyOptions = observablifyOptions;
|
|
1688
|
-
exports.ɵ0 = ɵ0;
|
|
1689
|
-
exports.ɵa = MaterialModule;
|
|
1690
|
-
exports.ɵb = FieldContainerComponent;
|
|
1691
|
-
exports.ɵc = InputFieldComponent;
|
|
1692
|
-
exports.ɵd = SelectFieldComponent;
|
|
1693
|
-
exports.ɵe = RadioFieldComponent;
|
|
1694
|
-
exports.ɵf = AutocompleteFieldComponent;
|
|
1695
|
-
exports.ɵg = AbstractAutocompleteComponent;
|
|
1696
|
-
exports.ɵh = AutocompleteChiplistFieldComponent;
|
|
1697
|
-
exports.ɵi = CheckboxFieldComponent;
|
|
1698
|
-
exports.ɵj = TextareaFieldComponent;
|
|
1699
|
-
exports.ɵk = DatepickerFieldComponent;
|
|
1700
|
-
exports.ɵl = SliderFieldComponent;
|
|
1701
|
-
exports.ɵm = ButtonComponent;
|
|
1702
|
-
exports.ɵn = CrisprFieldComponent;
|
|
1703
|
-
exports.ɵo = HeadingComponent;
|
|
1704
|
-
exports.ɵp = DividerComponent;
|
|
1705
|
-
exports.ɵq = FileUploadComponent;
|
|
1706
|
-
exports.ɵr = UnitConversionFieldComponent;
|
|
1707
|
-
exports.ɵs = InfoComponent;
|
|
1708
|
-
exports.ɵt = OptionComponent;
|
|
1709
|
-
exports.ɵu = SelectedFileComponent;
|
|
1710
|
-
exports.ɵv = FileDropzoneDirective;
|
|
1711
|
-
exports.ɵw = CrisprFieldDirective;
|
|
1712
|
-
exports.ɵx = FormGroupListComponent;
|
|
1713
|
-
exports.ɵy = InitialControlValuePipe;
|
|
1714
|
-
exports.ɵz = SubGroupComponent;
|
|
1715
|
-
|
|
1716
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1717
|
-
|
|
1718
|
-
})));
|
|
1719
|
-
//# sourceMappingURL=tft-crispr-forms.umd.js.map
|