@infineon/infineon-design-system-stencil 33.3.0 → 33.3.1--canary.1824.9e747abc2c6c3dcc35abd2895ce37d503bd1f141.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/dist/cjs/ifx-alert_2.cjs.entry.js +1 -1
  2. package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
  3. package/dist/cjs/ifx-chip_3.cjs.entry.js +1 -1
  4. package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
  5. package/dist/cjs/ifx-file-upload.cjs.entry.js +570 -0
  6. package/dist/cjs/ifx-file-upload.cjs.entry.js.map +1 -0
  7. package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
  8. package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
  9. package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
  10. package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
  11. package/dist/cjs/ifx-footer-column.cjs.entry.js +1 -1
  12. package/dist/cjs/ifx-footer.cjs.entry.js +4 -4
  13. package/dist/cjs/ifx-icon-button.cjs.entry.js +1 -1
  14. package/dist/cjs/ifx-icon.cjs.entry.js +1 -1
  15. package/dist/cjs/ifx-icons-preview.cjs.entry.js +1 -1
  16. package/dist/cjs/ifx-link.cjs.entry.js +1 -1
  17. package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
  18. package/dist/cjs/ifx-modal.cjs.entry.js +2 -2
  19. package/dist/cjs/ifx-navbar-item.cjs.entry.js +5 -5
  20. package/dist/cjs/ifx-navbar-profile.cjs.entry.js +3 -3
  21. package/dist/cjs/ifx-navbar.cjs.entry.js +3 -3
  22. package/dist/cjs/ifx-notification.cjs.entry.js +2 -2
  23. package/dist/cjs/ifx-number-indicator.cjs.entry.js +1 -1
  24. package/dist/cjs/ifx-overview-table.cjs.entry.js +1 -1
  25. package/dist/cjs/ifx-progress-bar.cjs.entry.js +1 -1
  26. package/dist/cjs/ifx-radio-button-group.cjs.entry.js +1 -1
  27. package/dist/cjs/ifx-radio-button.cjs.entry.js +2 -2
  28. package/dist/cjs/ifx-search-bar.cjs.entry.js +1 -1
  29. package/dist/cjs/ifx-search-field.cjs.entry.js +1 -1
  30. package/dist/cjs/ifx-segment.cjs.entry.js +1 -1
  31. package/dist/cjs/ifx-segmented-control.cjs.entry.js +2 -2
  32. package/dist/cjs/ifx-select.cjs.entry.js +2 -2
  33. package/dist/cjs/ifx-sidebar-item.cjs.entry.js +5 -5
  34. package/dist/cjs/ifx-sidebar-title.cjs.entry.js +1 -1
  35. package/dist/cjs/ifx-sidebar.cjs.entry.js +5 -5
  36. package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
  37. package/dist/cjs/ifx-spinner_2.cjs.entry.js +6 -6
  38. package/dist/cjs/ifx-status.cjs.entry.js +1 -1
  39. package/dist/cjs/ifx-step.cjs.entry.js +4 -4
  40. package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
  41. package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
  42. package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
  43. package/dist/cjs/ifx-table.cjs.entry.js +2 -2
  44. package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
  45. package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
  46. package/dist/cjs/ifx-templates-ui.cjs.entry.js +1 -1
  47. package/dist/cjs/ifx-textarea.cjs.entry.js +1 -1
  48. package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
  49. package/dist/cjs/index-c9480f70.js +12 -8
  50. package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
  51. package/dist/cjs/loader.cjs.js +1 -1
  52. package/dist/collection/collection-manifest.json +1 -0
  53. package/dist/collection/components/file-upload/file-upload.css +211 -0
  54. package/dist/collection/components/file-upload/file-upload.js +1501 -0
  55. package/dist/collection/components/file-upload/file-upload.js.map +1 -0
  56. package/dist/collection/components/file-upload/file-upload.stories.js +517 -0
  57. package/dist/collection/components/file-upload/file-upload.stories.js.map +1 -0
  58. package/dist/collection/components/footer/footer-column.js +1 -1
  59. package/dist/collection/components/footer/footer.js +4 -4
  60. package/dist/collection/components/icon/infineonIconStencil.js +1 -1
  61. package/dist/collection/components/icon-button/icon-button.js +1 -1
  62. package/dist/collection/components/icons-preview/icons-preview.js +1 -1
  63. package/dist/collection/components/link/link.js +1 -1
  64. package/dist/collection/components/modal/modal.js +2 -2
  65. package/dist/collection/components/navigation/navbar/navbar-item.js +5 -5
  66. package/dist/collection/components/navigation/navbar/navbar-profile.js +3 -3
  67. package/dist/collection/components/navigation/navbar/navbar.js +3 -3
  68. package/dist/collection/components/navigation/sidebar/sidebar-item.js +5 -5
  69. package/dist/collection/components/navigation/sidebar/sidebar-title.js +1 -1
  70. package/dist/collection/components/navigation/sidebar/sidebar.js +5 -5
  71. package/dist/collection/components/notification/notification.js +2 -2
  72. package/dist/collection/components/number-indicator/number-indicator.js +1 -1
  73. package/dist/collection/components/overview-table/overview-table.js +1 -1
  74. package/dist/collection/components/pagination/pagination.js +1 -1
  75. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  76. package/dist/collection/components/radio-button/radio-button.js +2 -2
  77. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  78. package/dist/collection/components/search-bar/search-bar.js +1 -1
  79. package/dist/collection/components/search-field/search-field.js +1 -1
  80. package/dist/collection/components/segmented-control/segment/segment.js +1 -1
  81. package/dist/collection/components/segmented-control/segmented-control.js +2 -2
  82. package/dist/collection/components/select/single-select/select.js +2 -2
  83. package/dist/collection/components/slider/slider.js +2 -2
  84. package/dist/collection/components/spinner/spinner.js +2 -2
  85. package/dist/collection/components/status/status.js +1 -1
  86. package/dist/collection/components/stepper/step/step.js +4 -4
  87. package/dist/collection/components/stepper/stepper.js +2 -2
  88. package/dist/collection/components/switch/switch.js +1 -1
  89. package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
  90. package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
  91. package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
  92. package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
  93. package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
  94. package/dist/collection/components/table-advanced-version/table.js +2 -2
  95. package/dist/collection/components/table-basic-version/table.js +1 -1
  96. package/dist/collection/components/tabs/tab.js +1 -1
  97. package/dist/collection/components/tabs/tabs.js +2 -2
  98. package/dist/collection/components/tag/tag.js +1 -1
  99. package/dist/collection/components/templates/template/template.js +1 -1
  100. package/dist/collection/components/templates/templates-ui/templates-ui.js +1 -1
  101. package/dist/collection/components/text-field/text-field.js +4 -4
  102. package/dist/collection/components/textarea/textarea.js +1 -1
  103. package/dist/collection/components/tooltip/tooltip.js +4 -4
  104. package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
  105. package/dist/components/ifx-accordion-item.js +1 -1
  106. package/dist/components/ifx-alert.js +1 -1
  107. package/dist/components/ifx-basic-table.js +1 -1
  108. package/dist/components/ifx-breadcrumb-item-label.js +1 -1
  109. package/dist/components/ifx-checkbox-group.js +1 -1
  110. package/dist/components/ifx-checkbox.js +1 -1
  111. package/dist/components/ifx-chip-item.js +1 -1
  112. package/dist/components/ifx-chip.js +1 -1
  113. package/dist/components/ifx-date-picker.js +1 -1
  114. package/dist/components/ifx-download.js +1 -1
  115. package/dist/components/ifx-dropdown-item.js +1 -1
  116. package/dist/components/ifx-dropdown-trigger-button.js +1 -1
  117. package/dist/components/ifx-faq.js +3 -3
  118. package/dist/components/ifx-file-upload.d.ts +11 -0
  119. package/dist/components/ifx-file-upload.js +649 -0
  120. package/dist/components/ifx-file-upload.js.map +1 -0
  121. package/dist/components/ifx-filter-accordion.js +4 -4
  122. package/dist/components/ifx-filter-bar.js +2 -2
  123. package/dist/components/ifx-filter-search.js +3 -3
  124. package/dist/components/ifx-filter-type-group.js +1 -1
  125. package/dist/components/ifx-footer-column.js +1 -1
  126. package/dist/components/ifx-footer.js +4 -4
  127. package/dist/components/ifx-icon-button.js +1 -1
  128. package/dist/components/ifx-icon.js +1 -1
  129. package/dist/components/ifx-icons-preview.js +4 -4
  130. package/dist/components/ifx-link.js +1 -1
  131. package/dist/components/ifx-list-entry.js +4 -4
  132. package/dist/components/ifx-list.js +2 -2
  133. package/dist/components/ifx-modal.js +4 -4
  134. package/dist/components/ifx-multiselect.js +1 -1
  135. package/dist/components/ifx-navbar-item.js +7 -7
  136. package/dist/components/ifx-navbar-profile.js +3 -3
  137. package/dist/components/ifx-navbar.js +4 -4
  138. package/dist/components/ifx-notification.js +1 -1
  139. package/dist/components/ifx-number-indicator.js +1 -1
  140. package/dist/components/ifx-overview-table.js +4 -4
  141. package/dist/components/ifx-pagination.js +1 -1
  142. package/dist/components/ifx-progress-bar.js +1 -49
  143. package/dist/components/ifx-progress-bar.js.map +1 -1
  144. package/dist/components/ifx-radio-button-group.js +2 -2
  145. package/dist/components/ifx-radio-button.js +1 -1
  146. package/dist/components/ifx-search-bar.js +3 -3
  147. package/dist/components/ifx-search-field.js +1 -1
  148. package/dist/components/ifx-segment.js +2 -2
  149. package/dist/components/ifx-segmented-control.js +3 -3
  150. package/dist/components/ifx-select.js +1 -1
  151. package/dist/components/ifx-set-filter.js +5 -5
  152. package/dist/components/ifx-sidebar-item.js +7 -7
  153. package/dist/components/ifx-sidebar-title.js +1 -1
  154. package/dist/components/ifx-sidebar.js +5 -5
  155. package/dist/components/ifx-slider.js +3 -3
  156. package/dist/components/ifx-spinner.js +1 -1
  157. package/dist/components/ifx-status.js +1 -1
  158. package/dist/components/ifx-step.js +5 -5
  159. package/dist/components/ifx-stepper.js +2 -2
  160. package/dist/components/ifx-switch.js +1 -1
  161. package/dist/components/ifx-tab.js +1 -1
  162. package/dist/components/ifx-table.js +10 -10
  163. package/dist/components/ifx-tabs.js +3 -3
  164. package/dist/components/ifx-tag.js +2 -2
  165. package/dist/components/ifx-template.js +1 -1
  166. package/dist/components/ifx-templates-ui.js +8 -8
  167. package/dist/components/ifx-text-field.js +1 -1
  168. package/dist/components/ifx-textarea.js +1 -1
  169. package/dist/components/ifx-tooltip.js +5 -5
  170. package/dist/components/{p-eedb3b58.js → p-008afd49.js} +6 -6
  171. package/dist/components/{p-eedb3b58.js.map → p-008afd49.js.map} +1 -1
  172. package/dist/components/{p-f36effad.js → p-0b2bb8ad.js} +2 -2
  173. package/dist/components/{p-f36effad.js.map → p-0b2bb8ad.js.map} +1 -1
  174. package/dist/components/{p-85ce5a1e.js → p-118c5b21.js} +3 -3
  175. package/dist/components/{p-85ce5a1e.js.map → p-118c5b21.js.map} +1 -1
  176. package/dist/components/{p-88691420.js → p-1d0b8ace.js} +5 -5
  177. package/dist/components/{p-88691420.js.map → p-1d0b8ace.js.map} +1 -1
  178. package/dist/components/{p-23757cfd.js → p-2ba2b196.js} +3 -3
  179. package/dist/components/{p-23757cfd.js.map → p-2ba2b196.js.map} +1 -1
  180. package/dist/components/{p-8d115124.js → p-2e096da7.js} +5 -5
  181. package/dist/components/{p-8d115124.js.map → p-2e096da7.js.map} +1 -1
  182. package/dist/components/{p-4d64e776.js → p-45c75348.js} +2 -2
  183. package/dist/components/{p-4d64e776.js.map → p-45c75348.js.map} +1 -1
  184. package/dist/components/{p-ee5532fd.js → p-4882084d.js} +3 -3
  185. package/dist/components/{p-ee5532fd.js.map → p-4882084d.js.map} +1 -1
  186. package/dist/components/{p-b4e91450.js → p-49f70934.js} +3 -3
  187. package/dist/components/{p-b4e91450.js.map → p-49f70934.js.map} +1 -1
  188. package/dist/components/{p-04a697ad.js → p-524a6949.js} +2 -2
  189. package/dist/components/{p-04a697ad.js.map → p-524a6949.js.map} +1 -1
  190. package/dist/components/{p-7c7a5393.js → p-5d0763d9.js} +2 -2
  191. package/dist/components/{p-7c7a5393.js.map → p-5d0763d9.js.map} +1 -1
  192. package/dist/components/{p-327af560.js → p-6ddcb06b.js} +2 -2
  193. package/dist/components/{p-327af560.js.map → p-6ddcb06b.js.map} +1 -1
  194. package/dist/components/{p-803887ee.js → p-7ba45e8a.js} +3 -3
  195. package/dist/components/{p-803887ee.js.map → p-7ba45e8a.js.map} +1 -1
  196. package/dist/components/{p-e7551b24.js → p-7f0af813.js} +2 -2
  197. package/dist/components/{p-e7551b24.js.map → p-7f0af813.js.map} +1 -1
  198. package/dist/components/{p-f824645f.js → p-c4b939c0.js} +6 -6
  199. package/dist/components/{p-f824645f.js.map → p-c4b939c0.js.map} +1 -1
  200. package/dist/components/{p-77e746ee.js → p-cd01352d.js} +3 -3
  201. package/dist/components/{p-77e746ee.js.map → p-cd01352d.js.map} +1 -1
  202. package/dist/components/{p-1266857d.js → p-d4b2d98f.js} +4 -4
  203. package/dist/components/{p-1266857d.js.map → p-d4b2d98f.js.map} +1 -1
  204. package/dist/components/p-e56942b3.js +53 -0
  205. package/dist/components/p-e56942b3.js.map +1 -0
  206. package/dist/components/{p-dccd1c1c.js → p-ef6730e0.js} +3 -3
  207. package/dist/components/{p-dccd1c1c.js.map → p-ef6730e0.js.map} +1 -1
  208. package/dist/esm/ifx-alert_2.entry.js +1 -1
  209. package/dist/esm/ifx-basic-table.entry.js +1 -1
  210. package/dist/esm/ifx-chip_3.entry.js +1 -1
  211. package/dist/esm/ifx-faq.entry.js +1 -1
  212. package/dist/esm/ifx-file-upload.entry.js +566 -0
  213. package/dist/esm/ifx-file-upload.entry.js.map +1 -0
  214. package/dist/esm/ifx-filter-accordion.entry.js +2 -2
  215. package/dist/esm/ifx-filter-bar.entry.js +1 -1
  216. package/dist/esm/ifx-filter-search.entry.js +1 -1
  217. package/dist/esm/ifx-filter-type-group.entry.js +1 -1
  218. package/dist/esm/ifx-footer-column.entry.js +1 -1
  219. package/dist/esm/ifx-footer.entry.js +4 -4
  220. package/dist/esm/ifx-icon-button.entry.js +1 -1
  221. package/dist/esm/ifx-icon.entry.js +1 -1
  222. package/dist/esm/ifx-icons-preview.entry.js +1 -1
  223. package/dist/esm/ifx-link.entry.js +1 -1
  224. package/dist/esm/ifx-list-entry.entry.js +1 -1
  225. package/dist/esm/ifx-modal.entry.js +2 -2
  226. package/dist/esm/ifx-navbar-item.entry.js +5 -5
  227. package/dist/esm/ifx-navbar-profile.entry.js +3 -3
  228. package/dist/esm/ifx-navbar.entry.js +3 -3
  229. package/dist/esm/ifx-notification.entry.js +2 -2
  230. package/dist/esm/ifx-number-indicator.entry.js +1 -1
  231. package/dist/esm/ifx-overview-table.entry.js +1 -1
  232. package/dist/esm/ifx-progress-bar.entry.js +1 -1
  233. package/dist/esm/ifx-radio-button-group.entry.js +1 -1
  234. package/dist/esm/ifx-radio-button.entry.js +2 -2
  235. package/dist/esm/ifx-search-bar.entry.js +1 -1
  236. package/dist/esm/ifx-search-field.entry.js +1 -1
  237. package/dist/esm/ifx-segment.entry.js +1 -1
  238. package/dist/esm/ifx-segmented-control.entry.js +2 -2
  239. package/dist/esm/ifx-select.entry.js +2 -2
  240. package/dist/esm/ifx-sidebar-item.entry.js +5 -5
  241. package/dist/esm/ifx-sidebar-title.entry.js +1 -1
  242. package/dist/esm/ifx-sidebar.entry.js +5 -5
  243. package/dist/esm/ifx-slider.entry.js +2 -2
  244. package/dist/esm/ifx-spinner_2.entry.js +6 -6
  245. package/dist/esm/ifx-status.entry.js +1 -1
  246. package/dist/esm/ifx-step.entry.js +4 -4
  247. package/dist/esm/ifx-stepper.entry.js +2 -2
  248. package/dist/esm/ifx-switch.entry.js +1 -1
  249. package/dist/esm/ifx-tab.entry.js +1 -1
  250. package/dist/esm/ifx-table.entry.js +2 -2
  251. package/dist/esm/ifx-tabs.entry.js +2 -2
  252. package/dist/esm/ifx-tag.entry.js +1 -1
  253. package/dist/esm/ifx-templates-ui.entry.js +1 -1
  254. package/dist/esm/ifx-textarea.entry.js +1 -1
  255. package/dist/esm/ifx-tooltip.entry.js +4 -4
  256. package/dist/esm/index-c77e25a0.js +12 -8
  257. package/dist/esm/infineon-design-system-stencil.js +1 -1
  258. package/dist/esm/loader.js +1 -1
  259. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
  260. package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
  261. package/dist/infineon-design-system-stencil/{p-66c73a3d.entry.js → p-02f83605.entry.js} +2 -2
  262. package/dist/infineon-design-system-stencil/{p-fbdd611c.entry.js → p-0512a705.entry.js} +2 -2
  263. package/dist/infineon-design-system-stencil/{p-fb3737ae.entry.js → p-07f2abf0.entry.js} +2 -2
  264. package/dist/infineon-design-system-stencil/p-0b6db901.entry.js +2 -0
  265. package/dist/infineon-design-system-stencil/{p-a045ee93.entry.js → p-0e9145f8.entry.js} +2 -2
  266. package/dist/infineon-design-system-stencil/{p-b77e56fd.entry.js → p-1038a1a1.entry.js} +2 -2
  267. package/dist/infineon-design-system-stencil/{p-42964318.entry.js → p-14fa6261.entry.js} +2 -2
  268. package/dist/infineon-design-system-stencil/{p-6ee1b4e7.entry.js → p-17df9778.entry.js} +2 -2
  269. package/dist/infineon-design-system-stencil/{p-00b3d9bf.entry.js → p-27e25f78.entry.js} +2 -2
  270. package/dist/infineon-design-system-stencil/{p-e4319c48.entry.js → p-294c7bab.entry.js} +2 -2
  271. package/dist/infineon-design-system-stencil/p-32e8759a.entry.js +2 -0
  272. package/dist/infineon-design-system-stencil/{p-f12c2743.entry.js → p-3796fda7.entry.js} +2 -2
  273. package/dist/infineon-design-system-stencil/{p-72bbedad.entry.js → p-3ad9c66a.entry.js} +2 -2
  274. package/dist/infineon-design-system-stencil/{p-6d936400.entry.js → p-47953778.entry.js} +2 -2
  275. package/dist/infineon-design-system-stencil/{p-7564f328.entry.js → p-4a239abe.entry.js} +2 -2
  276. package/dist/infineon-design-system-stencil/p-4d544302.entry.js +2 -0
  277. package/dist/infineon-design-system-stencil/{p-66d04b9e.entry.js → p-505aa612.entry.js} +2 -2
  278. package/dist/infineon-design-system-stencil/{p-8215490a.entry.js → p-563c4e58.entry.js} +2 -2
  279. package/dist/infineon-design-system-stencil/{p-cab23e90.entry.js → p-571635d2.entry.js} +2 -2
  280. package/dist/infineon-design-system-stencil/{p-5ce016ad.entry.js → p-5f3a20a2.entry.js} +2 -2
  281. package/dist/infineon-design-system-stencil/{p-e62df6c3.entry.js → p-685f1e5d.entry.js} +2 -2
  282. package/dist/infineon-design-system-stencil/{p-c183f92b.entry.js → p-69272ea3.entry.js} +2 -2
  283. package/dist/infineon-design-system-stencil/p-6b8deb4a.entry.js +2 -0
  284. package/dist/infineon-design-system-stencil/p-6b8deb4a.entry.js.map +1 -0
  285. package/dist/infineon-design-system-stencil/p-78039fa0.entry.js +2 -0
  286. package/dist/infineon-design-system-stencil/{p-5ba50092.entry.js → p-7a1327e5.entry.js} +2 -2
  287. package/dist/infineon-design-system-stencil/{p-96ba5e8c.entry.js → p-7d66ee28.entry.js} +2 -2
  288. package/dist/infineon-design-system-stencil/{p-dd27040f.entry.js → p-7feaadc5.entry.js} +2 -2
  289. package/dist/infineon-design-system-stencil/{p-760b9305.entry.js → p-91beff89.entry.js} +2 -2
  290. package/dist/infineon-design-system-stencil/p-91ffb683.entry.js +2 -0
  291. package/dist/infineon-design-system-stencil/{p-f2932f07.entry.js → p-997901f4.entry.js} +2 -2
  292. package/dist/infineon-design-system-stencil/{p-61010cd5.entry.js → p-9fbd4a42.entry.js} +2 -2
  293. package/dist/infineon-design-system-stencil/{p-64930d03.entry.js → p-a0f432cc.entry.js} +2 -2
  294. package/dist/infineon-design-system-stencil/p-ad50d807.entry.js +2 -0
  295. package/dist/infineon-design-system-stencil/{p-d1a97fd5.entry.js → p-b1538bfa.entry.js} +2 -2
  296. package/dist/infineon-design-system-stencil/{p-3e6ddbf5.entry.js → p-b900e8d0.entry.js} +2 -2
  297. package/dist/infineon-design-system-stencil/{p-ec7a9e00.entry.js → p-bb624976.entry.js} +2 -2
  298. package/dist/infineon-design-system-stencil/{p-9414543f.entry.js → p-c101a974.entry.js} +2 -2
  299. package/dist/infineon-design-system-stencil/{p-d9b49071.entry.js → p-cf27e139.entry.js} +2 -2
  300. package/dist/infineon-design-system-stencil/{p-aac226ce.entry.js → p-d0c21d65.entry.js} +2 -2
  301. package/dist/infineon-design-system-stencil/p-de1a042f.entry.js +2 -0
  302. package/dist/infineon-design-system-stencil/{p-41316712.entry.js → p-df86b421.entry.js} +2 -2
  303. package/dist/infineon-design-system-stencil/{p-6012a317.entry.js → p-eaf5dc4b.entry.js} +2 -2
  304. package/dist/infineon-design-system-stencil/p-eb510174.entry.js +2 -0
  305. package/dist/infineon-design-system-stencil/{p-080456bc.entry.js → p-f3a3242b.entry.js} +2 -2
  306. package/dist/infineon-design-system-stencil/{p-43ab7b53.entry.js → p-f5bc6488.entry.js} +2 -2
  307. package/dist/infineon-design-system-stencil/{p-7d761140.entry.js → p-f926dc7d.entry.js} +2 -2
  308. package/dist/infineon-design-system-stencil/{p-2ed9a934.entry.js → p-fa9610c3.entry.js} +2 -2
  309. package/dist/types/components/file-upload/file-upload.d.ts +143 -0
  310. package/dist/types/components/file-upload/file-upload.stories.d.ts +8 -0
  311. package/dist/types/components.d.ts +125 -0
  312. package/package.json +1 -1
  313. package/dist/infineon-design-system-stencil/p-11fa8bcb.entry.js +0 -2
  314. package/dist/infineon-design-system-stencil/p-1b59a7f9.entry.js +0 -2
  315. package/dist/infineon-design-system-stencil/p-2f87fada.entry.js +0 -2
  316. package/dist/infineon-design-system-stencil/p-56f6da95.entry.js +0 -2
  317. package/dist/infineon-design-system-stencil/p-afe7fdf8.entry.js +0 -2
  318. package/dist/infineon-design-system-stencil/p-b84588f9.entry.js +0 -2
  319. package/dist/infineon-design-system-stencil/p-cf3122b2.entry.js +0 -2
  320. package/dist/infineon-design-system-stencil/p-dc5ff11a.entry.js +0 -2
  321. /package/dist/infineon-design-system-stencil/{p-66c73a3d.entry.js.map → p-02f83605.entry.js.map} +0 -0
  322. /package/dist/infineon-design-system-stencil/{p-fbdd611c.entry.js.map → p-0512a705.entry.js.map} +0 -0
  323. /package/dist/infineon-design-system-stencil/{p-fb3737ae.entry.js.map → p-07f2abf0.entry.js.map} +0 -0
  324. /package/dist/infineon-design-system-stencil/{p-afe7fdf8.entry.js.map → p-0b6db901.entry.js.map} +0 -0
  325. /package/dist/infineon-design-system-stencil/{p-a045ee93.entry.js.map → p-0e9145f8.entry.js.map} +0 -0
  326. /package/dist/infineon-design-system-stencil/{p-b77e56fd.entry.js.map → p-1038a1a1.entry.js.map} +0 -0
  327. /package/dist/infineon-design-system-stencil/{p-42964318.entry.js.map → p-14fa6261.entry.js.map} +0 -0
  328. /package/dist/infineon-design-system-stencil/{p-6ee1b4e7.entry.js.map → p-17df9778.entry.js.map} +0 -0
  329. /package/dist/infineon-design-system-stencil/{p-00b3d9bf.entry.js.map → p-27e25f78.entry.js.map} +0 -0
  330. /package/dist/infineon-design-system-stencil/{p-e4319c48.entry.js.map → p-294c7bab.entry.js.map} +0 -0
  331. /package/dist/infineon-design-system-stencil/{p-cf3122b2.entry.js.map → p-32e8759a.entry.js.map} +0 -0
  332. /package/dist/infineon-design-system-stencil/{p-f12c2743.entry.js.map → p-3796fda7.entry.js.map} +0 -0
  333. /package/dist/infineon-design-system-stencil/{p-72bbedad.entry.js.map → p-3ad9c66a.entry.js.map} +0 -0
  334. /package/dist/infineon-design-system-stencil/{p-6d936400.entry.js.map → p-47953778.entry.js.map} +0 -0
  335. /package/dist/infineon-design-system-stencil/{p-7564f328.entry.js.map → p-4a239abe.entry.js.map} +0 -0
  336. /package/dist/infineon-design-system-stencil/{p-56f6da95.entry.js.map → p-4d544302.entry.js.map} +0 -0
  337. /package/dist/infineon-design-system-stencil/{p-66d04b9e.entry.js.map → p-505aa612.entry.js.map} +0 -0
  338. /package/dist/infineon-design-system-stencil/{p-8215490a.entry.js.map → p-563c4e58.entry.js.map} +0 -0
  339. /package/dist/infineon-design-system-stencil/{p-cab23e90.entry.js.map → p-571635d2.entry.js.map} +0 -0
  340. /package/dist/infineon-design-system-stencil/{p-5ce016ad.entry.js.map → p-5f3a20a2.entry.js.map} +0 -0
  341. /package/dist/infineon-design-system-stencil/{p-e62df6c3.entry.js.map → p-685f1e5d.entry.js.map} +0 -0
  342. /package/dist/infineon-design-system-stencil/{p-c183f92b.entry.js.map → p-69272ea3.entry.js.map} +0 -0
  343. /package/dist/infineon-design-system-stencil/{p-2f87fada.entry.js.map → p-78039fa0.entry.js.map} +0 -0
  344. /package/dist/infineon-design-system-stencil/{p-5ba50092.entry.js.map → p-7a1327e5.entry.js.map} +0 -0
  345. /package/dist/infineon-design-system-stencil/{p-96ba5e8c.entry.js.map → p-7d66ee28.entry.js.map} +0 -0
  346. /package/dist/infineon-design-system-stencil/{p-dd27040f.entry.js.map → p-7feaadc5.entry.js.map} +0 -0
  347. /package/dist/infineon-design-system-stencil/{p-760b9305.entry.js.map → p-91beff89.entry.js.map} +0 -0
  348. /package/dist/infineon-design-system-stencil/{p-11fa8bcb.entry.js.map → p-91ffb683.entry.js.map} +0 -0
  349. /package/dist/infineon-design-system-stencil/{p-f2932f07.entry.js.map → p-997901f4.entry.js.map} +0 -0
  350. /package/dist/infineon-design-system-stencil/{p-61010cd5.entry.js.map → p-9fbd4a42.entry.js.map} +0 -0
  351. /package/dist/infineon-design-system-stencil/{p-64930d03.entry.js.map → p-a0f432cc.entry.js.map} +0 -0
  352. /package/dist/infineon-design-system-stencil/{p-dc5ff11a.entry.js.map → p-ad50d807.entry.js.map} +0 -0
  353. /package/dist/infineon-design-system-stencil/{p-d1a97fd5.entry.js.map → p-b1538bfa.entry.js.map} +0 -0
  354. /package/dist/infineon-design-system-stencil/{p-3e6ddbf5.entry.js.map → p-b900e8d0.entry.js.map} +0 -0
  355. /package/dist/infineon-design-system-stencil/{p-ec7a9e00.entry.js.map → p-bb624976.entry.js.map} +0 -0
  356. /package/dist/infineon-design-system-stencil/{p-9414543f.entry.js.map → p-c101a974.entry.js.map} +0 -0
  357. /package/dist/infineon-design-system-stencil/{p-d9b49071.entry.js.map → p-cf27e139.entry.js.map} +0 -0
  358. /package/dist/infineon-design-system-stencil/{p-aac226ce.entry.js.map → p-d0c21d65.entry.js.map} +0 -0
  359. /package/dist/infineon-design-system-stencil/{p-b84588f9.entry.js.map → p-de1a042f.entry.js.map} +0 -0
  360. /package/dist/infineon-design-system-stencil/{p-41316712.entry.js.map → p-df86b421.entry.js.map} +0 -0
  361. /package/dist/infineon-design-system-stencil/{p-6012a317.entry.js.map → p-eaf5dc4b.entry.js.map} +0 -0
  362. /package/dist/infineon-design-system-stencil/{p-1b59a7f9.entry.js.map → p-eb510174.entry.js.map} +0 -0
  363. /package/dist/infineon-design-system-stencil/{p-080456bc.entry.js.map → p-f3a3242b.entry.js.map} +0 -0
  364. /package/dist/infineon-design-system-stencil/{p-43ab7b53.entry.js.map → p-f5bc6488.entry.js.map} +0 -0
  365. /package/dist/infineon-design-system-stencil/{p-7d761140.entry.js.map → p-f926dc7d.entry.js.map} +0 -0
  366. /package/dist/infineon-design-system-stencil/{p-2ed9a934.entry.js.map → p-fa9610c3.entry.js.map} +0 -0
@@ -0,0 +1,1501 @@
1
+ import { h } from "@stencil/core";
2
+ export class IfxFileUpload {
3
+ constructor() {
4
+ this.dragAndDrop = false;
5
+ this.required = false;
6
+ this.disabled = false;
7
+ this.maxFileSizeMB = 7;
8
+ /** Default set of allowed file extensions (used internally). Can be extended using `additionalAllowedFileTypes`. */
9
+ this.allowedFileTypes = ['jpg', 'jpeg', 'png', 'pdf', 'mov', 'mp3', 'mp4'];
10
+ this.additionalAllowedFileTypes = [];
11
+ this.label = 'Label';
12
+ this.labelRequiredError = 'At least one file must be uploaded';
13
+ this.labelBrowseFiles = 'Browse files';
14
+ this.labelDragAndDrop = 'Drag & Drop or browse files to upload';
15
+ this.labelUploadedFilesHeading = 'Uploaded files';
16
+ this.labelFileTooLarge = 'Upload failed. Max file size: {{size}}MB.';
17
+ this.labelUnsupportedFileType = 'Unsupported file type.';
18
+ this.labelUploaded = 'Successfully uploaded';
19
+ this.labelUploadFailed = 'Upload failed. Please try again.';
20
+ this.labelSupportedFormatsTemplate = 'Supported file formats: {{types}}. Max file size: {{size}}MB.';
21
+ this.labelFileSingular = 'file';
22
+ this.labelFilePlural = 'files';
23
+ this.labelMaxFilesInfo = 'Up to {{count}} {{files}}.';
24
+ this.labelMaxFilesExceeded = 'Upload limit exceeded. Only {{count}} {{files}} allowed.';
25
+ this.ariaLabelBrowseFiles = 'Browse files';
26
+ this.ariaLabelDropzone = 'Upload area. Click to browse or drag and drop files.';
27
+ this.ariaLabelFileInput = 'Upload file';
28
+ this.ariaLabelRemoveFile = 'Remove file';
29
+ this.ariaLabelCancelUpload = 'Cancel upload';
30
+ this.ariaLabelRetryUpload = 'Retry upload';
31
+ this.ariaLabelUploadingStatus = 'Upload in progress';
32
+ this.ariaLabelUploadedStatus = 'Upload completed';
33
+ this.ariaLabelUploadFailedStatus = 'Upload failed';
34
+ this.internalId = `ifx-file-upload-${Math.random().toString(36).substr(2, 9)}`;
35
+ this.isDragOver = false;
36
+ this.files = [];
37
+ this.uploadTasks = [];
38
+ this.rejectedSizeFiles = [];
39
+ this.rejectedTypeFiles = [];
40
+ this.requiredError = false;
41
+ this.statusMessage = null;
42
+ this.fileInputEl = null;
43
+ this.extensionToMimeMap = {
44
+ /**
45
+ * Maps file extensions to MIME types.
46
+ * This is only used for translating `allowedFileTypes` (extensions) into MIME types,
47
+ * and for labeling in the UI. It does NOT define which files are globally allowed.
48
+ */
49
+ // Images
50
+ jpg: 'image/jpeg',
51
+ jpeg: 'image/jpeg',
52
+ png: 'image/png',
53
+ gif: 'image/gif',
54
+ svg: 'image/svg+xml',
55
+ webp: 'image/webp',
56
+ // Documents
57
+ pdf: 'application/pdf',
58
+ doc: 'application/msword',
59
+ docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
60
+ xls: 'application/vnd.ms-excel',
61
+ xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
62
+ ppt: 'application/vnd.ms-powerpoint',
63
+ pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
64
+ txt: 'text/plain',
65
+ csv: 'text/csv',
66
+ json: 'application/json',
67
+ // Audio/Video
68
+ mp3: 'audio/mpeg',
69
+ wav: 'audio/wav',
70
+ mp4: 'video/mp4',
71
+ mov: 'video/quicktime',
72
+ webm: 'video/webm',
73
+ // Archive / Code
74
+ zip: 'application/zip',
75
+ rar: 'application/vnd.rar',
76
+ tar: 'application/x-tar',
77
+ gz: 'application/gzip',
78
+ // Sonstiges
79
+ xml: 'application/xml',
80
+ html: 'text/html',
81
+ css: 'text/css',
82
+ js: 'application/javascript'
83
+ };
84
+ }
85
+ get maxFiles() {
86
+ return this._maxFiles;
87
+ }
88
+ set maxFiles(value) {
89
+ if (typeof value === 'number' && value < 1) {
90
+ console.warn('Invalid `maxFiles` value. Must be >= 1. Value ignored.');
91
+ this._maxFiles = undefined;
92
+ }
93
+ else {
94
+ this._maxFiles = value;
95
+ }
96
+ }
97
+ validateRequired() {
98
+ var _a, _b;
99
+ if (this.required && this.files.length === 0) {
100
+ this.requiredError = true;
101
+ if (((_a = this.statusMessage) === null || _a === void 0 ? void 0 : _a.text) !== this.labelRequiredError) {
102
+ this.statusMessage = {
103
+ type: 'error',
104
+ text: this.labelRequiredError
105
+ };
106
+ }
107
+ this.ifxFileUploadValidation.emit({ valid: false });
108
+ }
109
+ else {
110
+ this.requiredError = false;
111
+ if (((_b = this.statusMessage) === null || _b === void 0 ? void 0 : _b.text) === this.labelRequiredError) {
112
+ this.statusMessage = null;
113
+ }
114
+ this.ifxFileUploadValidation.emit({ valid: true });
115
+ }
116
+ }
117
+ pluralize(count) {
118
+ return count === 1 ? this.labelFileSingular : this.labelFilePlural;
119
+ }
120
+ getNormalizedFileTypes() {
121
+ if (Array.isArray(this.allowedFileTypes)) {
122
+ return this.allowedFileTypes;
123
+ }
124
+ try {
125
+ return JSON.parse(this.allowedFileTypes);
126
+ }
127
+ catch (_a) {
128
+ return this.allowedFileTypes.split(',').map(t => t.trim());
129
+ }
130
+ }
131
+ getLabelFromMimeType(mime) {
132
+ for (const [ext, knownMime] of Object.entries(this.extensionToMimeMap)) {
133
+ if (knownMime === mime) {
134
+ return ext.toUpperCase();
135
+ }
136
+ }
137
+ return mime; // fallback: show raw MIME
138
+ }
139
+ handleFileChange(event) {
140
+ const input = event.target;
141
+ if (!input.files)
142
+ return;
143
+ this.processFiles(input.files);
144
+ }
145
+ handleDrop(event) {
146
+ var _a;
147
+ if (this.disabled)
148
+ return;
149
+ event.preventDefault();
150
+ event.stopPropagation();
151
+ this.isDragOver = false;
152
+ if ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) {
153
+ const droppedFiles = Array.from(event.dataTransfer.files);
154
+ const allowedMimes = [
155
+ ...this.getNormalizedFileTypes()
156
+ .map(ext => this.extensionToMimeMap[ext.toLowerCase()])
157
+ .filter(Boolean),
158
+ ...this.getAdditionalMimeTypes()
159
+ ];
160
+ const acceptedFiles = [];
161
+ const rejectedFiles = [];
162
+ droppedFiles.forEach(file => {
163
+ const isValidType = allowedMimes.includes(file.type);
164
+ const isValidSize = file.size <= this.maxFileSizeMB * 1024 * 1024;
165
+ if (isValidType && isValidSize)
166
+ acceptedFiles.push(file);
167
+ else
168
+ rejectedFiles.push(file);
169
+ });
170
+ this.ifxFileUploadDrop.emit({
171
+ droppedFiles,
172
+ acceptedFiles,
173
+ rejectedFiles
174
+ });
175
+ this.processFiles(event.dataTransfer.files);
176
+ }
177
+ }
178
+ handleDragOver(event) {
179
+ if (this.disabled)
180
+ return;
181
+ event.preventDefault();
182
+ this.isDragOver = true;
183
+ }
184
+ handleDragLeave(event) {
185
+ if (this.disabled)
186
+ return;
187
+ event.preventDefault();
188
+ this.isDragOver = false;
189
+ }
190
+ processFiles(fileList) {
191
+ const selectedFiles = Array.from(fileList);
192
+ const allowedMimes = [
193
+ ...this.getNormalizedFileTypes()
194
+ .map(ext => this.extensionToMimeMap[ext.toLowerCase()])
195
+ .filter(Boolean),
196
+ ...this.getAdditionalMimeTypes()
197
+ ];
198
+ const validFiles = [];
199
+ const rejectedSize = [];
200
+ const rejectedType = [];
201
+ selectedFiles.forEach(file => {
202
+ const isValidType = allowedMimes.includes(file.type);
203
+ const isValidSize = file.size <= this.maxFileSizeMB * 1024 * 1024;
204
+ const isDuplicate = this.files.some(existing => existing.name === file.name && existing.size === file.size);
205
+ if (isDuplicate) {
206
+ this.ifxFileUploadInvalid.emit({ file, reason: 'duplicate' });
207
+ this.ifxFileUploadError.emit({
208
+ file,
209
+ errorType: 'duplicate',
210
+ message: `File "${file.name}" is already added`,
211
+ reason: 'duplicate'
212
+ });
213
+ return;
214
+ }
215
+ if (isValidType && isValidSize) {
216
+ validFiles.push(file);
217
+ }
218
+ else {
219
+ if (!isValidType) {
220
+ rejectedType.push(file.name);
221
+ this.ifxFileUploadInvalid.emit({ file, reason: 'invalid-type' });
222
+ }
223
+ if (!isValidSize) {
224
+ rejectedSize.push(file.name);
225
+ this.ifxFileUploadInvalid.emit({ file, reason: 'invalid-size' });
226
+ }
227
+ this.ifxFileUploadError.emit({
228
+ file,
229
+ errorType: !isValidType ? 'invalid-type' : 'file-too-large',
230
+ message: 'Invalid file rejected',
231
+ reason: !isValidType ? 'unsupported-type' : 'file-too-large'
232
+ });
233
+ }
234
+ });
235
+ this.rejectedSizeFiles = [...this.rejectedSizeFiles, ...rejectedSize];
236
+ this.rejectedTypeFiles = [...this.rejectedTypeFiles, ...rejectedType];
237
+ if (this.maxFiles && this.files.length + validFiles.length > this.maxFiles) {
238
+ const availableSlots = this.maxFiles - this.files.length;
239
+ const limitedFiles = validFiles.slice(0, Math.max(availableSlots, 0));
240
+ const overflowFiles = validFiles.slice(availableSlots);
241
+ this.files = [...this.files, ...limitedFiles];
242
+ limitedFiles.forEach(file => this.startUpload(file));
243
+ if (limitedFiles.length > 0) {
244
+ this.ifxFileUploadAdd.emit({ addedFiles: limitedFiles, files: this.files });
245
+ this.ifxFileUploadChange.emit({ files: this.files });
246
+ }
247
+ overflowFiles.forEach(file => {
248
+ this.ifxFileUploadInvalid.emit({ file, reason: 'too-many-files' });
249
+ this.ifxFileUploadError.emit({
250
+ file,
251
+ errorType: 'too-many-files',
252
+ message: `Upload limit exceeded. Max ${this.maxFiles} files allowed.`,
253
+ reason: 'too-many-files'
254
+ });
255
+ });
256
+ if (overflowFiles.length > 0) {
257
+ this.statusMessage = {
258
+ type: 'error',
259
+ text: this.labelMaxFilesExceeded
260
+ .replace('{{count}}', this.maxFiles.toString())
261
+ .replace('{{files}}', this.pluralize(this.maxFiles))
262
+ };
263
+ this.ifxFileUploadMaxFilesExceeded.emit({
264
+ maxFiles: this.maxFiles,
265
+ attempted: this.files.length + validFiles.length
266
+ });
267
+ }
268
+ return;
269
+ }
270
+ validFiles.forEach(file => this.startUpload(file));
271
+ this.files = [...this.files, ...validFiles];
272
+ if (validFiles.length > 0) {
273
+ this.ifxFileUploadAdd.emit({ addedFiles: validFiles, files: this.files });
274
+ this.ifxFileUploadChange.emit({ files: this.files });
275
+ }
276
+ this.validateRequired();
277
+ }
278
+ retryUpload(file) {
279
+ const taskIndex = this.uploadTasks.findIndex(t => t.file.name === file.name);
280
+ if (taskIndex !== -1) {
281
+ this.uploadTasks.splice(taskIndex, 1);
282
+ this.uploadTasks = [...this.uploadTasks];
283
+ }
284
+ this.ifxFileUploadRetry.emit({ file });
285
+ this.startUpload(file);
286
+ }
287
+ startUpload(file) {
288
+ this.ifxFileUploadStart.emit({ file });
289
+ const task = {
290
+ file,
291
+ progress: 3, // Start with initial progress for better UX
292
+ intervalId: null,
293
+ completed: false,
294
+ };
295
+ this.uploadTasks = [...this.uploadTasks, task];
296
+ if (this.uploadHandler) {
297
+ this.uploadHandler(file, (percent) => {
298
+ if (percent > task.progress) {
299
+ task.progress = Math.min(100, percent);
300
+ this.uploadTasks = [...this.uploadTasks];
301
+ }
302
+ }).then(() => {
303
+ task.progress = 100;
304
+ task.completed = true;
305
+ this.uploadTasks = [...this.uploadTasks];
306
+ this.ifxFileUploadComplete.emit({ file });
307
+ this.ifxFileUploadChange.emit({ files: this.files });
308
+ if (this.uploadTasks.every(t => t.completed)) {
309
+ this.ifxFileUploadAllComplete.emit({ files: this.files });
310
+ }
311
+ }).catch(() => {
312
+ task.error = true;
313
+ this.uploadTasks = [...this.uploadTasks];
314
+ this.ifxFileUploadError.emit({
315
+ file,
316
+ errorType: 'upload-failed',
317
+ message: 'Upload handler rejected file',
318
+ reason: 'custom'
319
+ });
320
+ });
321
+ }
322
+ else {
323
+ const totalSize = file.size;
324
+ const fakeUploadSpeed = 100000;
325
+ let uploaded = 0;
326
+ task.intervalId = window.setInterval(() => {
327
+ uploaded += fakeUploadSpeed / 5;
328
+ const progress = Math.min(100, Math.round((uploaded / totalSize) * 100));
329
+ task.progress = progress;
330
+ this.uploadTasks = [...this.uploadTasks];
331
+ if (progress >= 100) {
332
+ clearInterval(task.intervalId);
333
+ task.completed = true;
334
+ task.intervalId = null;
335
+ this.uploadTasks = [...this.uploadTasks];
336
+ this.ifxFileUploadComplete.emit({ file });
337
+ this.ifxFileUploadChange.emit({ files: this.files });
338
+ if (this.uploadTasks.every(t => t.completed)) {
339
+ this.ifxFileUploadAllComplete.emit({ files: this.files });
340
+ }
341
+ }
342
+ }, 200);
343
+ }
344
+ this.uploadTasks = [...this.uploadTasks, task];
345
+ }
346
+ cancelUpload(file) {
347
+ const taskIndex = this.uploadTasks.findIndex(t => t.file.name === file.name);
348
+ if (taskIndex !== -1) {
349
+ const task = this.uploadTasks[taskIndex];
350
+ if ((task === null || task === void 0 ? void 0 : task.intervalId) !== null) {
351
+ clearInterval(task.intervalId);
352
+ }
353
+ this.uploadTasks = this.uploadTasks.filter((_, i) => i !== taskIndex);
354
+ }
355
+ this.files = this.files.filter(f => f.name !== file.name);
356
+ this.ifxFileUploadAbort.emit({ file });
357
+ this.ifxFileUploadChange.emit({ files: this.files });
358
+ if (this.fileInputEl) {
359
+ this.fileInputEl.value = '';
360
+ }
361
+ this.validateRequired();
362
+ }
363
+ removeFile(file) {
364
+ var _a;
365
+ this.uploadTasks = this.uploadTasks.filter(task => task.file.name !== file.name);
366
+ this.files = this.files.filter(f => f.name !== file.name);
367
+ this.ifxFileUploadRemove.emit({ removedFile: file, files: this.files });
368
+ this.ifxFileUploadChange.emit({ files: this.files });
369
+ this.validateRequired();
370
+ if (this.fileInputEl) {
371
+ this.fileInputEl.value = '';
372
+ }
373
+ if (this.maxFiles &&
374
+ this.files.length < this.maxFiles &&
375
+ ((_a = this.statusMessage) === null || _a === void 0 ? void 0 : _a.text) !== this.labelRequiredError) {
376
+ this.statusMessage = null;
377
+ }
378
+ }
379
+ clearRejectedFile(fileName, type) {
380
+ if (type === 'size') {
381
+ this.rejectedSizeFiles = this.rejectedSizeFiles.filter(f => f !== fileName);
382
+ }
383
+ else {
384
+ this.rejectedTypeFiles = this.rejectedTypeFiles.filter(f => f !== fileName);
385
+ }
386
+ if (this.fileInputEl) {
387
+ this.fileInputEl.value = '';
388
+ }
389
+ if (this.maxFiles && this.files.length < this.maxFiles) {
390
+ this.statusMessage = null;
391
+ }
392
+ this.validateRequired();
393
+ }
394
+ splitFileNameParts(file) {
395
+ const name = file.name;
396
+ const dotIndex = name.lastIndexOf('.');
397
+ if (dotIndex === -1)
398
+ return { base: name, ext: '' };
399
+ return {
400
+ base: name.substring(0, dotIndex),
401
+ ext: name.substring(dotIndex)
402
+ };
403
+ }
404
+ getFileIcon(file) {
405
+ var _a;
406
+ const extension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
407
+ switch (extension) {
408
+ case 'pdf': return 'file-pdf-16';
409
+ case 'jpg':
410
+ case 'jpeg': return 'file-jpg-16';
411
+ case 'png': return 'file-png-16';
412
+ case 'mov': return 'file-mov-16';
413
+ case 'mp3': return 'file-mp3-16';
414
+ case 'mp4': return 'file-mp4-16';
415
+ default: return 'file-16';
416
+ }
417
+ }
418
+ formatSize(bytes) {
419
+ if (bytes >= 1024 * 1024 * 1024) {
420
+ return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
421
+ }
422
+ else if (bytes >= 1024 * 1024) {
423
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
424
+ }
425
+ else if (bytes >= 1024) {
426
+ return `${(bytes / 1024).toFixed(0)} KB`;
427
+ }
428
+ else {
429
+ return `${bytes} B`;
430
+ }
431
+ }
432
+ getAcceptAttribute() {
433
+ const extensionTypes = this.getNormalizedFileTypes().map(ext => '.' + ext.toLowerCase());
434
+ const mimeTypes = this.getAdditionalMimeTypes();
435
+ return [...extensionTypes, ...mimeTypes].join(',');
436
+ }
437
+ getFormattedProgressText(task) {
438
+ const uploadedSize = Math.round((task.progress / 100) * task.file.size);
439
+ const uploadedText = this.formatSize(uploadedSize);
440
+ const totalText = this.formatSize(task.file.size);
441
+ return `${uploadedText} / ${totalText} uploaded`;
442
+ }
443
+ getAdditionalMimeTypes() {
444
+ if (!this.additionalAllowedFileTypes)
445
+ return [];
446
+ if (Array.isArray(this.additionalAllowedFileTypes))
447
+ return this.additionalAllowedFileTypes;
448
+ return this.additionalAllowedFileTypes.split(',').map(t => t.trim());
449
+ }
450
+ getSupportedFileText() {
451
+ const extensions = this.getNormalizedFileTypes().map(ext => ext.toUpperCase());
452
+ const mimeTypes = this.getAdditionalMimeTypes().map(mime => this.getLabelFromMimeType(mime));
453
+ const allTypes = [...extensions, ...mimeTypes];
454
+ const typesLabel = allTypes.join(', ');
455
+ let text = this.labelSupportedFormatsTemplate
456
+ .replace('{{types}}', typesLabel)
457
+ .replace('{{size}}', this.maxFileSizeMB.toString());
458
+ if (this.labelMaxFilesInfo && this.maxFiles) {
459
+ const fileWord = this.pluralize(this.maxFiles);
460
+ const maxFilesText = this.labelMaxFilesInfo
461
+ .replace('{{count}}', this.maxFiles.toString())
462
+ .replace('{{files}}', fileWord);
463
+ text += ` ${maxFilesText}`;
464
+ }
465
+ return text;
466
+ }
467
+ getFormattedFileTooLargeText() {
468
+ return this.labelFileTooLarge.replace('{{size}}', this.maxFileSizeMB.toString());
469
+ }
470
+ renderStatusMessage() {
471
+ if (!this.statusMessage)
472
+ return null;
473
+ return (h("div", { class: `file-upload-status file-upload-status__${this.statusMessage.type}` }, this.statusMessage.type === 'error' && (h("ifx-icon", { icon: "c-warning-16" })), this.statusMessage.text));
474
+ }
475
+ isInputDisabled() {
476
+ return this.disabled || (this.maxFiles !== undefined && this.files.length >= this.maxFiles);
477
+ }
478
+ componentDidLoad() {
479
+ if (this.hostElement.hasAttribute('show-demo-states')) {
480
+ this.showDemoStates = true;
481
+ }
482
+ if (this.showDemoStates) {
483
+ this.injectDemoState();
484
+ }
485
+ }
486
+ // Storybook Demo
487
+ async injectDemoState() {
488
+ const dummyContent = new Array(50000).fill('a').join(''); // ~50 KB
489
+ const bigContent = dummyContent + dummyContent; // ~100 KB
490
+ const uploading = new File([dummyContent], 'Image.jpg', { type: 'image/jpeg' }); // ~50 KB
491
+ const uploaded = new File([bigContent], 'File.pdf', { type: 'application/pdf' }); // ~100 KB
492
+ const failed = new File([dummyContent], 'Text.docx', { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' }); // ~50 KB
493
+ const tooLarge = new File([bigContent + bigContent + bigContent], 'Video.mp4', { type: 'video/mp4' }); // ~300 KB
494
+ const unsupported = new File(['demo'], 'Script.exe', { type: 'application/x-msdownload' }); // very small
495
+ this.files = [uploaded, uploading, failed];
496
+ this.uploadTasks = [
497
+ { file: uploaded, progress: 100, intervalId: null, completed: true },
498
+ { file: uploading, progress: 40, intervalId: null, completed: false },
499
+ { file: failed, progress: 80, intervalId: null, completed: false, error: true }
500
+ ];
501
+ this.rejectedSizeFiles = [tooLarge.name];
502
+ this.rejectedTypeFiles = [unsupported.name];
503
+ }
504
+ // Storybook Demo
505
+ async triggerDemoValidation() {
506
+ this.validateRequired();
507
+ }
508
+ render() {
509
+ return (h("div", { key: 'a80f89cee43ccff778f59842bb62e64e4b425753', class: {
510
+ 'file-upload-wrapper': true,
511
+ 'disabled': this.disabled
512
+ } }, this.label && (h("label", { key: 'b7de45f36b57f21185fc43173a90dd8fbda0b690', class: "file-upload-label", htmlFor: this.internalId }, this.label, this.required && (h("span", { key: 'd72b7c08c54f8fad7ea298df762b815eb565f648', class: `required ${this.requiredError ? 'error' : ''}` }, "*")))), this.dragAndDrop ? this.renderDragAndDropArea() : this.renderUploadArea(), (this.files.length > 0 || this.rejectedSizeFiles.length > 0 || this.rejectedTypeFiles.length > 0) && (h("div", { key: 'f0553b7a7f45764c416d5daa594aa9b1232f6399', class: "file-list-wrapper" }, h("div", { key: '56a0a3004b16ecb9bb348a274c2c2a286ca745e1', class: "upload-heading" }, this.labelUploadedFilesHeading), h("ul", { key: 'f0076761dab5015e5dd02f5ae8f8e4d65f5e9eef', class: "file-list" }, this.rejectedSizeFiles.map(fileName => (h("li", { class: "file-item upload-failed", key: `rejected-size-${fileName}` }, h("div", { class: "file-icon" }, h("ifx-icon", { icon: "file-16" })), h("div", { class: "file-info" }, h("div", { class: "file-top-row" }, h("span", { class: "file-name-wrapper" }, h("span", { class: "file-name-base" }, this.splitFileNameParts({ name: fileName }).base), h("span", { class: "file-name-ext" }, this.splitFileNameParts({ name: fileName }).ext)), h("div", { class: "file-actions" }, h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "delete-forever-16", size: "s", "aria-label": this.ariaLabelRemoveFile, onClick: () => this.clearRejectedFile(fileName, 'size') }))), h("div", { class: "file-middle-row" }, h("span", { class: "file-status", "aria-label": this.labelFileTooLarge.replace('{{size}}', this.maxFileSizeMB.toString()) }, this.getFormattedFileTooLargeText())))))), this.rejectedTypeFiles.map(fileName => (h("li", { class: "file-item upload-failed", key: `rejected-type-${fileName}` }, h("div", { class: "file-icon" }, h("ifx-icon", { icon: "file-16" })), h("div", { class: "file-info" }, h("div", { class: "file-top-row" }, h("span", { class: "file-name-wrapper" }, h("span", { class: "file-name-base" }, this.splitFileNameParts({ name: fileName }).base), h("span", { class: "file-name-ext" }, this.splitFileNameParts({ name: fileName }).ext)), h("div", { class: "file-actions" }, h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "delete-forever-16", size: "s", "aria-label": this.ariaLabelRemoveFile, onClick: () => this.clearRejectedFile(fileName, 'type') }))), h("div", { class: "file-middle-row" }, h("span", { class: "file-status", "aria-label": this.labelUnsupportedFileType }, this.labelUnsupportedFileType)))))), this.files.map((file) => {
513
+ var _a;
514
+ const task = this.uploadTasks.find(t => t.file.name === file.name);
515
+ const progress = (_a = task === null || task === void 0 ? void 0 : task.progress) !== null && _a !== void 0 ? _a : 100;
516
+ const isUploading = task && !task.completed;
517
+ const isError = (task === null || task === void 0 ? void 0 : task.error) === true;
518
+ const itemClass = isError ? 'file-item upload-failed' : isUploading ? 'file-item uploading' : 'file-item upload-success';
519
+ const uniqueKey = `${file.name}-${file.size}`;
520
+ const { base, ext } = this.splitFileNameParts(file);
521
+ return (h("li", { class: itemClass, key: uniqueKey }, h("div", { class: "file-icon" }, h("ifx-icon", { icon: this.getFileIcon(file) })), h("div", { class: "file-info" }, h("div", { class: "file-top-row" }, h("span", { class: "file-name-wrapper" }, h("span", { class: "file-name-base" }, base), h("span", { class: "file-name-ext" }, ext)), h("div", { class: "file-actions" }, h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "refresh-16", size: "s", "aria-label": this.ariaLabelRetryUpload, onClick: () => this.retryUpload(file), style: { display: isError ? 'inline-flex' : 'none' } }), h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "cross-16", size: "s", "aria-label": this.ariaLabelCancelUpload, onClick: () => this.cancelUpload(file), style: { display: isUploading ? 'inline-flex' : 'none' } }), h("ifx-icon-button", { shape: "square", variant: "tertiary", icon: "delete-forever-16", size: "s", "aria-label": this.ariaLabelRemoveFile, onClick: () => this.removeFile(file), style: { display: !isUploading ? 'inline-flex' : 'none' } }))), h("div", { class: "file-middle-row" }, isUploading && task && !task.error && (h("span", { class: "file-uploading", "aria-label": this.ariaLabelUploadingStatus }, this.getFormattedProgressText(task))), !isUploading && !isError && (h("span", null, h("span", { class: "file-size" }, this.formatSize(file.size)), h("span", { class: "file-status", "aria-label": this.ariaLabelUploadedStatus }, h("ifx-icon", { icon: "check-12" }), this.labelUploaded))), isError && (h("span", { class: "file-status", "aria-label": this.ariaLabelUploadFailedStatus }, this.labelUploadFailed))), isUploading && task && !task.error && (h("div", { class: "file-progress-row" }, h("ifx-progress-bar", { size: "s", value: progress, "show-label": "true" }))))));
522
+ }))))));
523
+ }
524
+ renderUploadArea() {
525
+ const handleInputRef = (el) => {
526
+ this.fileInputEl = el;
527
+ };
528
+ return (h("div", { class: { 'upload-button': true } }, h("ifx-button", { variant: "secondary", onClick: () => { var _a; return (_a = this.fileInputEl) === null || _a === void 0 ? void 0 : _a.click(); }, disabled: this.isInputDisabled(), "aria-label": this.ariaLabelBrowseFiles }, h("ifx-icon", { icon: "upload-16" }), this.labelBrowseFiles), h("input", { id: this.internalId, ref: handleInputRef, type: "file", accept: this.getAcceptAttribute(), multiple: true, onChange: (e) => this.handleFileChange(e), style: { display: 'none' }, disabled: this.isInputDisabled(), "aria-label": this.ariaLabelFileInput }), h("p", { class: "file-upload-info" }, this.getSupportedFileText()), this.renderStatusMessage()));
529
+ }
530
+ renderDragAndDropArea() {
531
+ const handleInputRef = (el) => {
532
+ this.fileInputEl = el;
533
+ };
534
+ const triggerInputClick = () => {
535
+ if (this.fileInputEl) {
536
+ this.fileInputEl.click();
537
+ }
538
+ };
539
+ return (h("div", { class: { 'disabled': this.isInputDisabled() } }, h("div", { class: { 'upload-dropzone': true, 'drag-over': this.isDragOver, 'error': this.requiredError }, onClick: triggerInputClick, onDragOver: (e) => this.handleDragOver(e), onDragLeave: (e) => this.handleDragLeave(e), onDrop: (e) => this.handleDrop(e), role: "button", tabIndex: 0, "aria-label": this.ariaLabelDropzone }, h("ifx-icon", { icon: "upload-24", class: "custom-icon" }), h("p", null, this.labelDragAndDrop), h("p", { class: "file-upload-info" }, this.getSupportedFileText()), h("div", { style: { height: '0px', overflow: 'hidden' } }, h("input", { id: this.internalId, ref: handleInputRef, type: "file", accept: this.getAcceptAttribute(), multiple: true, onChange: (e) => this.handleFileChange(e), disabled: this.isInputDisabled(), "aria-label": this.ariaLabelFileInput }))), this.renderStatusMessage()));
540
+ }
541
+ static get is() { return "ifx-file-upload"; }
542
+ static get encapsulation() { return "shadow"; }
543
+ static get originalStyleUrls() {
544
+ return {
545
+ "$": ["file-upload.scss"]
546
+ };
547
+ }
548
+ static get styleUrls() {
549
+ return {
550
+ "$": ["file-upload.css"]
551
+ };
552
+ }
553
+ static get properties() {
554
+ return {
555
+ "dragAndDrop": {
556
+ "type": "boolean",
557
+ "mutable": false,
558
+ "complexType": {
559
+ "original": "boolean",
560
+ "resolved": "boolean",
561
+ "references": {}
562
+ },
563
+ "required": false,
564
+ "optional": false,
565
+ "docs": {
566
+ "tags": [],
567
+ "text": ""
568
+ },
569
+ "getter": false,
570
+ "setter": false,
571
+ "attribute": "drag-and-drop",
572
+ "reflect": false,
573
+ "defaultValue": "false"
574
+ },
575
+ "required": {
576
+ "type": "boolean",
577
+ "mutable": false,
578
+ "complexType": {
579
+ "original": "boolean",
580
+ "resolved": "boolean",
581
+ "references": {}
582
+ },
583
+ "required": false,
584
+ "optional": false,
585
+ "docs": {
586
+ "tags": [],
587
+ "text": ""
588
+ },
589
+ "getter": false,
590
+ "setter": false,
591
+ "attribute": "required",
592
+ "reflect": false,
593
+ "defaultValue": "false"
594
+ },
595
+ "disabled": {
596
+ "type": "boolean",
597
+ "mutable": false,
598
+ "complexType": {
599
+ "original": "boolean",
600
+ "resolved": "boolean",
601
+ "references": {}
602
+ },
603
+ "required": false,
604
+ "optional": false,
605
+ "docs": {
606
+ "tags": [],
607
+ "text": ""
608
+ },
609
+ "getter": false,
610
+ "setter": false,
611
+ "attribute": "disabled",
612
+ "reflect": false,
613
+ "defaultValue": "false"
614
+ },
615
+ "maxFileSizeMB": {
616
+ "type": "number",
617
+ "mutable": false,
618
+ "complexType": {
619
+ "original": "number",
620
+ "resolved": "number",
621
+ "references": {}
622
+ },
623
+ "required": false,
624
+ "optional": false,
625
+ "docs": {
626
+ "tags": [],
627
+ "text": ""
628
+ },
629
+ "getter": false,
630
+ "setter": false,
631
+ "attribute": "max-file-size-m-b",
632
+ "reflect": false,
633
+ "defaultValue": "7"
634
+ },
635
+ "allowedFileTypes": {
636
+ "type": "string",
637
+ "mutable": false,
638
+ "complexType": {
639
+ "original": "string | string[]",
640
+ "resolved": "string | string[]",
641
+ "references": {}
642
+ },
643
+ "required": false,
644
+ "optional": false,
645
+ "docs": {
646
+ "tags": [],
647
+ "text": "Default set of allowed file extensions (used internally). Can be extended using `additionalAllowedFileTypes`."
648
+ },
649
+ "getter": false,
650
+ "setter": false,
651
+ "attribute": "allowed-file-types",
652
+ "reflect": false,
653
+ "defaultValue": "['jpg', 'jpeg', 'png', 'pdf', 'mov', 'mp3', 'mp4']"
654
+ },
655
+ "additionalAllowedFileTypes": {
656
+ "type": "string",
657
+ "mutable": false,
658
+ "complexType": {
659
+ "original": "string | string[]",
660
+ "resolved": "string | string[]",
661
+ "references": {}
662
+ },
663
+ "required": false,
664
+ "optional": true,
665
+ "docs": {
666
+ "tags": [],
667
+ "text": ""
668
+ },
669
+ "getter": false,
670
+ "setter": false,
671
+ "attribute": "additional-allowed-file-types",
672
+ "reflect": false,
673
+ "defaultValue": "[]"
674
+ },
675
+ "uploadHandler": {
676
+ "type": "unknown",
677
+ "mutable": false,
678
+ "complexType": {
679
+ "original": "(file: File, onProgress?: (progress: number) => void) => Promise<void>",
680
+ "resolved": "(file: File, onProgress?: (progress: number) => void) => Promise<void>",
681
+ "references": {
682
+ "File": {
683
+ "location": "global",
684
+ "id": "global::File"
685
+ },
686
+ "Promise": {
687
+ "location": "global",
688
+ "id": "global::Promise"
689
+ }
690
+ }
691
+ },
692
+ "required": false,
693
+ "optional": true,
694
+ "docs": {
695
+ "tags": [],
696
+ "text": ""
697
+ },
698
+ "getter": false,
699
+ "setter": false
700
+ },
701
+ "maxFiles": {
702
+ "type": "number",
703
+ "mutable": false,
704
+ "complexType": {
705
+ "original": "number | undefined",
706
+ "resolved": "number",
707
+ "references": {}
708
+ },
709
+ "required": false,
710
+ "optional": false,
711
+ "docs": {
712
+ "tags": [],
713
+ "text": ""
714
+ },
715
+ "getter": true,
716
+ "setter": true,
717
+ "attribute": "max-files",
718
+ "reflect": false
719
+ },
720
+ "label": {
721
+ "type": "string",
722
+ "mutable": false,
723
+ "complexType": {
724
+ "original": "string",
725
+ "resolved": "string",
726
+ "references": {}
727
+ },
728
+ "required": false,
729
+ "optional": false,
730
+ "docs": {
731
+ "tags": [],
732
+ "text": ""
733
+ },
734
+ "getter": false,
735
+ "setter": false,
736
+ "attribute": "label",
737
+ "reflect": false,
738
+ "defaultValue": "'Label'"
739
+ },
740
+ "labelRequiredError": {
741
+ "type": "string",
742
+ "mutable": false,
743
+ "complexType": {
744
+ "original": "string",
745
+ "resolved": "string",
746
+ "references": {}
747
+ },
748
+ "required": false,
749
+ "optional": false,
750
+ "docs": {
751
+ "tags": [],
752
+ "text": ""
753
+ },
754
+ "getter": false,
755
+ "setter": false,
756
+ "attribute": "label-required-error",
757
+ "reflect": false,
758
+ "defaultValue": "'At least one file must be uploaded'"
759
+ },
760
+ "labelBrowseFiles": {
761
+ "type": "string",
762
+ "mutable": false,
763
+ "complexType": {
764
+ "original": "string",
765
+ "resolved": "string",
766
+ "references": {}
767
+ },
768
+ "required": false,
769
+ "optional": false,
770
+ "docs": {
771
+ "tags": [],
772
+ "text": ""
773
+ },
774
+ "getter": false,
775
+ "setter": false,
776
+ "attribute": "label-browse-files",
777
+ "reflect": false,
778
+ "defaultValue": "'Browse files'"
779
+ },
780
+ "labelDragAndDrop": {
781
+ "type": "string",
782
+ "mutable": false,
783
+ "complexType": {
784
+ "original": "string",
785
+ "resolved": "string",
786
+ "references": {}
787
+ },
788
+ "required": false,
789
+ "optional": false,
790
+ "docs": {
791
+ "tags": [],
792
+ "text": ""
793
+ },
794
+ "getter": false,
795
+ "setter": false,
796
+ "attribute": "label-drag-and-drop",
797
+ "reflect": false,
798
+ "defaultValue": "'Drag & Drop or browse files to upload'"
799
+ },
800
+ "labelUploadedFilesHeading": {
801
+ "type": "string",
802
+ "mutable": false,
803
+ "complexType": {
804
+ "original": "string",
805
+ "resolved": "string",
806
+ "references": {}
807
+ },
808
+ "required": false,
809
+ "optional": false,
810
+ "docs": {
811
+ "tags": [],
812
+ "text": ""
813
+ },
814
+ "getter": false,
815
+ "setter": false,
816
+ "attribute": "label-uploaded-files-heading",
817
+ "reflect": false,
818
+ "defaultValue": "'Uploaded files'"
819
+ },
820
+ "labelFileTooLarge": {
821
+ "type": "string",
822
+ "mutable": false,
823
+ "complexType": {
824
+ "original": "string",
825
+ "resolved": "string",
826
+ "references": {}
827
+ },
828
+ "required": false,
829
+ "optional": false,
830
+ "docs": {
831
+ "tags": [],
832
+ "text": ""
833
+ },
834
+ "getter": false,
835
+ "setter": false,
836
+ "attribute": "label-file-too-large",
837
+ "reflect": false,
838
+ "defaultValue": "'Upload failed. Max file size: {{size}}MB.'"
839
+ },
840
+ "labelUnsupportedFileType": {
841
+ "type": "string",
842
+ "mutable": false,
843
+ "complexType": {
844
+ "original": "string",
845
+ "resolved": "string",
846
+ "references": {}
847
+ },
848
+ "required": false,
849
+ "optional": false,
850
+ "docs": {
851
+ "tags": [],
852
+ "text": ""
853
+ },
854
+ "getter": false,
855
+ "setter": false,
856
+ "attribute": "label-unsupported-file-type",
857
+ "reflect": false,
858
+ "defaultValue": "'Unsupported file type.'"
859
+ },
860
+ "labelUploaded": {
861
+ "type": "string",
862
+ "mutable": false,
863
+ "complexType": {
864
+ "original": "string",
865
+ "resolved": "string",
866
+ "references": {}
867
+ },
868
+ "required": false,
869
+ "optional": false,
870
+ "docs": {
871
+ "tags": [],
872
+ "text": ""
873
+ },
874
+ "getter": false,
875
+ "setter": false,
876
+ "attribute": "label-uploaded",
877
+ "reflect": false,
878
+ "defaultValue": "'Successfully uploaded'"
879
+ },
880
+ "labelUploadFailed": {
881
+ "type": "string",
882
+ "mutable": false,
883
+ "complexType": {
884
+ "original": "string",
885
+ "resolved": "string",
886
+ "references": {}
887
+ },
888
+ "required": false,
889
+ "optional": false,
890
+ "docs": {
891
+ "tags": [],
892
+ "text": ""
893
+ },
894
+ "getter": false,
895
+ "setter": false,
896
+ "attribute": "label-upload-failed",
897
+ "reflect": false,
898
+ "defaultValue": "'Upload failed. Please try again.'"
899
+ },
900
+ "labelSupportedFormatsTemplate": {
901
+ "type": "string",
902
+ "mutable": false,
903
+ "complexType": {
904
+ "original": "string",
905
+ "resolved": "string",
906
+ "references": {}
907
+ },
908
+ "required": false,
909
+ "optional": false,
910
+ "docs": {
911
+ "tags": [],
912
+ "text": ""
913
+ },
914
+ "getter": false,
915
+ "setter": false,
916
+ "attribute": "label-supported-formats-template",
917
+ "reflect": false,
918
+ "defaultValue": "'Supported file formats: {{types}}. Max file size: {{size}}MB.'"
919
+ },
920
+ "labelFileSingular": {
921
+ "type": "string",
922
+ "mutable": false,
923
+ "complexType": {
924
+ "original": "string",
925
+ "resolved": "string",
926
+ "references": {}
927
+ },
928
+ "required": false,
929
+ "optional": false,
930
+ "docs": {
931
+ "tags": [],
932
+ "text": ""
933
+ },
934
+ "getter": false,
935
+ "setter": false,
936
+ "attribute": "label-file-singular",
937
+ "reflect": false,
938
+ "defaultValue": "'file'"
939
+ },
940
+ "labelFilePlural": {
941
+ "type": "string",
942
+ "mutable": false,
943
+ "complexType": {
944
+ "original": "string",
945
+ "resolved": "string",
946
+ "references": {}
947
+ },
948
+ "required": false,
949
+ "optional": false,
950
+ "docs": {
951
+ "tags": [],
952
+ "text": ""
953
+ },
954
+ "getter": false,
955
+ "setter": false,
956
+ "attribute": "label-file-plural",
957
+ "reflect": false,
958
+ "defaultValue": "'files'"
959
+ },
960
+ "labelMaxFilesInfo": {
961
+ "type": "string",
962
+ "mutable": false,
963
+ "complexType": {
964
+ "original": "string",
965
+ "resolved": "string",
966
+ "references": {}
967
+ },
968
+ "required": false,
969
+ "optional": true,
970
+ "docs": {
971
+ "tags": [],
972
+ "text": ""
973
+ },
974
+ "getter": false,
975
+ "setter": false,
976
+ "attribute": "label-max-files-info",
977
+ "reflect": false,
978
+ "defaultValue": "'Up to {{count}} {{files}}.'"
979
+ },
980
+ "labelMaxFilesExceeded": {
981
+ "type": "string",
982
+ "mutable": false,
983
+ "complexType": {
984
+ "original": "string",
985
+ "resolved": "string",
986
+ "references": {}
987
+ },
988
+ "required": false,
989
+ "optional": false,
990
+ "docs": {
991
+ "tags": [],
992
+ "text": ""
993
+ },
994
+ "getter": false,
995
+ "setter": false,
996
+ "attribute": "label-max-files-exceeded",
997
+ "reflect": false,
998
+ "defaultValue": "'Upload limit exceeded. Only {{count}} {{files}} allowed.'"
999
+ },
1000
+ "ariaLabelBrowseFiles": {
1001
+ "type": "string",
1002
+ "mutable": false,
1003
+ "complexType": {
1004
+ "original": "string",
1005
+ "resolved": "string",
1006
+ "references": {}
1007
+ },
1008
+ "required": false,
1009
+ "optional": false,
1010
+ "docs": {
1011
+ "tags": [],
1012
+ "text": ""
1013
+ },
1014
+ "getter": false,
1015
+ "setter": false,
1016
+ "attribute": "aria-label-browse-files",
1017
+ "reflect": false,
1018
+ "defaultValue": "'Browse files'"
1019
+ },
1020
+ "ariaLabelDropzone": {
1021
+ "type": "string",
1022
+ "mutable": false,
1023
+ "complexType": {
1024
+ "original": "string",
1025
+ "resolved": "string",
1026
+ "references": {}
1027
+ },
1028
+ "required": false,
1029
+ "optional": false,
1030
+ "docs": {
1031
+ "tags": [],
1032
+ "text": ""
1033
+ },
1034
+ "getter": false,
1035
+ "setter": false,
1036
+ "attribute": "aria-label-dropzone",
1037
+ "reflect": false,
1038
+ "defaultValue": "'Upload area. Click to browse or drag and drop files.'"
1039
+ },
1040
+ "ariaLabelFileInput": {
1041
+ "type": "string",
1042
+ "mutable": false,
1043
+ "complexType": {
1044
+ "original": "string",
1045
+ "resolved": "string",
1046
+ "references": {}
1047
+ },
1048
+ "required": false,
1049
+ "optional": false,
1050
+ "docs": {
1051
+ "tags": [],
1052
+ "text": ""
1053
+ },
1054
+ "getter": false,
1055
+ "setter": false,
1056
+ "attribute": "aria-label-file-input",
1057
+ "reflect": false,
1058
+ "defaultValue": "'Upload file'"
1059
+ },
1060
+ "ariaLabelRemoveFile": {
1061
+ "type": "string",
1062
+ "mutable": false,
1063
+ "complexType": {
1064
+ "original": "string",
1065
+ "resolved": "string",
1066
+ "references": {}
1067
+ },
1068
+ "required": false,
1069
+ "optional": false,
1070
+ "docs": {
1071
+ "tags": [],
1072
+ "text": ""
1073
+ },
1074
+ "getter": false,
1075
+ "setter": false,
1076
+ "attribute": "aria-label-remove-file",
1077
+ "reflect": false,
1078
+ "defaultValue": "'Remove file'"
1079
+ },
1080
+ "ariaLabelCancelUpload": {
1081
+ "type": "string",
1082
+ "mutable": false,
1083
+ "complexType": {
1084
+ "original": "string",
1085
+ "resolved": "string",
1086
+ "references": {}
1087
+ },
1088
+ "required": false,
1089
+ "optional": false,
1090
+ "docs": {
1091
+ "tags": [],
1092
+ "text": ""
1093
+ },
1094
+ "getter": false,
1095
+ "setter": false,
1096
+ "attribute": "aria-label-cancel-upload",
1097
+ "reflect": false,
1098
+ "defaultValue": "'Cancel upload'"
1099
+ },
1100
+ "ariaLabelRetryUpload": {
1101
+ "type": "string",
1102
+ "mutable": false,
1103
+ "complexType": {
1104
+ "original": "string",
1105
+ "resolved": "string",
1106
+ "references": {}
1107
+ },
1108
+ "required": false,
1109
+ "optional": false,
1110
+ "docs": {
1111
+ "tags": [],
1112
+ "text": ""
1113
+ },
1114
+ "getter": false,
1115
+ "setter": false,
1116
+ "attribute": "aria-label-retry-upload",
1117
+ "reflect": false,
1118
+ "defaultValue": "'Retry upload'"
1119
+ },
1120
+ "ariaLabelUploadingStatus": {
1121
+ "type": "string",
1122
+ "mutable": false,
1123
+ "complexType": {
1124
+ "original": "string",
1125
+ "resolved": "string",
1126
+ "references": {}
1127
+ },
1128
+ "required": false,
1129
+ "optional": false,
1130
+ "docs": {
1131
+ "tags": [],
1132
+ "text": ""
1133
+ },
1134
+ "getter": false,
1135
+ "setter": false,
1136
+ "attribute": "aria-label-uploading-status",
1137
+ "reflect": false,
1138
+ "defaultValue": "'Upload in progress'"
1139
+ },
1140
+ "ariaLabelUploadedStatus": {
1141
+ "type": "string",
1142
+ "mutable": false,
1143
+ "complexType": {
1144
+ "original": "string",
1145
+ "resolved": "string",
1146
+ "references": {}
1147
+ },
1148
+ "required": false,
1149
+ "optional": false,
1150
+ "docs": {
1151
+ "tags": [],
1152
+ "text": ""
1153
+ },
1154
+ "getter": false,
1155
+ "setter": false,
1156
+ "attribute": "aria-label-uploaded-status",
1157
+ "reflect": false,
1158
+ "defaultValue": "'Upload completed'"
1159
+ },
1160
+ "ariaLabelUploadFailedStatus": {
1161
+ "type": "string",
1162
+ "mutable": false,
1163
+ "complexType": {
1164
+ "original": "string",
1165
+ "resolved": "string",
1166
+ "references": {}
1167
+ },
1168
+ "required": false,
1169
+ "optional": false,
1170
+ "docs": {
1171
+ "tags": [],
1172
+ "text": ""
1173
+ },
1174
+ "getter": false,
1175
+ "setter": false,
1176
+ "attribute": "aria-label-upload-failed-status",
1177
+ "reflect": false,
1178
+ "defaultValue": "'Upload failed'"
1179
+ }
1180
+ };
1181
+ }
1182
+ static get states() {
1183
+ return {
1184
+ "isDragOver": {},
1185
+ "files": {},
1186
+ "uploadTasks": {},
1187
+ "rejectedSizeFiles": {},
1188
+ "rejectedTypeFiles": {},
1189
+ "requiredError": {},
1190
+ "statusMessage": {}
1191
+ };
1192
+ }
1193
+ static get events() {
1194
+ return [{
1195
+ "method": "ifxFileUploadAdd",
1196
+ "name": "ifxFileUploadAdd",
1197
+ "bubbles": true,
1198
+ "cancelable": true,
1199
+ "composed": true,
1200
+ "docs": {
1201
+ "tags": [],
1202
+ "text": ""
1203
+ },
1204
+ "complexType": {
1205
+ "original": "{ addedFiles: File[]; files: File[] }",
1206
+ "resolved": "{ addedFiles: File[]; files: File[]; }",
1207
+ "references": {
1208
+ "File": {
1209
+ "location": "global",
1210
+ "id": "global::File"
1211
+ }
1212
+ }
1213
+ }
1214
+ }, {
1215
+ "method": "ifxFileUploadRemove",
1216
+ "name": "ifxFileUploadRemove",
1217
+ "bubbles": true,
1218
+ "cancelable": true,
1219
+ "composed": true,
1220
+ "docs": {
1221
+ "tags": [],
1222
+ "text": ""
1223
+ },
1224
+ "complexType": {
1225
+ "original": "{ removedFile: File; files: File[] }",
1226
+ "resolved": "{ removedFile: File; files: File[]; }",
1227
+ "references": {
1228
+ "File": {
1229
+ "location": "global",
1230
+ "id": "global::File"
1231
+ }
1232
+ }
1233
+ }
1234
+ }, {
1235
+ "method": "ifxFileUploadChange",
1236
+ "name": "ifxFileUploadChange",
1237
+ "bubbles": true,
1238
+ "cancelable": true,
1239
+ "composed": true,
1240
+ "docs": {
1241
+ "tags": [],
1242
+ "text": ""
1243
+ },
1244
+ "complexType": {
1245
+ "original": "{ files: File[] }",
1246
+ "resolved": "{ files: File[]; }",
1247
+ "references": {
1248
+ "File": {
1249
+ "location": "global",
1250
+ "id": "global::File"
1251
+ }
1252
+ }
1253
+ }
1254
+ }, {
1255
+ "method": "ifxFileUploadError",
1256
+ "name": "ifxFileUploadError",
1257
+ "bubbles": true,
1258
+ "cancelable": true,
1259
+ "composed": true,
1260
+ "docs": {
1261
+ "tags": [],
1262
+ "text": ""
1263
+ },
1264
+ "complexType": {
1265
+ "original": "{ errorType: string; file: File; message: string; reason?: string; }",
1266
+ "resolved": "{ errorType: string; file: File; message: string; reason?: string; }",
1267
+ "references": {
1268
+ "File": {
1269
+ "location": "global",
1270
+ "id": "global::File"
1271
+ }
1272
+ }
1273
+ }
1274
+ }, {
1275
+ "method": "ifxFileUploadInvalid",
1276
+ "name": "ifxFileUploadInvalid",
1277
+ "bubbles": true,
1278
+ "cancelable": true,
1279
+ "composed": true,
1280
+ "docs": {
1281
+ "tags": [],
1282
+ "text": ""
1283
+ },
1284
+ "complexType": {
1285
+ "original": "{ file: File; reason: string }",
1286
+ "resolved": "{ file: File; reason: string; }",
1287
+ "references": {
1288
+ "File": {
1289
+ "location": "global",
1290
+ "id": "global::File"
1291
+ }
1292
+ }
1293
+ }
1294
+ }, {
1295
+ "method": "ifxFileUploadStart",
1296
+ "name": "ifxFileUploadStart",
1297
+ "bubbles": true,
1298
+ "cancelable": true,
1299
+ "composed": true,
1300
+ "docs": {
1301
+ "tags": [],
1302
+ "text": ""
1303
+ },
1304
+ "complexType": {
1305
+ "original": "{ file: File }",
1306
+ "resolved": "{ file: File; }",
1307
+ "references": {
1308
+ "File": {
1309
+ "location": "global",
1310
+ "id": "global::File"
1311
+ }
1312
+ }
1313
+ }
1314
+ }, {
1315
+ "method": "ifxFileUploadComplete",
1316
+ "name": "ifxFileUploadComplete",
1317
+ "bubbles": true,
1318
+ "cancelable": true,
1319
+ "composed": true,
1320
+ "docs": {
1321
+ "tags": [],
1322
+ "text": ""
1323
+ },
1324
+ "complexType": {
1325
+ "original": "{ file: File }",
1326
+ "resolved": "{ file: File; }",
1327
+ "references": {
1328
+ "File": {
1329
+ "location": "global",
1330
+ "id": "global::File"
1331
+ }
1332
+ }
1333
+ }
1334
+ }, {
1335
+ "method": "ifxFileUploadAllComplete",
1336
+ "name": "ifxFileUploadAllComplete",
1337
+ "bubbles": true,
1338
+ "cancelable": true,
1339
+ "composed": true,
1340
+ "docs": {
1341
+ "tags": [],
1342
+ "text": ""
1343
+ },
1344
+ "complexType": {
1345
+ "original": "{ files: File[] }",
1346
+ "resolved": "{ files: File[]; }",
1347
+ "references": {
1348
+ "File": {
1349
+ "location": "global",
1350
+ "id": "global::File"
1351
+ }
1352
+ }
1353
+ }
1354
+ }, {
1355
+ "method": "ifxFileUploadAbort",
1356
+ "name": "ifxFileUploadAbort",
1357
+ "bubbles": true,
1358
+ "cancelable": true,
1359
+ "composed": true,
1360
+ "docs": {
1361
+ "tags": [],
1362
+ "text": ""
1363
+ },
1364
+ "complexType": {
1365
+ "original": "{ file: File }",
1366
+ "resolved": "{ file: File; }",
1367
+ "references": {
1368
+ "File": {
1369
+ "location": "global",
1370
+ "id": "global::File"
1371
+ }
1372
+ }
1373
+ }
1374
+ }, {
1375
+ "method": "ifxFileUploadDrop",
1376
+ "name": "ifxFileUploadDrop",
1377
+ "bubbles": true,
1378
+ "cancelable": true,
1379
+ "composed": true,
1380
+ "docs": {
1381
+ "tags": [],
1382
+ "text": ""
1383
+ },
1384
+ "complexType": {
1385
+ "original": "{ droppedFiles: File[]; acceptedFiles: File[]; rejectedFiles: File[] }",
1386
+ "resolved": "{ droppedFiles: File[]; acceptedFiles: File[]; rejectedFiles: File[]; }",
1387
+ "references": {
1388
+ "File": {
1389
+ "location": "global",
1390
+ "id": "global::File"
1391
+ }
1392
+ }
1393
+ }
1394
+ }, {
1395
+ "method": "ifxFileUploadClick",
1396
+ "name": "ifxFileUploadClick",
1397
+ "bubbles": true,
1398
+ "cancelable": true,
1399
+ "composed": true,
1400
+ "docs": {
1401
+ "tags": [],
1402
+ "text": ""
1403
+ },
1404
+ "complexType": {
1405
+ "original": "void",
1406
+ "resolved": "void",
1407
+ "references": {}
1408
+ }
1409
+ }, {
1410
+ "method": "ifxFileUploadMaxFilesExceeded",
1411
+ "name": "ifxFileUploadMaxFilesExceeded",
1412
+ "bubbles": true,
1413
+ "cancelable": true,
1414
+ "composed": true,
1415
+ "docs": {
1416
+ "tags": [],
1417
+ "text": ""
1418
+ },
1419
+ "complexType": {
1420
+ "original": "{ maxFiles: number; attempted: number }",
1421
+ "resolved": "{ maxFiles: number; attempted: number; }",
1422
+ "references": {}
1423
+ }
1424
+ }, {
1425
+ "method": "ifxFileUploadValidation",
1426
+ "name": "ifxFileUploadValidation",
1427
+ "bubbles": true,
1428
+ "cancelable": true,
1429
+ "composed": true,
1430
+ "docs": {
1431
+ "tags": [],
1432
+ "text": ""
1433
+ },
1434
+ "complexType": {
1435
+ "original": "{ valid: boolean }",
1436
+ "resolved": "{ valid: boolean; }",
1437
+ "references": {}
1438
+ }
1439
+ }, {
1440
+ "method": "ifxFileUploadRetry",
1441
+ "name": "ifxFileUploadRetry",
1442
+ "bubbles": true,
1443
+ "cancelable": true,
1444
+ "composed": true,
1445
+ "docs": {
1446
+ "tags": [],
1447
+ "text": ""
1448
+ },
1449
+ "complexType": {
1450
+ "original": "{ file: File }",
1451
+ "resolved": "{ file: File; }",
1452
+ "references": {
1453
+ "File": {
1454
+ "location": "global",
1455
+ "id": "global::File"
1456
+ }
1457
+ }
1458
+ }
1459
+ }];
1460
+ }
1461
+ static get methods() {
1462
+ return {
1463
+ "injectDemoState": {
1464
+ "complexType": {
1465
+ "signature": "() => Promise<void>",
1466
+ "parameters": [],
1467
+ "references": {
1468
+ "Promise": {
1469
+ "location": "global",
1470
+ "id": "global::Promise"
1471
+ }
1472
+ },
1473
+ "return": "Promise<void>"
1474
+ },
1475
+ "docs": {
1476
+ "text": "",
1477
+ "tags": []
1478
+ }
1479
+ },
1480
+ "triggerDemoValidation": {
1481
+ "complexType": {
1482
+ "signature": "() => Promise<void>",
1483
+ "parameters": [],
1484
+ "references": {
1485
+ "Promise": {
1486
+ "location": "global",
1487
+ "id": "global::Promise"
1488
+ }
1489
+ },
1490
+ "return": "Promise<void>"
1491
+ },
1492
+ "docs": {
1493
+ "text": "",
1494
+ "tags": []
1495
+ }
1496
+ }
1497
+ };
1498
+ }
1499
+ static get elementRef() { return "hostElement"; }
1500
+ }
1501
+ //# sourceMappingURL=file-upload.js.map