@tft/crispr-forms 13.0.23 → 14.0.1-rc.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 (320) hide show
  1. package/README.md +77 -76
  2. package/esm2020/public-api.mjs +5 -0
  3. package/esm2020/src/index.mjs +2 -0
  4. package/esm2020/src/lib/crispr-forms.module.mjs +57 -0
  5. package/esm2020/src/lib/field-component-map.const.mjs +27 -0
  6. package/esm2020/src/lib/field.directive.mjs +69 -0
  7. package/esm2020/src/lib/form/form.component.mjs +63 -0
  8. package/esm2020/src/lib/form-group-list/form-group-list.component.mjs +93 -0
  9. package/esm2020/src/lib/form-group-list/index.mjs +2 -0
  10. package/esm2020/src/lib/pipes/crispr-pipes.module.mjs +24 -0
  11. package/esm2020/src/lib/pipes/initial-control-value.pipe.mjs +21 -0
  12. package/esm2020/src/lib/public_api.mjs +3 -0
  13. package/esm2020/src/lib/sub-group/index.mjs +3 -0
  14. package/esm2020/src/lib/sub-group/sub-group.component.mjs +21 -0
  15. package/esm2020/src/lib/sub-group/sub-group.module.mjs +42 -0
  16. package/esm2020/tft-crispr-forms.mjs +2 -2
  17. package/esm2020/ui/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +127 -0
  18. package/esm2020/ui/autocomplete-chiplist-field/index.mjs +2 -0
  19. package/esm2020/ui/autocomplete-field/autocomplete-field.component.mjs +90 -0
  20. package/esm2020/ui/autocomplete-field/index.mjs +2 -0
  21. package/esm2020/ui/button/button.component.mjs +46 -0
  22. package/esm2020/ui/button/index.mjs +2 -0
  23. package/esm2020/ui/checkbox-field/checkbox-field.component.mjs +42 -0
  24. package/esm2020/ui/checkbox-field/index.mjs +2 -0
  25. package/esm2020/ui/datepicker-field/datepicker-field.component.mjs +60 -0
  26. package/esm2020/ui/datepicker-field/index.mjs +2 -0
  27. package/esm2020/ui/divider/divider.component.mjs +28 -0
  28. package/esm2020/ui/divider/index.mjs +2 -0
  29. package/esm2020/ui/field-container/field-container.component.mjs +58 -0
  30. package/esm2020/ui/field-container/public-api.mjs +2 -0
  31. package/esm2020/ui/field-container/tft-crispr-forms-ui-field-container.mjs +5 -0
  32. package/esm2020/ui/file-dropzone/file-dropzone.directive.mjs +40 -0
  33. package/esm2020/ui/file-dropzone/public-api.mjs +2 -0
  34. package/esm2020/ui/file-dropzone/tft-crispr-forms-ui-file-dropzone.mjs +5 -0
  35. package/esm2020/ui/file-upload/file-upload.component.mjs +108 -0
  36. package/esm2020/ui/file-upload/index.mjs +2 -0
  37. package/esm2020/ui/heading/heading.component.mjs +31 -0
  38. package/esm2020/ui/heading/public-api.mjs +2 -0
  39. package/esm2020/ui/heading/tft-crispr-forms-ui-heading.mjs +5 -0
  40. package/esm2020/ui/image-upload-field/image-upload-field.component.mjs +179 -0
  41. package/esm2020/ui/image-upload-field/public-api.mjs +2 -0
  42. package/esm2020/ui/image-upload-field/tft-crispr-forms-ui-image-upload-field.mjs +5 -0
  43. package/esm2020/ui/info/info.component.mjs +23 -0
  44. package/esm2020/ui/info/public-api.mjs +2 -0
  45. package/esm2020/ui/info/tft-crispr-forms-ui-info.mjs +5 -0
  46. package/esm2020/ui/input-field/index.mjs +2 -0
  47. package/esm2020/ui/input-field/input-field.component.mjs +38 -0
  48. package/esm2020/ui/option/index.mjs +2 -0
  49. package/esm2020/ui/option/option.component.mjs +19 -0
  50. package/esm2020/ui/public-api.mjs +21 -0
  51. package/esm2020/ui/radio-field/index.mjs +2 -0
  52. package/esm2020/ui/radio-field/radio-field.component.mjs +36 -0
  53. package/esm2020/ui/select-field/index.mjs +2 -0
  54. package/esm2020/ui/select-field/select-field.component.mjs +74 -0
  55. package/esm2020/ui/selected-file/public-api.mjs +2 -0
  56. package/esm2020/ui/selected-file/selected-file.component.mjs +26 -0
  57. package/esm2020/ui/selected-file/tft-crispr-forms-ui-selected-file.mjs +5 -0
  58. package/esm2020/ui/slider-field/index.mjs +2 -0
  59. package/esm2020/ui/slider-field/slider-field.component.mjs +41 -0
  60. package/esm2020/ui/textarea-field/index.mjs +2 -0
  61. package/esm2020/ui/textarea-field/textarea-field.component.mjs +39 -0
  62. package/esm2020/ui/tft-crispr-forms-ui.mjs +5 -0
  63. package/esm2020/ui/unit-conversion-field/index.mjs +2 -0
  64. package/esm2020/ui/unit-conversion-field/unit-conversion-field.component.mjs +81 -0
  65. package/esm2020/utils/abstracts/autocomplete-field.abstract.mjs +30 -0
  66. package/esm2020/utils/abstracts/crispr-control.mixin.mjs +27 -0
  67. package/esm2020/utils/abstracts/crispr-field.abstract.mjs +20 -0
  68. package/esm2020/utils/abstracts/index.mjs +4 -0
  69. package/esm2020/utils/functions/buildFormGroupFromConfig.mjs +28 -0
  70. package/esm2020/utils/functions/callOptionsIfFunction.mjs +4 -0
  71. package/esm2020/utils/functions/createControlForType.mjs +19 -0
  72. package/esm2020/utils/functions/filterOptionsByLabel.mjs +11 -0
  73. package/esm2020/utils/functions/image-compression.helpers.mjs +50 -0
  74. package/esm2020/utils/functions/index.mjs +8 -0
  75. package/esm2020/utils/functions/isControlConfig.mjs +7 -0
  76. package/esm2020/utils/functions/observablifyOptions.mjs +29 -0
  77. package/esm2020/utils/models/autocomplete-chiplist-field.config.mjs +2 -0
  78. package/esm2020/utils/models/autocomplete-field.config.mjs +2 -0
  79. package/esm2020/utils/models/button.config.mjs +2 -0
  80. package/esm2020/utils/models/checkbox-field.config.mjs +2 -0
  81. package/esm2020/utils/models/crispr-field.config.mjs +23 -0
  82. package/esm2020/utils/models/datepicker-field.config.mjs +2 -0
  83. package/esm2020/utils/models/divider.config.mjs +2 -0
  84. package/esm2020/utils/models/file-upload-field.config.mjs +2 -0
  85. package/esm2020/utils/models/form-group-list.config.mjs +2 -0
  86. package/esm2020/utils/models/heading.config.mjs +3 -0
  87. package/esm2020/utils/models/image-upload-field.config.mjs +2 -0
  88. package/esm2020/utils/models/index.mjs +18 -0
  89. package/esm2020/utils/models/input-field.config.mjs +2 -0
  90. package/esm2020/utils/models/radio-field.config.mjs +2 -0
  91. package/esm2020/utils/models/select-field.config.mjs +2 -0
  92. package/esm2020/utils/models/slider-field.config.mjs +2 -0
  93. package/esm2020/utils/models/textarea-field.config.mjs +2 -0
  94. package/esm2020/utils/models/unit-conversion-field.config.mjs +2 -0
  95. package/esm2020/utils/operators/form.operators.mjs +24 -0
  96. package/esm2020/utils/operators/index.mjs +2 -0
  97. package/esm2020/utils/public-api.mjs +5 -0
  98. package/esm2020/utils/tft-crispr-forms-utils.mjs +5 -0
  99. package/fesm2015/tft-crispr-forms-ui-field-container.mjs +64 -0
  100. package/fesm2015/tft-crispr-forms-ui-field-container.mjs.map +1 -0
  101. package/fesm2015/tft-crispr-forms-ui-file-dropzone.mjs +47 -0
  102. package/fesm2015/tft-crispr-forms-ui-file-dropzone.mjs.map +1 -0
  103. package/fesm2015/tft-crispr-forms-ui-heading.mjs +37 -0
  104. package/fesm2015/tft-crispr-forms-ui-heading.mjs.map +1 -0
  105. package/fesm2015/tft-crispr-forms-ui-image-upload-field.mjs +182 -0
  106. package/fesm2015/tft-crispr-forms-ui-image-upload-field.mjs.map +1 -0
  107. package/fesm2015/tft-crispr-forms-ui-info.mjs +30 -0
  108. package/fesm2015/tft-crispr-forms-ui-info.mjs.map +1 -0
  109. package/fesm2015/tft-crispr-forms-ui-selected-file.mjs +33 -0
  110. package/fesm2015/tft-crispr-forms-ui-selected-file.mjs.map +1 -0
  111. package/fesm2015/tft-crispr-forms-ui.mjs +684 -0
  112. package/fesm2015/tft-crispr-forms-ui.mjs.map +1 -0
  113. package/fesm2015/tft-crispr-forms-utils.mjs +270 -0
  114. package/fesm2015/tft-crispr-forms-utils.mjs.map +1 -0
  115. package/fesm2015/tft-crispr-forms.mjs +117 -1730
  116. package/fesm2015/tft-crispr-forms.mjs.map +1 -1
  117. package/fesm2020/tft-crispr-forms-ui-field-container.mjs +65 -0
  118. package/fesm2020/tft-crispr-forms-ui-field-container.mjs.map +1 -0
  119. package/fesm2020/tft-crispr-forms-ui-file-dropzone.mjs +47 -0
  120. package/fesm2020/tft-crispr-forms-ui-file-dropzone.mjs.map +1 -0
  121. package/fesm2020/tft-crispr-forms-ui-heading.mjs +37 -0
  122. package/fesm2020/tft-crispr-forms-ui-heading.mjs.map +1 -0
  123. package/fesm2020/tft-crispr-forms-ui-image-upload-field.mjs +185 -0
  124. package/fesm2020/tft-crispr-forms-ui-image-upload-field.mjs.map +1 -0
  125. package/fesm2020/tft-crispr-forms-ui-info.mjs +30 -0
  126. package/fesm2020/tft-crispr-forms-ui-info.mjs.map +1 -0
  127. package/fesm2020/tft-crispr-forms-ui-selected-file.mjs +33 -0
  128. package/fesm2020/tft-crispr-forms-ui-selected-file.mjs.map +1 -0
  129. package/fesm2020/tft-crispr-forms-ui.mjs +676 -0
  130. package/fesm2020/tft-crispr-forms-ui.mjs.map +1 -0
  131. package/fesm2020/tft-crispr-forms-utils.mjs +269 -0
  132. package/fesm2020/tft-crispr-forms-utils.mjs.map +1 -0
  133. package/fesm2020/tft-crispr-forms.mjs +117 -1723
  134. package/fesm2020/tft-crispr-forms.mjs.map +1 -1
  135. package/index.d.ts +5 -1
  136. package/package.json +77 -15
  137. package/public-api.d.ts +3 -0
  138. package/src/index.d.ts +1 -0
  139. package/src/lib/crispr-forms.module.d.ts +15 -0
  140. package/{lib → src/lib}/field-component-map.const.d.ts +7 -6
  141. package/{lib → src/lib}/field.directive.d.ts +4 -10
  142. package/{lib → src/lib}/form/form.component.d.ts +3 -3
  143. package/{lib → src/lib}/form-group-list/form-group-list.component.d.ts +12 -14
  144. package/{lib → src/lib}/form-group-list/index.d.ts +0 -1
  145. package/{lib → src/lib}/pipes/crispr-pipes.module.d.ts +0 -0
  146. package/{lib → src/lib}/pipes/initial-control-value.pipe.d.ts +2 -2
  147. package/src/lib/public_api.d.ts +2 -0
  148. package/{lib → src/lib}/sub-group/index.d.ts +0 -0
  149. package/src/lib/sub-group/sub-group.component.d.ts +22 -0
  150. package/{lib → src/lib}/sub-group/sub-group.module.d.ts +2 -2
  151. package/tft-crispr-forms-14.0.1-rc.2.tgz +0 -0
  152. package/ui/README.md +3 -0
  153. package/{lib/material → ui}/autocomplete-chiplist-field/autocomplete-chiplist-field.component.d.ts +2 -3
  154. package/ui/autocomplete-chiplist-field/index.d.ts +1 -0
  155. package/{lib/material → ui}/autocomplete-field/autocomplete-field.component.d.ts +2 -3
  156. package/ui/autocomplete-field/index.d.ts +1 -0
  157. package/{lib/material → ui}/button/button.component.d.ts +2 -3
  158. package/ui/button/index.d.ts +1 -0
  159. package/ui/checkbox-field/checkbox-field.component.d.ts +21 -0
  160. package/ui/checkbox-field/index.d.ts +1 -0
  161. package/{lib/material → ui}/datepicker-field/datepicker-field.component.d.ts +14 -17
  162. package/ui/datepicker-field/index.d.ts +1 -0
  163. package/{lib/material → ui}/divider/divider.component.d.ts +2 -3
  164. package/ui/divider/index.d.ts +1 -0
  165. package/{lib → ui}/field-container/field-container.component.d.ts +3 -10
  166. package/ui/field-container/index.d.ts +5 -0
  167. package/{lib/field-container/index.d.ts → ui/field-container/public-api.d.ts} +0 -0
  168. package/{lib/material/file-upload → ui/file-dropzone}/file-dropzone.directive.d.ts +1 -1
  169. package/ui/file-dropzone/index.d.ts +5 -0
  170. package/{lib/material/file-upload/index.d.ts → ui/file-dropzone/public-api.d.ts} +0 -1
  171. package/ui/file-upload/file-upload.component.d.ts +37 -0
  172. package/ui/file-upload/index.d.ts +1 -0
  173. package/ui/heading/heading.component.d.ts +8 -0
  174. package/ui/heading/index.d.ts +5 -0
  175. package/ui/heading/public-api.d.ts +1 -0
  176. package/ui/image-upload-field/image-upload-field.component.d.ts +48 -0
  177. package/ui/image-upload-field/index.d.ts +5 -0
  178. package/{lib/material/image-upload-field/index.d.ts → ui/image-upload-field/public-api.d.ts} +0 -0
  179. package/ui/index.d.ts +5 -0
  180. package/ui/info/index.d.ts +5 -0
  181. package/ui/info/info.component.d.ts +7 -0
  182. package/ui/info/public-api.d.ts +1 -0
  183. package/ui/input-field/index.d.ts +1 -0
  184. package/ui/input-field/input-field.component.d.ts +22 -0
  185. package/{lib/material → ui}/option/index.d.ts +0 -0
  186. package/{lib/material → ui}/option/option.component.d.ts +2 -2
  187. package/ui/public-api.d.ts +19 -0
  188. package/ui/radio-field/index.d.ts +1 -0
  189. package/ui/radio-field/radio-field.component.d.ts +23 -0
  190. package/ui/select-field/index.d.ts +1 -0
  191. package/{lib/material → ui}/select-field/select-field.component.d.ts +12 -14
  192. package/ui/selected-file/index.d.ts +5 -0
  193. package/ui/selected-file/public-api.d.ts +1 -0
  194. package/ui/selected-file/selected-file.component.d.ts +10 -0
  195. package/ui/slider-field/index.d.ts +1 -0
  196. package/ui/slider-field/slider-field.component.d.ts +25 -0
  197. package/ui/textarea-field/index.d.ts +1 -0
  198. package/ui/textarea-field/textarea-field.component.d.ts +21 -0
  199. package/ui/unit-conversion-field/index.d.ts +1 -0
  200. package/{lib/material → ui}/unit-conversion-field/unit-conversion-field.component.d.ts +14 -17
  201. package/utils/README.md +3 -0
  202. package/{lib → utils}/abstracts/autocomplete-field.abstract.d.ts +4 -4
  203. package/{lib → utils}/abstracts/crispr-control.mixin.d.ts +0 -0
  204. package/{lib → utils}/abstracts/crispr-field.abstract.d.ts +1 -1
  205. package/{lib → utils}/abstracts/index.d.ts +0 -0
  206. package/utils/functions/buildFormGroupFromConfig.d.ts +9 -0
  207. package/utils/functions/callOptionsIfFunction.d.ts +3 -0
  208. package/utils/functions/createControlForType.d.ts +9 -0
  209. package/utils/functions/filterOptionsByLabel.d.ts +7 -0
  210. package/utils/functions/image-compression.helpers.d.ts +5 -0
  211. package/utils/functions/index.d.ts +7 -0
  212. package/utils/functions/isControlConfig.d.ts +5 -0
  213. package/utils/functions/observablifyOptions.d.ts +12 -0
  214. package/utils/index.d.ts +5 -0
  215. package/{lib → utils}/models/autocomplete-chiplist-field.config.d.ts +2 -1
  216. package/{lib → utils}/models/autocomplete-field.config.d.ts +1 -2
  217. package/{lib → utils}/models/button.config.d.ts +0 -0
  218. package/{lib → utils}/models/checkbox-field.config.d.ts +1 -2
  219. package/{lib → utils}/models/crispr-field.config.d.ts +5 -7
  220. package/{lib → utils}/models/datepicker-field.config.d.ts +4 -6
  221. package/{lib → utils}/models/divider.config.d.ts +1 -1
  222. package/{lib → utils}/models/file-upload-field.config.d.ts +3 -4
  223. package/{lib → utils}/models/form-group-list.config.d.ts +1 -2
  224. package/{lib → utils}/models/heading.config.d.ts +1 -2
  225. package/{lib → utils}/models/image-upload-field.config.d.ts +2 -1
  226. package/{lib → utils}/models/index.d.ts +0 -0
  227. package/{lib → utils}/models/input-field.config.d.ts +1 -2
  228. package/{lib → utils}/models/radio-field.config.d.ts +0 -0
  229. package/{lib → utils}/models/select-field.config.d.ts +1 -2
  230. package/{lib → utils}/models/slider-field.config.d.ts +1 -2
  231. package/{lib → utils}/models/textarea-field.config.d.ts +1 -2
  232. package/{lib → utils}/models/unit-conversion-field.config.d.ts +1 -2
  233. package/{lib → utils/operators}/form.operators.d.ts +0 -0
  234. package/utils/operators/index.d.ts +1 -0
  235. package/utils/public-api.d.ts +4 -0
  236. package/esm2020/index.mjs +0 -2
  237. package/esm2020/lib/abstracts/autocomplete-field.abstract.mjs +0 -30
  238. package/esm2020/lib/abstracts/crispr-control.mixin.mjs +0 -27
  239. package/esm2020/lib/abstracts/crispr-field.abstract.mjs +0 -17
  240. package/esm2020/lib/abstracts/index.mjs +0 -4
  241. package/esm2020/lib/crispr-forms.module.mjs +0 -66
  242. package/esm2020/lib/field-component-map.const.mjs +0 -28
  243. package/esm2020/lib/field-container/field-container.component.mjs +0 -85
  244. package/esm2020/lib/field-container/index.mjs +0 -2
  245. package/esm2020/lib/field.directive.mjs +0 -90
  246. package/esm2020/lib/form/form.component.mjs +0 -53
  247. package/esm2020/lib/form-group-list/form-group-list.component.mjs +0 -77
  248. package/esm2020/lib/form-group-list/form-group-list.module.mjs +0 -54
  249. package/esm2020/lib/form-group-list/index.mjs +0 -3
  250. package/esm2020/lib/form.helpers.mjs +0 -190
  251. package/esm2020/lib/form.operators.mjs +0 -24
  252. package/esm2020/lib/material/autocomplete-chiplist-field/autocomplete-chiplist-field.component.mjs +0 -111
  253. package/esm2020/lib/material/autocomplete-field/autocomplete-field.component.mjs +0 -78
  254. package/esm2020/lib/material/button/button.component.mjs +0 -35
  255. package/esm2020/lib/material/checkbox-field/checkbox-field.component.mjs +0 -31
  256. package/esm2020/lib/material/datepicker-field/datepicker-field.component.mjs +0 -45
  257. package/esm2020/lib/material/divider/divider.component.mjs +0 -22
  258. package/esm2020/lib/material/file-upload/file-dropzone.directive.mjs +0 -39
  259. package/esm2020/lib/material/file-upload/file-upload.component.mjs +0 -145
  260. package/esm2020/lib/material/file-upload/index.mjs +0 -3
  261. package/esm2020/lib/material/heading/heading.component.mjs +0 -54
  262. package/esm2020/lib/material/image-upload-field/image-compression.helpers.mjs +0 -4
  263. package/esm2020/lib/material/image-upload-field/image-upload-field.component.mjs +0 -265
  264. package/esm2020/lib/material/image-upload-field/index.mjs +0 -2
  265. package/esm2020/lib/material/index.mjs +0 -18
  266. package/esm2020/lib/material/info/info.component.mjs +0 -46
  267. package/esm2020/lib/material/input-field/input-field.component.mjs +0 -27
  268. package/esm2020/lib/material/material.module.mjs +0 -200
  269. package/esm2020/lib/material/option/index.mjs +0 -2
  270. package/esm2020/lib/material/option/option.component.mjs +0 -15
  271. package/esm2020/lib/material/radio-field/radio-field.component.mjs +0 -29
  272. package/esm2020/lib/material/select-field/select-field.component.mjs +0 -58
  273. package/esm2020/lib/material/selected-file/selected-file.component.mjs +0 -47
  274. package/esm2020/lib/material/slider-field/slider-field.component.mjs +0 -30
  275. package/esm2020/lib/material/textarea-field/textarea-field.component.mjs +0 -28
  276. package/esm2020/lib/material/unit-conversion-field/unit-conversion-field.component.mjs +0 -69
  277. package/esm2020/lib/models/autocomplete-chiplist-field.config.mjs +0 -2
  278. package/esm2020/lib/models/autocomplete-field.config.mjs +0 -2
  279. package/esm2020/lib/models/button.config.mjs +0 -2
  280. package/esm2020/lib/models/checkbox-field.config.mjs +0 -2
  281. package/esm2020/lib/models/crispr-field.config.mjs +0 -23
  282. package/esm2020/lib/models/datepicker-field.config.mjs +0 -2
  283. package/esm2020/lib/models/divider.config.mjs +0 -2
  284. package/esm2020/lib/models/file-upload-field.config.mjs +0 -2
  285. package/esm2020/lib/models/form-group-list.config.mjs +0 -2
  286. package/esm2020/lib/models/heading.config.mjs +0 -3
  287. package/esm2020/lib/models/image-upload-field.config.mjs +0 -2
  288. package/esm2020/lib/models/index.mjs +0 -18
  289. package/esm2020/lib/models/input-field.config.mjs +0 -2
  290. package/esm2020/lib/models/radio-field.config.mjs +0 -2
  291. package/esm2020/lib/models/select-field.config.mjs +0 -2
  292. package/esm2020/lib/models/slider-field.config.mjs +0 -2
  293. package/esm2020/lib/models/textarea-field.config.mjs +0 -2
  294. package/esm2020/lib/models/unit-conversion-field.config.mjs +0 -2
  295. package/esm2020/lib/pipes/crispr-pipes.module.mjs +0 -26
  296. package/esm2020/lib/pipes/initial-control-value.pipe.mjs +0 -20
  297. package/esm2020/lib/public_api.mjs +0 -10
  298. package/esm2020/lib/sub-group/index.mjs +0 -3
  299. package/esm2020/lib/sub-group/sub-group.component.mjs +0 -20
  300. package/esm2020/lib/sub-group/sub-group.module.mjs +0 -45
  301. package/lib/crispr-forms.module.d.ts +0 -16
  302. package/lib/form-group-list/form-group-list.module.d.ts +0 -15
  303. package/lib/form.helpers.d.ts +0 -88
  304. package/lib/material/checkbox-field/checkbox-field.component.d.ts +0 -23
  305. package/lib/material/file-upload/file-upload.component.d.ts +0 -54
  306. package/lib/material/heading/heading.component.d.ts +0 -17
  307. package/lib/material/image-upload-field/image-compression.helpers.d.ts +0 -1
  308. package/lib/material/image-upload-field/image-upload-field.component.d.ts +0 -68
  309. package/lib/material/index.d.ts +0 -17
  310. package/lib/material/info/info.component.d.ts +0 -15
  311. package/lib/material/input-field/input-field.component.d.ts +0 -24
  312. package/lib/material/material.module.d.ts +0 -44
  313. package/lib/material/radio-field/radio-field.component.d.ts +0 -26
  314. package/lib/material/selected-file/selected-file.component.d.ts +0 -17
  315. package/lib/material/slider-field/slider-field.component.d.ts +0 -27
  316. package/lib/material/textarea-field/textarea-field.component.d.ts +0 -24
  317. package/lib/public_api.d.ts +0 -9
  318. package/lib/sub-group/sub-group.component.d.ts +0 -24
  319. package/tft-crispr-forms-13.0.23.tgz +0 -0
  320. package/tft-crispr-forms.d.ts +0 -5
@@ -0,0 +1,182 @@
1
+ import { __awaiter } from 'tslib';
2
+ import * as i3 from '@angular/common';
3
+ import { CommonModule } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { Component, ChangeDetectionStrategy, Optional, Self, ViewChild } from '@angular/core';
6
+ import * as i1 from '@angular/forms';
7
+ import { ReactiveFormsModule } from '@angular/forms';
8
+ import * as i5 from '@angular/material/button';
9
+ import { MatButtonModule } from '@angular/material/button';
10
+ import * as i6 from '@angular/material/form-field';
11
+ import { MatFormFieldModule } from '@angular/material/form-field';
12
+ import * as i4 from '@angular/material/icon';
13
+ import { MatIconModule } from '@angular/material/icon';
14
+ import * as i7 from '@angular/material/input';
15
+ import { MatInputModule } from '@angular/material/input';
16
+ import imageCompression from 'browser-image-compression';
17
+ import { Subject, combineLatest, of } from 'rxjs';
18
+ import { shareReplay, switchMap, map, tap, startWith } from 'rxjs/operators';
19
+ import * as i8 from '@tft/form-validation-handler';
20
+ import { FormValidationHandlerModule } from '@tft/form-validation-handler';
21
+ import { FileDropzoneDirective } from '@tft/crispr-forms/ui/file-dropzone';
22
+ import { SelectedFileComponent } from '@tft/crispr-forms/ui/selected-file';
23
+ import { FieldContainerComponent } from '@tft/crispr-forms/ui/field-container';
24
+ import { crisprControlMixin, CrisprFieldComponent, convertBytesToMb } from '@tft/crispr-forms/utils';
25
+ import * as i2 from '@angular/platform-browser';
26
+
27
+ const ImageUploadFieldMixin = crisprControlMixin(CrisprFieldComponent);
28
+ class ImageUploadFieldComponent extends ImageUploadFieldMixin {
29
+ constructor(ngControl, domSanitizer, cdr) {
30
+ super();
31
+ this.ngControl = ngControl;
32
+ this.domSanitizer = domSanitizer;
33
+ this.cdr = cdr;
34
+ this.defaultConfig = {
35
+ // allowMultipleFiles: false,
36
+ acceptedTypes: 'image/*',
37
+ dropZoneText: 'DROP FILE HERE',
38
+ selectFilesButtonType: 'button',
39
+ selectButtonText: 'SELECT',
40
+ showClearFilesButton: true,
41
+ clearFilesButtonText: 'CLEAR',
42
+ resetFilesButtonText: 'RESET',
43
+ imagePreviewHeight: '250px',
44
+ compressImage: false,
45
+ targetCompressedImageFileSizeMb: .4,
46
+ minCompressionThresholdMb: .6,
47
+ useWebWorker: true,
48
+ };
49
+ this.inputImageFileSubject = new Subject();
50
+ this.inputImageFile$ = this.inputImageFileSubject.asObservable().pipe(shareReplay(1));
51
+ this.compressedFile$ = this.inputImageFile$.pipe(switchMap((file) => __awaiter(this, void 0, void 0, function* () {
52
+ if (!file || !(file instanceof File))
53
+ return null;
54
+ const { compressImage, targetCompressedImageFileSizeMb, minCompressionThresholdMb, maxWidthOrHeight, useWebWorker } = this.config;
55
+ const fileSizeMb = convertBytesToMb(file.size);
56
+ const shouldCompress = compressImage
57
+ && targetCompressedImageFileSizeMb < fileSizeMb
58
+ && minCompressionThresholdMb < fileSizeMb;
59
+ if (shouldCompress) {
60
+ const options = Object.assign(Object.assign({}, (maxWidthOrHeight ? { maxWidthOrHeight } : { maxSizeMB: targetCompressedImageFileSizeMb })), { useWebWorker, maxIterations: 30, onProgress: (progress) => {
61
+ this.progress = progress;
62
+ this.cdr.detectChanges();
63
+ } });
64
+ return yield imageCompression(file, options);
65
+ }
66
+ else
67
+ return file;
68
+ })), map((compressedFile) => {
69
+ if (!compressedFile)
70
+ return compressedFile;
71
+ const { type, name, lastModified } = compressedFile;
72
+ return new File([compressedFile], this.config.fileName || name, {
73
+ type,
74
+ lastModified
75
+ });
76
+ }), tap(file => {
77
+ // only set the value if there is a file because resetToInitialValue sets the control value
78
+ // to initial value and clears the compressed image, so setting it to null here would undo that
79
+ if (file) {
80
+ this.control.setValue(file);
81
+ }
82
+ if (file || this.value) {
83
+ this.control.markAsTouched();
84
+ setTimeout(() => {
85
+ this.cdr.detectChanges();
86
+ }, 100);
87
+ }
88
+ }), shareReplay(1));
89
+ this.compressedImageUrlString$ = this.compressedFile$.pipe(switchMap((file) => __awaiter(this, void 0, void 0, function* () {
90
+ if (!file)
91
+ return null;
92
+ const compressedStringImage = yield imageCompression.getDataUrlFromFile(file);
93
+ return this.domSanitizer.bypassSecurityTrustResourceUrl(compressedStringImage);
94
+ })), shareReplay(1));
95
+ this.isUploaded = false;
96
+ if (this.ngControl != null) {
97
+ // Setting the value accessor directly (instead of using
98
+ // the providers) to avoid running into a circular import.
99
+ ngControl.valueAccessor = this;
100
+ }
101
+ }
102
+ ngOnInit() {
103
+ super.ngOnInit();
104
+ this.imageSrcUrl$ = combineLatest([
105
+ this.compressedImageUrlString$.pipe(startWith(null)),
106
+ this.control.valueChanges.pipe(startWith(this.value), map((controlValue) => {
107
+ var _a, _b;
108
+ if (!controlValue)
109
+ return null;
110
+ if (controlValue instanceof File)
111
+ return null;
112
+ return ((_b = (_a = this.config).mapInputValueToUrl) === null || _b === void 0 ? void 0 : _b.call(_a, controlValue)) || controlValue;
113
+ }))
114
+ ]).pipe(map(([compressedImageUrlString, controlUrl]) => {
115
+ return compressedImageUrlString || controlUrl || null;
116
+ }));
117
+ this.disabled$ = this.config.disabledCallback
118
+ ? this.config.disabledCallback(this.group)
119
+ : of(false);
120
+ }
121
+ filesChanged(files) {
122
+ if (files && files.length > 0) {
123
+ const imageFile = files[0];
124
+ // We clear the control here so that it is invalid while compressing
125
+ // the input pipeline will take care of resetting it
126
+ this.control.patchValue(null);
127
+ // this.control.setErrors({compressing: {loadingMessage: 'Please wait while file compresses'}});
128
+ this.control.markAsTouched();
129
+ this.inputImageFileSubject.next(imageFile);
130
+ }
131
+ }
132
+ clearFileInput() {
133
+ this.inputImageFileSubject.next(null);
134
+ this.fileInputRef.nativeElement.value = '';
135
+ this.control.patchValue(null);
136
+ this.control.markAsTouched();
137
+ this.isUploaded = false;
138
+ }
139
+ resetToInitialValue(initialValue) {
140
+ this.inputImageFileSubject.next(null);
141
+ this.control.patchValue(initialValue);
142
+ this.isUploaded = false;
143
+ }
144
+ writeValue(value) { }
145
+ registerOnChange(fn) {
146
+ this.onChange = fn;
147
+ }
148
+ registerOnTouched(fn) { }
149
+ }
150
+ ImageUploadFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: ImageUploadFieldComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i2.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
151
+ ImageUploadFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", type: ImageUploadFieldComponent, isStandalone: true, selector: "crispr-image-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\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label>{{config.label}}</mat-label>\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n [accept]=\"config.acceptedTypes\"\n (change)=\"filesChanged($event.target.files)\"/>\n <div class=\"ui-container\">\n\n <div class=\"image-preview\" [style.height]=\"config.imagePreviewHeight\">\n <crispr-selected-file\n *ngIf=\"(progress < 100) && inputImageFile$ | async as file; else dropzoneOrPreview\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"'Compressing: ' + file.name\"\n [showProgress]=\"true\"\n [progress]=\"progress\">\n </crispr-selected-file>\n\n <ng-template #dropzoneOrPreview>\n <!-- <img *ngIf=\"(initialUrlString$ | async) as initialUrlString;\" [src]=\"initialUrlString\" alt=\"\"> -->\n <img *ngIf=\"imageSrcUrl$ | async as srcUrl; else noImage\" [src]=\"srcUrl\" alt=\"\">\n <ng-template #noImage>\n <div class=\"drop-container\"\n [crisprFileDropzone]=\"!(disabled$ | async)\"\n (fileDrop)=\"filesChanged($event)\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n </div>\n </ng-template>\n\n </ng-template>\n </div>\n\n\n\n <!-- </ng-template> -->\n <div class=\"button-container\" *ngIf=\"true\">\n\n <button\n mat-button\n (click)=\"clearFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>delete</mat-icon>\n {{config.clearFilesButtonText}}\n </button>\n\n <button\n *ngIf=\"value\"\n mat-button\n (click)=\"resetToInitialValue(value)\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>replay</mat-icon>\n {{config.resetFilesButtonText}}\n </button>\n\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async)\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n <mat-icon>\n camera\n </mat-icon>\n SELECT\n </button>\n </div>\n </div>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-form-field .mat-form-field-infix{padding-top:0}:host ::ng-deep .mat-form-field .mat-button-wrapper{display:flex;flex-direction:column;align-items:center;padding-top:8px}:host .ui-container{display:flex;flex-direction:column}:host .ui-container .image-preview{display:flex;flex-direction:column;align-content:space-between;justify-content:center;align-items:center;margin:8px 0;flex-grow:1}:host .ui-container .image-preview crispr-selected-file{width:100%}:host .ui-container .image-preview .drop-container{display:flex;box-sizing:border-box;flex-direction:column;align-items:center;border:3px dashed gray;height:100%;width:100%;align-content:center;justify-content:center;border-radius:8px}:host .ui-container .image-preview .drop-container .drop-icon{height:32px;width:32px;font-size:36px}:host .ui-container .image-preview .drop-container .mat-h2{margin:0}:host .ui-container .image-preview img{height:inherit;max-width:100%}:host .ui-container .button-container{display:flex;flex-direction:var(--image-upload-button-container-direction);justify-content:flex-end}:host .ui-container .button-container button{margin-left:8px}:host input{position:absolute;max-height:0;visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "component", type: FieldContainerComponent, selector: "crispr-field-container", inputs: ["config", "group", "inlineField"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i7.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: "directive", type: FileDropzoneDirective, selector: "[crisprFileDropzone]", inputs: ["crisprFileDropzone"], outputs: ["fileDrop"] }, { kind: "ngmodule", type: FormValidationHandlerModule }, { kind: "directive", type: i8.ControlErrorsDirective, selector: "[formControl], [formControlName]" }, { kind: "directive", type: i8.ControlErrorContainerDirective, selector: "[controlErrorContainer], [formGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true });
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: ImageUploadFieldComponent, decorators: [{
153
+ type: Component,
154
+ args: [{ selector: 'crispr-image-upload-field', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
155
+ CommonModule,
156
+ FieldContainerComponent,
157
+ ReactiveFormsModule,
158
+ MatIconModule,
159
+ MatButtonModule,
160
+ MatFormFieldModule,
161
+ MatInputModule,
162
+ SelectedFileComponent,
163
+ FileDropzoneDirective,
164
+ FormValidationHandlerModule
165
+ ], template: "<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label>{{config.label}}</mat-label>\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n [accept]=\"config.acceptedTypes\"\n (change)=\"filesChanged($event.target.files)\"/>\n <div class=\"ui-container\">\n\n <div class=\"image-preview\" [style.height]=\"config.imagePreviewHeight\">\n <crispr-selected-file\n *ngIf=\"(progress < 100) && inputImageFile$ | async as file; else dropzoneOrPreview\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"'Compressing: ' + file.name\"\n [showProgress]=\"true\"\n [progress]=\"progress\">\n </crispr-selected-file>\n\n <ng-template #dropzoneOrPreview>\n <!-- <img *ngIf=\"(initialUrlString$ | async) as initialUrlString;\" [src]=\"initialUrlString\" alt=\"\"> -->\n <img *ngIf=\"imageSrcUrl$ | async as srcUrl; else noImage\" [src]=\"srcUrl\" alt=\"\">\n <ng-template #noImage>\n <div class=\"drop-container\"\n [crisprFileDropzone]=\"!(disabled$ | async)\"\n (fileDrop)=\"filesChanged($event)\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n </div>\n </ng-template>\n\n </ng-template>\n </div>\n\n\n\n <!-- </ng-template> -->\n <div class=\"button-container\" *ngIf=\"true\">\n\n <button\n mat-button\n (click)=\"clearFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>delete</mat-icon>\n {{config.clearFilesButtonText}}\n </button>\n\n <button\n *ngIf=\"value\"\n mat-button\n (click)=\"resetToInitialValue(value)\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>replay</mat-icon>\n {{config.resetFilesButtonText}}\n </button>\n\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async)\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n <mat-icon>\n camera\n </mat-icon>\n SELECT\n </button>\n </div>\n </div>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n", styles: [":host ::ng-deep .mat-form-field .mat-form-field-infix{padding-top:0}:host ::ng-deep .mat-form-field .mat-button-wrapper{display:flex;flex-direction:column;align-items:center;padding-top:8px}:host .ui-container{display:flex;flex-direction:column}:host .ui-container .image-preview{display:flex;flex-direction:column;align-content:space-between;justify-content:center;align-items:center;margin:8px 0;flex-grow:1}:host .ui-container .image-preview crispr-selected-file{width:100%}:host .ui-container .image-preview .drop-container{display:flex;box-sizing:border-box;flex-direction:column;align-items:center;border:3px dashed gray;height:100%;width:100%;align-content:center;justify-content:center;border-radius:8px}:host .ui-container .image-preview .drop-container .drop-icon{height:32px;width:32px;font-size:36px}:host .ui-container .image-preview .drop-container .mat-h2{margin:0}:host .ui-container .image-preview img{height:inherit;max-width:100%}:host .ui-container .button-container{display:flex;flex-direction:var(--image-upload-button-container-direction);justify-content:flex-end}:host .ui-container .button-container button{margin-left:8px}:host input{position:absolute;max-height:0;visibility:hidden}\n"] }]
166
+ }], ctorParameters: function () {
167
+ return [{ type: i1.NgControl, decorators: [{
168
+ type: Optional
169
+ }, {
170
+ type: Self
171
+ }] }, { type: i2.DomSanitizer }, { type: i0.ChangeDetectorRef }];
172
+ }, propDecorators: { fileInputRef: [{
173
+ type: ViewChild,
174
+ args: ['fileInput']
175
+ }] } });
176
+
177
+ /**
178
+ * Generated bundle index. Do not edit.
179
+ */
180
+
181
+ export { ImageUploadFieldComponent };
182
+ //# sourceMappingURL=tft-crispr-forms-ui-image-upload-field.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-ui-image-upload-field.mjs","sources":["../../../../libs/crispr-forms/ui/image-upload-field/image-upload-field.component.ts","../../../../libs/crispr-forms/ui/image-upload-field/image-upload-field.component.html","../../../../libs/crispr-forms/ui/image-upload-field/tft-crispr-forms-ui-image-upload-field.ts"],"sourcesContent":["/* eslint-disable @nrwl/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 ChangeDetectorRef,\n} from '@angular/core';\nimport { ControlValueAccessor, NgControl, ReactiveFormsModule } 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 { DomSanitizer } from '@angular/platform-browser';\nimport imageCompression from 'browser-image-compression';\nimport { combineLatest, Observable, of, Subject } from 'rxjs';\nimport { map, shareReplay, startWith, switchMap, tap } from 'rxjs/operators';\nimport { FormValidationHandlerModule } from '@tft/form-validation-handler';\nimport { FileDropzoneDirective } from '@tft/crispr-forms/ui/file-dropzone';\nimport { SelectedFileComponent } from '@tft/crispr-forms/ui/selected-file';\nimport { FieldContainerComponent } from '@tft/crispr-forms/ui/field-container';\nimport { crisprControlMixin, CrisprFieldComponent, convertBytesToMb, ImageUploadFieldConfig } from '@tft/crispr-forms/utils';\n\nconst ImageUploadFieldMixin = crisprControlMixin<ImageUploadFieldConfig>(CrisprFieldComponent);\n\n@Component({\n selector: 'crispr-image-upload-field',\n templateUrl: './image-upload-field.component.html',\n styleUrls: ['./image-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 FileDropzoneDirective,\n FormValidationHandlerModule\n ],\n})\nexport class ImageUploadFieldComponent extends ImageUploadFieldMixin implements OnInit, ControlValueAccessor {\n\n onChange: () => void;\n\n defaultConfig: Partial<ImageUploadFieldConfig> = {\n // allowMultipleFiles: false,\n acceptedTypes: 'image/*',\n dropZoneText: 'DROP FILE HERE',\n selectFilesButtonType: 'button',\n selectButtonText: 'SELECT',\n showClearFilesButton: true,\n clearFilesButtonText: 'CLEAR',\n resetFilesButtonText: 'RESET',\n imagePreviewHeight: '250px',\n compressImage: false,\n targetCompressedImageFileSizeMb: .4,\n minCompressionThresholdMb: .6,\n useWebWorker: true,\n }\n\n private inputImageFileSubject = new Subject<File | null>();\n inputImageFile$ = this.inputImageFileSubject.asObservable().pipe(\n shareReplay(1),\n );\n /**\n * the compression progress\n */\n progress: number | undefined;\n\n compressedFile$: Observable<File> = this.inputImageFile$.pipe(\n switchMap(async (file) => {\n if (!file || !(file instanceof File)) return null;\n const { compressImage, targetCompressedImageFileSizeMb, minCompressionThresholdMb, maxWidthOrHeight, useWebWorker } = this.config;\n const fileSizeMb = convertBytesToMb(file.size);\n const shouldCompress = compressImage\n && targetCompressedImageFileSizeMb < fileSizeMb\n && minCompressionThresholdMb < fileSizeMb\n if (shouldCompress) {\n const options = {\n // Use maxWidthOrHeight if it was provided, else use target compressed size\n ...(maxWidthOrHeight ? {maxWidthOrHeight} : { maxSizeMB: targetCompressedImageFileSizeMb}),\n useWebWorker,\n maxIterations: 30,\n onProgress: (progress: number) => {\n this.progress = progress;\n this.cdr.detectChanges();\n }\n }\n return await imageCompression(file, options);\n } else return file;\n }),\n map((compressedFile: File) => {\n if(!compressedFile) return compressedFile;\n const { type, name, lastModified } = compressedFile\n return new File([compressedFile], this.config.fileName || name, {\n type,\n lastModified\n });\n }),\n tap(file => {\n // only set the value if there is a file because resetToInitialValue sets the control value\n // to initial value and clears the compressed image, so setting it to null here would undo that\n if (file) {\n this.control.setValue(file);\n }\n if (file || this.value) {\n this.control.markAsTouched();\n setTimeout(() => {\n this.cdr.detectChanges();\n }, 100)\n }\n }),\n shareReplay(1)\n )\n\n compressedImageUrlString$: Observable<string | null> = this.compressedFile$.pipe(\n switchMap(async (file) => {\n if(!file) return null;\n const compressedStringImage = await imageCompression.getDataUrlFromFile(file);\n return this.domSanitizer.bypassSecurityTrustResourceUrl(compressedStringImage) as string\n }),\n shareReplay(1),\n )\n\n // This is what is displayed by the image preview\n imageSrcUrl$: Observable<string | null>;\n\n @ViewChild('fileInput') fileInputRef: ElementRef\n\n selectedFiles: FileList;\n\n isUploaded = false;\n\n disabled$: Observable<boolean>;\n\n constructor(\n @Optional() @Self() public ngControl: NgControl,\n private domSanitizer: DomSanitizer,\n private cdr: ChangeDetectorRef,\n ) {\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.imageSrcUrl$ = combineLatest([\n this.compressedImageUrlString$.pipe(startWith(null)),\n this.control.valueChanges.pipe(\n startWith(this.value),\n map((controlValue): string => {\n if(!controlValue) return null;\n if(controlValue instanceof File) return null;\n return this.config.mapInputValueToUrl?.(controlValue) || controlValue as string\n })\n )\n ]).pipe(\n map(([compressedImageUrlString, controlUrl]) => {\n return compressedImageUrlString || controlUrl || null;\n })\n )\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 const imageFile = files[0];\n // We clear the control here so that it is invalid while compressing\n // the input pipeline will take care of resetting it\n this.control.patchValue(null);\n // this.control.setErrors({compressing: {loadingMessage: 'Please wait while file compresses'}});\n this.control.markAsTouched();\n this.inputImageFileSubject.next(imageFile);\n }\n }\n\n clearFileInput(): void {\n this.inputImageFileSubject.next(null);\n this.fileInputRef.nativeElement.value = ''\n this.control.patchValue(null);\n this.control.markAsTouched();\n this.isUploaded = false;\n }\n\n resetToInitialValue(initialValue: string): void {\n this.inputImageFileSubject.next(null);\n this.control.patchValue(initialValue)\n this.isUploaded = false;\n }\n\n writeValue( value: null ) { }\n\n registerOnChange( fn: () => void ) {\n this.onChange = fn;\n }\n\n registerOnTouched( fn: () => void ) { }\n}\n\n\n","<crispr-field-container\n [config]=\"config\"\n [group]=\"group\">\n\n <mat-form-field floatLabel=\"always\"\n [color]=\"config.color\"\n [appearance]=\"config.appearance\"\n [formGroup]=\"group\">\n <mat-label>{{config.label}}</mat-label>\n <input [formControlName]=\"config.controlName\" matInput type=\"text\"/>\n <input\n #fileInput\n type=\"file\"\n [accept]=\"config.acceptedTypes\"\n (change)=\"filesChanged($event.target.files)\"/>\n <div class=\"ui-container\">\n\n <div class=\"image-preview\" [style.height]=\"config.imagePreviewHeight\">\n <crispr-selected-file\n *ngIf=\"(progress < 100) && inputImageFile$ | async as file; else dropzoneOrPreview\"\n [color]=\"config.color === 'primary' ? 'accent' : 'primary'\"\n [fileName]=\"'Compressing: ' + file.name\"\n [showProgress]=\"true\"\n [progress]=\"progress\">\n </crispr-selected-file>\n\n <ng-template #dropzoneOrPreview>\n <!-- <img *ngIf=\"(initialUrlString$ | async) as initialUrlString;\" [src]=\"initialUrlString\" alt=\"\"> -->\n <img *ngIf=\"imageSrcUrl$ | async as srcUrl; else noImage\" [src]=\"srcUrl\" alt=\"\">\n <ng-template #noImage>\n <div class=\"drop-container\"\n [crisprFileDropzone]=\"!(disabled$ | async)\"\n (fileDrop)=\"filesChanged($event)\">\n <mat-icon class=\"drop-icon\" inline=\"true\">cloud_upload</mat-icon>\n <h2 class=\"mat-h2\">{{config.dropZoneText}}</h2>\n </div>\n </ng-template>\n\n </ng-template>\n </div>\n\n\n\n <!-- </ng-template> -->\n <div class=\"button-container\" *ngIf=\"true\">\n\n <button\n mat-button\n (click)=\"clearFileInput()\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>delete</mat-icon>\n {{config.clearFilesButtonText}}\n </button>\n\n <button\n *ngIf=\"value\"\n mat-button\n (click)=\"resetToInitialValue(value)\"\n type=\"button\"\n [disabled]=\"(disabled$ | async)\"\n aria-label=\"Remove Selected File(s)\">\n <mat-icon>replay</mat-icon>\n {{config.resetFilesButtonText}}\n </button>\n\n <button\n mat-button\n type=\"button\"\n color=\"primary\"\n [disabled]=\"(disabled$ | async)\"\n (click)=\"fileInput.click()\"\n [attr.aria-label]=\"config.controlName\">\n <mat-icon>\n camera\n </mat-icon>\n SELECT\n </button>\n </div>\n </div>\n\n <mat-hint *ngIf=\"config.hint && (control.valid || !control.touched)\">{{config.hint}}</mat-hint>\n\n </mat-form-field>\n\n</crispr-field-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,qBAAqB,GAAG,kBAAkB,CAAyB,oBAAoB,CAAC,CAAC;AAqBzF,MAAO,yBAA0B,SAAQ,qBAAqB,CAAA;AA+FlE,IAAA,WAAA,CAC6B,SAAoB,EACvC,YAA0B,EAC1B,GAAsB,EAAA;AAE9B,QAAA,KAAK,EAAE,CAAC;AAJmB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;AACvC,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;AAC1B,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QA9FhC,IAAA,CAAA,aAAa,GAAoC;;AAE/C,YAAA,aAAa,EAAE,SAAS;AACxB,YAAA,YAAY,EAAE,gBAAgB;AAC9B,YAAA,qBAAqB,EAAE,QAAQ;AAC/B,YAAA,gBAAgB,EAAE,QAAQ;AAC1B,YAAA,oBAAoB,EAAE,IAAI;AAC1B,YAAA,oBAAoB,EAAE,OAAO;AAC7B,YAAA,oBAAoB,EAAE,OAAO;AAC7B,YAAA,kBAAkB,EAAE,OAAO;AAC3B,YAAA,aAAa,EAAE,KAAK;AACpB,YAAA,+BAA+B,EAAE,EAAE;AACnC,YAAA,yBAAyB,EAAE,EAAE;AAC7B,YAAA,YAAY,EAAE,IAAI;SACnB,CAAA;AAEO,QAAA,IAAA,CAAA,qBAAqB,GAAG,IAAI,OAAO,EAAe,CAAC;AAC3D,QAAA,IAAA,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AA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACrB,2BAA2B,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAGlB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAnBrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,mBAGpB,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,qBAAqB;wBACrB,2BAA2B;qBAC5B,EAAA,QAAA,EAAA,i2FAAA,EAAA,MAAA,EAAA,CAAA,6rCAAA,CAAA,EAAA,CAAA;;;8BAkGE,QAAQ;;8BAAI,IAAI;;yBATK,YAAY,EAAA,CAAA;sBAAnC,SAAS;uBAAC,WAAW,CAAA;;;AEvIxB;;AAEG;;;;"}
@@ -0,0 +1,30 @@
1
+ import * as i1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
5
+ import * as i2 from '@angular/material/icon';
6
+ import { MatIconModule } from '@angular/material/icon';
7
+ import * as i3 from '@angular/material/tooltip';
8
+ import { MatTooltipModule } from '@angular/material/tooltip';
9
+
10
+ class InfoComponent {
11
+ }
12
+ InfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13
+ InfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", 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 matSuffix>\n {{info.iconName || 'info'}}\n</mat-icon>\n", styles: [":host mat-icon{font-size:1.2em;width:1em;height:1em;opacity:.8;margin-right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, preserveWhitespaces: true });
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: InfoComponent, decorators: [{
15
+ type: Component,
16
+ args: [{ selector: 'crispr-info', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
17
+ CommonModule,
18
+ MatIconModule,
19
+ MatTooltipModule
20
+ ], template: "<mat-icon\n *ngIf=\"info\"\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\"\n matSuffix>\n {{info.iconName || 'info'}}\n</mat-icon>\n", styles: [":host mat-icon{font-size:1.2em;width:1em;height:1em;opacity:.8;margin-right:0}\n"] }]
21
+ }], propDecorators: { info: [{
22
+ type: Input
23
+ }] } });
24
+
25
+ /**
26
+ * Generated bundle index. Do not edit.
27
+ */
28
+
29
+ export { InfoComponent };
30
+ //# sourceMappingURL=tft-crispr-forms-ui-info.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-ui-info.mjs","sources":["../../../../libs/crispr-forms/ui/info/info.component.ts","../../../../libs/crispr-forms/ui/info/info.component.html","../../../../libs/crispr-forms/ui/info/tft-crispr-forms-ui-info.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input, ChangeDetectionStrategy } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport type { Info } from '@tft/crispr-forms/utils';\n\n@Component({\n selector: 'crispr-info',\n templateUrl: './info.component.html',\n styleUrls: ['./info.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n MatIconModule,\n MatTooltipModule\n ],\n})\nexport class InfoComponent {\n\n @Input() info: Info;\n\n}\n","<mat-icon\n *ngIf=\"info\"\n [matTooltip]=\"info.content\"\n [matTooltipPosition]=\"info.tooltipPosition || 'below'\"\n matSuffix>\n {{info.iconName || 'info'}}\n</mat-icon>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,iGClB1B,sLAOA,EAAA,MAAA,EAAA,CAAA,kFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDMI,YAAY,EACZ,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,aAAa,mLACb,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAGP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,mBAGN,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,aAAa;wBACb,gBAAgB;qBACjB,EAAA,QAAA,EAAA,sLAAA,EAAA,MAAA,EAAA,CAAA,kFAAA,CAAA,EAAA,CAAA;8BAIQ,IAAI,EAAA,CAAA;sBAAZ,KAAK;;;AEpBR;;AAEG;;;;"}
@@ -0,0 +1,33 @@
1
+ import * as i1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Component, Input } from '@angular/core';
5
+ import * as i2 from '@angular/material/progress-bar';
6
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
7
+
8
+ class SelectedFileComponent {
9
+ }
10
+ SelectedFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: SelectedFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11
+ SelectedFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.1", 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.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], preserveWhitespaces: true });
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.1", ngImport: i0, type: SelectedFileComponent, decorators: [{
13
+ type: Component,
14
+ args: [{ selector: 'crispr-selected-file', standalone: true, imports: [
15
+ CommonModule,
16
+ MatProgressBarModule
17
+ ], 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"] }]
18
+ }], propDecorators: { fileName: [{
19
+ type: Input
20
+ }], progress: [{
21
+ type: Input
22
+ }], showProgress: [{
23
+ type: Input
24
+ }], color: [{
25
+ type: Input
26
+ }] } });
27
+
28
+ /**
29
+ * Generated bundle index. Do not edit.
30
+ */
31
+
32
+ export { SelectedFileComponent };
33
+ //# sourceMappingURL=tft-crispr-forms-ui-selected-file.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tft-crispr-forms-ui-selected-file.mjs","sources":["../../../../libs/crispr-forms/ui/selected-file/selected-file.component.ts","../../../../libs/crispr-forms/ui/selected-file/selected-file.component.html","../../../../libs/crispr-forms/ui/selected-file/tft-crispr-forms-ui-selected-file.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\n@Component({\n selector: 'crispr-selected-file',\n templateUrl: './selected-file.component.html',\n styleUrls: ['./selected-file.component.scss'],\n standalone: true,\n imports: [\n CommonModule,\n MatProgressBarModule\n ],\n})\nexport class SelectedFileComponent {\n\n @Input() fileName: string;\n @Input() progress: number;\n @Input() showProgress: boolean;\n @Input() color: ThemePalette;\n\n}\n","<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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAea,qBAAqB,CAAA;;kHAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,ECflC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,UAAA,EAAA,YAAA,EAAA,cAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,oLAOA,EDII,MAAA,EAAA,CAAA,uCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,kIACZ,oBAAoB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAA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