@koobiq/components 17.0.0-beta.2 → 17.0.0-rc.10

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 (369) hide show
  1. package/README.md +1 -2
  2. package/alert/_alert-theme.scss +48 -24
  3. package/alert/alert.component.d.ts +23 -3
  4. package/alert/alert.component.scss +91 -59
  5. package/autocomplete/_autocomplete-theme.scss +3 -3
  6. package/autocomplete/autocomplete.scss +8 -18
  7. package/badge/_badge-theme.scss +30 -45
  8. package/badge/badge.component.scss +18 -39
  9. package/button/_button-base.scss +7 -14
  10. package/button/_button-theme.scss +30 -86
  11. package/button/button.component.d.ts +3 -2
  12. package/button/button.scss +7 -17
  13. package/button-toggle/_button-toggle-theme.scss +19 -20
  14. package/button-toggle/button-toggle.scss +17 -44
  15. package/card/_card-theme.scss +18 -17
  16. package/card/card.component.scss +3 -6
  17. package/checkbox/_checkbox-theme.scss +50 -50
  18. package/checkbox/checkbox.scss +31 -35
  19. package/code-block/README.md +18 -14
  20. package/code-block/_code-block-theme.scss +53 -23
  21. package/code-block/actionbar.component.scss +11 -25
  22. package/code-block/code-block.component.d.ts +12 -4
  23. package/code-block/code-block.scss +62 -77
  24. package/core/form-field/form-field-ref.d.ts +2 -0
  25. package/core/forms/_forms-theme.scss +4 -8
  26. package/core/forms/_forms.scss +13 -43
  27. package/core/locales/formatters.d.ts +96 -0
  28. package/core/locales/locale-service.d.ts +97 -0
  29. package/core/option/_optgroup-theme.scss +4 -6
  30. package/core/option/_option-action-theme.scss +8 -11
  31. package/core/option/_option-theme.scss +15 -20
  32. package/core/option/optgroup.scss +0 -1
  33. package/core/option/option.scss +0 -1
  34. package/core/pop-up/_pop-up.scss +0 -1
  35. package/core/pop-up/pop-up-trigger.d.ts +3 -1
  36. package/core/select/common.d.ts +35 -0
  37. package/core/select/index.d.ts +1 -0
  38. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +15 -19
  39. package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +9 -9
  40. package/core/services/theme.service.d.ts +3 -2
  41. package/core/styles/_core.scss +0 -1
  42. package/core/styles/_koobiq-theme.scss +5 -3
  43. package/core/styles/common/_animation.scss +9 -8
  44. package/core/styles/common/_button.scss +0 -2
  45. package/core/styles/common/_clearfix.scss +1 -1
  46. package/core/styles/common/_groups.scss +3 -9
  47. package/core/styles/common/_list.scss +28 -31
  48. package/core/styles/common/_overlay.scss +4 -3
  49. package/core/styles/common/_popup.scss +5 -5
  50. package/core/styles/common/_rtl.scss +4 -4
  51. package/core/styles/common/_select.scss +48 -42
  52. package/core/styles/common/_tokens.scss +47 -0
  53. package/core/styles/functions/_number.scss +14 -19
  54. package/core/styles/functions/_string.scss +18 -19
  55. package/core/styles/functions/_timing.scss +24 -24
  56. package/core/styles/theming/_components-theming.scss +1380 -1384
  57. package/core/styles/theming/_scrollbar-theme.scss +8 -5
  58. package/core/styles/theming/_theming.scss +26 -29
  59. package/core/styles/typography/_typography-utils.scss +1 -2
  60. package/core/styles/typography/_typography.scss +138 -85
  61. package/core/styles/visual/_body.scss +0 -2
  62. package/core/styles/visual/_layout.scss +44 -38
  63. package/core/utils/data-size/config.d.ts +20 -2
  64. package/core/utils/data-size/data-size.pipe.d.ts +10 -9
  65. package/core/utils/data-size/size.d.ts +3 -4
  66. package/datepicker/_datepicker-theme.scss +38 -40
  67. package/datepicker/calendar-body.scss +3 -11
  68. package/datepicker/calendar-header.scss +4 -10
  69. package/datepicker/calendar.scss +5 -17
  70. package/datepicker/datepicker-content.scss +5 -15
  71. package/datepicker/datepicker-input.scss +0 -5
  72. package/datepicker/datepicker-toggle.scss +3 -3
  73. package/divider/_divider-theme.scss +2 -1
  74. package/divider/divider.scss +9 -26
  75. package/dl/_dl-theme.scss +5 -8
  76. package/dl/dl.scss +5 -20
  77. package/dropdown/_dropdown-theme.scss +27 -22
  78. package/dropdown/dropdown-item.scss +5 -12
  79. package/dropdown/dropdown-trigger.directive.d.ts +2 -2
  80. package/dropdown/dropdown.scss +6 -15
  81. package/ellipsis-center/ellipsis-center.directive.d.ts +3 -2
  82. package/empty-state/README.md +0 -0
  83. package/empty-state/_empty-state-theme.scss +56 -0
  84. package/empty-state/empty-state.component.d.ts +31 -0
  85. package/empty-state/empty-state.module.d.ts +10 -0
  86. package/empty-state/empty-state.scss +81 -0
  87. package/empty-state/index.d.ts +1 -0
  88. package/empty-state/public-api.d.ts +2 -0
  89. package/esm2022/alert/alert.component.mjs +52 -5
  90. package/esm2022/badge/badge.component.mjs +2 -2
  91. package/esm2022/button/button.component.mjs +13 -6
  92. package/esm2022/button-toggle/button-toggle.component.mjs +2 -2
  93. package/esm2022/checkbox/checkbox.mjs +2 -2
  94. package/esm2022/code-block/actionbar.component.mjs +2 -2
  95. package/esm2022/code-block/code-block.component.mjs +58 -14
  96. package/esm2022/core/animation/select-animations.mjs +4 -4
  97. package/esm2022/core/form-field/form-field-ref.mjs +1 -1
  98. package/esm2022/core/locales/formatters.mjs +97 -1
  99. package/esm2022/core/locales/locale-service.mjs +5 -2
  100. package/esm2022/core/option/option.mjs +2 -2
  101. package/esm2022/core/pop-up/pop-up-trigger.mjs +18 -11
  102. package/esm2022/core/select/common.mjs +120 -0
  103. package/esm2022/core/select/index.mjs +2 -1
  104. package/esm2022/core/services/theme.service.mjs +4 -1
  105. package/esm2022/core/utils/data-size/config.mjs +5 -17
  106. package/esm2022/core/utils/data-size/data-size.pipe.mjs +36 -22
  107. package/esm2022/core/utils/data-size/size.mjs +10 -14
  108. package/esm2022/core/version.mjs +2 -2
  109. package/esm2022/datepicker/calendar-header.component.mjs +1 -1
  110. package/esm2022/datepicker/datepicker-animations.mjs +2 -2
  111. package/esm2022/dropdown/dropdown-animations.mjs +4 -4
  112. package/esm2022/dropdown/dropdown-item.component.mjs +2 -2
  113. package/esm2022/dropdown/dropdown-trigger.directive.mjs +4 -4
  114. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -5
  115. package/esm2022/empty-state/empty-state.component.mjs +104 -0
  116. package/esm2022/empty-state/empty-state.module.mjs +50 -0
  117. package/esm2022/empty-state/index.mjs +2 -0
  118. package/esm2022/empty-state/koobiq-components-empty-state.mjs +5 -0
  119. package/esm2022/empty-state/public-api.mjs +3 -0
  120. package/esm2022/file-upload/file-upload.mjs +15 -1
  121. package/esm2022/file-upload/file-upload.module.mjs +15 -5
  122. package/esm2022/file-upload/multiple-file-upload.component.mjs +98 -49
  123. package/esm2022/file-upload/single-file-upload.component.mjs +110 -54
  124. package/esm2022/form-field/form-field.mjs +2 -2
  125. package/esm2022/form-field/hint.mjs +2 -2
  126. package/esm2022/form-field/password-hint.mjs +2 -2
  127. package/esm2022/form-field/password-toggle.mjs +11 -9
  128. package/esm2022/icon/icon-item.component.mjs +16 -6
  129. package/esm2022/input/input-number.mjs +2 -2
  130. package/esm2022/list/list-selection.component.mjs +2 -2
  131. package/esm2022/list/list.component.mjs +2 -2
  132. package/esm2022/loader-overlay/loader-overlay.component.mjs +2 -2
  133. package/esm2022/markdown/markdown.component.mjs +2 -2
  134. package/esm2022/modal/modal.component.mjs +8 -9
  135. package/esm2022/navbar/navbar-item.component.mjs +11 -11
  136. package/esm2022/navbar/navbar.component.mjs +2 -2
  137. package/esm2022/navbar/vertical-navbar.component.mjs +2 -2
  138. package/esm2022/popover/popover-confirm.component.mjs +3 -3
  139. package/esm2022/popover/popover.component.mjs +3 -3
  140. package/esm2022/radio/radio.component.mjs +2 -2
  141. package/esm2022/scrollbar/scrollbar.component.mjs +2 -2
  142. package/esm2022/select/select-option.directive.mjs +7 -5
  143. package/esm2022/select/select.component.mjs +71 -125
  144. package/esm2022/select/select.module.mjs +28 -28
  145. package/esm2022/splitter/splitter.component.mjs +37 -17
  146. package/esm2022/table/table.component.mjs +29 -6
  147. package/esm2022/table/table.module.mjs +14 -6
  148. package/esm2022/tabs/tab-body.component.mjs +1 -1
  149. package/esm2022/tabs/tab-group.component.mjs +55 -13
  150. package/esm2022/tabs/tab-header.component.mjs +2 -2
  151. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  152. package/esm2022/tags/tag-default-options.mjs +1 -1
  153. package/esm2022/tags/tag-input.mjs +17 -3
  154. package/esm2022/tags/tag-list.component.mjs +2 -2
  155. package/esm2022/tags/tag.component.mjs +4 -4
  156. package/esm2022/textarea/textarea.component.mjs +12 -10
  157. package/esm2022/timepicker/timepicker.directive.mjs +11 -3
  158. package/esm2022/timezone/timezone-option.component.mjs +2 -2
  159. package/esm2022/timezone/timezone-option.directive.mjs +7 -5
  160. package/esm2022/timezone/timezone-select.component.mjs +5 -5
  161. package/esm2022/title/title.directive.mjs +3 -4
  162. package/esm2022/toast/toast-container.component.mjs +2 -2
  163. package/esm2022/toast/toast.component.mjs +4 -4
  164. package/esm2022/toast/toast.service.mjs +18 -13
  165. package/esm2022/toast/toast.type.mjs +3 -1
  166. package/esm2022/tooltip/tooltip.component.mjs +28 -14
  167. package/esm2022/tree/padding.directive.mjs +2 -2
  168. package/esm2022/tree/tree-base.mjs +2 -2
  169. package/esm2022/tree/tree-option.component.mjs +2 -2
  170. package/esm2022/tree/tree-selection.component.mjs +6 -1
  171. package/esm2022/tree-select/tree-select.component.mjs +29 -44
  172. package/esm2022/tree-select/tree-select.module.mjs +31 -11
  173. package/fesm2022/koobiq-components-alert.mjs +52 -5
  174. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  175. package/fesm2022/koobiq-components-badge.mjs +2 -2
  176. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  177. package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
  178. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  179. package/fesm2022/koobiq-components-button.mjs +12 -5
  180. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  181. package/fesm2022/koobiq-components-checkbox.mjs +2 -2
  182. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  183. package/fesm2022/koobiq-components-code-block.mjs +57 -14
  184. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  185. package/fesm2022/koobiq-components-core.mjs +285 -67
  186. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  187. package/fesm2022/koobiq-components-datepicker.mjs +2 -2
  188. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  189. package/fesm2022/koobiq-components-dropdown.mjs +8 -8
  190. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  191. package/fesm2022/koobiq-components-ellipsis-center.mjs +5 -4
  192. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  193. package/fesm2022/koobiq-components-empty-state.mjs +157 -0
  194. package/fesm2022/koobiq-components-empty-state.mjs.map +1 -0
  195. package/fesm2022/koobiq-components-file-upload.mjs +225 -97
  196. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  197. package/fesm2022/koobiq-components-form-field.mjs +21 -21
  198. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  199. package/fesm2022/koobiq-components-icon.mjs +14 -4
  200. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  201. package/fesm2022/koobiq-components-input.mjs +1 -1
  202. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  203. package/fesm2022/koobiq-components-list.mjs +4 -4
  204. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  205. package/fesm2022/koobiq-components-loader-overlay.mjs +1 -1
  206. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  207. package/fesm2022/koobiq-components-markdown.mjs +2 -2
  208. package/fesm2022/koobiq-components-modal.mjs +7 -8
  209. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  210. package/fesm2022/koobiq-components-navbar.mjs +14 -14
  211. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  212. package/fesm2022/koobiq-components-popover.mjs +4 -4
  213. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  214. package/fesm2022/koobiq-components-radio.mjs +2 -2
  215. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  216. package/fesm2022/koobiq-components-scrollbar.mjs +2 -2
  217. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  218. package/fesm2022/koobiq-components-select.mjs +102 -155
  219. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  220. package/fesm2022/koobiq-components-splitter.mjs +36 -16
  221. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  222. package/fesm2022/koobiq-components-table.mjs +41 -10
  223. package/fesm2022/koobiq-components-table.mjs.map +1 -1
  224. package/fesm2022/koobiq-components-tabs.mjs +57 -15
  225. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  226. package/fesm2022/koobiq-components-tags.mjs +21 -8
  227. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  228. package/fesm2022/koobiq-components-textarea.mjs +11 -9
  229. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  230. package/fesm2022/koobiq-components-timepicker.mjs +10 -2
  231. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  232. package/fesm2022/koobiq-components-timezone.mjs +11 -10
  233. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  234. package/fesm2022/koobiq-components-title.mjs +2 -3
  235. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  236. package/fesm2022/koobiq-components-toast.mjs +25 -17
  237. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  238. package/fesm2022/koobiq-components-tooltip.mjs +26 -13
  239. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  240. package/fesm2022/koobiq-components-tree-select.mjs +57 -51
  241. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  242. package/fesm2022/koobiq-components-tree.mjs +9 -4
  243. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  244. package/file-upload/_file-upload-theme.scss +124 -73
  245. package/file-upload/file-upload.d.ts +1 -1
  246. package/file-upload/file-upload.module.d.ts +11 -9
  247. package/file-upload/file-upload.scss +0 -6
  248. package/file-upload/multiple-file-upload.component.d.ts +38 -10
  249. package/file-upload/multiple-file-upload.component.scss +50 -120
  250. package/file-upload/single-file-upload.component.d.ts +40 -13
  251. package/file-upload/single-file-upload.component.scss +12 -33
  252. package/form-field/_form-field-theme.scss +46 -36
  253. package/form-field/_hint-theme.scss +15 -20
  254. package/form-field/cleaner.scss +3 -9
  255. package/form-field/form-field.scss +23 -26
  256. package/form-field/hint.scss +5 -8
  257. package/form-field/password-toggle.d.ts +3 -2
  258. package/form-field/password-toggle.scss +3 -10
  259. package/form-field/stepper.scss +4 -11
  260. package/icon/_icon-button-theme.scss +47 -36
  261. package/icon/_icon-item-theme.scss +47 -26
  262. package/icon/_icon-theme.scss +12 -14
  263. package/icon/icon-button.scss +5 -20
  264. package/icon/icon-item.component.d.ts +3 -1
  265. package/icon/icon-item.scss +10 -8
  266. package/icon/icon.scss +0 -6
  267. package/input/_input-theme.scss +6 -4
  268. package/input/input.scss +11 -10
  269. package/link/_link-theme.scss +30 -49
  270. package/list/_list-theme.scss +21 -19
  271. package/list/list.scss +2 -6
  272. package/loader-overlay/_loader-overlay-theme.scss +17 -18
  273. package/loader-overlay/loader-overlay.scss +9 -33
  274. package/markdown/_markdown-theme.scss +47 -47
  275. package/markdown/markdown.scss +41 -91
  276. package/modal/README.md +5 -4
  277. package/modal/_modal-animation.scss +0 -1
  278. package/modal/_modal-confirm.scss +2 -7
  279. package/modal/_modal-theme.scss +11 -13
  280. package/modal/modal.component.d.ts +1 -1
  281. package/modal/modal.scss +15 -31
  282. package/navbar/README.md +21 -20
  283. package/navbar/_navbar-item_horizontal.scss +28 -29
  284. package/navbar/_navbar-item_vertical.scss +31 -31
  285. package/navbar/_navbar-theme.scss +20 -24
  286. package/navbar/navbar-brand.scss +24 -27
  287. package/navbar/navbar-divider.scss +4 -8
  288. package/navbar/navbar-item.component.d.ts +4 -4
  289. package/navbar/navbar-item.scss +13 -15
  290. package/navbar/navbar.scss +2 -6
  291. package/navbar/vertical-navbar.scss +4 -6
  292. package/package.json +23 -16
  293. package/popover/README.md +18 -14
  294. package/popover/_popover-theme.scss +9 -17
  295. package/popover/popover.scss +15 -29
  296. package/prebuilt-themes/dark-theme.css +1 -1
  297. package/prebuilt-themes/light-theme.css +1 -1
  298. package/progress-bar/_progress-bar-theme.scss +7 -11
  299. package/progress-bar/progress-bar.scss +6 -19
  300. package/progress-spinner/_progress-spinner-theme.scss +6 -8
  301. package/progress-spinner/progress-spinner.scss +8 -18
  302. package/radio/_radio-theme.scss +36 -37
  303. package/radio/radio.scss +25 -40
  304. package/risk-level/_risk-level-theme.scss +25 -31
  305. package/risk-level/risk-level.component.scss +4 -10
  306. package/schematics/collection.json +11 -0
  307. package/schematics/ng-add/index.js +70 -0
  308. package/schematics/ng-add/schema.json +15 -0
  309. package/scrollbar/_scrollbar-component-theme.scss +15 -19
  310. package/scrollbar/scrollbar.component.scss +68 -63
  311. package/scrollbar/scrollbar.directive.d.ts +1 -0
  312. package/scrollbar/scrollbar.types.d.ts +1 -0
  313. package/select/_select-theme.scss +14 -16
  314. package/select/select-option.directive.d.ts +3 -2
  315. package/select/select.component.d.ts +12 -33
  316. package/select/select.module.d.ts +1 -1
  317. package/select/select.scss +3 -11
  318. package/sidepanel/_sidepanel-theme.scss +8 -10
  319. package/sidepanel/sidepanel.scss +20 -37
  320. package/splitter/_splitter-theme.scss +5 -6
  321. package/splitter/splitter.component.d.ts +10 -5
  322. package/splitter/splitter.scss +0 -1
  323. package/table/_table-theme.scss +16 -15
  324. package/table/table.component.d.ts +8 -1
  325. package/table/table.module.d.ts +1 -1
  326. package/table/table.scss +41 -42
  327. package/tabs/_tabs-common.scss +13 -15
  328. package/tabs/_tabs-theme.scss +76 -44
  329. package/tabs/tab-body.component.d.ts +1 -1
  330. package/tabs/tab-group.component.d.ts +9 -3
  331. package/tabs/tab-group.scss +2 -8
  332. package/tabs/tab-header.scss +0 -10
  333. package/tabs/tab-nav-bar/tab-nav-bar.scss +2 -9
  334. package/tags/_tag-theme.scss +22 -27
  335. package/tags/tag-default-options.d.ts +1 -0
  336. package/tags/tag-input.d.ts +7 -1
  337. package/tags/tag-list.scss +15 -12
  338. package/tags/tag.component.d.ts +1 -1
  339. package/tags/tag.scss +5 -11
  340. package/textarea/_textarea-theme.scss +2 -5
  341. package/textarea/textarea.scss +5 -10
  342. package/timepicker/timepicker.directive.d.ts +1 -1
  343. package/timepicker/timepicker.scss +2 -8
  344. package/timezone/_timezone-option-theme.scss +8 -10
  345. package/timezone/timezone-option.component.scss +5 -8
  346. package/timezone/timezone-option.directive.d.ts +3 -2
  347. package/timezone/timezone-select.component.d.ts +2 -1
  348. package/timezone/timezone-select.component.scss +2 -4
  349. package/title/title.directive.d.ts +0 -1
  350. package/toast/_toast-theme.scss +20 -16
  351. package/toast/toast-container.component.scss +5 -6
  352. package/toast/toast.component.scss +28 -29
  353. package/toast/toast.service.d.ts +8 -4
  354. package/toast/toast.type.d.ts +2 -0
  355. package/toggle/_toggle-theme.scss +49 -42
  356. package/toggle/toggle.scss +9 -22
  357. package/tooltip/_tooltip-theme.scss +12 -16
  358. package/tooltip/tooltip.component.d.ts +12 -8
  359. package/tooltip/tooltip.scss +7 -13
  360. package/tree/_tree-theme.scss +20 -23
  361. package/tree/toggle.scss +3 -6
  362. package/tree/tree-base.d.ts +1 -1
  363. package/tree/tree-option.scss +17 -14
  364. package/tree/tree-selection.component.d.ts +1 -0
  365. package/tree-select/_tree-select-theme.scss +12 -15
  366. package/tree-select/tree-select.component.d.ts +8 -17
  367. package/tree-select/tree-select.module.d.ts +1 -2
  368. package/tree-select/tree-select.scss +1 -6
  369. package/core/styles/_variables.scss +0 -1
@@ -1,10 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, EventEmitter, Directive, Output, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Input, ContentChild, ViewChild, NgModule } from '@angular/core';
2
+ import { InjectionToken, EventEmitter, Directive, Output, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Self, Input, ContentChild, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
+ import * as i1 from '@angular/forms';
6
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
7
  import { KbqButtonModule } from '@koobiq/components/button';
6
- import * as i9 from '@koobiq/components/core';
7
- import { ruRULocaleData, KBQ_LOCALE_SERVICE, KbqDataSizeModule } from '@koobiq/components/core';
8
+ import * as i10 from '@koobiq/components/core';
9
+ import { ruRULocaleData, KBQ_LOCALE_SERVICE, KbqDataSizePipe } from '@koobiq/components/core';
8
10
  import * as i7 from '@koobiq/components/ellipsis-center';
9
11
  import { KbqEllipsisCenterModule } from '@koobiq/components/ellipsis-center';
10
12
  import * as i6 from '@koobiq/components/form-field';
@@ -16,11 +18,27 @@ import { KbqListModule } from '@koobiq/components/list';
16
18
  import * as i3 from '@koobiq/components/progress-spinner';
17
19
  import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';
18
20
  import { KbqToolTipModule } from '@koobiq/components/tooltip';
19
- import * as i1 from '@angular/cdk/a11y';
21
+ import * as i8 from '@koobiq/components/link';
22
+ import { KbqLinkModule } from '@koobiq/components/link';
20
23
  import { Subscription, BehaviorSubject } from 'rxjs';
24
+ import { distinctUntilChanged } from 'rxjs/operators';
21
25
 
22
26
  /* Object for labels customization inside file upload component */
23
27
  const KBQ_FILE_UPLOAD_CONFIGURATION = new InjectionToken('KbqFileUploadConfiguration');
28
+ const isCorrectExtension = (file, accept) => {
29
+ if (!accept?.length) {
30
+ return true;
31
+ }
32
+ const { name, type } = file;
33
+ const fileExt = name.split('.').pop() || '';
34
+ for (const acceptedExtensionOrMimeType of accept) {
35
+ const typeAsRegExp = new RegExp(acceptedExtensionOrMimeType);
36
+ if (typeAsRegExp.test(fileExt) || typeAsRegExp.test(type)) {
37
+ return true;
38
+ }
39
+ }
40
+ return false;
41
+ };
24
42
 
25
43
  const isFolderCanBeDragged = () => 'webkitGetAsEntry' in DataTransferItem.prototype;
26
44
  const entryIsDirectory = (entry) => !!entry && entry.isDirectory;
@@ -103,25 +121,44 @@ const unwrapDirectory = async (item) => {
103
121
  let nextMultipleFileUploadUniqueId = 0;
104
122
  const KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = ruRULocaleData.fileUpload.multiple;
105
123
  class KbqMultipleFileUploadComponent {
124
+ get files() {
125
+ return this._files;
126
+ }
127
+ set files(currentFileList) {
128
+ this._files = currentFileList;
129
+ this.cvaOnChange(this._files);
130
+ this.fileQueueChanged.emit(this._files);
131
+ this.cdr.markForCheck();
132
+ }
106
133
  get acceptedFiles() {
107
- return this.accept && this.accept.length > 0 ? this.accept.map((ext) => `.${ext}`).join(',') : '*/*';
134
+ return this.accept?.join(',') || '*/*';
108
135
  }
109
136
  get hasErrors() {
110
137
  return this.errors && !!this.errors.length;
111
138
  }
112
- constructor(focusMonitor, cdr, renderer, configuration, localeService) {
113
- this.focusMonitor = focusMonitor;
139
+ constructor(cdr, renderer, configuration, localeService, ngControl) {
114
140
  this.cdr = cdr;
115
141
  this.renderer = renderer;
116
142
  this.configuration = configuration;
117
143
  this.localeService = localeService;
144
+ this.ngControl = ngControl;
145
+ /**
146
+ * A value responsible for progress spinner type.
147
+ * Loading logic depends on selected mode */
148
+ this.progressMode = 'determinate';
118
149
  this.errors = [];
119
- this.files = [];
120
150
  this.size = 'default';
121
151
  this.inputId = `kbq-multiple-file-upload-${nextMultipleFileUploadUniqueId++}`;
152
+ this._files = [];
122
153
  this.fileQueueChanged = new EventEmitter();
123
154
  this.hasFocus = false;
124
- this.focusMonitorSubscription = Subscription.EMPTY;
155
+ this.statusChangeSubscription = Subscription.EMPTY;
156
+ /** cvaOnChange function registered via registerOnChange (ControlValueAccessor). */
157
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
158
+ this.cvaOnChange = (_) => { };
159
+ /** onTouch function registered via registerOnTouch (ControlValueAccessor). */
160
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
161
+ this.onTouched = () => { };
125
162
  this.updateLocaleParams = () => {
126
163
  this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;
127
164
  this.columnDefs = [
@@ -137,13 +174,46 @@ class KbqMultipleFileUploadComponent {
137
174
  if (!localeService) {
138
175
  this.initDefaultParams();
139
176
  }
177
+ if (this.ngControl) {
178
+ // Note: we provide the value accessor through here, instead of
179
+ // the `providers` to avoid running into a circular import.
180
+ this.ngControl.valueAccessor = this;
181
+ }
140
182
  }
141
183
  ngAfterViewInit() {
142
- this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)
143
- .subscribe((origin) => this.onFocus(origin === 'keyboard'));
184
+ // FormControl specific errors update
185
+ this.statusChangeSubscription = this.ngControl?.statusChanges?.subscribe(() => {
186
+ this.errors = Object.values(this.ngControl?.errors || {});
187
+ this.cdr.markForCheck();
188
+ });
144
189
  }
145
190
  ngOnDestroy() {
146
- this.focusMonitorSubscription.unsubscribe();
191
+ this.statusChangeSubscription?.unsubscribe();
192
+ }
193
+ /** Implemented as part of ControlValueAccessor.
194
+ * @docs-private */
195
+ writeValue(files) {
196
+ if (files instanceof FileList || !files) {
197
+ this.files = this.mapToFileItem(files);
198
+ }
199
+ else {
200
+ this.files = files;
201
+ }
202
+ }
203
+ /** Implemented as part of ControlValueAccessor.
204
+ * @docs-private */
205
+ registerOnChange(fn) { this.cvaOnChange = fn; }
206
+ /** Implemented as part of ControlValueAccessor.
207
+ * @docs-private */
208
+ registerOnTouched(fn) { this.onTouched = fn; }
209
+ /**
210
+ * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
211
+ * @param isDisabled Whether the control should be disabled.
212
+ * @docs-private
213
+ */
214
+ setDisabledState(isDisabled) {
215
+ this.disabled = isDisabled;
216
+ this.cdr.markForCheck();
147
217
  }
148
218
  onFileSelectedViaClick({ target }) {
149
219
  if (this.disabled) {
@@ -153,17 +223,17 @@ class KbqMultipleFileUploadComponent {
153
223
  ...this.files,
154
224
  ...this.mapToFileItem(target.files)
155
225
  ];
226
+ this.onTouched();
156
227
  /* even if the user selects the same file,
157
228
  the onchange event will be triggered every time user clicks on the control.*/
158
229
  this.renderer.setProperty(this.input.nativeElement, 'value', null);
159
- this.onFileListChange();
160
230
  }
161
231
  onFileDropped(files) {
162
232
  if (this.disabled) {
163
233
  return;
164
234
  }
165
235
  this.files = [...this.files, ...this.mapToFileItem(files)];
166
- this.onFileListChange();
236
+ this.onTouched();
167
237
  }
168
238
  deleteFile(index, event) {
169
239
  if (this.disabled) {
@@ -172,24 +242,17 @@ class KbqMultipleFileUploadComponent {
172
242
  event?.stopPropagation();
173
243
  this.files.splice(index, 1);
174
244
  this.files = [...this.files];
175
- this.onFileListChange();
245
+ this.onTouched();
176
246
  }
177
247
  onFileListChange() {
178
248
  this.fileQueueChanged.emit(this.files);
179
249
  }
180
- onFocus(focusState) {
181
- if (this.disabled) {
182
- return;
183
- }
184
- this.hasFocus = focusState;
185
- this.cdr.markForCheck();
186
- }
187
250
  mapToFileItem(files) {
188
251
  if (!files) {
189
252
  return [];
190
253
  }
191
254
  return Array.from(files)
192
- .filter((file) => this.isCorrectExtension(file))
255
+ .filter((file) => isCorrectExtension(file, this.accept))
193
256
  .map((file) => ({
194
257
  file,
195
258
  hasError: this.validateFile(file),
@@ -198,21 +261,18 @@ class KbqMultipleFileUploadComponent {
198
261
  }));
199
262
  }
200
263
  validateFile(file) {
201
- if (this.customValidation && this.customValidation.length) {
202
- const errorsPerFile = this.customValidation.reduce((errors, validatorFn) => {
203
- errors.push(validatorFn(file));
204
- return errors;
205
- }, []).filter(Boolean);
206
- this.errors = [
207
- ...this.errors,
208
- ...errorsPerFile
209
- ];
210
- return !!errorsPerFile.length;
264
+ if (!this.customValidation?.length) {
265
+ return;
211
266
  }
212
- }
213
- isCorrectExtension(file) {
214
- const fileExt = file.name.split('.').pop() || '';
215
- return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;
267
+ const errorsPerFile = this.customValidation.reduce((errors, validatorFn) => {
268
+ errors.push(validatorFn(file));
269
+ return errors;
270
+ }, []).filter(Boolean);
271
+ this.errors = [
272
+ ...this.errors,
273
+ ...errorsPerFile
274
+ ];
275
+ return !!errorsPerFile.length;
216
276
  }
217
277
  initDefaultParams() {
218
278
  this.config = KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;
@@ -229,38 +289,44 @@ class KbqMultipleFileUploadComponent {
229
289
  this.separatedCaptionTextForCompactSize = this.config.captionTextForCompactSize
230
290
  .split('{{ browseLink }}');
231
291
  }
232
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqMultipleFileUploadComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: KBQ_FILE_UPLOAD_CONFIGURATION, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
233
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqMultipleFileUploadComponent, selector: "kbq-multiple-file-upload", inputs: { accept: "accept", disabled: "disabled", errors: "errors", files: "files", size: "size", inputId: "inputId", customValidation: "customValidation" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "kbq-multiple-file-upload" }, queries: [{ propertyName: "customFileIcon", first: true, predicate: ["kbqFileIcon"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div [class]=\"'kbq-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <kbq-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"kbq-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"kbq-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n\n <kbq-progress-spinner\n class=\"pt-nat-file-upload-name-cell__icon\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"kbq-file-upload__size\">\n {{ file.file.size | kbqDataSize }}\n </div>\n <div class=\"kbq-file-upload__action\">\n <i kbq-icon-button=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 4px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 3px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 3px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i4.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["color", "small", "tabindex", "disabled"] }, { kind: "component", type: i5.KbqListSelection, selector: "kbq-list-selection", inputs: ["disabled", "autoSelect", "noUnselectLast", "horizontal", "tabIndex", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i5.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "component", type: i6.KbqHint, selector: "kbq-hint", inputs: ["color", "id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i7.KbqEllipsisCenterDirective, selector: "[kbqEllipsisCenter]", inputs: ["kbqEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: KbqFileDropDirective, selector: "[kbqFileDrop]", outputs: ["filesDropped"], exportAs: ["kbqFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i9.KbqDataSizePipe, name: "kbqDataSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
292
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqMultipleFileUploadComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: KBQ_FILE_UPLOAD_CONFIGURATION, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
293
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqMultipleFileUploadComponent, selector: "kbq-multiple-file-upload,kbq-file-upload[multiple]", inputs: { progressMode: "progressMode", accept: "accept", disabled: "disabled", errors: "errors", size: "size", inputId: "inputId", customValidation: "customValidation", files: "files" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "kbq-multiple-file-upload" }, queries: [{ propertyName: "customFileIcon", first: true, predicate: ["kbqFileIcon"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div [class]=\"'kbq-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <kbq-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"kbq-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"kbq-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n\n <kbq-progress-spinner\n class=\"kbq-file-upload-name-cell__icon\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"kbq-file-upload__size\">\n {{ file.file.size | kbqDataSize }}\n </div>\n <div class=\"kbq-file-upload__action\">\n <i kbq-icon-button=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", ".kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__header{display:block}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{display:block;padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 0px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 2px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 2px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i4.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["color", "small", "tabindex", "disabled"] }, { kind: "component", type: i5.KbqListSelection, selector: "kbq-list-selection", inputs: ["disabled", "autoSelect", "noUnselectLast", "horizontal", "tabIndex", "compareWith"], outputs: ["onSelectAll", "onCopy", "selectionChange"], exportAs: ["kbqListSelection"] }, { kind: "component", type: i5.KbqListOption, selector: "kbq-list-option", inputs: ["checkboxPosition", "value", "disabled", "showCheckbox", "selected"], exportAs: ["kbqListOption"] }, { kind: "component", type: i6.KbqHint, selector: "kbq-hint", inputs: ["color", "id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i7.KbqEllipsisCenterDirective, selector: "[kbqEllipsisCenter]", inputs: ["kbqEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: i8.KbqLink, selector: "[kbq-link]", inputs: ["tabIndex", "disabled", "pseudo", "noUnderline", "big", "compact", "useVisited", "print"], exportAs: ["kbqLink"] }, { kind: "directive", type: KbqFileDropDirective, selector: "[kbqFileDrop]", outputs: ["filesDropped"], exportAs: ["kbqFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.KbqDataSizePipe, name: "kbqDataSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
234
294
  }
235
295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqMultipleFileUploadComponent, decorators: [{
236
296
  type: Component,
237
- args: [{ selector: 'kbq-multiple-file-upload', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
297
+ args: [{ selector: 'kbq-multiple-file-upload,kbq-file-upload[multiple]', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
238
298
  class: 'kbq-multiple-file-upload'
239
- }, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div [class]=\"'kbq-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <kbq-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"kbq-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"kbq-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n\n <kbq-progress-spinner\n class=\"pt-nat-file-upload-name-cell__icon\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"kbq-file-upload__size\">\n {{ file.file.size | kbqDataSize }}\n </div>\n <div class=\"kbq-file-upload__action\">\n <i kbq-icon-button=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 4px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 3px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 3px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"] }]
240
- }], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
299
+ }, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.selected]=\"files?.length\"\n [ngClass]=\"size\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <ng-container *ngIf=\"!files.length; else fileOutput\">\n <div class=\"dropzone\">\n <ng-container *ngIf=\"size === 'default' else compactCaption\">\n <i kbq-icon=\"mc-upload-to-cloud_32\"></i>\n <div class=\"dropzone__text\">\n <span class=\"multiple__header\">{{ config.title }}</span>\n <div>\n <span class=\"multiple__caption\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n </div>\n </ng-container>\n </div>\n </ng-container>\n</div>\n\n<div class=\"kbq-file-upload__info-section\">\n <kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n </kbq-hint>\n\n <ng-container *ngIf=\"hasErrors\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\"\n *ngFor=\"let error of errors\">\n {{ error }}\n </kbq-hint>\n </ng-container>\n</div>\n\n<ng-template #fileOutput>\n <div class=\"file-upload__dropzone\">\n <div class=\"kbq-file-upload__grid\">\n <div class=\"kbq-file-multiple-uploaded__header\">\n <div class=\"kbq-file-multiple-uploaded__header-inner\">\n <div [class]=\"'kbq-file-upload__' + column.cssClass\" *ngFor=\"let column of columnDefs\">\n {{ column.header }}\n </div>\n </div>\n </div>\n\n <kbq-list-selection [autoSelect]=\"false\" [disabled]=\"disabled\">\n <kbq-list-option\n class=\"multiple__uploaded-item\"\n [value]=\"file.file.name\"\n (keydown.delete)=\"deleteFile(index)\"\n (keydown.backspace)=\"deleteFile(index)\"\n *ngFor=\"let file of files; let index = index;\">\n <div class=\"kbq-file-upload__row\" [class.error]=\"file.hasError\">\n <div class=\"kbq-file-upload__file\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async } as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\"\n [ngTemplateOutlet]=\"$any(customFileIcon)\"\n [ngTemplateOutletContext]=\"{ $implicit: file }\">\n </ng-container>\n\n <kbq-progress-spinner\n class=\"kbq-file-upload-name-cell__icon\"\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <span class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></span>\n </div>\n <div class=\"kbq-file-upload__size\">\n {{ file.file.size | kbqDataSize }}\n </div>\n <div class=\"kbq-file-upload__action\">\n <i kbq-icon-button=\"mc-close-circle_16\" (click)=\"deleteFile(index, $event)\"></i>\n </div>\n </div>\n </kbq-list-option>\n </kbq-list-selection>\n </div>\n\n <div class=\"btn-upload\">\n <div class=\"dropzone\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextWhenSelected[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextWhenSelected[1] }}\n </span>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #compactCaption>\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text multiple__caption\">\n {{ separatedCaptionTextForCompactSize[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<ng-container *ngTemplateOutlet=\"inputTemplate\"></ng-container></label>{{ separatedCaptionTextForCompactSize[1] }}\n </span>\n</ng-template>\n\n<ng-template #inputTemplate>\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n multiple\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", ".kbq-multiple-file-upload .kbq-file-upload{border-radius:var(--kbq-file-upload-size-multiple-big-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-multiple-big-container-border-width, 1px);border-style:dashed}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected){justify-content:center;padding:var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px) var(--kbq-file-upload-size-multiple-big-container-padding-vertical, 24px);min-height:var(--kbq-file-upload-size-multiple-big-container-min-height, 160px);min-width:var(--kbq-file-upload-size-multiple-big-container-min-width, 320px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-multiple-big-container-content-gap-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__header{display:block}.kbq-multiple-file-upload .kbq-file-upload.default:not(.selected) .dropzone__text .multiple__caption{display:block;padding-top:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-vertical, 0px);gap:var(--kbq-file-upload-size-multiple-big-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected){padding:var(--kbq-file-upload-size-single-container-padding-vertical, 12px) var(--kbq-file-upload-size-single-container-padding-horizontal, 12px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload.compact:not(.selected) .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item{padding:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-list-text{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px)) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) - var(--kbq-list-size-container-focus-outline-width, 2px))}.kbq-multiple-file-upload .kbq-file-upload .kbq-list-option.multiple__uploaded-item .kbq-icon{margin-right:0}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__grid{min-height:144px}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__file,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{width:65%;max-width:65%;gap:var(--kbq-file-upload-size-multiple-big-grid-cell-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header-inner .kbq-file-upload__size,.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__size{width:64px;min-width:64px;text-align:left;flex-grow:1}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file{display:flex;align-items:center}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-upload__row .kbq-file-upload__file .file-item__text{margin-left:0;width:90%}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header{border-bottom-width:1px;border-bottom-style:solid}.kbq-multiple-file-upload .kbq-file-upload .kbq-file-multiple-uploaded__header .kbq-file-multiple-uploaded__header-inner{padding:calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-vertical, 8px) + 2px) calc(var(--kbq-file-upload-size-multiple-big-grid-cell-padding-horizontal, 8px) + 2px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-top-left-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-right-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-top-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-top-style:dashed}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-multiple-file-upload .kbq-file-upload .btn-upload .dropzone .dropzone__text.multiple__caption{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-multiple-file-upload .kbq-file-upload .file-upload__dropzone{width:100%;height:100%}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"] }]
300
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
241
301
  type: Optional
242
302
  }, {
243
303
  type: Inject,
244
304
  args: [KBQ_FILE_UPLOAD_CONFIGURATION]
245
- }] }, { type: i9.KbqLocaleService, decorators: [{
305
+ }] }, { type: i10.KbqLocaleService, decorators: [{
246
306
  type: Optional
247
307
  }, {
248
308
  type: Inject,
249
309
  args: [KBQ_LOCALE_SERVICE]
250
- }] }], propDecorators: { accept: [{
310
+ }] }, { type: i1.NgControl, decorators: [{
311
+ type: Optional
312
+ }, {
313
+ type: Self
314
+ }] }], propDecorators: { progressMode: [{
315
+ type: Input
316
+ }], accept: [{
251
317
  type: Input
252
318
  }], disabled: [{
253
319
  type: Input
254
320
  }], errors: [{
255
321
  type: Input
256
- }], files: [{
257
- type: Input
258
322
  }], size: [{
259
323
  type: Input
260
324
  }], inputId: [{
261
325
  type: Input
262
326
  }], customValidation: [{
263
327
  type: Input
328
+ }], files: [{
329
+ type: Input
264
330
  }], fileQueueChanged: [{
265
331
  type: Output
266
332
  }], customFileIcon: [{
@@ -274,22 +340,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
274
340
  let nextSingleFileUploadUniqueId = 0;
275
341
  const KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION = ruRULocaleData.fileUpload.single;
276
342
  class KbqSingleFileUploadComponent {
343
+ get file() {
344
+ return this._file;
345
+ }
346
+ set file(currentFile) {
347
+ this._file = currentFile;
348
+ this.cvaOnChange(this._file);
349
+ this.fileQueueChange.emit(this._file);
350
+ this.cdr.markForCheck();
351
+ }
277
352
  get acceptedFiles() {
278
- return this.accept && this.accept.length > 0 ? this.accept.map((ext) => `.${ext}`).join(',') : '*/*';
353
+ return this.accept?.join(',') || '*/*';
279
354
  }
280
- constructor(focusMonitor, cdr, renderer, configuration, localeService) {
281
- this.focusMonitor = focusMonitor;
355
+ constructor(cdr, renderer, configuration, localeService, ngControl) {
282
356
  this.cdr = cdr;
283
357
  this.renderer = renderer;
284
358
  this.configuration = configuration;
285
359
  this.localeService = localeService;
360
+ this.ngControl = ngControl;
361
+ /**
362
+ * A value responsible for progress spinner type.
363
+ * Loading logic depends on selected mode */
364
+ this.progressMode = 'determinate';
286
365
  this.disabled = false;
287
366
  this.errors = [];
288
- this.files = [];
289
367
  this.inputId = `kbq-single-file-upload-${nextSingleFileUploadUniqueId++}`;
290
- this.fileQueueChanged = new EventEmitter();
291
- this.hasFocus = false;
292
- this.focusMonitorSubscription = Subscription.EMPTY;
368
+ this._file = null;
369
+ this.fileQueueChange = new EventEmitter();
370
+ this.statusChangeSubscription = Subscription.EMPTY;
371
+ /** cvaOnChange function registered via registerOnChange (ControlValueAccessor). */
372
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
373
+ this.cvaOnChange = (_) => { };
374
+ /** onTouch function registered via registerOnTouch (ControlValueAccessor). */
375
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
376
+ this.onTouched = () => { };
293
377
  this.updateLocaleParams = () => {
294
378
  this.config = this.configuration || this.localeService?.getParams('fileUpload').multiple;
295
379
  this.getCaptionText();
@@ -300,13 +384,50 @@ class KbqSingleFileUploadComponent {
300
384
  if (!localeService) {
301
385
  this.initDefaultParams();
302
386
  }
387
+ if (this.ngControl) {
388
+ // Note: we provide the value accessor through here, instead of
389
+ // the `providers` to avoid running into a circular import.
390
+ this.ngControl.valueAccessor = this;
391
+ }
303
392
  }
304
393
  ngAfterViewInit() {
305
- this.focusMonitorSubscription = this.focusMonitor.monitor(this.input)
306
- .subscribe((origin) => this.onFocus(origin === 'keyboard'));
394
+ // FormControl specific errors update
395
+ this.statusChangeSubscription = this.ngControl?.statusChanges?.pipe(distinctUntilChanged())
396
+ .subscribe((status) => {
397
+ if (this._file) {
398
+ this._file.hasError = status === 'INVALID';
399
+ }
400
+ this.errors = Object.values(this.ngControl?.errors || {});
401
+ this.cdr.markForCheck();
402
+ });
307
403
  }
308
404
  ngOnDestroy() {
309
- this.focusMonitorSubscription.unsubscribe();
405
+ this.statusChangeSubscription?.unsubscribe();
406
+ }
407
+ /** Implemented as part of ControlValueAccessor.
408
+ * @docs-private */
409
+ writeValue(file) {
410
+ if (file instanceof File) {
411
+ this.file = this.mapToFileItem(file);
412
+ }
413
+ else {
414
+ this.file = file;
415
+ }
416
+ }
417
+ /** Implemented as part of ControlValueAccessor.
418
+ * @docs-private */
419
+ registerOnChange(fn) { this.cvaOnChange = fn; }
420
+ /** Implemented as part of ControlValueAccessor.
421
+ * @docs-private */
422
+ registerOnTouched(fn) { this.onTouched = fn; }
423
+ /**
424
+ * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
425
+ * @param isDisabled Whether the control should be disabled.
426
+ * @docs-private
427
+ */
428
+ setDisabledState(isDisabled) {
429
+ this.disabled = isDisabled;
430
+ this.cdr.markForCheck();
310
431
  }
311
432
  onFileSelectedViaClick({ target }) {
312
433
  if (this.disabled) {
@@ -314,9 +435,9 @@ class KbqSingleFileUploadComponent {
314
435
  }
315
436
  const files = target.files;
316
437
  if (files?.length) {
317
- this.files = [this.mapToFileItem(files[0])];
318
- this.fileQueueChanged.emit(this.files[0]);
438
+ this.file = this.mapToFileItem(files[0]);
319
439
  }
440
+ this.onTouched();
320
441
  /* even if the user selects the same file,
321
442
  the onchange event will be triggered every time user clicks on the control.*/
322
443
  this.renderer.setProperty(this.input.nativeElement, 'value', null);
@@ -326,48 +447,41 @@ class KbqSingleFileUploadComponent {
326
447
  return;
327
448
  }
328
449
  event?.stopPropagation();
329
- this.files = [];
450
+ this.file = null;
330
451
  this.errors = [];
331
- this.fileQueueChanged.emit(null);
452
+ // mark as touched after file drop even if file wasn't correct
453
+ this.onTouched();
332
454
  }
333
455
  onFileDropped(files) {
334
456
  if (this.disabled) {
335
457
  return;
336
458
  }
337
- if (this.isCorrectExtension(files[0])) {
338
- this.files = Array.from(files)
339
- .map((file) => this.mapToFileItem(file));
340
- this.fileQueueChanged.emit(this.files[0]);
341
- }
342
- }
343
- onFocus(focusState) {
344
- if (this.disabled) {
345
- return;
459
+ if (files?.length && isCorrectExtension(files[0], this.accept)) {
460
+ this.file = this.mapToFileItem(files[0]);
461
+ this.fileQueueChange.emit(this.file);
346
462
  }
347
- this.hasFocus = focusState;
348
- this.cdr.markForCheck();
463
+ // mark as touched after file drop even if file wasn't correct
464
+ this.onTouched();
349
465
  }
350
466
  mapToFileItem(file) {
351
- this.validateFile(file);
352
467
  return {
353
468
  file,
469
+ hasError: this.validateFile(file),
354
470
  progress: new BehaviorSubject(0),
355
471
  loading: new BehaviorSubject(false)
356
472
  };
357
473
  }
358
474
  validateFile(file) {
359
- if (this.customValidation && this.customValidation.length) {
360
- this.errors = this.customValidation
361
- .reduce((errors, validatorFn) => {
362
- errors.push(validatorFn(file));
363
- return errors;
364
- }, [])
365
- .filter(Boolean);
475
+ if (!this.customValidation?.length) {
476
+ return;
366
477
  }
367
- }
368
- isCorrectExtension(file) {
369
- const fileExt = file.name.split('.').pop() || '';
370
- return this.acceptedFiles !== '*/*' && this.acceptedFiles.length > 0 ? this.acceptedFiles.includes(fileExt) : true;
478
+ this.errors = this.customValidation
479
+ .reduce((errors, validatorFn) => {
480
+ errors.push(validatorFn(file));
481
+ return errors;
482
+ }, [])
483
+ .filter(Boolean);
484
+ return !!this.errors.length;
371
485
  }
372
486
  initDefaultParams() {
373
487
  this.config = KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION;
@@ -376,37 +490,43 @@ class KbqSingleFileUploadComponent {
376
490
  getCaptionText() {
377
491
  this.separatedCaptionText = this.config.captionText.split('{{ browseLink }}');
378
492
  }
379
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSingleFileUploadComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: KBQ_FILE_UPLOAD_CONFIGURATION, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
380
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqSingleFileUploadComponent, selector: "kbq-single-file-upload", inputs: { accept: "accept", disabled: "disabled", errors: "errors", files: "files", inputId: "inputId", customValidation: "customValidation" }, outputs: { fileQueueChanged: "fileQueueChanged" }, host: { classAttribute: "kbq-single-file-upload" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.kbq-error]=\"errors?.length\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <div class=\"dropzone\" *ngIf=\"!files.length; else fileOutput\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</div>\n<kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n</kbq-hint>\n<ng-container *ngIf=\"errors?.length\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\" *ngFor=\"let error of errors\">{{ error }}</kbq-hint>\n</ng-container>\n\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"files && files.length\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: files[0].loading | async, progress: files[0].progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[kbq-icon]\"></ng-content>\n </ng-container>\n\n <kbq-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [kbqEllipsisCenter]=\"files[0].file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <i kbq-icon-button=\"mc-close-circle_16\"\n [color]=\"'contrast'\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n </i>\n </div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-single-file-upload .kbq-file-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-style:dashed}.kbq-single-file-upload .kbq-file-upload .dropzone__text{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-single-file-upload .kbq-file-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item{width:100%}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%;gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper .file-item__text{width:120px;flex-grow:1}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i4.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["color", "small", "tabindex", "disabled"] }, { kind: "component", type: i6.KbqHint, selector: "kbq-hint", inputs: ["color", "id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i7.KbqEllipsisCenterDirective, selector: "[kbqEllipsisCenter]", inputs: ["kbqEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: KbqFileDropDirective, selector: "[kbqFileDrop]", outputs: ["filesDropped"], exportAs: ["kbqFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
493
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSingleFileUploadComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: KBQ_FILE_UPLOAD_CONFIGURATION, optional: true }, { token: KBQ_LOCALE_SERVICE, optional: true }, { token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
494
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqSingleFileUploadComponent, selector: "kbq-single-file-upload,kbq-file-upload:not([multiple])", inputs: { progressMode: "progressMode", accept: "accept", disabled: "disabled", errors: "errors", inputId: "inputId", customValidation: "customValidation", file: "file" }, outputs: { fileQueueChange: "fileQueueChange" }, host: { classAttribute: "kbq-single-file-upload" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.kbq-error]=\"errors?.length\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n</kbq-hint>\n<ng-container *ngIf=\"errors?.length\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\" *ngFor=\"let error of errors\">{{ error }}</kbq-hint>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[kbq-icon]\"></ng-content>\n </ng-container>\n\n <kbq-progress-spinner\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <i kbq-icon-button=\"mc-close-circle_16\"\n [color]=\"'contrast'\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n </i>\n </div>\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-single-file-upload .kbq-file-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-style:dashed}.kbq-single-file-upload .kbq-file-upload .dropzone__text{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-single-file-upload .kbq-file-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item{width:100%}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%;gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper .file-item__text{width:120px;flex-grow:1}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.KbqProgressSpinner, selector: "kbq-progress-spinner", inputs: ["color", "id", "value", "mode", "size"] }, { kind: "component", type: i4.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "component", type: i4.KbqIconButton, selector: "[kbq-icon-button]", inputs: ["color", "small", "tabindex", "disabled"] }, { kind: "component", type: i6.KbqHint, selector: "kbq-hint", inputs: ["color", "id", "fillTextOff", "compact"], exportAs: ["kbqHint"] }, { kind: "directive", type: i7.KbqEllipsisCenterDirective, selector: "[kbqEllipsisCenter]", inputs: ["kbqEllipsisCenter", "minVisibleLength"] }, { kind: "directive", type: i8.KbqLink, selector: "[kbq-link]", inputs: ["tabIndex", "disabled", "pseudo", "noUnderline", "big", "compact", "useVisited", "print"], exportAs: ["kbqLink"] }, { kind: "directive", type: KbqFileDropDirective, selector: "[kbqFileDrop]", outputs: ["filesDropped"], exportAs: ["kbqFileDrop"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
381
495
  }
382
496
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqSingleFileUploadComponent, decorators: [{
383
497
  type: Component,
384
- args: [{ selector: 'kbq-single-file-upload', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
498
+ args: [{ selector: 'kbq-single-file-upload,kbq-file-upload:not([multiple])', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
385
499
  class: 'kbq-single-file-upload'
386
- }, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.kbq-error]=\"errors?.length\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <div class=\"dropzone\" *ngIf=\"!files.length; else fileOutput\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label class=\"kbq-link\" [class.kbq-focused]=\"hasFocus\" [for]=\"inputId\">{{ config.browseLink }}</label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n\n <input #input\n type=\"file\"\n class=\"cdk-visually-hidden\"\n [id]=\"inputId\"\n [accept]=\"acceptedFiles\"\n [disabled]=\"disabled\"\n (change)=\"onFileSelectedViaClick($event)\">\n</div>\n<kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n</kbq-hint>\n<ng-container *ngIf=\"errors?.length\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\" *ngFor=\"let error of errors\">{{ error }}</kbq-hint>\n</ng-container>\n\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"files && files.length\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: files[0].loading | async, progress: files[0].progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[kbq-icon]\"></ng-content>\n </ng-container>\n\n <kbq-progress-spinner\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [kbqEllipsisCenter]=\"files[0].file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <i kbq-icon-button=\"mc-close-circle_16\"\n [color]=\"'contrast'\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n </i>\n </div>\n</ng-template>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-single-file-upload .kbq-file-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-style:dashed}.kbq-single-file-upload .kbq-file-upload .dropzone__text{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 4px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-single-file-upload .kbq-file-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item{width:100%}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%;gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper .file-item__text{width:120px;flex-grow:1}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"] }]
387
- }], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
500
+ }, template: "<div class=\"kbq-file-upload\"\n kbqFileDrop\n [class.kbq-disabled]=\"disabled\"\n [class.kbq-error]=\"errors?.length\"\n (filesDropped)=\"onFileDropped($event)\">\n\n <div class=\"dropzone\" *ngIf=\"!file; else fileOutput\">\n <i kbq-icon=\"mc-upload-to-cloud_24\"></i>\n <span class=\"dropzone__text\">\n {{ separatedCaptionText[0] }}<label kbq-link pseudo [disabled]=\"disabled\" [tabIndex]=\"-1\" [for]=\"inputId\">{{ config.browseLink }}<input #input type=\"file\" class=\"cdk-visually-hidden\" [id]=\"inputId\" [accept]=\"acceptedFiles\" [disabled]=\"disabled\" (change)=\"onFileSelectedViaClick($event)\"></label>{{ separatedCaptionText[1] }}\n </span>\n </div>\n</div>\n\n<kbq-hint class=\"kbq-file-upload__hint\">\n <ng-content select=\"[hint]\"></ng-content>\n</kbq-hint>\n<ng-container *ngIf=\"errors?.length\">\n <kbq-hint class=\"kbq-file-upload__hint kbq-error\" *ngFor=\"let error of errors\">{{ error }}</kbq-hint>\n</ng-container>\n\n<ng-template #fileOutput>\n <div class=\"file-item\" *ngIf=\"file\">\n <div class=\"file-item__text-wrapper\">\n <ng-container *ngIf=\"{ loading: file.loading | async, progress: file.progress | async} as asyncData\">\n <ng-container *ngIf=\"!asyncData.loading\">\n <ng-content select=\"[kbq-icon]\"></ng-content>\n </ng-container>\n\n <kbq-progress-spinner\n [mode]=\"progressMode\"\n [value]=\"asyncData.progress || 0\"\n *ngIf=\"asyncData.loading\"\n ></kbq-progress-spinner>\n </ng-container>\n\n <div class=\"file-item__text\" [kbqEllipsisCenter]=\"file.file.name\" [minVisibleLength]=\"10\"></div>\n </div>\n <i kbq-icon-button=\"mc-close-circle_16\"\n [color]=\"'contrast'\"\n [disabled]=\"disabled\"\n (keydown.delete)=\"deleteItem()\"\n (keydown.backspace)=\"deleteItem()\"\n (click)=\"deleteItem($event)\">\n </i>\n </div>\n</ng-template>\n", styles: [".kbq-file-upload{box-sizing:border-box;display:flex;align-items:center;position:relative}.kbq-file-upload .dropzone,.kbq-file-upload .file-item{display:flex;align-items:center}.kbq-file-upload .kbq-ellipsis-center{position:relative;display:flex}.kbq-file-upload .kbq-ellipsis-center .data-text-start{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:pre}.kbq-file-upload .kbq-ellipsis-center .data-text-end{flex:1 0 auto;overflow:hidden;white-space:pre}\n", "@keyframes kbq-progress{0%{background-position:0 0}to{background-position:29px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 10px,#ffffff0a 10px 20px,#0000000a 20px 30px,#ffffff0a 31px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 2px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-single-file-upload .kbq-file-upload{padding:calc(var(--kbq-file-upload-size-single-container-padding-vertical, 12px) - 1px) calc(var(--kbq-file-upload-size-single-container-padding-horizontal, 12px) - 1px);border-radius:var(--kbq-file-upload-size-single-container-border-radius, 8px);border-width:var(--kbq-file-upload-size-single-container-border-width, 1px);border-style:dashed}.kbq-single-file-upload .kbq-file-upload .dropzone__text{padding-top:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);padding-bottom:var(--kbq-file-upload-size-single-text-block-padding-vertical, 2px);gap:var(--kbq-file-upload-size-single-text-block-content-gap-horizontal, 4px)}.kbq-single-file-upload .kbq-file-upload .dropzone{gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item{width:100%}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper{display:flex;align-items:center;width:100%;gap:var(--kbq-file-upload-size-single-container-content-gap-horizontal, 8px)}.kbq-single-file-upload .kbq-file-upload .file-item .file-item__text-wrapper .file-item__text{width:120px;flex-grow:1}.kbq-hint{display:block}.kbq-file-upload__hint{margin-top:var(--kbq-form-field-hint-size-margin-top, 4px)}\n"] }]
501
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
388
502
  type: Optional
389
503
  }, {
390
504
  type: Inject,
391
505
  args: [KBQ_FILE_UPLOAD_CONFIGURATION]
392
- }] }, { type: i9.KbqLocaleService, decorators: [{
506
+ }] }, { type: i10.KbqLocaleService, decorators: [{
393
507
  type: Optional
394
508
  }, {
395
509
  type: Inject,
396
510
  args: [KBQ_LOCALE_SERVICE]
397
- }] }], propDecorators: { accept: [{
511
+ }] }, { type: i1.NgControl, decorators: [{
512
+ type: Optional
513
+ }, {
514
+ type: Self
515
+ }] }], propDecorators: { progressMode: [{
516
+ type: Input
517
+ }], accept: [{
398
518
  type: Input
399
519
  }], disabled: [{
400
520
  type: Input
401
521
  }], errors: [{
402
522
  type: Input
403
- }], files: [{
404
- type: Input
405
523
  }], inputId: [{
406
524
  type: Input
407
525
  }], customValidation: [{
408
526
  type: Input
409
- }], fileQueueChanged: [{
527
+ }], file: [{
528
+ type: Input
529
+ }], fileQueueChange: [{
410
530
  type: Output
411
531
  }], input: [{
412
532
  type: ViewChild,
@@ -418,6 +538,8 @@ class KbqFileUploadModule {
418
538
  /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.0", ngImport: i0, type: KbqFileUploadModule, declarations: [KbqFileDropDirective,
419
539
  KbqSingleFileUploadComponent,
420
540
  KbqMultipleFileUploadComponent], imports: [CommonModule,
541
+ FormsModule,
542
+ ReactiveFormsModule,
421
543
  KbqToolTipModule,
422
544
  KbqProgressSpinnerModule,
423
545
  KbqIconModule,
@@ -425,10 +547,13 @@ class KbqFileUploadModule {
425
547
  KbqListModule,
426
548
  KbqFormFieldModule,
427
549
  KbqEllipsisCenterModule,
428
- KbqDataSizeModule], exports: [KbqSingleFileUploadComponent,
550
+ KbqDataSizePipe,
551
+ KbqLinkModule], exports: [KbqSingleFileUploadComponent,
429
552
  KbqMultipleFileUploadComponent,
430
553
  KbqFileDropDirective] }); }
431
554
  /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqFileUploadModule, imports: [CommonModule,
555
+ FormsModule,
556
+ ReactiveFormsModule,
432
557
  KbqToolTipModule,
433
558
  KbqProgressSpinnerModule,
434
559
  KbqIconModule,
@@ -436,13 +561,15 @@ class KbqFileUploadModule {
436
561
  KbqListModule,
437
562
  KbqFormFieldModule,
438
563
  KbqEllipsisCenterModule,
439
- KbqDataSizeModule] }); }
564
+ KbqLinkModule] }); }
440
565
  }
441
566
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqFileUploadModule, decorators: [{
442
567
  type: NgModule,
443
568
  args: [{
444
569
  imports: [
445
570
  CommonModule,
571
+ FormsModule,
572
+ ReactiveFormsModule,
446
573
  KbqToolTipModule,
447
574
  KbqProgressSpinnerModule,
448
575
  KbqIconModule,
@@ -450,7 +577,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
450
577
  KbqListModule,
451
578
  KbqFormFieldModule,
452
579
  KbqEllipsisCenterModule,
453
- KbqDataSizeModule
580
+ KbqDataSizePipe,
581
+ KbqLinkModule
454
582
  ],
455
583
  declarations: [
456
584
  KbqFileDropDirective,
@@ -469,5 +597,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
469
597
  * Generated bundle index. Do not edit.
470
598
  */
471
599
 
472
- export { KBQ_FILE_UPLOAD_CONFIGURATION, KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION, KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION, KbqFileDropDirective, KbqFileUploadModule, KbqMultipleFileUploadComponent, KbqSingleFileUploadComponent };
600
+ export { KBQ_FILE_UPLOAD_CONFIGURATION, KBQ_MULTIPLE_FILE_UPLOAD_DEFAULT_CONFIGURATION, KBQ_SINGLE_FILE_UPLOAD_DEFAULT_CONFIGURATION, KbqFileDropDirective, KbqFileUploadModule, KbqMultipleFileUploadComponent, KbqSingleFileUploadComponent, isCorrectExtension };
473
601
  //# sourceMappingURL=koobiq-components-file-upload.mjs.map