@tft/crispr-forms 18.0.1 → 19.0.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 (305) hide show
  1. package/README.md +111 -112
  2. package/fesm2022/tft-crispr-forms-autocomplete-field.component-jdr2Hr6I.mjs +95 -0
  3. package/fesm2022/tft-crispr-forms-autocomplete-field.component-jdr2Hr6I.mjs.map +1 -0
  4. package/fesm2022/tft-crispr-forms-index-BHv9E1Y2.mjs +36 -0
  5. package/fesm2022/tft-crispr-forms-index-BHv9E1Y2.mjs.map +1 -0
  6. package/fesm2022/tft-crispr-forms-index-BIhGbdgn.mjs +68 -0
  7. package/fesm2022/tft-crispr-forms-index-BIhGbdgn.mjs.map +1 -0
  8. package/fesm2022/tft-crispr-forms-index-BQFuEW6x.mjs +40 -0
  9. package/fesm2022/tft-crispr-forms-index-BQFuEW6x.mjs.map +1 -0
  10. package/fesm2022/tft-crispr-forms-index-BWsxn34Q.mjs +2 -0
  11. package/fesm2022/tft-crispr-forms-index-BWsxn34Q.mjs.map +1 -0
  12. package/fesm2022/tft-crispr-forms-index-Bh8kDfe4.mjs +39 -0
  13. package/fesm2022/tft-crispr-forms-index-Bh8kDfe4.mjs.map +1 -0
  14. package/fesm2022/tft-crispr-forms-index-C9gYJRzb.mjs +182 -0
  15. package/fesm2022/tft-crispr-forms-index-C9gYJRzb.mjs.map +1 -0
  16. package/fesm2022/tft-crispr-forms-index-ClPQl_5D.mjs +137 -0
  17. package/fesm2022/tft-crispr-forms-index-ClPQl_5D.mjs.map +1 -0
  18. package/fesm2022/tft-crispr-forms-index-DCRLl0jR.mjs +190 -0
  19. package/fesm2022/tft-crispr-forms-index-DCRLl0jR.mjs.map +1 -0
  20. package/fesm2022/tft-crispr-forms-index-Dx-HIAiX.mjs +39 -0
  21. package/fesm2022/tft-crispr-forms-index-Dx-HIAiX.mjs.map +1 -0
  22. package/fesm2022/tft-crispr-forms-index-Dyx5SqHu.mjs +88 -0
  23. package/fesm2022/tft-crispr-forms-index-Dyx5SqHu.mjs.map +1 -0
  24. package/fesm2022/tft-crispr-forms-index-LX0Bvkjk.mjs +73 -0
  25. package/fesm2022/tft-crispr-forms-index-LX0Bvkjk.mjs.map +1 -0
  26. package/fesm2022/tft-crispr-forms-index-UAYeTe3L.mjs +17 -0
  27. package/fesm2022/tft-crispr-forms-index-UAYeTe3L.mjs.map +1 -0
  28. package/fesm2022/tft-crispr-forms-index-UvEVbwnf.mjs +41 -0
  29. package/fesm2022/tft-crispr-forms-index-UvEVbwnf.mjs.map +1 -0
  30. package/fesm2022/tft-crispr-forms-index-joNvlmny.mjs +61 -0
  31. package/fesm2022/tft-crispr-forms-index-joNvlmny.mjs.map +1 -0
  32. package/fesm2022/tft-crispr-forms-index-kjMTlZoq.mjs +24 -0
  33. package/fesm2022/tft-crispr-forms-index-kjMTlZoq.mjs.map +1 -0
  34. package/fesm2022/tft-crispr-forms.mjs +300 -175
  35. package/fesm2022/tft-crispr-forms.mjs.map +1 -1
  36. package/package.json +3 -5
  37. package/tft-crispr-forms-19.0.2.tgz +0 -0
  38. package/types/tft-crispr-forms.d.ts +887 -0
  39. package/esm2022/public-api.mjs +0 -4
  40. package/esm2022/src/index.mjs +0 -2
  41. package/esm2022/src/lib/crispr-forms.module.mjs +0 -55
  42. package/esm2022/src/lib/display-field.directive.mjs +0 -52
  43. package/esm2022/src/lib/field-component-map.const.mjs +0 -29
  44. package/esm2022/src/lib/field.directive.mjs +0 -69
  45. package/esm2022/src/lib/form/form.component.mjs +0 -62
  46. package/esm2022/src/lib/form-group-list/form-group-list.component.mjs +0 -97
  47. package/esm2022/src/lib/form-group-list/index.mjs +0 -2
  48. package/esm2022/src/lib/pipes/crispr-pipes.module.mjs +0 -24
  49. package/esm2022/src/lib/pipes/initial-control-value.pipe.mjs +0 -20
  50. package/esm2022/src/lib/public_api.mjs +0 -3
  51. package/esm2022/src/lib/sub-group/index.mjs +0 -3
  52. package/esm2022/src/lib/sub-group/sub-group.component.mjs +0 -20
  53. package/esm2022/src/lib/sub-group/sub-group.module.mjs +0 -42
  54. package/esm2022/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +0 -138
  55. package/esm2022/src/lib/ui/autocomplete-chiplist-field/index.mjs +0 -2
  56. package/esm2022/src/lib/ui/autocomplete-chiplist-field/public-api.mjs +0 -2
  57. package/esm2022/src/lib/ui/autocomplete-field/autocomplete-field.component.mjs +0 -95
  58. package/esm2022/src/lib/ui/autocomplete-field/index.mjs +0 -2
  59. package/esm2022/src/lib/ui/autocomplete-field/public-api.mjs +0 -2
  60. package/esm2022/src/lib/ui/button/button.component.mjs +0 -52
  61. package/esm2022/src/lib/ui/button/index.mjs +0 -2
  62. package/esm2022/src/lib/ui/button/public-api.mjs +0 -2
  63. package/esm2022/src/lib/ui/checkbox-field/checkbox-field.component.mjs +0 -42
  64. package/esm2022/src/lib/ui/checkbox-field/index.mjs +0 -2
  65. package/esm2022/src/lib/ui/checkbox-field/public-api.mjs +0 -2
  66. package/esm2022/src/lib/ui/datepicker-field/datepicker-field.component.mjs +0 -66
  67. package/esm2022/src/lib/ui/datepicker-field/index.mjs +0 -2
  68. package/esm2022/src/lib/ui/datepicker-field/public-api.mjs +0 -2
  69. package/esm2022/src/lib/ui/divider/divider.component.mjs +0 -25
  70. package/esm2022/src/lib/ui/divider/index.mjs +0 -2
  71. package/esm2022/src/lib/ui/divider/public-api.mjs +0 -2
  72. package/esm2022/src/lib/ui/field-container/field-container.component.mjs +0 -59
  73. package/esm2022/src/lib/ui/field-container/index.mjs +0 -2
  74. package/esm2022/src/lib/ui/field-container/public-api.mjs +0 -2
  75. package/esm2022/src/lib/ui/file-dropzone/file-dropzone.directive.mjs +0 -40
  76. package/esm2022/src/lib/ui/file-dropzone/index.mjs +0 -2
  77. package/esm2022/src/lib/ui/file-dropzone/public-api.mjs +0 -2
  78. package/esm2022/src/lib/ui/file-upload-field/file-upload-field.component.mjs +0 -107
  79. package/esm2022/src/lib/ui/file-upload-field/index.mjs +0 -2
  80. package/esm2022/src/lib/ui/file-upload-field/public-api.mjs +0 -2
  81. package/esm2022/src/lib/ui/heading/heading.component.mjs +0 -27
  82. package/esm2022/src/lib/ui/heading/index.mjs +0 -2
  83. package/esm2022/src/lib/ui/heading/public-api.mjs +0 -2
  84. package/esm2022/src/lib/ui/image-upload-field/image-upload-field.component.mjs +0 -184
  85. package/esm2022/src/lib/ui/image-upload-field/index.mjs +0 -2
  86. package/esm2022/src/lib/ui/image-upload-field/public-api.mjs +0 -2
  87. package/esm2022/src/lib/ui/index.mjs +0 -2
  88. package/esm2022/src/lib/ui/info/index.mjs +0 -2
  89. package/esm2022/src/lib/ui/info/info.component.mjs +0 -23
  90. package/esm2022/src/lib/ui/info/public-api.mjs +0 -2
  91. package/esm2022/src/lib/ui/input-field/index.mjs +0 -2
  92. package/esm2022/src/lib/ui/input-field/input-field.component.mjs +0 -43
  93. package/esm2022/src/lib/ui/input-field/public-api.mjs +0 -2
  94. package/esm2022/src/lib/ui/map/index.mjs +0 -2
  95. package/esm2022/src/lib/ui/map/map-field.component.mjs +0 -53
  96. package/esm2022/src/lib/ui/map/public-api.mjs +0 -2
  97. package/esm2022/src/lib/ui/option/index.mjs +0 -2
  98. package/esm2022/src/lib/ui/option/option.component.mjs +0 -16
  99. package/esm2022/src/lib/ui/option/public-api.mjs +0 -2
  100. package/esm2022/src/lib/ui/public-api.mjs +0 -7
  101. package/esm2022/src/lib/ui/radio-field/index.mjs +0 -2
  102. package/esm2022/src/lib/ui/radio-field/public-api.mjs +0 -2
  103. package/esm2022/src/lib/ui/radio-field/radio-field.component.mjs +0 -39
  104. package/esm2022/src/lib/ui/select-field/index.mjs +0 -2
  105. package/esm2022/src/lib/ui/select-field/public-api.mjs +0 -2
  106. package/esm2022/src/lib/ui/select-field/select-field.component.mjs +0 -73
  107. package/esm2022/src/lib/ui/selected-file/index.mjs +0 -2
  108. package/esm2022/src/lib/ui/selected-file/public-api.mjs +0 -2
  109. package/esm2022/src/lib/ui/selected-file/selected-file.component.mjs +0 -26
  110. package/esm2022/src/lib/ui/slider-field/index.mjs +0 -2
  111. package/esm2022/src/lib/ui/slider-field/public-api.mjs +0 -2
  112. package/esm2022/src/lib/ui/slider-field/slider-field.component.mjs +0 -46
  113. package/esm2022/src/lib/ui/textarea-field/index.mjs +0 -2
  114. package/esm2022/src/lib/ui/textarea-field/public-api.mjs +0 -2
  115. package/esm2022/src/lib/ui/textarea-field/textarea-field.component.mjs +0 -42
  116. package/esm2022/src/lib/ui/unit-conversion-field/index.mjs +0 -2
  117. package/esm2022/src/lib/ui/unit-conversion-field/public-api.mjs +0 -2
  118. package/esm2022/src/lib/ui/unit-conversion-field/unit-conversion-field.component.mjs +0 -86
  119. package/esm2022/src/lib/utils/abstracts/autocomplete-field.abstract.mjs +0 -30
  120. package/esm2022/src/lib/utils/abstracts/crispr-control.mixin.mjs +0 -27
  121. package/esm2022/src/lib/utils/abstracts/crispr-display-field.abstract.mjs +0 -14
  122. package/esm2022/src/lib/utils/abstracts/crispr-field.abstract.mjs +0 -19
  123. package/esm2022/src/lib/utils/abstracts/index.mjs +0 -5
  124. package/esm2022/src/lib/utils/functions/buildFormGroupFromConfig.mjs +0 -28
  125. package/esm2022/src/lib/utils/functions/callOptionsIfFunction.mjs +0 -4
  126. package/esm2022/src/lib/utils/functions/createControlForType.mjs +0 -19
  127. package/esm2022/src/lib/utils/functions/filterOptionsByLabel.mjs +0 -11
  128. package/esm2022/src/lib/utils/functions/image-compression.helpers.mjs +0 -50
  129. package/esm2022/src/lib/utils/functions/index.mjs +0 -8
  130. package/esm2022/src/lib/utils/functions/isControlConfig.mjs +0 -7
  131. package/esm2022/src/lib/utils/functions/observablifyOptions.mjs +0 -29
  132. package/esm2022/src/lib/utils/index.mjs +0 -2
  133. package/esm2022/src/lib/utils/models/autocomplete-chiplist-field.config.mjs +0 -2
  134. package/esm2022/src/lib/utils/models/autocomplete-field.config.mjs +0 -2
  135. package/esm2022/src/lib/utils/models/button.config.mjs +0 -2
  136. package/esm2022/src/lib/utils/models/checkbox-field.config.mjs +0 -2
  137. package/esm2022/src/lib/utils/models/crispr-field.config.mjs +0 -24
  138. package/esm2022/src/lib/utils/models/datepicker-field.config.mjs +0 -2
  139. package/esm2022/src/lib/utils/models/divider.config.mjs +0 -2
  140. package/esm2022/src/lib/utils/models/file-upload-field.config.mjs +0 -2
  141. package/esm2022/src/lib/utils/models/form-group-list.config.mjs +0 -2
  142. package/esm2022/src/lib/utils/models/heading.config.mjs +0 -3
  143. package/esm2022/src/lib/utils/models/image-upload-field.config.mjs +0 -2
  144. package/esm2022/src/lib/utils/models/index.mjs +0 -19
  145. package/esm2022/src/lib/utils/models/input-field.config.mjs +0 -2
  146. package/esm2022/src/lib/utils/models/map-field.config.mjs +0 -2
  147. package/esm2022/src/lib/utils/models/radio-field.config.mjs +0 -2
  148. package/esm2022/src/lib/utils/models/select-field.config.mjs +0 -2
  149. package/esm2022/src/lib/utils/models/slider-field.config.mjs +0 -2
  150. package/esm2022/src/lib/utils/models/textarea-field.config.mjs +0 -2
  151. package/esm2022/src/lib/utils/models/unit-conversion-field.config.mjs +0 -2
  152. package/esm2022/src/lib/utils/operators/form.operators.mjs +0 -24
  153. package/esm2022/src/lib/utils/operators/index.mjs +0 -2
  154. package/esm2022/src/lib/utils/public-api.mjs +0 -5
  155. package/esm2022/tft-crispr-forms.mjs +0 -5
  156. package/fesm2022/tft-crispr-forms-index-BC1uV7T_.mjs +0 -19
  157. package/fesm2022/tft-crispr-forms-index-BC1uV7T_.mjs.map +0 -1
  158. package/fesm2022/tft-crispr-forms-index-BDJfgpKH.mjs +0 -142
  159. package/fesm2022/tft-crispr-forms-index-BDJfgpKH.mjs.map +0 -1
  160. package/fesm2022/tft-crispr-forms-index-BVwoi2lw.mjs +0 -49
  161. package/fesm2022/tft-crispr-forms-index-BVwoi2lw.mjs.map +0 -1
  162. package/fesm2022/tft-crispr-forms-index-Bbcv75sh.mjs +0 -48
  163. package/fesm2022/tft-crispr-forms-index-Bbcv75sh.mjs.map +0 -1
  164. package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs +0 -110
  165. package/fesm2022/tft-crispr-forms-index-BdOC-6h3.mjs.map +0 -1
  166. package/fesm2022/tft-crispr-forms-index-BwC11k3P.mjs +0 -73
  167. package/fesm2022/tft-crispr-forms-index-BwC11k3P.mjs.map +0 -1
  168. package/fesm2022/tft-crispr-forms-index-CN4M4eEo.mjs +0 -50
  169. package/fesm2022/tft-crispr-forms-index-CN4M4eEo.mjs.map +0 -1
  170. package/fesm2022/tft-crispr-forms-index-CP5Jn6EK.mjs +0 -63
  171. package/fesm2022/tft-crispr-forms-index-CP5Jn6EK.mjs.map +0 -1
  172. package/fesm2022/tft-crispr-forms-index-CYzZB0sA.mjs +0 -54
  173. package/fesm2022/tft-crispr-forms-index-CYzZB0sA.mjs.map +0 -1
  174. package/fesm2022/tft-crispr-forms-index-C_YTy6il.mjs +0 -102
  175. package/fesm2022/tft-crispr-forms-index-C_YTy6il.mjs.map +0 -1
  176. package/fesm2022/tft-crispr-forms-index-Cpu5cwLo.mjs +0 -80
  177. package/fesm2022/tft-crispr-forms-index-Cpu5cwLo.mjs.map +0 -1
  178. package/fesm2022/tft-crispr-forms-index-DLa8K3lm.mjs +0 -36
  179. package/fesm2022/tft-crispr-forms-index-DLa8K3lm.mjs.map +0 -1
  180. package/fesm2022/tft-crispr-forms-index-DNTOjcVZ.mjs +0 -49
  181. package/fesm2022/tft-crispr-forms-index-DNTOjcVZ.mjs.map +0 -1
  182. package/fesm2022/tft-crispr-forms-index-DYHyL8s6.mjs +0 -57
  183. package/fesm2022/tft-crispr-forms-index-DYHyL8s6.mjs.map +0 -1
  184. package/fesm2022/tft-crispr-forms-index-DhIYxOdD.mjs +0 -185
  185. package/fesm2022/tft-crispr-forms-index-DhIYxOdD.mjs.map +0 -1
  186. package/fesm2022/tft-crispr-forms-index-o78Cm3Kf.mjs +0 -91
  187. package/fesm2022/tft-crispr-forms-index-o78Cm3Kf.mjs.map +0 -1
  188. package/index.d.ts +0 -5
  189. package/public-api.d.ts +0 -3
  190. package/src/index.d.ts +0 -1
  191. package/src/lib/crispr-forms.module.d.ts +0 -16
  192. package/src/lib/display-field.directive.d.ts +0 -23
  193. package/src/lib/field-component-map.const.d.ts +0 -44
  194. package/src/lib/field.directive.d.ts +0 -24
  195. package/src/lib/form/form.component.d.ts +0 -19
  196. package/src/lib/form-group-list/form-group-list.component.d.ts +0 -40
  197. package/src/lib/form-group-list/index.d.ts +0 -1
  198. package/src/lib/pipes/crispr-pipes.module.d.ts +0 -8
  199. package/src/lib/pipes/initial-control-value.pipe.d.ts +0 -10
  200. package/src/lib/public_api.d.ts +0 -2
  201. package/src/lib/sub-group/index.d.ts +0 -2
  202. package/src/lib/sub-group/sub-group.component.d.ts +0 -24
  203. package/src/lib/sub-group/sub-group.module.d.ts +0 -12
  204. package/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.d.ts +0 -36
  205. package/src/lib/ui/autocomplete-chiplist-field/index.d.ts +0 -1
  206. package/src/lib/ui/autocomplete-chiplist-field/public-api.d.ts +0 -1
  207. package/src/lib/ui/autocomplete-field/autocomplete-field.component.d.ts +0 -25
  208. package/src/lib/ui/autocomplete-field/index.d.ts +0 -1
  209. package/src/lib/ui/autocomplete-field/public-api.d.ts +0 -1
  210. package/src/lib/ui/button/button.component.d.ts +0 -15
  211. package/src/lib/ui/button/index.d.ts +0 -1
  212. package/src/lib/ui/button/public-api.d.ts +0 -1
  213. package/src/lib/ui/checkbox-field/checkbox-field.component.d.ts +0 -23
  214. package/src/lib/ui/checkbox-field/index.d.ts +0 -1
  215. package/src/lib/ui/checkbox-field/public-api.d.ts +0 -1
  216. package/src/lib/ui/datepicker-field/datepicker-field.component.d.ts +0 -32
  217. package/src/lib/ui/datepicker-field/index.d.ts +0 -1
  218. package/src/lib/ui/datepicker-field/public-api.d.ts +0 -1
  219. package/src/lib/ui/divider/divider.component.d.ts +0 -9
  220. package/src/lib/ui/divider/index.d.ts +0 -1
  221. package/src/lib/ui/divider/public-api.d.ts +0 -1
  222. package/src/lib/ui/field-container/field-container.component.d.ts +0 -24
  223. package/src/lib/ui/field-container/index.d.ts +0 -1
  224. package/src/lib/ui/field-container/public-api.d.ts +0 -1
  225. package/src/lib/ui/file-dropzone/file-dropzone.directive.d.ts +0 -10
  226. package/src/lib/ui/file-dropzone/index.d.ts +0 -1
  227. package/src/lib/ui/file-dropzone/public-api.d.ts +0 -1
  228. package/src/lib/ui/file-upload-field/file-upload-field.component.d.ts +0 -39
  229. package/src/lib/ui/file-upload-field/index.d.ts +0 -1
  230. package/src/lib/ui/file-upload-field/public-api.d.ts +0 -1
  231. package/src/lib/ui/heading/heading.component.d.ts +0 -8
  232. package/src/lib/ui/heading/index.d.ts +0 -1
  233. package/src/lib/ui/heading/public-api.d.ts +0 -1
  234. package/src/lib/ui/image-upload-field/image-upload-field.component.d.ts +0 -50
  235. package/src/lib/ui/image-upload-field/index.d.ts +0 -1
  236. package/src/lib/ui/image-upload-field/public-api.d.ts +0 -1
  237. package/src/lib/ui/index.d.ts +0 -1
  238. package/src/lib/ui/info/index.d.ts +0 -1
  239. package/src/lib/ui/info/info.component.d.ts +0 -7
  240. package/src/lib/ui/info/public-api.d.ts +0 -1
  241. package/src/lib/ui/input-field/index.d.ts +0 -1
  242. package/src/lib/ui/input-field/input-field.component.d.ts +0 -24
  243. package/src/lib/ui/input-field/public-api.d.ts +0 -1
  244. package/src/lib/ui/map/index.d.ts +0 -1
  245. package/src/lib/ui/map/map-field.component.d.ts +0 -32
  246. package/src/lib/ui/map/public-api.d.ts +0 -1
  247. package/src/lib/ui/option/index.d.ts +0 -1
  248. package/src/lib/ui/option/option.component.d.ts +0 -7
  249. package/src/lib/ui/option/public-api.d.ts +0 -1
  250. package/src/lib/ui/public-api.d.ts +0 -6
  251. package/src/lib/ui/radio-field/index.d.ts +0 -1
  252. package/src/lib/ui/radio-field/public-api.d.ts +0 -1
  253. package/src/lib/ui/radio-field/radio-field.component.d.ts +0 -25
  254. package/src/lib/ui/select-field/index.d.ts +0 -1
  255. package/src/lib/ui/select-field/public-api.d.ts +0 -1
  256. package/src/lib/ui/select-field/select-field.component.d.ts +0 -34
  257. package/src/lib/ui/selected-file/index.d.ts +0 -1
  258. package/src/lib/ui/selected-file/public-api.d.ts +0 -1
  259. package/src/lib/ui/selected-file/selected-file.component.d.ts +0 -10
  260. package/src/lib/ui/slider-field/index.d.ts +0 -1
  261. package/src/lib/ui/slider-field/public-api.d.ts +0 -1
  262. package/src/lib/ui/slider-field/slider-field.component.d.ts +0 -24
  263. package/src/lib/ui/textarea-field/index.d.ts +0 -1
  264. package/src/lib/ui/textarea-field/public-api.d.ts +0 -1
  265. package/src/lib/ui/textarea-field/textarea-field.component.d.ts +0 -23
  266. package/src/lib/ui/unit-conversion-field/index.d.ts +0 -1
  267. package/src/lib/ui/unit-conversion-field/public-api.d.ts +0 -1
  268. package/src/lib/ui/unit-conversion-field/unit-conversion-field.component.d.ts +0 -38
  269. package/src/lib/utils/abstracts/autocomplete-field.abstract.d.ts +0 -28
  270. package/src/lib/utils/abstracts/crispr-control.mixin.d.ts +0 -16
  271. package/src/lib/utils/abstracts/crispr-display-field.abstract.d.ts +0 -22
  272. package/src/lib/utils/abstracts/crispr-field.abstract.d.ts +0 -11
  273. package/src/lib/utils/abstracts/index.d.ts +0 -4
  274. package/src/lib/utils/functions/buildFormGroupFromConfig.d.ts +0 -9
  275. package/src/lib/utils/functions/callOptionsIfFunction.d.ts +0 -3
  276. package/src/lib/utils/functions/createControlForType.d.ts +0 -9
  277. package/src/lib/utils/functions/filterOptionsByLabel.d.ts +0 -7
  278. package/src/lib/utils/functions/image-compression.helpers.d.ts +0 -5
  279. package/src/lib/utils/functions/index.d.ts +0 -7
  280. package/src/lib/utils/functions/isControlConfig.d.ts +0 -5
  281. package/src/lib/utils/functions/observablifyOptions.d.ts +0 -12
  282. package/src/lib/utils/index.d.ts +0 -1
  283. package/src/lib/utils/models/autocomplete-chiplist-field.config.d.ts +0 -20
  284. package/src/lib/utils/models/autocomplete-field.config.d.ts +0 -14
  285. package/src/lib/utils/models/button.config.d.ts +0 -17
  286. package/src/lib/utils/models/checkbox-field.config.d.ts +0 -6
  287. package/src/lib/utils/models/crispr-field.config.d.ts +0 -98
  288. package/src/lib/utils/models/datepicker-field.config.d.ts +0 -20
  289. package/src/lib/utils/models/divider.config.d.ts +0 -5
  290. package/src/lib/utils/models/file-upload-field.config.d.ts +0 -33
  291. package/src/lib/utils/models/form-group-list.config.d.ts +0 -18
  292. package/src/lib/utils/models/heading.config.d.ts +0 -6
  293. package/src/lib/utils/models/image-upload-field.config.d.ts +0 -54
  294. package/src/lib/utils/models/index.d.ts +0 -18
  295. package/src/lib/utils/models/input-field.config.d.ts +0 -16
  296. package/src/lib/utils/models/map-field.config.d.ts +0 -13
  297. package/src/lib/utils/models/radio-field.config.d.ts +0 -6
  298. package/src/lib/utils/models/select-field.config.d.ts +0 -21
  299. package/src/lib/utils/models/slider-field.config.d.ts +0 -11
  300. package/src/lib/utils/models/textarea-field.config.d.ts +0 -5
  301. package/src/lib/utils/models/unit-conversion-field.config.d.ts +0 -30
  302. package/src/lib/utils/operators/form.operators.d.ts +0 -1
  303. package/src/lib/utils/operators/index.d.ts +0 -1
  304. package/src/lib/utils/public-api.d.ts +0 -4
  305. package/tft-crispr-forms-18.0.1.tgz +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"tft-crispr-forms-index-BDJfgpKH.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n ViewChild,\n ElementRef,\n} from '@angular/core';\nimport { map, tap } from 'rxjs/operators';\nimport {\n MatAutocompleteModule,\n MatAutocompleteSelectedEvent,\n MatAutocompleteTrigger,\n} from '@angular/material/autocomplete';\nimport { Observable, BehaviorSubject, combineLatest } from 'rxjs';\nimport { ENTER } from '@angular/cdk/keycodes';\n\nimport { MatChipInputEvent, MatChipsModule } from '@angular/material/chips';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatOptionModule } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { OptionComponent } from '../option';\nimport { MatIconModule } from '@angular/material/icon';\nimport {\n AutocompleteChiplistFieldConfig,\n AbstractAutocompleteComponent,\n DEFAULT_EMPTY_OPTIONS_MESSAGE,\n SelectOption,\n} from '../../utils';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n\nconst defaultConfig: Partial<AutocompleteChiplistFieldConfig> = {\n chipsSelectable: true,\n areChipsRemovable: true,\n tabToSelect: true,\n autoActiveFirstOption: true,\n imageUrlParam: 'image',\n typeDebounceTime: 500,\n allowDuplicates: false,\n duplicateCompareFunction: (chip, option) => chip.value === option.value,\n separatorKeyCodes: [ENTER],\n emptyOptionsMessage: DEFAULT_EMPTY_OPTIONS_MESSAGE,\n};\n\n@Component({\n selector: 'crispr-autocomplete-chiplist-field',\n templateUrl: './autocomplete-chiplist-field.component.html',\n styleUrls: ['./autocomplete-chiplist-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n OptionComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatAutocompleteModule,\n MatInputModule,\n MatOptionModule,\n MatChipsModule,\n MatIconModule,\n FormValidationHandlerModule,\n ],\n})\nexport class AutocompleteChiplistFieldComponent\n extends AbstractAutocompleteComponent<AutocompleteChiplistFieldConfig>\n implements OnInit\n{\n defaultConfig = defaultConfig;\n chips$ = new BehaviorSubject<SelectOption[]>([]);\n remainingOptions$: Observable<SelectOption[]>;\n selectedChip: SelectOption = null;\n controlValue$ = this.chips$.pipe(\n tap((chips) => {\n this.control.setValue(chips.map((chip) => chip.value));\n })\n );\n\n // We need use ViewChild twice on the same template ref to access as different types\n // - the MatAutocompleteTrigger is used to for selecting value on tab\n // - the ElementRef<HTMLInputElement> is used to clear the value from input element on selection\n @ViewChild('autoInput', { read: MatAutocompleteTrigger })\n chipInput: MatAutocompleteTrigger;\n @ViewChild('autoInput') chipInputRef: ElementRef<HTMLInputElement>;\n\n ngOnInit() {\n super.ngOnInit();\n this.remainingOptions$ = combineLatest([this.chips$, this.options$]).pipe(\n map(([chips, options]) => {\n return this.config.allowDuplicates\n ? options\n : options?.filter((option) => {\n return !chips.some((chip) =>\n this.config.duplicateCompareFunction(chip, option)\n );\n });\n })\n );\n }\n\n setControlValue(value: SelectOption[]) {\n if (value) {\n this.chips$.next(value);\n }\n }\n\n // handles mat selecting\n handleSelect(event: MatAutocompleteSelectedEvent) {\n const selectedOption: SelectOption = event.option.value as SelectOption;\n this.chips$.next([...this.chips$.value, selectedOption]);\n this.chipInputRef.nativeElement.value = '';\n this.autocompleteInputControl.setValue('');\n // setTimeout needed because the panel thinks it's still open at this point\n setTimeout(() => this.chipInput.openPanel());\n }\n\n /**\n * To follow ARIA standards we want to select the active option on blur.\n * matChipInputAddOnBlur should do this but it causes buggy behaviour\n * @param event blur event that triggers the handle blur\n */\n handleTab(_event: FocusEvent) {\n if (\n this.chipInput.activeOption &&\n (this.config.tabToSelect || this.config.addChipOnBlur)\n ) {\n const chip = this.chipInput.activeOption.value;\n this.chips$.next([...this.chips$.value, chip]);\n }\n }\n\n /**\n * Handles selection via key tokens passed through separatorKeyCodes property\n * NOTE: If TAB is used focus does not move on to next component\n * @param event\n */\n handleTokenEnd(event: MatChipInputEvent) {\n if (this.chipInput.activeOption) {\n this.chipInput.activeOption.select();\n }\n event.chipInput?.clear();\n }\n\n mapToLabel(option: SelectOption) {\n return option ? option.label : '';\n }\n\n removeChip(removedChip: SelectOption) {\n const remainingChips: SelectOption[] = this.chips$.value.filter(\n (chip) => chip !== removedChip\n );\n this.chips$.next(remainingChips);\n }\n\n highlightChip(chip: SelectOption) {\n if(this.config.chipsSelectable) {\n this.selectedChip = chip\n }\n }\n \n blurField() {\n console.log('blur')\n this.selectedChip = null;\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n\n <mat-chip-grid\n #chipList>\n <!-- [selectable]=\"config.chipsSelectable\" -->\n <mat-chip-row\n class=\"refinement-chip\"\n *ngFor=\"let chip of controlValue$ | async; let i = index\"\n [removable]=\"config.areChipsRemovable\"\n [highlighted]=\"chip?.value === selectedChip?.value\"\n (click)=\"highlightChip(chip)\"\n (removed)=\"removeChip(chip)\">\n <span *ngIf=\"chip.imageUrl as imageUrl\" class=\"image-container\">\n <img [src]=\"imageUrl\" alt=\"image of {{chip.label}}\">\n </span>\n {{chip.label}}\n <mat-icon\n matChipRemove\n *ngIf=\"config.areChipsRemovable\">\n cancel\n </mat-icon>\n </mat-chip-row>\n <input class=\"hidden-error-directive-anchor\" (blur)=\"blurField()\"\n [formControlName]=\"config.controlName\" type=\"text\"/>\n\n <input\n matInput\n [formControl]=\"autocompleteInputControl\"\n [placeholder]=\"config.placeholder\"\n [matChipInputFor]=\"chipList\"\n [matAutocomplete]=\"auto\"\n (keydown.tab)=\"handleTab($event)\"\n [matChipInputSeparatorKeyCodes]=\"config.separatorKeyCodes\"\n (matChipInputTokenEnd)=\"handleTokenEnd($event)\"\n role=\"searchbox\"\n type=\"text\"\n autocapitalize=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\"\n (blur)=\"blurField()\"\n #autoInput/>\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info \">\n </crispr-info>\n\n </mat-chip-grid>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [autoActiveFirstOption]=\"this.config.autoActiveFirstOption\"\n (optionSelected)=\"handleSelect($event)\"\n [displayWith]=\"mapToLabel\">\n <ng-container *ngIf=\"remainingOptions$ | async as remainingOptions; else emptyOption\">\n <ng-container *ngIf=\"remainingOptions.length > 0; else emptyOption\">\n <mat-option\n *ngFor=\"let option of remainingOptions$ | async\"\n [value]=\"option\">\n <crispr-option [option]=\"option\"></crispr-option>\n </mat-option>\n </ng-container>\n\n </ng-container>\n <ng-template #emptyOption>\n <mat-option disabled=\"true\">\n {{config.emptyOptionsMessage}}\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n</crispr-field-container>\n"],"names":["i6","i8","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAkCA,MAAM,aAAa,GAA6C;AAC9D,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,qBAAqB,EAAE,IAAI;AAC3B,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,gBAAgB,EAAE,GAAG;AACrB,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,wBAAwB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK;IACvE,iBAAiB,EAAE,CAAC,KAAK,CAAC;AAC1B,IAAA,mBAAmB,EAAE,6BAA6B;CACnD,CAAC;AAsBI,MAAO,kCACX,SAAQ,6BAA8D,CAAA;AArBxE,IAAA,WAAA,GAAA;;QAwBE,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;AAC9B,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAiB,EAAE,CAAC,CAAC;QAEj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AAA,QAAA,EAAA,sCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGlB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBApB9C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oCAAoC,mBAG7B,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,mBAAmB;wBACnB,uBAAuB;wBACvB,qBAAqB;wBACrB,cAAc;wBACd,eAAe;wBACf,cAAc;wBACd,aAAa;wBACb,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,y5FAAA,EAAA,MAAA,EAAA,CAAA,mPAAA,CAAA,EAAA,CAAA;8BAoBD,SAAS,EAAA,CAAA;sBADR,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAA;gBAEhC,YAAY,EAAA,CAAA;sBAAnC,SAAS;uBAAC,WAAW,CAAA;;;;;"}
@@ -1,49 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy } from '@angular/core';
3
- import * as i2 from '@angular/forms';
4
- import { ReactiveFormsModule } from '@angular/forms';
5
- import * as i1 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
- import * as i3 from '@angular/material/form-field';
8
- import { MatFormFieldModule } from '@angular/material/form-field';
9
- import * as i5 from '@angular/material/input';
10
- import { MatInputModule } from '@angular/material/input';
11
- import * as i7 from '@tft/form-validation-handler';
12
- import { FormValidationHandlerModule } from '@tft/form-validation-handler';
13
- import { crisprControlMixin, CrisprFieldComponent, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
14
- import 'rxjs';
15
- import 'rxjs/operators';
16
- import '@angular/material/button';
17
- import '@angular/material/icon';
18
- import '@angular/material/progress-bar';
19
- import '@angular/material/tooltip';
20
-
21
- /* eslint-disable @nx/enforce-module-boundaries */
22
- const defaultConfig = { rows: 5 };
23
- const TextareaFieldMixin = crisprControlMixin(CrisprFieldComponent);
24
- class TextareaFieldComponent extends TextareaFieldMixin {
25
- constructor() {
26
- super(...arguments);
27
- this.defaultConfig = defaultConfig;
28
- }
29
- ngOnInit() {
30
- super.ngOnInit();
31
- }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: TextareaFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
33
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: TextareaFieldComponent, isStandalone: true, selector: "crispr-textarea-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <textarea\n [rows]=\"config.rows\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\">\n </textarea>\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && control.valid\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", 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]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: TextareaFieldComponent, decorators: [{
36
- type: Component,
37
- args: [{ selector: 'crispr-textarea-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
38
- CommonModule,
39
- InfoComponent,
40
- ReactiveFormsModule,
41
- FieldContainerComponent,
42
- MatFormFieldModule,
43
- MatInputModule,
44
- FormValidationHandlerModule,
45
- ], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <textarea\n [rows]=\"config.rows\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\">\n </textarea>\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && control.valid\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n" }]
46
- }] });
47
-
48
- export { TextareaFieldComponent };
49
- //# sourceMappingURL=tft-crispr-forms-index-BVwoi2lw.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tft-crispr-forms-index-BVwoi2lw.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/textarea-field/textarea-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/textarea-field/textarea-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { InfoComponent } from '../info';\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n TextareaFieldConfig,\n} from '../../utils';\n\nconst defaultConfig: Partial<TextareaFieldConfig> = { rows: 5 };\nconst TextareaFieldMixin =\n crisprControlMixin<TextareaFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-textarea-field',\n templateUrl: './textarea-field.component.html',\n styleUrls: ['./textarea-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatFormFieldModule,\n MatInputModule,\n FormValidationHandlerModule,\n ],\n})\nexport class TextareaFieldComponent\n extends TextareaFieldMixin\n implements OnInit\n{\n defaultConfig = defaultConfig;\n\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <textarea\n [rows]=\"config.rows\"\n matInput\n [placeholder]=\"config.placeholder\"\n [formControlName]=\"config.controlName\">\n </textarea>\n <span *ngIf=\"config.fieldSuffix\" matSuffix>{{config.fieldSuffix}}</span>\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n\n <mat-hint *ngIf=\"config.hint && control.valid\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n"],"names":["i5"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAeA,MAAM,aAAa,GAAiC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAChE,MAAM,kBAAkB,GACtB,kBAAkB,CAAsB,oBAAoB,CAAC,CAAC;AAkB1D,MAAO,sBACX,SAAQ,kBAAkB,CAAA;AAjB5B,IAAA,WAAA,GAAA;;QAoBE,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;AAK/B,KAAA;IAHC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;8GARU,sBAAsB,EAAA,IAAA,EAAA,I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AAA,CAAA,CAAA,EAAA;;2FAGlB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAhBlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,uBAAuB;wBACvB,kBAAkB;wBAClB,cAAc;wBACd,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,owBAAA,EAAA,CAAA;;;;;"}
@@ -1,48 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy } from '@angular/core';
3
- import * as i3 from '@angular/material/radio';
4
- import { MatRadioModule } from '@angular/material/radio';
5
- import * as i2 from '@angular/forms';
6
- import { ReactiveFormsModule } from '@angular/forms';
7
- import * as i1 from '@angular/common';
8
- import { CommonModule } from '@angular/common';
9
- import * as i7 from '@tft/form-validation-handler';
10
- import { FormValidationHandlerModule } from '@tft/form-validation-handler';
11
- import { crisprControlMixin, CrisprFieldComponent, observablifyOptions, FieldContainerComponent } from './tft-crispr-forms.mjs';
12
- import 'rxjs';
13
- import 'rxjs/operators';
14
- import '@angular/material/button';
15
- import '@angular/material/icon';
16
- import '@angular/material/progress-bar';
17
- import '@angular/material/form-field';
18
- import '@angular/material/tooltip';
19
-
20
- /* eslint-disable @nx/enforce-module-boundaries */
21
- const RadioFieldMixin = crisprControlMixin(CrisprFieldComponent);
22
- class RadioFieldComponent extends RadioFieldMixin {
23
- constructor() {
24
- super(...arguments);
25
- this.defaultConfig = {};
26
- }
27
- ngOnInit() {
28
- super.ngOnInit();
29
- // options$ can be passed as an array, promise that resolves array, or observable that resolves array
30
- // this functions accounts for all possibilities and converts to observable that resolves array
31
- this.options$ = observablifyOptions(this.config.options, this.group);
32
- }
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: RadioFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
34
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: RadioFieldComponent, isStandalone: true, selector: "crispr-radio-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-radio-group\n [formControl]=\"control\"\n [color]=\"config.color\">\n <mat-radio-button class=\"example-radio-button\" *ngFor=\"let option of options$ | async\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n </mat-radio-group>\n</crispr-field-container>\n", styles: ["mat-radio-button{padding:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: RadioFieldComponent, decorators: [{
37
- type: Component,
38
- args: [{ selector: 'crispr-radio-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
39
- CommonModule,
40
- ReactiveFormsModule,
41
- FieldContainerComponent,
42
- MatRadioModule,
43
- FormValidationHandlerModule,
44
- ], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-radio-group\n [formControl]=\"control\"\n [color]=\"config.color\">\n <mat-radio-button class=\"example-radio-button\" *ngFor=\"let option of options$ | async\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n </mat-radio-group>\n</crispr-field-container>\n", styles: ["mat-radio-button{padding:12px}\n"] }]
45
- }] });
46
-
47
- export { RadioFieldComponent };
48
- //# sourceMappingURL=tft-crispr-forms-index-Bbcv75sh.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tft-crispr-forms-index-Bbcv75sh.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/radio-field/radio-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/radio-field/radio-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { MatRadioModule } from '@angular/material/radio';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport { CrisprFieldComponent, RadioFieldConfig, SelectOption, crisprControlMixin, observablifyOptions } from '../../utils';\n\nconst RadioFieldMixin =\n crisprControlMixin<RadioFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-radio-field',\n templateUrl: './radio-field.component.html',\n styleUrls: ['./radio-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FieldContainerComponent,\n MatRadioModule,\n FormValidationHandlerModule,\n ],\n})\nexport class RadioFieldComponent extends RadioFieldMixin implements OnInit {\n defaultConfig = {};\n options$: Observable<SelectOption[]>;\n ngOnInit() {\n super.ngOnInit();\n // options$ can be passed as an array, promise that resolves array, or observable that resolves array\n // this functions accounts for all possibilities and converts to observable that resolves array\n this.options$ = observablifyOptions(this.config.options, this.group);\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-radio-group\n [formControl]=\"control\"\n [color]=\"config.color\">\n <mat-radio-button class=\"example-radio-button\" *ngFor=\"let option of options$ | async\" [value]=\"option.value\">\n {{option.label}}\n </mat-radio-button>\n </mat-radio-group>\n</crispr-field-container>\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAWA,MAAM,eAAe,GACnB,kBAAkB,CAAmB,oBAAoB,CAAC,CAAC;AAgBvD,MAAO,mBAAoB,SAAQ,eAAe,CAAA;AAdxD,IAAA,WAAA,GAAA;;QAeE,IAAa,CAAA,aAAA,GAAG,EAAE,CAAC;AAQpB,KAAA;IANC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;;;AAGjB,QAAA,IAAI,CAAC,QAAQ,GAAG,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KACtE;8GARU,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5BhC,wXAYA,EAAA,MAAA,EAAA,CAAA,kCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,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QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,SAAA,EAAA,OAAA,EAAA,eAAA,EAAA,UAAA,EAAA,UAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACd,2BAA2B,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGlB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAd/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,mBAGb,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBACvB,cAAc;wBACd,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,wXAAA,EAAA,MAAA,EAAA,CAAA,kCAAA,CAAA,EAAA,CAAA;;;;;"}
@@ -1,110 +0,0 @@
1
- import * as i1 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy, Optional, Self, ViewChild } from '@angular/core';
5
- import * as i2 from '@angular/forms';
6
- import { ReactiveFormsModule } from '@angular/forms';
7
- import * as i2$1 from '@angular/material/button';
8
- import { MatButtonModule } from '@angular/material/button';
9
- import * as i3$1 from '@angular/material/form-field';
10
- import { MatFormFieldModule } from '@angular/material/form-field';
11
- import * as i3 from '@angular/material/icon';
12
- import { MatIconModule } from '@angular/material/icon';
13
- import * as i5 from '@angular/material/input';
14
- import { MatInputModule } from '@angular/material/input';
15
- import { of } from 'rxjs';
16
- import { crisprControlMixin, CrisprFieldComponent, FieldContainerComponent, SelectedFileComponent, FileDropzoneDirective } from './tft-crispr-forms.mjs';
17
- import * as i7 from '@tft/form-validation-handler';
18
- import { FormValidationHandlerModule } from '@tft/form-validation-handler';
19
- import 'rxjs/operators';
20
- import '@angular/material/progress-bar';
21
- import '@angular/material/tooltip';
22
-
23
- /* eslint-disable @nx/enforce-module-boundaries */
24
- const FileUploadFieldMixin = crisprControlMixin(CrisprFieldComponent);
25
- class FileUploadFieldComponent extends FileUploadFieldMixin {
26
- // ngControl: NgControl = null;
27
- constructor(ngControl) {
28
- super();
29
- this.ngControl = ngControl;
30
- this.defaultConfig = {
31
- allowMultipleFiles: false,
32
- acceptedTypes: '*.*',
33
- dropZoneText: 'DROP FILE HERE',
34
- selectFilesButtonType: 'button',
35
- selectButtonText: 'SELECT',
36
- showClearFilesButton: true,
37
- clearFilesButtonText: 'CLEAR',
38
- uploadButtonText: 'UPLOAD',
39
- uploadButtonType: 'button',
40
- showUploadProgress: false,
41
- disableOnUpload: true,
42
- };
43
- this.isUploaded = false;
44
- this.fileProgress = [];
45
- if (this.ngControl != null) {
46
- // Setting the value accessor directly (instead of using
47
- // the providers) to avoid running into a circular import.
48
- ngControl.valueAccessor = this;
49
- }
50
- }
51
- ngOnInit() {
52
- super.ngOnInit();
53
- this.disabled$ = this.config.disabledCallback
54
- ? this.config.disabledCallback(this.group)
55
- : of(false);
56
- }
57
- filesChanged(files) {
58
- if (files && files.length > 0) {
59
- this.selectedFiles = files;
60
- this.control.patchValue(files);
61
- }
62
- }
63
- uploadFiles() {
64
- if (this.selectedFiles && this.config.uploadFiles) {
65
- this.isUploaded = true;
66
- this.config.uploadFiles(this.group, this.selectedFiles, this);
67
- }
68
- }
69
- resetFileInput() {
70
- this.fileInputRef.nativeElement.value = '';
71
- this.control.patchValue(null);
72
- this.isUploaded = false;
73
- }
74
- writeValue(value) {
75
- // clear file input
76
- // this.host.nativeElement.value = '';
77
- // this.file = null;
78
- }
79
- registerOnChange(fn) {
80
- this.onChange = fn;
81
- }
82
- registerOnTouched(fn) { }
83
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileUploadFieldComponent, deps: [{ token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
84
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: FileUploadFieldComponent, isStandalone: true, selector: "crispr-file-upload-field", viewQueries: [{ propertyName: "fileInputRef", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", 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]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: SelectedFileComponent, selector: "crispr-selected-file", inputs: ["fileName", "progress", "showProgress", "color"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "directive", type: FileDropzoneDirective, selector: "[crisprFileDropzone]", inputs: ["crisprFileDropzone"], outputs: ["fileDrop"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
85
- }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: FileUploadFieldComponent, decorators: [{
87
- type: Component,
88
- args: [{ selector: 'crispr-file-upload-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
89
- CommonModule,
90
- FieldContainerComponent,
91
- ReactiveFormsModule,
92
- MatIconModule,
93
- MatButtonModule,
94
- MatFormFieldModule,
95
- MatInputModule,
96
- SelectedFileComponent,
97
- FormValidationHandlerModule,
98
- FileDropzoneDirective,
99
- ], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0;display:flex;justify-content:center}:host .drop-info{display:flex;flex-direction:column;align-items:center}:host .drop-info .drop-icon{font-size:36px}:host .drop-info .mat-h2{margin:0}:host .button-container{display:flex;justify-content:flex-end;margin-top:-16px}:host .button-container button{margin-left:8px}:host .selected-files-container{width:100%}:host [matInput]{position:absolute;max-height:0;visibility:hidden}\n"] }]
100
- }], ctorParameters: () => [{ type: i2.NgControl, decorators: [{
101
- type: Optional
102
- }, {
103
- type: Self
104
- }] }], propDecorators: { fileInputRef: [{
105
- type: ViewChild,
106
- args: ['fileInput']
107
- }] } });
108
-
109
- export { FileUploadFieldComponent };
110
- //# sourceMappingURL=tft-crispr-forms-index-BdOC-6h3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tft-crispr-forms-index-BdOC-6h3.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/file-upload-field/file-upload-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/file-upload-field/file-upload-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n ViewChild,\n OnInit,\n ChangeDetectionStrategy,\n Optional,\n Self,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NgControl,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { Observable, of } from 'rxjs';\nimport { FileDropzoneDirective } from '../file-dropzone';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\n\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n FileUploadFieldConfig,\n} from '../../utils';\nimport { FieldContainerComponent } from '../field-container';\nimport { SelectedFileComponent } from '../selected-file';\n\nconst FileUploadFieldMixin =\n crisprControlMixin<FileUploadFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-file-upload-field',\n templateUrl: './file-upload-field.component.html',\n styleUrls: ['./file-upload-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n FieldContainerComponent,\n ReactiveFormsModule,\n MatIconModule,\n MatButtonModule,\n MatFormFieldModule,\n MatInputModule,\n SelectedFileComponent,\n FormValidationHandlerModule,\n FileDropzoneDirective,\n ],\n})\nexport class FileUploadFieldComponent\n extends FileUploadFieldMixin\n implements OnInit, ControlValueAccessor\n{\n onChange: () => void;\n\n defaultConfig: Partial<FileUploadFieldConfig> = {\n allowMultipleFiles: false,\n acceptedTypes: '*.*',\n dropZoneText: 'DROP FILE HERE',\n selectFilesButtonType: 'button',\n selectButtonText: 'SELECT',\n showClearFilesButton: true,\n clearFilesButtonText: 'CLEAR',\n uploadButtonText: 'UPLOAD',\n uploadButtonType: 'button',\n showUploadProgress: false,\n disableOnUpload: true,\n };\n\n @ViewChild('fileInput') fileInputRef: ElementRef;\n\n selectedFiles: FileList;\n\n isUploaded = false;\n\n fileProgress: Observable<number>[] = [];\n disabled$: Observable<boolean>;\n\n // ngControl: NgControl = null;\n constructor(@Optional() @Self() public ngControl: NgControl) {\n super();\n if (this.ngControl != null) {\n // Setting the value accessor directly (instead of using\n // the providers) to avoid running into a circular import.\n ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.disabled$ = this.config.disabledCallback\n ? this.config.disabledCallback(this.group)\n : of(false);\n }\n\n filesChanged(files: FileList): void {\n if (files && files.length > 0) {\n this.selectedFiles = files;\n this.control.patchValue(files);\n }\n }\n\n uploadFiles() {\n if (this.selectedFiles && this.config.uploadFiles) {\n this.isUploaded = true;\n this.config.uploadFiles(this.group, this.selectedFiles, this);\n }\n }\n\n resetFileInput(): void {\n this.fileInputRef.nativeElement.value = '';\n this.control.patchValue(null);\n this.isUploaded = false;\n }\n\n writeValue(value: null) {\n // clear file input\n // this.host.nativeElement.value = '';\n // this.file = null;\n }\n\n registerOnChange(fn: () => void) {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void) {}\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n appearance=\"outline\"\n [crisprFileDropzone]=\"!(disabled$ | async) && !(config.disableOnUpload && isUploaded)\"\n [formGroup]=\"group\"\n (fileDrop)=\"filesChanged($event)\">\n\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n style=\"display: none\"\n [accept]=\"config.acceptedTypes\"\n [multiple]=\"config.allowMultipleFiles\"\n (change)=\"filesChanged($event.target.files)\"/>\n <mat-label>{{config.label}}</mat-label>\n\n <div *ngIf=\"!(selectedFiles?.length > 0); else selectedFileList\" class=\"drop-info\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n or\n <button\n mat-raised-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async) || config.disableOnUpload && isUploaded\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n {{config.selectButtonText}}\n </button>\n </div>\n <ng-template #selectedFileList>\n <div class=\"selected-files-container\">\n <div class=\"selected-files-list\">\n <crispr-selected-file\n *ngFor=\"let file of selectedFiles; let i = index;\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"file.name\"\n [showProgress]=\"config.showUploadProgress\"\n [progress]=\"fileProgress && (fileProgress[i] | async)\">\n </crispr-selected-file>\n </div>\n\n </div>\n </ng-template>\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n </mat-form-field>\n <div class=\"button-container\" *ngIf=\"selectedFiles?.length > 0\">\n\n <button\n mat-button\n (click)=\"resetFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n aria-label=\"Remove Selected File(s)\">\n {{config.clearFilesButtonText}}\n <mat-icon>delete</mat-icon>\n </button>\n\n <button\n *ngIf=\"!!config.uploadFiles\"\n mat-raised-button\n type=\"button\"\n color=\"accent\"\n class=\"file-input-button\"\n [disabled]=\"(disabled$ | async) || (config.disableOnUpload && isUploaded)\"\n (click)=\"uploadFiles()\"\n [attr.aria-label]=\"config.uploadButtonText\">\n {{ config.uploadButtonText }}\n </button>\n\n </div>\n</crispr-field-container>\n"],"names":["i1","i4","i5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;A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,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,mBAGnB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,uBAAuB;wBACvB,mBAAmB;wBACnB,aAAa;wBACb,eAAe;wBACf,kBAAkB;wBAClB,cAAc;wBACd,qBAAqB;wBACrB,2BAA2B;wBAC3B,qBAAqB;AACtB,qBAAA,EAAA,QAAA,EAAA,4rFAAA,EAAA,MAAA,EAAA,CAAA,mfAAA,CAAA,EAAA,CAAA;;0BAgCY,QAAQ;;0BAAI,IAAI;yCAVL,YAAY,EAAA,CAAA;sBAAnC,SAAS;uBAAC,WAAW,CAAA;;;;;"}
@@ -1,73 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy } from '@angular/core';
3
- import * as i2 from '@angular/material/datepicker';
4
- import { MatDatepickerModule } from '@angular/material/datepicker';
5
- import { MatDateFnsModule } from '@angular/material-date-fns-adapter';
6
- import { of } from 'rxjs';
7
- import * as i6 from '@angular/cdk/portal';
8
- import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
9
- import * as i3 from '@angular/material/form-field';
10
- import { MatFormFieldModule } from '@angular/material/form-field';
11
- import * as i1 from '@angular/common';
12
- import { CommonModule } from '@angular/common';
13
- import * as i2$1 from '@angular/forms';
14
- import { ReactiveFormsModule } from '@angular/forms';
15
- import * as i5 from '@angular/material/input';
16
- import { MatInputModule } from '@angular/material/input';
17
- import * as i7 from '@tft/form-validation-handler';
18
- import { FormValidationHandlerModule } from '@tft/form-validation-handler';
19
- import { crisprControlMixin, CrisprFieldComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
20
- import 'rxjs/operators';
21
- import '@angular/material/button';
22
- import '@angular/material/icon';
23
- import '@angular/material/progress-bar';
24
- import '@angular/material/tooltip';
25
-
26
- /* eslint-disable @nx/enforce-module-boundaries */
27
- const defaultConfig = {
28
- startView: 'month',
29
- };
30
- const DatepickerFieldMixin = crisprControlMixin(CrisprFieldComponent);
31
- class DatepickerFieldComponent extends DatepickerFieldMixin {
32
- constructor() {
33
- super(...arguments);
34
- this.defaultConfig = defaultConfig;
35
- }
36
- ngOnInit() {
37
- super.ngOnInit();
38
- this.startAt$ =
39
- this.config.startAt instanceof Date
40
- ? of(this.config.startAt)
41
- : this.config.startAt instanceof Function
42
- ? this.config.startAt(this.group)
43
- : of(null);
44
- this.dateClass = this.config?.cellClassFunction || null;
45
- this.dateClass$ = this.config.dateClass
46
- ? this.config?.dateClass(this.group)
47
- : of(() => '');
48
- }
49
- ngAfterContentInit() {
50
- if (this.config.datepickerActions) {
51
- this.calendarFooterPortal = new ComponentPortal(this.config.datepickerActions);
52
- }
53
- }
54
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: DatepickerFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
55
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: DatepickerFieldComponent, isStandalone: true, selector: "crispr-datepicker-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n matInput\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config.datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config.touchUi\"\n [startView]=\"config.startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n <mat-datepicker-actions *ngIf=\"calendarFooterPortal\">\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n </mat-datepicker>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n</crispr-field-container>\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i2.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i2.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDateFnsModule }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
56
- }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: DatepickerFieldComponent, decorators: [{
58
- type: Component,
59
- args: [{ selector: 'crispr-datepicker-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
60
- CommonModule,
61
- FieldContainerComponent,
62
- MatDatepickerModule,
63
- MatFormFieldModule,
64
- ReactiveFormsModule,
65
- MatInputModule,
66
- MatDateFnsModule,
67
- PortalModule,
68
- FormValidationHandlerModule,
69
- ], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n matInput\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config.datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config.touchUi\"\n [startView]=\"config.startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n <mat-datepicker-actions *ngIf=\"calendarFooterPortal\">\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n </mat-datepicker>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n</crispr-field-container>\n\n" }]
70
- }] });
71
-
72
- export { DatepickerFieldComponent };
73
- //# sourceMappingURL=tft-crispr-forms-index-BwC11k3P.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tft-crispr-forms-index-BwC11k3P.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/datepicker-field/datepicker-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/datepicker-field/datepicker-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport {\n Component,\n OnInit,\n ChangeDetectionStrategy,\n AfterContentInit,\n} from '@angular/core';\nimport {\n MatCalendarCellClassFunction,\n MatDatepickerModule,\n} from '@angular/material/datepicker';\nimport { MatDateFnsModule } from '@angular/material-date-fns-adapter';\nimport { Observable, of } from 'rxjs';\nimport { ComponentPortal, Portal, PortalModule } from '@angular/cdk/portal';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n DatepickerFieldConfig,\n} from '../../utils';\n\nconst defaultConfig: Partial<DatepickerFieldConfig> = {\n startView: 'month',\n};\nconst DatepickerFieldMixin =\n crisprControlMixin<DatepickerFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-datepicker-field',\n templateUrl: './datepicker-field.component.html',\n styleUrls: ['./datepicker-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n FieldContainerComponent,\n MatDatepickerModule,\n MatFormFieldModule,\n ReactiveFormsModule,\n MatInputModule,\n MatDateFnsModule,\n PortalModule,\n FormValidationHandlerModule,\n ],\n})\nexport class DatepickerFieldComponent\n extends DatepickerFieldMixin\n implements OnInit, AfterContentInit\n{\n defaultConfig = defaultConfig;\n\n dateClass: MatCalendarCellClassFunction<Date>;\n dateClass$: Observable<MatCalendarCellClassFunction<Date>>;\n startAt$: Observable<Date>;\n\n /** A portal containing the footer component type for this calendar. */\n calendarFooterPortal: Portal<any>;\n\n ngOnInit() {\n super.ngOnInit();\n this.startAt$ =\n this.config.startAt instanceof Date\n ? of(this.config.startAt)\n : this.config.startAt instanceof Function\n ? this.config.startAt(this.group)\n : of(null);\n this.dateClass = this.config?.cellClassFunction || null;\n this.dateClass$ = this.config.dateClass\n ? this.config?.dateClass(this.group)\n : of(() => '');\n }\n\n ngAfterContentInit() {\n if (this.config.datepickerActions) {\n this.calendarFooterPortal = new ComponentPortal(\n this.config.datepickerActions\n );\n }\n }\n\n // handleSelectedChange(event, picker: MatDatepicker<unknown>) {\n // console.log({event, picker})\n // if(this.config.selectedChange) {\n // this.config.selectedChange(event, picker);\n // }\n // }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <mat-form-field\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label *ngIf=\"config.label\">\n {{config.label}}\n </mat-label>\n <input\n matInput\n [formControlName]=\"config.controlName\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [matDatepicker]=\"picker\"\n [matDatepickerFilter]=\"config.datepickerFilter\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker\n [touchUi]=\"config.touchUi\"\n [startView]=\"config.startView\"\n [startAt]=\"startAt$ | async\"\n [dateClass]=\"dateClass || (dateClass$ | async)\"\n #picker>\n <mat-datepicker-actions *ngIf=\"calendarFooterPortal\">\n <ng-template [cdkPortalOutlet]=\"calendarFooterPortal\"></ng-template>\n </mat-datepicker-actions>\n </mat-datepicker>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n</crispr-field-container>\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA0BA,MAAM,aAAa,GAAmC;AACpD,IAAA,SAAS,EAAE,OAAO;CACnB,CAAC;AACF,MAAM,oBAAoB,GACxB,kBAAkB,CAAwB,oBAAoB,CAAC,CAAC;AAoB5D,MAAO,wBACX,SAAQ,oBAAoB,CAAA;AAnB9B,IAAA,WAAA,GAAA;;QAsBE,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;AAqC/B,KAAA;IA5BC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;AACjB,QAAA,IAAI,CAAC,QAAQ;AACX,YAAA,IAAI,CAAC,MAAM,CAAC,OAAO,YAAY,IAAI;kBAC/B,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;AACzB,kBAAE,IAAI,CAAC,MAAM,CAAC,OAAO,YAAY,QAAQ;sBACvC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AACjC,sBAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,iB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* as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/material/checkbox';
6
- import { MatCheckboxModule } from '@angular/material/checkbox';
7
- import * as i2$1 from '@angular/forms';
8
- import { ReactiveFormsModule } from '@angular/forms';
9
- import * as i7 from '@tft/form-validation-handler';
10
- import { FormValidationHandlerModule } from '@tft/form-validation-handler';
11
- import { crisprControlMixin, CrisprFieldComponent, InfoComponent, FieldContainerComponent } from './tft-crispr-forms.mjs';
12
- import 'rxjs';
13
- import 'rxjs/operators';
14
- import '@angular/material/button';
15
- import '@angular/material/icon';
16
- import '@angular/material/progress-bar';
17
- import '@angular/material/form-field';
18
- import '@angular/material/tooltip';
19
-
20
- /* eslint-disable @nx/enforce-module-boundaries */
21
- const defaultConfig = {
22
- labelPosition: 'after',
23
- inline: false,
24
- };
25
- const CheckboxFieldMixin = crisprControlMixin(CrisprFieldComponent);
26
- class CheckboxFieldComponent extends CheckboxFieldMixin {
27
- constructor() {
28
- super(...arguments);
29
- this.defaultConfig = defaultConfig;
30
- }
31
- ngOnInit() {
32
- super.ngOnInit();
33
- }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CheckboxFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
35
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.3", type: CheckboxFieldComponent, isStandalone: true, selector: "crispr-checkbox-field", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [inlineField]=\"config.inline\">\n <div\n [formGroup]=\"group\">\n <mat-checkbox\n [color]=\"config.color\"\n [labelPosition]=\"config.labelPosition\"\n [formControlName]=\"config.controlName\">\n {{config.label}}\n <crispr-info\n matSuffix *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </mat-checkbox>\n </div>\n</crispr-field-container>\n", styles: ["mat-checkbox{height:42px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
36
- }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: CheckboxFieldComponent, decorators: [{
38
- type: Component,
39
- args: [{ selector: 'crispr-checkbox-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
40
- CommonModule,
41
- InfoComponent,
42
- MatCheckboxModule,
43
- ReactiveFormsModule,
44
- FieldContainerComponent,
45
- FormValidationHandlerModule,
46
- ], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [inlineField]=\"config.inline\">\n <div\n [formGroup]=\"group\">\n <mat-checkbox\n [color]=\"config.color\"\n [labelPosition]=\"config.labelPosition\"\n [formControlName]=\"config.controlName\">\n {{config.label}}\n <crispr-info\n matSuffix *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </mat-checkbox>\n </div>\n</crispr-field-container>\n", styles: ["mat-checkbox{height:42px}\n"] }]
47
- }] });
48
-
49
- export { CheckboxFieldComponent };
50
- //# sourceMappingURL=tft-crispr-forms-index-CN4M4eEo.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tft-crispr-forms-index-CN4M4eEo.mjs","sources":["../../../../libs/crispr-forms/src/lib/ui/checkbox-field/checkbox-field.component.ts","../../../../libs/crispr-forms/src/lib/ui/checkbox-field/checkbox-field.component.html"],"sourcesContent":["/* eslint-disable @nx/enforce-module-boundaries */\nimport { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FieldContainerComponent } from '../field-container';\nimport {\n crisprControlMixin,\n CrisprFieldComponent,\n CheckboxFieldConfig,\n} from '../../utils';\nimport { InfoComponent } from '../info';\n\nconst defaultConfig: Partial<CheckboxFieldConfig> = {\n labelPosition: 'after',\n inline: false,\n};\nconst CheckboxFieldMixin =\n crisprControlMixin<CheckboxFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-checkbox-field',\n templateUrl: './checkbox-field.component.html',\n styleUrls: ['./checkbox-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n InfoComponent,\n MatCheckboxModule,\n ReactiveFormsModule,\n FieldContainerComponent,\n FormValidationHandlerModule,\n ],\n})\nexport class CheckboxFieldComponent\n extends CheckboxFieldMixin\n implements OnInit\n{\n defaultConfig = defaultConfig;\n ngOnInit() {\n super.ngOnInit();\n }\n}\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [inlineField]=\"config.inline\">\n <div\n [formGroup]=\"group\">\n <mat-checkbox\n [color]=\"config.color\"\n [labelPosition]=\"config.labelPosition\"\n [formControlName]=\"config.controlName\">\n {{config.label}}\n <crispr-info\n matSuffix *ngIf=\"config.info\"\n [info]=\"config.info\">\n </crispr-info>\n </mat-checkbox>\n </div>\n</crispr-field-container>\n"],"names":["i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAcA,MAAM,aAAa,GAAiC;AAClD,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,MAAM,EAAE,KAAK;CACd,CAAC;AACF,MAAM,kBAAkB,GACtB,kBAAkB,CAAsB,oBAAoB,CAAC,CAAC;AAiB1D,MAAO,sBACX,SAAQ,kBAAkB,CAAA;AAhB5B,IAAA,WAAA,GAAA;;QAmBE,IAAa,CAAA,aAAA,GAAG,aAAa,CAAC;AAI/B,KAAA;IAHC,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;KAClB;8GAPU,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,ECpCnC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,yeAkBA,EDUI,MAAA,EAAA,CAAA,6BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAA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,EAAAA,IAAA,CAAA,eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,uBAAuB,8GACvB,2BAA2B,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,8BAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAGlB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAflC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,iBAAiB;wBACjB,mBAAmB;wBACnB,uBAAuB;wBACvB,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,yeAAA,EAAA,MAAA,EAAA,CAAA,6BAAA,CAAA,EAAA,CAAA;;;;;"}
@@ -1,63 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, signal, Component } from '@angular/core';
3
- import { crisprControlMixin, CrisprFieldComponent } from './tft-crispr-forms.mjs';
4
- import * as i1 from '@angular/google-maps';
5
- import { MapGeocoder, GoogleMapsModule } from '@angular/google-maps';
6
- import * as i2 from '@angular/forms';
7
- import { FormControl, ReactiveFormsModule } from '@angular/forms';
8
- import { switchMap, map } from 'rxjs';
9
- import { AsyncPipe } from '@angular/common';
10
- import '@tft/form-validation-handler';
11
- import 'rxjs/operators';
12
- import '@angular/material/button';
13
- import '@angular/material/icon';
14
- import '@angular/material/progress-bar';
15
- import '@angular/material/form-field';
16
- import '@angular/material/tooltip';
17
-
18
- const defaultConfig = {};
19
- const MapFieldMixin = crisprControlMixin(CrisprFieldComponent);
20
- class MapFieldComponent extends MapFieldMixin {
21
- constructor() {
22
- super(...arguments);
23
- this.geoCoder = inject(MapGeocoder);
24
- this.locationInput = new FormControl();
25
- this.defaultConfig = defaultConfig;
26
- this.markers = signal([]);
27
- this.inputCenter = this.locationInput.valueChanges.pipe(switchMap((value) => {
28
- const request = {
29
- address: value,
30
- };
31
- return this.geoCoder.geocode(request);
32
- }), map((res) => {
33
- const { geometry, postcode_localities } = res.results?.[0] || {};
34
- const { location, bounds } = geometry || {};
35
- const center = location?.toJSON();
36
- console.log({ center, bounds, postcode_localities });
37
- return center;
38
- }));
39
- }
40
- // center = new input
41
- ngOnInit() {
42
- super.ngOnInit();
43
- }
44
- onMarkerClick(marker) {
45
- this.config?.onMarkerClick(marker);
46
- }
47
- onMove(map, group) {
48
- console.log({ map });
49
- this.config?.onMove?.(map, group);
50
- }
51
- getMarkers(map, group) {
52
- this.config.markers(map, group).pipe();
53
- }
54
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: MapFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
55
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.3", type: MapFieldComponent, isStandalone: true, selector: "crispr-map", usesInheritance: true, ngImport: i0, template: "\n<input type=\"text\" [formControl]=\"locationInput\" />\nvalue: {{_value}}\n<google-map \n [center]=\"inputCenter | async\" \n [zoom]=\"11\"\n [options]=\"config.options\" \n (mapDragend)=\"onMove(map, group)\"\n #map>\n\n @for (marker of config.markers(map, group) | async; track $index) {\n <map-advanced-marker\n #markerElem=\"mapAdvancedMarker\"\n [position]=\"marker.position\"\n [content]=\"marker.content\"\n [title]=\"marker.title\"\n (mapClick)=\"onMarkerClick(markerElem)\"\n />\n }\n <map-info-window #infoWindow></map-info-window>\n</google-map>", styles: [""], dependencies: [{ kind: "ngmodule", type: GoogleMapsModule }, { kind: "component", type: i1.GoogleMap, selector: "google-map", inputs: ["height", "width", "mapId", "mapTypeId", "center", "zoom", "options"], outputs: ["mapInitialized", "authFailure", "boundsChanged", "centerChanged", "mapClick", "mapDblclick", "mapDrag", "mapDragend", "mapDragstart", "headingChanged", "idle", "maptypeidChanged", "mapMousemove", "mapMouseout", "mapMouseover", "projectionChanged", "mapRightclick", "tilesloaded", "tiltChanged", "zoomChanged"], exportAs: ["googleMap"] }, { kind: "directive", type: i1.MapInfoWindow, selector: "map-info-window", inputs: ["options", "position"], outputs: ["closeclick", "contentChanged", "domready", "positionChanged", "zindexChanged", "infoWindowInitialized"], exportAs: ["mapInfoWindow"] }, { kind: "directive", type: i1.MapAdvancedMarker, selector: "map-advanced-marker", inputs: ["title", "position", "content", "gmpDraggable", "options", "zIndex"], outputs: ["mapClick", "mapDrag", "mapDragend", "mapDragstart", "markerInitialized"], exportAs: ["mapAdvancedMarker"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", 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]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], preserveWhitespaces: true }); }
56
- }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.3", ngImport: i0, type: MapFieldComponent, decorators: [{
58
- type: Component,
59
- args: [{ selector: 'crispr-map', standalone: true, imports: [GoogleMapsModule, ReactiveFormsModule, AsyncPipe], template: "\n<input type=\"text\" [formControl]=\"locationInput\" />\nvalue: {{_value}}\n<google-map \n [center]=\"inputCenter | async\" \n [zoom]=\"11\"\n [options]=\"config.options\" \n (mapDragend)=\"onMove(map, group)\"\n #map>\n\n @for (marker of config.markers(map, group) | async; track $index) {\n <map-advanced-marker\n #markerElem=\"mapAdvancedMarker\"\n [position]=\"marker.position\"\n [content]=\"marker.content\"\n [title]=\"marker.title\"\n (mapClick)=\"onMarkerClick(markerElem)\"\n />\n }\n <map-info-window #infoWindow></map-info-window>\n</google-map>" }]
60
- }] });
61
-
62
- export { MapFieldComponent };
63
- //# sourceMappingURL=tft-crispr-forms-index-CP5Jn6EK.mjs.map