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

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
@@ -1,96 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { FormlyModule } from '@ngx-formly/core';
4
- import { ReactiveFormsModule } from '@angular/forms';
5
- import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
6
- import { MatInputModule } from '@angular/material/input';
7
-
8
- class FormlyFieldInput extends FieldType {
9
- get type() {
10
- return this.to.type || 'text';
11
- }
12
- }
13
- FormlyFieldInput.decorators = [
14
- { type: Component, args: [{
15
- selector: 'formly-field-mat-input',
16
- template: `
17
- <input
18
- *ngIf="type !== 'number'; else numberTmp"
19
- matInput
20
- [id]="id"
21
- [type]="type || 'text'"
22
- [readonly]="to.readonly"
23
- [required]="to.required"
24
- [errorStateMatcher]="errorStateMatcher"
25
- [formControl]="formControl"
26
- [formlyAttributes]="field"
27
- [tabIndex]="to.tabindex"
28
- [placeholder]="to.placeholder"
29
- />
30
- <ng-template #numberTmp>
31
- <input
32
- matInput
33
- [id]="id"
34
- type="number"
35
- [readonly]="to.readonly"
36
- [required]="to.required"
37
- [errorStateMatcher]="errorStateMatcher"
38
- [formControl]="formControl"
39
- [formlyAttributes]="field"
40
- [tabIndex]="to.tabindex"
41
- [placeholder]="to.placeholder"
42
- />
43
- </ng-template>
44
- `,
45
- changeDetection: ChangeDetectionStrategy.OnPush
46
- },] }
47
- ];
48
-
49
- class FormlyMatInputModule {
50
- }
51
- FormlyMatInputModule.decorators = [
52
- { type: NgModule, args: [{
53
- declarations: [FormlyFieldInput],
54
- imports: [
55
- CommonModule,
56
- ReactiveFormsModule,
57
- MatInputModule,
58
- FormlyMatFormFieldModule,
59
- FormlyModule.forChild({
60
- types: [
61
- {
62
- name: 'input',
63
- component: FormlyFieldInput,
64
- wrappers: ['form-field'],
65
- },
66
- { name: 'string', extends: 'input' },
67
- {
68
- name: 'number',
69
- extends: 'input',
70
- defaultOptions: {
71
- templateOptions: {
72
- type: 'number',
73
- },
74
- },
75
- },
76
- {
77
- name: 'integer',
78
- extends: 'input',
79
- defaultOptions: {
80
- templateOptions: {
81
- type: 'number',
82
- },
83
- },
84
- },
85
- ],
86
- }),
87
- ],
88
- },] }
89
- ];
90
-
91
- /**
92
- * Generated bundle index. Do not edit.
93
- */
94
-
95
- export { FormlyFieldInput, FormlyMatInputModule };
96
- //# sourceMappingURL=ngx-formly-material-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-material-input.js","sources":["../../../../src/ui/material/input/src/input.type.ts","../../../../src/ui/material/input/src/input.module.ts","../../../../src/ui/material/input/src/ngx-formly-material-input.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-input',\n template: `\n <input\n *ngIf=\"type !== 'number'; else numberTmp\"\n matInput\n [id]=\"id\"\n [type]=\"type || 'text'\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [placeholder]=\"to.placeholder\"\n />\n <ng-template #numberTmp>\n <input\n matInput\n [id]=\"id\"\n type=\"number\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [placeholder]=\"to.placeholder\"\n />\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldInput extends FieldType implements OnInit {\n get type() {\n return this.to.type || 'text';\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 { FormlyFieldInput } from './input.type';\n\n@NgModule({\n declarations: [FormlyFieldInput],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'input',\n component: FormlyFieldInput,\n wrappers: ['form-field'],\n },\n { name: 'string', extends: 'input' },\n {\n name: 'number',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number',\n },\n },\n },\n {\n name: 'integer',\n extends: 'input',\n defaultOptions: {\n templateOptions: {\n type: 'number',\n },\n },\n },\n ],\n }),\n ],\n})\nexport class FormlyMatInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAoCa,gBAAiB,SAAQ,SAAS;IAC7C,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,MAAM,CAAC;KAC/B;;;YApCF,SAAS,SAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAChD;;;MCaY,oBAAoB;;;YAtChC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;gBAChC,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,cAAc;oBAEd,wBAAwB;oBACxB,YAAY,CAAC,QAAQ,CAAC;wBACpB,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,OAAO;gCACb,SAAS,EAAE,gBAAgB;gCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;6BACzB;4BACD,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE;4BACpC;gCACE,IAAI,EAAE,QAAQ;gCACd,OAAO,EAAE,OAAO;gCAChB,cAAc,EAAE;oCACd,eAAe,EAAE;wCACf,IAAI,EAAE,QAAQ;qCACf;iCACF;6BACF;4BACD;gCACE,IAAI,EAAE,SAAS;gCACf,OAAO,EAAE,OAAO;gCAChB,cAAc,EAAE;oCACd,eAAe,EAAE;wCACf,IAAI,EAAE,QAAQ;qCACf;iCACF;6BACF;yBACF;qBACF,CAAC;iBACH;aACF;;;AC/CD;;;;;;"}
@@ -1,94 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, ViewChildren, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { ReactiveFormsModule } from '@angular/forms';
4
- import { FormlyModule } from '@ngx-formly/core';
5
- import { FormlySelectModule } from '@ngx-formly/core/select';
6
- import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
7
- import { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';
8
-
9
- class FormlyFieldMultiCheckbox extends FieldType {
10
- constructor() {
11
- super(...arguments);
12
- this.defaultOptions = {
13
- templateOptions: {
14
- hideFieldUnderline: true,
15
- floatLabel: 'always',
16
- options: [],
17
- color: 'accent',
18
- },
19
- };
20
- }
21
- onChange(value, checked) {
22
- if (this.to.type === 'array') {
23
- this.formControl.patchValue(checked
24
- ? [...(this.formControl.value || []), value]
25
- : [...(this.formControl.value || [])].filter((o) => o !== value));
26
- }
27
- else {
28
- this.formControl.patchValue(Object.assign(Object.assign({}, this.formControl.value), { [value]: checked }));
29
- }
30
- this.formControl.markAsTouched();
31
- }
32
- // TODO: find a solution to prevent scroll on focus
33
- onContainerClick() { }
34
- isChecked(option) {
35
- const value = this.formControl.value;
36
- return value && (this.to.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);
37
- }
38
- }
39
- FormlyFieldMultiCheckbox.decorators = [
40
- { type: Component, args: [{
41
- selector: 'formly-field-mat-multicheckbox',
42
- template: `
43
- <ng-container *ngFor="let option of to.options | formlySelectOptions: field | async; let i = index">
44
- <mat-checkbox
45
- [id]="id + '_' + i"
46
- [formlyAttributes]="field"
47
- [tabIndex]="to.tabindex"
48
- [color]="to.color"
49
- [labelPosition]="to.labelPosition"
50
- [checked]="isChecked(option)"
51
- [disabled]="formControl.disabled"
52
- (change)="onChange(option.value, $event.checked)"
53
- >
54
- {{ option.label }}
55
- </mat-checkbox>
56
- </ng-container>
57
- `,
58
- changeDetection: ChangeDetectionStrategy.OnPush
59
- },] }
60
- ];
61
- FormlyFieldMultiCheckbox.propDecorators = {
62
- checkboxes: [{ type: ViewChildren, args: [MatCheckbox,] }]
63
- };
64
-
65
- class FormlyMatMultiCheckboxModule {
66
- }
67
- FormlyMatMultiCheckboxModule.decorators = [
68
- { type: NgModule, args: [{
69
- declarations: [FormlyFieldMultiCheckbox],
70
- imports: [
71
- CommonModule,
72
- ReactiveFormsModule,
73
- MatCheckboxModule,
74
- FormlyMatFormFieldModule,
75
- FormlySelectModule,
76
- FormlyModule.forChild({
77
- types: [
78
- {
79
- name: 'multicheckbox',
80
- component: FormlyFieldMultiCheckbox,
81
- wrappers: ['form-field'],
82
- },
83
- ],
84
- }),
85
- ],
86
- },] }
87
- ];
88
-
89
- /**
90
- * Generated bundle index. Do not edit.
91
- */
92
-
93
- export { FormlyFieldMultiCheckbox, FormlyMatMultiCheckboxModule };
94
- //# sourceMappingURL=ngx-formly-material-multicheckbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-material-multicheckbox.js","sources":["../../../../src/ui/material/multicheckbox/src/multicheckbox.type.ts","../../../../src/ui/material/multicheckbox/src/multicheckbox.module.ts","../../../../src/ui/material/multicheckbox/src/ngx-formly-material-multicheckbox.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChildren, QueryList } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatCheckbox } from '@angular/material/checkbox';\n\n@Component({\n selector: 'formly-field-mat-multicheckbox',\n template: `\n <ng-container *ngFor=\"let option of to.options | formlySelectOptions: field | async; let i = index\">\n <mat-checkbox\n [id]=\"id + '_' + i\"\n [formlyAttributes]=\"field\"\n [tabIndex]=\"to.tabindex\"\n [color]=\"to.color\"\n [labelPosition]=\"to.labelPosition\"\n [checked]=\"isChecked(option)\"\n [disabled]=\"formControl.disabled\"\n (change)=\"onChange(option.value, $event.checked)\"\n >\n {{ option.label }}\n </mat-checkbox>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldMultiCheckbox extends FieldType {\n @ViewChildren(MatCheckbox) checkboxes!: QueryList<MatCheckbox>;\n\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n options: [],\n color: 'accent' as const, // workaround for https://github.com/angular/components/issues/18465\n },\n };\n\n onChange(value: any, checked: boolean) {\n if (this.to.type === 'array') {\n this.formControl.patchValue(\n checked\n ? [...(this.formControl.value || []), value]\n : [...(this.formControl.value || [])].filter((o) => o !== value),\n );\n } else {\n this.formControl.patchValue({ ...this.formControl.value, [value]: checked });\n }\n this.formControl.markAsTouched();\n }\n\n // TODO: find a solution to prevent scroll on focus\n onContainerClick() {}\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (this.to.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.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';\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\nimport { FormlyFieldMultiCheckbox } from './multicheckbox.type';\n\n@NgModule({\n declarations: [FormlyFieldMultiCheckbox],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n\n MatCheckboxModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'multicheckbox',\n component: FormlyFieldMultiCheckbox,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatMultiCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAwBa,wBAAyB,SAAQ,SAAS;IApBvD;;QAuBE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,UAAU,EAAE,QAAiB;gBAC7B,OAAO,EAAE,EAAE;gBACX,KAAK,EAAE,QAAiB;aACzB;SACF,CAAC;KAuBH;IArBC,QAAQ,CAAC,KAAU,EAAE,OAAgB;QACnC,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,OAAO,EAAE;YAC5B,IAAI,CAAC,WAAW,CAAC,UAAU,CACzB,OAAO;kBACH,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC;kBAC1C,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CACnE,CAAC;SACH;aAAM;YACL,IAAI,CAAC,WAAW,CAAC,UAAU,iCAAM,IAAI,CAAC,WAAW,CAAC,KAAK,KAAE,CAAC,KAAK,GAAG,OAAO,IAAG,CAAC;SAC9E;QACD,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC;KAClC;;IAGD,gBAAgB,MAAK;IAErB,SAAS,CAAC,MAAW;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;QAErC,OAAO,KAAK,KAAK,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;KACvG;;;YApDF,SAAS,SAAC;gBACT,QAAQ,EAAE,gCAAgC;gBAC1C,QAAQ,EAAE;;;;;;;;;;;;;;;GAeT;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAChD;;;yBAEE,YAAY,SAAC,WAAW;;;MCMd,4BAA4B;;;YArBxC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,wBAAwB,CAAC;gBACxC,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBAEnB,iBAAiB;oBAEjB,wBAAwB;oBACxB,kBAAkB;oBAClB,YAAY,CAAC,QAAQ,CAAC;wBACpB,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,eAAe;gCACrB,SAAS,EAAE,wBAAwB;gCACnC,QAAQ,EAAE,CAAC,YAAY,CAAC;6BACzB;yBACF;qBACF,CAAC;iBACH;aACF;;;AC9BD;;;;;;"}
@@ -1,90 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { FormlyModule } from '@ngx-formly/core';
4
- import { FormlySelectModule } from '@ngx-formly/core/select';
5
- import { ReactiveFormsModule } from '@angular/forms';
6
- import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
7
- import { MatInputModule } from '@angular/material/input';
8
-
9
- class FormlyFieldNativeSelect extends FieldType {
10
- constructor() {
11
- super(...arguments);
12
- this.defaultOptions = {
13
- templateOptions: {
14
- options: [],
15
- },
16
- };
17
- }
18
- }
19
- FormlyFieldNativeSelect.decorators = [
20
- { type: Component, args: [{
21
- selector: 'formly-field-mat-native-select',
22
- template: `
23
- <select
24
- matNativeControl
25
- [id]="id"
26
- [readonly]="to.readonly"
27
- [required]="to.required"
28
- [errorStateMatcher]="errorStateMatcher"
29
- [formControl]="formControl"
30
- [formlyAttributes]="field"
31
- >
32
- <option *ngIf="to.placeholder" [ngValue]="undefined">{{ to.placeholder }}</option>
33
- <ng-container *ngIf="to.options | formlySelectOptions: field | async as opts">
34
- <ng-container *ngIf="to._flatOptions; else grouplist">
35
- <ng-container *ngFor="let opt of opts">
36
- <option [ngValue]="opt.value" [disabled]="opt.disabled">{{ opt.label }}</option>
37
- </ng-container>
38
- </ng-container>
39
-
40
- <ng-template #grouplist>
41
- <ng-container *ngFor="let opt of opts">
42
- <option *ngIf="!opt.group; else optgroup" [ngValue]="opt.value" [disabled]="opt.disabled">
43
- {{ opt.label }}
44
- </option>
45
- <ng-template #optgroup>
46
- <optgroup [label]="opt.label">
47
- <option *ngFor="let child of opt.group" [ngValue]="child.value" [disabled]="child.disabled">
48
- {{ child.label }}
49
- </option>
50
- </optgroup>
51
- </ng-template>
52
- </ng-container>
53
- </ng-template>
54
- </ng-container>
55
- </select>
56
- `,
57
- changeDetection: ChangeDetectionStrategy.OnPush
58
- },] }
59
- ];
60
-
61
- class FormlyMatNativeSelectModule {
62
- }
63
- FormlyMatNativeSelectModule.decorators = [
64
- { type: NgModule, args: [{
65
- declarations: [FormlyFieldNativeSelect],
66
- imports: [
67
- CommonModule,
68
- ReactiveFormsModule,
69
- MatInputModule,
70
- FormlyMatFormFieldModule,
71
- FormlySelectModule,
72
- FormlyModule.forChild({
73
- types: [
74
- {
75
- name: 'native-select',
76
- component: FormlyFieldNativeSelect,
77
- wrappers: ['form-field'],
78
- },
79
- ],
80
- }),
81
- ],
82
- },] }
83
- ];
84
-
85
- /**
86
- * Generated bundle index. Do not edit.
87
- */
88
-
89
- export { FormlyFieldNativeSelect, FormlyMatNativeSelectModule };
90
- //# sourceMappingURL=ngx-formly-material-native-select.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-material-native-select.js","sources":["../../../../src/ui/material/native-select/src/native-select.type.ts","../../../../src/ui/material/native-select/src/native-select.module.ts","../../../../src/ui/material/native-select/src/ngx-formly-material-native-select.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\n\n@Component({\n selector: 'formly-field-mat-native-select',\n template: `\n <select\n matNativeControl\n [id]=\"id\"\n [readonly]=\"to.readonly\"\n [required]=\"to.required\"\n [errorStateMatcher]=\"errorStateMatcher\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n >\n <option *ngIf=\"to.placeholder\" [ngValue]=\"undefined\">{{ to.placeholder }}</option>\n <ng-container *ngIf=\"to.options | formlySelectOptions: field | async as opts\">\n <ng-container *ngIf=\"to._flatOptions; else grouplist\">\n <ng-container *ngFor=\"let opt of opts\">\n <option [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">{{ opt.label }}</option>\n </ng-container>\n </ng-container>\n\n <ng-template #grouplist>\n <ng-container *ngFor=\"let opt of opts\">\n <option *ngIf=\"!opt.group; else optgroup\" [ngValue]=\"opt.value\" [disabled]=\"opt.disabled\">\n {{ opt.label }}\n </option>\n <ng-template #optgroup>\n <optgroup [label]=\"opt.label\">\n <option *ngFor=\"let child of opt.group\" [ngValue]=\"child.value\" [disabled]=\"child.disabled\">\n {{ child.label }}\n </option>\n </optgroup>\n </ng-template>\n </ng-container>\n </ng-template>\n </ng-container>\n </select>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldNativeSelect extends FieldType {\n defaultOptions = {\n templateOptions: {\n options: [],\n },\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { FormlyFieldNativeSelect } from './native-select.type';\n\n@NgModule({\n declarations: [FormlyFieldNativeSelect],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatInputModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'native-select',\n component: FormlyFieldNativeSelect,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatNativeSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MA0Ca,uBAAwB,SAAQ,SAAS;IAvCtD;;QAwCE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;KACH;;;YA7CA,SAAS,SAAC;gBACT,QAAQ,EAAE,gCAAgC;gBAC1C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCT;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAChD;;;MCVY,2BAA2B;;;YApBvC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;gBACvC,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,cAAc;oBAEd,wBAAwB;oBACxB,kBAAkB;oBAClB,YAAY,CAAC,QAAQ,CAAC;wBACpB,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,eAAe;gCACrB,SAAS,EAAE,uBAAuB;gCAClC,QAAQ,EAAE,CAAC,YAAY,CAAC;6BACzB;yBACF;qBACF,CAAC;iBACH;aACF;;;AC9BD;;;;;;"}
@@ -1,96 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { ɵobserve, FormlyModule } from '@ngx-formly/core';
4
- import { ReactiveFormsModule } from '@angular/forms';
5
- import { FormlySelectModule } from '@ngx-formly/core/select';
6
- import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
7
- import { MatRadioGroup, MatRadioModule } from '@angular/material/radio';
8
-
9
- class FormlyFieldRadio extends FieldType {
10
- constructor() {
11
- super(...arguments);
12
- this.defaultOptions = {
13
- templateOptions: {
14
- hideFieldUnderline: true,
15
- floatLabel: 'always',
16
- options: [],
17
- tabindex: -1,
18
- },
19
- };
20
- }
21
- ngAfterViewInit() {
22
- this.focusObserver = ɵobserve(this.field, ['focus'], ({ currentValue }) => {
23
- if (this.to.tabindex === -1 && currentValue && this.radioGroup._radios.length > 0) {
24
- // https://github.com/ngx-formly/ngx-formly/issues/2498
25
- setTimeout(() => {
26
- const radio = this.radioGroup.selected ? this.radioGroup.selected : this.radioGroup._radios.first;
27
- radio.focus();
28
- });
29
- }
30
- });
31
- }
32
- // TODO: find a solution to prevent scroll on focus
33
- onContainerClick() { }
34
- ngOnDestroy() {
35
- this.focusObserver && this.focusObserver.unsubscribe();
36
- }
37
- }
38
- FormlyFieldRadio.decorators = [
39
- { type: Component, args: [{
40
- selector: 'formly-field-mat-radio',
41
- template: `
42
- <mat-radio-group
43
- [formControl]="formControl"
44
- [formlyAttributes]="field"
45
- [required]="to.required"
46
- [tabindex]="to.tabindex"
47
- >
48
- <mat-radio-button
49
- *ngFor="let option of to.options | formlySelectOptions: field | async; let i = index"
50
- [id]="id + '_' + i"
51
- [color]="to.color"
52
- [labelPosition]="to.labelPosition"
53
- [disabled]="option.disabled"
54
- [value]="option.value"
55
- >
56
- {{ option.label }}
57
- </mat-radio-button>
58
- </mat-radio-group>
59
- `,
60
- changeDetection: ChangeDetectionStrategy.OnPush
61
- },] }
62
- ];
63
- FormlyFieldRadio.propDecorators = {
64
- radioGroup: [{ type: ViewChild, args: [MatRadioGroup, { static: true },] }]
65
- };
66
-
67
- class FormlyMatRadioModule {
68
- }
69
- FormlyMatRadioModule.decorators = [
70
- { type: NgModule, args: [{
71
- declarations: [FormlyFieldRadio],
72
- imports: [
73
- CommonModule,
74
- ReactiveFormsModule,
75
- MatRadioModule,
76
- FormlyMatFormFieldModule,
77
- FormlySelectModule,
78
- FormlyModule.forChild({
79
- types: [
80
- {
81
- name: 'radio',
82
- component: FormlyFieldRadio,
83
- wrappers: ['form-field'],
84
- },
85
- ],
86
- }),
87
- ],
88
- },] }
89
- ];
90
-
91
- /**
92
- * Generated bundle index. Do not edit.
93
- */
94
-
95
- export { FormlyFieldRadio, FormlyMatRadioModule };
96
- //# sourceMappingURL=ngx-formly-material-radio.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-material-radio.js","sources":["../../../../src/ui/material/radio/src/radio.type.ts","../../../../src/ui/material/radio/src/radio.module.ts","../../../../src/ui/material/radio/src/ngx-formly-material-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewChild, AfterViewInit, OnDestroy } from '@angular/core';\nimport { FieldType } from '@ngx-formly/material/form-field';\nimport { MatRadioGroup } from '@angular/material/radio';\nimport { ɵobserve as observe } from '@ngx-formly/core';\n\n@Component({\n selector: 'formly-field-mat-radio',\n template: `\n <mat-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [required]=\"to.required\"\n [tabindex]=\"to.tabindex\"\n >\n <mat-radio-button\n *ngFor=\"let option of to.options | formlySelectOptions: field | async; let i = index\"\n [id]=\"id + '_' + i\"\n [color]=\"to.color\"\n [labelPosition]=\"to.labelPosition\"\n [disabled]=\"option.disabled\"\n [value]=\"option.value\"\n >\n {{ option.label }}\n </mat-radio-button>\n </mat-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormlyFieldRadio extends FieldType implements AfterViewInit, OnDestroy {\n @ViewChild(MatRadioGroup, { static: true }) radioGroup!: MatRadioGroup;\n defaultOptions = {\n templateOptions: {\n hideFieldUnderline: true,\n floatLabel: 'always' as const,\n options: [],\n tabindex: -1,\n },\n };\n\n private focusObserver!: ReturnType<typeof observe>;\n ngAfterViewInit() {\n this.focusObserver = observe(this.field, ['focus'], ({ currentValue }) => {\n if (this.to.tabindex === -1 && currentValue && this.radioGroup._radios.length > 0) {\n // https://github.com/ngx-formly/ngx-formly/issues/2498\n setTimeout(() => {\n const radio = this.radioGroup.selected ? this.radioGroup.selected : this.radioGroup._radios.first;\n radio.focus();\n });\n }\n });\n }\n\n // TODO: find a solution to prevent scroll on focus\n onContainerClick() {}\n\n ngOnDestroy() {\n this.focusObserver && this.focusObserver.unsubscribe();\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 { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';\nimport { MatRadioModule } from '@angular/material/radio';\n\nimport { FormlyFieldRadio } from './radio.type';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatRadioModule,\n\n FormlyMatFormFieldModule,\n FormlySelectModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field'],\n },\n ],\n }),\n ],\n})\nexport class FormlyMatRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observe"],"mappings":";;;;;;;;MA4Ba,gBAAiB,SAAQ,SAAS;IAvB/C;;QAyBE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,kBAAkB,EAAE,IAAI;gBACxB,UAAU,EAAE,QAAiB;gBAC7B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,CAAC,CAAC;aACb;SACF,CAAC;KAqBH;IAlBC,eAAe;QACb,IAAI,CAAC,aAAa,GAAGA,QAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE;YACnE,IAAI,IAAI,CAAC,EAAE,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,YAAY,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;;gBAEjF,UAAU,CAAC;oBACT,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC;oBAClG,KAAK,CAAC,KAAK,EAAE,CAAC;iBACf,CAAC,CAAC;aACJ;SACF,CAAC,CAAC;KACJ;;IAGD,gBAAgB,MAAK;IAErB,WAAW;QACT,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;KACxD;;;YApDF,SAAS,SAAC;gBACT,QAAQ,EAAE,wBAAwB;gBAClC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;GAkBT;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAChD;;;yBAEE,SAAS,SAAC,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCE/B,oBAAoB;;;YApBhC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;gBAChC,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,cAAc;oBAEd,wBAAwB;oBACxB,kBAAkB;oBAClB,YAAY,CAAC,QAAQ,CAAC;wBACpB,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,OAAO;gCACb,SAAS,EAAE,gBAAgB;gCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;6BACzB;yBACF;qBACF,CAAC;iBACH;aACF;;;AC9BD;;;;;;"}
@@ -1,134 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { ReactiveFormsModule } from '@angular/forms';
4
- import { FormlyModule } from '@ngx-formly/core';
5
- import { FormlySelectModule } from '@ngx-formly/core/select';
6
- import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
7
- import { MatSelectModule } from '@angular/material/select';
8
- import { MatPseudoCheckboxModule } from '@angular/material/core';
9
-
10
- class FormlyFieldSelect extends FieldType {
11
- constructor() {
12
- super(...arguments);
13
- this.defaultOptions = {
14
- templateOptions: {
15
- options: [],
16
- compareWith(o1, o2) {
17
- return o1 === o2;
18
- },
19
- },
20
- };
21
- }
22
- getSelectAllState(options) {
23
- if (this.empty || this.value.length === 0) {
24
- return '';
25
- }
26
- return this.value.length !== this.getSelectAllValue(options).length ? 'indeterminate' : 'checked';
27
- }
28
- toggleSelectAll(options) {
29
- const selectAllValue = this.getSelectAllValue(options);
30
- this.formControl.setValue(!this.value || this.value.length !== selectAllValue.length ? selectAllValue : []);
31
- }
32
- change($event) {
33
- var _a, _b;
34
- (_b = (_a = this.to).change) === null || _b === void 0 ? void 0 : _b.call(_a, this.field, $event);
35
- }
36
- _getAriaLabelledby() {
37
- var _a, _b;
38
- if ((_a = this.to.attributes) === null || _a === void 0 ? void 0 : _a['aria-labelledby']) {
39
- return this.to.attributes['aria-labelledby'];
40
- }
41
- return (_b = this.formField) === null || _b === void 0 ? void 0 : _b._labelId;
42
- }
43
- getSelectAllValue(options) {
44
- if (!this.selectAllValue || options !== this.selectAllValue.options) {
45
- const flatOptions = [];
46
- options.forEach((o) => (o.group ? flatOptions.push(...o.group) : flatOptions.push(o)));
47
- this.selectAllValue = {
48
- options,
49
- value: flatOptions.filter((o) => !o.disabled).map((o) => o.value),
50
- };
51
- }
52
- return this.selectAllValue.value;
53
- }
54
- }
55
- FormlyFieldSelect.decorators = [
56
- { type: Component, args: [{
57
- selector: 'formly-field-mat-select',
58
- template: `
59
- <ng-template #selectAll let-selectOptions="selectOptions">
60
- <mat-option (click)="toggleSelectAll(selectOptions)">
61
- <mat-pseudo-checkbox class="mat-option-pseudo-checkbox" [state]="getSelectAllState(selectOptions)">
62
- </mat-pseudo-checkbox>
63
- {{ to.selectAllOption }}
64
- </mat-option>
65
- </ng-template>
66
-
67
- <mat-select
68
- [id]="id"
69
- [formControl]="formControl"
70
- [formlyAttributes]="field"
71
- [placeholder]="to.placeholder"
72
- [tabIndex]="to.tabindex"
73
- [required]="to.required"
74
- [compareWith]="to.compareWith"
75
- [multiple]="to.multiple"
76
- (selectionChange)="change($event)"
77
- [errorStateMatcher]="errorStateMatcher"
78
- [aria-labelledby]="_getAriaLabelledby()"
79
- [disableOptionCentering]="to.disableOptionCentering"
80
- >
81
- <ng-container *ngIf="to.options | formlySelectOptions: field | async as selectOptions">
82
- <ng-container
83
- *ngIf="to.multiple && to.selectAllOption"
84
- [ngTemplateOutlet]="selectAll"
85
- [ngTemplateOutletContext]="{ selectOptions: selectOptions }"
86
- >
87
- </ng-container>
88
- <ng-container *ngFor="let item of selectOptions">
89
- <mat-optgroup *ngIf="item.group" [label]="item.label">
90
- <mat-option *ngFor="let child of item.group" [value]="child.value" [disabled]="child.disabled">
91
- {{ child.label }}
92
- </mat-option>
93
- </mat-optgroup>
94
- <mat-option *ngIf="!item.group" [value]="item.value" [disabled]="item.disabled">{{ item.label }}</mat-option>
95
- </ng-container>
96
- </ng-container>
97
- </mat-select>
98
- `,
99
- changeDetection: ChangeDetectionStrategy.OnPush
100
- },] }
101
- ];
102
-
103
- class FormlyMatSelectModule {
104
- }
105
- FormlyMatSelectModule.decorators = [
106
- { type: NgModule, args: [{
107
- declarations: [FormlyFieldSelect],
108
- imports: [
109
- CommonModule,
110
- ReactiveFormsModule,
111
- MatSelectModule,
112
- MatPseudoCheckboxModule,
113
- FormlyMatFormFieldModule,
114
- FormlySelectModule,
115
- FormlyModule.forChild({
116
- types: [
117
- {
118
- name: 'select',
119
- component: FormlyFieldSelect,
120
- wrappers: ['form-field'],
121
- },
122
- { name: 'enum', extends: 'select' },
123
- ],
124
- }),
125
- ],
126
- },] }
127
- ];
128
-
129
- /**
130
- * Generated bundle index. Do not edit.
131
- */
132
-
133
- export { FormlyFieldSelect, FormlyMatSelectModule };
134
- //# sourceMappingURL=ngx-formly-material-select.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-formly-material-select.js","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-labelledby]=\"_getAriaLabelledby()\"\n [disableOptionCentering]=\"to.disableOptionCentering\"\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 }\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 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":";;;;;;;;;MAiDa,iBAAkB,SAAQ,SAAS;IA7ChD;;QA8CE,mBAAc,GAAG;YACf,eAAe,EAAE;gBACf,OAAO,EAAE,EAAE;gBACX,WAAW,CAAC,EAAO,EAAE,EAAO;oBAC1B,OAAO,EAAE,KAAK,EAAE,CAAC;iBAClB;aACF;SACF,CAAC;KA0CH;IAtCC,iBAAiB,CAAC,OAAc;QAC9B,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACzC,OAAO,EAAE,CAAC;SACX;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;KACnG;IAED,eAAe,CAAC,OAAc;QAC5B,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,GAAG,cAAc,GAAG,EAAE,CAAC,CAAC;KAC7G;IAED,MAAM,CAAC,MAAuB;;QAC5B,MAAA,MAAA,IAAI,CAAC,EAAE,EAAC,MAAM,mDAAG,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE;KACtC;IAED,kBAAkB;;QAChB,UAAI,IAAI,CAAC,EAAE,CAAC,UAAU,0CAAG,iBAAiB,GAAG;YAC3C,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;SAC9C;QAED,aAAO,IAAI,CAAC,SAAS,0CAAE,QAAQ,CAAC;KACjC;IAEO,iBAAiB,CAAC,OAAc;QACtC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,OAAO,KAAK,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACnE,MAAM,WAAW,GAAU,EAAE,CAAC;YAC9B,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAEvF,IAAI,CAAC,cAAc,GAAG;gBACpB,OAAO;gBACP,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;aAClE,CAAC;SACH;QAED,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;KAClC;;;YA9FF,SAAS,SAAC;gBACT,QAAQ,EAAE,yBAAyB;gBACnC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCT;gBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;aAChD;;;MCdY,qBAAqB;;;YAtBjC,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;gBACjC,OAAO,EAAE;oBACP,YAAY;oBACZ,mBAAmB;oBACnB,eAAe;oBACf,uBAAuB;oBAEvB,wBAAwB;oBACxB,kBAAkB;oBAClB,YAAY,CAAC,QAAQ,CAAC;wBACpB,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,QAAQ;gCACd,SAAS,EAAE,iBAAiB;gCAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC;6BACzB;4BACD,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;yBACpC;qBACF,CAAC;iBACH;aACF;;;ACjCD;;;;;;"}
@@ -1,77 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { FormlyModule } from '@ngx-formly/core';
4
- import { ReactiveFormsModule } from '@angular/forms';
5
- import { MatSlider, MatSliderModule } from '@angular/material/slider';
6
- import { FieldType, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
7
-
8
- class FormlySliderTypeComponent extends FieldType {
9
- constructor() {
10
- super(...arguments);
11
- this.defaultOptions = {
12
- templateOptions: {
13
- hideFieldUnderline: true,
14
- floatLabel: 'always',
15
- thumbLabel: false,
16
- },
17
- };
18
- }
19
- onContainerClick(event) {
20
- this.slider.focus();
21
- super.onContainerClick(event);
22
- }
23
- }
24
- FormlySliderTypeComponent.decorators = [
25
- { type: Component, args: [{
26
- selector: 'formly-field-mat-slider',
27
- template: `
28
- <mat-slider
29
- [id]="id"
30
- [style.width]="'100%'"
31
- [formControl]="formControl"
32
- [formlyAttributes]="field"
33
- [tabIndex]="to.tabindex"
34
- [color]="to.color"
35
- [thumbLabel]="to.thumbLabel"
36
- [step]="to.step"
37
- [max]="to.max"
38
- [min]="to.min"
39
- >
40
- </mat-slider>
41
- `,
42
- changeDetection: ChangeDetectionStrategy.OnPush
43
- },] }
44
- ];
45
- FormlySliderTypeComponent.propDecorators = {
46
- slider: [{ type: ViewChild, args: [MatSlider, { static: true },] }]
47
- };
48
-
49
- class FormlyMatSliderModule {
50
- }
51
- FormlyMatSliderModule.decorators = [
52
- { type: NgModule, args: [{
53
- declarations: [FormlySliderTypeComponent],
54
- imports: [
55
- CommonModule,
56
- ReactiveFormsModule,
57
- MatSliderModule,
58
- FormlyMatFormFieldModule,
59
- FormlyModule.forChild({
60
- types: [
61
- {
62
- name: 'slider',
63
- component: FormlySliderTypeComponent,
64
- wrappers: ['form-field'],
65
- },
66
- ],
67
- }),
68
- ],
69
- },] }
70
- ];
71
-
72
- /**
73
- * Generated bundle index. Do not edit.
74
- */
75
-
76
- export { FormlyMatSliderModule, FormlySliderTypeComponent as ɵa };
77
- //# sourceMappingURL=ngx-formly-material-slider.js.map