@ngx-formly/material 6.0.0-next.1 → 6.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/README.md +2 -2
  2. package/checkbox/checkbox.module.d.ts +10 -0
  3. package/checkbox/checkbox.type.d.ts +3 -0
  4. package/checkbox/ngx-formly-material-checkbox.d.ts +1 -0
  5. package/checkbox/package.json +5 -6
  6. package/datepicker/datepicker.module.d.ts +11 -0
  7. package/datepicker/datepicker.type.d.ts +3 -0
  8. package/datepicker/ngx-formly-material-datepicker.d.ts +1 -1
  9. package/datepicker/package.json +5 -6
  10. package/esm2020/checkbox/checkbox.module.mjs +61 -0
  11. package/esm2020/checkbox/checkbox.type.mjs +109 -0
  12. package/{esm2015/checkbox/ngx-formly-material-checkbox.js → esm2020/checkbox/ngx-formly-material-checkbox.mjs} +0 -0
  13. package/{esm2015/checkbox/public_api.js → esm2020/checkbox/public_api.mjs} +0 -0
  14. package/esm2020/datepicker/datepicker.module.mjs +57 -0
  15. package/esm2020/datepicker/datepicker.type.mjs +117 -0
  16. package/esm2020/datepicker/ngx-formly-material-datepicker.mjs +5 -0
  17. package/{esm2015/datepicker/public_api.js → esm2020/datepicker/public_api.mjs} +0 -0
  18. package/esm2020/form-field/field.type.mjs +124 -0
  19. package/esm2020/form-field/form-field.module.mjs +47 -0
  20. package/esm2020/form-field/form-field.wrapper.mjs +141 -0
  21. package/esm2020/form-field/ngx-formly-material-form-field.mjs +5 -0
  22. package/{esm2015/form-field/public_api.js → esm2020/form-field/public_api.mjs} +0 -0
  23. package/esm2020/input/input.module.mjs +91 -0
  24. package/esm2020/input/input.type.mjs +79 -0
  25. package/{esm2015/input/ngx-formly-material-input.js → esm2020/input/ngx-formly-material-input.mjs} +0 -0
  26. package/{esm2015/input/public_api.js → esm2020/input/public_api.mjs} +0 -0
  27. package/{esm2015/lib/ui-material.js → esm2020/lib/ui-material.mjs} +0 -0
  28. package/esm2020/lib/ui-material.module.mjs +43 -0
  29. package/esm2020/multicheckbox/multicheckbox.module.mjs +57 -0
  30. package/esm2020/multicheckbox/multicheckbox.type.mjs +82 -0
  31. package/{esm2015/multicheckbox/ngx-formly-material-multicheckbox.js → esm2020/multicheckbox/ngx-formly-material-multicheckbox.mjs} +0 -0
  32. package/{esm2015/multicheckbox/public_api.js → esm2020/multicheckbox/public_api.mjs} +0 -0
  33. package/esm2020/native-select/native-select.module.mjs +57 -0
  34. package/esm2020/native-select/native-select.type.mjs +97 -0
  35. package/{esm2015/native-select/ngx-formly-material-native-select.js → esm2020/native-select/ngx-formly-material-native-select.mjs} +0 -0
  36. package/{esm2015/native-select/public_api.js → esm2020/native-select/public_api.mjs} +0 -0
  37. package/{esm2015/ngx-formly-material.js → esm2020/ngx-formly-material.mjs} +0 -0
  38. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  39. package/{esm2015/radio/ngx-formly-material-radio.js → esm2020/radio/ngx-formly-material-radio.mjs} +0 -0
  40. package/{esm2015/radio/public_api.js → esm2020/radio/public_api.mjs} +0 -0
  41. package/esm2020/radio/radio.module.mjs +57 -0
  42. package/esm2020/radio/radio.type.mjs +89 -0
  43. package/{esm2015/select/ngx-formly-material-select.js → esm2020/select/ngx-formly-material-select.mjs} +0 -0
  44. package/{esm2015/select/public_api.js → esm2020/select/public_api.mjs} +0 -0
  45. package/esm2020/select/select.module.mjs +63 -0
  46. package/esm2020/select/select.type.mjs +151 -0
  47. package/{esm2015/slider/ngx-formly-material-slider.js → esm2020/slider/ngx-formly-material-slider.mjs} +1 -2
  48. package/{esm2015/slider/public_api.js → esm2020/slider/public_api.mjs} +0 -0
  49. package/esm2020/slider/slider.module.mjs +53 -0
  50. package/esm2020/slider/slider.type.mjs +79 -0
  51. package/{esm2015/textarea/ngx-formly-material-textarea.js → esm2020/textarea/ngx-formly-material-textarea.mjs} +0 -0
  52. package/{esm2015/textarea/public_api.js → esm2020/textarea/public_api.mjs} +0 -0
  53. package/esm2020/textarea/textarea.module.mjs +53 -0
  54. package/esm2020/textarea/textarea.type.mjs +77 -0
  55. package/{esm2015/toggle/ngx-formly-material-toggle.js → esm2020/toggle/ngx-formly-material-toggle.mjs} +1 -2
  56. package/{esm2015/toggle/public_api.js → esm2020/toggle/public_api.mjs} +0 -0
  57. package/esm2020/toggle/toggle.module.mjs +53 -0
  58. package/esm2020/toggle/toggle.type.mjs +61 -0
  59. package/fesm2015/ngx-formly-material-checkbox.mjs +171 -0
  60. package/fesm2015/ngx-formly-material-checkbox.mjs.map +1 -0
  61. package/fesm2015/ngx-formly-material-datepicker.mjs +177 -0
  62. package/fesm2015/ngx-formly-material-datepicker.mjs.map +1 -0
  63. package/fesm2015/ngx-formly-material-form-field.mjs +312 -0
  64. package/fesm2015/ngx-formly-material-form-field.mjs.map +1 -0
  65. package/fesm2015/ngx-formly-material-input.mjs +172 -0
  66. package/fesm2015/ngx-formly-material-input.mjs.map +1 -0
  67. package/fesm2015/ngx-formly-material-multicheckbox.mjs +140 -0
  68. package/fesm2015/ngx-formly-material-multicheckbox.mjs.map +1 -0
  69. package/fesm2015/ngx-formly-material-native-select.mjs +156 -0
  70. package/fesm2015/ngx-formly-material-native-select.mjs.map +1 -0
  71. package/fesm2015/ngx-formly-material-radio.mjs +146 -0
  72. package/fesm2015/ngx-formly-material-radio.mjs.map +1 -0
  73. package/fesm2015/ngx-formly-material-select.mjs +219 -0
  74. package/fesm2015/ngx-formly-material-select.mjs.map +1 -0
  75. package/fesm2015/ngx-formly-material-slider.mjs +133 -0
  76. package/fesm2015/ngx-formly-material-slider.mjs.map +1 -0
  77. package/fesm2015/ngx-formly-material-textarea.mjs +131 -0
  78. package/fesm2015/ngx-formly-material-textarea.mjs.map +1 -0
  79. package/fesm2015/ngx-formly-material-toggle.mjs +115 -0
  80. package/fesm2015/ngx-formly-material-toggle.mjs.map +1 -0
  81. package/fesm2015/ngx-formly-material.mjs +55 -0
  82. package/fesm2015/ngx-formly-material.mjs.map +1 -0
  83. package/fesm2020/ngx-formly-material-checkbox.mjs +171 -0
  84. package/fesm2020/ngx-formly-material-checkbox.mjs.map +1 -0
  85. package/fesm2020/ngx-formly-material-datepicker.mjs +176 -0
  86. package/fesm2020/ngx-formly-material-datepicker.mjs.map +1 -0
  87. package/fesm2020/ngx-formly-material-form-field.mjs +309 -0
  88. package/fesm2020/ngx-formly-material-form-field.mjs.map +1 -0
  89. package/fesm2020/ngx-formly-material-input.mjs +172 -0
  90. package/fesm2020/ngx-formly-material-input.mjs.map +1 -0
  91. package/fesm2020/ngx-formly-material-multicheckbox.mjs +140 -0
  92. package/fesm2020/ngx-formly-material-multicheckbox.mjs.map +1 -0
  93. package/fesm2020/ngx-formly-material-native-select.mjs +156 -0
  94. package/fesm2020/ngx-formly-material-native-select.mjs.map +1 -0
  95. package/fesm2020/ngx-formly-material-radio.mjs +146 -0
  96. package/fesm2020/ngx-formly-material-radio.mjs.map +1 -0
  97. package/fesm2020/ngx-formly-material-select.mjs +216 -0
  98. package/fesm2020/ngx-formly-material-select.mjs.map +1 -0
  99. package/fesm2020/ngx-formly-material-slider.mjs +133 -0
  100. package/fesm2020/ngx-formly-material-slider.mjs.map +1 -0
  101. package/fesm2020/ngx-formly-material-textarea.mjs +131 -0
  102. package/fesm2020/ngx-formly-material-textarea.mjs.map +1 -0
  103. package/fesm2020/ngx-formly-material-toggle.mjs +115 -0
  104. package/fesm2020/ngx-formly-material-toggle.mjs.map +1 -0
  105. package/fesm2020/ngx-formly-material.mjs +55 -0
  106. package/fesm2020/ngx-formly-material.mjs.map +1 -0
  107. package/form-field/field.type.d.ts +3 -0
  108. package/form-field/form-field.module.d.ts +9 -0
  109. package/form-field/form-field.wrapper.d.ts +4 -3
  110. package/form-field/ngx-formly-material-form-field.d.ts +1 -1
  111. package/form-field/package.json +5 -6
  112. package/input/input.module.d.ts +10 -0
  113. package/input/input.type.d.ts +3 -0
  114. package/input/ngx-formly-material-input.d.ts +1 -0
  115. package/input/package.json +5 -6
  116. package/lib/ui-material.module.d.ts +11 -0
  117. package/multicheckbox/multicheckbox.module.d.ts +11 -0
  118. package/multicheckbox/multicheckbox.type.d.ts +3 -0
  119. package/multicheckbox/ngx-formly-material-multicheckbox.d.ts +1 -0
  120. package/multicheckbox/package.json +5 -6
  121. package/native-select/native-select.module.d.ts +11 -0
  122. package/native-select/native-select.type.d.ts +3 -0
  123. package/native-select/ngx-formly-material-native-select.d.ts +1 -0
  124. package/native-select/package.json +5 -6
  125. package/ngx-formly-material.d.ts +1 -0
  126. package/package.json +109 -9
  127. package/radio/ngx-formly-material-radio.d.ts +1 -0
  128. package/radio/package.json +5 -6
  129. package/radio/radio.module.d.ts +11 -0
  130. package/radio/radio.type.d.ts +3 -0
  131. package/select/ngx-formly-material-select.d.ts +1 -0
  132. package/select/package.json +5 -6
  133. package/select/select.module.d.ts +12 -0
  134. package/select/select.type.d.ts +5 -1
  135. package/slider/ngx-formly-material-slider.d.ts +1 -1
  136. package/slider/package.json +5 -6
  137. package/slider/slider.module.d.ts +10 -0
  138. package/slider/slider.type.d.ts +3 -0
  139. package/textarea/ngx-formly-material-textarea.d.ts +1 -0
  140. package/textarea/package.json +5 -6
  141. package/textarea/textarea.module.d.ts +10 -0
  142. package/textarea/textarea.type.d.ts +3 -0
  143. package/toggle/ngx-formly-material-toggle.d.ts +1 -1
  144. package/toggle/package.json +5 -6
  145. package/toggle/toggle.module.d.ts +10 -0
  146. package/toggle/toggle.type.d.ts +3 -0
  147. package/bundles/ngx-formly-material-checkbox.umd.js +0 -423
  148. package/bundles/ngx-formly-material-checkbox.umd.js.map +0 -1
  149. package/bundles/ngx-formly-material-checkbox.umd.min.js +0 -16
  150. package/bundles/ngx-formly-material-checkbox.umd.min.js.map +0 -1
  151. package/bundles/ngx-formly-material-datepicker.umd.js +0 -392
  152. package/bundles/ngx-formly-material-datepicker.umd.js.map +0 -1
  153. package/bundles/ngx-formly-material-datepicker.umd.min.js +0 -16
  154. package/bundles/ngx-formly-material-datepicker.umd.min.js.map +0 -1
  155. package/bundles/ngx-formly-material-form-field.umd.js +0 -575
  156. package/bundles/ngx-formly-material-form-field.umd.js.map +0 -1
  157. package/bundles/ngx-formly-material-form-field.umd.min.js +0 -16
  158. package/bundles/ngx-formly-material-form-field.umd.min.js.map +0 -1
  159. package/bundles/ngx-formly-material-input.umd.js +0 -393
  160. package/bundles/ngx-formly-material-input.umd.js.map +0 -1
  161. package/bundles/ngx-formly-material-input.umd.min.js +0 -16
  162. package/bundles/ngx-formly-material-input.umd.min.js.map +0 -1
  163. package/bundles/ngx-formly-material-multicheckbox.umd.js +0 -397
  164. package/bundles/ngx-formly-material-multicheckbox.umd.js.map +0 -1
  165. package/bundles/ngx-formly-material-multicheckbox.umd.min.js +0 -16
  166. package/bundles/ngx-formly-material-multicheckbox.umd.min.js.map +0 -1
  167. package/bundles/ngx-formly-material-native-select.umd.js +0 -374
  168. package/bundles/ngx-formly-material-native-select.umd.js.map +0 -1
  169. package/bundles/ngx-formly-material-native-select.umd.min.js +0 -16
  170. package/bundles/ngx-formly-material-native-select.umd.min.js.map +0 -1
  171. package/bundles/ngx-formly-material-radio.umd.js +0 -398
  172. package/bundles/ngx-formly-material-radio.umd.js.map +0 -1
  173. package/bundles/ngx-formly-material-radio.umd.min.js +0 -16
  174. package/bundles/ngx-formly-material-radio.umd.min.js.map +0 -1
  175. package/bundles/ngx-formly-material-select.umd.js +0 -411
  176. package/bundles/ngx-formly-material-select.umd.js.map +0 -1
  177. package/bundles/ngx-formly-material-select.umd.min.js +0 -16
  178. package/bundles/ngx-formly-material-select.umd.min.js.map +0 -1
  179. package/bundles/ngx-formly-material-slider.umd.js +0 -382
  180. package/bundles/ngx-formly-material-slider.umd.js.map +0 -1
  181. package/bundles/ngx-formly-material-slider.umd.min.js +0 -16
  182. package/bundles/ngx-formly-material-slider.umd.min.js.map +0 -1
  183. package/bundles/ngx-formly-material-textarea.umd.js +0 -379
  184. package/bundles/ngx-formly-material-textarea.umd.js.map +0 -1
  185. package/bundles/ngx-formly-material-textarea.umd.min.js +0 -16
  186. package/bundles/ngx-formly-material-textarea.umd.min.js.map +0 -1
  187. package/bundles/ngx-formly-material-toggle.umd.js +0 -382
  188. package/bundles/ngx-formly-material-toggle.umd.js.map +0 -1
  189. package/bundles/ngx-formly-material-toggle.umd.min.js +0 -16
  190. package/bundles/ngx-formly-material-toggle.umd.min.js.map +0 -1
  191. package/bundles/ngx-formly-material.umd.js +0 -45
  192. package/bundles/ngx-formly-material.umd.js.map +0 -1
  193. package/bundles/ngx-formly-material.umd.min.js +0 -2
  194. package/bundles/ngx-formly-material.umd.min.js.map +0 -1
  195. package/checkbox/ngx-formly-material-checkbox.metadata.json +0 -1
  196. package/datepicker/ngx-formly-material-datepicker.metadata.json +0 -1
  197. package/esm2015/checkbox/checkbox.module.js +0 -34
  198. package/esm2015/checkbox/checkbox.type.js +0 -80
  199. package/esm2015/datepicker/datepicker.module.js +0 -32
  200. package/esm2015/datepicker/datepicker.type.js +0 -73
  201. package/esm2015/datepicker/ngx-formly-material-datepicker.js +0 -6
  202. package/esm2015/form-field/field.type.js +0 -120
  203. package/esm2015/form-field/form-field.module.js +0 -27
  204. package/esm2015/form-field/form-field.wrapper.js +0 -91
  205. package/esm2015/form-field/ngx-formly-material-form-field.js +0 -6
  206. package/esm2015/input/input.module.js +0 -49
  207. package/esm2015/input/input.type.js +0 -43
  208. package/esm2015/lib/ui-material.module.js +0 -24
  209. package/esm2015/multicheckbox/multicheckbox.module.js +0 -32
  210. package/esm2015/multicheckbox/multicheckbox.type.js +0 -59
  211. package/esm2015/native-select/native-select.module.js +0 -32
  212. package/esm2015/native-select/native-select.type.js +0 -54
  213. package/esm2015/radio/radio.module.js +0 -32
  214. package/esm2015/radio/radio.type.js +0 -62
  215. package/esm2015/select/select.module.js +0 -35
  216. package/esm2015/select/select.type.js +0 -95
  217. package/esm2015/slider/slider.module.js +0 -30
  218. package/esm2015/slider/slider.type.js +0 -44
  219. package/esm2015/textarea/textarea.module.js +0 -30
  220. package/esm2015/textarea/textarea.type.js +0 -46
  221. package/esm2015/toggle/toggle.module.js +0 -30
  222. package/esm2015/toggle/toggle.type.js +0 -41
  223. package/fesm2015/ngx-formly-material-checkbox.js +0 -117
  224. package/fesm2015/ngx-formly-material-checkbox.js.map +0 -1
  225. package/fesm2015/ngx-formly-material-datepicker.js +0 -109
  226. package/fesm2015/ngx-formly-material-datepicker.js.map +0 -1
  227. package/fesm2015/ngx-formly-material-form-field.js +0 -238
  228. package/fesm2015/ngx-formly-material-form-field.js.map +0 -1
  229. package/fesm2015/ngx-formly-material-input.js +0 -96
  230. package/fesm2015/ngx-formly-material-input.js.map +0 -1
  231. package/fesm2015/ngx-formly-material-multicheckbox.js +0 -94
  232. package/fesm2015/ngx-formly-material-multicheckbox.js.map +0 -1
  233. package/fesm2015/ngx-formly-material-native-select.js +0 -90
  234. package/fesm2015/ngx-formly-material-native-select.js.map +0 -1
  235. package/fesm2015/ngx-formly-material-radio.js +0 -96
  236. package/fesm2015/ngx-formly-material-radio.js.map +0 -1
  237. package/fesm2015/ngx-formly-material-select.js +0 -134
  238. package/fesm2015/ngx-formly-material-select.js.map +0 -1
  239. package/fesm2015/ngx-formly-material-slider.js +0 -77
  240. package/fesm2015/ngx-formly-material-slider.js.map +0 -1
  241. package/fesm2015/ngx-formly-material-textarea.js +0 -79
  242. package/fesm2015/ngx-formly-material-textarea.js.map +0 -1
  243. package/fesm2015/ngx-formly-material-toggle.js +0 -74
  244. package/fesm2015/ngx-formly-material-toggle.js.map +0 -1
  245. package/fesm2015/ngx-formly-material.js +0 -36
  246. package/fesm2015/ngx-formly-material.js.map +0 -1
  247. package/form-field/ngx-formly-material-form-field.metadata.json +0 -1
  248. package/input/ngx-formly-material-input.metadata.json +0 -1
  249. package/multicheckbox/ngx-formly-material-multicheckbox.metadata.json +0 -1
  250. package/native-select/ngx-formly-material-native-select.metadata.json +0 -1
  251. package/ngx-formly-material.metadata.json +0 -1
  252. package/radio/ngx-formly-material-radio.metadata.json +0 -1
  253. package/select/ngx-formly-material-select.metadata.json +0 -1
  254. package/slider/ngx-formly-material-slider.metadata.json +0 -1
  255. package/textarea/ngx-formly-material-textarea.metadata.json +0 -1
  256. 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