@ngx-formly/material 5.12.0 → 6.0.0-beta.0
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 -6
- package/checkbox/checkbox.module.d.ts +10 -0
- package/checkbox/checkbox.type.d.ts +18 -7
- package/checkbox/ngx-formly-material-checkbox.d.ts +1 -0
- package/checkbox/package.json +6 -9
- package/checkbox/public_api.d.ts +1 -1
- package/datepicker/datepicker.module.d.ts +11 -0
- package/datepicker/datepicker.type.d.ts +41 -12
- package/datepicker/ngx-formly-material-datepicker.d.ts +1 -0
- package/datepicker/package.json +6 -9
- package/datepicker/public_api.d.ts +1 -1
- package/esm2020/checkbox/checkbox.module.mjs +61 -0
- package/esm2020/checkbox/checkbox.type.mjs +109 -0
- package/esm2020/checkbox/ngx-formly-material-checkbox.mjs +5 -0
- package/esm2020/checkbox/public_api.mjs +3 -0
- package/esm2020/datepicker/datepicker.module.mjs +57 -0
- package/esm2020/datepicker/datepicker.type.mjs +151 -0
- package/esm2020/datepicker/ngx-formly-material-datepicker.mjs +5 -0
- package/esm2020/datepicker/public_api.mjs +3 -0
- package/esm2020/form-field/field.type.mjs +116 -0
- package/esm2020/form-field/form-field.module.mjs +47 -0
- package/esm2020/form-field/form-field.wrapper.mjs +141 -0
- package/esm2020/form-field/ngx-formly-material-form-field.mjs +5 -0
- package/esm2020/form-field/public_api.mjs +3 -0
- package/esm2020/input/input.module.mjs +91 -0
- package/esm2020/input/input.type.mjs +79 -0
- package/esm2020/input/ngx-formly-material-input.mjs +5 -0
- package/esm2020/input/public_api.mjs +3 -0
- package/esm2020/lib/ui-material.mjs +3 -0
- package/esm2020/lib/ui-material.module.mjs +43 -0
- package/esm2020/multicheckbox/multicheckbox.module.mjs +57 -0
- package/esm2020/multicheckbox/multicheckbox.type.mjs +84 -0
- package/esm2020/multicheckbox/ngx-formly-material-multicheckbox.mjs +5 -0
- package/esm2020/multicheckbox/public_api.mjs +3 -0
- package/esm2020/native-select/native-select.module.mjs +57 -0
- package/esm2020/native-select/native-select.type.mjs +73 -0
- package/esm2020/native-select/ngx-formly-material-native-select.mjs +5 -0
- package/esm2020/native-select/public_api.mjs +3 -0
- package/esm2020/ngx-formly-material.mjs +5 -0
- package/esm2020/public_api.mjs +5 -0
- package/esm2020/radio/ngx-formly-material-radio.mjs +5 -0
- package/esm2020/radio/public_api.mjs +3 -0
- package/esm2020/radio/radio.module.mjs +57 -0
- package/esm2020/radio/radio.type.mjs +89 -0
- package/esm2020/select/ngx-formly-material-select.mjs +5 -0
- package/esm2020/select/public_api.mjs +3 -0
- package/esm2020/select/select.module.mjs +63 -0
- package/esm2020/select/select.type.mjs +150 -0
- package/esm2020/slider/ngx-formly-material-slider.mjs +5 -0
- package/esm2020/slider/public_api.mjs +3 -0
- package/esm2020/slider/slider.module.mjs +53 -0
- package/esm2020/slider/slider.type.mjs +79 -0
- package/esm2020/textarea/ngx-formly-material-textarea.mjs +5 -0
- package/esm2020/textarea/public_api.mjs +3 -0
- package/esm2020/textarea/textarea.module.mjs +53 -0
- package/esm2020/textarea/textarea.type.mjs +77 -0
- package/esm2020/toggle/ngx-formly-material-toggle.mjs +5 -0
- package/esm2020/toggle/public_api.mjs +3 -0
- package/esm2020/toggle/toggle.module.mjs +53 -0
- package/esm2020/toggle/toggle.type.mjs +61 -0
- package/fesm2015/ngx-formly-material-checkbox.mjs +171 -0
- package/fesm2015/ngx-formly-material-checkbox.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-datepicker.mjs +212 -0
- package/fesm2015/ngx-formly-material-datepicker.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-form-field.mjs +306 -0
- package/fesm2015/ngx-formly-material-form-field.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-input.mjs +172 -0
- package/fesm2015/ngx-formly-material-input.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-multicheckbox.mjs +142 -0
- package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-native-select.mjs +132 -0
- package/fesm2015/ngx-formly-material-native-select.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-radio.mjs +146 -0
- package/fesm2015/ngx-formly-material-radio.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-select.mjs +218 -0
- package/fesm2015/ngx-formly-material-select.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-slider.mjs +133 -0
- package/fesm2015/ngx-formly-material-slider.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-textarea.mjs +131 -0
- package/fesm2015/ngx-formly-material-textarea.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-toggle.mjs +115 -0
- package/fesm2015/ngx-formly-material-toggle.mjs.map +1 -0
- package/fesm2015/ngx-formly-material.mjs +55 -0
- package/fesm2015/ngx-formly-material.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-checkbox.mjs +171 -0
- package/fesm2020/ngx-formly-material-checkbox.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-datepicker.mjs +209 -0
- package/fesm2020/ngx-formly-material-datepicker.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-form-field.mjs +301 -0
- package/fesm2020/ngx-formly-material-form-field.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-input.mjs +172 -0
- package/fesm2020/ngx-formly-material-input.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-multicheckbox.mjs +142 -0
- package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-native-select.mjs +132 -0
- package/fesm2020/ngx-formly-material-native-select.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-radio.mjs +146 -0
- package/fesm2020/ngx-formly-material-radio.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-select.mjs +215 -0
- package/fesm2020/ngx-formly-material-select.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-slider.mjs +133 -0
- package/fesm2020/ngx-formly-material-slider.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-textarea.mjs +131 -0
- package/fesm2020/ngx-formly-material-textarea.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-toggle.mjs +115 -0
- package/fesm2020/ngx-formly-material-toggle.mjs.map +1 -0
- package/fesm2020/ngx-formly-material.mjs +55 -0
- package/fesm2020/ngx-formly-material.mjs.map +1 -0
- package/form-field/field.type.d.ts +27 -24
- package/form-field/form-field.module.d.ts +9 -0
- package/form-field/form-field.wrapper.d.ts +23 -28
- package/form-field/ngx-formly-material-form-field.d.ts +1 -1
- package/form-field/package.json +6 -9
- package/form-field/public_api.d.ts +1 -0
- package/input/input.module.d.ts +10 -0
- package/input/input.type.d.ts +14 -6
- package/input/ngx-formly-material-input.d.ts +1 -0
- package/input/package.json +6 -9
- package/input/public_api.d.ts +1 -1
- package/lib/ui-material.module.d.ts +11 -0
- package/multicheckbox/multicheckbox.module.d.ts +11 -0
- package/multicheckbox/multicheckbox.type.d.ts +17 -7
- package/multicheckbox/ngx-formly-material-multicheckbox.d.ts +1 -0
- package/multicheckbox/package.json +6 -9
- package/multicheckbox/public_api.d.ts +1 -1
- package/native-select/native-select.module.d.ts +11 -0
- package/native-select/native-select.type.d.ts +14 -9
- package/native-select/ngx-formly-material-native-select.d.ts +1 -0
- package/native-select/package.json +6 -9
- package/native-select/public_api.d.ts +1 -1
- package/ngx-formly-material.d.ts +1 -0
- package/package.json +118 -31
- package/radio/ngx-formly-material-radio.d.ts +1 -0
- package/radio/package.json +6 -9
- package/radio/public_api.d.ts +1 -1
- package/radio/radio.module.d.ts +11 -0
- package/radio/radio.type.d.ts +16 -6
- package/select/ngx-formly-material-select.d.ts +1 -0
- package/select/package.json +6 -9
- package/select/public_api.d.ts +1 -1
- package/select/select.module.d.ts +12 -0
- package/select/select.type.d.ts +24 -9
- package/slider/ngx-formly-material-slider.d.ts +1 -0
- package/slider/package.json +6 -9
- package/slider/public_api.d.ts +1 -1
- package/slider/slider.module.d.ts +10 -0
- package/slider/slider.type.d.ts +24 -5
- package/textarea/ngx-formly-material-textarea.d.ts +1 -0
- package/textarea/package.json +6 -9
- package/textarea/public_api.d.ts +1 -1
- package/textarea/textarea.module.d.ts +10 -0
- package/textarea/textarea.type.d.ts +17 -6
- package/toggle/ngx-formly-material-toggle.d.ts +1 -0
- package/toggle/package.json +6 -9
- package/toggle/public_api.d.ts +1 -1
- package/toggle/toggle.module.d.ts +10 -0
- package/toggle/toggle.type.d.ts +16 -4
- package/bundles/ngx-formly-material-checkbox.umd.js +0 -189
- package/bundles/ngx-formly-material-checkbox.umd.js.map +0 -1
- package/bundles/ngx-formly-material-checkbox.umd.min.js +0 -2
- package/bundles/ngx-formly-material-checkbox.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-datepicker.umd.js +0 -205
- package/bundles/ngx-formly-material-datepicker.umd.js.map +0 -1
- package/bundles/ngx-formly-material-datepicker.umd.min.js +0 -2
- package/bundles/ngx-formly-material-datepicker.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-form-field.umd.js +0 -532
- package/bundles/ngx-formly-material-form-field.umd.js.map +0 -1
- package/bundles/ngx-formly-material-form-field.umd.min.js +0 -2
- package/bundles/ngx-formly-material-form-field.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-input.umd.js +0 -113
- package/bundles/ngx-formly-material-input.umd.js.map +0 -1
- package/bundles/ngx-formly-material-input.umd.min.js +0 -2
- package/bundles/ngx-formly-material-input.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-multicheckbox.umd.js +0 -208
- package/bundles/ngx-formly-material-multicheckbox.umd.js.map +0 -1
- package/bundles/ngx-formly-material-multicheckbox.umd.min.js +0 -2
- package/bundles/ngx-formly-material-multicheckbox.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-native-select.umd.js +0 -111
- package/bundles/ngx-formly-material-native-select.umd.js.map +0 -1
- package/bundles/ngx-formly-material-native-select.umd.min.js +0 -2
- package/bundles/ngx-formly-material-native-select.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-radio.umd.js +0 -161
- package/bundles/ngx-formly-material-radio.umd.js.map +0 -1
- package/bundles/ngx-formly-material-radio.umd.min.js +0 -2
- package/bundles/ngx-formly-material-radio.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-select.umd.js +0 -249
- package/bundles/ngx-formly-material-select.umd.js.map +0 -1
- package/bundles/ngx-formly-material-select.umd.min.js +0 -2
- package/bundles/ngx-formly-material-select.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-slider.umd.js +0 -122
- package/bundles/ngx-formly-material-slider.umd.js.map +0 -1
- package/bundles/ngx-formly-material-slider.umd.min.js +0 -2
- package/bundles/ngx-formly-material-slider.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-textarea.umd.js +0 -116
- package/bundles/ngx-formly-material-textarea.umd.js.map +0 -1
- package/bundles/ngx-formly-material-textarea.umd.min.js +0 -2
- package/bundles/ngx-formly-material-textarea.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material-toggle.umd.js +0 -122
- package/bundles/ngx-formly-material-toggle.umd.js.map +0 -1
- package/bundles/ngx-formly-material-toggle.umd.min.js +0 -2
- package/bundles/ngx-formly-material-toggle.umd.min.js.map +0 -1
- package/bundles/ngx-formly-material.umd.js +0 -52
- package/bundles/ngx-formly-material.umd.js.map +0 -1
- package/bundles/ngx-formly-material.umd.min.js +0 -2
- package/bundles/ngx-formly-material.umd.min.js.map +0 -1
- package/checkbox/ngx-formly-material-checkbox.metadata.json +0 -1
- package/datepicker/ngx-formly-material-datepicker.metadata.json +0 -1
- package/esm2015/checkbox/checkbox.module.js +0 -34
- package/esm2015/checkbox/checkbox.type.js +0 -129
- package/esm2015/checkbox/ngx-formly-material-checkbox.js +0 -9
- package/esm2015/checkbox/public_api.js +0 -7
- package/esm2015/datepicker/datepicker.module.js +0 -34
- package/esm2015/datepicker/datepicker.type.js +0 -163
- package/esm2015/datepicker/ngx-formly-material-datepicker.js +0 -9
- package/esm2015/datepicker/public_api.js +0 -7
- package/esm2015/form-field/field.type.js +0 -170
- package/esm2015/form-field/form-field.module.js +0 -29
- package/esm2015/form-field/form-field.wrapper.js +0 -244
- package/esm2015/form-field/formly.error-state-matcher.js +0 -28
- package/esm2015/form-field/ngx-formly-material-form-field.js +0 -10
- package/esm2015/form-field/public_api.js +0 -7
- package/esm2015/input/input.module.js +0 -34
- package/esm2015/input/input.type.js +0 -53
- package/esm2015/input/ngx-formly-material-input.js +0 -9
- package/esm2015/input/public_api.js +0 -7
- package/esm2015/lib/ui-material.js +0 -7
- package/esm2015/lib/ui-material.module.js +0 -28
- package/esm2015/multicheckbox/multicheckbox.module.js +0 -36
- package/esm2015/multicheckbox/multicheckbox.type.js +0 -89
- package/esm2015/multicheckbox/ngx-formly-material-multicheckbox.js +0 -9
- package/esm2015/multicheckbox/public_api.js +0 -7
- package/esm2015/native-select/native-select.module.js +0 -36
- package/esm2015/native-select/native-select.type.js +0 -63
- package/esm2015/native-select/ngx-formly-material-native-select.js +0 -9
- package/esm2015/native-select/public_api.js +0 -7
- package/esm2015/ngx-formly-material.js +0 -9
- package/esm2015/public_api.js +0 -9
- package/esm2015/radio/ngx-formly-material-radio.js +0 -9
- package/esm2015/radio/public_api.js +0 -7
- package/esm2015/radio/radio.module.js +0 -34
- package/esm2015/radio/radio.type.js +0 -94
- package/esm2015/select/ngx-formly-material-select.js +0 -9
- package/esm2015/select/public_api.js +0 -7
- package/esm2015/select/select.module.js +0 -36
- package/esm2015/select/select.type.js +0 -165
- package/esm2015/slider/ngx-formly-material-slider.js +0 -9
- package/esm2015/slider/public_api.js +0 -7
- package/esm2015/slider/slider.module.js +0 -32
- package/esm2015/slider/slider.type.js +0 -56
- package/esm2015/textarea/ngx-formly-material-textarea.js +0 -9
- package/esm2015/textarea/public_api.js +0 -7
- package/esm2015/textarea/textarea.module.js +0 -34
- package/esm2015/textarea/textarea.type.js +0 -58
- package/esm2015/toggle/ngx-formly-material-toggle.js +0 -9
- package/esm2015/toggle/public_api.js +0 -7
- package/esm2015/toggle/toggle.module.js +0 -32
- package/esm2015/toggle/toggle.type.js +0 -53
- package/esm5/checkbox/checkbox.module.js +0 -38
- package/esm5/checkbox/checkbox.type.js +0 -132
- package/esm5/checkbox/ngx-formly-material-checkbox.js +0 -9
- package/esm5/checkbox/public_api.js +0 -7
- package/esm5/datepicker/datepicker.module.js +0 -38
- package/esm5/datepicker/datepicker.type.js +0 -144
- package/esm5/datepicker/ngx-formly-material-datepicker.js +0 -9
- package/esm5/datepicker/public_api.js +0 -7
- package/esm5/form-field/field.type.js +0 -245
- package/esm5/form-field/form-field.module.js +0 -33
- package/esm5/form-field/form-field.wrapper.js +0 -285
- package/esm5/form-field/formly.error-state-matcher.js +0 -32
- package/esm5/form-field/ngx-formly-material-form-field.js +0 -10
- package/esm5/form-field/public_api.js +0 -7
- package/esm5/input/input.module.js +0 -38
- package/esm5/input/input.type.js +0 -40
- package/esm5/input/ngx-formly-material-input.js +0 -9
- package/esm5/input/public_api.js +0 -7
- package/esm5/lib/ui-material.js +0 -7
- package/esm5/lib/ui-material.module.js +0 -32
- package/esm5/multicheckbox/multicheckbox.module.js +0 -40
- package/esm5/multicheckbox/multicheckbox.type.js +0 -95
- package/esm5/multicheckbox/ngx-formly-material-multicheckbox.js +0 -9
- package/esm5/multicheckbox/public_api.js +0 -7
- package/esm5/native-select/native-select.module.js +0 -40
- package/esm5/native-select/native-select.type.js +0 -38
- package/esm5/native-select/ngx-formly-material-native-select.js +0 -9
- package/esm5/native-select/public_api.js +0 -7
- package/esm5/ngx-formly-material.js +0 -9
- package/esm5/public_api.js +0 -9
- package/esm5/radio/ngx-formly-material-radio.js +0 -9
- package/esm5/radio/public_api.js +0 -7
- package/esm5/radio/radio.module.js +0 -38
- package/esm5/radio/radio.type.js +0 -98
- package/esm5/select/ngx-formly-material-select.js +0 -9
- package/esm5/select/public_api.js +0 -7
- package/esm5/select/select.module.js +0 -40
- package/esm5/select/select.type.js +0 -155
- package/esm5/slider/ngx-formly-material-slider.js +0 -9
- package/esm5/slider/public_api.js +0 -7
- package/esm5/slider/slider.module.js +0 -36
- package/esm5/slider/slider.type.js +0 -52
- package/esm5/textarea/ngx-formly-material-textarea.js +0 -9
- package/esm5/textarea/public_api.js +0 -7
- package/esm5/textarea/textarea.module.js +0 -38
- package/esm5/textarea/textarea.type.js +0 -45
- package/esm5/toggle/ngx-formly-material-toggle.js +0 -9
- package/esm5/toggle/public_api.js +0 -7
- package/esm5/toggle/toggle.module.js +0 -36
- package/esm5/toggle/toggle.type.js +0 -52
- package/fesm2015/ngx-formly-material-checkbox.js +0 -152
- package/fesm2015/ngx-formly-material-checkbox.js.map +0 -1
- package/fesm2015/ngx-formly-material-datepicker.js +0 -185
- package/fesm2015/ngx-formly-material-datepicker.js.map +0 -1
- package/fesm2015/ngx-formly-material-form-field.js +0 -408
- package/fesm2015/ngx-formly-material-form-field.js.map +0 -1
- package/fesm2015/ngx-formly-material-input.js +0 -93
- package/fesm2015/ngx-formly-material-input.js.map +0 -1
- package/fesm2015/ngx-formly-material-multicheckbox.js +0 -129
- package/fesm2015/ngx-formly-material-multicheckbox.js.map +0 -1
- package/fesm2015/ngx-formly-material-native-select.js +0 -103
- package/fesm2015/ngx-formly-material-native-select.js.map +0 -1
- package/fesm2015/ngx-formly-material-radio.js +0 -126
- package/fesm2015/ngx-formly-material-radio.js.map +0 -1
- package/fesm2015/ngx-formly-material-select.js +0 -200
- package/fesm2015/ngx-formly-material-select.js.map +0 -1
- package/fesm2015/ngx-formly-material-slider.js +0 -92
- package/fesm2015/ngx-formly-material-slider.js.map +0 -1
- package/fesm2015/ngx-formly-material-textarea.js +0 -95
- package/fesm2015/ngx-formly-material-textarea.js.map +0 -1
- package/fesm2015/ngx-formly-material-toggle.js +0 -89
- package/fesm2015/ngx-formly-material-toggle.js.map +0 -1
- package/fesm2015/ngx-formly-material.js +0 -48
- package/fesm2015/ngx-formly-material.js.map +0 -1
- package/fesm5/ngx-formly-material-checkbox.js +0 -157
- package/fesm5/ngx-formly-material-checkbox.js.map +0 -1
- package/fesm5/ngx-formly-material-datepicker.js +0 -168
- package/fesm5/ngx-formly-material-datepicker.js.map +0 -1
- package/fesm5/ngx-formly-material-form-field.js +0 -527
- package/fesm5/ngx-formly-material-form-field.js.map +0 -1
- package/fesm5/ngx-formly-material-input.js +0 -82
- package/fesm5/ngx-formly-material-input.js.map +0 -1
- package/fesm5/ngx-formly-material-multicheckbox.js +0 -137
- package/fesm5/ngx-formly-material-multicheckbox.js.map +0 -1
- package/fesm5/ngx-formly-material-native-select.js +0 -80
- package/fesm5/ngx-formly-material-native-select.js.map +0 -1
- package/fesm5/ngx-formly-material-radio.js +0 -132
- package/fesm5/ngx-formly-material-radio.js.map +0 -1
- package/fesm5/ngx-formly-material-select.js +0 -192
- package/fesm5/ngx-formly-material-select.js.map +0 -1
- package/fesm5/ngx-formly-material-slider.js +0 -90
- package/fesm5/ngx-formly-material-slider.js.map +0 -1
- package/fesm5/ngx-formly-material-textarea.js +0 -84
- package/fesm5/ngx-formly-material-textarea.js.map +0 -1
- package/fesm5/ngx-formly-material-toggle.js +0 -90
- package/fesm5/ngx-formly-material-toggle.js.map +0 -1
- package/fesm5/ngx-formly-material.js +0 -51
- package/fesm5/ngx-formly-material.js.map +0 -1
- package/form-field/formly.error-state-matcher.d.ts +0 -8
- package/form-field/ngx-formly-material-form-field.metadata.json +0 -1
- package/input/ngx-formly-material-input.metadata.json +0 -1
- package/multicheckbox/ngx-formly-material-multicheckbox.metadata.json +0 -1
- package/native-select/ngx-formly-material-native-select.metadata.json +0 -1
- package/ngx-formly-material.metadata.json +0 -1
- package/radio/ngx-formly-material-radio.metadata.json +0 -1
- package/select/ngx-formly-material-select.metadata.json +0 -1
- package/slider/ngx-formly-material-slider.metadata.json +0 -1
- package/textarea/ngx-formly-material-textarea.metadata.json +0 -1
- package/toggle/ngx-formly-material-toggle.metadata.json +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { FieldType } from '@ngx-formly/material/form-field';
|
|
3
|
+
import { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/material/input";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "@angular/cdk/text-field";
|
|
8
|
+
import * as i4 from "@ngx-formly/core";
|
|
9
|
+
export class FormlyFieldTextArea extends FieldType {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.defaultOptions = {
|
|
13
|
+
props: {
|
|
14
|
+
cols: 1,
|
|
15
|
+
rows: 1,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldTextArea, selector: "formly-field-mat-textarea", providers: [
|
|
22
|
+
// fix for https://github.com/ngx-formly/ngx-formly/issues/1688
|
|
23
|
+
// rely on formControl value instead of elementRef which return empty value in Firefox.
|
|
24
|
+
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
|
|
25
|
+
], usesInheritance: true, ngImport: i0, template: `
|
|
26
|
+
<textarea
|
|
27
|
+
matInput
|
|
28
|
+
[id]="id"
|
|
29
|
+
[readonly]="props.readonly"
|
|
30
|
+
[required]="required"
|
|
31
|
+
[formControl]="formControl"
|
|
32
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
33
|
+
[cols]="props.cols"
|
|
34
|
+
[rows]="props.rows"
|
|
35
|
+
[formlyAttributes]="field"
|
|
36
|
+
[placeholder]="props.placeholder"
|
|
37
|
+
[tabindex]="props.tabindex"
|
|
38
|
+
[cdkTextareaAutosize]="props.autosize"
|
|
39
|
+
[cdkAutosizeMinRows]="props.autosizeMinRows"
|
|
40
|
+
[cdkAutosizeMaxRows]="props.autosizeMaxRows"
|
|
41
|
+
[class.cdk-textarea-autosize]="props.autosize"
|
|
42
|
+
>
|
|
43
|
+
</textarea>
|
|
44
|
+
`, isInline: true, directives: [{ type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{
|
|
48
|
+
selector: 'formly-field-mat-textarea',
|
|
49
|
+
template: `
|
|
50
|
+
<textarea
|
|
51
|
+
matInput
|
|
52
|
+
[id]="id"
|
|
53
|
+
[readonly]="props.readonly"
|
|
54
|
+
[required]="required"
|
|
55
|
+
[formControl]="formControl"
|
|
56
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
57
|
+
[cols]="props.cols"
|
|
58
|
+
[rows]="props.rows"
|
|
59
|
+
[formlyAttributes]="field"
|
|
60
|
+
[placeholder]="props.placeholder"
|
|
61
|
+
[tabindex]="props.tabindex"
|
|
62
|
+
[cdkTextareaAutosize]="props.autosize"
|
|
63
|
+
[cdkAutosizeMinRows]="props.autosizeMinRows"
|
|
64
|
+
[cdkAutosizeMaxRows]="props.autosizeMaxRows"
|
|
65
|
+
[class.cdk-textarea-autosize]="props.autosize"
|
|
66
|
+
>
|
|
67
|
+
</textarea>
|
|
68
|
+
`,
|
|
69
|
+
providers: [
|
|
70
|
+
// fix for https://github.com/ngx-formly/ngx-formly/issues/1688
|
|
71
|
+
// rely on formControl value instead of elementRef which return empty value in Firefox.
|
|
72
|
+
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
|
|
73
|
+
],
|
|
74
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
75
|
+
}]
|
|
76
|
+
}] });
|
|
77
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dGFyZWEudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91aS9tYXRlcmlhbC90ZXh0YXJlYS9zcmMvdGV4dGFyZWEudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFRLE1BQU0sZUFBZSxDQUFDO0FBRXpFLE9BQU8sRUFBRSxTQUFTLEVBQW9CLE1BQU0saUNBQWlDLENBQUM7QUFDOUUsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0seUJBQXlCLENBQUM7Ozs7OztBQXlDbkUsTUFBTSxPQUFPLG1CQU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JvcHMuYXV0b3NpemVcIlxuICAgICAgW2Nka0F1dG9zaXplTWluUm93c109XCJwcm9wcy5hdXRvc2l6ZU1pblJvd3NcIlxuICAgICAgW2Nka0F1dG9zaXplTWF4Um93c109XCJwcm9wcy5hdXRvc2l6ZU1heFJvd3NcIlxuICAgICAgW2NsYXNzLmNkay10ZXh0YXJlYS1hdXRvc2l6ZV09XCJwcm9wcy5hdXRvc2l6ZVwiXG4gICAgPlxuICAgIDwvdGV4dGFyZWE+XG4gIGAsXG4gIHByb3ZpZGVyczogW1xuICAgIC8vIGZpeCBmb3IgaHR0cHM6Ly9naXRodWIuY29tL25neC1mb3JtbHkvbmd4LWZvcm1seS9pc3N1ZXMvMTY4OFxuICAgIC8vIHJlbHkgb24gZm9ybUNvbnRyb2wgdmFsdWUgaW5zdGVhZCBvZiBlbGVtZW50UmVmIHdoaWNoIHJldHVybiBlbXB0eSB2YWx1ZSBpbiBGaXJlZm94LlxuICAgIHsgcHJvdmlkZTogTUFUX0lOUFVUX1ZBTFVFX0FDQ0VTU09SLCB1c2VFeGlzdGluZzogRm9ybWx5RmllbGRUZXh0QXJlYSB9LFxuICBdLFxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcbn0pXG5leHBvcnQgY2xhc3MgRm9ybWx5RmllbGRUZXh0QXJlYSBleHRlbmRzIEZpZWxkVHlwZTxGaWVsZFR5cGVDb25maWc8VGV4dEFyZWFQcm9wcz4+IHtcbiAgb3ZlcnJpZGUgZGVmYXVsdE9wdGlvbnMgPSB7XG4gICAgcHJvcHM6IHtcbiAgICAgIGNvbHM6IDEsXG4gICAgICByb3dzOiAxLFxuICAgIH0sXG4gIH07XG59XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public_api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZvcm1seS1tYXRlcmlhbC10b2dnbGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvdWkvbWF0ZXJpYWwvdG9nZ2xlL3NyYy9uZ3gtZm9ybWx5LW1hdGVyaWFsLXRvZ2dsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpY19hcGknO1xuIl19
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { FormlyMatToggleModule } from './toggle.module';
|
|
2
|
+
export { FormlyFieldToggle } from './toggle.type';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91aS9tYXRlcmlhbC90b2dnbGUvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDeEQsT0FBTyxFQUFFLGlCQUFpQixFQUEyQixNQUFNLGVBQWUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IEZvcm1seU1hdFRvZ2dsZU1vZHVsZSB9IGZyb20gJy4vdG9nZ2xlLm1vZHVsZSc7XG5leHBvcnQgeyBGb3JtbHlGaWVsZFRvZ2dsZSwgRm9ybWx5VG9nZ2xlRmllbGRDb25maWcgfSBmcm9tICcuL3RvZ2dsZS50eXBlJztcbiJdfQ==
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
4
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
6
|
+
import { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
7
|
+
import { FormlyFieldToggle } from './toggle.type';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@ngx-formly/core";
|
|
10
|
+
export class FormlyMatToggleModule {
|
|
11
|
+
}
|
|
12
|
+
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
13
|
+
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyFieldToggle], imports: [CommonModule,
|
|
14
|
+
ReactiveFormsModule,
|
|
15
|
+
MatSlideToggleModule,
|
|
16
|
+
FormlyMatFormFieldModule, i1.FormlyModule] });
|
|
17
|
+
FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatToggleModule, imports: [[
|
|
18
|
+
CommonModule,
|
|
19
|
+
ReactiveFormsModule,
|
|
20
|
+
MatSlideToggleModule,
|
|
21
|
+
FormlyMatFormFieldModule,
|
|
22
|
+
FormlyModule.forChild({
|
|
23
|
+
types: [
|
|
24
|
+
{
|
|
25
|
+
name: 'toggle',
|
|
26
|
+
component: FormlyFieldToggle,
|
|
27
|
+
wrappers: ['form-field'],
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
}),
|
|
31
|
+
]] });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
|
|
33
|
+
type: NgModule,
|
|
34
|
+
args: [{
|
|
35
|
+
declarations: [FormlyFieldToggle],
|
|
36
|
+
imports: [
|
|
37
|
+
CommonModule,
|
|
38
|
+
ReactiveFormsModule,
|
|
39
|
+
MatSlideToggleModule,
|
|
40
|
+
FormlyMatFormFieldModule,
|
|
41
|
+
FormlyModule.forChild({
|
|
42
|
+
types: [
|
|
43
|
+
{
|
|
44
|
+
name: 'toggle',
|
|
45
|
+
component: FormlyFieldToggle,
|
|
46
|
+
wrappers: ['form-field'],
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
}),
|
|
50
|
+
],
|
|
51
|
+
}]
|
|
52
|
+
}] });
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy91aS9tYXRlcmlhbC90b2dnbGUvc3JjL3RvZ2dsZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRTNFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSx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bSAnQG5neC1mb3JtbHkvY29yZSc7XG5pbXBvcnQgeyBSZWFjdGl2ZUZvcm1zTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvZm9ybXMnO1xuaW1wb3J0IHsgTWF0U2xpZGVUb2dnbGVNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9tYXRlcmlhbC9zbGlkZS10b2dnbGUnO1xuaW1wb3J0IHsgRm9ybWx5TWF0Rm9ybUZpZWxkTW9kdWxlIH0gZnJvbSAnQG5neC1mb3JtbHkvbWF0ZXJpYWwvZm9ybS1maWVsZCc7XG5cbmltcG9ydCB7IEZvcm1seUZpZWxkVG9nZ2xlIH0gZnJvbSAnLi90b2dnbGUudHlwZSc7XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW0Zvcm1seUZpZWxkVG9nZ2xlXSxcbiAgaW1wb3J0czogW1xuICAgIENvbW1vbk1vZHVsZSxcbiAgICBSZWFjdGl2ZUZvcm1zTW9kdWxlLFxuICAgIE1hdFNsaWRlVG9nZ2xlTW9kdWxlLFxuICAgIEZvcm1seU1hdEZvcm1GaWVsZE1vZHVsZSxcbiAgICBGb3JtbHlNb2R1bGUuZm9yQ2hpbGQoe1xuICAgICAgdHlwZXM6IFtcbiAgICAgICAge1xuICAgICAgICAgIG5hbWU6ICd0b2dnbGUnLFxuICAgICAgICAgIGNvbXBvbmVudDogRm9ybWx5RmllbGRUb2dnbGUsXG4gICAgICAgICAgd3JhcHBlcnM6IFsnZm9ybS1maWVsZCddLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICB9KSxcbiAgXSxcbn0pXG5leHBvcnQgY2xhc3MgRm9ybWx5TWF0VG9nZ2xlTW9kdWxlIHt9XG4iXX0=
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';
|
|
2
|
+
import { FieldType } from '@ngx-formly/material/form-field';
|
|
3
|
+
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/material/slide-toggle";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "@ngx-formly/core";
|
|
8
|
+
export class FormlyFieldToggle extends FieldType {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.defaultOptions = {
|
|
12
|
+
props: {
|
|
13
|
+
hideFieldUnderline: true,
|
|
14
|
+
floatLabel: 'always',
|
|
15
|
+
hideLabel: true,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
onContainerClick(event) {
|
|
20
|
+
this.slideToggle.focus();
|
|
21
|
+
super.onContainerClick(event);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
FormlyFieldToggle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldToggle, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
FormlyFieldToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldToggle, selector: "formly-field-mat-toggle", viewQueries: [{ propertyName: "slideToggle", first: true, predicate: MatSlideToggle, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
26
|
+
<mat-slide-toggle
|
|
27
|
+
[id]="id"
|
|
28
|
+
[formControl]="formControl"
|
|
29
|
+
[formlyAttributes]="field"
|
|
30
|
+
[color]="props.color"
|
|
31
|
+
[tabIndex]="props.tabindex"
|
|
32
|
+
[required]="required"
|
|
33
|
+
[labelPosition]="props.labelPosition"
|
|
34
|
+
>
|
|
35
|
+
{{ props.label }}
|
|
36
|
+
</mat-slide-toggle>
|
|
37
|
+
`, isInline: true, components: [{ type: i1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], directives: [{ type: i1.MatSlideToggleRequiredValidator, selector: "mat-slide-toggle[required][formControlName], mat-slide-toggle[required][formControl], mat-slide-toggle[required][ngModel]" }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldToggle, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{
|
|
41
|
+
selector: 'formly-field-mat-toggle',
|
|
42
|
+
template: `
|
|
43
|
+
<mat-slide-toggle
|
|
44
|
+
[id]="id"
|
|
45
|
+
[formControl]="formControl"
|
|
46
|
+
[formlyAttributes]="field"
|
|
47
|
+
[color]="props.color"
|
|
48
|
+
[tabIndex]="props.tabindex"
|
|
49
|
+
[required]="required"
|
|
50
|
+
[labelPosition]="props.labelPosition"
|
|
51
|
+
>
|
|
52
|
+
{{ props.label }}
|
|
53
|
+
</mat-slide-toggle>
|
|
54
|
+
`,
|
|
55
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
56
|
+
}]
|
|
57
|
+
}], propDecorators: { slideToggle: [{
|
|
58
|
+
type: ViewChild,
|
|
59
|
+
args: [MatSlideToggle, { static: true }]
|
|
60
|
+
}] } });
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLnR5cGUuanMiLCJzb3VyY2VSb290IjoiI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FiSW5kZXhdPVwicHJvcHMudGFiaW5kZXhcIlxuICAgICAgW3JlcXVpcmVkXT1cInJlcXVpcmVkXCJcbiAgICAgIFtsYWJlbFBvc2l0aW9uXT1cInByb3BzLmxhYmVsUG9zaXRpb25cIlxuICAgID5cbiAgICAgIHt7IHByb3BzLmxhYmVsIH19XG4gICAgPC9tYXQtc2xpZGUtdG9nZ2xlPlxuICBgLFxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcbn0pXG5leHBvcnQgY2xhc3MgRm9ybWx5RmllbGRUb2dnbGUgZXh0ZW5kcyBGaWVsZFR5cGU8RmllbGRUeXBlQ29uZmlnPFRvZ2dsZVByb3BzPj4ge1xuICBAVmlld0NoaWxkKE1hdFNsaWRlVG9nZ2xlLCB7IHN0YXRpYzogdHJ1ZSB9KSBzbGlkZVRvZ2dsZSE6IE1hdFNsaWRlVG9nZ2xlO1xuICBvdmVycmlkZSBkZWZhdWx0T3B0aW9ucyA9IHtcbiAgICBwcm9wczoge1xuICAgICAgaGlkZUZpZWxkVW5kZXJsaW5lOiB0cnVlLFxuICAgICAgZmxvYXRMYWJlbDogJ2Fsd2F5cycgYXMgY29uc3QsXG4gICAgICBoaWRlTGFiZWw6IHRydWUsXG4gICAgfSxcbiAgfTtcblxuICBvdmVycmlkZSBvbkNvbnRhaW5lckNsaWNrKGV2ZW50OiBNb3VzZUV2ZW50KTogdm9pZCB7XG4gICAgdGhpcy5zbGlkZVRvZ2dsZS5mb2N1cygpO1xuICAgIHN1cGVyLm9uQ29udGFpbmVyQ2xpY2soZXZlbnQpO1xuICB9XG59XG4iXX0=
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i5 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i4 from '@ngx-formly/core';
|
|
6
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
7
|
+
import * as i3 from '@angular/forms';
|
|
8
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
10
|
+
import * as i2 from '@angular/material/checkbox';
|
|
11
|
+
import { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';
|
|
12
|
+
import * as i1 from '@angular/cdk/a11y';
|
|
13
|
+
|
|
14
|
+
class FormlyFieldCheckbox extends FieldType {
|
|
15
|
+
constructor(renderer, focusMonitor) {
|
|
16
|
+
super();
|
|
17
|
+
this.renderer = renderer;
|
|
18
|
+
this.focusMonitor = focusMonitor;
|
|
19
|
+
this.defaultOptions = {
|
|
20
|
+
props: {
|
|
21
|
+
hideFieldUnderline: true,
|
|
22
|
+
indeterminate: true,
|
|
23
|
+
floatLabel: 'always',
|
|
24
|
+
hideLabel: true,
|
|
25
|
+
color: 'accent', // workaround for https://github.com/angular/components/issues/18465
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
onContainerClick(event) {
|
|
30
|
+
this.checkbox.focus();
|
|
31
|
+
super.onContainerClick(event);
|
|
32
|
+
}
|
|
33
|
+
ngAfterViewInit() {
|
|
34
|
+
if (this.checkbox) {
|
|
35
|
+
this.focusMonitor.monitor(this.checkbox._inputElement, true).subscribe((focusOrigin) => {
|
|
36
|
+
if (focusOrigin) {
|
|
37
|
+
this.props.focus && this.props.focus(this.field);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.props.blur && this.props.blur(this.field);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
ngAfterViewChecked() {
|
|
46
|
+
if (this.required !== this._required && this.checkbox && this.checkbox._inputElement) {
|
|
47
|
+
this._required = this.required;
|
|
48
|
+
const inputElement = this.checkbox._inputElement.nativeElement;
|
|
49
|
+
if (this.required) {
|
|
50
|
+
this.renderer.setAttribute(inputElement, 'required', 'required');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.renderer.removeAttribute(inputElement, 'required');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
ngOnDestroy() {
|
|
58
|
+
super.ngOnDestroy();
|
|
59
|
+
if (this.checkbox) {
|
|
60
|
+
this.focusMonitor.stopMonitoring(this.checkbox._inputElement);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
FormlyFieldCheckbox.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldCheckbox, deps: [{ token: i0.Renderer2 }, { token: i1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
FormlyFieldCheckbox.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldCheckbox, selector: "formly-field-mat-checkbox", viewQueries: [{ propertyName: "checkbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
66
|
+
<mat-checkbox
|
|
67
|
+
[formControl]="formControl"
|
|
68
|
+
[id]="id"
|
|
69
|
+
[formlyAttributes]="field"
|
|
70
|
+
[tabIndex]="props.tabindex"
|
|
71
|
+
[indeterminate]="props.indeterminate && formControl.value == null"
|
|
72
|
+
[color]="props.color"
|
|
73
|
+
[labelPosition]="props.labelPosition"
|
|
74
|
+
>
|
|
75
|
+
{{ props.label }}
|
|
76
|
+
<span
|
|
77
|
+
*ngIf="props.required && props.hideRequiredMarker !== true"
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
class="mat-form-field-required-marker"
|
|
80
|
+
>*</span
|
|
81
|
+
>
|
|
82
|
+
</mat-checkbox>
|
|
83
|
+
`, isInline: true, components: [{ type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldCheckbox, decorators: [{
|
|
85
|
+
type: Component,
|
|
86
|
+
args: [{
|
|
87
|
+
selector: 'formly-field-mat-checkbox',
|
|
88
|
+
template: `
|
|
89
|
+
<mat-checkbox
|
|
90
|
+
[formControl]="formControl"
|
|
91
|
+
[id]="id"
|
|
92
|
+
[formlyAttributes]="field"
|
|
93
|
+
[tabIndex]="props.tabindex"
|
|
94
|
+
[indeterminate]="props.indeterminate && formControl.value == null"
|
|
95
|
+
[color]="props.color"
|
|
96
|
+
[labelPosition]="props.labelPosition"
|
|
97
|
+
>
|
|
98
|
+
{{ props.label }}
|
|
99
|
+
<span
|
|
100
|
+
*ngIf="props.required && props.hideRequiredMarker !== true"
|
|
101
|
+
aria-hidden="true"
|
|
102
|
+
class="mat-form-field-required-marker"
|
|
103
|
+
>*</span
|
|
104
|
+
>
|
|
105
|
+
</mat-checkbox>
|
|
106
|
+
`,
|
|
107
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
108
|
+
}]
|
|
109
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.FocusMonitor }]; }, propDecorators: { checkbox: [{
|
|
110
|
+
type: ViewChild,
|
|
111
|
+
args: [MatCheckbox, { static: true }]
|
|
112
|
+
}] } });
|
|
113
|
+
|
|
114
|
+
class FormlyMatCheckboxModule {
|
|
115
|
+
}
|
|
116
|
+
FormlyMatCheckboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
117
|
+
FormlyMatCheckboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, declarations: [FormlyFieldCheckbox], imports: [CommonModule,
|
|
118
|
+
ReactiveFormsModule,
|
|
119
|
+
MatCheckboxModule,
|
|
120
|
+
FormlyMatFormFieldModule, i4.FormlyModule] });
|
|
121
|
+
FormlyMatCheckboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, imports: [[
|
|
122
|
+
CommonModule,
|
|
123
|
+
ReactiveFormsModule,
|
|
124
|
+
MatCheckboxModule,
|
|
125
|
+
FormlyMatFormFieldModule,
|
|
126
|
+
FormlyModule.forChild({
|
|
127
|
+
types: [
|
|
128
|
+
{
|
|
129
|
+
name: 'checkbox',
|
|
130
|
+
component: FormlyFieldCheckbox,
|
|
131
|
+
wrappers: ['form-field'],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'boolean',
|
|
135
|
+
extends: 'checkbox',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
}),
|
|
139
|
+
]] });
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatCheckboxModule, decorators: [{
|
|
141
|
+
type: NgModule,
|
|
142
|
+
args: [{
|
|
143
|
+
declarations: [FormlyFieldCheckbox],
|
|
144
|
+
imports: [
|
|
145
|
+
CommonModule,
|
|
146
|
+
ReactiveFormsModule,
|
|
147
|
+
MatCheckboxModule,
|
|
148
|
+
FormlyMatFormFieldModule,
|
|
149
|
+
FormlyModule.forChild({
|
|
150
|
+
types: [
|
|
151
|
+
{
|
|
152
|
+
name: 'checkbox',
|
|
153
|
+
component: FormlyFieldCheckbox,
|
|
154
|
+
wrappers: ['form-field'],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'boolean',
|
|
158
|
+
extends: 'checkbox',
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
}),
|
|
162
|
+
],
|
|
163
|
+
}]
|
|
164
|
+
}] });
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Generated bundle index. Do not edit.
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
export { FormlyFieldCheckbox, FormlyMatCheckboxModule };
|
|
171
|
+
//# sourceMappingURL=ngx-formly-material-checkbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-checkbox.mjs","sources":["../../../../src/ui/material/checkbox/src/checkbox.type.ts","../../../../src/ui/material/checkbox/src/checkbox.module.ts","../../../../src/ui/material/checkbox/src/ngx-formly-material-checkbox.ts"],"sourcesContent":["import {\n Component,\n ViewChild,\n ChangeDetectionStrategy,\n Renderer2,\n AfterViewChecked,\n OnDestroy,\n AfterViewInit,\n Type,\n} from '@angular/core';\nimport { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';\nimport { FieldType, FormlyFieldProps } from '@ngx-formly/material/form-field';\nimport { MatCheckbox } from '@angular/material/checkbox';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\ninterface CheckboxProps extends FormlyFieldProps {\n indeterminate?: boolean;\n labelPosition?: 'before' | 'after';\n}\n\nexport interface FormlyCheckboxFieldConfig extends FormlyFieldConfig<CheckboxProps> {\n type: 'checkbox' | Type<FormlyFieldCheckbox>;\n}\n\n@Component({\n selector: 'formly-field-mat-checkbox',\n template: `\n <mat-checkbox\n [formControl]=\"formControl\"\n [id]=\"id\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"props.tabindex\"\n [indeterminate]=\"props.indeterminate && formControl.value == null\"\n [color]=\"props.color\"\n [labelPosition]=\"props.labelPosition\"\n >\n {{ props.label }}\n <span\n *ngIf=\"props.required && props.hideRequiredMarker !== true\"\n aria-hidden=\"true\"\n class=\"mat-form-field-required-marker\"\n >*</span\n >\n </mat-checkbox>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldCheckbox\n extends FieldType<FieldTypeConfig<CheckboxProps>>\n implements AfterViewInit, AfterViewChecked, OnDestroy\n{\n @ViewChild(MatCheckbox, { static: true }) checkbox!: MatCheckbox;\n override defaultOptions = {\n props: {\n hideFieldUnderline: true,\n indeterminate: true,\n floatLabel: 'always' as const,\n hideLabel: true,\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n private _required!: boolean;\n constructor(private renderer: Renderer2, private focusMonitor: FocusMonitor) {\n super();\n }\n\n override onContainerClick(event: MouseEvent): void {\n this.checkbox.focus();\n super.onContainerClick(event);\n }\n\n ngAfterViewInit() {\n if (this.checkbox) {\n this.focusMonitor.monitor(this.checkbox._inputElement, true).subscribe((focusOrigin) => {\n if (focusOrigin) {\n this.props.focus && this.props.focus(this.field);\n } else {\n this.props.blur && this.props.blur(this.field);\n }\n });\n }\n }\n\n ngAfterViewChecked() {\n if (this.required !== this._required && this.checkbox && this.checkbox._inputElement) {\n this._required = this.required;\n const inputElement = this.checkbox._inputElement.nativeElement;\n if (this.required) {\n this.renderer.setAttribute(inputElement, 'required', 'required');\n } else {\n this.renderer.removeAttribute(inputElement, 'required');\n }\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n if (this.checkbox) {\n this.focusMonitor.stopMonitoring(this.checkbox._inputElement);\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FormlyFieldCheckbox } from './checkbox.type';\n\n@NgModule({\n declarations: [FormlyFieldCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'checkbox',\n component: FormlyFieldCheckbox,\n wrappers: ['form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\n }),\n ],\n})\nexport class FormlyMatCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AA+CM,MAAO,mBACX,SAAQ,SAAyC,CAAA;IAejD,WAAoB,CAAA,QAAmB,EAAU,YAA0B,EAAA;AACzE,QAAA,KAAK,EAAE,CAAC;AADU,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AAAU,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;QAXlE,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,kBAAkB,EAAE,IAAI;AACxB,gBAAA,aAAa,EAAE,IAAI;AACnB,gBAAA,UAAU,EAAE,QAAiB;AAC7B,gBAAA,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,QAAiB;AACzB,aAAA;SACF,CAAC;KAKD;AAEQ,IAAA,gBAAgB,CAAC,KAAiB,EAAA;AACzC,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;AACtB,QAAA,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;IAED,eAAe,GAAA;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,S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mB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,qBAAA;AACD,oBAAA;AACE,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,OAAO,EAAE,UAAU;AACpB,qBAAA;AACF,iBAAA;aACF,CAAC;SACH,CAAA,EAAA,CAAA,CAAA;2FAEU,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAxBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBAEnB,iBAAiB;wBAEjB,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACD,gCAAA;AACE,oCAAA,IAAI,EAAE,SAAS;AACf,oCAAA,OAAO,EAAE,UAAU;AACpB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;iBACF,CAAA;;;ACjCD;;AAEG;;;;"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@ngx-formly/core';
|
|
5
|
+
import { ɵobserve, FormlyModule } from '@ngx-formly/core';
|
|
6
|
+
import * as i4 from '@angular/forms';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
9
|
+
import * as i3 from '@angular/material/input';
|
|
10
|
+
import { MatInputModule } from '@angular/material/input';
|
|
11
|
+
import * as i2 from '@angular/material/datepicker';
|
|
12
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
13
|
+
|
|
14
|
+
class FormlyFieldDatepicker extends FieldType {
|
|
15
|
+
constructor(config, cdRef) {
|
|
16
|
+
super();
|
|
17
|
+
this.config = config;
|
|
18
|
+
this.cdRef = cdRef;
|
|
19
|
+
this.defaultOptions = {
|
|
20
|
+
props: {
|
|
21
|
+
datepickerOptions: {
|
|
22
|
+
startView: 'month',
|
|
23
|
+
datepickerTogglePosition: 'suffix',
|
|
24
|
+
disabled: false,
|
|
25
|
+
opened: false,
|
|
26
|
+
dateInput: () => { },
|
|
27
|
+
dateChange: () => { },
|
|
28
|
+
monthSelected: () => { },
|
|
29
|
+
yearSelected: () => { },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
detectChanges() {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
(_b = (_a = this.options).detectChanges) === null || _b === void 0 ? void 0 : _b.call(_a, this.field);
|
|
37
|
+
}
|
|
38
|
+
ngAfterViewInit() {
|
|
39
|
+
this.props[this.props.datepickerOptions.datepickerTogglePosition] = this.datepickerToggle;
|
|
40
|
+
ɵobserve(this.field, ['props', 'datepickerOptions', 'opened'], () => {
|
|
41
|
+
this.cdRef.detectChanges();
|
|
42
|
+
});
|
|
43
|
+
// temporary fix for https://github.com/angular/components/issues/16761
|
|
44
|
+
if (this.config.getValidatorMessage('matDatepickerParse')) {
|
|
45
|
+
this.fieldErrorsObserver = ɵobserve(this.field, ['formControl', 'errors'], ({ currentValue }) => {
|
|
46
|
+
var _a;
|
|
47
|
+
if (currentValue.required && currentValue.matDatepickerParse) {
|
|
48
|
+
const errors = Object.keys(currentValue)
|
|
49
|
+
.sort((prop) => (prop === 'matDatepickerParse' ? -1 : 0))
|
|
50
|
+
.reduce((errors, prop) => (Object.assign(Object.assign({}, errors), { [prop]: currentValue[prop] })), {});
|
|
51
|
+
(_a = this.fieldErrorsObserver) === null || _a === void 0 ? void 0 : _a.setValue(errors);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
ngOnDestroy() {
|
|
57
|
+
var _a;
|
|
58
|
+
super.ngOnDestroy();
|
|
59
|
+
(_a = this.fieldErrorsObserver) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
FormlyFieldDatepicker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldDatepicker, deps: [{ token: i1.FormlyConfig }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
+
FormlyFieldDatepicker.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: FormlyFieldDatepicker, selector: "formly-field-mat-datepicker", viewQueries: [{ propertyName: "datepickerToggle", first: true, predicate: ["datepickerToggle"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
64
|
+
<input
|
|
65
|
+
matInput
|
|
66
|
+
[id]="id"
|
|
67
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
68
|
+
[formControl]="formControl"
|
|
69
|
+
[matDatepicker]="picker"
|
|
70
|
+
[matDatepickerFilter]="props.datepickerOptions.filter"
|
|
71
|
+
[max]="props.datepickerOptions.max"
|
|
72
|
+
[min]="props.datepickerOptions.min"
|
|
73
|
+
[formlyAttributes]="field"
|
|
74
|
+
[placeholder]="props.placeholder"
|
|
75
|
+
[tabindex]="props.tabindex"
|
|
76
|
+
[readonly]="props.readonly"
|
|
77
|
+
[required]="required"
|
|
78
|
+
(dateInput)="props.datepickerOptions.dateInput(field, $event)"
|
|
79
|
+
(dateChange)="props.datepickerOptions.dateChange(field, $event)"
|
|
80
|
+
/>
|
|
81
|
+
<ng-template #datepickerToggle>
|
|
82
|
+
<mat-datepicker-toggle
|
|
83
|
+
(click)="detectChanges()"
|
|
84
|
+
[disabled]="props.disabled"
|
|
85
|
+
[for]="picker"
|
|
86
|
+
></mat-datepicker-toggle>
|
|
87
|
+
</ng-template>
|
|
88
|
+
<mat-datepicker
|
|
89
|
+
#picker
|
|
90
|
+
[color]="props.color"
|
|
91
|
+
[dateClass]="props.datepickerOptions.dateClass"
|
|
92
|
+
[disabled]="props.datepickerOptions.disabled"
|
|
93
|
+
[opened]="props.datepickerOptions.opened"
|
|
94
|
+
[panelClass]="props.datepickerOptions.panelClass"
|
|
95
|
+
[startAt]="props.datepickerOptions.startAt"
|
|
96
|
+
[startView]="props.datepickerOptions.startView"
|
|
97
|
+
[touchUi]="props.datepickerOptions.touchUi"
|
|
98
|
+
[calendarHeaderComponent]="props.datepickerOptions.calendarHeaderComponent"
|
|
99
|
+
(monthSelected)="props.datepickerOptions.monthSelected(field, $event, picker)"
|
|
100
|
+
(yearSelected)="props.datepickerOptions.yearSelected(field, $event, picker)"
|
|
101
|
+
(opened)="props.datepickerOptions.opened = true"
|
|
102
|
+
(closed)="props.datepickerOptions.opened = false"
|
|
103
|
+
>
|
|
104
|
+
</mat-datepicker>
|
|
105
|
+
`, isInline: true, components: [{ type: i2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { type: i2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }], directives: [{ type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyFieldDatepicker, decorators: [{
|
|
107
|
+
type: Component,
|
|
108
|
+
args: [{
|
|
109
|
+
selector: 'formly-field-mat-datepicker',
|
|
110
|
+
template: `
|
|
111
|
+
<input
|
|
112
|
+
matInput
|
|
113
|
+
[id]="id"
|
|
114
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
115
|
+
[formControl]="formControl"
|
|
116
|
+
[matDatepicker]="picker"
|
|
117
|
+
[matDatepickerFilter]="props.datepickerOptions.filter"
|
|
118
|
+
[max]="props.datepickerOptions.max"
|
|
119
|
+
[min]="props.datepickerOptions.min"
|
|
120
|
+
[formlyAttributes]="field"
|
|
121
|
+
[placeholder]="props.placeholder"
|
|
122
|
+
[tabindex]="props.tabindex"
|
|
123
|
+
[readonly]="props.readonly"
|
|
124
|
+
[required]="required"
|
|
125
|
+
(dateInput)="props.datepickerOptions.dateInput(field, $event)"
|
|
126
|
+
(dateChange)="props.datepickerOptions.dateChange(field, $event)"
|
|
127
|
+
/>
|
|
128
|
+
<ng-template #datepickerToggle>
|
|
129
|
+
<mat-datepicker-toggle
|
|
130
|
+
(click)="detectChanges()"
|
|
131
|
+
[disabled]="props.disabled"
|
|
132
|
+
[for]="picker"
|
|
133
|
+
></mat-datepicker-toggle>
|
|
134
|
+
</ng-template>
|
|
135
|
+
<mat-datepicker
|
|
136
|
+
#picker
|
|
137
|
+
[color]="props.color"
|
|
138
|
+
[dateClass]="props.datepickerOptions.dateClass"
|
|
139
|
+
[disabled]="props.datepickerOptions.disabled"
|
|
140
|
+
[opened]="props.datepickerOptions.opened"
|
|
141
|
+
[panelClass]="props.datepickerOptions.panelClass"
|
|
142
|
+
[startAt]="props.datepickerOptions.startAt"
|
|
143
|
+
[startView]="props.datepickerOptions.startView"
|
|
144
|
+
[touchUi]="props.datepickerOptions.touchUi"
|
|
145
|
+
[calendarHeaderComponent]="props.datepickerOptions.calendarHeaderComponent"
|
|
146
|
+
(monthSelected)="props.datepickerOptions.monthSelected(field, $event, picker)"
|
|
147
|
+
(yearSelected)="props.datepickerOptions.yearSelected(field, $event, picker)"
|
|
148
|
+
(opened)="props.datepickerOptions.opened = true"
|
|
149
|
+
(closed)="props.datepickerOptions.opened = false"
|
|
150
|
+
>
|
|
151
|
+
</mat-datepicker>
|
|
152
|
+
`,
|
|
153
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
154
|
+
}]
|
|
155
|
+
}], ctorParameters: function () { return [{ type: i1.FormlyConfig }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { datepickerToggle: [{
|
|
156
|
+
type: ViewChild,
|
|
157
|
+
args: ['datepickerToggle', { static: true }]
|
|
158
|
+
}] } });
|
|
159
|
+
|
|
160
|
+
class FormlyMatDatepickerModule {
|
|
161
|
+
}
|
|
162
|
+
FormlyMatDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
163
|
+
FormlyMatDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, declarations: [FormlyFieldDatepicker], imports: [CommonModule,
|
|
164
|
+
ReactiveFormsModule,
|
|
165
|
+
MatInputModule,
|
|
166
|
+
MatDatepickerModule,
|
|
167
|
+
FormlyMatFormFieldModule, i1.FormlyModule] });
|
|
168
|
+
FormlyMatDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, imports: [[
|
|
169
|
+
CommonModule,
|
|
170
|
+
ReactiveFormsModule,
|
|
171
|
+
MatInputModule,
|
|
172
|
+
MatDatepickerModule,
|
|
173
|
+
FormlyMatFormFieldModule,
|
|
174
|
+
FormlyModule.forChild({
|
|
175
|
+
types: [
|
|
176
|
+
{
|
|
177
|
+
name: 'datepicker',
|
|
178
|
+
component: FormlyFieldDatepicker,
|
|
179
|
+
wrappers: ['form-field'],
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
}),
|
|
183
|
+
]] });
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: FormlyMatDatepickerModule, decorators: [{
|
|
185
|
+
type: NgModule,
|
|
186
|
+
args: [{
|
|
187
|
+
declarations: [FormlyFieldDatepicker],
|
|
188
|
+
imports: [
|
|
189
|
+
CommonModule,
|
|
190
|
+
ReactiveFormsModule,
|
|
191
|
+
MatInputModule,
|
|
192
|
+
MatDatepickerModule,
|
|
193
|
+
FormlyMatFormFieldModule,
|
|
194
|
+
FormlyModule.forChild({
|
|
195
|
+
types: [
|
|
196
|
+
{
|
|
197
|
+
name: 'datepicker',
|
|
198
|
+
component: FormlyFieldDatepicker,
|
|
199
|
+
wrappers: ['form-field'],
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
}),
|
|
203
|
+
],
|
|
204
|
+
}]
|
|
205
|
+
}] });
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Generated bundle index. Do not edit.
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
export { FormlyFieldDatepicker, FormlyMatDatepickerModule };
|
|
212
|
+
//# sourceMappingURL=ngx-formly-material-datepicker.mjs.map
|