@tft/crispr-forms 14.0.2 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/esm2022/public-api.mjs +4 -0
  2. package/{esm2020 → esm2022}/src/index.mjs +1 -1
  3. package/esm2022/src/lib/crispr-forms.module.mjs +55 -0
  4. package/esm2022/src/lib/display-field.directive.mjs +52 -0
  5. package/esm2022/src/lib/field-component-map.const.mjs +28 -0
  6. package/esm2022/src/lib/field.directive.mjs +69 -0
  7. package/esm2022/src/lib/form/form.component.mjs +62 -0
  8. package/esm2022/src/lib/form-group-list/form-group-list.component.mjs +97 -0
  9. package/{esm2020 → esm2022}/src/lib/form-group-list/index.mjs +1 -1
  10. package/{esm2020 → esm2022}/src/lib/pipes/crispr-pipes.module.mjs +24 -24
  11. package/esm2022/src/lib/pipes/initial-control-value.pipe.mjs +20 -0
  12. package/{esm2020 → esm2022}/src/lib/public_api.mjs +2 -2
  13. package/{esm2020 → esm2022}/src/lib/sub-group/index.mjs +2 -2
  14. package/esm2022/src/lib/sub-group/sub-group.component.mjs +20 -0
  15. package/esm2022/src/lib/sub-group/sub-group.module.mjs +42 -0
  16. package/esm2022/src/lib/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +138 -0
  17. package/esm2022/src/lib/ui/autocomplete-chiplist-field/index.mjs +2 -0
  18. package/esm2022/src/lib/ui/autocomplete-chiplist-field/public-api.mjs +2 -0
  19. package/esm2022/src/lib/ui/autocomplete-field/autocomplete-field.component.mjs +95 -0
  20. package/esm2022/src/lib/ui/autocomplete-field/index.mjs +2 -0
  21. package/esm2022/src/lib/ui/autocomplete-field/public-api.mjs +2 -0
  22. package/esm2022/src/lib/ui/button/button.component.mjs +52 -0
  23. package/esm2022/src/lib/ui/button/index.mjs +2 -0
  24. package/esm2022/src/lib/ui/button/public-api.mjs +2 -0
  25. package/esm2022/src/lib/ui/checkbox-field/checkbox-field.component.mjs +42 -0
  26. package/esm2022/src/lib/ui/checkbox-field/index.mjs +2 -0
  27. package/esm2022/src/lib/ui/checkbox-field/public-api.mjs +2 -0
  28. package/esm2022/src/lib/ui/datepicker-field/datepicker-field.component.mjs +66 -0
  29. package/esm2022/src/lib/ui/datepicker-field/index.mjs +2 -0
  30. package/esm2022/src/lib/ui/datepicker-field/public-api.mjs +2 -0
  31. package/esm2022/src/lib/ui/divider/divider.component.mjs +25 -0
  32. package/esm2022/src/lib/ui/divider/index.mjs +2 -0
  33. package/esm2022/src/lib/ui/divider/public-api.mjs +2 -0
  34. package/esm2022/src/lib/ui/field-container/field-container.component.mjs +59 -0
  35. package/esm2022/src/lib/ui/field-container/index.mjs +2 -0
  36. package/esm2022/src/lib/ui/field-container/public-api.mjs +2 -0
  37. package/esm2022/src/lib/ui/file-dropzone/file-dropzone.directive.mjs +40 -0
  38. package/esm2022/src/lib/ui/file-dropzone/index.mjs +2 -0
  39. package/esm2022/src/lib/ui/file-dropzone/public-api.mjs +2 -0
  40. package/esm2022/src/lib/ui/file-upload-field/file-upload-field.component.mjs +107 -0
  41. package/esm2022/src/lib/ui/file-upload-field/index.mjs +2 -0
  42. package/esm2022/src/lib/ui/file-upload-field/public-api.mjs +2 -0
  43. package/esm2022/src/lib/ui/heading/heading.component.mjs +27 -0
  44. package/esm2022/src/lib/ui/heading/index.mjs +2 -0
  45. package/esm2022/src/lib/ui/heading/public-api.mjs +2 -0
  46. package/esm2022/src/lib/ui/image-upload-field/image-upload-field.component.mjs +184 -0
  47. package/esm2022/src/lib/ui/image-upload-field/index.mjs +2 -0
  48. package/esm2022/src/lib/ui/image-upload-field/public-api.mjs +2 -0
  49. package/esm2022/src/lib/ui/index.mjs +2 -0
  50. package/esm2022/src/lib/ui/info/index.mjs +2 -0
  51. package/esm2022/src/lib/ui/info/info.component.mjs +23 -0
  52. package/esm2022/src/lib/ui/info/public-api.mjs +2 -0
  53. package/esm2022/src/lib/ui/input-field/index.mjs +2 -0
  54. package/esm2022/src/lib/ui/input-field/input-field.component.mjs +43 -0
  55. package/esm2022/src/lib/ui/input-field/public-api.mjs +2 -0
  56. package/esm2022/src/lib/ui/option/index.mjs +2 -0
  57. package/esm2022/src/lib/ui/option/option.component.mjs +16 -0
  58. package/esm2022/src/lib/ui/option/public-api.mjs +2 -0
  59. package/esm2022/src/lib/ui/public-api.mjs +7 -0
  60. package/esm2022/src/lib/ui/radio-field/index.mjs +2 -0
  61. package/esm2022/src/lib/ui/radio-field/public-api.mjs +2 -0
  62. package/esm2022/src/lib/ui/radio-field/radio-field.component.mjs +39 -0
  63. package/esm2022/src/lib/ui/select-field/index.mjs +2 -0
  64. package/esm2022/src/lib/ui/select-field/public-api.mjs +2 -0
  65. package/esm2022/src/lib/ui/select-field/select-field.component.mjs +73 -0
  66. package/esm2022/src/lib/ui/selected-file/index.mjs +2 -0
  67. package/esm2022/src/lib/ui/selected-file/public-api.mjs +2 -0
  68. package/esm2022/src/lib/ui/selected-file/selected-file.component.mjs +26 -0
  69. package/esm2022/src/lib/ui/slider-field/index.mjs +2 -0
  70. package/esm2022/src/lib/ui/slider-field/public-api.mjs +2 -0
  71. package/esm2022/src/lib/ui/slider-field/slider-field.component.mjs +46 -0
  72. package/esm2022/src/lib/ui/textarea-field/index.mjs +2 -0
  73. package/esm2022/src/lib/ui/textarea-field/public-api.mjs +2 -0
  74. package/esm2022/src/lib/ui/textarea-field/textarea-field.component.mjs +42 -0
  75. package/esm2022/src/lib/ui/unit-conversion-field/index.mjs +2 -0
  76. package/esm2022/src/lib/ui/unit-conversion-field/public-api.mjs +2 -0
  77. package/esm2022/src/lib/ui/unit-conversion-field/unit-conversion-field.component.mjs +86 -0
  78. package/esm2022/src/lib/utils/abstracts/autocomplete-field.abstract.mjs +30 -0
  79. package/esm2022/src/lib/utils/abstracts/crispr-control.mixin.mjs +27 -0
  80. package/esm2022/src/lib/utils/abstracts/crispr-display-field.abstract.mjs +14 -0
  81. package/esm2022/src/lib/utils/abstracts/crispr-field.abstract.mjs +19 -0
  82. package/esm2022/src/lib/utils/abstracts/index.mjs +5 -0
  83. package/esm2022/src/lib/utils/functions/buildFormGroupFromConfig.mjs +28 -0
  84. package/esm2022/src/lib/utils/functions/callOptionsIfFunction.mjs +4 -0
  85. package/esm2022/src/lib/utils/functions/createControlForType.mjs +19 -0
  86. package/esm2022/src/lib/utils/functions/filterOptionsByLabel.mjs +11 -0
  87. package/esm2022/src/lib/utils/functions/image-compression.helpers.mjs +50 -0
  88. package/esm2022/src/lib/utils/functions/index.mjs +8 -0
  89. package/esm2022/src/lib/utils/functions/isControlConfig.mjs +7 -0
  90. package/esm2022/src/lib/utils/functions/observablifyOptions.mjs +29 -0
  91. package/esm2022/src/lib/utils/index.mjs +2 -0
  92. package/esm2022/src/lib/utils/models/autocomplete-chiplist-field.config.mjs +2 -0
  93. package/esm2022/src/lib/utils/models/autocomplete-field.config.mjs +2 -0
  94. package/esm2022/src/lib/utils/models/button.config.mjs +2 -0
  95. package/esm2022/src/lib/utils/models/checkbox-field.config.mjs +2 -0
  96. package/esm2022/src/lib/utils/models/crispr-field.config.mjs +23 -0
  97. package/esm2022/src/lib/utils/models/datepicker-field.config.mjs +2 -0
  98. package/esm2022/src/lib/utils/models/divider.config.mjs +2 -0
  99. package/esm2022/src/lib/utils/models/file-upload-field.config.mjs +2 -0
  100. package/esm2022/src/lib/utils/models/form-group-list.config.mjs +2 -0
  101. package/esm2022/src/lib/utils/models/heading.config.mjs +3 -0
  102. package/esm2022/src/lib/utils/models/image-upload-field.config.mjs +2 -0
  103. package/esm2022/src/lib/utils/models/index.mjs +18 -0
  104. package/esm2022/src/lib/utils/models/input-field.config.mjs +2 -0
  105. package/esm2022/src/lib/utils/models/radio-field.config.mjs +2 -0
  106. package/esm2022/src/lib/utils/models/select-field.config.mjs +2 -0
  107. package/esm2022/src/lib/utils/models/slider-field.config.mjs +2 -0
  108. package/esm2022/src/lib/utils/models/textarea-field.config.mjs +2 -0
  109. package/esm2022/src/lib/utils/models/unit-conversion-field.config.mjs +2 -0
  110. package/esm2022/src/lib/utils/operators/form.operators.mjs +24 -0
  111. package/esm2022/src/lib/utils/operators/index.mjs +2 -0
  112. package/esm2022/src/lib/utils/public-api.mjs +5 -0
  113. package/esm2022/src/lib/utils/tft-crispr-forms-src-lib-utils.mjs +5 -0
  114. package/{esm2020 → esm2022}/tft-crispr-forms.mjs +4 -4
  115. package/fesm2022/tft-crispr-forms-index-2dAn0905.mjs +19 -0
  116. package/fesm2022/tft-crispr-forms-index-2dAn0905.mjs.map +1 -0
  117. package/fesm2022/tft-crispr-forms-index-76UuF0AI.mjs +36 -0
  118. package/fesm2022/tft-crispr-forms-index-76UuF0AI.mjs.map +1 -0
  119. package/{fesm2020/tft-crispr-forms-ui-image-upload-field.mjs → fesm2022/tft-crispr-forms-index-BXwiulEX.mjs} +169 -169
  120. package/fesm2022/tft-crispr-forms-index-BXwiulEX.mjs.map +1 -0
  121. package/fesm2022/tft-crispr-forms-index-BfR4XbYi.mjs +110 -0
  122. package/fesm2022/tft-crispr-forms-index-BfR4XbYi.mjs.map +1 -0
  123. package/fesm2022/tft-crispr-forms-index-C5X0mk3N.mjs +49 -0
  124. package/fesm2022/tft-crispr-forms-index-C5X0mk3N.mjs.map +1 -0
  125. package/fesm2022/tft-crispr-forms-index-CFUop3Cq.mjs +80 -0
  126. package/fesm2022/tft-crispr-forms-index-CFUop3Cq.mjs.map +1 -0
  127. package/fesm2022/tft-crispr-forms-index-CFdMVgM0.mjs +91 -0
  128. package/fesm2022/tft-crispr-forms-index-CFdMVgM0.mjs.map +1 -0
  129. package/fesm2022/tft-crispr-forms-index-CZdi06Jj.mjs +49 -0
  130. package/fesm2022/tft-crispr-forms-index-CZdi06Jj.mjs.map +1 -0
  131. package/fesm2022/tft-crispr-forms-index-C_I9vjqf.mjs +57 -0
  132. package/fesm2022/tft-crispr-forms-index-C_I9vjqf.mjs.map +1 -0
  133. package/fesm2022/tft-crispr-forms-index-DE8VOdBd.mjs +102 -0
  134. package/fesm2022/tft-crispr-forms-index-DE8VOdBd.mjs.map +1 -0
  135. package/fesm2022/tft-crispr-forms-index-OLo2t0tl.mjs +48 -0
  136. package/fesm2022/tft-crispr-forms-index-OLo2t0tl.mjs.map +1 -0
  137. package/fesm2022/tft-crispr-forms-index-OT7kkOgd.mjs +50 -0
  138. package/fesm2022/tft-crispr-forms-index-OT7kkOgd.mjs.map +1 -0
  139. package/fesm2022/tft-crispr-forms-index-Ukk3WgS2.mjs +54 -0
  140. package/fesm2022/tft-crispr-forms-index-Ukk3WgS2.mjs.map +1 -0
  141. package/fesm2022/tft-crispr-forms-index-rRi6OMY6.mjs +142 -0
  142. package/fesm2022/tft-crispr-forms-index-rRi6OMY6.mjs.map +1 -0
  143. package/fesm2022/tft-crispr-forms-index-xAaInTLg.mjs +73 -0
  144. package/fesm2022/tft-crispr-forms-index-xAaInTLg.mjs.map +1 -0
  145. package/{fesm2020/tft-crispr-forms-utils.mjs → fesm2022/tft-crispr-forms-src-lib-utils.mjs} +242 -243
  146. package/fesm2022/tft-crispr-forms-src-lib-utils.mjs.map +1 -0
  147. package/fesm2022/tft-crispr-forms.mjs +848 -0
  148. package/fesm2022/tft-crispr-forms.mjs.map +1 -0
  149. package/index.d.ts +5 -5
  150. package/package.json +13 -191
  151. package/public-api.d.ts +3 -3
  152. package/src/index.d.ts +1 -1
  153. package/src/lib/crispr-forms.module.d.ts +16 -16
  154. package/src/lib/display-field.directive.d.ts +23 -23
  155. package/src/lib/field-component-map.const.d.ts +42 -42
  156. package/src/lib/field.directive.d.ts +24 -24
  157. package/src/lib/form/form.component.d.ts +19 -19
  158. package/src/lib/form-group-list/form-group-list.component.d.ts +40 -38
  159. package/src/lib/form-group-list/index.d.ts +1 -1
  160. package/src/lib/pipes/crispr-pipes.module.d.ts +8 -8
  161. package/src/lib/pipes/initial-control-value.pipe.d.ts +10 -10
  162. package/src/lib/public_api.d.ts +2 -2
  163. package/src/lib/sub-group/index.d.ts +2 -2
  164. package/src/lib/sub-group/sub-group.component.d.ts +24 -22
  165. package/src/lib/sub-group/sub-group.module.d.ts +12 -12
  166. package/{ui → src/lib/ui}/autocomplete-chiplist-field/autocomplete-chiplist-field.component.d.ts +36 -33
  167. package/src/lib/ui/autocomplete-chiplist-field/index.d.ts +1 -0
  168. package/{ui → src/lib/ui}/autocomplete-chiplist-field/public-api.d.ts +1 -1
  169. package/{ui → src/lib/ui}/autocomplete-field/autocomplete-field.component.d.ts +25 -25
  170. package/src/lib/ui/autocomplete-field/index.d.ts +1 -0
  171. package/{ui → src/lib/ui}/autocomplete-field/public-api.d.ts +1 -1
  172. package/{ui → src/lib/ui}/button/button.component.d.ts +15 -15
  173. package/src/lib/ui/button/index.d.ts +1 -0
  174. package/{ui → src/lib/ui}/button/public-api.d.ts +1 -1
  175. package/src/lib/ui/checkbox-field/checkbox-field.component.d.ts +23 -0
  176. package/src/lib/ui/checkbox-field/index.d.ts +1 -0
  177. package/{ui → src/lib/ui}/checkbox-field/public-api.d.ts +1 -1
  178. package/{ui → src/lib/ui}/datepicker-field/datepicker-field.component.d.ts +32 -30
  179. package/src/lib/ui/datepicker-field/index.d.ts +1 -0
  180. package/{ui → src/lib/ui}/datepicker-field/public-api.d.ts +1 -1
  181. package/{ui → src/lib/ui}/divider/divider.component.d.ts +9 -9
  182. package/src/lib/ui/divider/index.d.ts +1 -0
  183. package/{ui → src/lib/ui}/divider/public-api.d.ts +1 -1
  184. package/{ui → src/lib/ui}/field-container/field-container.component.d.ts +24 -24
  185. package/src/lib/ui/field-container/index.d.ts +1 -0
  186. package/{ui → src/lib/ui}/field-container/public-api.d.ts +1 -1
  187. package/{ui → src/lib/ui}/file-dropzone/file-dropzone.directive.d.ts +10 -10
  188. package/src/lib/ui/file-dropzone/index.d.ts +1 -0
  189. package/{ui → src/lib/ui}/file-dropzone/public-api.d.ts +1 -1
  190. package/{ui → src/lib/ui}/file-upload-field/file-upload-field.component.d.ts +39 -37
  191. package/src/lib/ui/file-upload-field/index.d.ts +1 -0
  192. package/{ui → src/lib/ui}/file-upload-field/public-api.d.ts +1 -1
  193. package/{ui → src/lib/ui}/heading/heading.component.d.ts +8 -8
  194. package/src/lib/ui/heading/index.d.ts +1 -0
  195. package/{ui → src/lib/ui}/heading/public-api.d.ts +1 -1
  196. package/{ui → src/lib/ui}/image-upload-field/image-upload-field.component.d.ts +50 -48
  197. package/src/lib/ui/image-upload-field/index.d.ts +1 -0
  198. package/{ui → src/lib/ui}/image-upload-field/public-api.d.ts +1 -1
  199. package/src/lib/ui/index.d.ts +1 -0
  200. package/src/lib/ui/info/index.d.ts +1 -0
  201. package/{ui → src/lib/ui}/info/info.component.d.ts +7 -7
  202. package/{ui → src/lib/ui}/info/public-api.d.ts +1 -1
  203. package/src/lib/ui/input-field/index.d.ts +1 -0
  204. package/src/lib/ui/input-field/input-field.component.d.ts +24 -0
  205. package/{ui → src/lib/ui}/input-field/public-api.d.ts +1 -1
  206. package/src/lib/ui/option/index.d.ts +1 -0
  207. package/{ui → src/lib/ui}/option/option.component.d.ts +7 -7
  208. package/{ui → src/lib/ui}/option/public-api.d.ts +1 -1
  209. package/src/lib/ui/public-api.d.ts +6 -0
  210. package/src/lib/ui/radio-field/index.d.ts +1 -0
  211. package/{ui → src/lib/ui}/radio-field/public-api.d.ts +1 -1
  212. package/src/lib/ui/radio-field/radio-field.component.d.ts +25 -0
  213. package/src/lib/ui/select-field/index.d.ts +1 -0
  214. package/{ui → src/lib/ui}/select-field/public-api.d.ts +1 -1
  215. package/{ui → src/lib/ui}/select-field/select-field.component.d.ts +34 -32
  216. package/src/lib/ui/selected-file/index.d.ts +1 -0
  217. package/{ui → src/lib/ui}/selected-file/public-api.d.ts +1 -1
  218. package/{ui → src/lib/ui}/selected-file/selected-file.component.d.ts +10 -10
  219. package/src/lib/ui/slider-field/index.d.ts +1 -0
  220. package/{ui → src/lib/ui}/slider-field/public-api.d.ts +1 -1
  221. package/src/lib/ui/slider-field/slider-field.component.d.ts +24 -0
  222. package/src/lib/ui/textarea-field/index.d.ts +1 -0
  223. package/{ui → src/lib/ui}/textarea-field/public-api.d.ts +1 -1
  224. package/src/lib/ui/textarea-field/textarea-field.component.d.ts +23 -0
  225. package/src/lib/ui/unit-conversion-field/index.d.ts +1 -0
  226. package/{ui → src/lib/ui}/unit-conversion-field/public-api.d.ts +1 -1
  227. package/{ui → src/lib/ui}/unit-conversion-field/unit-conversion-field.component.d.ts +38 -36
  228. package/{utils → src/lib/utils}/abstracts/autocomplete-field.abstract.d.ts +28 -28
  229. package/{utils → src/lib/utils}/abstracts/crispr-control.mixin.d.ts +16 -16
  230. package/{utils → src/lib/utils}/abstracts/crispr-display-field.abstract.d.ts +22 -22
  231. package/{utils → src/lib/utils}/abstracts/crispr-field.abstract.d.ts +11 -11
  232. package/{utils → src/lib/utils}/abstracts/index.d.ts +4 -4
  233. package/{utils → src/lib/utils}/functions/buildFormGroupFromConfig.d.ts +9 -9
  234. package/{utils → src/lib/utils}/functions/callOptionsIfFunction.d.ts +3 -3
  235. package/{utils → src/lib/utils}/functions/createControlForType.d.ts +9 -9
  236. package/{utils → src/lib/utils}/functions/filterOptionsByLabel.d.ts +7 -7
  237. package/{utils → src/lib/utils}/functions/image-compression.helpers.d.ts +5 -5
  238. package/{utils → src/lib/utils}/functions/index.d.ts +7 -7
  239. package/{utils → src/lib/utils}/functions/isControlConfig.d.ts +5 -5
  240. package/{utils → src/lib/utils}/functions/observablifyOptions.d.ts +12 -12
  241. package/{ui → src/lib/utils}/index.d.ts +5 -5
  242. package/{utils → src/lib/utils}/models/autocomplete-chiplist-field.config.d.ts +20 -20
  243. package/{utils → src/lib/utils}/models/autocomplete-field.config.d.ts +14 -14
  244. package/{utils → src/lib/utils}/models/button.config.d.ts +17 -17
  245. package/{utils → src/lib/utils}/models/checkbox-field.config.d.ts +6 -6
  246. package/{utils → src/lib/utils}/models/crispr-field.config.d.ts +97 -94
  247. package/{utils → src/lib/utils}/models/datepicker-field.config.d.ts +20 -20
  248. package/{utils → src/lib/utils}/models/divider.config.d.ts +5 -5
  249. package/{utils → src/lib/utils}/models/file-upload-field.config.d.ts +33 -33
  250. package/{utils → src/lib/utils}/models/form-group-list.config.d.ts +18 -18
  251. package/{utils → src/lib/utils}/models/heading.config.d.ts +6 -6
  252. package/{utils → src/lib/utils}/models/image-upload-field.config.d.ts +54 -54
  253. package/{utils → src/lib/utils}/models/index.d.ts +17 -17
  254. package/{utils → src/lib/utils}/models/input-field.config.d.ts +16 -16
  255. package/{utils → src/lib/utils}/models/radio-field.config.d.ts +6 -6
  256. package/{utils → src/lib/utils}/models/select-field.config.d.ts +21 -21
  257. package/{utils → src/lib/utils}/models/slider-field.config.d.ts +11 -13
  258. package/{utils → src/lib/utils}/models/textarea-field.config.d.ts +5 -5
  259. package/{utils → src/lib/utils}/models/unit-conversion-field.config.d.ts +30 -30
  260. package/{utils → src/lib/utils}/operators/form.operators.d.ts +1 -1
  261. package/{utils → src/lib/utils}/operators/index.d.ts +1 -1
  262. package/{utils → src/lib/utils}/public-api.d.ts +4 -4
  263. package/tft-crispr-forms-15.0.0.tgz +0 -0
  264. package/esm2020/public-api.mjs +0 -5
  265. package/esm2020/src/lib/crispr-forms.module.mjs +0 -60
  266. package/esm2020/src/lib/display-field.directive.mjs +0 -53
  267. package/esm2020/src/lib/field-component-map.const.mjs +0 -27
  268. package/esm2020/src/lib/field.directive.mjs +0 -69
  269. package/esm2020/src/lib/form/form.component.mjs +0 -63
  270. package/esm2020/src/lib/form-group-list/form-group-list.component.mjs +0 -99
  271. package/esm2020/src/lib/pipes/initial-control-value.pipe.mjs +0 -21
  272. package/esm2020/src/lib/sub-group/sub-group.component.mjs +0 -21
  273. package/esm2020/src/lib/sub-group/sub-group.module.mjs +0 -42
  274. package/esm2020/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +0 -130
  275. package/esm2020/ui/autocomplete-chiplist-field/public-api.mjs +0 -2
  276. package/esm2020/ui/autocomplete-chiplist-field/tft-crispr-forms-ui-autocomplete-chiplist-field.mjs +0 -5
  277. package/esm2020/ui/autocomplete-field/autocomplete-field.component.mjs +0 -93
  278. package/esm2020/ui/autocomplete-field/public-api.mjs +0 -2
  279. package/esm2020/ui/autocomplete-field/tft-crispr-forms-ui-autocomplete-field.mjs +0 -5
  280. package/esm2020/ui/button/button.component.mjs +0 -49
  281. package/esm2020/ui/button/public-api.mjs +0 -2
  282. package/esm2020/ui/button/tft-crispr-forms-ui-button.mjs +0 -5
  283. package/esm2020/ui/checkbox-field/checkbox-field.component.mjs +0 -42
  284. package/esm2020/ui/checkbox-field/public-api.mjs +0 -2
  285. package/esm2020/ui/checkbox-field/tft-crispr-forms-ui-checkbox-field.mjs +0 -5
  286. package/esm2020/ui/datepicker-field/datepicker-field.component.mjs +0 -63
  287. package/esm2020/ui/datepicker-field/public-api.mjs +0 -2
  288. package/esm2020/ui/datepicker-field/tft-crispr-forms-ui-datepicker-field.mjs +0 -5
  289. package/esm2020/ui/divider/divider.component.mjs +0 -28
  290. package/esm2020/ui/divider/public-api.mjs +0 -2
  291. package/esm2020/ui/divider/tft-crispr-forms-ui-divider.mjs +0 -5
  292. package/esm2020/ui/field-container/field-container.component.mjs +0 -58
  293. package/esm2020/ui/field-container/public-api.mjs +0 -2
  294. package/esm2020/ui/field-container/tft-crispr-forms-ui-field-container.mjs +0 -5
  295. package/esm2020/ui/file-dropzone/file-dropzone.directive.mjs +0 -40
  296. package/esm2020/ui/file-dropzone/public-api.mjs +0 -2
  297. package/esm2020/ui/file-dropzone/tft-crispr-forms-ui-file-dropzone.mjs +0 -5
  298. package/esm2020/ui/file-upload-field/file-upload-field.component.mjs +0 -108
  299. package/esm2020/ui/file-upload-field/public-api.mjs +0 -2
  300. package/esm2020/ui/file-upload-field/tft-crispr-forms-ui-file-upload-field.mjs +0 -5
  301. package/esm2020/ui/heading/heading.component.mjs +0 -31
  302. package/esm2020/ui/heading/public-api.mjs +0 -2
  303. package/esm2020/ui/heading/tft-crispr-forms-ui-heading.mjs +0 -5
  304. package/esm2020/ui/image-upload-field/image-upload-field.component.mjs +0 -179
  305. package/esm2020/ui/image-upload-field/public-api.mjs +0 -2
  306. package/esm2020/ui/image-upload-field/tft-crispr-forms-ui-image-upload-field.mjs +0 -5
  307. package/esm2020/ui/info/info.component.mjs +0 -23
  308. package/esm2020/ui/info/public-api.mjs +0 -2
  309. package/esm2020/ui/info/tft-crispr-forms-ui-info.mjs +0 -5
  310. package/esm2020/ui/input-field/input-field.component.mjs +0 -41
  311. package/esm2020/ui/input-field/public-api.mjs +0 -2
  312. package/esm2020/ui/input-field/tft-crispr-forms-ui-input-field.mjs +0 -5
  313. package/esm2020/ui/option/option.component.mjs +0 -19
  314. package/esm2020/ui/option/public-api.mjs +0 -2
  315. package/esm2020/ui/option/tft-crispr-forms-ui-option.mjs +0 -5
  316. package/esm2020/ui/public-api.mjs +0 -7
  317. package/esm2020/ui/radio-field/public-api.mjs +0 -2
  318. package/esm2020/ui/radio-field/radio-field.component.mjs +0 -39
  319. package/esm2020/ui/radio-field/tft-crispr-forms-ui-radio-field.mjs +0 -5
  320. package/esm2020/ui/select-field/public-api.mjs +0 -2
  321. package/esm2020/ui/select-field/select-field.component.mjs +0 -73
  322. package/esm2020/ui/select-field/tft-crispr-forms-ui-select-field.mjs +0 -5
  323. package/esm2020/ui/selected-file/public-api.mjs +0 -2
  324. package/esm2020/ui/selected-file/selected-file.component.mjs +0 -26
  325. package/esm2020/ui/selected-file/tft-crispr-forms-ui-selected-file.mjs +0 -5
  326. package/esm2020/ui/slider-field/public-api.mjs +0 -2
  327. package/esm2020/ui/slider-field/slider-field.component.mjs +0 -44
  328. package/esm2020/ui/slider-field/tft-crispr-forms-ui-slider-field.mjs +0 -5
  329. package/esm2020/ui/textarea-field/public-api.mjs +0 -2
  330. package/esm2020/ui/textarea-field/textarea-field.component.mjs +0 -42
  331. package/esm2020/ui/textarea-field/tft-crispr-forms-ui-textarea-field.mjs +0 -5
  332. package/esm2020/ui/tft-crispr-forms-ui.mjs +0 -5
  333. package/esm2020/ui/unit-conversion-field/public-api.mjs +0 -2
  334. package/esm2020/ui/unit-conversion-field/tft-crispr-forms-ui-unit-conversion-field.mjs +0 -5
  335. package/esm2020/ui/unit-conversion-field/unit-conversion-field.component.mjs +0 -84
  336. package/esm2020/utils/abstracts/autocomplete-field.abstract.mjs +0 -30
  337. package/esm2020/utils/abstracts/crispr-control.mixin.mjs +0 -27
  338. package/esm2020/utils/abstracts/crispr-display-field.abstract.mjs +0 -14
  339. package/esm2020/utils/abstracts/crispr-field.abstract.mjs +0 -20
  340. package/esm2020/utils/abstracts/index.mjs +0 -5
  341. package/esm2020/utils/functions/buildFormGroupFromConfig.mjs +0 -28
  342. package/esm2020/utils/functions/callOptionsIfFunction.mjs +0 -4
  343. package/esm2020/utils/functions/createControlForType.mjs +0 -19
  344. package/esm2020/utils/functions/filterOptionsByLabel.mjs +0 -11
  345. package/esm2020/utils/functions/image-compression.helpers.mjs +0 -50
  346. package/esm2020/utils/functions/index.mjs +0 -8
  347. package/esm2020/utils/functions/isControlConfig.mjs +0 -7
  348. package/esm2020/utils/functions/observablifyOptions.mjs +0 -29
  349. package/esm2020/utils/models/autocomplete-chiplist-field.config.mjs +0 -2
  350. package/esm2020/utils/models/autocomplete-field.config.mjs +0 -2
  351. package/esm2020/utils/models/button.config.mjs +0 -2
  352. package/esm2020/utils/models/checkbox-field.config.mjs +0 -2
  353. package/esm2020/utils/models/crispr-field.config.mjs +0 -23
  354. package/esm2020/utils/models/datepicker-field.config.mjs +0 -2
  355. package/esm2020/utils/models/divider.config.mjs +0 -2
  356. package/esm2020/utils/models/file-upload-field.config.mjs +0 -2
  357. package/esm2020/utils/models/form-group-list.config.mjs +0 -2
  358. package/esm2020/utils/models/heading.config.mjs +0 -3
  359. package/esm2020/utils/models/image-upload-field.config.mjs +0 -2
  360. package/esm2020/utils/models/index.mjs +0 -18
  361. package/esm2020/utils/models/input-field.config.mjs +0 -2
  362. package/esm2020/utils/models/radio-field.config.mjs +0 -2
  363. package/esm2020/utils/models/select-field.config.mjs +0 -2
  364. package/esm2020/utils/models/slider-field.config.mjs +0 -2
  365. package/esm2020/utils/models/textarea-field.config.mjs +0 -2
  366. package/esm2020/utils/models/unit-conversion-field.config.mjs +0 -2
  367. package/esm2020/utils/operators/form.operators.mjs +0 -24
  368. package/esm2020/utils/operators/index.mjs +0 -2
  369. package/esm2020/utils/public-api.mjs +0 -5
  370. package/esm2020/utils/tft-crispr-forms-utils.mjs +0 -5
  371. package/fesm2015/tft-crispr-forms-ui-autocomplete-chiplist-field.mjs +0 -138
  372. package/fesm2015/tft-crispr-forms-ui-autocomplete-chiplist-field.mjs.map +0 -1
  373. package/fesm2015/tft-crispr-forms-ui-autocomplete-field.mjs +0 -101
  374. package/fesm2015/tft-crispr-forms-ui-autocomplete-field.mjs.map +0 -1
  375. package/fesm2015/tft-crispr-forms-ui-button.mjs +0 -55
  376. package/fesm2015/tft-crispr-forms-ui-button.mjs.map +0 -1
  377. package/fesm2015/tft-crispr-forms-ui-checkbox-field.mjs +0 -49
  378. package/fesm2015/tft-crispr-forms-ui-checkbox-field.mjs.map +0 -1
  379. package/fesm2015/tft-crispr-forms-ui-datepicker-field.mjs +0 -71
  380. package/fesm2015/tft-crispr-forms-ui-datepicker-field.mjs.map +0 -1
  381. package/fesm2015/tft-crispr-forms-ui-divider.mjs +0 -34
  382. package/fesm2015/tft-crispr-forms-ui-divider.mjs.map +0 -1
  383. package/fesm2015/tft-crispr-forms-ui-field-container.mjs +0 -64
  384. package/fesm2015/tft-crispr-forms-ui-field-container.mjs.map +0 -1
  385. package/fesm2015/tft-crispr-forms-ui-file-dropzone.mjs +0 -47
  386. package/fesm2015/tft-crispr-forms-ui-file-dropzone.mjs.map +0 -1
  387. package/fesm2015/tft-crispr-forms-ui-file-upload-field.mjs +0 -117
  388. package/fesm2015/tft-crispr-forms-ui-file-upload-field.mjs.map +0 -1
  389. package/fesm2015/tft-crispr-forms-ui-heading.mjs +0 -37
  390. package/fesm2015/tft-crispr-forms-ui-heading.mjs.map +0 -1
  391. package/fesm2015/tft-crispr-forms-ui-image-upload-field.mjs +0 -182
  392. package/fesm2015/tft-crispr-forms-ui-image-upload-field.mjs.map +0 -1
  393. package/fesm2015/tft-crispr-forms-ui-info.mjs +0 -30
  394. package/fesm2015/tft-crispr-forms-ui-info.mjs.map +0 -1
  395. package/fesm2015/tft-crispr-forms-ui-input-field.mjs +0 -48
  396. package/fesm2015/tft-crispr-forms-ui-input-field.mjs.map +0 -1
  397. package/fesm2015/tft-crispr-forms-ui-option.mjs +0 -26
  398. package/fesm2015/tft-crispr-forms-ui-option.mjs.map +0 -1
  399. package/fesm2015/tft-crispr-forms-ui-radio-field.mjs +0 -46
  400. package/fesm2015/tft-crispr-forms-ui-radio-field.mjs.map +0 -1
  401. package/fesm2015/tft-crispr-forms-ui-select-field.mjs +0 -81
  402. package/fesm2015/tft-crispr-forms-ui-select-field.mjs.map +0 -1
  403. package/fesm2015/tft-crispr-forms-ui-selected-file.mjs +0 -33
  404. package/fesm2015/tft-crispr-forms-ui-selected-file.mjs.map +0 -1
  405. package/fesm2015/tft-crispr-forms-ui-slider-field.mjs +0 -51
  406. package/fesm2015/tft-crispr-forms-ui-slider-field.mjs.map +0 -1
  407. package/fesm2015/tft-crispr-forms-ui-textarea-field.mjs +0 -49
  408. package/fesm2015/tft-crispr-forms-ui-textarea-field.mjs.map +0 -1
  409. package/fesm2015/tft-crispr-forms-ui-unit-conversion-field.mjs +0 -93
  410. package/fesm2015/tft-crispr-forms-ui-unit-conversion-field.mjs.map +0 -1
  411. package/fesm2015/tft-crispr-forms-ui.mjs +0 -12
  412. package/fesm2015/tft-crispr-forms-ui.mjs.map +0 -1
  413. package/fesm2015/tft-crispr-forms-utils.mjs +0 -280
  414. package/fesm2015/tft-crispr-forms-utils.mjs.map +0 -1
  415. package/fesm2015/tft-crispr-forms.mjs +0 -438
  416. package/fesm2015/tft-crispr-forms.mjs.map +0 -1
  417. package/fesm2020/tft-crispr-forms-ui-autocomplete-chiplist-field.mjs +0 -137
  418. package/fesm2020/tft-crispr-forms-ui-autocomplete-chiplist-field.mjs.map +0 -1
  419. package/fesm2020/tft-crispr-forms-ui-autocomplete-field.mjs +0 -100
  420. package/fesm2020/tft-crispr-forms-ui-autocomplete-field.mjs.map +0 -1
  421. package/fesm2020/tft-crispr-forms-ui-button.mjs +0 -55
  422. package/fesm2020/tft-crispr-forms-ui-button.mjs.map +0 -1
  423. package/fesm2020/tft-crispr-forms-ui-checkbox-field.mjs +0 -49
  424. package/fesm2020/tft-crispr-forms-ui-checkbox-field.mjs.map +0 -1
  425. package/fesm2020/tft-crispr-forms-ui-datepicker-field.mjs +0 -70
  426. package/fesm2020/tft-crispr-forms-ui-datepicker-field.mjs.map +0 -1
  427. package/fesm2020/tft-crispr-forms-ui-divider.mjs +0 -34
  428. package/fesm2020/tft-crispr-forms-ui-divider.mjs.map +0 -1
  429. package/fesm2020/tft-crispr-forms-ui-field-container.mjs +0 -65
  430. package/fesm2020/tft-crispr-forms-ui-field-container.mjs.map +0 -1
  431. package/fesm2020/tft-crispr-forms-ui-file-dropzone.mjs +0 -47
  432. package/fesm2020/tft-crispr-forms-ui-file-dropzone.mjs.map +0 -1
  433. package/fesm2020/tft-crispr-forms-ui-file-upload-field.mjs +0 -115
  434. package/fesm2020/tft-crispr-forms-ui-file-upload-field.mjs.map +0 -1
  435. package/fesm2020/tft-crispr-forms-ui-heading.mjs +0 -37
  436. package/fesm2020/tft-crispr-forms-ui-heading.mjs.map +0 -1
  437. package/fesm2020/tft-crispr-forms-ui-image-upload-field.mjs.map +0 -1
  438. package/fesm2020/tft-crispr-forms-ui-info.mjs +0 -30
  439. package/fesm2020/tft-crispr-forms-ui-info.mjs.map +0 -1
  440. package/fesm2020/tft-crispr-forms-ui-input-field.mjs +0 -48
  441. package/fesm2020/tft-crispr-forms-ui-input-field.mjs.map +0 -1
  442. package/fesm2020/tft-crispr-forms-ui-option.mjs +0 -26
  443. package/fesm2020/tft-crispr-forms-ui-option.mjs.map +0 -1
  444. package/fesm2020/tft-crispr-forms-ui-radio-field.mjs +0 -46
  445. package/fesm2020/tft-crispr-forms-ui-radio-field.mjs.map +0 -1
  446. package/fesm2020/tft-crispr-forms-ui-select-field.mjs +0 -80
  447. package/fesm2020/tft-crispr-forms-ui-select-field.mjs.map +0 -1
  448. package/fesm2020/tft-crispr-forms-ui-selected-file.mjs +0 -33
  449. package/fesm2020/tft-crispr-forms-ui-selected-file.mjs.map +0 -1
  450. package/fesm2020/tft-crispr-forms-ui-slider-field.mjs +0 -51
  451. package/fesm2020/tft-crispr-forms-ui-slider-field.mjs.map +0 -1
  452. package/fesm2020/tft-crispr-forms-ui-textarea-field.mjs +0 -49
  453. package/fesm2020/tft-crispr-forms-ui-textarea-field.mjs.map +0 -1
  454. package/fesm2020/tft-crispr-forms-ui-unit-conversion-field.mjs +0 -91
  455. package/fesm2020/tft-crispr-forms-ui-unit-conversion-field.mjs.map +0 -1
  456. package/fesm2020/tft-crispr-forms-ui.mjs +0 -12
  457. package/fesm2020/tft-crispr-forms-ui.mjs.map +0 -1
  458. package/fesm2020/tft-crispr-forms-utils.mjs.map +0 -1
  459. package/fesm2020/tft-crispr-forms.mjs +0 -434
  460. package/fesm2020/tft-crispr-forms.mjs.map +0 -1
  461. package/tft-crispr-forms-14.0.2.tgz +0 -0
  462. package/ui/README.md +0 -3
  463. package/ui/autocomplete-chiplist-field/index.d.ts +0 -5
  464. package/ui/autocomplete-field/index.d.ts +0 -5
  465. package/ui/button/index.d.ts +0 -5
  466. package/ui/checkbox-field/checkbox-field.component.d.ts +0 -21
  467. package/ui/checkbox-field/index.d.ts +0 -5
  468. package/ui/datepicker-field/index.d.ts +0 -5
  469. package/ui/divider/index.d.ts +0 -5
  470. package/ui/field-container/index.d.ts +0 -5
  471. package/ui/file-dropzone/index.d.ts +0 -5
  472. package/ui/file-upload-field/index.d.ts +0 -5
  473. package/ui/heading/index.d.ts +0 -5
  474. package/ui/image-upload-field/index.d.ts +0 -5
  475. package/ui/info/index.d.ts +0 -5
  476. package/ui/input-field/index.d.ts +0 -5
  477. package/ui/input-field/input-field.component.d.ts +0 -22
  478. package/ui/option/index.d.ts +0 -5
  479. package/ui/public-api.d.ts +0 -5
  480. package/ui/radio-field/index.d.ts +0 -5
  481. package/ui/radio-field/radio-field.component.d.ts +0 -23
  482. package/ui/select-field/index.d.ts +0 -5
  483. package/ui/selected-file/index.d.ts +0 -5
  484. package/ui/slider-field/index.d.ts +0 -5
  485. package/ui/slider-field/slider-field.component.d.ts +0 -25
  486. package/ui/textarea-field/index.d.ts +0 -5
  487. package/ui/textarea-field/textarea-field.component.d.ts +0 -21
  488. package/ui/unit-conversion-field/index.d.ts +0 -5
  489. package/utils/index.d.ts +0 -5
  490. /package/{utils → src/lib/utils}/README.md +0 -0
@@ -0,0 +1,848 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Input, Pipe, NgModule, EventEmitter, Component, Output, ViewChild, HostListener, ChangeDetectionStrategy } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i2 from '@angular/forms';
6
+ import { FormArray, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
7
+ import * as i7 from '@tft/form-validation-handler';
8
+ import { FormValidationHandlerModule } from '@tft/form-validation-handler';
9
+ import { from, of, isObservable } from 'rxjs';
10
+ import { map, startWith, debounceTime, distinctUntilChanged, switchMap, shareReplay, tap } from 'rxjs/operators';
11
+ import * as i2$2 from '@angular/material/button';
12
+ import { MatButtonModule } from '@angular/material/button';
13
+ import * as i3 from '@angular/material/icon';
14
+ import { MatIconModule } from '@angular/material/icon';
15
+ import * as i2$1 from '@angular/material/progress-bar';
16
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
17
+ import * as i3$2 from '@angular/material/form-field';
18
+ import { MatFormFieldModule } from '@angular/material/form-field';
19
+ import * as i3$1 from '@angular/material/tooltip';
20
+ import { MatTooltipModule } from '@angular/material/tooltip';
21
+
22
+ function valueIn(values) {
23
+ return map((value) => {
24
+ if (value) {
25
+ return values.some(v => {
26
+ if (isRegex(v)) {
27
+ const trimmedStringForRegex = v.substr(1, v.length - 2);
28
+ const regex = new RegExp(trimmedStringForRegex);
29
+ return regex.test(value);
30
+ }
31
+ else {
32
+ return v === value;
33
+ }
34
+ });
35
+ }
36
+ else {
37
+ return false;
38
+ }
39
+ });
40
+ }
41
+ function isRegex(string) {
42
+ return string.startsWith('/') && string.endsWith('/');
43
+ }
44
+
45
+ const DEFAULT_EMPTY_OPTIONS_MESSAGE = 'No Items';
46
+
47
+ // export type ControlType = keyof typeof FIELD_COMPONENTS;
48
+ var ControlType;
49
+ (function (ControlType) {
50
+ ControlType["AUTOCOMPLETE"] = "autocomplete";
51
+ ControlType["AUTOCOMPLETE_CHIPLIST"] = "autocompleteChiplist";
52
+ ControlType["BUTTON"] = "button";
53
+ ControlType["CHECKBOX"] = "checkbox";
54
+ ControlType["CUSTOM"] = "custom";
55
+ ControlType["DATEPICKER"] = "datepicker";
56
+ ControlType["DIVIDER"] = "divider";
57
+ ControlType["FILE_UPLOAD"] = "fileUpload";
58
+ ControlType["HEADING"] = "heading";
59
+ ControlType["INPUT"] = "input";
60
+ ControlType["IMAGE_UPLOAD"] = "imageUpload";
61
+ ControlType["GROUP_LIST"] = "groupList";
62
+ ControlType["RADIO"] = "radio";
63
+ ControlType["SELECT"] = "select";
64
+ ControlType["SLIDER"] = "slider";
65
+ ControlType["SUB_GROUP"] = "subGroup";
66
+ ControlType["TEXTAREA"] = "textarea";
67
+ ControlType["UNIT_CONVERSION"] = "unitConversion";
68
+ })(ControlType || (ControlType = {}));
69
+
70
+ ;
71
+
72
+ function crisprControlMixin(BaseClass) {
73
+ return class extends BaseClass {
74
+ set value(value) {
75
+ this.setControlValue(value);
76
+ this._value = value;
77
+ }
78
+ get value() {
79
+ return this._value;
80
+ }
81
+ ngOnInit() {
82
+ super.ngOnInit();
83
+ this.control = this.group.get(this.config.controlName);
84
+ this.setControlValue(this.value);
85
+ // setTimeouts are ugly but this seems to be the only way to get the computed field to compute initial values
86
+ setTimeout(() => {
87
+ this.control.updateValueAndValidity();
88
+ });
89
+ }
90
+ setControlValue(value) {
91
+ if (value && this.control && this.config.controlType !== ControlType.SUB_GROUP) {
92
+ this.control.setValue(value);
93
+ }
94
+ }
95
+ };
96
+ }
97
+
98
+ class CrisprFieldComponent {
99
+ ngOnInit() {
100
+ this.applyDefaultConfig();
101
+ }
102
+ applyDefaultConfig() {
103
+ this.config = this.defaultConfig ? { ...this.defaultConfig, ...this.config } : this.config;
104
+ }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
106
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.9", type: CrisprFieldComponent, isStandalone: true, ngImport: i0 }); }
107
+ }
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFieldComponent, decorators: [{
109
+ type: Directive,
110
+ args: [{
111
+ standalone: true
112
+ }]
113
+ }] });
114
+
115
+ /**
116
+ * Analyze the config and build a form control to spec. Notice we don't use FormBuilder here
117
+ * as we want to keep this function pure.
118
+ * @param controlConfig the configuration object for the control to build
119
+ * @param value an initial value to use if passed in
120
+ */
121
+ function createControlForType(controlConfig, value = null) {
122
+ // build form control out based on the control type
123
+ const control = controlConfig.controlType === ControlType.SUB_GROUP
124
+ ? buildFormGroupFromConfig(controlConfig, value)
125
+ : controlConfig.controlType === ControlType.GROUP_LIST
126
+ ? new FormArray([], controlConfig.validators)
127
+ : new FormControl(value || null, controlConfig.validators);
128
+ return control;
129
+ }
130
+
131
+ /**
132
+ * Determines if the field config is for a form control (not a divider, heading or other non-control field)
133
+ */
134
+ function isControlConfig(fieldConfig) {
135
+ return 'controlName' in fieldConfig;
136
+ }
137
+
138
+ /**
139
+ * builds out form group based on config
140
+ * @param config a configuration for a form group
141
+ * @param value an object of initial values to pass in
142
+ * @param group the form group to modify and build out
143
+ */
144
+ function buildFormGroupFromConfig(config, value = null, group = new FormGroup({})) {
145
+ config.fields.forEach((controlConfig) => {
146
+ if (isControlConfig(controlConfig)) {
147
+ // then add a control to the group using the controlName from configuration
148
+ const { controlName } = controlConfig;
149
+ if (group.get(controlName)) {
150
+ group.removeControl(controlName);
151
+ }
152
+ // if there's a value object and it has a non-null/undefined value for this field use it.
153
+ // Otherwise, default to null
154
+ const controlValue = (value && value[controlName]) ?? null;
155
+ const control = createControlForType(controlConfig, controlValue);
156
+ group.addControl(controlName, control);
157
+ }
158
+ });
159
+ group.setValidators(config.validators);
160
+ return group;
161
+ }
162
+
163
+ function callOptionsIfFunction(options, parentGroup, searchString) {
164
+ return options instanceof Function ? options(parentGroup, searchString) : options;
165
+ }
166
+
167
+ /**
168
+ * A basic filter function that filters the search string against the label of the options object
169
+ * @param options the array of options to filter
170
+ * @param searchString the string from the input
171
+ */
172
+ function filterOptionsByLabel(options, searchString) {
173
+ return options.filter(option => {
174
+ return option.label && option.label.toLowerCase().includes(searchString.toLowerCase());
175
+ });
176
+ }
177
+
178
+ /**
179
+ * The user can give us select options as an array, a function that resolves to a promise,
180
+ * or an observable. This functions consumes any of those and returns an observable that
181
+ * resolves an array of options
182
+ *
183
+ * @param options the options passed in from the config
184
+ * @param emptyMessageOption the message to display when the array is empty
185
+ */
186
+ function observablifyOptions(options, parentGroup, searchString) {
187
+ const calledOptions = callOptionsIfFunction(options, parentGroup, searchString);
188
+ // if options are a promise
189
+ const observableOptions = calledOptions instanceof Promise
190
+ // convert to observable
191
+ ? from(calledOptions)
192
+ // if array that isn't empty
193
+ : Array.isArray(calledOptions) && calledOptions.length
194
+ // convert to observable
195
+ ? of(calledOptions)
196
+ // if observable
197
+ : isObservable(calledOptions)
198
+ // return it
199
+ ? calledOptions
200
+ // else an empty array
201
+ : of([]);
202
+ return observableOptions;
203
+ }
204
+
205
+ function convertBytesToMb(bytes) {
206
+ return bytes / 1048576;
207
+ }
208
+ function maxFileSizeValidator(maxFileSize) {
209
+ return (control) => {
210
+ const controlValue = control.value;
211
+ if (!(controlValue instanceof File)) {
212
+ return null;
213
+ }
214
+ const actualFileSize = +convertBytesToMb(controlValue.size).toPrecision(3);
215
+ if (maxFileSize > actualFileSize)
216
+ return null;
217
+ return { maxFileSize: { maxFileSize, actualFileSize } };
218
+ };
219
+ }
220
+ function allowedFileExtValidator(allowedFileExtensions, onlyAllowFiles = true) {
221
+ return (control) => {
222
+ const controlValue = control.value;
223
+ const isFile = controlValue instanceof File;
224
+ if (!onlyAllowFiles && !isFile)
225
+ return null;
226
+ const actualExtension = isFile ? controlValue.name.split('.').pop().toLocaleLowerCase() : 'Not a file';
227
+ const isAllowedExtension = allowedFileExtensions.includes(actualExtension);
228
+ if (isAllowedExtension) {
229
+ return null;
230
+ }
231
+ return { allowedExtension: { allowedFileExtensions, actualExtension } };
232
+ };
233
+ }
234
+ function allowedFileType(matchExp) {
235
+ return (formControl) => {
236
+ const value = formControl.value;
237
+ if (!(value instanceof File))
238
+ return null;
239
+ const type = value.type;
240
+ const matches = type.match(matchExp);
241
+ if (!type || !matches?.length) {
242
+ return {
243
+ allowedFileType: {
244
+ actualType: type,
245
+ allowedTypeExp: matchExp
246
+ }
247
+ };
248
+ }
249
+ else {
250
+ return null;
251
+ }
252
+ };
253
+ }
254
+
255
+ const AbstractAutocompleteFieldMixin = crisprControlMixin(CrisprFieldComponent);
256
+ // eslint-disable-next-line @angular-eslint/directive-class-suffix
257
+ class AbstractAutocompleteComponent extends AbstractAutocompleteFieldMixin {
258
+ constructor() {
259
+ super(...arguments);
260
+ // we need a separate control for the UI because of the way the material autocomplete chiplist works
261
+ this.autocompleteInputControl = new FormControl('');
262
+ }
263
+ ngOnInit() {
264
+ super.ngOnInit();
265
+ this.group.addControl(this.config.controlName, new FormControl());
266
+ // filter options by the search string using either the default filter function or one passed in through config
267
+ this.options$ = this.autocompleteInputControl.valueChanges.pipe(
268
+ // this is needed to have the options panel to open on focus
269
+ startWith(''), debounceTime(this.config.typeDebounceTime), map((searchText) => typeof searchText === 'string' ? searchText?.trim() : ''), distinctUntilChanged(), switchMap((searchText) => observablifyOptions(this.config.options, this.group, searchText)), shareReplay(1));
270
+ }
271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AbstractAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
272
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.9", type: AbstractAutocompleteComponent, usesInheritance: true, ngImport: i0 }); }
273
+ }
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: AbstractAutocompleteComponent, decorators: [{
275
+ type: Directive
276
+ }] });
277
+
278
+ const CrisprDisplayFieldMixin = crisprControlMixin(CrisprFieldComponent);
279
+ // eslint-disable-next-line @angular-eslint/directive-class-suffix
280
+ class CrisprDisplayFieldComponent extends CrisprDisplayFieldMixin {
281
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprDisplayFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
282
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.9", type: CrisprDisplayFieldComponent, usesInheritance: true, ngImport: i0 }); }
283
+ }
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprDisplayFieldComponent, decorators: [{
285
+ type: Directive
286
+ }] });
287
+
288
+ const FIELD_COMPONENTS = {
289
+ groupList: () => Promise.resolve().then(function () { return index$1; }).then(({ FormGroupListComponent }) => FormGroupListComponent),
290
+ subGroup: () => Promise.resolve().then(function () { return index; }).then(({ SubGroupComponent }) => SubGroupComponent),
291
+ button: () => import('./tft-crispr-forms-index-C_I9vjqf.mjs').then(({ ButtonComponent }) => ButtonComponent),
292
+ input: () => import('./tft-crispr-forms-index-C5X0mk3N.mjs').then(({ InputFieldComponent }) => InputFieldComponent),
293
+ select: () => import('./tft-crispr-forms-index-CFUop3Cq.mjs').then(({ SelectFieldComponent }) => SelectFieldComponent),
294
+ radio: () => import('./tft-crispr-forms-index-OLo2t0tl.mjs').then(({ RadioFieldComponent }) => RadioFieldComponent),
295
+ autocomplete: () => import('./tft-crispr-forms-index-DE8VOdBd.mjs').then(({ AutocompleteFieldComponent }) => AutocompleteFieldComponent),
296
+ autocompleteChiplist: () => import('./tft-crispr-forms-index-rRi6OMY6.mjs').then(({ AutocompleteChiplistFieldComponent }) => AutocompleteChiplistFieldComponent),
297
+ textarea: () => import('./tft-crispr-forms-index-CZdi06Jj.mjs').then(({ TextareaFieldComponent }) => TextareaFieldComponent),
298
+ checkbox: () => import('./tft-crispr-forms-index-OT7kkOgd.mjs').then(({ CheckboxFieldComponent }) => CheckboxFieldComponent),
299
+ slider: () => import('./tft-crispr-forms-index-Ukk3WgS2.mjs').then(({ SliderFieldComponent }) => SliderFieldComponent),
300
+ datepicker: () => import('./tft-crispr-forms-index-xAaInTLg.mjs').then(({ DatepickerFieldComponent }) => DatepickerFieldComponent),
301
+ fileUpload: () => import('./tft-crispr-forms-index-BfR4XbYi.mjs').then(({ FileUploadFieldComponent }) => FileUploadFieldComponent),
302
+ imageUpload: () => import('./tft-crispr-forms-index-BXwiulEX.mjs').then(({ ImageUploadFieldComponent }) => ImageUploadFieldComponent),
303
+ heading: () => Promise.resolve().then(function () { return index$2; }).then(({ HeadingComponent }) => HeadingComponent),
304
+ divider: () => import('./tft-crispr-forms-index-76UuF0AI.mjs').then(({ DividerComponent }) => DividerComponent),
305
+ unitConversion: () => import('./tft-crispr-forms-index-CFdMVgM0.mjs').then(({ UnitConversionFieldComponent }) => UnitConversionFieldComponent),
306
+ };
307
+ function isControlComponent(component) {
308
+ return component && isControlConfig(component.config) && 'value' in component; // || component.config.controlType === ControlType.BUTTON;
309
+ }
310
+ function isControlOrButtonComponent(component) {
311
+ return (isControlComponent(component) ||
312
+ component.config.controlType === ControlType.BUTTON);
313
+ }
314
+
315
+ class CrisprFieldDirective {
316
+ set value(value) {
317
+ this._value = value;
318
+ // This is needed to keep the group list from resetting control values to the initial input value
319
+ this.updateComponentValue(value);
320
+ }
321
+ get value() {
322
+ return this._value;
323
+ }
324
+ constructor(container, renderer, cdr) {
325
+ this.container = container;
326
+ this.renderer = renderer;
327
+ this.cdr = cdr;
328
+ }
329
+ async ngOnInit() {
330
+ /**
331
+ * create component and set values from config on its instance
332
+ */
333
+ const component = this.config.component ||
334
+ (await FIELD_COMPONENTS[this.config.controlType]());
335
+ const componentRef = this.container.createComponent(component);
336
+ this.component = componentRef.instance;
337
+ this.component.config = this.config;
338
+ if (isControlOrButtonComponent(this.component)) {
339
+ this.component.group = this.group;
340
+ }
341
+ this.updateComponentValue(this.value);
342
+ // adds any config classes to the dynamically generated component
343
+ // doing this here keeps us from having to extend a base component into each field component individually
344
+ if (!this.config.classes)
345
+ return;
346
+ this.config.classes.forEach((klass) => {
347
+ // check for passing multiple classes in one array element
348
+ if (klass.includes(' ')) {
349
+ throw Error(`Improperly formatted class. '${klass}' cannot contain spaces.`);
350
+ }
351
+ else {
352
+ this.renderer.addClass(componentRef.location.nativeElement, klass);
353
+ }
354
+ });
355
+ }
356
+ updateComponentValue(value) {
357
+ if (isControlComponent(this.component)) {
358
+ this.component.value = value;
359
+ // SubGroups won't populate without this detectChanges
360
+ this.cdr.detectChanges();
361
+ }
362
+ }
363
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFieldDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
364
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.9", type: CrisprFieldDirective, isStandalone: true, selector: "[crisprField]", inputs: { config: "config", group: "group", value: "value" }, ngImport: i0 }); }
365
+ }
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFieldDirective, decorators: [{
367
+ type: Directive,
368
+ args: [{
369
+ selector: '[crisprField]',
370
+ standalone: true,
371
+ }]
372
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }], propDecorators: { config: [{
373
+ type: Input
374
+ }], group: [{
375
+ type: Input
376
+ }], value: [{
377
+ type: Input
378
+ }] } });
379
+
380
+ class InitialControlValuePipe {
381
+ // TODO: does changing any to unknown break anything?
382
+ transform(initialFormValue, fieldConfig) {
383
+ return initialFormValue && isControlConfig(fieldConfig)
384
+ ? initialFormValue[fieldConfig.controlName] || null
385
+ : null;
386
+ }
387
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: InitialControlValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
388
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: InitialControlValuePipe, name: "initialControlValue" }); }
389
+ }
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: InitialControlValuePipe, decorators: [{
391
+ type: Pipe,
392
+ args: [{
393
+ name: 'initialControlValue',
394
+ }]
395
+ }] });
396
+
397
+ class CrisprPipesModule {
398
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
399
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: CrisprPipesModule, declarations: [InitialControlValuePipe], imports: [CommonModule], exports: [InitialControlValuePipe] }); }
400
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprPipesModule, imports: [CommonModule] }); }
401
+ }
402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprPipesModule, decorators: [{
403
+ type: NgModule,
404
+ args: [{
405
+ imports: [
406
+ CommonModule
407
+ ],
408
+ exports: [
409
+ InitialControlValuePipe
410
+ ],
411
+ declarations: [
412
+ InitialControlValuePipe
413
+ ]
414
+ }]
415
+ }] });
416
+
417
+ class CrisprFormComponent {
418
+ constructor() {
419
+ this.form = new FormGroup({});
420
+ this.value = null;
421
+ this.submitted = new EventEmitter();
422
+ // proxy value and status change events through to consuming component
423
+ this.valueChanges = this.form.valueChanges;
424
+ this.statusChanges = this.form.statusChanges;
425
+ }
426
+ ngOnInit() {
427
+ // build out the form, note that we pass in the form as the third argument and the function modifies it
428
+ buildFormGroupFromConfig(this.config, this.value, this.form);
429
+ }
430
+ handleSubmit() {
431
+ this.form.markAllAsTouched();
432
+ this.submitted.emit(this.form);
433
+ }
434
+ triggerSubmit() {
435
+ this.submitTrigger.nativeElement.click();
436
+ }
437
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
438
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: CrisprFormComponent, isStandalone: true, selector: "crispr-form", inputs: { config: "config", form: "form", value: "value" }, outputs: { submitted: "submitted", valueChanges: "valueChanges", statusChanges: "statusChanges" }, viewQueries: [{ propertyName: "submitTrigger", first: true, predicate: ["submitTrigger"], descendants: true }], ngImport: i0, template: "<form\n class=\"crispr-form\"\n [ngClass]=\"config.classes\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleSubmit()\"\n [autocomplete]=\"config.autocomplete || 'off'\"\n [errorDictionary]=\"config.errorDictionary\"\n #ngFormElement=\"ngForm\">\n\n <ng-container\n *ngFor=\"let field of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"form\">\n </ng-container>\n <!-- Hidden button, programmatically clicked when crispr form triggerSubmit function called.\n Uses a hidden button with type=\"submit\" because it will trigger both native form submit event\n (which the error handler has to listen for) and ngSubmit event -->\n <button #submitTrigger class=\"submit-trigger\" type=\"submit\">\n </button>\n</form>\n", styles: [".submit-trigger{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: CrisprFieldDirective, selector: "[crisprField]", inputs: ["config", "group", "value"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorsFormDirective, selector: "form", inputs: ["errorDictionary"] }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }, { kind: "ngmodule", type: CrisprPipesModule }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }], preserveWhitespaces: true }); }
439
+ }
440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFormComponent, decorators: [{
441
+ type: Component,
442
+ args: [{ selector: 'crispr-form', standalone: true, imports: [
443
+ CommonModule,
444
+ CrisprFieldDirective,
445
+ ReactiveFormsModule,
446
+ FormValidationHandlerModule,
447
+ CrisprPipesModule,
448
+ ], template: "<form\n class=\"crispr-form\"\n [ngClass]=\"config.classes\"\n [formGroup]=\"form\"\n (ngSubmit)=\"handleSubmit()\"\n [autocomplete]=\"config.autocomplete || 'off'\"\n [errorDictionary]=\"config.errorDictionary\"\n #ngFormElement=\"ngForm\">\n\n <ng-container\n *ngFor=\"let field of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"form\">\n </ng-container>\n <!-- Hidden button, programmatically clicked when crispr form triggerSubmit function called.\n Uses a hidden button with type=\"submit\" because it will trigger both native form submit event\n (which the error handler has to listen for) and ngSubmit event -->\n <button #submitTrigger class=\"submit-trigger\" type=\"submit\">\n </button>\n</form>\n", styles: [".submit-trigger{display:none}\n"] }]
449
+ }], propDecorators: { config: [{
450
+ type: Input
451
+ }], form: [{
452
+ type: Input
453
+ }], value: [{
454
+ type: Input
455
+ }], submitted: [{
456
+ type: Output
457
+ }], valueChanges: [{
458
+ type: Output
459
+ }], statusChanges: [{
460
+ type: Output
461
+ }], submitTrigger: [{
462
+ type: ViewChild,
463
+ args: ['submitTrigger']
464
+ }] } });
465
+
466
+ class FileDropzoneDirective {
467
+ constructor() {
468
+ this.fileDrop = new EventEmitter();
469
+ this.crisprFileDropzone = true;
470
+ }
471
+ onDrop($event) {
472
+ if (this.crisprFileDropzone) {
473
+ $event.preventDefault();
474
+ this.fileDrop.emit($event.dataTransfer.files);
475
+ }
476
+ }
477
+ // Prevents DOM from trying to open file in browser
478
+ onDragOver($event) {
479
+ if (this.crisprFileDropzone) {
480
+ $event.preventDefault();
481
+ }
482
+ }
483
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FileDropzoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
484
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.9", type: FileDropzoneDirective, isStandalone: true, selector: "[crisprFileDropzone]", inputs: { crisprFileDropzone: "crisprFileDropzone" }, outputs: { fileDrop: "fileDrop" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)" } }, ngImport: i0 }); }
485
+ }
486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FileDropzoneDirective, decorators: [{
487
+ type: Directive,
488
+ args: [{
489
+ selector: '[crisprFileDropzone]',
490
+ standalone: true,
491
+ }]
492
+ }], propDecorators: { fileDrop: [{
493
+ type: Output
494
+ }], crisprFileDropzone: [{
495
+ type: Input
496
+ }], onDrop: [{
497
+ type: HostListener,
498
+ args: ['drop', ['$event']]
499
+ }], onDragOver: [{
500
+ type: HostListener,
501
+ args: ['dragover', ['$event']]
502
+ }] } });
503
+
504
+ class SelectedFileComponent {
505
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SelectedFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
506
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: SelectedFileComponent, isStandalone: true, selector: "crispr-selected-file", inputs: { fileName: "fileName", progress: "progress", showProgress: "showProgress", color: "color" }, ngImport: i0, template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n *ngIf=\"showProgress\"\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n</mat-progress-bar>\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], preserveWhitespaces: true }); }
507
+ }
508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SelectedFileComponent, decorators: [{
509
+ type: Component,
510
+ args: [{ selector: 'crispr-selected-file', standalone: true, imports: [
511
+ CommonModule,
512
+ MatProgressBarModule
513
+ ], template: "<h3 class=\"mat-h3\">{{ fileName }}</h3>\n<mat-progress-bar\n *ngIf=\"showProgress\"\n mode=\"determinate\"\n [color]=\"color\"\n [value]=\"progress\">\n</mat-progress-bar>\n", styles: ["mat-progress-bar{margin-bottom:8px}\n"] }]
514
+ }], propDecorators: { fileName: [{
515
+ type: Input
516
+ }], progress: [{
517
+ type: Input
518
+ }], showProgress: [{
519
+ type: Input
520
+ }], color: [{
521
+ type: Input
522
+ }] } });
523
+
524
+ class InfoComponent {
525
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
526
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: InfoComponent, isStandalone: true, selector: "crispr-info", inputs: { info: "info" }, ngImport: i0, template: "<mat-icon\n *ngIf=\"info\"\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\">\n {{info.iconName || 'info'}}\n</mat-icon>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
527
+ }
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: InfoComponent, decorators: [{
529
+ type: Component,
530
+ args: [{ selector: 'crispr-info', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
531
+ CommonModule,
532
+ MatIconModule,
533
+ MatTooltipModule
534
+ ], template: "<mat-icon\n *ngIf=\"info\"\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\">\n {{info.iconName || 'info'}}\n</mat-icon>\n" }]
535
+ }], propDecorators: { info: [{
536
+ type: Input
537
+ }] } });
538
+
539
+ const defaultConfig$1 = {
540
+ typographyClass: 'mat-h3',
541
+ };
542
+ class HeadingComponent extends CrisprFieldComponent {
543
+ constructor() {
544
+ super(...arguments);
545
+ this.defaultConfig = defaultConfig$1;
546
+ }
547
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: HeadingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
548
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: HeadingComponent, isStandalone: true, selector: "crispr-heading", inputs: { config: "config" }, usesInheritance: true, ngImport: i0, template: " <label\n *ngIf=\"!!config?.label\"\n [ngClass]=\"config.typographyClass\">\n {{ config.label }}\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n </label>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i3$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: InfoComponent, selector: "crispr-info", inputs: ["info"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
549
+ }
550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: HeadingComponent, decorators: [{
551
+ type: Component,
552
+ args: [{ selector: 'crispr-heading', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, MatFormFieldModule, InfoComponent], template: " <label\n *ngIf=\"!!config?.label\"\n [ngClass]=\"config.typographyClass\">\n {{ config.label }}\n <crispr-info\n *ngIf=\"config.info\"\n matSuffix\n [info]=\"config.info\">\n </crispr-info>\n </label>\n", styles: [":host{display:block}\n"] }]
553
+ }], propDecorators: { config: [{
554
+ type: Input
555
+ }] } });
556
+
557
+ class FieldContainerComponent {
558
+ constructor() {
559
+ // boolean whether field-container is inline
560
+ this.inlineField = false;
561
+ this.subs = [];
562
+ }
563
+ ngOnInit() {
564
+ this.disabled$ = this.connectDisabledCallback(this.group, this.config);
565
+ // we tried moving this into afterViewChecked and afterContentChecked lifecycle hooks without any luck
566
+ if (this.config.computeValue) {
567
+ this.subs.push(this.config
568
+ .computeValue(this.group)
569
+ .pipe(distinctUntilChanged(), tap((computedValue) => this.group.get(this.config.controlName).setValue(computedValue)))
570
+ .subscribe());
571
+ }
572
+ }
573
+ ngOnDestroy() {
574
+ this.subs.forEach((sub) => sub.unsubscribe);
575
+ }
576
+ /**
577
+ * Connects user defined disabledCallback function to the the view, so that the control is enabled/disabled
578
+ * appropriately. It also will hide disabled fields in the UI unless `hideDisabled` is set to
579
+ * false in the controls config
580
+ * @param group used to get valueChanges from control
581
+ * @param config configuration object used to
582
+ */
583
+ connectDisabledCallback(group, config = null) {
584
+ const control = group.get(config.controlName);
585
+ // If the disabled$ function exists on the field config then call it with the disabledCallbackConfig
586
+ // as a parameter otherwise return an observable of true.
587
+ return config?.disabledCallback &&
588
+ config.disabledCallback instanceof Function
589
+ ? config.disabledCallback(group).pipe(
590
+ // This enables/disables when callback conditions are met
591
+ tap((shouldDisable) => shouldDisable ? control.disable() : control.enable()))
592
+ : of(false);
593
+ }
594
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FieldContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
595
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: FieldContainerComponent, isStandalone: true, selector: "crispr-field-container", inputs: { config: "config", group: "group", inlineField: "inlineField" }, ngImport: i0, template: "<div\n *ngIf=\"(disabled$ | async) ? !config.hideDisabled : true\"\n [ngClass]=\"config.classes\"\n [class.inline-field]=\"inlineField\"\n class=\"field-container\">\n\n <crispr-heading\n *ngIf=\"config.heading\"\n [config]=\"config.heading\">\n </crispr-heading>\n\n <ng-content>\n </ng-content>\n\n</div>\n", styles: ["::ng-deep mat-form-field.mat-mdc-form-field{display:block;padding:.25em 0}.inline-field{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: HeadingComponent, selector: "crispr-heading", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
596
+ }
597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FieldContainerComponent, decorators: [{
598
+ type: Component,
599
+ args: [{ selector: 'crispr-field-container', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, HeadingComponent], template: "<div\n *ngIf=\"(disabled$ | async) ? !config.hideDisabled : true\"\n [ngClass]=\"config.classes\"\n [class.inline-field]=\"inlineField\"\n class=\"field-container\">\n\n <crispr-heading\n *ngIf=\"config.heading\"\n [config]=\"config.heading\">\n </crispr-heading>\n\n <ng-content>\n </ng-content>\n\n</div>\n", styles: ["::ng-deep mat-form-field.mat-mdc-form-field{display:block;padding:.25em 0}.inline-field{display:inline-block}\n"] }]
600
+ }], propDecorators: { config: [{
601
+ type: Input
602
+ }], group: [{
603
+ type: Input
604
+ }], inlineField: [{
605
+ type: Input
606
+ }] } });
607
+
608
+ var index$2 = /*#__PURE__*/Object.freeze({
609
+ __proto__: null,
610
+ FieldContainerComponent: FieldContainerComponent,
611
+ FileDropzoneDirective: FileDropzoneDirective,
612
+ HeadingComponent: HeadingComponent,
613
+ InfoComponent: InfoComponent,
614
+ SelectedFileComponent: SelectedFileComponent
615
+ });
616
+
617
+ class CrisprDisplayFieldDirective {
618
+ set value(value) {
619
+ this._value = value;
620
+ // This is needed to keep the group list from resetting control values to the initial input value
621
+ this.updateComponentValue(value);
622
+ }
623
+ get value() {
624
+ return this._value;
625
+ }
626
+ constructor(container, cdr) {
627
+ this.container = container;
628
+ this.cdr = cdr;
629
+ }
630
+ async ngOnInit() {
631
+ if (this.component) {
632
+ /**
633
+ * create component and set values from config on its instance
634
+ */
635
+ const componentRef = this.container.createComponent(this.component);
636
+ this.componentInstance = componentRef.instance;
637
+ this.componentInstance.index = this.index;
638
+ this.updateComponentValue(this.value);
639
+ }
640
+ }
641
+ updateComponentValue(value) {
642
+ if (!this.componentInstance)
643
+ return;
644
+ this.componentInstance.value = value;
645
+ this.cdr.detectChanges();
646
+ }
647
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprDisplayFieldDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
648
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.9", type: CrisprDisplayFieldDirective, isStandalone: true, selector: "[crisprDisplayField]", inputs: { group: "group", value: "value", component: "component", index: "index" }, ngImport: i0 }); }
649
+ }
650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprDisplayFieldDirective, decorators: [{
651
+ type: Directive,
652
+ args: [{
653
+ selector: '[crisprDisplayField]',
654
+ standalone: true,
655
+ }]
656
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }], propDecorators: { group: [{
657
+ type: Input
658
+ }], value: [{
659
+ type: Input
660
+ }], component: [{
661
+ type: Input
662
+ }], index: [{
663
+ type: Input
664
+ }] } });
665
+
666
+ const defaultConfig = {
667
+ addButtonLabel: 'ADD ITEM',
668
+ minListLength: 1,
669
+ };
670
+ const FormGroupListMixin = crisprControlMixin(CrisprFieldComponent);
671
+ class FormGroupListComponent extends FormGroupListMixin {
672
+ constructor(cdr) {
673
+ super();
674
+ this.cdr = cdr;
675
+ this.defaultConfig = defaultConfig;
676
+ /**
677
+ * By setting this to true when adding/removing items from array,
678
+ * we can block original values from overwriting form values
679
+ * */
680
+ this.blockValue = false;
681
+ this.selectedIndex = null;
682
+ }
683
+ ngOnInit() {
684
+ super.ngOnInit();
685
+ // TODO: this is required to ngFor of controls in template, must be a better way
686
+ }
687
+ setControlValue(values) {
688
+ if (this.control) {
689
+ if (values?.length > 0) {
690
+ // clear any existing values so that new values don't concatenate onto the old
691
+ const currentValues = this.control.value;
692
+ if (currentValues.length) {
693
+ this.control.clear();
694
+ }
695
+ values.forEach((value) => this.addGroup(value));
696
+ }
697
+ else if (this.config.displayInitialItem) {
698
+ this.addGroup();
699
+ }
700
+ // needed to ensure new array items render
701
+ setTimeout(() => {
702
+ this.cdr.detectChanges();
703
+ });
704
+ }
705
+ }
706
+ clickDelete(index) {
707
+ this.blockValue = true;
708
+ this.deleteGroup(index);
709
+ }
710
+ clickAdd() {
711
+ this.blockValue = true;
712
+ this.addGroup();
713
+ }
714
+ addGroup(value = null) {
715
+ this.control.push(createControlForType(this.config.itemConfig, value));
716
+ // needed to ensure new array items render
717
+ setTimeout(() => {
718
+ this.cdr.detectChanges();
719
+ });
720
+ }
721
+ deleteGroup(index) {
722
+ this.control.removeAt(index);
723
+ }
724
+ clickEditItem(index) {
725
+ this.selectedIndex = index;
726
+ }
727
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormGroupListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
728
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: FormGroupListComponent, isStandalone: true, selector: "crispr-form-group-list", usesInheritance: true, ngImport: i0, template: "\n<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [formGroup]=\"group\">\n\n <div [formArrayName]=\"config.controlName\">\n\n <!-- Don't add trackBy function, it confuses the state of the array -->\n <ng-container *ngFor=\"let itemControl of control?.controls; let i = index; let last = last\">\n <ng-container *ngIf=\"!config.displayItemComponent || i === selectedIndex || (last && selectedIndex ?? true); else display\">\n <!-- TODO: use content projection to allow custom item label component -->\n <div class=\"item-header\">\n <span class=\"mat-h2\"> {{ config.itemLabelBuilder ? config.itemLabelBuilder(i) : 'Item ' + (i + 1) }} </span>\n <button\n mat-icon-button\n type=\"button\"\n *ngIf=\"i + 1 > config.minListLength\">\n <mat-icon (click)=\"clickDelete(i)\">delete</mat-icon>\n </button>\n </div>\n <div\n [formGroup]=\"itemControl\">\n <!-- TODO: if chiplists didn't need to have labels mixed in with their values we could use [value]=\"control.value\" below -->\n <ng-container\n *ngFor=\"let field of config.itemConfig.fields;\"\n crisprField\n [value]=\"blockValue ? null : value && value[i] | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"itemControl\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #display>\n <div\n class=\"display-field-container\"\n crisprDisplayField\n [component]=\"config.displayItemComponent\"\n [value]=\"itemControl.value\"\n [index]=\"i\">\n <button mat-icon-button (click)=\"clickEditItem(i)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <div class=\"group-footer\">\n <button\n type=\"button\"\n class=\"add\"\n mat-raised-button\n [color]=\"config.addButtonColor\"\n (click)=\"clickAdd()\">\n {{config.addItemLabel || config.addButtonLabel}}\n </button>\n </div>\n\n</crispr-field-container>\n", styles: [".item-header{display:flex;justify-content:space-between}.group-footer{display:flex;justify-content:flex-end}.group-footer button.add{margin-bottom:16px}.display-field-container{position:relative}.display-field-container button{position:absolute;top:0;right:0}\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: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: CrisprFieldDirective, selector: "[crisprField]", inputs: ["config", "group", "value"] }, { kind: "directive", type: CrisprDisplayFieldDirective, selector: "[crisprDisplayField]", inputs: ["group", "value", "component", "index"] }, { kind: "ngmodule", type: CrisprPipesModule }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i7.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true }); }
729
+ }
730
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: FormGroupListComponent, decorators: [{
731
+ type: Component,
732
+ args: [{ selector: 'crispr-form-group-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
733
+ CommonModule,
734
+ MatButtonModule,
735
+ MatIconModule,
736
+ FieldContainerComponent,
737
+ ReactiveFormsModule,
738
+ CrisprFieldDirective,
739
+ CrisprDisplayFieldDirective,
740
+ CrisprPipesModule,
741
+ FormValidationHandlerModule,
742
+ ], template: "\n<crispr-field-container\n [config]=\"config\"\n [group]=\"group\"\n [formGroup]=\"group\">\n\n <div [formArrayName]=\"config.controlName\">\n\n <!-- Don't add trackBy function, it confuses the state of the array -->\n <ng-container *ngFor=\"let itemControl of control?.controls; let i = index; let last = last\">\n <ng-container *ngIf=\"!config.displayItemComponent || i === selectedIndex || (last && selectedIndex ?? true); else display\">\n <!-- TODO: use content projection to allow custom item label component -->\n <div class=\"item-header\">\n <span class=\"mat-h2\"> {{ config.itemLabelBuilder ? config.itemLabelBuilder(i) : 'Item ' + (i + 1) }} </span>\n <button\n mat-icon-button\n type=\"button\"\n *ngIf=\"i + 1 > config.minListLength\">\n <mat-icon (click)=\"clickDelete(i)\">delete</mat-icon>\n </button>\n </div>\n <div\n [formGroup]=\"itemControl\">\n <!-- TODO: if chiplists didn't need to have labels mixed in with their values we could use [value]=\"control.value\" below -->\n <ng-container\n *ngFor=\"let field of config.itemConfig.fields;\"\n crisprField\n [value]=\"blockValue ? null : value && value[i] | initialControlValue : field\"\n [config]=\"field\"\n [group]=\"itemControl\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #display>\n <div\n class=\"display-field-container\"\n crisprDisplayField\n [component]=\"config.displayItemComponent\"\n [value]=\"itemControl.value\"\n [index]=\"i\">\n <button mat-icon-button (click)=\"clickEditItem(i)\">\n <mat-icon>edit</mat-icon>\n </button>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <div class=\"group-footer\">\n <button\n type=\"button\"\n class=\"add\"\n mat-raised-button\n [color]=\"config.addButtonColor\"\n (click)=\"clickAdd()\">\n {{config.addItemLabel || config.addButtonLabel}}\n </button>\n </div>\n\n</crispr-field-container>\n", styles: [".item-header{display:flex;justify-content:space-between}.group-footer{display:flex;justify-content:flex-end}.group-footer button.add{margin-bottom:16px}.display-field-container{position:relative}.display-field-container button{position:absolute;top:0;right:0}\n"] }]
743
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
744
+
745
+ var index$1 = /*#__PURE__*/Object.freeze({
746
+ __proto__: null,
747
+ FormGroupListComponent: FormGroupListComponent
748
+ });
749
+
750
+ const FormGroupMixin = crisprControlMixin(CrisprFieldComponent);
751
+ class SubGroupComponent extends FormGroupMixin {
752
+ ngOnInit() {
753
+ super.ngOnInit();
754
+ }
755
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SubGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
756
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.9", type: SubGroupComponent, selector: "crispr-sub-group", usesInheritance: true, ngImport: i0, template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <ng-container\n *ngFor=\"let fieldConfig of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : fieldConfig\"\n [config]=\"fieldConfig\"\n [group]=\"control\">\n </ng-container>\n</crispr-field-container>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: CrisprFieldDirective, selector: "[crisprField]", inputs: ["config", "group", "value"] }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "pipe", type: InitialControlValuePipe, name: "initialControlValue" }], preserveWhitespaces: true }); }
757
+ }
758
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SubGroupComponent, decorators: [{
759
+ type: Component,
760
+ args: [{ selector: 'crispr-sub-group', template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n <ng-container\n *ngFor=\"let fieldConfig of config.fields;\"\n crisprField\n [value]=\"value | initialControlValue : fieldConfig\"\n [config]=\"fieldConfig\"\n [group]=\"control\">\n </ng-container>\n</crispr-field-container>\n\n" }]
761
+ }] });
762
+
763
+ class SubGroupModule {
764
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SubGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
765
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: SubGroupModule, declarations: [SubGroupComponent], imports: [CommonModule,
766
+ CrisprFieldDirective,
767
+ FieldContainerComponent,
768
+ CrisprPipesModule,
769
+ // TODO: Does this need to be here?
770
+ FormValidationHandlerModule], exports: [SubGroupComponent] }); }
771
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SubGroupModule, imports: [CommonModule,
772
+ FieldContainerComponent,
773
+ CrisprPipesModule,
774
+ // TODO: Does this need to be here?
775
+ FormValidationHandlerModule] }); }
776
+ }
777
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: SubGroupModule, decorators: [{
778
+ type: NgModule,
779
+ args: [{
780
+ imports: [
781
+ CommonModule,
782
+ CrisprFieldDirective,
783
+ FieldContainerComponent,
784
+ CrisprPipesModule,
785
+ // TODO: Does this need to be here?
786
+ FormValidationHandlerModule
787
+ ],
788
+ exports: [
789
+ SubGroupComponent
790
+ ],
791
+ declarations: [
792
+ SubGroupComponent
793
+ ]
794
+ }]
795
+ }] });
796
+
797
+ var index = /*#__PURE__*/Object.freeze({
798
+ __proto__: null,
799
+ SubGroupComponent: SubGroupComponent,
800
+ SubGroupModule: SubGroupModule
801
+ });
802
+
803
+ class CrisprFormsModule {
804
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
805
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: CrisprFormsModule, imports: [CommonModule,
806
+ ReactiveFormsModule,
807
+ FormValidationHandlerModule,
808
+ FormGroupListComponent,
809
+ FieldContainerComponent,
810
+ CrisprFieldDirective,
811
+ CrisprDisplayFieldDirective,
812
+ SubGroupModule,
813
+ CrisprPipesModule,
814
+ CrisprFormComponent], exports: [CrisprFormComponent, FieldContainerComponent] }); }
815
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFormsModule, imports: [CommonModule,
816
+ ReactiveFormsModule,
817
+ FormValidationHandlerModule,
818
+ FormGroupListComponent,
819
+ FieldContainerComponent,
820
+ SubGroupModule,
821
+ CrisprPipesModule,
822
+ CrisprFormComponent] }); }
823
+ }
824
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: CrisprFormsModule, decorators: [{
825
+ type: NgModule,
826
+ args: [{
827
+ imports: [
828
+ CommonModule,
829
+ ReactiveFormsModule,
830
+ FormValidationHandlerModule,
831
+ FormGroupListComponent,
832
+ FieldContainerComponent,
833
+ CrisprFieldDirective,
834
+ CrisprDisplayFieldDirective,
835
+ SubGroupModule,
836
+ CrisprPipesModule,
837
+ CrisprFormComponent,
838
+ ],
839
+ exports: [CrisprFormComponent, FieldContainerComponent],
840
+ }]
841
+ }] });
842
+
843
+ /**
844
+ * Generated bundle index. Do not edit.
845
+ */
846
+
847
+ export { AbstractAutocompleteComponent, ControlType, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, crisprControlMixin, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn };
848
+ //# sourceMappingURL=tft-crispr-forms.mjs.map