@ngx-formly/material 5.10.24 → 6.0.0-next.4
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 +4 -2
- package/checkbox/checkbox.module.d.ts +10 -0
- package/checkbox/checkbox.type.d.ts +5 -2
- package/checkbox/ngx-formly-material-checkbox.d.ts +1 -0
- package/checkbox/package.json +6 -9
- package/datepicker/datepicker.module.d.ts +11 -0
- package/datepicker/datepicker.type.d.ts +4 -4
- package/datepicker/ngx-formly-material-datepicker.d.ts +1 -1
- package/datepicker/package.json +6 -9
- 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 +117 -0
- package/esm2020/datepicker/ngx-formly-material-datepicker.mjs +5 -0
- package/esm2020/datepicker/public_api.mjs +2 -0
- package/esm2020/form-field/field.type.mjs +124 -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 +82 -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 +97 -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 +151 -0
- package/esm2020/slider/ngx-formly-material-slider.mjs +5 -0
- package/esm2020/slider/public_api.mjs +2 -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 +2 -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 +177 -0
- package/fesm2015/ngx-formly-material-datepicker.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-form-field.mjs +312 -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 +140 -0
- package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -0
- package/fesm2015/ngx-formly-material-native-select.mjs +156 -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 +219 -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 +176 -0
- package/fesm2020/ngx-formly-material-datepicker.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-form-field.mjs +309 -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 +140 -0
- package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -0
- package/fesm2020/ngx-formly-material-native-select.mjs +156 -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 +216 -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 +23 -17
- package/form-field/form-field.module.d.ts +9 -0
- package/form-field/form-field.wrapper.d.ts +26 -27
- 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 +4 -3
- package/input/ngx-formly-material-input.d.ts +1 -0
- package/input/package.json +6 -9
- package/lib/ui-material.module.d.ts +11 -0
- package/multicheckbox/multicheckbox.module.d.ts +11 -0
- package/multicheckbox/multicheckbox.type.d.ts +5 -2
- package/multicheckbox/ngx-formly-material-multicheckbox.d.ts +1 -0
- package/multicheckbox/package.json +6 -9
- package/native-select/native-select.module.d.ts +11 -0
- package/native-select/native-select.type.d.ts +3 -2
- package/native-select/ngx-formly-material-native-select.d.ts +1 -0
- package/native-select/package.json +6 -9
- 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/radio.module.d.ts +11 -0
- package/radio/radio.type.d.ts +4 -1
- package/select/ngx-formly-material-select.d.ts +1 -0
- package/select/package.json +6 -9
- package/select/select.module.d.ts +12 -0
- package/select/select.type.d.ts +6 -4
- package/slider/ngx-formly-material-slider.d.ts +1 -1
- package/slider/package.json +6 -9
- package/slider/slider.module.d.ts +10 -0
- package/slider/slider.type.d.ts +4 -1
- package/textarea/ngx-formly-material-textarea.d.ts +1 -0
- package/textarea/package.json +6 -9
- package/textarea/textarea.module.d.ts +10 -0
- package/textarea/textarea.type.d.ts +3 -2
- package/toggle/ngx-formly-material-toggle.d.ts +1 -1
- package/toggle/package.json +6 -9
- package/toggle/toggle.module.d.ts +10 -0
- package/toggle/toggle.type.d.ts +4 -1
- 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 -151
- 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 -205
- 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 -113
- package/esm2015/datepicker/ngx-formly-material-datepicker.js +0 -10
- package/esm2015/datepicker/public_api.js +0 -6
- 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 -86
- 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 -10
- package/esm2015/slider/public_api.js +0 -6
- 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 -10
- package/esm2015/toggle/public_api.js +0 -6
- 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 -90
- package/esm5/datepicker/ngx-formly-material-datepicker.js +0 -10
- package/esm5/datepicker/public_api.js +0 -6
- 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 -92
- 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 -10
- package/esm5/slider/public_api.js +0 -6
- 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 -10
- package/esm5/toggle/public_api.js +0 -6
- 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 -146
- 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 -126
- 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 -125
- 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 -134
- 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,219 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import * as i5 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i3 from '@angular/forms';
|
|
6
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import * as i4 from '@ngx-formly/core';
|
|
8
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
9
|
+
import * as i6 from '@ngx-formly/core/select';
|
|
10
|
+
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
11
|
+
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
12
|
+
import * as i2 from '@angular/material/select';
|
|
13
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
14
|
+
import * as i1 from '@angular/material/core';
|
|
15
|
+
import { MatPseudoCheckboxModule } from '@angular/material/core';
|
|
16
|
+
|
|
17
|
+
class FormlyFieldSelect extends FieldType {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.defaultOptions = {
|
|
21
|
+
templateOptions: {
|
|
22
|
+
options: [],
|
|
23
|
+
compareWith(o1, o2) {
|
|
24
|
+
return o1 === o2;
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
getSelectAllState(options) {
|
|
30
|
+
if (this.empty || this.value.length === 0) {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
return this.value.length !== this.getSelectAllValue(options).length ? 'indeterminate' : 'checked';
|
|
34
|
+
}
|
|
35
|
+
toggleSelectAll(options) {
|
|
36
|
+
const selectAllValue = this.getSelectAllValue(options);
|
|
37
|
+
this.formControl.setValue(!this.value || this.value.length !== selectAllValue.length ? selectAllValue : []);
|
|
38
|
+
this.formControl.markAsDirty();
|
|
39
|
+
}
|
|
40
|
+
change($event) {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
(_b = (_a = this.to).change) === null || _b === void 0 ? void 0 : _b.call(_a, this.field, $event);
|
|
43
|
+
}
|
|
44
|
+
_getAriaLabelledby() {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
if ((_a = this.to.attributes) === null || _a === void 0 ? void 0 : _a['aria-labelledby']) {
|
|
47
|
+
return this.to.attributes['aria-labelledby'];
|
|
48
|
+
}
|
|
49
|
+
return (_b = this.formField) === null || _b === void 0 ? void 0 : _b._labelId;
|
|
50
|
+
}
|
|
51
|
+
_getAriaLabel() {
|
|
52
|
+
var _a;
|
|
53
|
+
return (_a = this.to.attributes) === null || _a === void 0 ? void 0 : _a['aria-label'];
|
|
54
|
+
}
|
|
55
|
+
getSelectAllValue(options) {
|
|
56
|
+
if (!this.selectAllValue || options !== this.selectAllValue.options) {
|
|
57
|
+
const flatOptions = [];
|
|
58
|
+
options.forEach((o) => (o.group ? flatOptions.push(...o.group) : flatOptions.push(o)));
|
|
59
|
+
this.selectAllValue = {
|
|
60
|
+
options,
|
|
61
|
+
value: flatOptions.filter((o) => !o.disabled).map((o) => o.value),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return this.selectAllValue.value;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
FormlyFieldSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldSelect, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
+
FormlyFieldSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: FormlyFieldSelect, selector: "formly-field-mat-select", usesInheritance: true, ngImport: i0, template: `
|
|
69
|
+
<ng-template #selectAll let-selectOptions="selectOptions">
|
|
70
|
+
<mat-option (click)="toggleSelectAll(selectOptions)">
|
|
71
|
+
<mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
|
|
72
|
+
</mat-pseudo-checkbox>
|
|
73
|
+
{{ to.selectAllOption }}
|
|
74
|
+
</mat-option>
|
|
75
|
+
</ng-template>
|
|
76
|
+
|
|
77
|
+
<mat-select
|
|
78
|
+
[id]="id"
|
|
79
|
+
[formControl]="formControl"
|
|
80
|
+
[formlyAttributes]="field"
|
|
81
|
+
[placeholder]="to.placeholder"
|
|
82
|
+
[tabIndex]="to.tabindex"
|
|
83
|
+
[required]="to.required"
|
|
84
|
+
[compareWith]="to.compareWith"
|
|
85
|
+
[multiple]="to.multiple"
|
|
86
|
+
(selectionChange)="change($event)"
|
|
87
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
88
|
+
[aria-label]="_getAriaLabel()"
|
|
89
|
+
[aria-labelledby]="_getAriaLabelledby()"
|
|
90
|
+
[disableOptionCentering]="to.disableOptionCentering"
|
|
91
|
+
[typeaheadDebounceInterval]="to.typeaheadDebounceInterval"
|
|
92
|
+
>
|
|
93
|
+
<ng-container *ngIf="to.options | formlySelectOptions: field | async as selectOptions">
|
|
94
|
+
<ng-container
|
|
95
|
+
*ngIf="to.multiple && to.selectAllOption"
|
|
96
|
+
[ngTemplateOutlet]="selectAll"
|
|
97
|
+
[ngTemplateOutletContext]="{ selectOptions: selectOptions }"
|
|
98
|
+
>
|
|
99
|
+
</ng-container>
|
|
100
|
+
<ng-container *ngFor="let item of selectOptions">
|
|
101
|
+
<mat-optgroup *ngIf="item.group" [label]="item.label">
|
|
102
|
+
<mat-option *ngFor="let child of item.group" [value]="child.value" [disabled]="child.disabled">
|
|
103
|
+
{{ child.label }}
|
|
104
|
+
</mat-option>
|
|
105
|
+
</mat-optgroup>
|
|
106
|
+
<mat-option *ngIf="!item.group" [value]="item.value" [disabled]="item.disabled">{{ item.label }}</mat-option>
|
|
107
|
+
</ng-container>
|
|
108
|
+
</ng-container>
|
|
109
|
+
</mat-select>
|
|
110
|
+
`, isInline: true, components: [{ type: i1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i1.MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled"] }, { type: i2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i1.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }], 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: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5.AsyncPipe, "formlySelectOptions": i6.ɵFormlySelectOptionsPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldSelect, decorators: [{
|
|
112
|
+
type: Component,
|
|
113
|
+
args: [{
|
|
114
|
+
selector: 'formly-field-mat-select',
|
|
115
|
+
template: `
|
|
116
|
+
<ng-template #selectAll let-selectOptions="selectOptions">
|
|
117
|
+
<mat-option (click)="toggleSelectAll(selectOptions)">
|
|
118
|
+
<mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
|
|
119
|
+
</mat-pseudo-checkbox>
|
|
120
|
+
{{ to.selectAllOption }}
|
|
121
|
+
</mat-option>
|
|
122
|
+
</ng-template>
|
|
123
|
+
|
|
124
|
+
<mat-select
|
|
125
|
+
[id]="id"
|
|
126
|
+
[formControl]="formControl"
|
|
127
|
+
[formlyAttributes]="field"
|
|
128
|
+
[placeholder]="to.placeholder"
|
|
129
|
+
[tabIndex]="to.tabindex"
|
|
130
|
+
[required]="to.required"
|
|
131
|
+
[compareWith]="to.compareWith"
|
|
132
|
+
[multiple]="to.multiple"
|
|
133
|
+
(selectionChange)="change($event)"
|
|
134
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
135
|
+
[aria-label]="_getAriaLabel()"
|
|
136
|
+
[aria-labelledby]="_getAriaLabelledby()"
|
|
137
|
+
[disableOptionCentering]="to.disableOptionCentering"
|
|
138
|
+
[typeaheadDebounceInterval]="to.typeaheadDebounceInterval"
|
|
139
|
+
>
|
|
140
|
+
<ng-container *ngIf="to.options | formlySelectOptions: field | async as selectOptions">
|
|
141
|
+
<ng-container
|
|
142
|
+
*ngIf="to.multiple && to.selectAllOption"
|
|
143
|
+
[ngTemplateOutlet]="selectAll"
|
|
144
|
+
[ngTemplateOutletContext]="{ selectOptions: selectOptions }"
|
|
145
|
+
>
|
|
146
|
+
</ng-container>
|
|
147
|
+
<ng-container *ngFor="let item of selectOptions">
|
|
148
|
+
<mat-optgroup *ngIf="item.group" [label]="item.label">
|
|
149
|
+
<mat-option *ngFor="let child of item.group" [value]="child.value" [disabled]="child.disabled">
|
|
150
|
+
{{ child.label }}
|
|
151
|
+
</mat-option>
|
|
152
|
+
</mat-optgroup>
|
|
153
|
+
<mat-option *ngIf="!item.group" [value]="item.value" [disabled]="item.disabled">{{ item.label }}</mat-option>
|
|
154
|
+
</ng-container>
|
|
155
|
+
</ng-container>
|
|
156
|
+
</mat-select>
|
|
157
|
+
`,
|
|
158
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
159
|
+
}]
|
|
160
|
+
}] });
|
|
161
|
+
|
|
162
|
+
class FormlyMatSelectModule {
|
|
163
|
+
}
|
|
164
|
+
FormlyMatSelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
165
|
+
FormlyMatSelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSelectModule, declarations: [FormlyFieldSelect], imports: [CommonModule,
|
|
166
|
+
ReactiveFormsModule,
|
|
167
|
+
MatSelectModule,
|
|
168
|
+
MatPseudoCheckboxModule,
|
|
169
|
+
FormlyMatFormFieldModule,
|
|
170
|
+
FormlySelectModule, i4.FormlyModule] });
|
|
171
|
+
FormlyMatSelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSelectModule, imports: [[
|
|
172
|
+
CommonModule,
|
|
173
|
+
ReactiveFormsModule,
|
|
174
|
+
MatSelectModule,
|
|
175
|
+
MatPseudoCheckboxModule,
|
|
176
|
+
FormlyMatFormFieldModule,
|
|
177
|
+
FormlySelectModule,
|
|
178
|
+
FormlyModule.forChild({
|
|
179
|
+
types: [
|
|
180
|
+
{
|
|
181
|
+
name: 'select',
|
|
182
|
+
component: FormlyFieldSelect,
|
|
183
|
+
wrappers: ['form-field'],
|
|
184
|
+
},
|
|
185
|
+
{ name: 'enum', extends: 'select' },
|
|
186
|
+
],
|
|
187
|
+
}),
|
|
188
|
+
]] });
|
|
189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSelectModule, decorators: [{
|
|
190
|
+
type: NgModule,
|
|
191
|
+
args: [{
|
|
192
|
+
declarations: [FormlyFieldSelect],
|
|
193
|
+
imports: [
|
|
194
|
+
CommonModule,
|
|
195
|
+
ReactiveFormsModule,
|
|
196
|
+
MatSelectModule,
|
|
197
|
+
MatPseudoCheckboxModule,
|
|
198
|
+
FormlyMatFormFieldModule,
|
|
199
|
+
FormlySelectModule,
|
|
200
|
+
FormlyModule.forChild({
|
|
201
|
+
types: [
|
|
202
|
+
{
|
|
203
|
+
name: 'select',
|
|
204
|
+
component: FormlyFieldSelect,
|
|
205
|
+
wrappers: ['form-field'],
|
|
206
|
+
},
|
|
207
|
+
{ name: 'enum', extends: 'select' },
|
|
208
|
+
],
|
|
209
|
+
}),
|
|
210
|
+
],
|
|
211
|
+
}]
|
|
212
|
+
}] });
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Generated bundle index. Do not edit.
|
|
216
|
+
*/
|
|
217
|
+
|
|
218
|
+
export { FormlyFieldSelect, FormlyMatSelectModule };
|
|
219
|
+
//# sourceMappingURL=ngx-formly-material-select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-select.mjs","sources":["../../../../src/ui/material/select/src/select.type.ts","../../../../src/ui/material/select/src/select.module.ts","../../../../src/ui/material/select/src/ngx-formly-material-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { MatSelectChange } from '@angular/material/select';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-select',\n template: `\n <ng-template #selectAll let-selectOptions=\"selectOptions\">\n <mat-option (click)=\"toggleSelectAll(selectOptions)\">\n <mat-pseudo-checkbox class=\"mat-option-pseudo-checkbox\" [state]=\"getSelectAllState(selectOptions)\">\n </mat-pseudo-checkbox>\n {{ to.selectAllOption }}\n </mat-option>\n </ng-template>\n\n <mat-select\n [id]=\"id\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"to.placeholder\"\n [tabIndex]=\"to.tabindex\"\n [required]=\"to.required\"\n [compareWith]=\"to.compareWith\"\n [multiple]=\"to.multiple\"\n (selectionChange)=\"change($event)\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [aria-label]=\"_getAriaLabel()\"\n [aria-labelledby]=\"_getAriaLabelledby()\"\n [disableOptionCentering]=\"to.disableOptionCentering\"\n [typeaheadDebounceInterval]=\"to.typeaheadDebounceInterval\"\n >\n <ng-container *ngIf=\"to.options | formlySelectOptions: field | async as selectOptions\">\n <ng-container\n *ngIf=\"to.multiple && to.selectAllOption\"\n [ngTemplateOutlet]=\"selectAll\"\n [ngTemplateOutletContext]=\"{ selectOptions: selectOptions }\"\n >\n </ng-container>\n <ng-container *ngFor=\"let item of selectOptions\">\n <mat-optgroup *ngIf=\"item.group\" [label]=\"item.label\">\n <mat-option *ngFor=\"let child of item.group\" [value]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </mat-option>\n </mat-optgroup>\n <mat-option *ngIf=\"!item.group\" [value]=\"item.value\" [disabled]=\"item.disabled\">{{ item.label }}</mat-option>\n </ng-container>\n </ng-container>\n </mat-select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n compareWith(o1: any, o2: any) {\n return o1 === o2;\n },\n },\n };\n\n private selectAllValue!: { options: any; value: any[] };\n\n getSelectAllState(options: any[]) {\n if (this.empty || this.value.length === 0) {\n return '';\n }\n\n return this.value.length !== this.getSelectAllValue(options).length ? 'indeterminate' : 'checked';\n }\n\n toggleSelectAll(options: any[]) {\n const selectAllValue = this.getSelectAllValue(options);\n this.formControl.setValue(!this.value || this.value.length !== selectAllValue.length ? selectAllValue : []);\n this.formControl.markAsDirty();\n }\n\n change($event: MatSelectChange) {\n this.to.change?.(this.field, $event);\n }\n\n _getAriaLabelledby() {\n if (this.to.attributes?.['aria-labelledby']) {\n return this.to.attributes['aria-labelledby'];\n }\n\n return this.formField?._labelId;\n }\n\n _getAriaLabel() {\n return this.to.attributes?.['aria-label'];\n }\n\n private getSelectAllValue(options: any[]) {\n if (!this.selectAllValue || options !== this.selectAllValue.options) {\n const flatOptions: any[] = [];\n options.forEach((o) => (o.group ? flatOptions.push(...o.group) : flatOptions.push(o)));\n\n this.selectAllValue = {\n options,\n value: flatOptions.filter((o) => !o.disabled).map((o) => o.value),\n };\n }\n\n return this.selectAllValue.value;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { FormlyFieldSelect } from './select.type';\nimport { MatPseudoCheckboxModule } from '@angular/material/core';\n\n@NgModule({\n declarations: [FormlyFieldSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSelectModule,\n MatPseudoCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'select',\n component: FormlyFieldSelect,\n wrappers: ['form-field'],\n },\n { name: 'enum', extends: 'select' },\n ],\n }),\n ],\n})\nexport class FormlyMatSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,133 @@
|
|
|
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 i3 from '@ngx-formly/core';
|
|
5
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
6
|
+
import * as i2 from '@angular/forms';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import * as i1 from '@angular/material/slider';
|
|
9
|
+
import { MatSlider, MatSliderModule } from '@angular/material/slider';
|
|
10
|
+
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
11
|
+
|
|
12
|
+
class FormlySliderTypeComponent extends FieldType {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.defaultOptions = {
|
|
16
|
+
templateOptions: {
|
|
17
|
+
hideFieldUnderline: true,
|
|
18
|
+
floatLabel: 'always',
|
|
19
|
+
thumbLabel: false,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
onContainerClick(event) {
|
|
24
|
+
this.slider.focus();
|
|
25
|
+
super.onContainerClick(event);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
FormlySliderTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlySliderTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
FormlySliderTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: FormlySliderTypeComponent, selector: "formly-field-mat-slider", viewQueries: [{ propertyName: "slider", first: true, predicate: MatSlider, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
30
|
+
<mat-slider
|
|
31
|
+
[id]="id"
|
|
32
|
+
[style.width]="'100%'"
|
|
33
|
+
[formControl]="formControl"
|
|
34
|
+
[formlyAttributes]="field"
|
|
35
|
+
[tabIndex]="to.tabindex"
|
|
36
|
+
[color]="to.color"
|
|
37
|
+
[displayWith]="to.displayWith"
|
|
38
|
+
[invert]="to.invert"
|
|
39
|
+
[max]="to.max"
|
|
40
|
+
[min]="to.min"
|
|
41
|
+
[step]="to.step"
|
|
42
|
+
[thumbLabel]="to.thumbLabel"
|
|
43
|
+
[tickInterval]="to.tickInterval"
|
|
44
|
+
[valueText]="to.valueText"
|
|
45
|
+
[vertical]="to.vertical"
|
|
46
|
+
(input)="to.input && to.input(field, $event)"
|
|
47
|
+
(change)="to.change && to.change(field, $event)"
|
|
48
|
+
>
|
|
49
|
+
</mat-slider>
|
|
50
|
+
`, isInline: true, components: [{ type: i1.MatSlider, selector: "mat-slider", inputs: ["disabled", "color", "tabIndex", "invert", "max", "min", "step", "thumbLabel", "tickInterval", "value", "displayWith", "valueText", "vertical"], outputs: ["change", "input", "valueChange"], exportAs: ["matSlider"] }], directives: [{ 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlySliderTypeComponent, decorators: [{
|
|
52
|
+
type: Component,
|
|
53
|
+
args: [{
|
|
54
|
+
selector: 'formly-field-mat-slider',
|
|
55
|
+
template: `
|
|
56
|
+
<mat-slider
|
|
57
|
+
[id]="id"
|
|
58
|
+
[style.width]="'100%'"
|
|
59
|
+
[formControl]="formControl"
|
|
60
|
+
[formlyAttributes]="field"
|
|
61
|
+
[tabIndex]="to.tabindex"
|
|
62
|
+
[color]="to.color"
|
|
63
|
+
[displayWith]="to.displayWith"
|
|
64
|
+
[invert]="to.invert"
|
|
65
|
+
[max]="to.max"
|
|
66
|
+
[min]="to.min"
|
|
67
|
+
[step]="to.step"
|
|
68
|
+
[thumbLabel]="to.thumbLabel"
|
|
69
|
+
[tickInterval]="to.tickInterval"
|
|
70
|
+
[valueText]="to.valueText"
|
|
71
|
+
[vertical]="to.vertical"
|
|
72
|
+
(input)="to.input && to.input(field, $event)"
|
|
73
|
+
(change)="to.change && to.change(field, $event)"
|
|
74
|
+
>
|
|
75
|
+
</mat-slider>
|
|
76
|
+
`,
|
|
77
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
78
|
+
}]
|
|
79
|
+
}], propDecorators: { slider: [{
|
|
80
|
+
type: ViewChild,
|
|
81
|
+
args: [MatSlider, { static: true }]
|
|
82
|
+
}] } });
|
|
83
|
+
|
|
84
|
+
class FormlyMatSliderModule {
|
|
85
|
+
}
|
|
86
|
+
FormlyMatSliderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSliderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
87
|
+
FormlyMatSliderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSliderModule, declarations: [FormlySliderTypeComponent], imports: [CommonModule,
|
|
88
|
+
ReactiveFormsModule,
|
|
89
|
+
MatSliderModule,
|
|
90
|
+
FormlyMatFormFieldModule, i3.FormlyModule] });
|
|
91
|
+
FormlyMatSliderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSliderModule, imports: [[
|
|
92
|
+
CommonModule,
|
|
93
|
+
ReactiveFormsModule,
|
|
94
|
+
MatSliderModule,
|
|
95
|
+
FormlyMatFormFieldModule,
|
|
96
|
+
FormlyModule.forChild({
|
|
97
|
+
types: [
|
|
98
|
+
{
|
|
99
|
+
name: 'slider',
|
|
100
|
+
component: FormlySliderTypeComponent,
|
|
101
|
+
wrappers: ['form-field'],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
}),
|
|
105
|
+
]] });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatSliderModule, decorators: [{
|
|
107
|
+
type: NgModule,
|
|
108
|
+
args: [{
|
|
109
|
+
declarations: [FormlySliderTypeComponent],
|
|
110
|
+
imports: [
|
|
111
|
+
CommonModule,
|
|
112
|
+
ReactiveFormsModule,
|
|
113
|
+
MatSliderModule,
|
|
114
|
+
FormlyMatFormFieldModule,
|
|
115
|
+
FormlyModule.forChild({
|
|
116
|
+
types: [
|
|
117
|
+
{
|
|
118
|
+
name: 'slider',
|
|
119
|
+
component: FormlySliderTypeComponent,
|
|
120
|
+
wrappers: ['form-field'],
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
}),
|
|
124
|
+
],
|
|
125
|
+
}]
|
|
126
|
+
}] });
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Generated bundle index. Do not edit.
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
export { FormlyMatSliderModule };
|
|
133
|
+
//# sourceMappingURL=ngx-formly-material-slider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-slider.mjs","sources":["../../../../src/ui/material/slider/src/slider.type.ts","../../../../src/ui/material/slider/src/slider.module.ts","../../../../src/ui/material/slider/src/ngx-formly-material-slider.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatSlider } from '@angular/material/slider';\n\n@Component({\n selector: 'formly-field-mat-slider',\n template: `\n <mat-slider\n [id]=\"id\"\n [style.width]=\"'100%'\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [color]=\"to.color\"\n [displayWith]=\"to.displayWith\"\n [invert]=\"to.invert\"\n [max]=\"to.max\"\n [min]=\"to.min\"\n [step]=\"to.step\"\n [thumbLabel]=\"to.thumbLabel\"\n [tickInterval]=\"to.tickInterval\"\n [valueText]=\"to.valueText\"\n [vertical]=\"to.vertical\"\n (input)=\"to.input && to.input(field, $event)\"\n (change)=\"to.change && to.change(field, $event)\"\n >\n </mat-slider>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlySliderTypeComponent extends FieldType {\n @ViewChild(MatSlider, { static: true }) slider!: MatSlider;\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n thumbLabel: false,\n },\n };\n\n onContainerClick(event: MouseEvent): void {\n this.slider.focus();\n super.onContainerClick(event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\n\nimport { FormlySliderTypeComponent } from './slider.type';\n\n@NgModule({\n declarations: [FormlySliderTypeComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatSliderModule,\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'slider',\n component: FormlySliderTypeComponent,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatSliderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MA8Ba,kCAAkC,SAAS;IA1BxD;;QA4BE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,UAAU,EAAE,QAAiB;gBAC7B,UAAU,EAAE,KAAK;aAClB;SACF,CAAC;KAMH;IAJC,gBAAgB,CAAC,KAAiB;QAChC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KAC/B;;sHAbU,yBAAyB;0GAAzB,yBAAyB,uGACzB,SAAS,qFAzBV;;;;;;;;;;;;;;;;;;;;;GAqBT;2FAGU,yBAAyB;kBA1BrC,SAAS;mBAAC;oBACT,QAAQ,EAAE,yBAAyB;oBACnC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;GAqBT;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;8BAEyC,MAAM;sBAA7C,SAAS;uBAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCJ3B,qBAAqB;;kHAArB,qBAAqB;mHAArB,qBAAqB,iBAjBjB,yBAAyB,aAEtC,YAAY;QACZ,mBAAmB;QACnB,eAAe;QACf,wBAAwB;mHAYf,qBAAqB,YAhBvB;YACP,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,yBAAyB;wBACpC,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,qBAAqB;kBAlBjC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,QAAQ;oCACd,SAAS,EAAE,yBAAyB;oCACpC,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC1BD;;;;;;"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i4 from '@ngx-formly/core';
|
|
5
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
6
|
+
import * as i2 from '@angular/forms';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
9
|
+
import * as i1 from '@angular/material/input';
|
|
10
|
+
import { MAT_INPUT_VALUE_ACCESSOR, MatInputModule } from '@angular/material/input';
|
|
11
|
+
import * as i3 from '@angular/cdk/text-field';
|
|
12
|
+
|
|
13
|
+
class FormlyFieldTextArea extends FieldType {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.defaultOptions = {
|
|
17
|
+
templateOptions: {
|
|
18
|
+
cols: 1,
|
|
19
|
+
rows: 1,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
FormlyFieldTextArea.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldTextArea, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
FormlyFieldTextArea.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: FormlyFieldTextArea, selector: "formly-field-mat-textarea", providers: [
|
|
26
|
+
// fix for https://github.com/ngx-formly/ngx-formly/issues/1688
|
|
27
|
+
// rely on formControl value instead of elementRef which return empty value in Firefox.
|
|
28
|
+
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
|
|
29
|
+
], usesInheritance: true, ngImport: i0, template: `
|
|
30
|
+
<textarea
|
|
31
|
+
matInput
|
|
32
|
+
[id]="id"
|
|
33
|
+
[readonly]="to.readonly"
|
|
34
|
+
[required]="to.required"
|
|
35
|
+
[formControl]="formControl"
|
|
36
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
37
|
+
[cols]="to.cols"
|
|
38
|
+
[rows]="to.rows"
|
|
39
|
+
[formlyAttributes]="field"
|
|
40
|
+
[placeholder]="to.placeholder"
|
|
41
|
+
[tabindex]="to.tabindex"
|
|
42
|
+
[cdkTextareaAutosize]="to.autosize"
|
|
43
|
+
[cdkAutosizeMinRows]="to.autosizeMinRows"
|
|
44
|
+
[cdkAutosizeMaxRows]="to.autosizeMaxRows"
|
|
45
|
+
[class.cdk-textarea-autosize]="to.autosize"
|
|
46
|
+
>
|
|
47
|
+
</textarea>
|
|
48
|
+
`, isInline: true, directives: [{ type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "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 });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyFieldTextArea, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: 'formly-field-mat-textarea',
|
|
53
|
+
template: `
|
|
54
|
+
<textarea
|
|
55
|
+
matInput
|
|
56
|
+
[id]="id"
|
|
57
|
+
[readonly]="to.readonly"
|
|
58
|
+
[required]="to.required"
|
|
59
|
+
[formControl]="formControl"
|
|
60
|
+
[errorStateMatcher]="errorStateMatcher"
|
|
61
|
+
[cols]="to.cols"
|
|
62
|
+
[rows]="to.rows"
|
|
63
|
+
[formlyAttributes]="field"
|
|
64
|
+
[placeholder]="to.placeholder"
|
|
65
|
+
[tabindex]="to.tabindex"
|
|
66
|
+
[cdkTextareaAutosize]="to.autosize"
|
|
67
|
+
[cdkAutosizeMinRows]="to.autosizeMinRows"
|
|
68
|
+
[cdkAutosizeMaxRows]="to.autosizeMaxRows"
|
|
69
|
+
[class.cdk-textarea-autosize]="to.autosize"
|
|
70
|
+
>
|
|
71
|
+
</textarea>
|
|
72
|
+
`,
|
|
73
|
+
providers: [
|
|
74
|
+
// fix for https://github.com/ngx-formly/ngx-formly/issues/1688
|
|
75
|
+
// rely on formControl value instead of elementRef which return empty value in Firefox.
|
|
76
|
+
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },
|
|
77
|
+
],
|
|
78
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
79
|
+
}]
|
|
80
|
+
}] });
|
|
81
|
+
|
|
82
|
+
class FormlyMatTextAreaModule {
|
|
83
|
+
}
|
|
84
|
+
FormlyMatTextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatTextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
85
|
+
FormlyMatTextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatTextAreaModule, declarations: [FormlyFieldTextArea], imports: [CommonModule,
|
|
86
|
+
ReactiveFormsModule,
|
|
87
|
+
MatInputModule,
|
|
88
|
+
FormlyMatFormFieldModule, i4.FormlyModule] });
|
|
89
|
+
FormlyMatTextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatTextAreaModule, imports: [[
|
|
90
|
+
CommonModule,
|
|
91
|
+
ReactiveFormsModule,
|
|
92
|
+
MatInputModule,
|
|
93
|
+
FormlyMatFormFieldModule,
|
|
94
|
+
FormlyModule.forChild({
|
|
95
|
+
types: [
|
|
96
|
+
{
|
|
97
|
+
name: 'textarea',
|
|
98
|
+
component: FormlyFieldTextArea,
|
|
99
|
+
wrappers: ['form-field'],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
}),
|
|
103
|
+
]] });
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatTextAreaModule, decorators: [{
|
|
105
|
+
type: NgModule,
|
|
106
|
+
args: [{
|
|
107
|
+
declarations: [FormlyFieldTextArea],
|
|
108
|
+
imports: [
|
|
109
|
+
CommonModule,
|
|
110
|
+
ReactiveFormsModule,
|
|
111
|
+
MatInputModule,
|
|
112
|
+
FormlyMatFormFieldModule,
|
|
113
|
+
FormlyModule.forChild({
|
|
114
|
+
types: [
|
|
115
|
+
{
|
|
116
|
+
name: 'textarea',
|
|
117
|
+
component: FormlyFieldTextArea,
|
|
118
|
+
wrappers: ['form-field'],
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
}),
|
|
122
|
+
],
|
|
123
|
+
}]
|
|
124
|
+
}] });
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Generated bundle index. Do not edit.
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
export { FormlyFieldTextArea, FormlyMatTextAreaModule };
|
|
131
|
+
//# sourceMappingURL=ngx-formly-material-textarea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-formly-material-textarea.mjs","sources":["../../../../src/ui/material/textarea/src/textarea.type.ts","../../../../src/ui/material/textarea/src/textarea.module.ts","../../../../src/ui/material/textarea/src/ngx-formly-material-textarea.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\n\n@Component({\n selector: 'formly-field-mat-textarea',\n template: `\n <textarea\n matInput\n [id]=\"id\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [formControl]=\"formControl\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [cols]=\"to.cols\"\n [rows]=\"to.rows\"\n [formlyAttributes]=\"field\"\n [placeholder]=\"to.placeholder\"\n [tabindex]=\"to.tabindex\"\n [cdkTextareaAutosize]=\"to.autosize\"\n [cdkAutosizeMinRows]=\"to.autosizeMinRows\"\n [cdkAutosizeMaxRows]=\"to.autosizeMaxRows\"\n [class.cdk-textarea-autosize]=\"to.autosize\"\n >\n </textarea>\n `,\n providers: [\n // fix for https://github.com/ngx-formly/ngx-formly/issues/1688\n // rely on formControl value instead of elementRef which return empty value in Firefox.\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: FormlyFieldTextArea },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldTextArea extends FieldType implements OnInit {\n defaultOptions = {\n templateOptions: {\n cols: 1,\n rows: 1,\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 { MatInputModule } from '@angular/material/input';\n\nimport { FormlyFieldTextArea } from './textarea.type';\n\n@NgModule({\n declarations: [FormlyFieldTextArea],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'textarea',\n component: FormlyFieldTextArea,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatTextAreaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAiCa,4BAA4B,SAAS;IA7BlD;;QA8BE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,CAAC;aACR;SACF,CAAC;KACH;;gHAPY,mBAAmB;oGAAnB,mBAAmB,oDAPnB;;;QAGT,EAAE,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,mBAAmB,EAAE;KACxE,iDAxBS;;;;;;;;;;;;;;;;;;;GAmBT;2FAQU,mBAAmB;kBA7B/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,2BAA2B;oBACrC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;GAmBT;oBACD,SAAS,EAAE;;;wBAGT,EAAE,OAAO,EAAE,wBAAwB,EAAE,WAAW,qBAAqB,EAAE;qBACxE;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;;MCHY,uBAAuB;;oHAAvB,uBAAuB;qHAAvB,uBAAuB,iBAlBnB,mBAAmB,aAEhC,YAAY;QACZ,mBAAmB;QACnB,cAAc;QAEd,wBAAwB;qHAYf,uBAAuB,YAjBzB;YACP,YAAY;YACZ,mBAAmB;YACnB,cAAc;YAEd,wBAAwB;YACxB,YAAY,CAAC,QAAQ,CAAC;gBACpB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,UAAU;wBAChB,SAAS,EAAE,mBAAmB;wBAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;qBACzB;iBACF;aACF,CAAC;SACH;2FAEU,uBAAuB;kBAnBnC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBAEd,wBAAwB;wBACxB,YAAY,CAAC,QAAQ,CAAC;4BACpB,KAAK,EAAE;gCACL;oCACE,IAAI,EAAE,UAAU;oCAChB,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;iCACzB;6BACF;yBACF,CAAC;qBACH;iBACF;;;AC5BD;;;;;;"}
|
|
@@ -0,0 +1,115 @@
|
|
|
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 i3 from '@ngx-formly/core';
|
|
5
|
+
import { FormlyModule } from '@ngx-formly/core';
|
|
6
|
+
import * as i2 from '@angular/forms';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import * as i1 from '@angular/material/slide-toggle';
|
|
9
|
+
import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
10
|
+
import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
|
|
11
|
+
|
|
12
|
+
class FormlyToggleTypeComponent extends FieldType {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.defaultOptions = {
|
|
16
|
+
templateOptions: {
|
|
17
|
+
hideFieldUnderline: true,
|
|
18
|
+
floatLabel: 'always',
|
|
19
|
+
hideLabel: true,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
onContainerClick(event) {
|
|
24
|
+
this.slideToggle.focus();
|
|
25
|
+
super.onContainerClick(event);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
FormlyToggleTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyToggleTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
FormlyToggleTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.2", type: FormlyToggleTypeComponent, selector: "formly-field-mat-toggle", viewQueries: [{ propertyName: "slideToggle", first: true, predicate: MatSlideToggle, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
30
|
+
<mat-slide-toggle
|
|
31
|
+
[id]="id"
|
|
32
|
+
[formControl]="formControl"
|
|
33
|
+
[formlyAttributes]="field"
|
|
34
|
+
[color]="to.color"
|
|
35
|
+
[tabIndex]="to.tabindex"
|
|
36
|
+
[required]="to.required"
|
|
37
|
+
[labelPosition]="to.labelPosition"
|
|
38
|
+
>
|
|
39
|
+
{{ to.label }}
|
|
40
|
+
</mat-slide-toggle>
|
|
41
|
+
`, 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 });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyToggleTypeComponent, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{
|
|
45
|
+
selector: 'formly-field-mat-toggle',
|
|
46
|
+
template: `
|
|
47
|
+
<mat-slide-toggle
|
|
48
|
+
[id]="id"
|
|
49
|
+
[formControl]="formControl"
|
|
50
|
+
[formlyAttributes]="field"
|
|
51
|
+
[color]="to.color"
|
|
52
|
+
[tabIndex]="to.tabindex"
|
|
53
|
+
[required]="to.required"
|
|
54
|
+
[labelPosition]="to.labelPosition"
|
|
55
|
+
>
|
|
56
|
+
{{ to.label }}
|
|
57
|
+
</mat-slide-toggle>
|
|
58
|
+
`,
|
|
59
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
60
|
+
}]
|
|
61
|
+
}], propDecorators: { slideToggle: [{
|
|
62
|
+
type: ViewChild,
|
|
63
|
+
args: [MatSlideToggle, { static: true }]
|
|
64
|
+
}] } });
|
|
65
|
+
|
|
66
|
+
class FormlyMatToggleModule {
|
|
67
|
+
}
|
|
68
|
+
FormlyMatToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
69
|
+
FormlyMatToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatToggleModule, declarations: [FormlyToggleTypeComponent], imports: [CommonModule,
|
|
70
|
+
ReactiveFormsModule,
|
|
71
|
+
MatSlideToggleModule,
|
|
72
|
+
FormlyMatFormFieldModule, i3.FormlyModule] });
|
|
73
|
+
FormlyMatToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatToggleModule, imports: [[
|
|
74
|
+
CommonModule,
|
|
75
|
+
ReactiveFormsModule,
|
|
76
|
+
MatSlideToggleModule,
|
|
77
|
+
FormlyMatFormFieldModule,
|
|
78
|
+
FormlyModule.forChild({
|
|
79
|
+
types: [
|
|
80
|
+
{
|
|
81
|
+
name: 'toggle',
|
|
82
|
+
component: FormlyToggleTypeComponent,
|
|
83
|
+
wrappers: ['form-field'],
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
}),
|
|
87
|
+
]] });
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.2", ngImport: i0, type: FormlyMatToggleModule, decorators: [{
|
|
89
|
+
type: NgModule,
|
|
90
|
+
args: [{
|
|
91
|
+
declarations: [FormlyToggleTypeComponent],
|
|
92
|
+
imports: [
|
|
93
|
+
CommonModule,
|
|
94
|
+
ReactiveFormsModule,
|
|
95
|
+
MatSlideToggleModule,
|
|
96
|
+
FormlyMatFormFieldModule,
|
|
97
|
+
FormlyModule.forChild({
|
|
98
|
+
types: [
|
|
99
|
+
{
|
|
100
|
+
name: 'toggle',
|
|
101
|
+
component: FormlyToggleTypeComponent,
|
|
102
|
+
wrappers: ['form-field'],
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
}),
|
|
106
|
+
],
|
|
107
|
+
}]
|
|
108
|
+
}] });
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Generated bundle index. Do not edit.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
export { FormlyMatToggleModule };
|
|
115
|
+
//# sourceMappingURL=ngx-formly-material-toggle.mjs.map
|