@duetds/components 8.0.6 → 8.1.1

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 (1247) hide show
  1. package/hydrate/index.d.ts +2 -2
  2. package/hydrate/index.js +19204 -17910
  3. package/lib/cjs/app-globals-aece069f.js +28 -0
  4. package/lib/cjs/{common-strings-86913e94.js → common-strings-22c70ef0.js} +6 -6
  5. package/lib/cjs/create-id-1f8c438f.js +13 -0
  6. package/lib/cjs/duet-action-button.cjs.entry.js +134 -134
  7. package/lib/cjs/duet-alert.cjs.entry.js +109 -106
  8. package/lib/cjs/duet-badge.cjs.entry.js +29 -29
  9. package/lib/cjs/duet-banner.cjs.entry.js +52 -52
  10. package/lib/cjs/duet-breadcrumb.cjs.entry.js +50 -41
  11. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +51 -51
  12. package/lib/cjs/duet-button_2.cjs.entry.js +229 -229
  13. package/lib/cjs/duet-callout.cjs.entry.js +28 -28
  14. package/lib/cjs/duet-caption_4.cjs.entry.js +197 -187
  15. package/lib/cjs/duet-card.cjs.entry.js +100 -94
  16. package/lib/cjs/duet-checkbox.cjs.entry.js +85 -85
  17. package/lib/cjs/duet-checkmark.cjs.entry.js +23 -23
  18. package/lib/cjs/duet-chip.cjs.entry.js +189 -182
  19. package/lib/cjs/duet-choice_2.cjs.entry.js +395 -393
  20. package/lib/cjs/duet-collapsible.cjs.entry.js +105 -99
  21. package/lib/cjs/duet-combobox.cjs.entry.js +363 -363
  22. package/lib/cjs/duet-contact-card.cjs.entry.js +49 -49
  23. package/lib/cjs/duet-cookie-consent.cjs.entry.js +42 -35
  24. package/lib/cjs/duet-date-picker.cjs.entry.js +610 -610
  25. package/lib/cjs/duet-divider_2.cjs.entry.js +53 -53
  26. package/lib/cjs/duet-editable-table_3.cjs.entry.js +1248 -1248
  27. package/lib/cjs/duet-empty-state.cjs.entry.js +26 -26
  28. package/lib/cjs/duet-fieldset.cjs.entry.js +50 -50
  29. package/lib/cjs/duet-file-chooser.cjs.entry.js +44 -44
  30. package/lib/cjs/duet-footer.cjs.entry.js +121 -118
  31. package/lib/cjs/duet-grid_2.cjs.entry.js +185 -185
  32. package/lib/cjs/duet-header_2.cjs.entry.js +613 -611
  33. package/lib/cjs/duet-hero.cjs.entry.js +172 -172
  34. package/lib/cjs/duet-icon.cjs.entry.js +141 -141
  35. package/lib/cjs/duet-input_2.cjs.entry.js +347 -347
  36. package/lib/cjs/duet-layout.cjs.entry.js +51 -51
  37. package/lib/cjs/duet-list_2.cjs.entry.js +99 -99
  38. package/lib/cjs/duet-menu-bar-button.cjs.entry.js +70 -70
  39. package/lib/cjs/duet-menu-bar-dropdown-link.cjs.entry.js +45 -45
  40. package/lib/cjs/duet-menu-bar-dropdown.cjs.entry.js +94 -94
  41. package/lib/cjs/duet-menu-bar-link.cjs.entry.js +58 -58
  42. package/lib/cjs/duet-menu-bar.cjs.entry.js +116 -116
  43. package/lib/cjs/duet-modal.cjs.entry.js +189 -189
  44. package/lib/cjs/duet-multiselect.cjs.entry.js +207 -207
  45. package/lib/cjs/duet-nav.cjs.entry.js +20 -20
  46. package/lib/cjs/duet-notification_2.cjs.entry.js +145 -140
  47. package/lib/cjs/duet-number-input.cjs.entry.js +340 -338
  48. package/lib/cjs/duet-page-heading.cjs.entry.js +26 -26
  49. package/lib/cjs/duet-pagination_2.cjs.entry.js +512 -512
  50. package/lib/cjs/duet-popup-menu-item.cjs.entry.js +62 -62
  51. package/lib/cjs/duet-popup-menu.cjs.entry.js +148 -148
  52. package/lib/cjs/duet-progress.cjs.entry.js +54 -54
  53. package/lib/cjs/duet-promo-card.cjs.entry.js +40 -40
  54. package/lib/cjs/duet-radio_2.cjs.entry.js +197 -197
  55. package/lib/cjs/duet-range-slider.cjs.entry.js +112 -105
  56. package/lib/cjs/duet-scrollable_3.cjs.entry.js +387 -387
  57. package/lib/cjs/duet-section-layout.cjs.entry.js +21 -21
  58. package/lib/cjs/duet-select.cjs.entry.js +156 -156
  59. package/lib/cjs/duet-shaped-image.cjs.entry.js +28 -28
  60. package/lib/cjs/duet-show-more.cjs.entry.js +99 -99
  61. package/lib/cjs/duet-slideout-lang.cjs.entry.js +36 -36
  62. package/lib/cjs/duet-slideout-link.cjs.entry.js +33 -33
  63. package/lib/cjs/duet-slideout-panel-dropdown.cjs.entry.js +50 -50
  64. package/lib/cjs/duet-slideout-panel.cjs.entry.js +120 -120
  65. package/lib/cjs/duet-slideout.cjs.entry.js +196 -196
  66. package/lib/cjs/duet-step_2.cjs.entry.js +189 -185
  67. package/lib/cjs/duet-submenu-bar-dropdown-link.cjs.entry.js +37 -37
  68. package/lib/cjs/duet-submenu-bar-dropdown.cjs.entry.js +104 -104
  69. package/lib/cjs/duet-submenu-bar-link.cjs.entry.js +60 -60
  70. package/lib/cjs/duet-submenu-bar.cjs.entry.js +110 -110
  71. package/lib/cjs/duet-textarea.cjs.entry.js +160 -160
  72. package/lib/cjs/duet-toggle.cjs.entry.js +79 -72
  73. package/lib/cjs/duet-toolbar-dropdown-link.cjs.entry.js +36 -36
  74. package/lib/cjs/duet-toolbar-dropdown.cjs.entry.js +60 -60
  75. package/lib/cjs/duet-toolbar-link.cjs.entry.js +31 -31
  76. package/lib/cjs/duet-toolbar.cjs.entry.js +34 -34
  77. package/lib/cjs/duet-tooltip-button_2.cjs.entry.js +93 -80
  78. package/lib/cjs/duet-tooltip.cjs.entry.js +190 -188
  79. package/lib/cjs/duet-tray.cjs.entry.js +85 -82
  80. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +65 -65
  81. package/lib/cjs/duet-upload-item.cjs.entry.js +81 -81
  82. package/lib/cjs/duet-visually-hidden.cjs.entry.js +12 -12
  83. package/lib/cjs/duet.cjs.js +4 -4
  84. package/lib/cjs/errorcodes.utils-a86b1f94.js +39 -0
  85. package/lib/cjs/focus-utils-d0b70745.js +21 -0
  86. package/lib/cjs/{index-2cce7b13.js → index-2dc54a15.js} +106 -45
  87. package/lib/cjs/input-utils-1096a2c5.js +56 -0
  88. package/lib/cjs/{is-internet-explorer-76c3b538.js → is-internet-explorer-e7f58ebc.js} +2 -2
  89. package/lib/cjs/{js-utils-b20cfc79.js → js-utils-92e24ba1.js} +27 -27
  90. package/lib/cjs/keyboard-utils-7248dd0a.js +69 -0
  91. package/lib/cjs/{language-utils-dc19e8b6.js → language-utils-e8a527e5.js} +74 -74
  92. package/lib/cjs/loader.cjs.js +3 -3
  93. package/lib/cjs/{slot-query-b7555763.js → slot-query-3259af5b.js} +1 -1
  94. package/lib/cjs/string-utils-053749ff.js +59 -0
  95. package/lib/cjs/teleport-e9d05bca.js +99 -0
  96. package/lib/cjs/themeable-component-83a2a0d4.js +15 -0
  97. package/lib/cjs/token-utils-84b3bca6.js +124 -0
  98. package/lib/cjs/watch-options-30a12622.js +61 -0
  99. package/lib/collection/collection-manifest.json +3 -3
  100. package/lib/collection/common/slot-query.js +3 -3
  101. package/lib/collection/common/themeable-component.js +6 -6
  102. package/lib/collection/common-strings.js +6 -6
  103. package/lib/collection/components/duet-action-button/duet-action-button.a11y.e2e.js +5 -5
  104. package/lib/collection/components/duet-action-button/duet-action-button.js +570 -569
  105. package/lib/collection/components/duet-alert/duet-alert.a11y.e2e.js +10 -10
  106. package/lib/collection/components/duet-alert/duet-alert.e2e.js +47 -47
  107. package/lib/collection/components/duet-alert/duet-alert.js +445 -441
  108. package/lib/collection/components/duet-badge/duet-badge.a11y.e2e.js +10 -10
  109. package/lib/collection/components/duet-badge/duet-badge.e2e.js +21 -21
  110. package/lib/collection/components/duet-badge/duet-badge.js +134 -134
  111. package/lib/collection/components/duet-banner/duet-banner.a11y.e2e.js +5 -5
  112. package/lib/collection/components/duet-banner/duet-banner.e2e.js +16 -16
  113. package/lib/collection/components/duet-banner/duet-banner.js +309 -309
  114. package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.js +172 -139
  115. package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.a11y.e2e.js +5 -5
  116. package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.e2e.js +6 -6
  117. package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.js +112 -112
  118. package/lib/collection/components/duet-button/duet-button.a11y.e2e.js +30 -30
  119. package/lib/collection/components/duet-button/duet-button.e2e.js +187 -187
  120. package/lib/collection/components/duet-button/duet-button.js +1068 -1067
  121. package/lib/collection/components/duet-callout/duet-callout.a11y.e2e.js +5 -5
  122. package/lib/collection/components/duet-callout/duet-callout.e2e.js +15 -15
  123. package/lib/collection/components/duet-callout/duet-callout.js +88 -88
  124. package/lib/collection/components/duet-caption/duet-caption.a11y.e2e.js +5 -5
  125. package/lib/collection/components/duet-caption/duet-caption.e2e.js +20 -20
  126. package/lib/collection/components/duet-caption/duet-caption.js +131 -131
  127. package/lib/collection/components/duet-card/duet-card.a11y.e2e.js +10 -10
  128. package/lib/collection/components/duet-card/duet-card.e2e.js +85 -85
  129. package/lib/collection/components/duet-card/duet-card.js +498 -491
  130. package/lib/collection/components/duet-checkbox/duet-checkbox.a11y.e2e.js +10 -10
  131. package/lib/collection/components/duet-checkbox/duet-checkbox.e2e.js +103 -103
  132. package/lib/collection/components/duet-checkbox/duet-checkbox.js +553 -549
  133. package/lib/collection/components/duet-chip/duet-chip.a11y.e2e.js +10 -10
  134. package/lib/collection/components/duet-chip/duet-chip.e2e.js +40 -40
  135. package/lib/collection/components/duet-chip/duet-chip.js +494 -486
  136. package/lib/collection/components/duet-choice/duet-checkmark.js +136 -136
  137. package/lib/collection/components/duet-choice/duet-choice.a11y.e2e.js +25 -25
  138. package/lib/collection/components/duet-choice/duet-choice.e2e.js +171 -171
  139. package/lib/collection/components/duet-choice/duet-choice.js +1095 -1089
  140. package/lib/collection/components/duet-choice-group/duet-choice-group.a11y.e2e.js +5 -5
  141. package/lib/collection/components/duet-choice-group/duet-choice-group.e2e.js +63 -63
  142. package/lib/collection/components/duet-choice-group/duet-choice-group.js +456 -453
  143. package/lib/collection/components/duet-collapsible/duet-collapsible.a11y.e2e.js +10 -10
  144. package/lib/collection/components/duet-collapsible/duet-collapsible.e2e.js +87 -87
  145. package/lib/collection/components/duet-collapsible/duet-collapsible.js +370 -363
  146. package/lib/collection/components/duet-combobox/duet-combobox-select-single.js +2 -2
  147. package/lib/collection/components/duet-combobox/duet-combobox-select.js +8 -8
  148. package/lib/collection/components/duet-combobox/duet-combobox.a11y.e2e.js +5 -5
  149. package/lib/collection/components/duet-combobox/duet-combobox.e2e.js +115 -115
  150. package/lib/collection/components/duet-combobox/duet-combobox.js +670 -669
  151. package/lib/collection/components/duet-contact-card/duet-contact-card.a11y.e2e.js +5 -5
  152. package/lib/collection/components/duet-contact-card/duet-contact-card.js +255 -255
  153. package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.a11y.e2e.js +5 -5
  154. package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.e2e.js +16 -16
  155. package/lib/collection/components/duet-cookie-consent/duet-cookie-consent.js +134 -127
  156. package/lib/collection/components/duet-date-picker/date-i18n.js +97 -97
  157. package/lib/collection/components/duet-date-picker/date-picker-day.js +9 -9
  158. package/lib/collection/components/duet-date-picker/date-picker-input.js +5 -5
  159. package/lib/collection/components/duet-date-picker/date-picker-month.js +16 -16
  160. package/lib/collection/components/duet-date-picker/date-utils.js +95 -95
  161. package/lib/collection/components/duet-date-picker/date-utils.spec.js +323 -323
  162. package/lib/collection/components/duet-date-picker/duet-date-picker.a11y.e2e.js +5 -5
  163. package/lib/collection/components/duet-date-picker/duet-date-picker.e2e.js +618 -618
  164. package/lib/collection/components/duet-date-picker/duet-date-picker.js +1049 -1044
  165. package/lib/collection/components/duet-date-picker/utils.js +29 -29
  166. package/lib/collection/components/duet-divider/duet-divider.a11y.e2e.js +5 -5
  167. package/lib/collection/components/duet-divider/duet-divider.e2e.js +24 -24
  168. package/lib/collection/components/duet-divider/duet-divider.js +112 -112
  169. package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +7 -7
  170. package/lib/collection/components/duet-editable-table/duet-editable-table.a11y.e2e.js +5 -5
  171. package/lib/collection/components/duet-editable-table/duet-editable-table.e2e.js +19 -19
  172. package/lib/collection/components/duet-editable-table/duet-editable-table.js +501 -498
  173. package/lib/collection/components/duet-empty-state/duet-empty-state.a11y.e2e.js +5 -5
  174. package/lib/collection/components/duet-empty-state/duet-empty-state.e2e.js +10 -10
  175. package/lib/collection/components/duet-empty-state/duet-empty-state.js +110 -110
  176. package/lib/collection/components/duet-fieldset/duet-fieldset.a11y.e2e.js +5 -5
  177. package/lib/collection/components/duet-fieldset/duet-fieldset.e2e.js +5 -5
  178. package/lib/collection/components/duet-fieldset/duet-fieldset.js +245 -245
  179. package/lib/collection/components/duet-file-chooser/duet-file-chooser.js +179 -179
  180. package/lib/collection/components/duet-footer/duet-footer.a11y.e2e.js +5 -5
  181. package/lib/collection/components/duet-footer/duet-footer.e2e.js +163 -163
  182. package/lib/collection/components/duet-footer/duet-footer.js +488 -485
  183. package/lib/collection/components/duet-grid/duet-grid.a11y.e2e.js +5 -5
  184. package/lib/collection/components/duet-grid/duet-grid.e2e.js +36 -36
  185. package/lib/collection/components/duet-grid/duet-grid.js +345 -342
  186. package/lib/collection/components/duet-grid-item/duet-grid-item.js +233 -230
  187. package/lib/collection/components/duet-header/duet-header-dropdown.js +12 -12
  188. package/lib/collection/components/duet-header/duet-header-icon.js +2 -2
  189. package/lib/collection/components/duet-header/duet-header.a11y.e2e.js +5 -5
  190. package/lib/collection/components/duet-header/duet-header.e2e.js +430 -430
  191. package/lib/collection/components/duet-header/duet-header.js +1300 -1296
  192. package/lib/collection/components/duet-heading/duet-heading.a11y.e2e.js +5 -5
  193. package/lib/collection/components/duet-heading/duet-heading.e2e.js +21 -21
  194. package/lib/collection/components/duet-heading/duet-heading.js +230 -230
  195. package/lib/collection/components/duet-hero/duet-hero.a11y.e2e.js +15 -15
  196. package/lib/collection/components/duet-hero/duet-hero.e2e.js +166 -166
  197. package/lib/collection/components/duet-hero/duet-hero.js +814 -814
  198. package/lib/collection/components/duet-icon/duet-icon.a11y.e2e.js +5 -5
  199. package/lib/collection/components/duet-icon/duet-icon.e2e.js +26 -26
  200. package/lib/collection/components/duet-icon/duet-icon.js +392 -392
  201. package/lib/collection/components/duet-icon/icon-utils.js +59 -59
  202. package/lib/collection/components/duet-icon/icon-utils.spec.js +76 -76
  203. package/lib/collection/components/duet-input/duet-input.a11y.e2e.js +20 -20
  204. package/lib/collection/components/duet-input/duet-input.e2e.js +195 -195
  205. package/lib/collection/components/duet-input/duet-input.js +1249 -1245
  206. package/lib/collection/components/duet-label/duet-label.a11y.e2e.js +5 -5
  207. package/lib/collection/components/duet-label/duet-label.e2e.js +26 -26
  208. package/lib/collection/components/duet-label/duet-label.js +134 -131
  209. package/lib/collection/components/duet-layout/duet-layout.a11y.e2e.js +5 -5
  210. package/lib/collection/components/duet-layout/duet-layout.e2e.js +26 -26
  211. package/lib/collection/components/duet-layout/duet-layout.js +207 -207
  212. package/lib/collection/components/duet-link/duet-link.a11y.e2e.js +15 -15
  213. package/lib/collection/components/duet-link/duet-link.e2e.js +47 -47
  214. package/lib/collection/components/duet-link/duet-link.js +446 -435
  215. package/lib/collection/components/duet-list/duet-list.a11y.e2e.js +11 -11
  216. package/lib/collection/components/duet-list/duet-list.e2e.js +50 -50
  217. package/lib/collection/components/duet-list/duet-list.js +292 -292
  218. package/lib/collection/components/duet-list-item/duet-list-item.js +81 -81
  219. package/lib/collection/components/duet-logo/duet-logo.a11y.e2e.js +5 -5
  220. package/lib/collection/components/duet-logo/duet-logo.e2e.js +36 -36
  221. package/lib/collection/components/duet-logo/duet-logo.js +293 -292
  222. package/lib/collection/components/duet-menu-bar/duet-menu-bar.a11y.e2e.js +5 -5
  223. package/lib/collection/components/duet-menu-bar/duet-menu-bar.js +261 -261
  224. package/lib/collection/components/duet-menu-bar-button/duet-menu-bar-button.js +347 -346
  225. package/lib/collection/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.js +224 -223
  226. package/lib/collection/components/duet-menu-bar-dropdown-link/duet-menu-bar-dropdown-link.js +133 -133
  227. package/lib/collection/components/duet-menu-bar-link/duet-menu-bar-link.js +170 -170
  228. package/lib/collection/components/duet-modal/duet-modal.a11y.e2e.js +10 -10
  229. package/lib/collection/components/duet-modal/duet-modal.e2e.js +78 -78
  230. package/lib/collection/components/duet-modal/duet-modal.js +687 -687
  231. package/lib/collection/components/duet-multiselect/duet-multiselect.a11y.e2e.js +5 -5
  232. package/lib/collection/components/duet-multiselect/duet-multiselect.e2e.js +87 -87
  233. package/lib/collection/components/duet-multiselect/duet-multiselect.js +654 -653
  234. package/lib/collection/components/duet-nav/duet-nav.js +56 -56
  235. package/lib/collection/components/duet-notification/duet-notification.a11y.e2e.js +5 -5
  236. package/lib/collection/components/duet-notification/duet-notification.e2e.js +6 -6
  237. package/lib/collection/components/duet-notification/duet-notification.js +260 -259
  238. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.a11y.e2e.js +10 -10
  239. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.e2e.js +141 -141
  240. package/lib/collection/components/duet-notification-drawer/duet-notification-drawer.js +382 -383
  241. package/lib/collection/components/duet-number-input/duet-number-input-negative.e2e.js +26 -26
  242. package/lib/collection/components/duet-number-input/duet-number-input.a11y.e2e.js +5 -5
  243. package/lib/collection/components/duet-number-input/duet-number-input.e2e.js +232 -232
  244. package/lib/collection/components/duet-number-input/duet-number-input.js +1120 -1114
  245. package/lib/collection/components/duet-page-heading/duet-page-heading.a11y.e2e.js +5 -5
  246. package/lib/collection/components/duet-page-heading/duet-page-heading.js +104 -104
  247. package/lib/collection/components/duet-pagination/duet-pagination-utils.js +4 -4
  248. package/lib/collection/components/duet-pagination/duet-pagination.a11y.e2e.js +10 -10
  249. package/lib/collection/components/duet-pagination/duet-pagination.e2e.js +79 -79
  250. package/lib/collection/components/duet-pagination/duet-pagination.js +677 -677
  251. package/lib/collection/components/duet-paragraph/duet-paragraph.a11y.e2e.js +5 -5
  252. package/lib/collection/components/duet-paragraph/duet-paragraph.e2e.js +21 -21
  253. package/lib/collection/components/duet-paragraph/duet-paragraph.js +190 -190
  254. package/lib/collection/components/duet-popup-menu/duet-popup-menu.a11y.e2e.js +5 -5
  255. package/lib/collection/components/duet-popup-menu/duet-popup-menu.js +407 -407
  256. package/lib/collection/components/duet-popup-menu-item/duet-popup-menu-item.js +344 -343
  257. package/lib/collection/components/duet-progress/duet-progress.a11y.e2e.js +7 -7
  258. package/lib/collection/components/duet-progress/duet-progress.e2e.js +6 -6
  259. package/lib/collection/components/duet-progress/duet-progress.js +276 -273
  260. package/lib/collection/components/duet-promo-card/duet-promo-card.a11y.e2e.js +5 -5
  261. package/lib/collection/components/duet-promo-card/duet-promo-card.e2e.js +16 -16
  262. package/lib/collection/components/duet-promo-card/duet-promo-card.js +206 -206
  263. package/lib/collection/components/duet-radio/duet-radio.a11y.e2e.js +5 -5
  264. package/lib/collection/components/duet-radio/duet-radio.e2e.js +126 -126
  265. package/lib/collection/components/duet-radio/duet-radio.js +609 -605
  266. package/lib/collection/components/duet-radio-group/duet-radio-group.a11y.e2e.js +10 -10
  267. package/lib/collection/components/duet-radio-group/duet-radio-group.e2e.js +39 -39
  268. package/lib/collection/components/duet-radio-group/duet-radio-group.js +423 -420
  269. package/lib/collection/components/duet-range-slider/duet-range-slider.a11y.e2e.js +5 -5
  270. package/lib/collection/components/duet-range-slider/duet-range-slider.e2e.js +51 -51
  271. package/lib/collection/components/duet-range-slider/duet-range-slider.js +568 -557
  272. package/lib/collection/components/duet-range-stepper/duet-range-stepper.a11y.e2e.js +5 -5
  273. package/lib/collection/components/duet-range-stepper/duet-range-stepper.e2e.js +46 -46
  274. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +341 -341
  275. package/lib/collection/components/duet-range-stepper/duet-range-stepper.spec.js +17 -17
  276. package/lib/collection/components/duet-scrollable/duet-scrollable.a11y.e2e.js +5 -5
  277. package/lib/collection/components/duet-scrollable/duet-scrollable.e2e.js +6 -6
  278. package/lib/collection/components/duet-scrollable/duet-scrollable.js +294 -294
  279. package/lib/collection/components/duet-section-layout/duet-section-layout.a11y.e2e.js +5 -5
  280. package/lib/collection/components/duet-section-layout/duet-section-layout.e2e.js +16 -16
  281. package/lib/collection/components/duet-section-layout/duet-section-layout.js +75 -75
  282. package/lib/collection/components/duet-select/duet-select.a11y.e2e.js +10 -10
  283. package/lib/collection/components/duet-select/duet-select.e2e.js +201 -201
  284. package/lib/collection/components/duet-select/duet-select.js +722 -718
  285. package/lib/collection/components/duet-shaped-image/duet-shaped-image.a11y.e2e.js +5 -5
  286. package/lib/collection/components/duet-shaped-image/duet-shaped-image.js +143 -143
  287. package/lib/collection/components/duet-show-more/duet-show-more.a11y.e2e.js +5 -5
  288. package/lib/collection/components/duet-show-more/duet-show-more.js +436 -436
  289. package/lib/collection/components/duet-slideout/duet-slideout.a11y.e2e.js +5 -5
  290. package/lib/collection/components/duet-slideout/duet-slideout.css +4 -10
  291. package/lib/collection/components/duet-slideout/duet-slideout.js +408 -407
  292. package/lib/collection/components/duet-slideout-lang/duet-slideout-lang.js +75 -75
  293. package/lib/collection/components/duet-slideout-link/duet-slideout-link.js +215 -215
  294. package/lib/collection/components/duet-slideout-panel/duet-slideout-panel.js +282 -281
  295. package/lib/collection/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.js +177 -176
  296. package/lib/collection/components/duet-spacer/duet-spacer.a11y.e2e.js +5 -5
  297. package/lib/collection/components/duet-spacer/duet-spacer.e2e.js +21 -21
  298. package/lib/collection/components/duet-spacer/duet-spacer.js +110 -110
  299. package/lib/collection/components/duet-spinner/duet-spinner.a11y.e2e.js +5 -5
  300. package/lib/collection/components/duet-spinner/duet-spinner.e2e.js +23 -23
  301. package/lib/collection/components/duet-spinner/duet-spinner.js +131 -131
  302. package/lib/collection/components/duet-step/duet-step.e2e.js +83 -83
  303. package/lib/collection/components/duet-step/duet-step.js +299 -291
  304. package/lib/collection/components/duet-stepper/duet-stepper.a11y.e2e.js +8 -8
  305. package/lib/collection/components/duet-stepper/duet-stepper.e2e.js +49 -49
  306. package/lib/collection/components/duet-stepper/duet-stepper.js +243 -243
  307. package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.a11y.e2e.js +5 -5
  308. package/lib/collection/components/duet-submenu-bar/duet-submenu-bar.js +218 -217
  309. package/lib/collection/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.js +235 -234
  310. package/lib/collection/components/duet-submenu-bar-dropdown-link/duet-submenu-bar-dropdown-link.js +162 -162
  311. package/lib/collection/components/duet-submenu-bar-link/duet-submenu-bar-link.js +154 -154
  312. package/lib/collection/components/duet-tab/duet-tab.e2e.js +10 -10
  313. package/lib/collection/components/duet-tab/duet-tab.js +162 -161
  314. package/lib/collection/components/duet-tab-group/duet-tab-group.a11y.e2e.js +5 -5
  315. package/lib/collection/components/duet-tab-group/duet-tab-group.e2e.js +60 -60
  316. package/lib/collection/components/duet-tab-group/duet-tab-group.js +636 -633
  317. package/lib/collection/components/duet-table/duet-table.a11y.e2e.js +5 -5
  318. package/lib/collection/components/duet-table/duet-table.e2e.js +25 -25
  319. package/lib/collection/components/duet-table/duet-table.js +284 -281
  320. package/lib/collection/components/duet-textarea/duet-textarea.a11y.e2e.js +10 -10
  321. package/lib/collection/components/duet-textarea/duet-textarea.e2e.js +193 -193
  322. package/lib/collection/components/duet-textarea/duet-textarea.js +849 -845
  323. package/lib/collection/components/duet-toggle/duet-toggle.a11y.e2e.js +5 -5
  324. package/lib/collection/components/duet-toggle/duet-toggle.e2e.js +66 -66
  325. package/lib/collection/components/duet-toggle/duet-toggle.js +475 -464
  326. package/lib/collection/components/duet-toolbar/duet-toolbar.a11y.e2e.js +5 -5
  327. package/lib/collection/components/duet-toolbar/duet-toolbar.js +105 -105
  328. package/lib/collection/components/duet-toolbar-dropdown/duet-toolbar-dropdown.js +221 -220
  329. package/lib/collection/components/duet-toolbar-dropdown-link/duet-toolbar-dropdown-link.js +160 -160
  330. package/lib/collection/components/duet-toolbar-link/duet-toolbar-link.js +156 -156
  331. package/lib/collection/components/duet-tooltip/duet-tooltip-button.js +172 -164
  332. package/lib/collection/components/duet-tooltip/duet-tooltip-popup.js +258 -251
  333. package/lib/collection/components/duet-tooltip/duet-tooltip.a11y.e2e.js +14 -14
  334. package/lib/collection/components/duet-tooltip/duet-tooltip.e2e.js +76 -76
  335. package/lib/collection/components/duet-tooltip/duet-tooltip.js +537 -529
  336. package/lib/collection/components/duet-tray/duet-tray.a11y.e2e.js +5 -5
  337. package/lib/collection/components/duet-tray/duet-tray.e2e.js +67 -67
  338. package/lib/collection/components/duet-tray/duet-tray.js +318 -315
  339. package/lib/collection/components/duet-upload/duet-upload.e2e.js +40 -40
  340. package/lib/collection/components/duet-upload/duet-upload.js +2282 -2276
  341. package/lib/collection/components/duet-upload/errorcodes.utils.js +22 -22
  342. package/lib/collection/components/duet-upload/mock.helpers.js +85 -85
  343. package/lib/collection/components/duet-upload/upload-editable-item-error.js +4 -4
  344. package/lib/collection/components/duet-upload/upload-editable-item-success.js +15 -15
  345. package/lib/collection/components/duet-upload/upload-item-category.js +2 -2
  346. package/lib/collection/components/duet-upload/upload-item-header.js +4 -4
  347. package/lib/collection/components/duet-upload/upload-validators.js +96 -96
  348. package/lib/collection/components/duet-upload/upload-validators.spec.js +35 -35
  349. package/lib/collection/components/duet-upload/upload.helpers.js +8 -8
  350. package/lib/collection/components/duet-upload/xhr.helpers.js +26 -26
  351. package/lib/collection/components/duet-upload-aria-status/duet-upload-aria-status.js +194 -194
  352. package/lib/collection/components/duet-upload-item/duet-upload-item.js +306 -306
  353. package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.a11y.e2e.js +5 -5
  354. package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.e2e.js +6 -6
  355. package/lib/collection/components/duet-visually-hidden/duet-visually-hidden.js +20 -20
  356. package/lib/collection/global/duet-global.js +1 -27
  357. package/lib/collection/global/log-wrapper.js +29 -29
  358. package/lib/collection/utils/axe-core-utils.js +24 -24
  359. package/lib/collection/utils/create-id.js +2 -2
  360. package/lib/collection/utils/create-id.spec.js +6 -6
  361. package/lib/collection/utils/fixture-utils.js +25 -25
  362. package/lib/collection/utils/focus-utils.js +7 -7
  363. package/lib/collection/utils/group-by.js +9 -9
  364. package/lib/collection/utils/input-utils.js +25 -25
  365. package/lib/collection/utils/is-internet-explorer.js +2 -2
  366. package/lib/collection/utils/js-utils.js +38 -38
  367. package/lib/collection/utils/js-utils.spec.js +14 -14
  368. package/lib/collection/utils/keyboard-utils.js +43 -12
  369. package/lib/collection/utils/language-utils.js +73 -73
  370. package/lib/collection/utils/language-utils.spec.js +151 -151
  371. package/lib/collection/utils/math.utils.js +59 -59
  372. package/lib/collection/utils/math.utils.spec.js +130 -130
  373. package/lib/collection/utils/picture-utils.js +2 -2
  374. package/lib/collection/utils/string-utils.js +31 -31
  375. package/lib/collection/utils/string-utils.spec.js +32 -32
  376. package/lib/collection/utils/teleport.js +77 -77
  377. package/lib/collection/utils/template-utils.js +18 -18
  378. package/lib/collection/utils/template-utils.spec.js +33 -33
  379. package/lib/collection/utils/test-utils.js +31 -31
  380. package/lib/collection/utils/token-utils.js +96 -96
  381. package/lib/collection/utils/token-utils.spec.js +170 -170
  382. package/lib/collection/utils/watch-options.js +44 -44
  383. package/lib/dist-custom-elements/duet-action-button.d.ts +2 -2
  384. package/lib/dist-custom-elements/duet-action-button.js +1 -1
  385. package/lib/dist-custom-elements/duet-alert.d.ts +2 -2
  386. package/lib/dist-custom-elements/duet-alert.js +1 -1
  387. package/lib/dist-custom-elements/duet-badge.d.ts +2 -2
  388. package/lib/dist-custom-elements/duet-badge.js +1 -1
  389. package/lib/dist-custom-elements/duet-banner.d.ts +2 -2
  390. package/lib/dist-custom-elements/duet-banner.js +96 -96
  391. package/lib/dist-custom-elements/duet-breadcrumb.d.ts +2 -2
  392. package/lib/dist-custom-elements/duet-breadcrumb.js +82 -66
  393. package/lib/dist-custom-elements/duet-breadcrumbs.d.ts +2 -2
  394. package/lib/dist-custom-elements/duet-breadcrumbs.js +68 -68
  395. package/lib/dist-custom-elements/duet-button.d.ts +2 -2
  396. package/lib/dist-custom-elements/duet-button.js +1 -1
  397. package/lib/dist-custom-elements/duet-callout.d.ts +2 -2
  398. package/lib/dist-custom-elements/duet-callout.js +57 -57
  399. package/lib/dist-custom-elements/duet-caption.d.ts +2 -2
  400. package/lib/dist-custom-elements/duet-caption.js +1 -1
  401. package/lib/dist-custom-elements/duet-card.d.ts +2 -2
  402. package/lib/dist-custom-elements/duet-card.js +144 -138
  403. package/lib/dist-custom-elements/duet-checkbox.d.ts +2 -2
  404. package/lib/dist-custom-elements/duet-checkbox.js +1 -1
  405. package/lib/dist-custom-elements/duet-checkmark.d.ts +2 -2
  406. package/lib/dist-custom-elements/duet-checkmark.js +1 -1
  407. package/lib/dist-custom-elements/duet-chip.d.ts +2 -2
  408. package/lib/dist-custom-elements/duet-chip.js +226 -219
  409. package/lib/dist-custom-elements/duet-choice-group.d.ts +2 -2
  410. package/lib/dist-custom-elements/duet-choice-group.js +189 -189
  411. package/lib/dist-custom-elements/duet-choice.d.ts +2 -2
  412. package/lib/dist-custom-elements/duet-choice.js +360 -358
  413. package/lib/dist-custom-elements/duet-collapsible.d.ts +2 -2
  414. package/lib/dist-custom-elements/duet-collapsible.js +137 -131
  415. package/lib/dist-custom-elements/duet-combobox.d.ts +2 -2
  416. package/lib/dist-custom-elements/duet-combobox.js +406 -406
  417. package/lib/dist-custom-elements/duet-contact-card.d.ts +2 -2
  418. package/lib/dist-custom-elements/duet-contact-card.js +116 -116
  419. package/lib/dist-custom-elements/duet-cookie-consent.d.ts +2 -2
  420. package/lib/dist-custom-elements/duet-cookie-consent.js +89 -82
  421. package/lib/dist-custom-elements/duet-date-picker.d.ts +2 -2
  422. package/lib/dist-custom-elements/duet-date-picker.js +728 -728
  423. package/lib/dist-custom-elements/duet-divider.d.ts +2 -2
  424. package/lib/dist-custom-elements/duet-divider.js +1 -1
  425. package/lib/dist-custom-elements/duet-editable-table.d.ts +2 -2
  426. package/lib/dist-custom-elements/duet-editable-table.js +231 -231
  427. package/lib/dist-custom-elements/duet-empty-state.d.ts +2 -2
  428. package/lib/dist-custom-elements/duet-empty-state.js +1 -1
  429. package/lib/dist-custom-elements/duet-fieldset.d.ts +2 -2
  430. package/lib/dist-custom-elements/duet-fieldset.js +1 -1
  431. package/lib/dist-custom-elements/duet-file-chooser.d.ts +2 -2
  432. package/lib/dist-custom-elements/duet-file-chooser.js +70 -70
  433. package/lib/dist-custom-elements/duet-footer.d.ts +2 -2
  434. package/lib/dist-custom-elements/duet-footer.js +170 -167
  435. package/lib/dist-custom-elements/duet-grid-item.d.ts +2 -2
  436. package/lib/dist-custom-elements/duet-grid-item.js +1 -1
  437. package/lib/dist-custom-elements/duet-grid.d.ts +2 -2
  438. package/lib/dist-custom-elements/duet-grid.js +1 -1
  439. package/lib/dist-custom-elements/duet-header.d.ts +2 -2
  440. package/lib/dist-custom-elements/duet-header.js +640 -638
  441. package/lib/dist-custom-elements/duet-heading.d.ts +2 -2
  442. package/lib/dist-custom-elements/duet-heading.js +1 -1
  443. package/lib/dist-custom-elements/duet-hero.d.ts +2 -2
  444. package/lib/dist-custom-elements/duet-hero.js +270 -270
  445. package/lib/dist-custom-elements/duet-icon.d.ts +2 -2
  446. package/lib/dist-custom-elements/duet-icon.js +1 -1
  447. package/lib/dist-custom-elements/duet-input.d.ts +2 -2
  448. package/lib/dist-custom-elements/duet-input.js +1 -1
  449. package/lib/dist-custom-elements/duet-label.d.ts +2 -2
  450. package/lib/dist-custom-elements/duet-label.js +1 -1
  451. package/lib/dist-custom-elements/duet-layout.d.ts +2 -2
  452. package/lib/dist-custom-elements/duet-layout.js +73 -73
  453. package/lib/dist-custom-elements/duet-link.d.ts +2 -2
  454. package/lib/dist-custom-elements/duet-link.js +1 -1
  455. package/lib/dist-custom-elements/duet-list-item.d.ts +2 -2
  456. package/lib/dist-custom-elements/duet-list-item.js +1 -1
  457. package/lib/dist-custom-elements/duet-list.d.ts +2 -2
  458. package/lib/dist-custom-elements/duet-list.js +1 -1
  459. package/lib/dist-custom-elements/duet-logo.d.ts +2 -2
  460. package/lib/dist-custom-elements/duet-logo.js +1 -1
  461. package/lib/dist-custom-elements/duet-menu-bar-button.d.ts +2 -2
  462. package/lib/dist-custom-elements/duet-menu-bar-button.js +106 -106
  463. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.d.ts +2 -2
  464. package/lib/dist-custom-elements/duet-menu-bar-dropdown-link.js +70 -70
  465. package/lib/dist-custom-elements/duet-menu-bar-dropdown.d.ts +2 -2
  466. package/lib/dist-custom-elements/duet-menu-bar-dropdown.js +121 -121
  467. package/lib/dist-custom-elements/duet-menu-bar-link.d.ts +2 -2
  468. package/lib/dist-custom-elements/duet-menu-bar-link.js +85 -85
  469. package/lib/dist-custom-elements/duet-menu-bar.d.ts +2 -2
  470. package/lib/dist-custom-elements/duet-menu-bar.js +145 -145
  471. package/lib/dist-custom-elements/duet-modal.d.ts +2 -2
  472. package/lib/dist-custom-elements/duet-modal.js +263 -263
  473. package/lib/dist-custom-elements/duet-multiselect.d.ts +2 -2
  474. package/lib/dist-custom-elements/duet-multiselect.js +300 -300
  475. package/lib/dist-custom-elements/duet-nav.d.ts +2 -2
  476. package/lib/dist-custom-elements/duet-nav.js +36 -36
  477. package/lib/dist-custom-elements/duet-notification-drawer.d.ts +2 -2
  478. package/lib/dist-custom-elements/duet-notification-drawer.js +145 -142
  479. package/lib/dist-custom-elements/duet-notification.d.ts +2 -2
  480. package/lib/dist-custom-elements/duet-notification.js +79 -76
  481. package/lib/dist-custom-elements/duet-number-input.d.ts +2 -2
  482. package/lib/dist-custom-elements/duet-number-input.js +451 -449
  483. package/lib/dist-custom-elements/duet-page-heading.d.ts +2 -2
  484. package/lib/dist-custom-elements/duet-page-heading.js +50 -50
  485. package/lib/dist-custom-elements/duet-pagination.d.ts +2 -2
  486. package/lib/dist-custom-elements/duet-pagination.js +450 -450
  487. package/lib/dist-custom-elements/duet-paragraph.d.ts +2 -2
  488. package/lib/dist-custom-elements/duet-paragraph.js +1 -1
  489. package/lib/dist-custom-elements/duet-popup-menu-item.d.ts +2 -2
  490. package/lib/dist-custom-elements/duet-popup-menu-item.js +95 -95
  491. package/lib/dist-custom-elements/duet-popup-menu.d.ts +2 -2
  492. package/lib/dist-custom-elements/duet-popup-menu.js +177 -177
  493. package/lib/dist-custom-elements/duet-progress.d.ts +2 -2
  494. package/lib/dist-custom-elements/duet-progress.js +1 -1
  495. package/lib/dist-custom-elements/duet-promo-card.d.ts +2 -2
  496. package/lib/dist-custom-elements/duet-promo-card.js +74 -74
  497. package/lib/dist-custom-elements/duet-radio-group.d.ts +2 -2
  498. package/lib/dist-custom-elements/duet-radio-group.js +183 -183
  499. package/lib/dist-custom-elements/duet-radio.d.ts +2 -2
  500. package/lib/dist-custom-elements/duet-radio.js +130 -130
  501. package/lib/dist-custom-elements/duet-range-slider.d.ts +2 -2
  502. package/lib/dist-custom-elements/duet-range-slider.js +153 -146
  503. package/lib/dist-custom-elements/duet-range-stepper.d.ts +2 -2
  504. package/lib/dist-custom-elements/duet-range-stepper.js +207 -207
  505. package/lib/dist-custom-elements/duet-scrollable.d.ts +2 -2
  506. package/lib/dist-custom-elements/duet-scrollable.js +1 -1
  507. package/lib/dist-custom-elements/duet-section-layout.d.ts +2 -2
  508. package/lib/dist-custom-elements/duet-section-layout.js +38 -38
  509. package/lib/dist-custom-elements/duet-select.d.ts +2 -2
  510. package/lib/dist-custom-elements/duet-select.js +1 -1
  511. package/lib/dist-custom-elements/duet-shaped-image.d.ts +2 -2
  512. package/lib/dist-custom-elements/duet-shaped-image.js +48 -48
  513. package/lib/dist-custom-elements/duet-show-more.d.ts +2 -2
  514. package/lib/dist-custom-elements/duet-show-more.js +152 -152
  515. package/lib/dist-custom-elements/duet-slideout-lang.d.ts +2 -2
  516. package/lib/dist-custom-elements/duet-slideout-lang.js +58 -58
  517. package/lib/dist-custom-elements/duet-slideout-link.d.ts +2 -2
  518. package/lib/dist-custom-elements/duet-slideout-link.js +63 -63
  519. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.d.ts +2 -2
  520. package/lib/dist-custom-elements/duet-slideout-panel-dropdown.js +76 -76
  521. package/lib/dist-custom-elements/duet-slideout-panel.d.ts +2 -2
  522. package/lib/dist-custom-elements/duet-slideout-panel.js +149 -149
  523. package/lib/dist-custom-elements/duet-slideout.d.ts +2 -2
  524. package/lib/dist-custom-elements/duet-slideout.js +227 -227
  525. package/lib/dist-custom-elements/duet-spacer.d.ts +2 -2
  526. package/lib/dist-custom-elements/duet-spacer.js +1 -1
  527. package/lib/dist-custom-elements/duet-spinner.d.ts +2 -2
  528. package/lib/dist-custom-elements/duet-spinner.js +1 -1
  529. package/lib/dist-custom-elements/duet-step.d.ts +2 -2
  530. package/lib/dist-custom-elements/duet-step.js +123 -119
  531. package/lib/dist-custom-elements/duet-stepper.d.ts +2 -2
  532. package/lib/dist-custom-elements/duet-stepper.js +129 -129
  533. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.d.ts +2 -2
  534. package/lib/dist-custom-elements/duet-submenu-bar-dropdown-link.js +64 -64
  535. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.d.ts +2 -2
  536. package/lib/dist-custom-elements/duet-submenu-bar-dropdown.js +132 -132
  537. package/lib/dist-custom-elements/duet-submenu-bar-link.d.ts +2 -2
  538. package/lib/dist-custom-elements/duet-submenu-bar-link.js +86 -86
  539. package/lib/dist-custom-elements/duet-submenu-bar.d.ts +2 -2
  540. package/lib/dist-custom-elements/duet-submenu-bar.js +139 -139
  541. package/lib/dist-custom-elements/duet-tab-group.d.ts +2 -2
  542. package/lib/dist-custom-elements/duet-tab-group.js +312 -310
  543. package/lib/dist-custom-elements/duet-tab.d.ts +2 -2
  544. package/lib/dist-custom-elements/duet-tab.js +50 -52
  545. package/lib/dist-custom-elements/duet-table.d.ts +2 -2
  546. package/lib/dist-custom-elements/duet-table.js +1 -1
  547. package/lib/dist-custom-elements/duet-textarea.d.ts +2 -2
  548. package/lib/dist-custom-elements/duet-textarea.js +262 -262
  549. package/lib/dist-custom-elements/duet-toggle.d.ts +2 -2
  550. package/lib/dist-custom-elements/duet-toggle.js +120 -113
  551. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.d.ts +2 -2
  552. package/lib/dist-custom-elements/duet-toolbar-dropdown-link.js +63 -63
  553. package/lib/dist-custom-elements/duet-toolbar-dropdown.d.ts +2 -2
  554. package/lib/dist-custom-elements/duet-toolbar-dropdown.js +88 -88
  555. package/lib/dist-custom-elements/duet-toolbar-link.d.ts +2 -2
  556. package/lib/dist-custom-elements/duet-toolbar-link.js +58 -58
  557. package/lib/dist-custom-elements/duet-toolbar.d.ts +2 -2
  558. package/lib/dist-custom-elements/duet-toolbar.js +52 -52
  559. package/lib/dist-custom-elements/duet-tooltip-button.d.ts +2 -2
  560. package/lib/dist-custom-elements/duet-tooltip-button.js +1 -1
  561. package/lib/dist-custom-elements/duet-tooltip-popup.d.ts +2 -2
  562. package/lib/dist-custom-elements/duet-tooltip-popup.js +1 -1
  563. package/lib/dist-custom-elements/duet-tooltip.d.ts +2 -2
  564. package/lib/dist-custom-elements/duet-tooltip.js +1 -1
  565. package/lib/dist-custom-elements/duet-tray.d.ts +2 -2
  566. package/lib/dist-custom-elements/duet-tray.js +122 -119
  567. package/lib/dist-custom-elements/duet-upload-aria-status.d.ts +2 -2
  568. package/lib/dist-custom-elements/duet-upload-aria-status.js +1 -1
  569. package/lib/dist-custom-elements/duet-upload-item.d.ts +2 -2
  570. package/lib/dist-custom-elements/duet-upload-item.js +1 -1
  571. package/lib/dist-custom-elements/duet-upload.d.ts +2 -2
  572. package/lib/dist-custom-elements/duet-upload.js +1163 -1163
  573. package/lib/dist-custom-elements/duet-visually-hidden.d.ts +2 -2
  574. package/lib/dist-custom-elements/duet-visually-hidden.js +1 -1
  575. package/lib/dist-custom-elements/index.js +15 -41
  576. package/lib/dist-custom-elements/{p-7247d0b2.js → p-04a295c6.js} +65 -43
  577. package/lib/dist-custom-elements/p-064f1578.js +273 -0
  578. package/lib/dist-custom-elements/{p-e4355989.js → p-0b123cad.js} +95 -88
  579. package/lib/dist-custom-elements/p-0e052642.js +55 -0
  580. package/lib/dist-custom-elements/p-0f8e290f.js +226 -0
  581. package/lib/dist-custom-elements/{p-d0987122.js → p-10a15ea1.js} +48 -48
  582. package/lib/{esm/slot-query-7877f18f.js → dist-custom-elements/p-11230037.js} +1 -1
  583. package/lib/dist-custom-elements/{p-2b1a35cd.js → p-1224c98d.js} +278 -278
  584. package/lib/dist-custom-elements/p-1b2fea2b.js +59 -0
  585. package/lib/dist-custom-elements/p-1e4ca38f.js +126 -0
  586. package/lib/dist-custom-elements/{p-bcfb9e03.js → p-24ae0332.js} +50 -50
  587. package/lib/dist-custom-elements/p-2613ae6a.js +265 -0
  588. package/lib/dist-custom-elements/{p-4883df66.js → p-2e36d5bf.js} +74 -74
  589. package/lib/dist-custom-elements/p-435c14fe.js +60 -0
  590. package/lib/dist-custom-elements/p-4391eb0d.js +110 -0
  591. package/lib/dist-custom-elements/p-43b89e38.js +9 -0
  592. package/lib/dist-custom-elements/p-47247d7e.js +465 -0
  593. package/lib/dist-custom-elements/{p-ba870310.js → p-490933fd.js} +47 -47
  594. package/lib/dist-custom-elements/{p-274d11e3.js → p-4ab776f4.js} +6 -6
  595. package/lib/dist-custom-elements/p-5788a98f.js +123 -0
  596. package/lib/dist-custom-elements/p-57a1cba9.js +117 -0
  597. package/lib/dist-custom-elements/p-5e1cd480.js +79 -0
  598. package/lib/dist-custom-elements/p-5e59e970.js +11 -0
  599. package/lib/dist-custom-elements/{p-9dd26401.js → p-618174a5.js} +128 -128
  600. package/lib/dist-custom-elements/{p-6c2e13f0.js → p-6222a43f.js} +56 -56
  601. package/lib/dist-custom-elements/{p-52014bb2.js → p-63ec7678.js} +37 -37
  602. package/lib/dist-custom-elements/{p-180c0d2d.js → p-65d472d7.js} +174 -174
  603. package/lib/dist-custom-elements/p-68bd36c7.js +38 -0
  604. package/lib/dist-custom-elements/p-76e8ab22.js +98 -0
  605. package/lib/dist-custom-elements/p-7d8a2628.js +57 -0
  606. package/lib/dist-custom-elements/p-8b89622f.js +177 -0
  607. package/lib/dist-custom-elements/p-8e357cfb.js +137 -0
  608. package/lib/dist-custom-elements/p-8f253845.js +51 -0
  609. package/lib/dist-custom-elements/{p-d49389d2.js → p-916e66c9.js} +171 -171
  610. package/lib/dist-custom-elements/p-994556c0.js +151 -0
  611. package/lib/dist-custom-elements/{p-3d8d557b.js → p-9e371678.js} +27 -27
  612. package/lib/dist-custom-elements/p-a58bd561.js +13 -0
  613. package/lib/dist-custom-elements/{p-c0af301d.js → p-adef0aaa.js} +64 -64
  614. package/lib/dist-custom-elements/p-b2e550a3.js +97 -0
  615. package/lib/dist-custom-elements/p-ba28f5ce.js +205 -0
  616. package/lib/dist-custom-elements/{p-21b815ae.js → p-beb5db77.js} +42 -42
  617. package/lib/dist-custom-elements/p-d0e52a83.js +76 -0
  618. package/lib/dist-custom-elements/p-df7874f9.js +53 -0
  619. package/lib/dist-custom-elements/{p-3ccd454b.js → p-e034dfea.js} +43 -43
  620. package/lib/dist-custom-elements/p-e929268c.js +62 -0
  621. package/lib/dist-custom-elements/p-eef66341.js +18 -0
  622. package/lib/dist-custom-elements/p-fc1fa737.js +206 -0
  623. package/lib/dist-custom-elements/p-ff591309.js +93 -0
  624. package/lib/duet/duet.esm.js +1 -1
  625. package/lib/duet/duet.js +15 -15
  626. package/lib/duet/{p-bfeeee67.system.entry.js → p-00da8ac7.system.entry.js} +2 -2
  627. package/lib/duet/{p-0c702d36.entry.js → p-023ee57b.entry.js} +1 -1
  628. package/lib/duet/{p-39078c27.system.entry.js → p-02f49953.system.entry.js} +2 -2
  629. package/lib/duet/{p-0558a17e.system.entry.js → p-060a790b.system.entry.js} +1 -1
  630. package/lib/duet/{p-80013513.system.entry.js → p-07ce89ff.system.entry.js} +1 -1
  631. package/lib/duet/{p-301ddafe.entry.js → p-07f5193f.entry.js} +1 -1
  632. package/lib/duet/{p-c801ebee.entry.js → p-094eedb8.entry.js} +1 -1
  633. package/lib/duet/{p-ac367891.entry.js → p-0981fdb2.entry.js} +1 -1
  634. package/lib/duet/{p-051488a0.system.entry.js → p-0a5966c8.system.entry.js} +1 -1
  635. package/lib/duet/p-0b16d4ca.system.entry.js +4 -0
  636. package/lib/duet/{p-445523a8.entry.js → p-0f162710.entry.js} +1 -1
  637. package/lib/duet/{p-6da4db52.system.entry.js → p-0f3f2906.system.entry.js} +1 -1
  638. package/lib/duet/{p-c4e79927.entry.js → p-11653c1e.entry.js} +1 -1
  639. package/lib/duet/p-1276c914.js +5 -0
  640. package/lib/duet/{p-59b9c68b.entry.js → p-16203527.entry.js} +1 -1
  641. package/lib/duet/{p-57afa4b8.system.entry.js → p-1753cb05.system.entry.js} +2 -2
  642. package/lib/duet/{p-032a613f.system.entry.js → p-176fa0e5.system.entry.js} +1 -1
  643. package/lib/duet/{p-e4aa049f.system.entry.js → p-1a44a9e5.system.entry.js} +1 -1
  644. package/lib/duet/p-1bd21f27.entry.js +4 -0
  645. package/lib/duet/{p-e90b5865.system.entry.js → p-1d772039.system.entry.js} +1 -1
  646. package/lib/duet/{p-0606cea3.entry.js → p-218eba4d.entry.js} +1 -1
  647. package/lib/duet/{p-8972381a.system.js → p-224f6c46.system.js} +1 -1
  648. package/lib/duet/{p-8eff5e91.system.entry.js → p-23eaa3b4.system.entry.js} +2 -2
  649. package/lib/duet/{p-a91c8a42.system.entry.js → p-24423276.system.entry.js} +1 -1
  650. package/lib/duet/{p-0d0101d9.system.entry.js → p-245dedef.system.entry.js} +1 -1
  651. package/lib/duet/{p-58a08a7b.system.entry.js → p-24f96782.system.entry.js} +1 -1
  652. package/lib/duet/p-259a297a.system.js +4 -0
  653. package/lib/duet/{p-1dadf501.entry.js → p-25c78304.entry.js} +1 -1
  654. package/lib/duet/p-26332d59.system.entry.js +4 -0
  655. package/lib/duet/{p-3639371a.system.entry.js → p-26de4395.system.entry.js} +1 -1
  656. package/lib/duet/{p-cef36d14.system.entry.js → p-27560f1b.system.entry.js} +1 -1
  657. package/lib/duet/{p-716329a7.system.entry.js → p-27c6aebd.system.entry.js} +1 -1
  658. package/lib/duet/{p-1a877bd1.system.entry.js → p-27d40494.system.entry.js} +1 -1
  659. package/lib/duet/p-2877f5d2.system.entry.js +4 -0
  660. package/lib/duet/p-2bb2b022.js +4 -0
  661. package/lib/duet/{p-95df823b.entry.js → p-2c67f7a8.entry.js} +1 -1
  662. package/lib/duet/p-2ddd31db.entry.js +4 -0
  663. package/lib/duet/{p-4883df66.js → p-2e36d5bf.js} +1 -1
  664. package/lib/duet/{p-ed961bc6.system.entry.js → p-2efce50b.system.entry.js} +1 -1
  665. package/lib/duet/{p-05e3a2cc.entry.js → p-3009021d.entry.js} +1 -1
  666. package/lib/duet/{p-4f770f51.system.entry.js → p-309546c3.system.entry.js} +1 -1
  667. package/lib/duet/p-3126ade6.entry.js +4 -0
  668. package/lib/duet/{p-089043d5.entry.js → p-31c8c180.entry.js} +1 -1
  669. package/lib/duet/{p-da9fe13c.system.entry.js → p-32aed830.system.entry.js} +1 -1
  670. package/lib/duet/{p-def3df7d.entry.js → p-3640cb93.entry.js} +1 -1
  671. package/lib/duet/{p-6f3f2e66.entry.js → p-3772cde9.entry.js} +1 -1
  672. package/lib/duet/p-37811477.system.entry.js +4 -0
  673. package/lib/duet/{p-e7a22d84.system.entry.js → p-37d0ea90.system.entry.js} +1 -1
  674. package/lib/duet/{p-50f4319b.system.entry.js → p-380ee907.system.entry.js} +1 -1
  675. package/lib/duet/{p-8aa7771f.entry.js → p-3aa3de10.entry.js} +1 -1
  676. package/lib/duet/{p-e6168195.entry.js → p-3efd29e1.entry.js} +1 -1
  677. package/lib/duet/{p-3fd4c411.entry.js → p-4196e4ba.entry.js} +1 -1
  678. package/lib/duet/p-43249fcf.system.entry.js +4 -0
  679. package/lib/duet/p-461d8a0b.entry.js +4 -0
  680. package/lib/duet/{p-b0ab2ead.system.entry.js → p-461fd4d8.system.entry.js} +1 -1
  681. package/lib/duet/{p-566668e1.entry.js → p-46cacf4b.entry.js} +1 -1
  682. package/lib/duet/p-470f5db7.entry.js +4 -0
  683. package/lib/duet/{p-f75a1805.system.entry.js → p-482cb8b5.system.entry.js} +1 -1
  684. package/lib/duet/{p-d4d7d607.system.entry.js → p-4d081cf5.system.entry.js} +1 -1
  685. package/lib/duet/{p-d02b92fa.entry.js → p-4da0332f.entry.js} +1 -1
  686. package/lib/duet/p-4dc4f2de.system.entry.js +4 -0
  687. package/lib/duet/{p-8bf363f4.system.entry.js → p-50108ac2.system.entry.js} +1 -1
  688. package/lib/duet/{p-9e2a2cf7.entry.js → p-507f463e.entry.js} +1 -1
  689. package/lib/duet/{p-79faf440.system.entry.js → p-52471579.system.entry.js} +1 -1
  690. package/lib/duet/p-530dd0b2.entry.js +4 -0
  691. package/lib/duet/p-538a7c32.system.entry.js +4 -0
  692. package/lib/duet/{p-3b0969dc.entry.js → p-548b740e.entry.js} +1 -1
  693. package/lib/duet/{p-a8878fd3.entry.js → p-55fbe6bc.entry.js} +1 -1
  694. package/lib/duet/p-5795b0d9.system.js +4 -0
  695. package/lib/duet/p-57f6f292.system.entry.js +4 -0
  696. package/lib/duet/p-582f1599.system.entry.js +4 -0
  697. package/lib/duet/{p-07401f31.entry.js → p-5aaf2889.entry.js} +1 -1
  698. package/lib/duet/{p-80d1a5d3.entry.js → p-5bab6421.entry.js} +1 -1
  699. package/lib/duet/{p-56bdad28.system.entry.js → p-5bb41296.system.entry.js} +1 -1
  700. package/lib/duet/{p-afd00506.entry.js → p-5be3bb6e.entry.js} +1 -1
  701. package/lib/duet/{p-d5a9cfac.entry.js → p-5e777157.entry.js} +1 -1
  702. package/lib/duet/p-5ef65fd9.entry.js +4 -0
  703. package/lib/duet/p-609aaedd.entry.js +4 -0
  704. package/lib/duet/{p-faa6ea94.system.entry.js → p-6399c03a.system.entry.js} +1 -1
  705. package/lib/duet/{p-b8db6e02.system.entry.js → p-63bdc921.system.entry.js} +1 -1
  706. package/lib/duet/p-644b687c.system.entry.js +4 -0
  707. package/lib/duet/p-68625c53.system.entry.js +4 -0
  708. package/lib/duet/{p-5c0de81a.system.entry.js → p-693ebab3.system.entry.js} +1 -1
  709. package/lib/duet/p-6a4fa614.entry.js +4 -0
  710. package/lib/duet/{p-30bd8807.entry.js → p-6b4c9fe2.entry.js} +1 -1
  711. package/lib/duet/p-6d839458.js +4 -0
  712. package/lib/duet/{p-2b70d58a.system.entry.js → p-7206856c.system.entry.js} +1 -1
  713. package/lib/duet/p-737f4f78.entry.js +4 -0
  714. package/lib/duet/p-75655f00.entry.js +4 -0
  715. package/lib/duet/{p-d02e3fe0.system.entry.js → p-77216458.system.entry.js} +1 -1
  716. package/lib/duet/{p-7a46b4ef.system.entry.js → p-773d5541.system.entry.js} +1 -1
  717. package/lib/duet/p-785b629e.entry.js +4 -0
  718. package/lib/duet/{p-98d01f1c.system.entry.js → p-78e18f90.system.entry.js} +1 -1
  719. package/lib/duet/{p-ff7a57a9.entry.js → p-7c3de686.entry.js} +1 -1
  720. package/lib/duet/{p-13915ce0.entry.js → p-7f2e3a82.entry.js} +1 -1
  721. package/lib/duet/{p-ed011021.system.entry.js → p-82b6d775.system.entry.js} +1 -1
  722. package/lib/duet/p-868deb49.entry.js +4 -0
  723. package/lib/duet/p-8693a1f3.entry.js +4 -0
  724. package/lib/duet/{p-c23bf76f.system.entry.js → p-87421fc1.system.entry.js} +1 -1
  725. package/lib/duet/p-89f7e363.system.entry.js +4 -0
  726. package/lib/duet/p-8bb9591d.system.js +4 -0
  727. package/lib/duet/{p-ded28a6e.system.entry.js → p-917d8b40.system.entry.js} +1 -1
  728. package/lib/duet/{p-ed8f7cac.entry.js → p-92d45100.entry.js} +1 -1
  729. package/lib/duet/p-93fd3aa5.system.entry.js +4 -0
  730. package/lib/duet/{p-6da7b933.entry.js → p-95f33440.entry.js} +1 -1
  731. package/lib/duet/{p-a0ecfa13.system.entry.js → p-9865ef30.system.entry.js} +1 -1
  732. package/lib/duet/p-9b877798.system.entry.js +4 -0
  733. package/lib/duet/{p-9cba7f04.system.entry.js → p-9ce2bf89.system.entry.js} +1 -1
  734. package/lib/duet/{p-fd1fb3f9.system.entry.js → p-9d6c89df.system.entry.js} +1 -1
  735. package/lib/duet/{p-77b43a95.entry.js → p-9f19cdc2.entry.js} +1 -1
  736. package/lib/duet/p-9fc19072.entry.js +4 -0
  737. package/lib/duet/{p-b46fa994.system.entry.js → p-a2a3b572.system.entry.js} +2 -2
  738. package/lib/duet/{p-ee796d5e.system.entry.js → p-a57b06db.system.entry.js} +1 -1
  739. package/lib/duet/p-a5f0d126.entry.js +4 -0
  740. package/lib/duet/{p-96f66e14.system.entry.js → p-a69a6b39.system.entry.js} +1 -1
  741. package/lib/duet/p-a931d71d.entry.js +4 -0
  742. package/lib/duet/{p-6205bcb4.entry.js → p-ab4e6587.entry.js} +1 -1
  743. package/lib/duet/{p-8ba72fa0.system.entry.js → p-abe0caff.system.entry.js} +1 -1
  744. package/lib/duet/{p-e3ffb537.system.entry.js → p-ac0a0c5f.system.entry.js} +1 -1
  745. package/lib/duet/{p-ccef6554.system.entry.js → p-b294d764.system.entry.js} +1 -1
  746. package/lib/duet/{p-c08928e1.system.entry.js → p-b32624a6.system.entry.js} +1 -1
  747. package/lib/duet/{p-e9be64de.system.entry.js → p-ba95cf16.system.entry.js} +1 -1
  748. package/lib/duet/{p-4630d3cb.entry.js → p-ba993fed.entry.js} +1 -1
  749. package/lib/duet/p-bb05780d.entry.js +4 -0
  750. package/lib/duet/{p-37af6296.system.entry.js → p-bca48b8e.system.entry.js} +1 -1
  751. package/lib/duet/p-bcee8104.entry.js +4 -0
  752. package/lib/duet/{p-c79a0641.entry.js → p-bd2b785a.entry.js} +1 -1
  753. package/lib/duet/p-bec206f3.entry.js +4 -0
  754. package/lib/duet/{p-501f62eb.system.entry.js → p-befd7146.system.entry.js} +1 -1
  755. package/lib/duet/{p-4aa91f55.entry.js → p-c13fcc8d.entry.js} +1 -1
  756. package/lib/duet/{p-0f1ec9c0.entry.js → p-c172f523.entry.js} +1 -1
  757. package/lib/duet/{p-e1d3c21e.entry.js → p-c17932bc.entry.js} +1 -1
  758. package/lib/duet/p-c23ab199.entry.js +4 -0
  759. package/lib/duet/{p-c5725fee.system.entry.js → p-c6296393.system.entry.js} +1 -1
  760. package/lib/duet/{p-35990684.entry.js → p-c71634ee.entry.js} +1 -1
  761. package/lib/duet/{p-33765ffd.entry.js → p-ca5dfafc.entry.js} +1 -1
  762. package/lib/duet/{p-68f3526e.entry.js → p-cab7ff29.entry.js} +1 -1
  763. package/lib/duet/{p-efdbddb5.system.js → p-cbfdaac4.system.js} +1 -1
  764. package/lib/duet/{p-113d90cb.system.entry.js → p-d0270ec7.system.entry.js} +1 -1
  765. package/lib/duet/p-d1ef0249.system.entry.js +4 -0
  766. package/lib/duet/{p-bdc59646.entry.js → p-d23f7bd1.entry.js} +1 -1
  767. package/lib/duet/p-d328922e.entry.js +4 -0
  768. package/lib/duet/p-d5271b57.entry.js +4 -0
  769. package/lib/duet/{p-1b3fde48.entry.js → p-d5c70827.entry.js} +1 -1
  770. package/lib/duet/{p-89b82e5a.entry.js → p-d832be12.entry.js} +1 -1
  771. package/lib/duet/{p-7671b7b7.system.js → p-da20db91.system.js} +1 -1
  772. package/lib/duet/p-db4ca364.js +4 -0
  773. package/lib/duet/p-db7ec3f2.system.entry.js +4 -0
  774. package/lib/duet/{p-604175d2.entry.js → p-dba55421.entry.js} +1 -1
  775. package/lib/duet/{p-a7e7c277.system.entry.js → p-de9c3476.system.entry.js} +1 -1
  776. package/lib/duet/p-df073faa.entry.js +4 -0
  777. package/lib/duet/p-df5f7376.entry.js +4 -0
  778. package/lib/duet/{p-dc63462c.entry.js → p-e3ba4d89.entry.js} +1 -1
  779. package/lib/duet/{p-64b323bf.entry.js → p-ef4a09e9.entry.js} +1 -1
  780. package/lib/duet/p-ef66a3c3.system.entry.js +4 -0
  781. package/lib/duet/p-f18c2892.system.js +5 -0
  782. package/lib/duet/{p-8855bd51.entry.js → p-f19b59f8.entry.js} +1 -1
  783. package/lib/duet/p-f1f5dfa4.system.entry.js +4 -0
  784. package/lib/duet/{p-fab7c1ed.entry.js → p-f20d29b8.entry.js} +1 -1
  785. package/lib/duet/{p-c3289020.system.entry.js → p-f2b556d7.system.entry.js} +1 -1
  786. package/lib/duet/p-f3efe8c2.system.entry.js +4 -0
  787. package/lib/duet/p-fabb616b.js +4 -0
  788. package/lib/duet/{p-1e9f1c45.entry.js → p-fb5877c4.entry.js} +1 -1
  789. package/lib/duet/p-fc366b12.system.entry.js +4 -0
  790. package/lib/duet/{p-54fbdedf.entry.js → p-fc788a9a.entry.js} +1 -1
  791. package/lib/duet/{p-bf3331ed.entry.js → p-fcfe83b1.entry.js} +1 -1
  792. package/lib/duet/{p-6ae7579a.system.entry.js → p-ffc50558.system.entry.js} +1 -1
  793. package/lib/esm/app-globals-45aa6d20.js +26 -0
  794. package/lib/esm/{common-strings-c0ac5a0b.js → common-strings-59db6973.js} +6 -6
  795. package/lib/esm/create-id-149a1b6d.js +11 -0
  796. package/lib/esm/duet-action-button.entry.js +134 -134
  797. package/lib/esm/duet-alert.entry.js +109 -106
  798. package/lib/esm/duet-badge.entry.js +29 -29
  799. package/lib/esm/duet-banner.entry.js +52 -52
  800. package/lib/esm/duet-breadcrumb.entry.js +50 -41
  801. package/lib/esm/duet-breadcrumbs.entry.js +51 -51
  802. package/lib/esm/duet-button_2.entry.js +229 -229
  803. package/lib/esm/duet-callout.entry.js +28 -28
  804. package/lib/esm/duet-caption_4.entry.js +197 -187
  805. package/lib/esm/duet-card.entry.js +100 -94
  806. package/lib/esm/duet-checkbox.entry.js +85 -85
  807. package/lib/esm/duet-checkmark.entry.js +23 -23
  808. package/lib/esm/duet-chip.entry.js +189 -182
  809. package/lib/esm/duet-choice_2.entry.js +395 -393
  810. package/lib/esm/duet-collapsible.entry.js +105 -99
  811. package/lib/esm/duet-combobox.entry.js +363 -363
  812. package/lib/esm/duet-contact-card.entry.js +49 -49
  813. package/lib/esm/duet-cookie-consent.entry.js +42 -35
  814. package/lib/esm/duet-date-picker.entry.js +610 -610
  815. package/lib/esm/duet-divider_2.entry.js +53 -53
  816. package/lib/esm/duet-editable-table_3.entry.js +1248 -1248
  817. package/lib/esm/duet-empty-state.entry.js +26 -26
  818. package/lib/esm/duet-fieldset.entry.js +50 -50
  819. package/lib/esm/duet-file-chooser.entry.js +44 -44
  820. package/lib/esm/duet-footer.entry.js +121 -118
  821. package/lib/esm/duet-grid_2.entry.js +185 -185
  822. package/lib/esm/duet-header_2.entry.js +613 -611
  823. package/lib/esm/duet-hero.entry.js +172 -172
  824. package/lib/esm/duet-icon.entry.js +141 -141
  825. package/lib/esm/duet-input_2.entry.js +347 -347
  826. package/lib/esm/duet-layout.entry.js +51 -51
  827. package/lib/esm/duet-list_2.entry.js +99 -99
  828. package/lib/esm/duet-menu-bar-button.entry.js +70 -70
  829. package/lib/esm/duet-menu-bar-dropdown-link.entry.js +45 -45
  830. package/lib/esm/duet-menu-bar-dropdown.entry.js +94 -94
  831. package/lib/esm/duet-menu-bar-link.entry.js +58 -58
  832. package/lib/esm/duet-menu-bar.entry.js +116 -116
  833. package/lib/esm/duet-modal.entry.js +189 -189
  834. package/lib/esm/duet-multiselect.entry.js +207 -207
  835. package/lib/esm/duet-nav.entry.js +20 -20
  836. package/lib/esm/duet-notification_2.entry.js +145 -140
  837. package/lib/esm/duet-number-input.entry.js +340 -338
  838. package/lib/esm/duet-page-heading.entry.js +26 -26
  839. package/lib/esm/duet-pagination_2.entry.js +512 -512
  840. package/lib/esm/duet-popup-menu-item.entry.js +62 -62
  841. package/lib/esm/duet-popup-menu.entry.js +148 -148
  842. package/lib/esm/duet-progress.entry.js +54 -54
  843. package/lib/esm/duet-promo-card.entry.js +40 -40
  844. package/lib/esm/duet-radio_2.entry.js +197 -197
  845. package/lib/esm/duet-range-slider.entry.js +112 -105
  846. package/lib/esm/duet-scrollable_3.entry.js +387 -387
  847. package/lib/esm/duet-section-layout.entry.js +21 -21
  848. package/lib/esm/duet-select.entry.js +156 -156
  849. package/lib/esm/duet-shaped-image.entry.js +28 -28
  850. package/lib/esm/duet-show-more.entry.js +99 -99
  851. package/lib/esm/duet-slideout-lang.entry.js +36 -36
  852. package/lib/esm/duet-slideout-link.entry.js +33 -33
  853. package/lib/esm/duet-slideout-panel-dropdown.entry.js +50 -50
  854. package/lib/esm/duet-slideout-panel.entry.js +120 -120
  855. package/lib/esm/duet-slideout.entry.js +196 -196
  856. package/lib/esm/duet-step_2.entry.js +189 -185
  857. package/lib/esm/duet-submenu-bar-dropdown-link.entry.js +37 -37
  858. package/lib/esm/duet-submenu-bar-dropdown.entry.js +104 -104
  859. package/lib/esm/duet-submenu-bar-link.entry.js +60 -60
  860. package/lib/esm/duet-submenu-bar.entry.js +110 -110
  861. package/lib/esm/duet-textarea.entry.js +160 -160
  862. package/lib/esm/duet-toggle.entry.js +79 -72
  863. package/lib/esm/duet-toolbar-dropdown-link.entry.js +36 -36
  864. package/lib/esm/duet-toolbar-dropdown.entry.js +60 -60
  865. package/lib/esm/duet-toolbar-link.entry.js +31 -31
  866. package/lib/esm/duet-toolbar.entry.js +34 -34
  867. package/lib/esm/duet-tooltip-button_2.entry.js +93 -80
  868. package/lib/esm/duet-tooltip.entry.js +190 -188
  869. package/lib/esm/duet-tray.entry.js +85 -82
  870. package/lib/esm/duet-upload-aria-status.entry.js +65 -65
  871. package/lib/esm/duet-upload-item.entry.js +81 -81
  872. package/lib/esm/duet-visually-hidden.entry.js +12 -12
  873. package/lib/esm/duet.js +5 -5
  874. package/lib/esm/errorcodes.utils-e681347c.js +36 -0
  875. package/lib/esm/focus-utils-23aad0c9.js +18 -0
  876. package/lib/esm/{index-b3bf9761.js → index-02e78bbf.js} +106 -45
  877. package/lib/esm/input-utils-85681162.js +53 -0
  878. package/lib/esm/is-internet-explorer-2c48f686.js +9 -0
  879. package/lib/esm/{js-utils-a35dcc8c.js → js-utils-9b9e0039.js} +27 -27
  880. package/lib/esm/keyboard-utils-eba88365.js +51 -0
  881. package/lib/esm/{language-utils-9ff76444.js → language-utils-00ca4c55.js} +74 -74
  882. package/lib/esm/loader.js +4 -4
  883. package/lib/{dist-custom-elements/p-f8c76b25.js → esm/slot-query-022710bb.js} +1 -1
  884. package/lib/esm/string-utils-ca039233.js +55 -0
  885. package/lib/esm/teleport-4462e8c1.js +97 -0
  886. package/lib/esm/themeable-component-724c0f7e.js +13 -0
  887. package/lib/esm/token-utils-b4bd3ec7.js +117 -0
  888. package/lib/esm/watch-options-e96ecd92.js +57 -0
  889. package/lib/esm-es5/app-globals-45aa6d20.js +4 -0
  890. package/lib/esm-es5/duet-action-button.entry.js +1 -1
  891. package/lib/esm-es5/duet-alert.entry.js +2 -2
  892. package/lib/esm-es5/duet-badge.entry.js +1 -1
  893. package/lib/esm-es5/duet-banner.entry.js +1 -1
  894. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  895. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  896. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  897. package/lib/esm-es5/duet-callout.entry.js +1 -1
  898. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  899. package/lib/esm-es5/duet-card.entry.js +1 -1
  900. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  901. package/lib/esm-es5/duet-checkmark.entry.js +1 -1
  902. package/lib/esm-es5/duet-chip.entry.js +2 -2
  903. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  904. package/lib/esm-es5/duet-collapsible.entry.js +2 -2
  905. package/lib/esm-es5/duet-combobox.entry.js +1 -1
  906. package/lib/esm-es5/duet-contact-card.entry.js +1 -1
  907. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  908. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  909. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  910. package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
  911. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  912. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  913. package/lib/esm-es5/duet-file-chooser.entry.js +1 -1
  914. package/lib/esm-es5/duet-footer.entry.js +1 -1
  915. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  916. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  917. package/lib/esm-es5/duet-hero.entry.js +1 -1
  918. package/lib/esm-es5/duet-icon.entry.js +1 -1
  919. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  920. package/lib/esm-es5/duet-layout.entry.js +1 -1
  921. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  922. package/lib/esm-es5/duet-menu-bar-button.entry.js +1 -1
  923. package/lib/esm-es5/duet-menu-bar-dropdown-link.entry.js +1 -1
  924. package/lib/esm-es5/duet-menu-bar-dropdown.entry.js +1 -1
  925. package/lib/esm-es5/duet-menu-bar-link.entry.js +1 -1
  926. package/lib/esm-es5/duet-menu-bar.entry.js +1 -1
  927. package/lib/esm-es5/duet-modal.entry.js +1 -1
  928. package/lib/esm-es5/duet-multiselect.entry.js +1 -1
  929. package/lib/esm-es5/duet-nav.entry.js +1 -1
  930. package/lib/esm-es5/duet-notification_2.entry.js +2 -2
  931. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  932. package/lib/esm-es5/duet-page-heading.entry.js +1 -1
  933. package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
  934. package/lib/esm-es5/duet-popup-menu-item.entry.js +1 -1
  935. package/lib/esm-es5/duet-popup-menu.entry.js +1 -1
  936. package/lib/esm-es5/duet-progress.entry.js +1 -1
  937. package/lib/esm-es5/duet-promo-card.entry.js +1 -1
  938. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  939. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  940. package/lib/esm-es5/duet-scrollable_3.entry.js +2 -2
  941. package/lib/esm-es5/duet-section-layout.entry.js +1 -1
  942. package/lib/esm-es5/duet-select.entry.js +1 -1
  943. package/lib/esm-es5/duet-shaped-image.entry.js +1 -1
  944. package/lib/esm-es5/duet-show-more.entry.js +1 -1
  945. package/lib/esm-es5/duet-slideout-lang.entry.js +1 -1
  946. package/lib/esm-es5/duet-slideout-link.entry.js +1 -1
  947. package/lib/esm-es5/duet-slideout-panel-dropdown.entry.js +1 -1
  948. package/lib/esm-es5/duet-slideout-panel.entry.js +1 -1
  949. package/lib/esm-es5/duet-slideout.entry.js +2 -2
  950. package/lib/esm-es5/duet-step_2.entry.js +2 -2
  951. package/lib/esm-es5/duet-submenu-bar-dropdown-link.entry.js +1 -1
  952. package/lib/esm-es5/duet-submenu-bar-dropdown.entry.js +1 -1
  953. package/lib/esm-es5/duet-submenu-bar-link.entry.js +1 -1
  954. package/lib/esm-es5/duet-submenu-bar.entry.js +1 -1
  955. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  956. package/lib/esm-es5/duet-toggle.entry.js +2 -2
  957. package/lib/esm-es5/duet-toolbar-dropdown-link.entry.js +1 -1
  958. package/lib/esm-es5/duet-toolbar-dropdown.entry.js +1 -1
  959. package/lib/esm-es5/duet-toolbar-link.entry.js +1 -1
  960. package/lib/esm-es5/duet-toolbar.entry.js +1 -1
  961. package/lib/esm-es5/duet-tooltip-button_2.entry.js +1 -1
  962. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  963. package/lib/esm-es5/duet-tray.entry.js +1 -1
  964. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  965. package/lib/esm-es5/duet-upload-item.entry.js +1 -1
  966. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  967. package/lib/esm-es5/duet.js +1 -1
  968. package/lib/esm-es5/{errorcodes.utils-424b1197.js → errorcodes.utils-e681347c.js} +1 -1
  969. package/lib/esm-es5/focus-utils-23aad0c9.js +4 -0
  970. package/lib/esm-es5/index-02e78bbf.js +5 -0
  971. package/lib/esm-es5/keyboard-utils-eba88365.js +4 -0
  972. package/lib/esm-es5/{language-utils-9ff76444.js → language-utils-00ca4c55.js} +1 -1
  973. package/lib/esm-es5/loader.js +1 -1
  974. package/lib/types/common/a11y-component.d.ts +7 -7
  975. package/lib/types/common/form-components.d.ts +15 -15
  976. package/lib/types/common/themeable-component.d.ts +4 -4
  977. package/lib/types/common-types.d.ts +11 -0
  978. package/lib/types/components/duet-action-button/duet-action-button.d.ts +126 -126
  979. package/lib/types/components/duet-alert/duet-alert.d.ts +100 -100
  980. package/lib/types/components/duet-badge/duet-badge.d.ts +27 -27
  981. package/lib/types/components/duet-banner/duet-banner.d.ts +58 -58
  982. package/lib/types/components/duet-breadcrumbs/duet-breadcrumb.d.ts +38 -33
  983. package/lib/types/components/duet-breadcrumbs/duet-breadcrumbs.d.ts +23 -23
  984. package/lib/types/components/duet-button/duet-button.d.ts +219 -219
  985. package/lib/types/components/duet-callout/duet-callout.d.ts +19 -19
  986. package/lib/types/components/duet-caption/duet-caption.d.ts +26 -26
  987. package/lib/types/components/duet-card/duet-card.d.ts +121 -119
  988. package/lib/types/components/duet-checkbox/duet-checkbox.d.ts +132 -132
  989. package/lib/types/components/duet-chip/duet-chip.d.ts +111 -109
  990. package/lib/types/components/duet-choice/duet-checkmark.d.ts +27 -27
  991. package/lib/types/components/duet-choice/duet-choice.d.ts +259 -259
  992. package/lib/types/components/duet-choice-group/duet-choice-group.d.ts +103 -103
  993. package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +90 -88
  994. package/lib/types/components/duet-combobox/duet-combobox-select-single.d.ts +3 -3
  995. package/lib/types/components/duet-combobox/duet-combobox-select.d.ts +8 -8
  996. package/lib/types/components/duet-combobox/duet-combobox.d.ts +135 -135
  997. package/lib/types/components/duet-contact-card/duet-contact-card.d.ts +60 -60
  998. package/lib/types/components/duet-cookie-consent/duet-cookie-consent.d.ts +31 -29
  999. package/lib/types/components/duet-date-picker/date-i18n.d.ts +13 -13
  1000. package/lib/types/components/duet-date-picker/date-picker-day.d.ts +9 -9
  1001. package/lib/types/components/duet-date-picker/date-picker-input.d.ts +28 -28
  1002. package/lib/types/components/duet-date-picker/date-picker-month.d.ts +12 -12
  1003. package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +220 -220
  1004. package/lib/types/components/duet-divider/duet-divider.d.ts +26 -26
  1005. package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +3 -3
  1006. package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +133 -133
  1007. package/lib/types/components/duet-empty-state/duet-empty-state.d.ts +22 -22
  1008. package/lib/types/components/duet-fieldset/duet-fieldset.d.ts +60 -60
  1009. package/lib/types/components/duet-file-chooser/duet-file-chooser.d.ts +35 -35
  1010. package/lib/types/components/duet-footer/duet-footer.d.ts +143 -143
  1011. package/lib/types/components/duet-grid/duet-grid.d.ts +73 -73
  1012. package/lib/types/components/duet-grid-item/duet-grid-item.d.ts +49 -49
  1013. package/lib/types/components/duet-header/duet-header-dropdown.d.ts +11 -11
  1014. package/lib/types/components/duet-header/duet-header-icon.d.ts +4 -4
  1015. package/lib/types/components/duet-header/duet-header.d.ts +347 -347
  1016. package/lib/types/components/duet-heading/duet-heading.d.ts +49 -49
  1017. package/lib/types/components/duet-hero/duet-hero.d.ts +198 -198
  1018. package/lib/types/components/duet-icon/duet-icon.d.ts +80 -81
  1019. package/lib/types/components/duet-input/duet-input.d.ts +279 -279
  1020. package/lib/types/components/duet-label/duet-label.d.ts +26 -26
  1021. package/lib/types/components/duet-layout/duet-layout.d.ts +48 -48
  1022. package/lib/types/components/duet-link/duet-link.d.ts +95 -94
  1023. package/lib/types/components/duet-list/duet-list.d.ts +60 -60
  1024. package/lib/types/components/duet-list-item/duet-list-item.d.ts +17 -17
  1025. package/lib/types/components/duet-logo/duet-logo.d.ts +59 -59
  1026. package/lib/types/components/duet-menu-bar/duet-menu-bar.d.ts +68 -68
  1027. package/lib/types/components/duet-menu-bar-button/duet-menu-bar-button.d.ts +85 -86
  1028. package/lib/types/components/duet-menu-bar-dropdown/duet-menu-bar-dropdown.d.ts +50 -51
  1029. package/lib/types/components/duet-menu-bar-dropdown-link/duet-menu-bar-dropdown-link.d.ts +36 -36
  1030. package/lib/types/components/duet-menu-bar-link/duet-menu-bar-link.d.ts +45 -46
  1031. package/lib/types/components/duet-modal/duet-modal.d.ts +155 -155
  1032. package/lib/types/components/duet-multiselect/duet-multiselect.d.ts +153 -153
  1033. package/lib/types/components/duet-nav/duet-nav.d.ts +20 -20
  1034. package/lib/types/components/duet-notification/duet-notification.d.ts +55 -55
  1035. package/lib/types/components/duet-notification-drawer/duet-notification-drawer.d.ts +83 -83
  1036. package/lib/types/components/duet-number-input/duet-number-input.d.ts +230 -230
  1037. package/lib/types/components/duet-page-heading/duet-page-heading.d.ts +25 -25
  1038. package/lib/types/components/duet-pagination/duet-pagination.d.ts +129 -129
  1039. package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +38 -38
  1040. package/lib/types/components/duet-popup-menu/duet-popup-menu.d.ts +80 -80
  1041. package/lib/types/components/duet-popup-menu-item/duet-popup-menu-item.d.ts +73 -73
  1042. package/lib/types/components/duet-progress/duet-progress.d.ts +71 -71
  1043. package/lib/types/components/duet-promo-card/duet-promo-card.d.ts +42 -42
  1044. package/lib/types/components/duet-radio/duet-radio.d.ts +145 -145
  1045. package/lib/types/components/duet-radio-group/duet-radio-group.d.ts +93 -93
  1046. package/lib/types/components/duet-range-slider/duet-range-slider.d.ts +132 -130
  1047. package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +68 -68
  1048. package/lib/types/components/duet-scrollable/duet-scrollable.d.ts +61 -61
  1049. package/lib/types/components/duet-section-layout/duet-section-layout.d.ts +17 -17
  1050. package/lib/types/components/duet-select/duet-select.d.ts +179 -179
  1051. package/lib/types/components/duet-shaped-image/duet-shaped-image.d.ts +30 -30
  1052. package/lib/types/components/duet-show-more/duet-show-more.d.ts +83 -83
  1053. package/lib/types/components/duet-slideout/duet-slideout.d.ts +86 -86
  1054. package/lib/types/components/duet-slideout-lang/duet-slideout-lang.d.ts +24 -24
  1055. package/lib/types/components/duet-slideout-link/duet-slideout-link.d.ts +55 -55
  1056. package/lib/types/components/duet-slideout-panel/duet-slideout-panel.d.ts +55 -55
  1057. package/lib/types/components/duet-slideout-panel-dropdown/duet-slideout-panel-dropdown.d.ts +39 -39
  1058. package/lib/types/components/duet-spacer/duet-spacer.d.ts +18 -18
  1059. package/lib/types/components/duet-spinner/duet-spinner.d.ts +30 -30
  1060. package/lib/types/components/duet-step/duet-step.d.ts +68 -66
  1061. package/lib/types/components/duet-stepper/duet-stepper.d.ts +47 -47
  1062. package/lib/types/components/duet-submenu-bar/duet-submenu-bar.d.ts +50 -50
  1063. package/lib/types/components/duet-submenu-bar-dropdown/duet-submenu-bar-dropdown.d.ts +48 -49
  1064. package/lib/types/components/duet-submenu-bar-dropdown-link/duet-submenu-bar-dropdown-link.d.ts +43 -43
  1065. package/lib/types/components/duet-submenu-bar-link/duet-submenu-bar-link.d.ts +40 -41
  1066. package/lib/types/components/duet-tab/duet-tab.d.ts +37 -37
  1067. package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +132 -132
  1068. package/lib/types/components/duet-table/duet-table.d.ts +66 -66
  1069. package/lib/types/components/duet-textarea/duet-textarea.d.ts +200 -200
  1070. package/lib/types/components/duet-toggle/duet-toggle.d.ts +115 -113
  1071. package/lib/types/components/duet-toolbar/duet-toolbar.d.ts +30 -30
  1072. package/lib/types/components/duet-toolbar-dropdown/duet-toolbar-dropdown.d.ts +50 -50
  1073. package/lib/types/components/duet-toolbar-dropdown-link/duet-toolbar-dropdown-link.d.ts +43 -43
  1074. package/lib/types/components/duet-toolbar-link/duet-toolbar-link.d.ts +42 -42
  1075. package/lib/types/components/duet-tooltip/duet-tooltip-button.d.ts +21 -19
  1076. package/lib/types/components/duet-tooltip/duet-tooltip-popup.d.ts +33 -31
  1077. package/lib/types/components/duet-tooltip/duet-tooltip.d.ts +122 -122
  1078. package/lib/types/components/duet-tray/duet-tray.d.ts +84 -84
  1079. package/lib/types/components/duet-upload/duet-upload.d.ts +484 -484
  1080. package/lib/types/components/duet-upload/errorcodes.utils.d.ts +3 -3
  1081. package/lib/types/components/duet-upload/upload-editable-item-error.d.ts +2 -2
  1082. package/lib/types/components/duet-upload/upload-editable-item-inprogres.d.ts +2 -2
  1083. package/lib/types/components/duet-upload/upload-editable-item-pending.d.ts +1 -1
  1084. package/lib/types/components/duet-upload/upload-editable-item-success.d.ts +2 -2
  1085. package/lib/types/components/duet-upload/upload-item-header.d.ts +2 -2
  1086. package/lib/types/components/duet-upload/upload-validators.d.ts +4 -4
  1087. package/lib/types/components/duet-upload/xhr.helpers.d.ts +10 -10
  1088. package/lib/types/components/duet-upload-aria-status/duet-upload-aria-status.d.ts +40 -40
  1089. package/lib/types/components/duet-upload-item/duet-upload-item.d.ts +54 -54
  1090. package/lib/types/components/duet-visually-hidden/duet-visually-hidden.d.ts +6 -6
  1091. package/lib/types/components.d.ts +10 -4
  1092. package/lib/types/stencil-public-runtime.d.ts +8 -0
  1093. package/lib/types/utils/axe-core-utils.d.ts +3 -3
  1094. package/lib/types/utils/fixture-utils.d.ts +2 -2
  1095. package/lib/types/utils/focus-utils.d.ts +2 -2
  1096. package/lib/types/utils/keyboard-utils.d.ts +2 -0
  1097. package/lib/types/utils/language-utils.d.ts +10 -10
  1098. package/lib/types/utils/picture-utils.d.ts +10 -10
  1099. package/lib/types/utils/teleport.d.ts +20 -20
  1100. package/lib/types/utils/template-utils.d.ts +1 -1
  1101. package/lib/types/utils/test-utils.d.ts +2 -2
  1102. package/lib/types/utils/token-utils.d.ts +9 -9
  1103. package/package.json +6 -6
  1104. package/lib/cjs/app-globals-4ab83f59.js +0 -54
  1105. package/lib/cjs/create-id-167cd350.js +0 -13
  1106. package/lib/cjs/errorcodes.utils-8e928de5.js +0 -39
  1107. package/lib/cjs/focus-utils-aea9f4e1.js +0 -21
  1108. package/lib/cjs/input-utils-b4615782.js +0 -56
  1109. package/lib/cjs/keyboard-utils-02441bc5.js +0 -36
  1110. package/lib/cjs/string-utils-51a2f59f.js +0 -59
  1111. package/lib/cjs/teleport-af825e04.js +0 -99
  1112. package/lib/cjs/themeable-component-0be6d1f4.js +0 -15
  1113. package/lib/cjs/token-utils-dbfeff2e.js +0 -124
  1114. package/lib/cjs/watch-options-1773d69f.js +0 -61
  1115. package/lib/dist-custom-elements/p-03ac3eb3.js +0 -137
  1116. package/lib/dist-custom-elements/p-1a395a8d.js +0 -55
  1117. package/lib/dist-custom-elements/p-1ce55654.js +0 -265
  1118. package/lib/dist-custom-elements/p-1f56e02f.js +0 -174
  1119. package/lib/dist-custom-elements/p-24853ebf.js +0 -97
  1120. package/lib/dist-custom-elements/p-268171f7.js +0 -9
  1121. package/lib/dist-custom-elements/p-3049dfd5.js +0 -147
  1122. package/lib/dist-custom-elements/p-45f71a69.js +0 -11
  1123. package/lib/dist-custom-elements/p-4687ca41.js +0 -465
  1124. package/lib/dist-custom-elements/p-56ac3289.js +0 -20
  1125. package/lib/dist-custom-elements/p-5d8d9a52.js +0 -98
  1126. package/lib/dist-custom-elements/p-62e68de8.js +0 -38
  1127. package/lib/dist-custom-elements/p-64cd1abb.js +0 -93
  1128. package/lib/dist-custom-elements/p-665418f0.js +0 -205
  1129. package/lib/dist-custom-elements/p-759c725f.js +0 -226
  1130. package/lib/dist-custom-elements/p-77f2dbee.js +0 -53
  1131. package/lib/dist-custom-elements/p-80ec4336.js +0 -123
  1132. package/lib/dist-custom-elements/p-8be301dd.js +0 -62
  1133. package/lib/dist-custom-elements/p-9541f0b6.js +0 -59
  1134. package/lib/dist-custom-elements/p-a1371eee.js +0 -57
  1135. package/lib/dist-custom-elements/p-a3923b18.js +0 -126
  1136. package/lib/dist-custom-elements/p-c5032d3a.js +0 -18
  1137. package/lib/dist-custom-elements/p-d48735b6.js +0 -13
  1138. package/lib/dist-custom-elements/p-e19d1e27.js +0 -117
  1139. package/lib/dist-custom-elements/p-e6b07569.js +0 -271
  1140. package/lib/dist-custom-elements/p-e77f7fff.js +0 -60
  1141. package/lib/dist-custom-elements/p-f27e355b.js +0 -76
  1142. package/lib/dist-custom-elements/p-f46be918.js +0 -110
  1143. package/lib/dist-custom-elements/p-fd4877d1.js +0 -72
  1144. package/lib/dist-custom-elements/p-fe8a2205.js +0 -206
  1145. package/lib/duet/p-038ac494.system.entry.js +0 -4
  1146. package/lib/duet/p-08764d71.entry.js +0 -4
  1147. package/lib/duet/p-08f2114a.entry.js +0 -4
  1148. package/lib/duet/p-0a664ebb.entry.js +0 -4
  1149. package/lib/duet/p-0e89cbae.system.entry.js +0 -4
  1150. package/lib/duet/p-0fd024c9.system.js +0 -4
  1151. package/lib/duet/p-11571ab9.entry.js +0 -4
  1152. package/lib/duet/p-177c55aa.entry.js +0 -4
  1153. package/lib/duet/p-18e2e6c8.system.entry.js +0 -4
  1154. package/lib/duet/p-21f3a17a.system.js +0 -4
  1155. package/lib/duet/p-2c78c637.system.entry.js +0 -4
  1156. package/lib/duet/p-34b5285b.system.entry.js +0 -4
  1157. package/lib/duet/p-3b147393.entry.js +0 -4
  1158. package/lib/duet/p-463ddc2c.system.entry.js +0 -4
  1159. package/lib/duet/p-4669b0af.js +0 -4
  1160. package/lib/duet/p-486eec2d.entry.js +0 -4
  1161. package/lib/duet/p-4dc0fff9.entry.js +0 -4
  1162. package/lib/duet/p-50ec2074.entry.js +0 -4
  1163. package/lib/duet/p-52806dad.system.entry.js +0 -4
  1164. package/lib/duet/p-5311f96e.system.entry.js +0 -4
  1165. package/lib/duet/p-5ae9b74f.entry.js +0 -4
  1166. package/lib/duet/p-5c5012f6.system.entry.js +0 -4
  1167. package/lib/duet/p-5eb2a31f.system.entry.js +0 -4
  1168. package/lib/duet/p-61d39730.entry.js +0 -4
  1169. package/lib/duet/p-6c4c0279.js +0 -5
  1170. package/lib/duet/p-76b68b44.entry.js +0 -4
  1171. package/lib/duet/p-789365cb.system.entry.js +0 -4
  1172. package/lib/duet/p-7bca584a.entry.js +0 -4
  1173. package/lib/duet/p-7c36b779.entry.js +0 -4
  1174. package/lib/duet/p-7de467b8.entry.js +0 -4
  1175. package/lib/duet/p-7e1f37e2.entry.js +0 -4
  1176. package/lib/duet/p-821c350f.system.entry.js +0 -4
  1177. package/lib/duet/p-8d0d6e06.system.js +0 -4
  1178. package/lib/duet/p-995e1b11.system.entry.js +0 -4
  1179. package/lib/duet/p-9a613a25.system.entry.js +0 -4
  1180. package/lib/duet/p-9f835123.system.entry.js +0 -4
  1181. package/lib/duet/p-a0660ffa.system.js +0 -5
  1182. package/lib/duet/p-aa6d7d97.entry.js +0 -4
  1183. package/lib/duet/p-ac9f6601.entry.js +0 -4
  1184. package/lib/duet/p-b1db3006.js +0 -4
  1185. package/lib/duet/p-b3ae5641.system.entry.js +0 -4
  1186. package/lib/duet/p-c1bc9249.entry.js +0 -4
  1187. package/lib/duet/p-c36a1bb7.entry.js +0 -4
  1188. package/lib/duet/p-cc1909de.js +0 -4
  1189. package/lib/duet/p-d098d59c.system.entry.js +0 -4
  1190. package/lib/duet/p-d9353709.entry.js +0 -4
  1191. package/lib/duet/p-e1e89fd5.entry.js +0 -4
  1192. package/lib/duet/p-e491c098.system.entry.js +0 -4
  1193. package/lib/duet/p-e95d09bb.system.entry.js +0 -4
  1194. package/lib/duet/p-efa6152d.entry.js +0 -4
  1195. package/lib/duet/p-f58eb425.js +0 -4
  1196. package/lib/duet/p-fab6160a.entry.js +0 -4
  1197. package/lib/duet/p-fcbb30e1.entry.js +0 -4
  1198. package/lib/duet/p-ff09528c.system.entry.js +0 -4
  1199. package/lib/esm/app-globals-de2a5510.js +0 -52
  1200. package/lib/esm/create-id-2b0cd46d.js +0 -11
  1201. package/lib/esm/errorcodes.utils-424b1197.js +0 -36
  1202. package/lib/esm/focus-utils-74961919.js +0 -18
  1203. package/lib/esm/input-utils-a0225b92.js +0 -53
  1204. package/lib/esm/is-internet-explorer-032d4dae.js +0 -9
  1205. package/lib/esm/keyboard-utils-5746e126.js +0 -20
  1206. package/lib/esm/string-utils-59ad4cb2.js +0 -55
  1207. package/lib/esm/teleport-15747328.js +0 -97
  1208. package/lib/esm/themeable-component-fdce4fd7.js +0 -13
  1209. package/lib/esm/token-utils-46c8fe31.js +0 -117
  1210. package/lib/esm/watch-options-f189118b.js +0 -57
  1211. package/lib/esm-es5/app-globals-de2a5510.js +0 -4
  1212. package/lib/esm-es5/focus-utils-74961919.js +0 -4
  1213. package/lib/esm-es5/index-b3bf9761.js +0 -5
  1214. package/lib/esm-es5/keyboard-utils-5746e126.js +0 -4
  1215. /package/lib/duet/{p-1a395a8d.js → p-0e052642.js} +0 -0
  1216. /package/lib/duet/{p-f8c76b25.js → p-11230037.js} +0 -0
  1217. /package/lib/duet/{p-0b31864f.js → p-38320af8.js} +0 -0
  1218. /package/lib/duet/{p-c30a5f7c.system.js → p-41982d26.system.js} +0 -0
  1219. /package/lib/duet/{p-268171f7.js → p-43b89e38.js} +0 -0
  1220. /package/lib/duet/{p-274d11e3.js → p-4ab776f4.js} +0 -0
  1221. /package/lib/duet/{p-77b6e4ba.system.js → p-50f4bca2.system.js} +0 -0
  1222. /package/lib/duet/{p-45f71a69.js → p-5e59e970.js} +0 -0
  1223. /package/lib/duet/{p-75daef16.system.js → p-634e8787.system.js} +0 -0
  1224. /package/lib/duet/{p-719b38fe.system.js → p-67c653f9.system.js} +0 -0
  1225. /package/lib/duet/{p-b99c00fa.system.js → p-6ef75455.system.js} +0 -0
  1226. /package/lib/duet/{p-a1371eee.js → p-7d8a2628.js} +0 -0
  1227. /package/lib/duet/{p-ecf1f6cd.system.js → p-9e36548d.system.js} +0 -0
  1228. /package/lib/duet/{p-3d8d557b.js → p-9e371678.js} +0 -0
  1229. /package/lib/duet/{p-d48735b6.js → p-a58bd561.js} +0 -0
  1230. /package/lib/duet/{p-8e1da663.system.js → p-afad5fd3.system.js} +0 -0
  1231. /package/lib/duet/{p-24853ebf.js → p-b2e550a3.js} +0 -0
  1232. /package/lib/duet/{p-7c29d36a.system.js → p-b864159a.system.js} +0 -0
  1233. /package/lib/duet/{p-88a50491.system.js → p-d1cedaa1.system.js} +0 -0
  1234. /package/lib/duet/{p-77f2dbee.js → p-df7874f9.js} +0 -0
  1235. /package/lib/duet/{p-87dd7bf3.system.js → p-e12066c8.system.js} +0 -0
  1236. /package/lib/duet/{p-1a91e22a.system.js → p-e6b5a1c7.system.js} +0 -0
  1237. /package/lib/esm-es5/{common-strings-c0ac5a0b.js → common-strings-59db6973.js} +0 -0
  1238. /package/lib/esm-es5/{create-id-2b0cd46d.js → create-id-149a1b6d.js} +0 -0
  1239. /package/lib/esm-es5/{input-utils-a0225b92.js → input-utils-85681162.js} +0 -0
  1240. /package/lib/esm-es5/{is-internet-explorer-032d4dae.js → is-internet-explorer-2c48f686.js} +0 -0
  1241. /package/lib/esm-es5/{js-utils-a35dcc8c.js → js-utils-9b9e0039.js} +0 -0
  1242. /package/lib/esm-es5/{slot-query-7877f18f.js → slot-query-022710bb.js} +0 -0
  1243. /package/lib/esm-es5/{string-utils-59ad4cb2.js → string-utils-ca039233.js} +0 -0
  1244. /package/lib/esm-es5/{teleport-15747328.js → teleport-4462e8c1.js} +0 -0
  1245. /package/lib/esm-es5/{themeable-component-fdce4fd7.js → themeable-component-724c0f7e.js} +0 -0
  1246. /package/lib/esm-es5/{token-utils-46c8fe31.js → token-utils-b4bd3ec7.js} +0 -0
  1247. /package/lib/esm-es5/{watch-options-f189118b.js → watch-options-e96ecd92.js} +0 -0
@@ -22,2317 +22,2323 @@ import { makeXhrRequest, } from "./xhr.helpers";
22
22
  * @part ${this.identifier}-error-notification : duet-upload-error-notification - named part - can be used to style any error notifications occurring internally
23
23
  */
24
24
  export class DuetUpload {
25
- constructor() {
26
- /**
27
- * Own Properties
28
- */
29
- this.buttonId = createID("DuetButton");
30
- this.labelId = createID("DuetLabel");
31
- this.uploadId = createID("DuetUpload");
32
- this.filesInProgress = new Map();
33
- this.fileMaxReached = false;
34
- this.bytesMaxReached = false;
35
- this.filesToUploadExceedsLimit = false;
36
- this.filesToUploadTotalSizeIsAboveMax = false;
37
- this.internalStatusMessageLabel = undefined;
38
- this.itemRefs = new Map();
39
- /**
40
- * Properties
41
- */
42
- this.DefaultGroups = {
43
- inprogress: "inprogress",
44
- success: "success",
45
- pending: "pending",
46
- failure: "failure",
47
- };
48
- this.kick = debounce(() => {
49
- this.tick = Date.now();
50
- }, 30); // will trigger re-render
51
- this.categoryLabel = {
52
- en: "Category",
53
- sv: "Filtyp",
54
- fi: "Tiedostotyyppi",
55
- };
56
- /**
57
- * Private functions
58
- */
59
- this.listenForActionEvents = () => {
60
- this.element.addEventListener("duetActionEvent", (e) => {
61
- const detail = e.detail;
62
- const { action, id, originalEvent } = detail;
63
- switch (action) {
64
- case "delete":
65
- this.onDelete(id, originalEvent);
66
- break;
67
- case "cancel":
68
- this.onCancel(id, originalEvent);
69
- break;
70
- default:
71
- // code block
72
- }
73
- });
74
- };
75
- this.verifyValidity = () => {
76
- const { invalid, valid } = this.getFilesAsArray();
77
- const oldValid = this.valid;
78
- this.valid = invalid.length === 0 && valid.length !== 0;
79
- if (this.valid !== oldValid) {
80
- this.duetState.emit({
81
- originalEvent: undefined,
82
- data: { valid: this.valid, from: "componentWillRender" },
83
- component: "duet-upload",
84
- });
85
- }
86
- };
87
- this.getGroupFromItemData = (item) => {
88
- if (item.valid && item.progress === 100) {
89
- // if the item has a group, move the file to that group instead
90
- // of into the standard success group
91
- return this.DefaultGroups.success;
92
- }
93
- else if (item.progress > 0 && item.progress !== 100) {
94
- return this.DefaultGroups.inprogress;
95
- }
96
- else if (!item.valid) {
97
- return this.DefaultGroups.failure;
98
- }
99
- else if (item.pending) {
100
- return this.DefaultGroups.pending;
101
- }
102
- else if (item.group) {
103
- return item.group;
104
- }
105
- else {
106
- return "none";
107
- }
108
- };
109
- this.mapFilesToUploadItems = (data, group, showCategory, filteredActions) => {
110
- if (group === this.DefaultGroups.success) {
111
- return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "success", data: data, showLinks: this.showLinks, linkClickEvent: this.emitEvent ? this.linkClick : undefined, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
112
- this.itemRefs.set(data.uid, item);
113
- } }));
114
- }
115
- else if (group === this.DefaultGroups.inprogress) {
116
- return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "inprogress", data: data, showLinks: this.showLinks, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
117
- this.itemRefs.set(data.uid, item);
118
- } }));
119
- }
120
- else if (group === this.DefaultGroups.pending) {
121
- return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "pending", data: data, showLinks: this.showLinks, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
122
- this.itemRefs.set(data.uid, item);
123
- } }));
124
- }
125
- else if (group === this.DefaultGroups.failure) {
126
- return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "failure", data: data, showLinks: this.showLinks, errorCodes: this.errorCodes, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
127
- this.itemRefs.set(data.uid, item);
128
- } }));
129
- }
130
- else if (data.group) {
131
- return data.html;
132
- }
133
- else {
134
- return "none";
135
- }
136
- };
137
- this.genHashName = () => Date.now().toString(36) + Math.random();
138
- this.updateValueInMap = (item, key, value, kick = true) => {
139
- try {
140
- const fileItem = this.files.get(item);
141
- fileItem[key] = value;
142
- this.files.set(item, fileItem);
143
- if (this.external && key !== "url") {
144
- this.trackProgress(item, key === "uploaded");
145
- }
146
- }
147
- catch (e) {
148
- // if a users tries to update entries on a file that doesn't exist,
149
- // this will blow up - so we're swallowing the errors here on purpose
150
- // console.warn("operation on missing items")
151
- }
152
- if (kick) {
153
- this.kick();
154
- }
155
- };
156
- this.updateProgress = (ev, name) => {
157
- const updateProgressHelper = percentComplete => {
158
- this.updateValueInMap(name, "progress", percentComplete);
159
- this.onProgress(name, percentComplete, ev);
160
- };
161
- if (ev.lengthComputable) {
162
- const percentComplete = (ev.loaded / ev.total) * 100;
163
- updateProgressHelper(percentComplete);
164
- }
165
- else {
166
- console.log("cant read progress");
167
- }
168
- };
169
- this.trackProgress = (name, remove = false) => {
170
- if (remove) {
171
- this.filesInProgress.delete(name);
172
- }
173
- else {
174
- this.filesInProgress.set(name, "inprogress");
175
- }
176
- if (this.filesInProgress.size === 0) {
177
- this.onDone();
178
- }
179
- };
180
- this.getFilesAsArray = () => {
181
- const filesInQueue = [];
182
- const filesInError = [];
183
- this.files.forEach(value => {
184
- if (value.valid && !value.deleted) {
185
- filesInQueue.push(value);
186
- }
187
- else if (!value.valid && !value.deleted) {
188
- filesInError.push(value);
189
- }
190
- });
191
- return { valid: filesInQueue, invalid: filesInError };
192
- };
193
- this.resetFormFields = () => {
194
- /**
195
- * You cannot modify a FileList, nor remove single items from it
196
- * This completely removes all items in the FileList
197
- * We reset the form fields to always be able to re-upload files
198
- * and because we handle all uploads and states internally in the component (not relying on native form elements)
199
- */
200
- /* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
201
- * TODO: this would remove the capability of Re-uploading, unless we can catch and remove the user file from the form filelist before the upload is canceled by the browser
202
- * TODO: but for now we'll just reset the form fields
203
- */
204
- this.nativeInput.value = "";
205
- };
206
- this.startUpload = async (ev, metaData = undefined) => {
207
- // validate that we haven't hit any maxfiles or maxbytes limits before we upload
208
- const { bytesMaxReached, fileMaxReached } = this.validateTotals();
209
- if (bytesMaxReached || fileMaxReached) {
210
- this.kick();
211
- return;
212
- }
213
- this.metaData = metaData;
214
- this.nativeInput.click();
215
- this.onUpload(ev, metaData);
216
- ev.stopPropagation();
217
- ev.preventDefault();
218
- return;
219
- };
220
- /**
221
- * Eventlisteners for the XHR requests
222
- */
223
- this.transferComplete = name => {
224
- this.updateValueInMap(name, "progress", 100, false);
225
- this.trackProgress(name, true);
226
- };
227
- this.transferDone = (xhr, name, status) => {
228
- this.updateValueInMap(name, "status", status, false);
229
- this.updateValueInMap(name, "uploaded", true, false);
230
- try {
231
- const response = JSON.parse(xhr.response);
232
- this.updateValueInMap(name, "url", response.url);
233
- }
234
- catch (e) {
235
- this.updateValueInMap(name, "url", null);
236
- console.error("Server did not respond with expected response {url: string}");
237
- }
238
- return;
239
- };
240
- this.transferDoneWithFailure = (xhr, name, status) => {
241
- try {
242
- const { error } = JSON.parse(xhr.response);
243
- this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
244
- }
245
- catch (e) {
246
- console.error("Server did not respond with expected response error:{message: string, type: int}");
247
- this.updateValueInMap(name, "error", { type: status }, false);
248
- }
249
- this.updateValueInMap(name, "valid", false, true);
250
- };
251
- this.transferFailed = name => {
252
- this.updateValueInMap(name, "error", getI18nError("duet-upload-001", this.errorCodes));
253
- };
254
- this.transferCanceled = name => {
255
- this.files.delete(name);
256
- this.validateTotals(name);
257
- this.kick();
258
- };
259
- this.validateTotals = (name) => {
260
- const isTotalSizeOverMaxSize = validateTotalSizeIsAboveMax(this.files, this.maxBytesTotal);
261
- const isTotalFileAmountAboveMax = validateTotalAmountIsAboveMax(this.files, this.maxFiles);
262
- if (isTotalSizeOverMaxSize && name) {
263
- this.updateValueInMap(name, "error", getI18nError("duet-upload-202", this.errorCodes), false);
264
- }
265
- if (isTotalFileAmountAboveMax && name) {
266
- this.updateValueInMap(name, "error", getI18nError("duet-upload-301", this.errorCodes), false);
267
- }
268
- this.bytesMaxReached = isTotalSizeOverMaxSize;
269
- this.fileMaxReached = isTotalFileAmountAboveMax;
270
- return {
271
- bytesMaxReached: isTotalSizeOverMaxSize,
272
- fileMaxReached: isTotalFileAmountAboveMax,
273
- };
274
- };
275
- this.uploadFile = async (fileListItem, force = false, key) => {
276
- if (!force && this.deferUpload) {
277
- this.updateValueInMap(fileListItem.item.name, "pending", true, false);
278
- this.updateValueInMap(fileListItem.item.name, "group", "pending", true);
279
- }
280
- else if (force) {
281
- this.updateValueInMap(fileListItem.item.name, "pending", false, false);
282
- this.updateValueInMap(fileListItem.item.name, "group", undefined, true);
283
- }
284
- try {
285
- if (!this.deferUpload || force) {
286
- // if all is well AND external file upload handling has not been set, start upload
287
- const data = new FormData();
288
- data.append("file", fileListItem.item);
289
- if (key) {
290
- data.append("key", key);
291
- }
292
- data.append("uid", fileListItem.uid);
293
- data.append("name", fileListItem.item.name);
294
- data.append("metadata", JSON.stringify({
295
- uid: fileListItem.uid,
296
- url: this.uri,
297
- size: fileListItem.item.size,
298
- meta: fileListItem.meta,
299
- }));
300
- fileListItem.xhr = await this.makeXHRPostRequest(data);
301
- }
302
- }
303
- catch (e) {
304
- // in case one of the global maxes have been reached, invalidate the file
305
- this.updateValueInMap(fileListItem.item.name, "valid", false, false);
306
- }
307
- };
308
- this.uploadPendingFiles = () => {
309
- for (const [key, value] of Array.from(this.files.entries())) {
310
- if (value.group === "pending" && value.pending === true) {
311
- this.uploadFile(value, true, key);
312
- }
313
- }
314
- };
315
- this.getItemFromUID = (uid) => {
316
- for (const [key, value] of Array.from(this.files.entries())) {
317
- if (value.uid === uid) {
318
- return { value, key };
319
- }
320
- }
321
- return null;
322
- };
323
- this.handleExternalUploadButton = (bytesMaxReached, fileMaxReached) => {
324
- if (this.externalUploadButton) {
325
- if (bytesMaxReached || fileMaxReached) {
326
- this.externalUploadButton.disabled = true;
327
- }
328
- else {
329
- this.externalUploadButton.disabled = false;
330
- }
331
- }
332
- };
333
- this.onDelete = (key, ev) => {
334
- const item = this.getItemFromUID(key);
335
- const retrievedKey = item.key;
336
- const deletedItem = this.files.get(retrievedKey);
337
- this.files.delete(retrievedKey);
338
- const { bytesMaxReached, fileMaxReached } = this.validateTotals();
339
- this.handleExternalUploadButton(bytesMaxReached, fileMaxReached);
340
- this.kick();
341
- this.duetDelete.emit({
342
- originalEvent: ev,
343
- data: { deletion: deletedItem },
344
- component: "duet-upload",
345
- });
346
- // don't send a xhr request if the item was pending, just remove it from the list
347
- if (!this.external && !deletedItem.pending) {
348
- this.makeXHRDeleteRequest(deletedItem);
349
- }
350
- this.resetFormFields();
351
- };
352
- this.onCancel = (key, ev) => {
353
- const retrievedKey = this.getItemFromUID(key).key;
354
- const cancelledItem = this.files.get(retrievedKey);
355
- this.files.delete(retrievedKey);
356
- const { bytesMaxReached, fileMaxReached } = this.validateTotals();
357
- this.handleExternalUploadButton(bytesMaxReached, fileMaxReached);
358
- if (!this.external) {
359
- const { xhr } = cancelledItem;
360
- if (xhr) {
361
- xhr.abort();
362
- }
363
- }
364
- this.kick();
365
- this.resetFormFields();
366
- this.duetCancel.emit({
367
- originalEvent: ev,
368
- data: { cancelled: cancelledItem },
369
- component: "duet-upload",
370
- });
371
- };
372
- this.onUpload = (ev, metaData) => {
373
- this.duetUpload.emit({
374
- originalEvent: ev,
375
- metaData,
376
- component: "duet-upload",
377
- });
378
- };
379
- this.onBlur = (ev) => {
380
- this.duetBlur.emit({
381
- originalEvent: ev,
382
- component: "duet-upload",
383
- });
384
- };
385
- this.onProgress = (key, percentComplete, ev) => {
386
- this.duetChange.emit({
387
- originalEvent: ev,
388
- data: {
389
- key,
390
- percentComplete,
391
- },
392
- component: "duet-upload",
393
- });
394
- };
395
- this.onFocus = (ev) => {
396
- this.duetFocus.emit({
397
- originalEvent: ev,
398
- component: "duet-upload",
399
- });
400
- };
401
- this.onReady = () => {
402
- this.duetReady.emit({
403
- component: "duet-upload",
404
- });
405
- };
406
- this.onDone = () => {
407
- this.duetDone.emit({
408
- component: "duet-upload",
409
- data: { files: this.files },
410
- });
411
- };
412
- /**
413
- * @description This functions return sorted map items byg condition which are:
414
- */
415
- this.filterMap = () => {
416
- const all = Array.from(this.files.values());
417
- const inprogress = [];
418
- const failure = [];
419
- const pending = [];
420
- const success = [];
421
- let hasCategory = false;
422
- all.forEach(data => {
423
- const group = this.getGroupFromItemData(data);
424
- // const item = mapFn(data, group)
425
- // const category = <UploadCategory meta={data.meta} />
426
- // const categories = data.meta?.badges?.join(",")
427
- if (data.meta && !!data.meta.badges) {
428
- hasCategory = true;
429
- }
430
- if (group === this.DefaultGroups.success) {
431
- success.push({
432
- uid: data.uid,
433
- data,
434
- });
435
- }
436
- else if (group === this.DefaultGroups.inprogress) {
437
- inprogress.push({
438
- uid: data.uid,
439
- data,
440
- });
441
- }
442
- else if (group === this.DefaultGroups.pending) {
443
- pending.push({
444
- uid: data.uid,
445
- data,
446
- });
447
- }
448
- else if (group === this.DefaultGroups.failure) {
449
- failure.push({
450
- uid: data.uid,
451
- data,
452
- });
453
- }
454
- else if (data.group) {
455
- inprogress.push({
456
- uid: data.uid,
457
- data,
458
- });
459
- }
460
- });
461
- return {
462
- pending,
463
- failure,
464
- success,
465
- inprogress,
466
- hasCategory,
467
- };
468
- };
469
- this.getActions = (id, actions) => {
470
- return actions.filter(item => item.map.includes(id));
471
- };
472
- this.renderUploadedItems = () => {
473
- this.itemRefs.clear();
474
- const filteredItems = this.filterMap();
475
- const hasCategory = filteredItems.hasCategory;
476
- const filteredActions = this.hideCancelButton
477
- ? this.actions.filter(action => action.name !== "cancel")
478
- : this.actions;
479
- const ItemRows = this.groups.map(group => {
480
- const currentItems = filteredItems[group.id];
481
- if (!(currentItems === null || currentItems === void 0 ? void 0 : currentItems.length)) {
482
- return;
483
- }
484
- return (h(Fragment, null, !this.hideGroups && (h(UploadItemHeader, { categoryLabel: hasCategory ? this.categoryLabel : undefined, label: group.label })), currentItems.map(item => this.mapFilesToUploadItems(item.data, group.id, hasCategory, filteredActions))));
485
- });
486
- return (h(Fragment, null, this.showUploadedItemsHeader && (h(UploadItemHeader, { categoryLabel: hasCategory ? this.categoryLabel : undefined, label: this.uploadedItemsHeaderLabel })), ItemRows));
487
- };
488
- this.tick = Date.now();
489
- this.accessibleActiveDescendant = undefined;
490
- this.accessibleDescribedBy = undefined;
491
- this.accessibleControls = undefined;
492
- this.accessibleOwns = undefined;
493
- this.external = false;
494
- this.middleware = null;
495
- this.deferUpload = false;
496
- this.hideButton = false;
497
- this.actions = [
498
- {
499
- icon: "action-delete",
500
- color: "color-danger",
501
- size: "x-small",
502
- background: "gray-lightest",
503
- name: "delete",
504
- map: ["success", "failure"],
505
- label: {
506
- fi: "Poista tiedosto",
507
- en: "Delete the file",
508
- sv: "Ta bort filen",
509
- },
510
- },
511
- {
512
- icon: "navigation-close",
513
- color: "primary",
514
- size: "x-small",
515
- background: "gray-lightest",
516
- name: "cancel",
517
- map: ["inprogress", "pending"],
518
- label: {
519
- fi: "Keskeytä lähetys",
520
- en: "Cancel the upload",
521
- sv: "Stop överföringen",
522
- },
523
- },
524
- ];
525
- this.uri = undefined;
526
- this.showLinks = false;
527
- this.caption = undefined;
528
- this.statusLabelDefaults = {
529
- fi: {
530
- inProgress: "Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",
531
- inProgressWithErrors: "Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",
532
- done: "Lähetys valmis, {filesTotal} lisätty onnistuneesti",
533
- doneWithErrors: "Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",
534
- files: "tiedostoa",
535
- file: "tiedosto",
536
- },
537
- sv: {
538
- inProgress: "Laddar upp {filesUploaded} av {filesTotal}",
539
- inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
540
- done: "Uppladdningen slutförd, {filesTotal} har lagts till",
541
- doneWithErrors: "Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
542
- files: "filer",
543
- file: "fil",
544
- },
545
- en: {
546
- inProgress: "Uploading {filesUploaded} of {filesTotal}",
547
- inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
548
- done: "Upload completed, {filesTotal} added successfully",
549
- doneWithErrors: "Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",
550
- files: "files",
551
- file: "file",
552
- },
553
- };
554
- this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
555
- this.buttonLabelDefaults = {
556
- fi: "Lisää liite",
557
- sv: "Lägg till en bilaga",
558
- en: "Add an attachment",
559
- };
560
- this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
561
- this.accessibleButtonLabel = undefined;
562
- this.theme = "";
563
- this.disabled = false;
564
- this.identifier = undefined;
565
- this.margin = "auto";
566
- this.required = false;
567
- this.alignment = "middle";
568
- this.hideGroups = false;
569
- this.files = new Map();
570
- this.valid = !this.required;
571
- this.labelDefaults = {
572
- fi: "Lisää liite",
573
- sv: "Lägg till en bilaga",
574
- en: "Add attachments",
575
- };
576
- this.label = getLocaleString(this.labelDefaults);
577
- this.descriptionDefaults = {
578
- en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",
579
- sv: "Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",
580
- fi: "Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena.",
581
- };
582
- this.description = getLocaleString(this.descriptionDefaults);
583
- this.fileListEmptyDefaults = {
584
- fi: "Ei vielä lisättyjä tiedostoja.",
585
- sv: "Inga filer har lagts till ännu.",
586
- en: "No files added yet.",
587
- };
588
- this.fileListEmpty = getLocaleString(this.fileListEmptyDefaults);
589
- this.error = "";
590
- this.errorCodes = errorCodes;
591
- this.name = undefined;
592
- this.maxBytes = 200000000;
593
- this.maxBytesTotal = undefined;
594
- this.maxFiles = 99;
595
- this.allowedExtensions = "all";
596
- this.allowedMimetypes = "";
597
- this.multiple = true;
598
- this.limitSelection = false;
599
- this.hideCancelButton = false;
600
- this.value = undefined;
601
- this.externalUploadButtonId = undefined;
602
- this.captionOnBottom = false;
603
- this.showUploadedItemsHeader = false;
604
- this.uploadedItemsHeaderLabel = {
605
- fi: "Ladattu tiedosto",
606
- sv: "Lägg till en bilaga",
607
- en: "Uploaded file",
608
- };
609
- this.headerHeadingLevel = "h3";
610
- this.hideHeader = false;
611
- this.emitEvent = false;
612
- this.groups = [
613
- {
614
- id: this.DefaultGroups.success,
615
- label: {
616
- fi: "Valmiit tiedostot",
617
- sv: "Files success",
618
- en: "Files success",
619
- },
620
- },
621
- {
622
- id: this.DefaultGroups.failure,
623
- label: {
624
- fi: "Tiedostot, joissa on virheitä",
625
- sv: "Filer med fel",
626
- en: "Files with errors",
627
- },
628
- },
629
- {
630
- id: this.DefaultGroups.inprogress,
631
- label: {
632
- fi: "Kesken olevat tiedostot",
633
- sv: "Filer inprogress",
634
- en: "Files inprogress",
635
- },
636
- },
637
- {
638
- id: this.DefaultGroups.pending,
639
- label: {
640
- en: "Files to upload",
641
- sv: "Filer att ladda",
642
- fi: "Ladattavat tiedostot",
643
- },
644
- },
645
- ];
646
- }
647
- watchValidHandler(newValue, oldValue) {
648
- if (newValue !== oldValue) {
649
- this.kick();
650
- }
651
- }
652
- /**
653
- * Component lifecycle events.
654
- */
655
- componentWillLoad() {
656
- if (typeof this.statusMessageLabel === "string") {
657
- this.internalStatusMessageLabel = sanitizeString(this.groups);
658
- }
659
- else {
660
- this.internalStatusMessageLabel = this.statusMessageLabel;
661
- }
662
- inheritGlobalTheme(this);
663
- this.listenForActionEvents();
664
- this.onReady();
665
- this.externalUploadButton = document.querySelector(`#${this.externalUploadButtonId}`);
666
- }
667
- componentWillRender() {
668
- // listen to the events from the component
669
- this.verifyValidity();
670
- }
671
- /**
672
- * Sets focus on the specified `duet-input`. Use this method instead of the global
673
- * `input.focus()`.
674
- */
675
- async setFocus(options) {
676
- if (this.nativeInput) {
677
- this.nativeInput.focus(options);
678
- }
679
- return;
680
- }
681
- /**
682
- * Method for invoking the upload sequence
683
- */
684
- async upload(metaData = undefined) {
685
- // validate that we haven't hit any maxfiles or maxbytes limits before we upload
686
- const { bytesMaxReached, fileMaxReached } = this.validateTotals();
687
- if (bytesMaxReached || fileMaxReached) {
688
- this.handleExternalUploadButton(bytesMaxReached, fileMaxReached);
689
- this.kick();
690
- return;
691
- }
692
- this.metaData = metaData;
693
- this.nativeInput.click();
694
- return;
695
- }
696
- /**
697
- * Method for uploading pending files
698
- */
699
- async uploadPending() {
700
- this.uploadPendingFiles();
701
- }
702
- /**
703
- * Method for forcing a render of the upload list, element.files can be changed externally
704
- * But it will only rerender on a new Map or a top Level change - this can be used to update
705
- * the tabular data if the automatic re-render is no sufficient
706
- */
707
- async refresh() {
708
- this.kick();
709
- await this.setFocus();
710
- }
711
- /**
712
- * Get list of files, divided in errors and valid sections
713
- */
714
- async getFiles() {
715
- if (!this.files || this.files.size === 0) {
716
- return false;
717
- }
718
- return this.getFilesAsArray();
719
- }
720
- /**
721
- * Convenience method for updating the value of a key:value inside an item in the files attribute
722
- */
723
- async updateValue(item, key, value) {
724
- this.updateValueInMap(item, key, value);
725
- }
726
- /**
727
- * focusActionButton.
728
- */
729
- async focusActionButton(uid) {
730
- var _a;
731
- await ((_a = this.itemRefs.get(uid)) === null || _a === void 0 ? void 0 : _a.focusActionButton());
732
- }
733
- /**
734
- * render() function
735
- * Always the last one in the class.
736
- */
737
- render() {
738
- const identifier = this.identifier || this.uploadId;
739
- const maxMegaBytesTotal = Math.round((this.maxBytesTotal ? this.maxBytesTotal : this.maxBytes * this.maxFiles) / 1024 / 1024);
740
- const maxMegaBytesPrFile = Math.round(this.maxBytes / 1024 / 1024);
741
- let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
742
- caption = caption.replace(/{maxbytes}/g, `${maxMegaBytesPrFile.toString()} MB`);
743
- caption = caption.replace(/{maxbytestotal}/g, `${maxMegaBytesTotal.toString()} MB`);
744
- caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
745
- if (this.externalUploadButton) {
746
- this.externalUploadButton.ariaLabel = caption;
747
- }
748
- // @ts-ignore
749
- return (h(Host, { class: { "duet-m-0": this.margin === "none" } }, h("duet-fieldset", { "label-heading-level": this.headerHeadingLevel, "label-hidden": this.hideHeader, label: this.label, caption: !this.captionOnBottom ? caption : undefined }, h("slot", { name: "header" }), !this.files.size && (h("duet-empty-state", { id: this.labelId, part: this.identifier ? `${this.identifier}-empty-state` : "duet-upload-empty-state", icon: "messaging-attachment" }, h("duet-paragraph", { margin: "none" }, this.fileListEmpty))), !!this.files.size && h("slot", { name: "fileheader" }), !!this.files.size && (h("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.internalStatusMessageLabel })), !!this.files.size && this.renderUploadedItems(), !!this.files.size && h("slot", { name: "filefooter" }), h("slot", { name: "uploadfooter" }), this.captionOnBottom && (h("duet-caption", { margin: "none", size: "small" }, h("div", { class: "upload-bottom-caption" }, caption))), h("slot", { name: "afterfooter" }), !this.hideButton && (h(Fragment, null, h("duet-spacer", { size: "large" }), h("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle", part: this.identifier ? `${this.identifier}-button-upload` : "duet-upload-button-upload" }, this.buttonLabel))), (this.fileMaxReached ||
750
- this.bytesMaxReached ||
751
- this.filesToUploadExceedsLimit ||
752
- this.filesToUploadTotalSizeIsAboveMax) && (h(Fragment, null, h("duet-spacer", { size: "medium" }), h("duet-alert", { part: this.identifier ? `${this.identifier}-error-notification` : "duet-upload-error-notification" }, this.fileMaxReached && getI18nError("duet-upload-301", this.errorCodes), this.bytesMaxReached && getI18nError("duet-upload-202", this.errorCodes), this.filesToUploadExceedsLimit && getI18nError("duet-upload-302", this.errorCodes), this.filesToUploadTotalSizeIsAboveMax && getI18nError("duet-upload-203", this.errorCodes)))), h("duet-visually-hidden", { "aria-hidden": "true" }, h("input", { ref: input => {
753
- this.nativeInput = input;
754
- }, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
755
- "duet-upload": true,
756
- }, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, tabIndex: -1 })))));
757
- }
758
- /**
759
- * XHR request utilities
760
- */
761
- makeXHRPostRequest(data) {
762
- const xhr = new XMLHttpRequest();
763
- const name = data.get("name");
764
- xhr.upload.addEventListener("progress", ev => {
765
- this.updateProgress(ev, name);
766
- });
767
- xhr.upload.addEventListener("load", () => {
768
- this.transferComplete(name);
769
- });
770
- xhr.upload.addEventListener("error", () => {
771
- this.transferFailed(name);
772
- });
773
- xhr.upload.addEventListener("abort", () => {
774
- this.transferCanceled(name);
775
- });
776
- let options = {
777
- payload: { data, name },
778
- options: { type: "POST", uri: this.uri, xhr, argument: null, headers: undefined },
779
- onFailure: this.transferDoneWithFailure,
780
- onSuccess: this.transferDone,
781
- onProgress: this.trackProgress,
782
- };
783
- if (this.middleware) {
784
- options = this.middleware(options);
785
- }
786
- return makeXhrRequest(options);
787
- }
788
- makeXHRDeleteRequest(data) {
789
- const { uid, item } = data;
790
- const xhr = new XMLHttpRequest();
791
- const headers = {
792
- "x-fileuid": uid,
793
- "x-filename": item.name,
794
- };
795
- let options = {
796
- payload: { data: null, name },
797
- options: {
798
- type: "DELETE",
799
- xhr,
800
- uri: this.uri,
801
- argument: `?key=${uid}&name=${item.name}`,
802
- headers,
803
- },
804
- onFailure: this.transferDoneWithFailure,
805
- onSuccess: this.transferDone,
806
- onProgress: this.trackProgress,
807
- };
808
- if (this.middleware) {
809
- options = this.middleware(options);
810
- }
811
- // don't present server issues to user on deletes, just remove them from the visible list
812
- return makeXhrRequest(options);
813
- }
814
- /**
815
- * Component event handling.
816
- */
817
- async onChange(ev) {
818
- var _a;
819
- const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
820
- // FileList is a nice array like structure but
821
- // to ensure uniqueness of files we use a mapping structure and
822
- // key to the name (makes it easier to delete as well)
823
- this.filesToUploadExceedsLimit = false;
824
- if (filesToUploadCountAboveMax(this.files.size, selectedFiles.length, this.maxFiles)) {
825
- this.filesToUploadExceedsLimit = true;
826
- this.kick();
827
- return;
828
- }
829
- this.filesToUploadTotalSizeIsAboveMax = false;
830
- if (filesToUploadTotalSizeIsAboveMax(this.files, selectedFiles, this.maxBytesTotal)) {
831
- this.filesToUploadTotalSizeIsAboveMax = true;
832
- this.kick();
833
- return;
834
- }
835
- if (selectedFiles) {
836
- for (const item of selectedFiles) {
837
- const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
838
- maxBytes: this.maxBytes,
839
- allowedExtensions: this.allowedExtensions,
840
- allowedMimetypes: this.allowedMimetypes,
841
- }, this.errorCodes);
842
- const uid = this.genHashName();
843
- const fileListItem = {
844
- uid,
845
- item: item,
846
- size: item.size,
847
- meta: this.metaData,
848
- uploaded: false,
849
- valid,
850
- error: {
851
- type: valid ? undefined : errorType,
852
- message: valid ? undefined : errorMessage,
853
- system_message: valid ? undefined : errorSystem,
854
- },
855
- progress: 0,
856
- deleted: false,
857
- xhr: false,
858
- url: false,
25
+ constructor() {
26
+ /**
27
+ * Own Properties
28
+ */
29
+ this.buttonId = createID("DuetButton");
30
+ this.labelId = createID("DuetLabel");
31
+ this.uploadId = createID("DuetUpload");
32
+ this.filesInProgress = new Map();
33
+ this.fileMaxReached = false;
34
+ this.bytesMaxReached = false;
35
+ this.filesToUploadExceedsLimit = false;
36
+ this.filesToUploadTotalSizeIsAboveMax = false;
37
+ this.internalStatusMessageLabel = undefined;
38
+ this.itemRefs = new Map();
39
+ /**
40
+ * Properties
41
+ */
42
+ this.DefaultGroups = {
43
+ inprogress: "inprogress",
44
+ success: "success",
45
+ pending: "pending",
46
+ failure: "failure",
859
47
  };
860
- this.files.set(item.name, fileListItem);
861
- if (valid && !this.external) {
862
- await this.uploadFile(fileListItem);
863
- }
864
- else if (valid && this.external) {
865
- this.updateValueInMap(fileListItem.item.name, "pending", true, false);
866
- this.updateValueInMap(fileListItem.item.name, "group", "pending", true);
867
- }
868
- else if (!valid) {
869
- this.updateValueInMap(item.name, "valid", false, true);
870
- }
871
- // kick the stat to force update
872
- this.kick();
873
- }
874
- }
875
- // reset the form, so that a user may upload a file again (with the same name)
876
- this.resetFormFields();
877
- // reset the internal metaData state
878
- this.metaData = undefined;
879
- this.duetChange.emit({
880
- originalEvent: ev,
881
- data: { files: this.files },
882
- component: "duet-upload",
883
- });
884
- }
885
- static get is() { return "duet-upload"; }
886
- static get encapsulation() { return "shadow"; }
887
- static get originalStyleUrls() {
888
- return {
889
- "$": ["duet-upload.scss"]
890
- };
891
- }
892
- static get styleUrls() {
893
- return {
894
- "$": ["duet-upload.css"]
895
- };
896
- }
897
- static get properties() {
898
- return {
899
- "accessibleActiveDescendant": {
900
- "type": "string",
901
- "mutable": false,
902
- "complexType": {
903
- "original": "string",
904
- "resolved": "string",
905
- "references": {}
906
- },
907
- "required": false,
908
- "optional": false,
909
- "docs": {
910
- "tags": [],
911
- "text": "Indicates the id of a related component\u2019s visually focused element."
912
- },
913
- "attribute": "accessible-active-descendant",
914
- "reflect": false
915
- },
916
- "accessibleDescribedBy": {
917
- "type": "string",
918
- "mutable": false,
919
- "complexType": {
920
- "original": "string",
921
- "resolved": "string",
922
- "references": {}
923
- },
924
- "required": false,
925
- "optional": false,
926
- "docs": {
927
- "tags": [],
928
- "text": "Indicates the id of a component that describes the upload component."
929
- },
930
- "attribute": "accessible-described-by",
931
- "reflect": false
932
- },
933
- "accessibleControls": {
934
- "type": "string",
935
- "mutable": false,
936
- "complexType": {
937
- "original": "string",
938
- "resolved": "string",
939
- "references": {}
940
- },
941
- "required": false,
942
- "optional": false,
943
- "docs": {
944
- "tags": [],
945
- "text": "Use this prop to add an aria-controls attribute. Use the attribute to\nindicate the id of a component controlled by this component."
946
- },
947
- "attribute": "accessible-controls",
948
- "reflect": false
949
- },
950
- "accessibleOwns": {
951
- "type": "string",
952
- "mutable": false,
953
- "complexType": {
954
- "original": "string",
955
- "resolved": "string",
956
- "references": {}
957
- },
958
- "required": false,
959
- "optional": false,
960
- "docs": {
961
- "tags": [],
962
- "text": "Indicates the id of a component owned by the input."
963
- },
964
- "attribute": "accessible-owns",
965
- "reflect": false
966
- },
967
- "external": {
968
- "type": "boolean",
969
- "mutable": false,
970
- "complexType": {
971
- "original": "boolean",
972
- "resolved": "boolean",
973
- "references": {}
974
- },
975
- "required": false,
976
- "optional": false,
977
- "docs": {
978
- "tags": [],
979
- "text": "If external is set to true, the upload component will not actually upload the files, but only keep states\nit will be up to you to handle the upload and return progress information to the upload-component"
980
- },
981
- "attribute": "external",
982
- "reflect": false,
983
- "defaultValue": "false"
984
- },
985
- "middleware": {
986
- "type": "unknown",
987
- "mutable": false,
988
- "complexType": {
989
- "original": "XHRInternalMiddleWare",
990
- "resolved": "(XHRMiddlewareOptions: any) => XHRMiddlewareOptions",
991
- "references": {
992
- "XHRInternalMiddleWare": {
993
- "location": "local",
994
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
995
- "id": "src/components/duet-upload/duet-upload.tsx::XHRInternalMiddleWare"
48
+ this.kick = debounce(() => {
49
+ this.tick = Date.now();
50
+ }, 30); // will trigger re-render
51
+ this.categoryLabel = {
52
+ en: "Category",
53
+ sv: "Filtyp",
54
+ fi: "Tiedostotyyppi",
55
+ };
56
+ /**
57
+ * Private functions
58
+ */
59
+ this.listenForActionEvents = () => {
60
+ this.element.addEventListener("duetActionEvent", (e) => {
61
+ const detail = e.detail;
62
+ const { action, id, originalEvent } = detail;
63
+ switch (action) {
64
+ case "delete":
65
+ this.onDelete(id, originalEvent);
66
+ break;
67
+ case "cancel":
68
+ this.onCancel(id, originalEvent);
69
+ break;
70
+ default:
71
+ // code block
72
+ }
73
+ });
74
+ };
75
+ this.verifyValidity = () => {
76
+ const { invalid, valid } = this.getFilesAsArray();
77
+ const oldValid = this.valid;
78
+ this.valid = invalid.length === 0 && valid.length !== 0;
79
+ if (this.valid !== oldValid) {
80
+ this.duetState.emit({
81
+ originalEvent: undefined,
82
+ data: { valid: this.valid, from: "componentWillRender" },
83
+ component: "duet-upload",
84
+ });
996
85
  }
997
- }
998
- },
999
- "required": false,
1000
- "optional": false,
1001
- "docs": {
1002
- "tags": [],
1003
- "text": "If internal upload method is used, and this has been set to a function - it will be called with the XHR options before the reqeust is sent, return an updated XHR options object in order to manipulate the request"
1004
- },
1005
- "defaultValue": "null"
1006
- },
1007
- "deferUpload": {
1008
- "type": "boolean",
1009
- "mutable": false,
1010
- "complexType": {
1011
- "original": "boolean",
1012
- "resolved": "boolean",
1013
- "references": {}
1014
- },
1015
- "required": false,
1016
- "optional": false,
1017
- "docs": {
1018
- "tags": [],
1019
- "text": "If defer-upload is true, duet-upload will not (as recommended) instantly upload files but await a call to uploadPending()"
1020
- },
1021
- "attribute": "defer-upload",
1022
- "reflect": false,
1023
- "defaultValue": "false"
1024
- },
1025
- "hideButton": {
1026
- "type": "boolean",
1027
- "mutable": false,
1028
- "complexType": {
1029
- "original": "boolean",
1030
- "resolved": "boolean",
1031
- "references": {}
1032
- },
1033
- "required": false,
1034
- "optional": false,
1035
- "docs": {
1036
- "tags": [],
1037
- "text": "If set the upload component will not display an upload button, you will have to create one yourself\nand call the exposed method startUpload to open the upload dialog"
1038
- },
1039
- "attribute": "hide-upload-button",
1040
- "reflect": false,
1041
- "defaultValue": "false"
1042
- },
1043
- "actions": {
1044
- "type": "unknown",
1045
- "mutable": false,
1046
- "complexType": {
1047
- "original": "DuetEditableTableActions",
1048
- "resolved": "{ icon: string; color: string; background: string; size: DuetActionButtonIconSize; name: string; map?: string[]; label?: DuetLangObject; }[]",
1049
- "references": {
1050
- "DuetEditableTableActions": {
1051
- "location": "import",
1052
- "path": "../duet-editable-table/duet-editable-table",
1053
- "id": "src/components/duet-editable-table/duet-editable-table.tsx::DuetEditableTableActions"
86
+ };
87
+ this.getGroupFromItemData = (item) => {
88
+ if (item.valid && item.progress === 100) {
89
+ // if the item has a group, move the file to that group instead
90
+ // of into the standard success group
91
+ return this.DefaultGroups.success;
1054
92
  }
1055
- }
1056
- },
1057
- "required": false,
1058
- "optional": false,
1059
- "docs": {
1060
- "tags": [],
1061
- "text": "Default actions added to the internally used duet-editable-table"
1062
- },
1063
- "defaultValue": "[\n {\n icon: \"action-delete\",\n color: \"color-danger\",\n size: \"x-small\",\n background: \"gray-lightest\",\n name: \"delete\",\n map: [\"success\", \"failure\"],\n label: {\n fi: \"Poista tiedosto\",\n en: \"Delete the file\",\n sv: \"Ta bort filen\",\n },\n },\n {\n icon: \"navigation-close\",\n color: \"primary\",\n size: \"x-small\",\n background: \"gray-lightest\",\n name: \"cancel\",\n map: [\"inprogress\", \"pending\"],\n label: {\n fi: \"Keskeyt\u00E4 l\u00E4hetys\",\n en: \"Cancel the upload\",\n sv: \"Stop \u00F6verf\u00F6ringen\",\n },\n },\n ]"
1064
- },
1065
- "uri": {
1066
- "type": "string",
1067
- "mutable": false,
1068
- "complexType": {
1069
- "original": "string",
1070
- "resolved": "string",
1071
- "references": {}
1072
- },
1073
- "required": false,
1074
- "optional": false,
1075
- "docs": {
1076
- "tags": [],
1077
- "text": "Endpoint URI that is capable of receiving the files"
1078
- },
1079
- "attribute": "uri",
1080
- "reflect": false
1081
- },
1082
- "showLinks": {
1083
- "type": "boolean",
1084
- "mutable": false,
1085
- "complexType": {
1086
- "original": "boolean",
1087
- "resolved": "boolean",
1088
- "references": {}
1089
- },
1090
- "required": false,
1091
- "optional": false,
1092
- "docs": {
1093
- "tags": [],
1094
- "text": "If enabled the editable-table will display links on successfully uploaded items,\nthis requires the server can respond with link URIs in the correct format\nand that the files are accessible to the user"
1095
- },
1096
- "attribute": "show-links",
1097
- "reflect": false,
1098
- "defaultValue": "false"
1099
- },
1100
- "caption": {
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": "Caption (underneath label) that can be set as a way of adding extra information"
1113
- },
1114
- "attribute": "caption",
1115
- "reflect": false
1116
- },
1117
- "statusLabelDefaults": {
1118
- "type": "string",
1119
- "mutable": false,
1120
- "complexType": {
1121
- "original": "DuetLangObject | string",
1122
- "resolved": "DuetLangObject | string",
1123
- "references": {
1124
- "DuetLangObject": {
1125
- "location": "import",
1126
- "path": "../../utils/language-utils",
1127
- "id": "src/utils/language-utils.ts::DuetLangObject"
93
+ else if (item.progress > 0 && item.progress !== 100) {
94
+ return this.DefaultGroups.inprogress;
1128
95
  }
1129
- }
1130
- },
1131
- "required": false,
1132
- "optional": false,
1133
- "docs": {
1134
- "tags": [{
1135
- "name": "default",
1136
- "text": "{\nfi: {\ninProgress: \"L\u00E4hetet\u00E4\u00E4n {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}.\",\ninProgressWithErrors:\n\"L\u00E4hetet\u00E4\u00E4n {filesInProgress}, l\u00E4hetetty {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}, {filesWithErrors} ep\u00E4onnistui\",\ndone: \"L\u00E4hetys valmis, {filesTotal} lis\u00E4tty onnistuneesti\",\ndoneWithErrors: \"L\u00E4hetys valmis, {filesUploaded} lis\u00E4tty onnistuneesti, {filesWithErrors} ep\u00E4onnistui\",\nfiles: \"tiedostoa\",\nfile: \"tiedosto\",\n},\nsv: {\ninProgress: \"Laddar upp {filesUploaded} av {filesTotal}\",\ninProgressWithErrors:\n\"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades\",\ndone: \"Uppladdningen slutf\u00F6rd, {filesTotal} har lagts till\",\ndoneWithErrors: \"Uppladdningen slutf\u00F6rd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades\",\nfiles: \"filer\",\nfile: \"fil\",\n},\nen: {\ninProgress: \"Uploading {filesUploaded} of {filesTotal}\",\ninProgressWithErrors:\n\"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed\",\ndone: \"Upload completed, {filesTotal} added successfully\",\ndoneWithErrors: \"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.\",\nfiles: \"files\",\nfile: \"file\",\n},\n}"
1137
- }],
1138
- "text": "Property to change the aria upload progress text read aloud by screenreaders"
1139
- },
1140
- "attribute": "status-label-default",
1141
- "reflect": false,
1142
- "defaultValue": "{\n fi: {\n inProgress: \"L\u00E4hetet\u00E4\u00E4n {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}.\",\n inProgressWithErrors:\n \"L\u00E4hetet\u00E4\u00E4n {filesInProgress}, l\u00E4hetetty {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}, {filesWithErrors} ep\u00E4onnistui\",\n done: \"L\u00E4hetys valmis, {filesTotal} lis\u00E4tty onnistuneesti\",\n doneWithErrors: \"L\u00E4hetys valmis, {filesUploaded} lis\u00E4tty onnistuneesti, {filesWithErrors} ep\u00E4onnistui\",\n files: \"tiedostoa\",\n file: \"tiedosto\",\n },\n sv: {\n inProgress: \"Laddar upp {filesUploaded} av {filesTotal}\",\n inProgressWithErrors:\n \"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades\",\n done: \"Uppladdningen slutf\u00F6rd, {filesTotal} har lagts till\",\n doneWithErrors: \"Uppladdningen slutf\u00F6rd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades\",\n files: \"filer\",\n file: \"fil\",\n },\n en: {\n inProgress: \"Uploading {filesUploaded} of {filesTotal}\",\n inProgressWithErrors:\n \"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed\",\n done: \"Upload completed, {filesTotal} added successfully\",\n doneWithErrors: \"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.\",\n files: \"files\",\n file: \"file\",\n },\n }"
1143
- },
1144
- "statusMessageLabel": {
1145
- "type": "string",
1146
- "mutable": false,
1147
- "complexType": {
1148
- "original": "StatusMessage | string",
1149
- "resolved": "string | { inProgress: string; inProgressWithErrors: string; done: string; doneWithErrors: string; file: string; files: string; }",
1150
- "references": {
1151
- "StatusMessage": {
1152
- "location": "import",
1153
- "path": "../../common-types",
1154
- "id": "src/common-types.d.ts::StatusMessage"
96
+ else if (!item.valid) {
97
+ return this.DefaultGroups.failure;
1155
98
  }
1156
- }
1157
- },
1158
- "required": false,
1159
- "optional": false,
1160
- "docs": {
1161
- "tags": [],
1162
- "text": "Strings used for the status aria-label"
1163
- },
1164
- "attribute": "status-message-label",
1165
- "reflect": false,
1166
- "defaultValue": "getLocaleString(\n this.statusLabelDefaults\n )"
1167
- },
1168
- "buttonLabelDefaults": {
1169
- "type": "string",
1170
- "mutable": false,
1171
- "complexType": {
1172
- "original": "DuetLangObject | string",
1173
- "resolved": "DuetLangObject | string",
1174
- "references": {
1175
- "DuetLangObject": {
1176
- "location": "import",
1177
- "path": "../../utils/language-utils",
1178
- "id": "src/utils/language-utils.ts::DuetLangObject"
99
+ else if (item.pending) {
100
+ return this.DefaultGroups.pending;
1179
101
  }
1180
- }
1181
- },
1182
- "required": false,
1183
- "optional": false,
1184
- "docs": {
1185
- "tags": [{
1186
- "name": "default",
1187
- "text": "{\nfi: \"Lis\u00E4\u00E4 liite\",\nsv: \"L\u00E4gg till en bilaga\",\nen: \"Add an attachment\",\n}"
1188
- }],
1189
- "text": "Property to change button label defaults on the component."
1190
- },
1191
- "attribute": "button-label-default",
1192
- "reflect": false,
1193
- "defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add an attachment\",\n }"
1194
- },
1195
- "buttonLabel": {
1196
- "type": "string",
1197
- "mutable": false,
1198
- "complexType": {
1199
- "original": "string",
1200
- "resolved": "string",
1201
- "references": {}
1202
- },
1203
- "required": false,
1204
- "optional": false,
1205
- "docs": {
1206
- "tags": [{
1207
- "name": "default",
1208
- "text": "{ fi: \"Lis\u00E4\u00E4 liite\", sv: \"L\u00E4gg till en bilaga\", en: \"Add an attachment\" }"
1209
- }],
1210
- "text": "Label of button"
1211
- },
1212
- "attribute": "button-label",
1213
- "reflect": false,
1214
- "defaultValue": "getLocaleString(this.buttonLabelDefaults)"
1215
- },
1216
- "accessibleButtonLabel": {
1217
- "type": "string",
1218
- "mutable": false,
1219
- "complexType": {
1220
- "original": "string",
1221
- "resolved": "string",
1222
- "references": {}
1223
- },
1224
- "required": false,
1225
- "optional": false,
1226
- "docs": {
1227
- "tags": [],
1228
- "text": "accessible aria-Label of button"
1229
- },
1230
- "attribute": "accessible-button-label",
1231
- "reflect": false,
1232
- "defaultValue": "undefined"
1233
- },
1234
- "theme": {
1235
- "type": "string",
1236
- "mutable": true,
1237
- "complexType": {
1238
- "original": "DuetTheme",
1239
- "resolved": "\"\" | \"default\" | \"turva\"",
1240
- "references": {
1241
- "DuetTheme": {
1242
- "location": "import",
1243
- "path": "../../common-types",
1244
- "id": "src/common-types.d.ts::DuetTheme"
102
+ else if (item.group) {
103
+ return item.group;
1245
104
  }
1246
- }
1247
- },
1248
- "required": false,
1249
- "optional": false,
1250
- "docs": {
1251
- "tags": [],
1252
- "text": "Theme of the input."
1253
- },
1254
- "attribute": "theme",
1255
- "reflect": false,
1256
- "defaultValue": "\"\""
1257
- },
1258
- "disabled": {
1259
- "type": "boolean",
1260
- "mutable": false,
1261
- "complexType": {
1262
- "original": "boolean",
1263
- "resolved": "boolean",
1264
- "references": {}
1265
- },
1266
- "required": false,
1267
- "optional": false,
1268
- "docs": {
1269
- "tags": [],
1270
- "text": "Makes the input component disabled. This prevents users from being able to\ninteract with the upload component, and conveys its inactive state to assistive technologies."
1271
- },
1272
- "attribute": "disabled",
1273
- "reflect": true,
1274
- "defaultValue": "false"
1275
- },
1276
- "identifier": {
1277
- "type": "string",
1278
- "mutable": false,
1279
- "complexType": {
1280
- "original": "string",
1281
- "resolved": "string",
1282
- "references": {}
1283
- },
1284
- "required": false,
1285
- "optional": false,
1286
- "docs": {
1287
- "tags": [],
1288
- "text": "Adds a unique identifier for the upload component."
1289
- },
1290
- "attribute": "identifier",
1291
- "reflect": false
1292
- },
1293
- "margin": {
1294
- "type": "string",
1295
- "mutable": false,
1296
- "complexType": {
1297
- "original": "DuetMargin",
1298
- "resolved": "\"auto\" | \"none\"",
1299
- "references": {
1300
- "DuetMargin": {
1301
- "location": "import",
1302
- "path": "../../common-types",
1303
- "id": "src/common-types.d.ts::DuetMargin"
105
+ else {
106
+ return "none";
1304
107
  }
1305
- }
1306
- },
1307
- "required": false,
1308
- "optional": false,
1309
- "docs": {
1310
- "tags": [],
1311
- "text": "Controls the margin of the component."
1312
- },
1313
- "attribute": "margin",
1314
- "reflect": false,
1315
- "defaultValue": "\"auto\""
1316
- },
1317
- "required": {
1318
- "type": "boolean",
1319
- "mutable": false,
1320
- "complexType": {
1321
- "original": "boolean",
1322
- "resolved": "boolean",
1323
- "references": {}
1324
- },
1325
- "required": false,
1326
- "optional": false,
1327
- "docs": {
1328
- "tags": [],
1329
- "text": "Set whether the input is required or not. Please note that this is necessary for\naccessible inputs when the user is required to fill them. When using this property\nyou need to also set \u201Cnovalidate\u201D attribute to your form element to prevent\nbrowser from displaying its own validation errors."
1330
- },
1331
- "attribute": "required",
1332
- "reflect": false,
1333
- "defaultValue": "false"
1334
- },
1335
- "alignment": {
1336
- "type": "string",
1337
- "mutable": false,
1338
- "complexType": {
1339
- "original": "string",
1340
- "resolved": "string",
1341
- "references": {}
1342
- },
1343
- "required": false,
1344
- "optional": false,
1345
- "docs": {
1346
- "tags": [],
1347
- "text": "Key used to set vertical alignment of action buttons"
1348
- },
1349
- "attribute": "alignment",
1350
- "reflect": false,
1351
- "defaultValue": "\"middle\""
1352
- },
1353
- "hideGroups": {
1354
- "type": "boolean",
1355
- "mutable": false,
1356
- "complexType": {
1357
- "original": "boolean",
1358
- "resolved": "boolean",
1359
- "references": {}
1360
- },
1361
- "required": false,
1362
- "optional": false,
1363
- "docs": {
1364
- "tags": [],
1365
- "text": "Visually hides the groups labels in the editable table list used to display the list of files"
1366
- },
1367
- "attribute": "hide-table-labels",
1368
- "reflect": false,
1369
- "defaultValue": "false"
1370
- },
1371
- "files": {
1372
- "type": "unknown",
1373
- "mutable": true,
1374
- "complexType": {
1375
- "original": "StringMap",
1376
- "resolved": "StringMap",
1377
- "references": {
1378
- "StringMap": {
1379
- "location": "local",
1380
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
1381
- "id": "src/components/duet-upload/duet-upload.tsx::StringMap"
108
+ };
109
+ this.mapFilesToUploadItems = (data, group, showCategory, filteredActions) => {
110
+ if (group === this.DefaultGroups.success) {
111
+ return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "success", data: data, showLinks: this.showLinks, linkClickEvent: this.emitEvent ? this.linkClick : undefined, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
112
+ this.itemRefs.set(data.uid, item);
113
+ } }));
1382
114
  }
1383
- }
1384
- },
1385
- "required": false,
1386
- "optional": false,
1387
- "docs": {
1388
- "tags": [],
1389
- "text": "Map of string that contain list of uploaded files."
1390
- },
1391
- "defaultValue": "new Map()"
1392
- },
1393
- "valid": {
1394
- "type": "boolean",
1395
- "mutable": true,
1396
- "complexType": {
1397
- "original": "boolean",
1398
- "resolved": "boolean",
1399
- "references": {}
1400
- },
1401
- "required": false,
1402
- "optional": false,
1403
- "docs": {
1404
- "tags": [],
1405
- "text": "Property to read if the internally used editable-table contains errors or not"
1406
- },
1407
- "attribute": "valid",
1408
- "reflect": true,
1409
- "defaultValue": "!this.required"
1410
- },
1411
- "labelDefaults": {
1412
- "type": "string",
1413
- "mutable": false,
1414
- "complexType": {
1415
- "original": "DuetLangObject | string",
1416
- "resolved": "DuetLangObject | string",
1417
- "references": {
1418
- "DuetLangObject": {
1419
- "location": "import",
1420
- "path": "../../utils/language-utils",
1421
- "id": "src/utils/language-utils.ts::DuetLangObject"
115
+ else if (group === this.DefaultGroups.inprogress) {
116
+ return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "inprogress", data: data, showLinks: this.showLinks, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
117
+ this.itemRefs.set(data.uid, item);
118
+ } }));
1422
119
  }
1423
- }
1424
- },
1425
- "required": false,
1426
- "optional": false,
1427
- "docs": {
1428
- "tags": [{
1429
- "name": "default",
1430
- "text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
1431
- }],
1432
- "text": "Property to change labelDefaults defaults on the component.\nnormally you would handle these strings on an application level and override label when needed"
1433
- },
1434
- "attribute": "label-default",
1435
- "reflect": false,
1436
- "defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add attachments\",\n }"
1437
- },
1438
- "label": {
1439
- "type": "string",
1440
- "mutable": false,
1441
- "complexType": {
1442
- "original": "string",
1443
- "resolved": "string",
1444
- "references": {}
1445
- },
1446
- "required": false,
1447
- "optional": false,
1448
- "docs": {
1449
- "tags": [{
1450
- "name": "default",
1451
- "text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
1452
- }],
1453
- "text": "Label for the input."
1454
- },
1455
- "attribute": "label",
1456
- "reflect": false,
1457
- "defaultValue": "getLocaleString(this.labelDefaults)"
1458
- },
1459
- "descriptionDefaults": {
1460
- "type": "string",
1461
- "mutable": false,
1462
- "complexType": {
1463
- "original": "DuetLangObject | string",
1464
- "resolved": "DuetLangObject | string",
1465
- "references": {
1466
- "DuetLangObject": {
1467
- "location": "import",
1468
- "path": "../../utils/language-utils",
1469
- "id": "src/utils/language-utils.ts::DuetLangObject"
120
+ else if (group === this.DefaultGroups.pending) {
121
+ return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "pending", data: data, showLinks: this.showLinks, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
122
+ this.itemRefs.set(data.uid, item);
123
+ } }));
1470
124
  }
1471
- }
1472
- },
1473
- "required": false,
1474
- "optional": false,
1475
- "docs": {
1476
- "tags": [{
1477
- "name": "default",
1478
- "text": "{\nen: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.\",\nsv: \"Du kan bifoga f\u00F6ljande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer \u00E5t g\u00E5ngen, och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen varje inte st\u00F6rre \u00E4n {maxbytes}.\",\nfi: \"Voit liitt\u00E4\u00E4 seuraavat tiedostotyypit: {filetypes} - sek\u00E4 yleisimm\u00E4t videotiedostot. Voit l\u00E4hett\u00E4\u00E4 {maxbytestotal} tiedostoa kerrallaan, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan, jokainen enint\u00E4\u00E4n {maxbytes} kokoisena.\",\n}"
1479
- }],
1480
- "text": "Property to change descriptionDefaults defaults on the component."
1481
- },
1482
- "attribute": "description-default",
1483
- "reflect": false,
1484
- "defaultValue": "{\n en: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.\",\n sv: \"Du kan bifoga f\u00F6ljande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer \u00E5t g\u00E5ngen, och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen varje inte st\u00F6rre \u00E4n {maxbytes}.\",\n fi: \"Voit liitt\u00E4\u00E4 seuraavat tiedostotyypit: {filetypes} - sek\u00E4 yleisimm\u00E4t videotiedostot. Voit l\u00E4hett\u00E4\u00E4 {maxbytestotal} tiedostoa kerrallaan, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan, jokainen enint\u00E4\u00E4n {maxbytes} kokoisena.\",\n }"
1485
- },
1486
- "description": {
1487
- "type": "string",
1488
- "mutable": false,
1489
- "complexType": {
1490
- "original": "string",
1491
- "resolved": "string",
1492
- "references": {}
1493
- },
1494
- "required": false,
1495
- "optional": false,
1496
- "docs": {
1497
- "tags": [{
1498
- "name": "default",
1499
- "text": "{\nen: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.\",\nsv: \"Du kan bifoga f\u00F6ljande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer \u00E5t g\u00E5ngen, och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen varje inte st\u00F6rre \u00E4n {maxbytes}.\",\nfi: \"Voit liitt\u00E4\u00E4 seuraavat tiedostotyypit: {filetypes} - sek\u00E4 yleisimm\u00E4t videotiedostot. Voit l\u00E4hett\u00E4\u00E4 {maxbytestotal} tiedostoa kerrallaan, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan, jokainen enint\u00E4\u00E4n {maxbytes} kokoisena.\",\n}"
1500
- }],
1501
- "text": "Description for the upload component."
1502
- },
1503
- "attribute": "description",
1504
- "reflect": false,
1505
- "defaultValue": "getLocaleString(this.descriptionDefaults)"
1506
- },
1507
- "fileListEmptyDefaults": {
1508
- "type": "string",
1509
- "mutable": false,
1510
- "complexType": {
1511
- "original": "DuetLangObject | string",
1512
- "resolved": "DuetLangObject | string",
1513
- "references": {
1514
- "DuetLangObject": {
1515
- "location": "import",
1516
- "path": "../../utils/language-utils",
1517
- "id": "src/utils/language-utils.ts::DuetLangObject"
125
+ else if (group === this.DefaultGroups.failure) {
126
+ return (h("duet-upload-item", { theme: this.theme, actions: this.getActions(group, filteredActions), type: "failure", data: data, showLinks: this.showLinks, errorCodes: this.errorCodes, categoryLabel: this.categoryLabel, label: this.uploadedItemsHeaderLabel, showCategory: showCategory, ref: item => {
127
+ this.itemRefs.set(data.uid, item);
128
+ } }));
1518
129
  }
1519
- }
1520
- },
1521
- "required": false,
1522
- "optional": false,
1523
- "docs": {
1524
- "tags": [{
1525
- "name": "default",
1526
- "text": "{\nfi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",\nsv: \"Inga filer har lagts till \u00E4nnu.\",\nen: \"No files added yet.\",\n}"
1527
- }],
1528
- "text": "Defaults for the filelist's empty state."
1529
- },
1530
- "attribute": "list-empty-default",
1531
- "reflect": false,
1532
- "defaultValue": "{\n fi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",\n sv: \"Inga filer har lagts till \u00E4nnu.\",\n en: \"No files added yet.\",\n }"
1533
- },
1534
- "fileListEmpty": {
1535
- "type": "string",
1536
- "mutable": false,
1537
- "complexType": {
1538
- "original": "string",
1539
- "resolved": "string",
1540
- "references": {}
1541
- },
1542
- "required": false,
1543
- "optional": false,
1544
- "docs": {
1545
- "tags": [{
1546
- "name": "default",
1547
- "text": "{ fi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",sv: \"Inga filer har lagts till \u00E4nnu.\",en: \"No files added yet.\"}"
1548
- }],
1549
- "text": "Label for the filelist's empty state."
1550
- },
1551
- "attribute": "file-list-empty",
1552
- "reflect": false,
1553
- "defaultValue": "getLocaleString(this.fileListEmptyDefaults)"
1554
- },
1555
- "error": {
1556
- "type": "string",
1557
- "mutable": false,
1558
- "complexType": {
1559
- "original": "string",
1560
- "resolved": "string",
1561
- "references": {}
1562
- },
1563
- "required": false,
1564
- "optional": false,
1565
- "docs": {
1566
- "tags": [],
1567
- "text": "Display the input in error state along with an error message."
1568
- },
1569
- "attribute": "error",
1570
- "reflect": false,
1571
- "defaultValue": "\"\""
1572
- },
1573
- "errorCodes": {
1574
- "type": "unknown",
1575
- "mutable": false,
1576
- "complexType": {
1577
- "original": "DuetUploadErrorCode[]",
1578
- "resolved": "DuetUploadErrorCode[]",
1579
- "references": {
1580
- "DuetUploadErrorCode": {
1581
- "location": "import",
1582
- "path": "./errorcodes.utils",
1583
- "id": "src/components/duet-upload/errorcodes.utils.ts::DuetUploadErrorCode"
130
+ else if (data.group) {
131
+ return data.html;
1584
132
  }
1585
- }
1586
- },
1587
- "required": false,
1588
- "optional": false,
1589
- "docs": {
1590
- "tags": [],
1591
- "text": "Default errorcodes used by the component, modifiable via javascript"
1592
- },
1593
- "defaultValue": "errorCodes"
1594
- },
1595
- "name": {
1596
- "type": "string",
1597
- "mutable": false,
1598
- "complexType": {
1599
- "original": "string",
1600
- "resolved": "string",
1601
- "references": {}
1602
- },
1603
- "required": false,
1604
- "optional": false,
1605
- "docs": {
1606
- "tags": [],
1607
- "text": "Name of the upload component."
1608
- },
1609
- "attribute": "name",
1610
- "reflect": false
1611
- },
1612
- "maxBytes": {
1613
- "type": "number",
1614
- "mutable": false,
1615
- "complexType": {
1616
- "original": "number",
1617
- "resolved": "number",
1618
- "references": {}
1619
- },
1620
- "required": false,
1621
- "optional": false,
1622
- "docs": {
1623
- "tags": [],
1624
- "text": "Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded."
1625
- },
1626
- "attribute": "max-bytes",
1627
- "reflect": false,
1628
- "defaultValue": "200000000"
1629
- },
1630
- "maxBytesTotal": {
1631
- "type": "number",
1632
- "mutable": false,
1633
- "complexType": {
1634
- "original": "number",
1635
- "resolved": "number",
1636
- "references": {}
1637
- },
1638
- "required": false,
1639
- "optional": false,
1640
- "docs": {
1641
- "tags": [],
1642
- "text": "Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded."
1643
- },
1644
- "attribute": "max-bytes-total",
1645
- "reflect": false,
1646
- "defaultValue": "undefined"
1647
- },
1648
- "maxFiles": {
1649
- "type": "number",
1650
- "mutable": false,
1651
- "complexType": {
1652
- "original": "number",
1653
- "resolved": "number",
1654
- "references": {}
1655
- },
1656
- "required": false,
1657
- "optional": false,
1658
- "docs": {
1659
- "tags": [],
1660
- "text": "Use maxFiles to specify the maximum amount of files that can be uploaded"
1661
- },
1662
- "attribute": "max-files",
1663
- "reflect": false,
1664
- "defaultValue": "99"
1665
- },
1666
- "allowedExtensions": {
1667
- "type": "string",
1668
- "mutable": false,
1669
- "complexType": {
1670
- "original": "string",
1671
- "resolved": "string",
1672
- "references": {}
1673
- },
1674
- "required": false,
1675
- "optional": false,
1676
- "docs": {
1677
- "tags": [{
1678
- "name": "example",
1679
- "text": ": .pdf,.doc,.docx"
1680
- }],
1681
- "text": "A string of commaseperated file type values that are allowed"
1682
- },
1683
- "attribute": "allowed-extensions",
1684
- "reflect": false,
1685
- "defaultValue": "\"all\""
1686
- },
1687
- "allowedMimetypes": {
1688
- "type": "string",
1689
- "mutable": false,
1690
- "complexType": {
1691
- "original": "string",
1692
- "resolved": "string",
1693
- "references": {}
1694
- },
1695
- "required": false,
1696
- "optional": false,
1697
- "docs": {
1698
- "tags": [{
1699
- "name": "example",
1700
- "text": ": image/*,application/msword,"
1701
- }],
1702
- "text": "A string of commaseperated mime type values that are allowed"
1703
- },
1704
- "attribute": "allowed-mimetypes",
1705
- "reflect": false,
1706
- "defaultValue": "\"\""
1707
- },
1708
- "multiple": {
1709
- "type": "boolean",
1710
- "mutable": false,
1711
- "complexType": {
1712
- "original": "boolean",
1713
- "resolved": "boolean",
1714
- "references": {}
1715
- },
1716
- "required": false,
1717
- "optional": false,
1718
- "docs": {
1719
- "tags": [],
1720
- "text": "Use multiple to allow the user to select multiple files when uploading"
1721
- },
1722
- "attribute": "multiple",
1723
- "reflect": false,
1724
- "defaultValue": "true"
1725
- },
1726
- "limitSelection": {
1727
- "type": "boolean",
1728
- "mutable": false,
1729
- "complexType": {
1730
- "original": "boolean",
1731
- "resolved": "boolean",
1732
- "references": {}
1733
- },
1734
- "required": false,
1735
- "optional": false,
1736
- "docs": {
1737
- "tags": [],
1738
- "text": "Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,\nby default this is off, setting this to true will limit the users choices to what has been explicitly set"
1739
- },
1740
- "attribute": "limit-selection",
1741
- "reflect": false,
1742
- "defaultValue": "false"
1743
- },
1744
- "hideCancelButton": {
1745
- "type": "boolean",
1746
- "mutable": false,
1747
- "complexType": {
1748
- "original": "boolean",
1749
- "resolved": "boolean",
1750
- "references": {}
1751
- },
1752
- "required": false,
1753
- "optional": false,
1754
- "docs": {
1755
- "tags": [],
1756
- "text": "Use hideCancelButton to hide cancel button for pending and in progress uploads"
1757
- },
1758
- "attribute": "hide-cancel-button",
1759
- "reflect": false,
1760
- "defaultValue": "false"
1761
- },
1762
- "value": {
1763
- "type": "string",
1764
- "mutable": true,
1765
- "complexType": {
1766
- "original": "string",
1767
- "resolved": "string",
1768
- "references": {}
1769
- },
1770
- "required": false,
1771
- "optional": false,
1772
- "docs": {
1773
- "tags": [],
1774
- "text": "Value of the input."
1775
- },
1776
- "attribute": "value",
1777
- "reflect": false
1778
- },
1779
- "externalUploadButtonId": {
1780
- "type": "string",
1781
- "mutable": false,
1782
- "complexType": {
1783
- "original": "string",
1784
- "resolved": "string",
1785
- "references": {}
1786
- },
1787
- "required": false,
1788
- "optional": false,
1789
- "docs": {
1790
- "tags": [],
1791
- "text": "Id of external uploadButton of the input used for setting accessibility attributes."
1792
- },
1793
- "attribute": "external-upload-button-id",
1794
- "reflect": false
1795
- },
1796
- "captionOnBottom": {
1797
- "type": "boolean",
1798
- "mutable": false,
1799
- "complexType": {
1800
- "original": "boolean",
1801
- "resolved": "boolean",
1802
- "references": {}
1803
- },
1804
- "required": false,
1805
- "optional": false,
1806
- "docs": {
1807
- "tags": [],
1808
- "text": "If true the input caption will be placed below file list and footer"
1809
- },
1810
- "attribute": "caption-on-bottom",
1811
- "reflect": false,
1812
- "defaultValue": "false"
1813
- },
1814
- "showUploadedItemsHeader": {
1815
- "type": "boolean",
1816
- "mutable": false,
1817
- "complexType": {
1818
- "original": "boolean",
1819
- "resolved": "boolean",
1820
- "references": {}
1821
- },
1822
- "required": false,
1823
- "optional": false,
1824
- "docs": {
1825
- "tags": [],
1826
- "text": "Use show-uploaded-items-header to show single, generic, header for uploaded items"
1827
- },
1828
- "attribute": "show-uploaded-items-header",
1829
- "reflect": false,
1830
- "defaultValue": "false"
1831
- },
1832
- "uploadedItemsHeaderLabel": {
1833
- "type": "unknown",
1834
- "mutable": false,
1835
- "complexType": {
1836
- "original": "DuetLangObject",
1837
- "resolved": "DuetLangObject",
1838
- "references": {
1839
- "DuetLangObject": {
1840
- "location": "import",
1841
- "path": "../../utils/language-utils",
1842
- "id": "src/utils/language-utils.ts::DuetLangObject"
133
+ else {
134
+ return "none";
1843
135
  }
1844
- }
1845
- },
1846
- "required": false,
1847
- "optional": false,
1848
- "docs": {
1849
- "tags": [{
1850
- "name": "default",
1851
- "text": "{\nfi: \"Ladattu tiedosto.\",\nsv: \"Nedladdad fil.\",\nen: \"Uploaded file.\",\n}"
1852
- }],
1853
- "text": "Property to change single uploaded items header label"
1854
- },
1855
- "defaultValue": "{\n fi: \"Ladattu tiedosto\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Uploaded file\",\n }"
1856
- },
1857
- "headerHeadingLevel": {
1858
- "type": "string",
1859
- "mutable": false,
1860
- "complexType": {
1861
- "original": "DuetHeadingLevel",
1862
- "resolved": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
1863
- "references": {
1864
- "DuetHeadingLevel": {
1865
- "location": "import",
1866
- "path": "../../common-types",
1867
- "id": "src/common-types.d.ts::DuetHeadingLevel"
136
+ };
137
+ this.genHashName = () => Date.now().toString(36) + Math.random();
138
+ this.updateValueInMap = (item, key, value, kick = true) => {
139
+ try {
140
+ const fileItem = this.files.get(item);
141
+ fileItem[key] = value;
142
+ this.files.set(item, fileItem);
143
+ if (this.external && key !== "url") {
144
+ this.trackProgress(item, key === "uploaded");
145
+ }
1868
146
  }
1869
- }
1870
- },
1871
- "required": false,
1872
- "optional": false,
1873
- "docs": {
1874
- "tags": [],
1875
- "text": "Heading level for the label in the legend element. This is only used to give screen readers better logical structure.\nThis does not affect visual appearance."
1876
- },
1877
- "attribute": "header-heading-level",
1878
- "reflect": false,
1879
- "defaultValue": "\"h3\""
1880
- },
1881
- "hideHeader": {
1882
- "type": "boolean",
1883
- "mutable": false,
1884
- "complexType": {
1885
- "original": "boolean",
1886
- "resolved": "boolean",
1887
- "references": {}
1888
- },
1889
- "required": false,
1890
- "optional": false,
1891
- "docs": {
1892
- "tags": [],
1893
- "text": "Use hide-header to hide upload component header and caption (if caption is not on bottom)"
1894
- },
1895
- "attribute": "hide-header",
1896
- "reflect": false,
1897
- "defaultValue": "false"
1898
- },
1899
- "emitEvent": {
1900
- "type": "boolean",
1901
- "mutable": false,
1902
- "complexType": {
1903
- "original": "boolean",
1904
- "resolved": "boolean",
1905
- "references": {}
1906
- },
1907
- "required": false,
1908
- "optional": false,
1909
- "docs": {
1910
- "tags": [],
1911
- "text": "If link-click-event is set to true then upload component\nwill emit an event on uploaded file link click (check linkClick event)."
1912
- },
1913
- "attribute": "link-click-event",
1914
- "reflect": false,
1915
- "defaultValue": "false"
1916
- },
1917
- "groups": {
1918
- "type": "unknown",
1919
- "mutable": false,
1920
- "complexType": {
1921
- "original": "DuetUploadTableGroupName[]",
1922
- "resolved": "DuetUploadTableGroupName[]",
1923
- "references": {
1924
- "DuetUploadTableGroupName": {
1925
- "location": "local",
1926
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
1927
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadTableGroupName"
147
+ catch (e) {
148
+ // if a users tries to update entries on a file that doesn't exist,
149
+ // this will blow up - so we're swallowing the errors here on purpose
150
+ // console.warn("operation on missing items")
1928
151
  }
1929
- }
1930
- },
1931
- "required": false,
1932
- "optional": false,
1933
- "docs": {
1934
- "tags": [{
1935
- "name": "required",
1936
- "text": undefined
1937
- }, {
1938
- "name": "example",
1939
- "text": "[{ id: \"success\", label: {fi: \"Onnistunut\", en: \"Success\", sv: \"Alt klart\", }}]"
1940
- }],
1941
- "text": "Array of group names that you want the editable table to use to display files"
1942
- },
1943
- "defaultValue": "[\n {\n id: this.DefaultGroups.success,\n label: {\n fi: \"Valmiit tiedostot\",\n sv: \"Files success\",\n en: \"Files success\",\n },\n },\n {\n id: this.DefaultGroups.failure,\n label: {\n fi: \"Tiedostot, joissa on virheit\u00E4\",\n sv: \"Filer med fel\",\n en: \"Files with errors\",\n },\n },\n {\n id: this.DefaultGroups.inprogress,\n label: {\n fi: \"Kesken olevat tiedostot\",\n sv: \"Filer inprogress\",\n en: \"Files inprogress\",\n },\n },\n {\n id: this.DefaultGroups.pending,\n label: {\n en: \"Files to upload\",\n sv: \"Filer att ladda\",\n fi: \"Ladattavat tiedostot\",\n },\n },\n ]"
1944
- }
1945
- };
1946
- }
1947
- static get states() {
1948
- return {
1949
- "tick": {}
1950
- };
1951
- }
1952
- static get events() {
1953
- return [{
1954
- "method": "duetChange",
1955
- "name": "duetChange",
1956
- "bubbles": false,
1957
- "cancelable": true,
1958
- "composed": true,
1959
- "docs": {
1960
- "tags": [],
1961
- "text": "Emitted when the value has changed."
1962
- },
1963
- "complexType": {
1964
- "original": "DuetUploadEvent",
1965
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
1966
- "references": {
1967
- "DuetUploadEvent": {
1968
- "location": "local",
1969
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
1970
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
152
+ if (kick) {
153
+ this.kick();
1971
154
  }
1972
- }
1973
- }
1974
- }, {
1975
- "method": "duetBlur",
1976
- "name": "duetBlur",
1977
- "bubbles": true,
1978
- "cancelable": true,
1979
- "composed": true,
1980
- "docs": {
1981
- "tags": [],
1982
- "text": "Emitted when the input loses focus."
1983
- },
1984
- "complexType": {
1985
- "original": "DuetUploadEvent",
1986
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
1987
- "references": {
1988
- "DuetUploadEvent": {
1989
- "location": "local",
1990
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
1991
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
155
+ };
156
+ this.updateProgress = (ev, name) => {
157
+ const updateProgressHelper = percentComplete => {
158
+ this.updateValueInMap(name, "progress", percentComplete);
159
+ this.onProgress(name, percentComplete, ev);
160
+ };
161
+ if (ev.lengthComputable) {
162
+ const percentComplete = (ev.loaded / ev.total) * 100;
163
+ updateProgressHelper(percentComplete);
1992
164
  }
1993
- }
1994
- }
1995
- }, {
1996
- "method": "duetFocus",
1997
- "name": "duetFocus",
1998
- "bubbles": true,
1999
- "cancelable": true,
2000
- "composed": true,
2001
- "docs": {
2002
- "tags": [],
2003
- "text": "Emitted when the input has focus."
2004
- },
2005
- "complexType": {
2006
- "original": "DuetUploadEvent",
2007
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2008
- "references": {
2009
- "DuetUploadEvent": {
2010
- "location": "local",
2011
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2012
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
165
+ else {
166
+ console.log("cant read progress");
2013
167
  }
2014
- }
2015
- }
2016
- }, {
2017
- "method": "duetReady",
2018
- "name": "duetReady",
2019
- "bubbles": true,
2020
- "cancelable": true,
2021
- "composed": true,
2022
- "docs": {
2023
- "tags": [],
2024
- "text": "Emitted when the component is finished initializing"
2025
- },
2026
- "complexType": {
2027
- "original": "DuetUploadEvent",
2028
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2029
- "references": {
2030
- "DuetUploadEvent": {
2031
- "location": "local",
2032
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2033
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
168
+ };
169
+ this.trackProgress = (name, remove = false) => {
170
+ if (remove) {
171
+ this.filesInProgress.delete(name);
2034
172
  }
2035
- }
2036
- }
2037
- }, {
2038
- "method": "duetDone",
2039
- "name": "duetDone",
2040
- "bubbles": false,
2041
- "cancelable": true,
2042
- "composed": true,
2043
- "docs": {
2044
- "tags": [],
2045
- "text": "Emitted when the current upload batch finishes"
2046
- },
2047
- "complexType": {
2048
- "original": "DuetUploadEvent",
2049
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2050
- "references": {
2051
- "DuetUploadEvent": {
2052
- "location": "local",
2053
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2054
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
173
+ else {
174
+ this.filesInProgress.set(name, "inprogress");
2055
175
  }
2056
- }
2057
- }
2058
- }, {
2059
- "method": "duetState",
2060
- "name": "duetState",
2061
- "bubbles": false,
2062
- "cancelable": true,
2063
- "composed": true,
2064
- "docs": {
2065
- "tags": [],
2066
- "text": "Emitted when the current validation state changes internally"
2067
- },
2068
- "complexType": {
2069
- "original": "DuetUploadEvent",
2070
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2071
- "references": {
2072
- "DuetUploadEvent": {
2073
- "location": "local",
2074
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2075
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
176
+ if (this.filesInProgress.size === 0) {
177
+ this.onDone();
2076
178
  }
2077
- }
2078
- }
2079
- }, {
2080
- "method": "duetDelete",
2081
- "name": "duetDelete",
2082
- "bubbles": false,
2083
- "cancelable": true,
2084
- "composed": true,
2085
- "docs": {
2086
- "tags": [],
2087
- "text": "Emitted when a user clicks delete to delete an uploaded file, or a file entry with error"
2088
- },
2089
- "complexType": {
2090
- "original": "DuetUploadEvent",
2091
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2092
- "references": {
2093
- "DuetUploadEvent": {
2094
- "location": "local",
2095
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2096
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
179
+ };
180
+ this.getFilesAsArray = () => {
181
+ const filesInQueue = [];
182
+ const filesInError = [];
183
+ this.files.forEach(value => {
184
+ if (value.valid && !value.deleted) {
185
+ filesInQueue.push(value);
186
+ }
187
+ else if (!value.valid && !value.deleted) {
188
+ filesInError.push(value);
189
+ }
190
+ });
191
+ return { valid: filesInQueue, invalid: filesInError };
192
+ };
193
+ this.resetFormFields = () => {
194
+ /**
195
+ * You cannot modify a FileList, nor remove single items from it
196
+ * This completely removes all items in the FileList
197
+ * We reset the form fields to always be able to re-upload files
198
+ * and because we handle all uploads and states internally in the component (not relying on native form elements)
199
+ */
200
+ /* TODO: it may be a good idea to just update the list so that this always matches what is in the files map,
201
+ * TODO: this would remove the capability of Re-uploading, unless we can catch and remove the user file from the form filelist before the upload is canceled by the browser
202
+ * TODO: but for now we'll just reset the form fields
203
+ */
204
+ this.nativeInput.value = "";
205
+ };
206
+ this.startUpload = async (ev, metaData = undefined) => {
207
+ // validate that we haven't hit any maxfiles or maxbytes limits before we upload
208
+ const { bytesMaxReached, fileMaxReached } = this.validateTotals();
209
+ if (bytesMaxReached || fileMaxReached) {
210
+ this.kick();
211
+ return;
2097
212
  }
2098
- }
2099
- }
2100
- }, {
2101
- "method": "duetCancel",
2102
- "name": "duetCancel",
2103
- "bubbles": false,
2104
- "cancelable": true,
2105
- "composed": true,
2106
- "docs": {
2107
- "tags": [],
2108
- "text": "Emitted when a user clicks cancel on an upload in progress"
2109
- },
2110
- "complexType": {
2111
- "original": "DuetUploadEvent",
2112
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2113
- "references": {
2114
- "DuetUploadEvent": {
2115
- "location": "local",
2116
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2117
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
213
+ this.metaData = metaData;
214
+ this.nativeInput.click();
215
+ this.onUpload(ev, metaData);
216
+ ev.stopPropagation();
217
+ ev.preventDefault();
218
+ return;
219
+ };
220
+ /**
221
+ * Eventlisteners for the XHR requests
222
+ */
223
+ this.transferComplete = name => {
224
+ this.updateValueInMap(name, "progress", 100, false);
225
+ this.trackProgress(name, true);
226
+ };
227
+ this.transferDone = (xhr, name, status) => {
228
+ this.updateValueInMap(name, "status", status, false);
229
+ this.updateValueInMap(name, "uploaded", true, false);
230
+ try {
231
+ const response = JSON.parse(xhr.response);
232
+ this.updateValueInMap(name, "url", response.url);
2118
233
  }
2119
- }
2120
- }
2121
- }, {
2122
- "method": "duetProgress",
2123
- "name": "duetProgress",
2124
- "bubbles": false,
2125
- "cancelable": true,
2126
- "composed": true,
2127
- "docs": {
2128
- "tags": [],
2129
- "text": "Emitted when the file progress is updated."
2130
- },
2131
- "complexType": {
2132
- "original": "DuetUploadEvent",
2133
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2134
- "references": {
2135
- "DuetUploadEvent": {
2136
- "location": "local",
2137
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2138
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
234
+ catch (e) {
235
+ this.updateValueInMap(name, "url", null);
236
+ console.error("Server did not respond with expected response {url: string}");
2139
237
  }
2140
- }
2141
- }
2142
- }, {
2143
- "method": "duetUpload",
2144
- "name": "duetUpload",
2145
- "bubbles": false,
2146
- "cancelable": true,
2147
- "composed": true,
2148
- "docs": {
2149
- "tags": [],
2150
- "text": "Emitted when the user clicks the upload button"
2151
- },
2152
- "complexType": {
2153
- "original": "DuetUploadEvent",
2154
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2155
- "references": {
2156
- "DuetUploadEvent": {
2157
- "location": "local",
2158
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2159
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
238
+ return;
239
+ };
240
+ this.transferDoneWithFailure = (xhr, name, status) => {
241
+ try {
242
+ const { error } = JSON.parse(xhr.response);
243
+ this.updateValueInMap(name, "error", { message: error.message, type: error.type }, false);
2160
244
  }
2161
- }
2162
- }
2163
- }, {
2164
- "method": "linkClick",
2165
- "name": "linkClick",
2166
- "bubbles": false,
2167
- "cancelable": true,
2168
- "composed": true,
2169
- "docs": {
2170
- "tags": [],
2171
- "text": "Emitted when the user clicks the uploaded file link and link-click-event prop is set to true"
2172
- },
2173
- "complexType": {
2174
- "original": "DuetUploadEvent",
2175
- "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2176
- "references": {
2177
- "DuetUploadEvent": {
2178
- "location": "local",
2179
- "path": "/Users/laaksju3/duetds/packages/components/src/components/duet-upload/duet-upload.tsx",
2180
- "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
245
+ catch (e) {
246
+ console.error("Server did not respond with expected response error:{message: string, type: int}");
247
+ this.updateValueInMap(name, "error", { type: status }, false);
2181
248
  }
2182
- }
2183
- }
2184
- }];
2185
- }
2186
- static get methods() {
2187
- return {
2188
- "setFocus": {
2189
- "complexType": {
2190
- "signature": "(options?: FocusOptions) => Promise<void>",
2191
- "parameters": [{
2192
- "tags": [],
2193
- "text": ""
2194
- }],
2195
- "references": {
2196
- "Promise": {
2197
- "location": "global",
2198
- "id": "global::Promise"
2199
- },
2200
- "FocusOptions": {
2201
- "location": "global",
2202
- "id": "global::FocusOptions"
249
+ this.updateValueInMap(name, "valid", false, true);
250
+ };
251
+ this.transferFailed = name => {
252
+ this.updateValueInMap(name, "error", getI18nError("duet-upload-001", this.errorCodes));
253
+ };
254
+ this.transferCanceled = name => {
255
+ this.files.delete(name);
256
+ this.validateTotals(name);
257
+ this.kick();
258
+ };
259
+ this.validateTotals = (name) => {
260
+ const isTotalSizeOverMaxSize = validateTotalSizeIsAboveMax(this.files, this.maxBytesTotal);
261
+ const isTotalFileAmountAboveMax = validateTotalAmountIsAboveMax(this.files, this.maxFiles);
262
+ if (isTotalSizeOverMaxSize && name) {
263
+ this.updateValueInMap(name, "error", getI18nError("duet-upload-202", this.errorCodes), false);
2203
264
  }
2204
- },
2205
- "return": "Promise<void>"
2206
- },
2207
- "docs": {
2208
- "text": "Sets focus on the specified `duet-input`. Use this method instead of the global\n`input.focus()`.",
2209
- "tags": []
2210
- }
2211
- },
2212
- "upload": {
2213
- "complexType": {
2214
- "signature": "(metaData?: any | undefined) => Promise<void>",
2215
- "parameters": [{
2216
- "tags": [],
2217
- "text": ""
2218
- }],
2219
- "references": {
2220
- "Promise": {
2221
- "location": "global",
2222
- "id": "global::Promise"
265
+ if (isTotalFileAmountAboveMax && name) {
266
+ this.updateValueInMap(name, "error", getI18nError("duet-upload-301", this.errorCodes), false);
2223
267
  }
2224
- },
2225
- "return": "Promise<void>"
2226
- },
2227
- "docs": {
2228
- "text": "Method for invoking the upload sequence",
2229
- "tags": []
2230
- }
2231
- },
2232
- "uploadPending": {
2233
- "complexType": {
2234
- "signature": "() => Promise<void>",
2235
- "parameters": [],
2236
- "references": {
2237
- "Promise": {
2238
- "location": "global",
2239
- "id": "global::Promise"
268
+ this.bytesMaxReached = isTotalSizeOverMaxSize;
269
+ this.fileMaxReached = isTotalFileAmountAboveMax;
270
+ return {
271
+ bytesMaxReached: isTotalSizeOverMaxSize,
272
+ fileMaxReached: isTotalFileAmountAboveMax,
273
+ };
274
+ };
275
+ this.uploadFile = async (fileListItem, force = false, key) => {
276
+ if (!force && this.deferUpload) {
277
+ this.updateValueInMap(fileListItem.item.name, "pending", true, false);
278
+ this.updateValueInMap(fileListItem.item.name, "group", "pending", true);
2240
279
  }
2241
- },
2242
- "return": "Promise<void>"
2243
- },
2244
- "docs": {
2245
- "text": "Method for uploading pending files",
2246
- "tags": []
2247
- }
2248
- },
2249
- "refresh": {
2250
- "complexType": {
2251
- "signature": "() => Promise<void>",
2252
- "parameters": [],
2253
- "references": {
2254
- "Promise": {
2255
- "location": "global",
2256
- "id": "global::Promise"
280
+ else if (force) {
281
+ this.updateValueInMap(fileListItem.item.name, "pending", false, false);
282
+ this.updateValueInMap(fileListItem.item.name, "group", undefined, true);
283
+ }
284
+ try {
285
+ if (!this.deferUpload || force) {
286
+ // if all is well AND external file upload handling has not been set, start upload
287
+ const data = new FormData();
288
+ data.append("file", fileListItem.item);
289
+ if (key) {
290
+ data.append("key", key);
291
+ }
292
+ data.append("uid", fileListItem.uid);
293
+ data.append("name", fileListItem.item.name);
294
+ data.append("metadata", JSON.stringify({
295
+ uid: fileListItem.uid,
296
+ url: this.uri,
297
+ size: fileListItem.item.size,
298
+ meta: fileListItem.meta,
299
+ }));
300
+ fileListItem.xhr = await this.makeXHRPostRequest(data);
301
+ }
2257
302
  }
2258
- },
2259
- "return": "Promise<void>"
2260
- },
2261
- "docs": {
2262
- "text": "Method for forcing a render of the upload list, element.files can be changed externally\nBut it will only rerender on a new Map or a top Level change - this can be used to update\nthe tabular data if the automatic re-render is no sufficient",
2263
- "tags": []
303
+ catch (e) {
304
+ // in case one of the global maxes have been reached, invalidate the file
305
+ this.updateValueInMap(fileListItem.item.name, "valid", false, false);
306
+ }
307
+ };
308
+ this.uploadPendingFiles = () => {
309
+ for (const [key, value] of Array.from(this.files.entries())) {
310
+ if (value.group === "pending" && value.pending === true) {
311
+ this.uploadFile(value, true, key);
312
+ }
313
+ }
314
+ };
315
+ this.getItemFromUID = (uid) => {
316
+ for (const [key, value] of Array.from(this.files.entries())) {
317
+ if (value.uid === uid) {
318
+ return { value, key };
319
+ }
320
+ }
321
+ return null;
322
+ };
323
+ this.handleExternalUploadButton = (bytesMaxReached, fileMaxReached) => {
324
+ if (this.externalUploadButton) {
325
+ if (bytesMaxReached || fileMaxReached) {
326
+ this.externalUploadButton.disabled = true;
327
+ }
328
+ else {
329
+ this.externalUploadButton.disabled = false;
330
+ }
331
+ }
332
+ };
333
+ this.onDelete = (key, ev) => {
334
+ const item = this.getItemFromUID(key);
335
+ const retrievedKey = item.key;
336
+ const deletedItem = this.files.get(retrievedKey);
337
+ this.files.delete(retrievedKey);
338
+ const { bytesMaxReached, fileMaxReached } = this.validateTotals();
339
+ this.handleExternalUploadButton(bytesMaxReached, fileMaxReached);
340
+ this.kick();
341
+ this.duetDelete.emit({
342
+ originalEvent: ev,
343
+ data: { deletion: deletedItem },
344
+ component: "duet-upload",
345
+ });
346
+ // don't send a xhr request if the item was pending, just remove it from the list
347
+ if (!this.external && !deletedItem.pending) {
348
+ this.makeXHRDeleteRequest(deletedItem);
349
+ }
350
+ this.resetFormFields();
351
+ };
352
+ this.onCancel = (key, ev) => {
353
+ const retrievedKey = this.getItemFromUID(key).key;
354
+ const cancelledItem = this.files.get(retrievedKey);
355
+ this.files.delete(retrievedKey);
356
+ const { bytesMaxReached, fileMaxReached } = this.validateTotals();
357
+ this.handleExternalUploadButton(bytesMaxReached, fileMaxReached);
358
+ if (!this.external) {
359
+ const { xhr } = cancelledItem;
360
+ if (xhr) {
361
+ xhr.abort();
362
+ }
363
+ }
364
+ this.kick();
365
+ this.resetFormFields();
366
+ this.duetCancel.emit({
367
+ originalEvent: ev,
368
+ data: { cancelled: cancelledItem },
369
+ component: "duet-upload",
370
+ });
371
+ };
372
+ this.onUpload = (ev, metaData) => {
373
+ this.duetUpload.emit({
374
+ originalEvent: ev,
375
+ metaData,
376
+ component: "duet-upload",
377
+ });
378
+ };
379
+ this.onBlur = (ev) => {
380
+ this.duetBlur.emit({
381
+ originalEvent: ev,
382
+ component: "duet-upload",
383
+ });
384
+ };
385
+ this.onProgress = (key, percentComplete, ev) => {
386
+ this.duetChange.emit({
387
+ originalEvent: ev,
388
+ data: {
389
+ key,
390
+ percentComplete,
391
+ },
392
+ component: "duet-upload",
393
+ });
394
+ };
395
+ this.onFocus = (ev) => {
396
+ this.duetFocus.emit({
397
+ originalEvent: ev,
398
+ component: "duet-upload",
399
+ });
400
+ };
401
+ this.onReady = () => {
402
+ this.duetReady.emit({
403
+ component: "duet-upload",
404
+ });
405
+ };
406
+ this.onDone = () => {
407
+ this.duetDone.emit({
408
+ component: "duet-upload",
409
+ data: { files: this.files },
410
+ });
411
+ };
412
+ /**
413
+ * @description This functions return sorted map items byg condition which are:
414
+ */
415
+ this.filterMap = () => {
416
+ const all = Array.from(this.files.values());
417
+ const inprogress = [];
418
+ const failure = [];
419
+ const pending = [];
420
+ const success = [];
421
+ let hasCategory = false;
422
+ all.forEach(data => {
423
+ const group = this.getGroupFromItemData(data);
424
+ // const item = mapFn(data, group)
425
+ // const category = <UploadCategory meta={data.meta} />
426
+ // const categories = data.meta?.badges?.join(",")
427
+ if (data.meta && !!data.meta.badges) {
428
+ hasCategory = true;
429
+ }
430
+ if (group === this.DefaultGroups.success) {
431
+ success.push({
432
+ uid: data.uid,
433
+ data,
434
+ });
435
+ }
436
+ else if (group === this.DefaultGroups.inprogress) {
437
+ inprogress.push({
438
+ uid: data.uid,
439
+ data,
440
+ });
441
+ }
442
+ else if (group === this.DefaultGroups.pending) {
443
+ pending.push({
444
+ uid: data.uid,
445
+ data,
446
+ });
447
+ }
448
+ else if (group === this.DefaultGroups.failure) {
449
+ failure.push({
450
+ uid: data.uid,
451
+ data,
452
+ });
453
+ }
454
+ else if (data.group) {
455
+ inprogress.push({
456
+ uid: data.uid,
457
+ data,
458
+ });
459
+ }
460
+ });
461
+ return {
462
+ pending,
463
+ failure,
464
+ success,
465
+ inprogress,
466
+ hasCategory,
467
+ };
468
+ };
469
+ this.getActions = (id, actions) => {
470
+ return actions.filter(item => item.map.includes(id));
471
+ };
472
+ this.renderUploadedItems = () => {
473
+ this.itemRefs.clear();
474
+ const filteredItems = this.filterMap();
475
+ const hasCategory = filteredItems.hasCategory;
476
+ const filteredActions = this.hideCancelButton
477
+ ? this.actions.filter(action => action.name !== "cancel")
478
+ : this.actions;
479
+ const ItemRows = this.groups.map(group => {
480
+ const currentItems = filteredItems[group.id];
481
+ if (!(currentItems === null || currentItems === void 0 ? void 0 : currentItems.length)) {
482
+ return;
483
+ }
484
+ return (h(Fragment, null, !this.hideGroups && (h(UploadItemHeader, { categoryLabel: hasCategory ? this.categoryLabel : undefined, label: group.label })), currentItems.map(item => this.mapFilesToUploadItems(item.data, group.id, hasCategory, filteredActions))));
485
+ });
486
+ return (h(Fragment, null, this.showUploadedItemsHeader && (h(UploadItemHeader, { categoryLabel: hasCategory ? this.categoryLabel : undefined, label: this.uploadedItemsHeaderLabel })), ItemRows));
487
+ };
488
+ this.tick = Date.now();
489
+ this.accessibleActiveDescendant = undefined;
490
+ this.accessibleDescribedBy = undefined;
491
+ this.accessibleControls = undefined;
492
+ this.accessibleOwns = undefined;
493
+ this.external = false;
494
+ this.middleware = null;
495
+ this.deferUpload = false;
496
+ this.hideButton = false;
497
+ this.actions = [
498
+ {
499
+ icon: "action-delete",
500
+ color: "color-danger",
501
+ size: "x-small",
502
+ background: "gray-lightest",
503
+ name: "delete",
504
+ map: ["success", "failure"],
505
+ label: {
506
+ fi: "Poista tiedosto",
507
+ en: "Delete the file",
508
+ sv: "Ta bort filen",
509
+ },
510
+ },
511
+ {
512
+ icon: "navigation-close",
513
+ color: "primary",
514
+ size: "x-small",
515
+ background: "gray-lightest",
516
+ name: "cancel",
517
+ map: ["inprogress", "pending"],
518
+ label: {
519
+ fi: "Keskeytä lähetys",
520
+ en: "Cancel the upload",
521
+ sv: "Stop överföringen",
522
+ },
523
+ },
524
+ ];
525
+ this.uri = undefined;
526
+ this.showLinks = false;
527
+ this.caption = undefined;
528
+ this.statusLabelDefaults = {
529
+ fi: {
530
+ inProgress: "Lähetetään {filesUploaded}, yhteensä lähetettävänä {filesTotal}.",
531
+ inProgressWithErrors: "Lähetetään {filesInProgress}, lähetetty {filesUploaded}, yhteensä lähetettävänä {filesTotal}, {filesWithErrors} epäonnistui",
532
+ done: "Lähetys valmis, {filesTotal} lisätty onnistuneesti",
533
+ doneWithErrors: "Lähetys valmis, {filesUploaded} lisätty onnistuneesti, {filesWithErrors} epäonnistui",
534
+ files: "tiedostoa",
535
+ file: "tiedosto",
536
+ },
537
+ sv: {
538
+ inProgress: "Laddar upp {filesUploaded} av {filesTotal}",
539
+ inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
540
+ done: "Uppladdningen slutförd, {filesTotal} har lagts till",
541
+ doneWithErrors: "Uppladdningen slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
542
+ files: "filer",
543
+ file: "fil",
544
+ },
545
+ en: {
546
+ inProgress: "Uploading {filesUploaded} of {filesTotal}",
547
+ inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
548
+ done: "Upload completed, {filesTotal} added successfully",
549
+ doneWithErrors: "Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.",
550
+ files: "files",
551
+ file: "file",
552
+ },
553
+ };
554
+ this.statusMessageLabel = getLocaleString(this.statusLabelDefaults);
555
+ this.buttonLabelDefaults = {
556
+ fi: "Lisää liite",
557
+ sv: "Lägg till en bilaga",
558
+ en: "Add an attachment",
559
+ };
560
+ this.buttonLabel = getLocaleString(this.buttonLabelDefaults);
561
+ this.accessibleButtonLabel = undefined;
562
+ this.theme = "";
563
+ this.disabled = false;
564
+ this.identifier = undefined;
565
+ this.margin = "auto";
566
+ this.required = false;
567
+ this.alignment = "middle";
568
+ this.hideGroups = false;
569
+ this.files = new Map();
570
+ this.valid = !this.required;
571
+ this.labelDefaults = {
572
+ fi: "Lisää liite",
573
+ sv: "Lägg till en bilaga",
574
+ en: "Add attachments",
575
+ };
576
+ this.label = getLocaleString(this.labelDefaults);
577
+ this.descriptionDefaults = {
578
+ en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.",
579
+ sv: "Du kan bifoga följande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer åt gången, och lägga till upp till {maxfiles} bilagor åt gången varje inte större än {maxbytes}.",
580
+ fi: "Voit liittää seuraavat tiedostotyypit: {filetypes} - sekä yleisimmät videotiedostot. Voit lähettää {maxbytestotal} tiedostoa kerrallaan, ja lisätä enintään {maxfiles} liitettä kerrallaan, jokainen enintään {maxbytes} kokoisena.",
581
+ };
582
+ this.description = getLocaleString(this.descriptionDefaults);
583
+ this.fileListEmptyDefaults = {
584
+ fi: "Ei vielä lisättyjä tiedostoja.",
585
+ sv: "Inga filer har lagts till ännu.",
586
+ en: "No files added yet.",
587
+ };
588
+ this.fileListEmpty = getLocaleString(this.fileListEmptyDefaults);
589
+ this.error = "";
590
+ this.errorCodes = errorCodes;
591
+ this.name = undefined;
592
+ this.maxBytes = 200000000;
593
+ this.maxBytesTotal = undefined;
594
+ this.maxFiles = 99;
595
+ this.allowedExtensions = "all";
596
+ this.allowedMimetypes = "";
597
+ this.multiple = true;
598
+ this.limitSelection = false;
599
+ this.hideCancelButton = false;
600
+ this.value = undefined;
601
+ this.externalUploadButtonId = undefined;
602
+ this.captionOnBottom = false;
603
+ this.showUploadedItemsHeader = false;
604
+ this.uploadedItemsHeaderLabel = {
605
+ fi: "Ladattu tiedosto",
606
+ sv: "Lägg till en bilaga",
607
+ en: "Uploaded file",
608
+ };
609
+ this.headerHeadingLevel = "h3";
610
+ this.hideHeader = false;
611
+ this.emitEvent = false;
612
+ this.groups = [
613
+ {
614
+ id: this.DefaultGroups.success,
615
+ label: {
616
+ fi: "Valmiit tiedostot",
617
+ sv: "Files success",
618
+ en: "Files success",
619
+ },
620
+ },
621
+ {
622
+ id: this.DefaultGroups.failure,
623
+ label: {
624
+ fi: "Tiedostot, joissa on virheitä",
625
+ sv: "Filer med fel",
626
+ en: "Files with errors",
627
+ },
628
+ },
629
+ {
630
+ id: this.DefaultGroups.inprogress,
631
+ label: {
632
+ fi: "Kesken olevat tiedostot",
633
+ sv: "Filer inprogress",
634
+ en: "Files inprogress",
635
+ },
636
+ },
637
+ {
638
+ id: this.DefaultGroups.pending,
639
+ label: {
640
+ en: "Files to upload",
641
+ sv: "Filer att ladda",
642
+ fi: "Ladattavat tiedostot",
643
+ },
644
+ },
645
+ ];
646
+ }
647
+ watchValidHandler(newValue, oldValue) {
648
+ if (newValue !== oldValue) {
649
+ this.kick();
650
+ }
651
+ }
652
+ /**
653
+ * Component lifecycle events.
654
+ */
655
+ componentWillLoad() {
656
+ if (typeof this.statusMessageLabel === "string") {
657
+ this.internalStatusMessageLabel = sanitizeString(this.groups);
658
+ }
659
+ else {
660
+ this.internalStatusMessageLabel = this.statusMessageLabel;
661
+ }
662
+ inheritGlobalTheme(this);
663
+ this.listenForActionEvents();
664
+ this.onReady();
665
+ this.externalUploadButton = document.querySelector(`#${this.externalUploadButtonId}`);
666
+ }
667
+ componentWillRender() {
668
+ // listen to the events from the component
669
+ this.verifyValidity();
670
+ }
671
+ /**
672
+ * Sets focus on the specified `duet-input`. Use this method instead of the global
673
+ * `input.focus()`.
674
+ */
675
+ async setFocus(options) {
676
+ if (this.nativeInput) {
677
+ this.nativeInput.focus(options);
2264
678
  }
2265
- },
2266
- "getFiles": {
2267
- "complexType": {
2268
- "signature": "() => Promise<false | { valid: any[]; invalid: any[]; }>",
2269
- "parameters": [],
2270
- "references": {
2271
- "Promise": {
2272
- "location": "global",
2273
- "id": "global::Promise"
679
+ return;
680
+ }
681
+ /**
682
+ * Method for invoking the upload sequence
683
+ */
684
+ async upload(metaData = undefined) {
685
+ // validate that we haven't hit any maxfiles or maxbytes limits before we upload
686
+ const { bytesMaxReached, fileMaxReached } = this.validateTotals();
687
+ if (bytesMaxReached || fileMaxReached) {
688
+ this.handleExternalUploadButton(bytesMaxReached, fileMaxReached);
689
+ this.kick();
690
+ return;
691
+ }
692
+ this.metaData = metaData;
693
+ this.nativeInput.click();
694
+ return;
695
+ }
696
+ /**
697
+ * Method for uploading pending files
698
+ */
699
+ async uploadPending() {
700
+ this.uploadPendingFiles();
701
+ }
702
+ /**
703
+ * Method for forcing a render of the upload list, element.files can be changed externally
704
+ * But it will only rerender on a new Map or a top Level change - this can be used to update
705
+ * the tabular data if the automatic re-render is no sufficient
706
+ */
707
+ async refresh() {
708
+ this.kick();
709
+ await this.setFocus();
710
+ }
711
+ /**
712
+ * Get list of files, divided in errors and valid sections
713
+ */
714
+ async getFiles() {
715
+ if (!this.files || this.files.size === 0) {
716
+ return false;
717
+ }
718
+ return this.getFilesAsArray();
719
+ }
720
+ /**
721
+ * Convenience method for updating the value of a key:value inside an item in the files attribute
722
+ */
723
+ async updateValue(item, key, value) {
724
+ this.updateValueInMap(item, key, value);
725
+ }
726
+ /**
727
+ * focusActionButton.
728
+ */
729
+ async focusActionButton(uid) {
730
+ var _a;
731
+ await ((_a = this.itemRefs.get(uid)) === null || _a === void 0 ? void 0 : _a.focusActionButton());
732
+ }
733
+ /**
734
+ * render() function
735
+ * Always the last one in the class.
736
+ */
737
+ render() {
738
+ const identifier = this.identifier || this.uploadId;
739
+ const maxMegaBytesTotal = Math.round((this.maxBytesTotal ? this.maxBytesTotal : this.maxBytes * this.maxFiles) / 1024 / 1024);
740
+ const maxMegaBytesPrFile = Math.round(this.maxBytes / 1024 / 1024);
741
+ let caption = this.description.replace(/{maxfiles}/g, this.maxFiles.toString());
742
+ caption = caption.replace(/{maxbytes}/g, `${maxMegaBytesPrFile.toString()} MB`);
743
+ caption = caption.replace(/{maxbytestotal}/g, `${maxMegaBytesTotal.toString()} MB`);
744
+ caption = caption.replace(/{filetypes}/g, this.allowedExtensions.split(",").join(", "));
745
+ if (this.externalUploadButton) {
746
+ this.externalUploadButton.accessibleLabel = caption;
747
+ }
748
+ // @ts-ignore
749
+ return (h(Host, { class: { "duet-m-0": this.margin === "none" } }, h("duet-fieldset", { "label-heading-level": this.headerHeadingLevel, "label-hidden": this.hideHeader, label: this.label, caption: !this.captionOnBottom ? caption : undefined }, h("slot", { name: "header" }), !this.files.size && (h("duet-empty-state", { id: this.labelId, part: this.identifier ? `${this.identifier}-empty-state` : "duet-upload-empty-state", icon: "messaging-attachment" }, h("duet-paragraph", { margin: "none" }, this.fileListEmpty))), !!this.files.size && h("slot", { name: "fileheader" }), !!this.files.size && (h("duet-upload-aria-status", { invalid: this.getFilesAsArray().invalid.length, valid: this.getFilesAsArray().valid.length, inprogress: this.filesInProgress.size, total: this.files.size, statusMessageLabel: this.internalStatusMessageLabel })), !!this.files.size && this.renderUploadedItems(), !!this.files.size && h("slot", { name: "filefooter" }), h("slot", { name: "uploadfooter" }), this.captionOnBottom && (h("duet-caption", { margin: "none", size: "small" }, h("div", { class: "upload-bottom-caption" }, caption))), h("slot", { name: "afterfooter" }), !this.hideButton && (h(Fragment, null, h("duet-spacer", { size: "large" }), h("duet-button", { id: this.buttonId, onClick: this.startUpload, "accessible-controls": identifier, disabled: this.fileMaxReached, "accessible-label": this.accessibleButtonLabel, "accessible-owns": identifier, size: "small", variation: "secondary", fixed: true, icon: "action-add-circle", part: this.identifier ? `${this.identifier}-button-upload` : "duet-upload-button-upload" }, this.buttonLabel))), (this.fileMaxReached ||
750
+ this.bytesMaxReached ||
751
+ this.filesToUploadExceedsLimit ||
752
+ this.filesToUploadTotalSizeIsAboveMax) && (h(Fragment, null, h("duet-spacer", { size: "medium" }), h("duet-alert", { part: this.identifier ? `${this.identifier}-error-notification` : "duet-upload-error-notification" }, this.fileMaxReached && getI18nError("duet-upload-301", this.errorCodes), this.bytesMaxReached && getI18nError("duet-upload-202", this.errorCodes), this.filesToUploadExceedsLimit && getI18nError("duet-upload-302", this.errorCodes), this.filesToUploadTotalSizeIsAboveMax && getI18nError("duet-upload-203", this.errorCodes)))), h("duet-visually-hidden", { "aria-hidden": "true" }, h("input", { ref: input => {
753
+ this.nativeInput = input;
754
+ }, accept: !this.limitSelection ? undefined : `${this.allowedMimetypes},${this.allowedExtensions}`, onBlur: this.onBlur, onFocus: this.onFocus, onChange: e => this.onChange(e), type: "file", class: {
755
+ "duet-upload": true,
756
+ }, disabled: this.disabled, "aria-hidden": "true", required: this.required, name: this.name, id: this.identifier, multiple: this.multiple, tabIndex: -1 })))));
757
+ }
758
+ /**
759
+ * XHR request utilities
760
+ */
761
+ makeXHRPostRequest(data) {
762
+ const xhr = new XMLHttpRequest();
763
+ const name = data.get("name");
764
+ xhr.upload.addEventListener("progress", ev => {
765
+ this.updateProgress(ev, name);
766
+ });
767
+ xhr.upload.addEventListener("load", () => {
768
+ this.transferComplete(name);
769
+ });
770
+ xhr.upload.addEventListener("error", () => {
771
+ this.transferFailed(name);
772
+ });
773
+ xhr.upload.addEventListener("abort", () => {
774
+ this.transferCanceled(name);
775
+ });
776
+ let options = {
777
+ payload: { data, name },
778
+ options: { type: "POST", uri: this.uri, xhr, argument: null, headers: undefined },
779
+ onFailure: this.transferDoneWithFailure,
780
+ onSuccess: this.transferDone,
781
+ onProgress: this.trackProgress,
782
+ };
783
+ if (this.middleware) {
784
+ options = this.middleware(options);
785
+ }
786
+ return makeXhrRequest(options);
787
+ }
788
+ makeXHRDeleteRequest(data) {
789
+ const { uid, item } = data;
790
+ const xhr = new XMLHttpRequest();
791
+ const headers = {
792
+ "x-fileuid": uid,
793
+ "x-filename": item.name,
794
+ };
795
+ let options = {
796
+ payload: { data: null, name },
797
+ options: {
798
+ type: "DELETE",
799
+ xhr,
800
+ uri: this.uri,
801
+ argument: `?key=${uid}&name=${item.name}`,
802
+ headers,
803
+ },
804
+ onFailure: this.transferDoneWithFailure,
805
+ onSuccess: this.transferDone,
806
+ onProgress: this.trackProgress,
807
+ };
808
+ if (this.middleware) {
809
+ options = this.middleware(options);
810
+ }
811
+ // don't present server issues to user on deletes, just remove them from the visible list
812
+ return makeXhrRequest(options);
813
+ }
814
+ /**
815
+ * Component event handling.
816
+ */
817
+ async onChange(ev) {
818
+ var _a;
819
+ const selectedFiles = Array.from((_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files);
820
+ // FileList is a nice array like structure but
821
+ // to ensure uniqueness of files we use a mapping structure and
822
+ // key to the name (makes it easier to delete as well)
823
+ this.filesToUploadExceedsLimit = false;
824
+ if (filesToUploadCountAboveMax(this.files.size, selectedFiles.length, this.maxFiles)) {
825
+ this.filesToUploadExceedsLimit = true;
826
+ this.kick();
827
+ return;
828
+ }
829
+ this.filesToUploadTotalSizeIsAboveMax = false;
830
+ if (filesToUploadTotalSizeIsAboveMax(this.files, selectedFiles, this.maxBytesTotal)) {
831
+ this.filesToUploadTotalSizeIsAboveMax = true;
832
+ this.kick();
833
+ return;
834
+ }
835
+ if (selectedFiles) {
836
+ for (const item of selectedFiles) {
837
+ const { valid, errorMessage, errorType, errorSystem } = validateFile(item, {
838
+ maxBytes: this.maxBytes,
839
+ allowedExtensions: this.allowedExtensions,
840
+ allowedMimetypes: this.allowedMimetypes,
841
+ }, this.errorCodes);
842
+ const uid = this.genHashName();
843
+ const fileListItem = {
844
+ uid,
845
+ item: item,
846
+ size: item.size,
847
+ meta: this.metaData,
848
+ uploaded: false,
849
+ valid,
850
+ error: {
851
+ type: valid ? undefined : errorType,
852
+ message: valid ? undefined : errorMessage,
853
+ system_message: valid ? undefined : errorSystem,
854
+ },
855
+ progress: 0,
856
+ deleted: false,
857
+ xhr: false,
858
+ url: false,
859
+ };
860
+ this.files.set(item.name, fileListItem);
861
+ if (valid && !this.external) {
862
+ await this.uploadFile(fileListItem);
863
+ }
864
+ else if (valid && this.external) {
865
+ this.updateValueInMap(fileListItem.item.name, "pending", true, false);
866
+ this.updateValueInMap(fileListItem.item.name, "group", "pending", true);
867
+ }
868
+ else if (!valid) {
869
+ this.updateValueInMap(item.name, "valid", false, true);
870
+ }
871
+ // kick the stat to force update
872
+ this.kick();
2274
873
  }
2275
- },
2276
- "return": "Promise<false | { valid: any[]; invalid: any[]; }>"
2277
- },
2278
- "docs": {
2279
- "text": "Get list of files, divided in errors and valid sections",
2280
- "tags": []
2281
874
  }
2282
- },
2283
- "updateValue": {
2284
- "complexType": {
2285
- "signature": "(item: string, key: string, value: any) => Promise<void>",
2286
- "parameters": [{
2287
- "tags": [],
2288
- "text": ""
875
+ // reset the form, so that a user may upload a file again (with the same name)
876
+ this.resetFormFields();
877
+ // reset the internal metaData state
878
+ this.metaData = undefined;
879
+ this.duetChange.emit({
880
+ originalEvent: ev,
881
+ data: { files: this.files },
882
+ component: "duet-upload",
883
+ });
884
+ }
885
+ static get is() { return "duet-upload"; }
886
+ static get encapsulation() { return "shadow"; }
887
+ static get originalStyleUrls() {
888
+ return {
889
+ "$": ["duet-upload.scss"]
890
+ };
891
+ }
892
+ static get styleUrls() {
893
+ return {
894
+ "$": ["duet-upload.css"]
895
+ };
896
+ }
897
+ static get properties() {
898
+ return {
899
+ "accessibleActiveDescendant": {
900
+ "type": "string",
901
+ "mutable": false,
902
+ "complexType": {
903
+ "original": "string",
904
+ "resolved": "string",
905
+ "references": {}
906
+ },
907
+ "required": false,
908
+ "optional": false,
909
+ "docs": {
910
+ "tags": [],
911
+ "text": "Indicates the id of a related component\u2019s visually focused element."
912
+ },
913
+ "attribute": "accessible-active-descendant",
914
+ "reflect": false
915
+ },
916
+ "accessibleDescribedBy": {
917
+ "type": "string",
918
+ "mutable": false,
919
+ "complexType": {
920
+ "original": "string",
921
+ "resolved": "string",
922
+ "references": {}
923
+ },
924
+ "required": false,
925
+ "optional": false,
926
+ "docs": {
927
+ "tags": [],
928
+ "text": "Indicates the id of a component that describes the upload component."
929
+ },
930
+ "attribute": "accessible-described-by",
931
+ "reflect": false
932
+ },
933
+ "accessibleControls": {
934
+ "type": "string",
935
+ "mutable": false,
936
+ "complexType": {
937
+ "original": "string",
938
+ "resolved": "string",
939
+ "references": {}
940
+ },
941
+ "required": false,
942
+ "optional": false,
943
+ "docs": {
944
+ "tags": [],
945
+ "text": "Use this prop to add an aria-controls attribute. Use the attribute to\nindicate the id of a component controlled by this component."
946
+ },
947
+ "attribute": "accessible-controls",
948
+ "reflect": false
949
+ },
950
+ "accessibleOwns": {
951
+ "type": "string",
952
+ "mutable": false,
953
+ "complexType": {
954
+ "original": "string",
955
+ "resolved": "string",
956
+ "references": {}
957
+ },
958
+ "required": false,
959
+ "optional": false,
960
+ "docs": {
961
+ "tags": [],
962
+ "text": "Indicates the id of a component owned by the input."
963
+ },
964
+ "attribute": "accessible-owns",
965
+ "reflect": false
966
+ },
967
+ "external": {
968
+ "type": "boolean",
969
+ "mutable": false,
970
+ "complexType": {
971
+ "original": "boolean",
972
+ "resolved": "boolean",
973
+ "references": {}
974
+ },
975
+ "required": false,
976
+ "optional": false,
977
+ "docs": {
978
+ "tags": [],
979
+ "text": "If external is set to true, the upload component will not actually upload the files, but only keep states\nit will be up to you to handle the upload and return progress information to the upload-component"
980
+ },
981
+ "attribute": "external",
982
+ "reflect": false,
983
+ "defaultValue": "false"
984
+ },
985
+ "middleware": {
986
+ "type": "unknown",
987
+ "mutable": false,
988
+ "complexType": {
989
+ "original": "XHRInternalMiddleWare",
990
+ "resolved": "(XHRMiddlewareOptions: any) => XHRMiddlewareOptions",
991
+ "references": {
992
+ "XHRInternalMiddleWare": {
993
+ "location": "local",
994
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
995
+ "id": "src/components/duet-upload/duet-upload.tsx::XHRInternalMiddleWare"
996
+ }
997
+ }
998
+ },
999
+ "required": false,
1000
+ "optional": false,
1001
+ "docs": {
1002
+ "tags": [],
1003
+ "text": "If internal upload method is used, and this has been set to a function - it will be called with the XHR options before the reqeust is sent, return an updated XHR options object in order to manipulate the request"
1004
+ },
1005
+ "defaultValue": "null"
1006
+ },
1007
+ "deferUpload": {
1008
+ "type": "boolean",
1009
+ "mutable": false,
1010
+ "complexType": {
1011
+ "original": "boolean",
1012
+ "resolved": "boolean",
1013
+ "references": {}
1014
+ },
1015
+ "required": false,
1016
+ "optional": false,
1017
+ "docs": {
1018
+ "tags": [],
1019
+ "text": "If defer-upload is true, duet-upload will not (as recommended) instantly upload files but await a call to uploadPending()"
1020
+ },
1021
+ "attribute": "defer-upload",
1022
+ "reflect": false,
1023
+ "defaultValue": "false"
1024
+ },
1025
+ "hideButton": {
1026
+ "type": "boolean",
1027
+ "mutable": false,
1028
+ "complexType": {
1029
+ "original": "boolean",
1030
+ "resolved": "boolean",
1031
+ "references": {}
1032
+ },
1033
+ "required": false,
1034
+ "optional": false,
1035
+ "docs": {
1036
+ "tags": [],
1037
+ "text": "If set the upload component will not display an upload button, you will have to create one yourself\nand call the exposed method startUpload to open the upload dialog"
1038
+ },
1039
+ "attribute": "hide-upload-button",
1040
+ "reflect": false,
1041
+ "defaultValue": "false"
1042
+ },
1043
+ "actions": {
1044
+ "type": "unknown",
1045
+ "mutable": false,
1046
+ "complexType": {
1047
+ "original": "DuetEditableTableActions",
1048
+ "resolved": "{ icon: string; color: string; background: string; size: DuetActionButtonIconSize; name: string; map?: string[]; label?: DuetLangObject; }[]",
1049
+ "references": {
1050
+ "DuetEditableTableActions": {
1051
+ "location": "import",
1052
+ "path": "../duet-editable-table/duet-editable-table",
1053
+ "id": "src/components/duet-editable-table/duet-editable-table.tsx::DuetEditableTableActions"
1054
+ }
1055
+ }
1056
+ },
1057
+ "required": false,
1058
+ "optional": false,
1059
+ "docs": {
1060
+ "tags": [],
1061
+ "text": "Default actions added to the internally used duet-editable-table"
1062
+ },
1063
+ "defaultValue": "[\n {\n icon: \"action-delete\",\n color: \"color-danger\",\n size: \"x-small\",\n background: \"gray-lightest\",\n name: \"delete\",\n map: [\"success\", \"failure\"],\n label: {\n fi: \"Poista tiedosto\",\n en: \"Delete the file\",\n sv: \"Ta bort filen\",\n },\n },\n {\n icon: \"navigation-close\",\n color: \"primary\",\n size: \"x-small\",\n background: \"gray-lightest\",\n name: \"cancel\",\n map: [\"inprogress\", \"pending\"],\n label: {\n fi: \"Keskeyt\u00E4 l\u00E4hetys\",\n en: \"Cancel the upload\",\n sv: \"Stop \u00F6verf\u00F6ringen\",\n },\n },\n ]"
1064
+ },
1065
+ "uri": {
1066
+ "type": "string",
1067
+ "mutable": false,
1068
+ "complexType": {
1069
+ "original": "string",
1070
+ "resolved": "string",
1071
+ "references": {}
1072
+ },
1073
+ "required": false,
1074
+ "optional": false,
1075
+ "docs": {
1076
+ "tags": [],
1077
+ "text": "Endpoint URI that is capable of receiving the files"
1078
+ },
1079
+ "attribute": "uri",
1080
+ "reflect": false
1081
+ },
1082
+ "showLinks": {
1083
+ "type": "boolean",
1084
+ "mutable": false,
1085
+ "complexType": {
1086
+ "original": "boolean",
1087
+ "resolved": "boolean",
1088
+ "references": {}
1089
+ },
1090
+ "required": false,
1091
+ "optional": false,
1092
+ "docs": {
1093
+ "tags": [],
1094
+ "text": "If enabled the editable-table will display links on successfully uploaded items,\nthis requires the server can respond with link URIs in the correct format\nand that the files are accessible to the user"
1095
+ },
1096
+ "attribute": "show-links",
1097
+ "reflect": false,
1098
+ "defaultValue": "false"
1099
+ },
1100
+ "caption": {
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": "Caption (underneath label) that can be set as a way of adding extra information"
1113
+ },
1114
+ "attribute": "caption",
1115
+ "reflect": false
1116
+ },
1117
+ "statusLabelDefaults": {
1118
+ "type": "string",
1119
+ "mutable": false,
1120
+ "complexType": {
1121
+ "original": "DuetLangObject | string",
1122
+ "resolved": "DuetLangObject | string",
1123
+ "references": {
1124
+ "DuetLangObject": {
1125
+ "location": "import",
1126
+ "path": "../../utils/language-utils",
1127
+ "id": "src/utils/language-utils.ts::DuetLangObject"
1128
+ }
1129
+ }
1130
+ },
1131
+ "required": false,
1132
+ "optional": false,
1133
+ "docs": {
1134
+ "tags": [{
1135
+ "name": "default",
1136
+ "text": "{\nfi: {\ninProgress: \"L\u00E4hetet\u00E4\u00E4n {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}.\",\ninProgressWithErrors:\n\"L\u00E4hetet\u00E4\u00E4n {filesInProgress}, l\u00E4hetetty {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}, {filesWithErrors} ep\u00E4onnistui\",\ndone: \"L\u00E4hetys valmis, {filesTotal} lis\u00E4tty onnistuneesti\",\ndoneWithErrors: \"L\u00E4hetys valmis, {filesUploaded} lis\u00E4tty onnistuneesti, {filesWithErrors} ep\u00E4onnistui\",\nfiles: \"tiedostoa\",\nfile: \"tiedosto\",\n},\nsv: {\ninProgress: \"Laddar upp {filesUploaded} av {filesTotal}\",\ninProgressWithErrors:\n\"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades\",\ndone: \"Uppladdningen slutf\u00F6rd, {filesTotal} har lagts till\",\ndoneWithErrors: \"Uppladdningen slutf\u00F6rd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades\",\nfiles: \"filer\",\nfile: \"fil\",\n},\nen: {\ninProgress: \"Uploading {filesUploaded} of {filesTotal}\",\ninProgressWithErrors:\n\"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed\",\ndone: \"Upload completed, {filesTotal} added successfully\",\ndoneWithErrors: \"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.\",\nfiles: \"files\",\nfile: \"file\",\n},\n}"
1137
+ }],
1138
+ "text": "Property to change the aria upload progress text read aloud by screenreaders"
1139
+ },
1140
+ "attribute": "status-label-default",
1141
+ "reflect": false,
1142
+ "defaultValue": "{\n fi: {\n inProgress: \"L\u00E4hetet\u00E4\u00E4n {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}.\",\n inProgressWithErrors:\n \"L\u00E4hetet\u00E4\u00E4n {filesInProgress}, l\u00E4hetetty {filesUploaded}, yhteens\u00E4 l\u00E4hetett\u00E4v\u00E4n\u00E4 {filesTotal}, {filesWithErrors} ep\u00E4onnistui\",\n done: \"L\u00E4hetys valmis, {filesTotal} lis\u00E4tty onnistuneesti\",\n doneWithErrors: \"L\u00E4hetys valmis, {filesUploaded} lis\u00E4tty onnistuneesti, {filesWithErrors} ep\u00E4onnistui\",\n files: \"tiedostoa\",\n file: \"tiedosto\",\n },\n sv: {\n inProgress: \"Laddar upp {filesUploaded} av {filesTotal}\",\n inProgressWithErrors:\n \"Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades\",\n done: \"Uppladdningen slutf\u00F6rd, {filesTotal} har lagts till\",\n doneWithErrors: \"Uppladdningen slutf\u00F6rd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades\",\n files: \"filer\",\n file: \"fil\",\n },\n en: {\n inProgress: \"Uploading {filesUploaded} of {filesTotal}\",\n inProgressWithErrors:\n \"Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed\",\n done: \"Upload completed, {filesTotal} added successfully\",\n doneWithErrors: \"Upload completed, {filesUploaded} added successfully, {filesWithErrors} failed.\",\n files: \"files\",\n file: \"file\",\n },\n }"
1143
+ },
1144
+ "statusMessageLabel": {
1145
+ "type": "string",
1146
+ "mutable": false,
1147
+ "complexType": {
1148
+ "original": "StatusMessage | string",
1149
+ "resolved": "string | { inProgress: string; inProgressWithErrors: string; done: string; doneWithErrors: string; file: string; files: string; }",
1150
+ "references": {
1151
+ "StatusMessage": {
1152
+ "location": "import",
1153
+ "path": "../../common-types",
1154
+ "id": "src/common-types.d.ts::StatusMessage"
1155
+ }
1156
+ }
1157
+ },
1158
+ "required": false,
1159
+ "optional": false,
1160
+ "docs": {
1161
+ "tags": [],
1162
+ "text": "Strings used for the status aria-label"
1163
+ },
1164
+ "attribute": "status-message-label",
1165
+ "reflect": false,
1166
+ "defaultValue": "getLocaleString(\n this.statusLabelDefaults\n )"
1167
+ },
1168
+ "buttonLabelDefaults": {
1169
+ "type": "string",
1170
+ "mutable": false,
1171
+ "complexType": {
1172
+ "original": "DuetLangObject | string",
1173
+ "resolved": "DuetLangObject | string",
1174
+ "references": {
1175
+ "DuetLangObject": {
1176
+ "location": "import",
1177
+ "path": "../../utils/language-utils",
1178
+ "id": "src/utils/language-utils.ts::DuetLangObject"
1179
+ }
1180
+ }
1181
+ },
1182
+ "required": false,
1183
+ "optional": false,
1184
+ "docs": {
1185
+ "tags": [{
1186
+ "name": "default",
1187
+ "text": "{\nfi: \"Lis\u00E4\u00E4 liite\",\nsv: \"L\u00E4gg till en bilaga\",\nen: \"Add an attachment\",\n}"
1188
+ }],
1189
+ "text": "Property to change button label defaults on the component."
1190
+ },
1191
+ "attribute": "button-label-default",
1192
+ "reflect": false,
1193
+ "defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add an attachment\",\n }"
1194
+ },
1195
+ "buttonLabel": {
1196
+ "type": "string",
1197
+ "mutable": false,
1198
+ "complexType": {
1199
+ "original": "string",
1200
+ "resolved": "string",
1201
+ "references": {}
1202
+ },
1203
+ "required": false,
1204
+ "optional": false,
1205
+ "docs": {
1206
+ "tags": [{
1207
+ "name": "default",
1208
+ "text": "{ fi: \"Lis\u00E4\u00E4 liite\", sv: \"L\u00E4gg till en bilaga\", en: \"Add an attachment\" }"
1209
+ }],
1210
+ "text": "Label of button"
1211
+ },
1212
+ "attribute": "button-label",
1213
+ "reflect": false,
1214
+ "defaultValue": "getLocaleString(this.buttonLabelDefaults)"
1215
+ },
1216
+ "accessibleButtonLabel": {
1217
+ "type": "string",
1218
+ "mutable": false,
1219
+ "complexType": {
1220
+ "original": "string",
1221
+ "resolved": "string",
1222
+ "references": {}
1223
+ },
1224
+ "required": false,
1225
+ "optional": false,
1226
+ "docs": {
1227
+ "tags": [],
1228
+ "text": "accessible aria-Label of button"
1229
+ },
1230
+ "attribute": "accessible-button-label",
1231
+ "reflect": false,
1232
+ "defaultValue": "undefined"
1233
+ },
1234
+ "theme": {
1235
+ "type": "string",
1236
+ "mutable": true,
1237
+ "complexType": {
1238
+ "original": "DuetTheme",
1239
+ "resolved": "\"\" | \"default\" | \"turva\"",
1240
+ "references": {
1241
+ "DuetTheme": {
1242
+ "location": "import",
1243
+ "path": "../../common-types",
1244
+ "id": "src/common-types.d.ts::DuetTheme"
1245
+ }
1246
+ }
1247
+ },
1248
+ "required": false,
1249
+ "optional": false,
1250
+ "docs": {
1251
+ "tags": [],
1252
+ "text": "Theme of the input."
1253
+ },
1254
+ "attribute": "theme",
1255
+ "reflect": false,
1256
+ "defaultValue": "\"\""
1257
+ },
1258
+ "disabled": {
1259
+ "type": "boolean",
1260
+ "mutable": false,
1261
+ "complexType": {
1262
+ "original": "boolean",
1263
+ "resolved": "boolean",
1264
+ "references": {}
1265
+ },
1266
+ "required": false,
1267
+ "optional": false,
1268
+ "docs": {
1269
+ "tags": [],
1270
+ "text": "Makes the input component disabled. This prevents users from being able to\ninteract with the upload component, and conveys its inactive state to assistive technologies."
1271
+ },
1272
+ "attribute": "disabled",
1273
+ "reflect": true,
1274
+ "defaultValue": "false"
1275
+ },
1276
+ "identifier": {
1277
+ "type": "string",
1278
+ "mutable": false,
1279
+ "complexType": {
1280
+ "original": "string",
1281
+ "resolved": "string",
1282
+ "references": {}
1283
+ },
1284
+ "required": false,
1285
+ "optional": false,
1286
+ "docs": {
1287
+ "tags": [],
1288
+ "text": "Adds a unique identifier for the upload component."
1289
+ },
1290
+ "attribute": "identifier",
1291
+ "reflect": false
1292
+ },
1293
+ "margin": {
1294
+ "type": "string",
1295
+ "mutable": false,
1296
+ "complexType": {
1297
+ "original": "DuetMargin",
1298
+ "resolved": "\"auto\" | \"none\"",
1299
+ "references": {
1300
+ "DuetMargin": {
1301
+ "location": "import",
1302
+ "path": "../../common-types",
1303
+ "id": "src/common-types.d.ts::DuetMargin"
1304
+ }
1305
+ }
1306
+ },
1307
+ "required": false,
1308
+ "optional": false,
1309
+ "docs": {
1310
+ "tags": [],
1311
+ "text": "Controls the margin of the component."
1312
+ },
1313
+ "attribute": "margin",
1314
+ "reflect": false,
1315
+ "defaultValue": "\"auto\""
1316
+ },
1317
+ "required": {
1318
+ "type": "boolean",
1319
+ "mutable": false,
1320
+ "complexType": {
1321
+ "original": "boolean",
1322
+ "resolved": "boolean",
1323
+ "references": {}
1324
+ },
1325
+ "required": false,
1326
+ "optional": false,
1327
+ "docs": {
1328
+ "tags": [],
1329
+ "text": "Set whether the input is required or not. Please note that this is necessary for\naccessible inputs when the user is required to fill them. When using this property\nyou need to also set \u201Cnovalidate\u201D attribute to your form element to prevent\nbrowser from displaying its own validation errors."
1330
+ },
1331
+ "attribute": "required",
1332
+ "reflect": false,
1333
+ "defaultValue": "false"
1334
+ },
1335
+ "alignment": {
1336
+ "type": "string",
1337
+ "mutable": false,
1338
+ "complexType": {
1339
+ "original": "string",
1340
+ "resolved": "string",
1341
+ "references": {}
1342
+ },
1343
+ "required": false,
1344
+ "optional": false,
1345
+ "docs": {
1346
+ "tags": [],
1347
+ "text": "Key used to set vertical alignment of action buttons"
1348
+ },
1349
+ "attribute": "alignment",
1350
+ "reflect": false,
1351
+ "defaultValue": "\"middle\""
1352
+ },
1353
+ "hideGroups": {
1354
+ "type": "boolean",
1355
+ "mutable": false,
1356
+ "complexType": {
1357
+ "original": "boolean",
1358
+ "resolved": "boolean",
1359
+ "references": {}
1360
+ },
1361
+ "required": false,
1362
+ "optional": false,
1363
+ "docs": {
1364
+ "tags": [],
1365
+ "text": "Visually hides the groups labels in the editable table list used to display the list of files"
1366
+ },
1367
+ "attribute": "hide-table-labels",
1368
+ "reflect": false,
1369
+ "defaultValue": "false"
1370
+ },
1371
+ "files": {
1372
+ "type": "unknown",
1373
+ "mutable": true,
1374
+ "complexType": {
1375
+ "original": "StringMap",
1376
+ "resolved": "StringMap",
1377
+ "references": {
1378
+ "StringMap": {
1379
+ "location": "local",
1380
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
1381
+ "id": "src/components/duet-upload/duet-upload.tsx::StringMap"
1382
+ }
1383
+ }
1384
+ },
1385
+ "required": false,
1386
+ "optional": false,
1387
+ "docs": {
1388
+ "tags": [],
1389
+ "text": "Map of string that contain list of uploaded files."
1390
+ },
1391
+ "defaultValue": "new Map()"
1392
+ },
1393
+ "valid": {
1394
+ "type": "boolean",
1395
+ "mutable": true,
1396
+ "complexType": {
1397
+ "original": "boolean",
1398
+ "resolved": "boolean",
1399
+ "references": {}
1400
+ },
1401
+ "required": false,
1402
+ "optional": false,
1403
+ "docs": {
1404
+ "tags": [],
1405
+ "text": "Property to read if the internally used editable-table contains errors or not"
1406
+ },
1407
+ "attribute": "valid",
1408
+ "reflect": true,
1409
+ "defaultValue": "!this.required"
1410
+ },
1411
+ "labelDefaults": {
1412
+ "type": "string",
1413
+ "mutable": false,
1414
+ "complexType": {
1415
+ "original": "DuetLangObject | string",
1416
+ "resolved": "DuetLangObject | string",
1417
+ "references": {
1418
+ "DuetLangObject": {
1419
+ "location": "import",
1420
+ "path": "../../utils/language-utils",
1421
+ "id": "src/utils/language-utils.ts::DuetLangObject"
1422
+ }
1423
+ }
1424
+ },
1425
+ "required": false,
1426
+ "optional": false,
1427
+ "docs": {
1428
+ "tags": [{
1429
+ "name": "default",
1430
+ "text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
1431
+ }],
1432
+ "text": "Property to change labelDefaults defaults on the component.\nnormally you would handle these strings on an application level and override label when needed"
1433
+ },
1434
+ "attribute": "label-default",
1435
+ "reflect": false,
1436
+ "defaultValue": "{\n fi: \"Lis\u00E4\u00E4 liite\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Add attachments\",\n }"
1437
+ },
1438
+ "label": {
1439
+ "type": "string",
1440
+ "mutable": false,
1441
+ "complexType": {
1442
+ "original": "string",
1443
+ "resolved": "string",
1444
+ "references": {}
1445
+ },
1446
+ "required": false,
1447
+ "optional": false,
1448
+ "docs": {
1449
+ "tags": [{
1450
+ "name": "default",
1451
+ "text": "{ fi: \"Lis\u00E4\u00E4 liite\",sv: \"L\u00E4gg till en bilaga\",en: \"Add attachments\"}"
1452
+ }],
1453
+ "text": "Label for the input."
1454
+ },
1455
+ "attribute": "label",
1456
+ "reflect": false,
1457
+ "defaultValue": "getLocaleString(this.labelDefaults)"
1458
+ },
1459
+ "descriptionDefaults": {
1460
+ "type": "string",
1461
+ "mutable": false,
1462
+ "complexType": {
1463
+ "original": "DuetLangObject | string",
1464
+ "resolved": "DuetLangObject | string",
1465
+ "references": {
1466
+ "DuetLangObject": {
1467
+ "location": "import",
1468
+ "path": "../../utils/language-utils",
1469
+ "id": "src/utils/language-utils.ts::DuetLangObject"
1470
+ }
1471
+ }
1472
+ },
1473
+ "required": false,
1474
+ "optional": false,
1475
+ "docs": {
1476
+ "tags": [{
1477
+ "name": "default",
1478
+ "text": "{\nen: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.\",\nsv: \"Du kan bifoga f\u00F6ljande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer \u00E5t g\u00E5ngen, och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen varje inte st\u00F6rre \u00E4n {maxbytes}.\",\nfi: \"Voit liitt\u00E4\u00E4 seuraavat tiedostotyypit: {filetypes} - sek\u00E4 yleisimm\u00E4t videotiedostot. Voit l\u00E4hett\u00E4\u00E4 {maxbytestotal} tiedostoa kerrallaan, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan, jokainen enint\u00E4\u00E4n {maxbytes} kokoisena.\",\n}"
1479
+ }],
1480
+ "text": "Property to change descriptionDefaults defaults on the component."
1481
+ },
1482
+ "attribute": "description-default",
1483
+ "reflect": false,
1484
+ "defaultValue": "{\n en: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.\",\n sv: \"Du kan bifoga f\u00F6ljande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer \u00E5t g\u00E5ngen, och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen varje inte st\u00F6rre \u00E4n {maxbytes}.\",\n fi: \"Voit liitt\u00E4\u00E4 seuraavat tiedostotyypit: {filetypes} - sek\u00E4 yleisimm\u00E4t videotiedostot. Voit l\u00E4hett\u00E4\u00E4 {maxbytestotal} tiedostoa kerrallaan, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan, jokainen enint\u00E4\u00E4n {maxbytes} kokoisena.\",\n }"
1485
+ },
1486
+ "description": {
1487
+ "type": "string",
1488
+ "mutable": false,
1489
+ "complexType": {
1490
+ "original": "string",
1491
+ "resolved": "string",
1492
+ "references": {}
1493
+ },
1494
+ "required": false,
1495
+ "optional": false,
1496
+ "docs": {
1497
+ "tags": [{
1498
+ "name": "default",
1499
+ "text": "{\nen: \"You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytestotal} of files at a time, and add up to {maxfiles} attachments at a time each no larger than {maxbytes}.\",\nsv: \"Du kan bifoga f\u00F6ljande filtyper: {filetypes} - samt de vanligaste videofilerna. Du kan ladda upp {maxbytestotal} av filer \u00E5t g\u00E5ngen, och l\u00E4gga till upp till {maxfiles} bilagor \u00E5t g\u00E5ngen varje inte st\u00F6rre \u00E4n {maxbytes}.\",\nfi: \"Voit liitt\u00E4\u00E4 seuraavat tiedostotyypit: {filetypes} - sek\u00E4 yleisimm\u00E4t videotiedostot. Voit l\u00E4hett\u00E4\u00E4 {maxbytestotal} tiedostoa kerrallaan, ja lis\u00E4t\u00E4 enint\u00E4\u00E4n {maxfiles} liitett\u00E4 kerrallaan, jokainen enint\u00E4\u00E4n {maxbytes} kokoisena.\",\n}"
1500
+ }],
1501
+ "text": "Description for the upload component."
1502
+ },
1503
+ "attribute": "description",
1504
+ "reflect": false,
1505
+ "defaultValue": "getLocaleString(this.descriptionDefaults)"
1506
+ },
1507
+ "fileListEmptyDefaults": {
1508
+ "type": "string",
1509
+ "mutable": false,
1510
+ "complexType": {
1511
+ "original": "DuetLangObject | string",
1512
+ "resolved": "DuetLangObject | string",
1513
+ "references": {
1514
+ "DuetLangObject": {
1515
+ "location": "import",
1516
+ "path": "../../utils/language-utils",
1517
+ "id": "src/utils/language-utils.ts::DuetLangObject"
1518
+ }
1519
+ }
1520
+ },
1521
+ "required": false,
1522
+ "optional": false,
1523
+ "docs": {
1524
+ "tags": [{
1525
+ "name": "default",
1526
+ "text": "{\nfi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",\nsv: \"Inga filer har lagts till \u00E4nnu.\",\nen: \"No files added yet.\",\n}"
1527
+ }],
1528
+ "text": "Defaults for the filelist's empty state."
1529
+ },
1530
+ "attribute": "list-empty-default",
1531
+ "reflect": false,
1532
+ "defaultValue": "{\n fi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",\n sv: \"Inga filer har lagts till \u00E4nnu.\",\n en: \"No files added yet.\",\n }"
1533
+ },
1534
+ "fileListEmpty": {
1535
+ "type": "string",
1536
+ "mutable": false,
1537
+ "complexType": {
1538
+ "original": "string",
1539
+ "resolved": "string",
1540
+ "references": {}
1541
+ },
1542
+ "required": false,
1543
+ "optional": false,
1544
+ "docs": {
1545
+ "tags": [{
1546
+ "name": "default",
1547
+ "text": "{ fi: \"Ei viel\u00E4 lis\u00E4ttyj\u00E4 tiedostoja.\",sv: \"Inga filer har lagts till \u00E4nnu.\",en: \"No files added yet.\"}"
1548
+ }],
1549
+ "text": "Label for the filelist's empty state."
1550
+ },
1551
+ "attribute": "file-list-empty",
1552
+ "reflect": false,
1553
+ "defaultValue": "getLocaleString(this.fileListEmptyDefaults)"
1554
+ },
1555
+ "error": {
1556
+ "type": "string",
1557
+ "mutable": false,
1558
+ "complexType": {
1559
+ "original": "string",
1560
+ "resolved": "string",
1561
+ "references": {}
1562
+ },
1563
+ "required": false,
1564
+ "optional": false,
1565
+ "docs": {
1566
+ "tags": [],
1567
+ "text": "Display the input in error state along with an error message."
1568
+ },
1569
+ "attribute": "error",
1570
+ "reflect": false,
1571
+ "defaultValue": "\"\""
1572
+ },
1573
+ "errorCodes": {
1574
+ "type": "unknown",
1575
+ "mutable": false,
1576
+ "complexType": {
1577
+ "original": "DuetUploadErrorCode[]",
1578
+ "resolved": "DuetUploadErrorCode[]",
1579
+ "references": {
1580
+ "DuetUploadErrorCode": {
1581
+ "location": "import",
1582
+ "path": "./errorcodes.utils",
1583
+ "id": "src/components/duet-upload/errorcodes.utils.ts::DuetUploadErrorCode"
1584
+ }
1585
+ }
1586
+ },
1587
+ "required": false,
1588
+ "optional": false,
1589
+ "docs": {
1590
+ "tags": [],
1591
+ "text": "Default errorcodes used by the component, modifiable via javascript"
1592
+ },
1593
+ "defaultValue": "errorCodes"
1594
+ },
1595
+ "name": {
1596
+ "type": "string",
1597
+ "mutable": false,
1598
+ "complexType": {
1599
+ "original": "string",
1600
+ "resolved": "string",
1601
+ "references": {}
1602
+ },
1603
+ "required": false,
1604
+ "optional": false,
1605
+ "docs": {
1606
+ "tags": [],
1607
+ "text": "Name of the upload component."
1608
+ },
1609
+ "attribute": "name",
1610
+ "reflect": false
1611
+ },
1612
+ "maxBytes": {
1613
+ "type": "number",
1614
+ "mutable": false,
1615
+ "complexType": {
1616
+ "original": "number",
1617
+ "resolved": "number",
1618
+ "references": {}
1619
+ },
1620
+ "required": false,
1621
+ "optional": false,
1622
+ "docs": {
1623
+ "tags": [],
1624
+ "text": "Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded."
1625
+ },
1626
+ "attribute": "max-bytes",
1627
+ "reflect": false,
1628
+ "defaultValue": "200000000"
1629
+ },
1630
+ "maxBytesTotal": {
1631
+ "type": "number",
1632
+ "mutable": false,
1633
+ "complexType": {
1634
+ "original": "number",
1635
+ "resolved": "number",
1636
+ "references": {}
1637
+ },
1638
+ "required": false,
1639
+ "optional": false,
1640
+ "docs": {
1641
+ "tags": [],
1642
+ "text": "Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded."
1643
+ },
1644
+ "attribute": "max-bytes-total",
1645
+ "reflect": false,
1646
+ "defaultValue": "undefined"
1647
+ },
1648
+ "maxFiles": {
1649
+ "type": "number",
1650
+ "mutable": false,
1651
+ "complexType": {
1652
+ "original": "number",
1653
+ "resolved": "number",
1654
+ "references": {}
1655
+ },
1656
+ "required": false,
1657
+ "optional": false,
1658
+ "docs": {
1659
+ "tags": [],
1660
+ "text": "Use maxFiles to specify the maximum amount of files that can be uploaded"
1661
+ },
1662
+ "attribute": "max-files",
1663
+ "reflect": false,
1664
+ "defaultValue": "99"
1665
+ },
1666
+ "allowedExtensions": {
1667
+ "type": "string",
1668
+ "mutable": false,
1669
+ "complexType": {
1670
+ "original": "string",
1671
+ "resolved": "string",
1672
+ "references": {}
1673
+ },
1674
+ "required": false,
1675
+ "optional": false,
1676
+ "docs": {
1677
+ "tags": [{
1678
+ "name": "example",
1679
+ "text": ": .pdf,.doc,.docx"
1680
+ }],
1681
+ "text": "A string of commaseperated file type values that are allowed"
1682
+ },
1683
+ "attribute": "allowed-extensions",
1684
+ "reflect": false,
1685
+ "defaultValue": "\"all\""
1686
+ },
1687
+ "allowedMimetypes": {
1688
+ "type": "string",
1689
+ "mutable": false,
1690
+ "complexType": {
1691
+ "original": "string",
1692
+ "resolved": "string",
1693
+ "references": {}
1694
+ },
1695
+ "required": false,
1696
+ "optional": false,
1697
+ "docs": {
1698
+ "tags": [{
1699
+ "name": "example",
1700
+ "text": ": image/*,application/msword,"
1701
+ }],
1702
+ "text": "A string of commaseperated mime type values that are allowed"
1703
+ },
1704
+ "attribute": "allowed-mimetypes",
1705
+ "reflect": false,
1706
+ "defaultValue": "\"\""
1707
+ },
1708
+ "multiple": {
1709
+ "type": "boolean",
1710
+ "mutable": false,
1711
+ "complexType": {
1712
+ "original": "boolean",
1713
+ "resolved": "boolean",
1714
+ "references": {}
1715
+ },
1716
+ "required": false,
1717
+ "optional": false,
1718
+ "docs": {
1719
+ "tags": [],
1720
+ "text": "Use multiple to allow the user to select multiple files when uploading"
1721
+ },
1722
+ "attribute": "multiple",
1723
+ "reflect": false,
1724
+ "defaultValue": "true"
1725
+ },
1726
+ "limitSelection": {
1727
+ "type": "boolean",
1728
+ "mutable": false,
1729
+ "complexType": {
1730
+ "original": "boolean",
1731
+ "resolved": "boolean",
1732
+ "references": {}
1733
+ },
1734
+ "required": false,
1735
+ "optional": false,
1736
+ "docs": {
1737
+ "tags": [],
1738
+ "text": "Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,\nby default this is off, setting this to true will limit the users choices to what has been explicitly set"
1739
+ },
1740
+ "attribute": "limit-selection",
1741
+ "reflect": false,
1742
+ "defaultValue": "false"
1743
+ },
1744
+ "hideCancelButton": {
1745
+ "type": "boolean",
1746
+ "mutable": false,
1747
+ "complexType": {
1748
+ "original": "boolean",
1749
+ "resolved": "boolean",
1750
+ "references": {}
1751
+ },
1752
+ "required": false,
1753
+ "optional": false,
1754
+ "docs": {
1755
+ "tags": [],
1756
+ "text": "Use hideCancelButton to hide cancel button for pending and in progress uploads"
1757
+ },
1758
+ "attribute": "hide-cancel-button",
1759
+ "reflect": false,
1760
+ "defaultValue": "false"
1761
+ },
1762
+ "value": {
1763
+ "type": "string",
1764
+ "mutable": true,
1765
+ "complexType": {
1766
+ "original": "string",
1767
+ "resolved": "string",
1768
+ "references": {}
1769
+ },
1770
+ "required": false,
1771
+ "optional": false,
1772
+ "docs": {
1773
+ "tags": [],
1774
+ "text": "Value of the input."
1775
+ },
1776
+ "attribute": "value",
1777
+ "reflect": false
1778
+ },
1779
+ "externalUploadButtonId": {
1780
+ "type": "string",
1781
+ "mutable": false,
1782
+ "complexType": {
1783
+ "original": "string",
1784
+ "resolved": "string",
1785
+ "references": {}
1786
+ },
1787
+ "required": false,
1788
+ "optional": false,
1789
+ "docs": {
1790
+ "tags": [],
1791
+ "text": "Id of external uploadButton of the input used for setting accessibility attributes."
1792
+ },
1793
+ "attribute": "external-upload-button-id",
1794
+ "reflect": false
1795
+ },
1796
+ "captionOnBottom": {
1797
+ "type": "boolean",
1798
+ "mutable": false,
1799
+ "complexType": {
1800
+ "original": "boolean",
1801
+ "resolved": "boolean",
1802
+ "references": {}
1803
+ },
1804
+ "required": false,
1805
+ "optional": false,
1806
+ "docs": {
1807
+ "tags": [],
1808
+ "text": "If true the input caption will be placed below file list and footer"
1809
+ },
1810
+ "attribute": "caption-on-bottom",
1811
+ "reflect": false,
1812
+ "defaultValue": "false"
1813
+ },
1814
+ "showUploadedItemsHeader": {
1815
+ "type": "boolean",
1816
+ "mutable": false,
1817
+ "complexType": {
1818
+ "original": "boolean",
1819
+ "resolved": "boolean",
1820
+ "references": {}
1821
+ },
1822
+ "required": false,
1823
+ "optional": false,
1824
+ "docs": {
1825
+ "tags": [],
1826
+ "text": "Use show-uploaded-items-header to show single, generic, header for uploaded items"
1827
+ },
1828
+ "attribute": "show-uploaded-items-header",
1829
+ "reflect": false,
1830
+ "defaultValue": "false"
1831
+ },
1832
+ "uploadedItemsHeaderLabel": {
1833
+ "type": "unknown",
1834
+ "mutable": false,
1835
+ "complexType": {
1836
+ "original": "DuetLangObject",
1837
+ "resolved": "DuetLangObject",
1838
+ "references": {
1839
+ "DuetLangObject": {
1840
+ "location": "import",
1841
+ "path": "../../utils/language-utils",
1842
+ "id": "src/utils/language-utils.ts::DuetLangObject"
1843
+ }
1844
+ }
1845
+ },
1846
+ "required": false,
1847
+ "optional": false,
1848
+ "docs": {
1849
+ "tags": [{
1850
+ "name": "default",
1851
+ "text": "{\nfi: \"Ladattu tiedosto.\",\nsv: \"Nedladdad fil.\",\nen: \"Uploaded file.\",\n}"
1852
+ }],
1853
+ "text": "Property to change single uploaded items header label"
1854
+ },
1855
+ "defaultValue": "{\n fi: \"Ladattu tiedosto\",\n sv: \"L\u00E4gg till en bilaga\",\n en: \"Uploaded file\",\n }"
1856
+ },
1857
+ "headerHeadingLevel": {
1858
+ "type": "string",
1859
+ "mutable": false,
1860
+ "complexType": {
1861
+ "original": "DuetHeadingLevel",
1862
+ "resolved": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
1863
+ "references": {
1864
+ "DuetHeadingLevel": {
1865
+ "location": "import",
1866
+ "path": "../../common-types",
1867
+ "id": "src/common-types.d.ts::DuetHeadingLevel"
1868
+ }
1869
+ }
1870
+ },
1871
+ "required": false,
1872
+ "optional": false,
1873
+ "docs": {
1874
+ "tags": [],
1875
+ "text": "Heading level for the label in the legend element. This is only used to give screen readers better logical structure.\nThis does not affect visual appearance."
1876
+ },
1877
+ "attribute": "header-heading-level",
1878
+ "reflect": false,
1879
+ "defaultValue": "\"h3\""
1880
+ },
1881
+ "hideHeader": {
1882
+ "type": "boolean",
1883
+ "mutable": false,
1884
+ "complexType": {
1885
+ "original": "boolean",
1886
+ "resolved": "boolean",
1887
+ "references": {}
1888
+ },
1889
+ "required": false,
1890
+ "optional": false,
1891
+ "docs": {
1892
+ "tags": [],
1893
+ "text": "Use hide-header to hide upload component header and caption (if caption is not on bottom)"
1894
+ },
1895
+ "attribute": "hide-header",
1896
+ "reflect": false,
1897
+ "defaultValue": "false"
1898
+ },
1899
+ "emitEvent": {
1900
+ "type": "boolean",
1901
+ "mutable": false,
1902
+ "complexType": {
1903
+ "original": "boolean",
1904
+ "resolved": "boolean",
1905
+ "references": {}
1906
+ },
1907
+ "required": false,
1908
+ "optional": false,
1909
+ "docs": {
1910
+ "tags": [],
1911
+ "text": "If link-click-event is set to true then upload component\nwill emit an event on uploaded file link click (check linkClick event)."
1912
+ },
1913
+ "attribute": "link-click-event",
1914
+ "reflect": false,
1915
+ "defaultValue": "false"
1916
+ },
1917
+ "groups": {
1918
+ "type": "unknown",
1919
+ "mutable": false,
1920
+ "complexType": {
1921
+ "original": "DuetUploadTableGroupName[]",
1922
+ "resolved": "DuetUploadTableGroupName[]",
1923
+ "references": {
1924
+ "DuetUploadTableGroupName": {
1925
+ "location": "local",
1926
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
1927
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadTableGroupName"
1928
+ }
1929
+ }
1930
+ },
1931
+ "required": false,
1932
+ "optional": false,
1933
+ "docs": {
1934
+ "tags": [{
1935
+ "name": "required",
1936
+ "text": undefined
1937
+ }, {
1938
+ "name": "example",
1939
+ "text": "[{ id: \"success\", label: {fi: \"Onnistunut\", en: \"Success\", sv: \"Alt klart\", }}]"
1940
+ }],
1941
+ "text": "Array of group names that you want the editable table to use to display files"
1942
+ },
1943
+ "defaultValue": "[\n {\n id: this.DefaultGroups.success,\n label: {\n fi: \"Valmiit tiedostot\",\n sv: \"Files success\",\n en: \"Files success\",\n },\n },\n {\n id: this.DefaultGroups.failure,\n label: {\n fi: \"Tiedostot, joissa on virheit\u00E4\",\n sv: \"Filer med fel\",\n en: \"Files with errors\",\n },\n },\n {\n id: this.DefaultGroups.inprogress,\n label: {\n fi: \"Kesken olevat tiedostot\",\n sv: \"Filer inprogress\",\n en: \"Files inprogress\",\n },\n },\n {\n id: this.DefaultGroups.pending,\n label: {\n en: \"Files to upload\",\n sv: \"Filer att ladda\",\n fi: \"Ladattavat tiedostot\",\n },\n },\n ]"
1944
+ }
1945
+ };
1946
+ }
1947
+ static get states() {
1948
+ return {
1949
+ "tick": {}
1950
+ };
1951
+ }
1952
+ static get events() {
1953
+ return [{
1954
+ "method": "duetChange",
1955
+ "name": "duetChange",
1956
+ "bubbles": false,
1957
+ "cancelable": true,
1958
+ "composed": true,
1959
+ "docs": {
1960
+ "tags": [],
1961
+ "text": "Emitted when the value has changed."
1962
+ },
1963
+ "complexType": {
1964
+ "original": "DuetUploadEvent",
1965
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
1966
+ "references": {
1967
+ "DuetUploadEvent": {
1968
+ "location": "local",
1969
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
1970
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
1971
+ }
1972
+ }
1973
+ }
2289
1974
  }, {
2290
- "tags": [],
2291
- "text": ""
1975
+ "method": "duetBlur",
1976
+ "name": "duetBlur",
1977
+ "bubbles": true,
1978
+ "cancelable": true,
1979
+ "composed": true,
1980
+ "docs": {
1981
+ "tags": [],
1982
+ "text": "Emitted when the input loses focus."
1983
+ },
1984
+ "complexType": {
1985
+ "original": "DuetUploadEvent",
1986
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
1987
+ "references": {
1988
+ "DuetUploadEvent": {
1989
+ "location": "local",
1990
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
1991
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
1992
+ }
1993
+ }
1994
+ }
2292
1995
  }, {
2293
- "tags": [],
2294
- "text": ""
2295
- }],
2296
- "references": {
2297
- "Promise": {
2298
- "location": "global",
2299
- "id": "global::Promise"
2300
- }
2301
- },
2302
- "return": "Promise<void>"
2303
- },
2304
- "docs": {
2305
- "text": "Convenience method for updating the value of a key:value inside an item in the files attribute",
2306
- "tags": []
2307
- }
2308
- },
2309
- "focusActionButton": {
2310
- "complexType": {
2311
- "signature": "(uid: string) => Promise<void>",
2312
- "parameters": [{
2313
- "tags": [],
2314
- "text": ""
2315
- }],
2316
- "references": {
2317
- "Promise": {
2318
- "location": "global",
2319
- "id": "global::Promise"
1996
+ "method": "duetFocus",
1997
+ "name": "duetFocus",
1998
+ "bubbles": true,
1999
+ "cancelable": true,
2000
+ "composed": true,
2001
+ "docs": {
2002
+ "tags": [],
2003
+ "text": "Emitted when the input has focus."
2004
+ },
2005
+ "complexType": {
2006
+ "original": "DuetUploadEvent",
2007
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2008
+ "references": {
2009
+ "DuetUploadEvent": {
2010
+ "location": "local",
2011
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2012
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2013
+ }
2014
+ }
2015
+ }
2016
+ }, {
2017
+ "method": "duetReady",
2018
+ "name": "duetReady",
2019
+ "bubbles": true,
2020
+ "cancelable": true,
2021
+ "composed": true,
2022
+ "docs": {
2023
+ "tags": [],
2024
+ "text": "Emitted when the component is finished initializing"
2025
+ },
2026
+ "complexType": {
2027
+ "original": "DuetUploadEvent",
2028
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2029
+ "references": {
2030
+ "DuetUploadEvent": {
2031
+ "location": "local",
2032
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2033
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2034
+ }
2035
+ }
2036
+ }
2037
+ }, {
2038
+ "method": "duetDone",
2039
+ "name": "duetDone",
2040
+ "bubbles": false,
2041
+ "cancelable": true,
2042
+ "composed": true,
2043
+ "docs": {
2044
+ "tags": [],
2045
+ "text": "Emitted when the current upload batch finishes"
2046
+ },
2047
+ "complexType": {
2048
+ "original": "DuetUploadEvent",
2049
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2050
+ "references": {
2051
+ "DuetUploadEvent": {
2052
+ "location": "local",
2053
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2054
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2055
+ }
2056
+ }
2057
+ }
2058
+ }, {
2059
+ "method": "duetState",
2060
+ "name": "duetState",
2061
+ "bubbles": false,
2062
+ "cancelable": true,
2063
+ "composed": true,
2064
+ "docs": {
2065
+ "tags": [],
2066
+ "text": "Emitted when the current validation state changes internally"
2067
+ },
2068
+ "complexType": {
2069
+ "original": "DuetUploadEvent",
2070
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2071
+ "references": {
2072
+ "DuetUploadEvent": {
2073
+ "location": "local",
2074
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2075
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2076
+ }
2077
+ }
2078
+ }
2079
+ }, {
2080
+ "method": "duetDelete",
2081
+ "name": "duetDelete",
2082
+ "bubbles": false,
2083
+ "cancelable": true,
2084
+ "composed": true,
2085
+ "docs": {
2086
+ "tags": [],
2087
+ "text": "Emitted when a user clicks delete to delete an uploaded file, or a file entry with error"
2088
+ },
2089
+ "complexType": {
2090
+ "original": "DuetUploadEvent",
2091
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2092
+ "references": {
2093
+ "DuetUploadEvent": {
2094
+ "location": "local",
2095
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2096
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2097
+ }
2098
+ }
2099
+ }
2100
+ }, {
2101
+ "method": "duetCancel",
2102
+ "name": "duetCancel",
2103
+ "bubbles": false,
2104
+ "cancelable": true,
2105
+ "composed": true,
2106
+ "docs": {
2107
+ "tags": [],
2108
+ "text": "Emitted when a user clicks cancel on an upload in progress"
2109
+ },
2110
+ "complexType": {
2111
+ "original": "DuetUploadEvent",
2112
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2113
+ "references": {
2114
+ "DuetUploadEvent": {
2115
+ "location": "local",
2116
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2117
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2118
+ }
2119
+ }
2120
+ }
2121
+ }, {
2122
+ "method": "duetProgress",
2123
+ "name": "duetProgress",
2124
+ "bubbles": false,
2125
+ "cancelable": true,
2126
+ "composed": true,
2127
+ "docs": {
2128
+ "tags": [],
2129
+ "text": "Emitted when the file progress is updated."
2130
+ },
2131
+ "complexType": {
2132
+ "original": "DuetUploadEvent",
2133
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2134
+ "references": {
2135
+ "DuetUploadEvent": {
2136
+ "location": "local",
2137
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2138
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2139
+ }
2140
+ }
2141
+ }
2142
+ }, {
2143
+ "method": "duetUpload",
2144
+ "name": "duetUpload",
2145
+ "bubbles": false,
2146
+ "cancelable": true,
2147
+ "composed": true,
2148
+ "docs": {
2149
+ "tags": [],
2150
+ "text": "Emitted when the user clicks the upload button"
2151
+ },
2152
+ "complexType": {
2153
+ "original": "DuetUploadEvent",
2154
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2155
+ "references": {
2156
+ "DuetUploadEvent": {
2157
+ "location": "local",
2158
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2159
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2160
+ }
2161
+ }
2162
+ }
2163
+ }, {
2164
+ "method": "linkClick",
2165
+ "name": "linkClick",
2166
+ "bubbles": false,
2167
+ "cancelable": true,
2168
+ "composed": true,
2169
+ "docs": {
2170
+ "tags": [],
2171
+ "text": "Emitted when the user clicks the uploaded file link and link-click-event prop is set to true"
2172
+ },
2173
+ "complexType": {
2174
+ "original": "DuetUploadEvent",
2175
+ "resolved": "{ originalEvent?: Event; data?: Record<string, any>; metaData?: Record<string, any>; component: \"duet-upload\"; }",
2176
+ "references": {
2177
+ "DuetUploadEvent": {
2178
+ "location": "local",
2179
+ "path": "/Users/mgibas/workspace/duet/packages/components/src/components/duet-upload/duet-upload.tsx",
2180
+ "id": "src/components/duet-upload/duet-upload.tsx::DuetUploadEvent"
2181
+ }
2182
+ }
2183
+ }
2184
+ }];
2185
+ }
2186
+ static get methods() {
2187
+ return {
2188
+ "setFocus": {
2189
+ "complexType": {
2190
+ "signature": "(options?: FocusOptions) => Promise<void>",
2191
+ "parameters": [{
2192
+ "name": "options",
2193
+ "type": "FocusOptions",
2194
+ "docs": ""
2195
+ }],
2196
+ "references": {
2197
+ "Promise": {
2198
+ "location": "global",
2199
+ "id": "global::Promise"
2200
+ },
2201
+ "FocusOptions": {
2202
+ "location": "global",
2203
+ "id": "global::FocusOptions"
2204
+ }
2205
+ },
2206
+ "return": "Promise<void>"
2207
+ },
2208
+ "docs": {
2209
+ "text": "Sets focus on the specified `duet-input`. Use this method instead of the global\n`input.focus()`.",
2210
+ "tags": []
2211
+ }
2212
+ },
2213
+ "upload": {
2214
+ "complexType": {
2215
+ "signature": "(metaData?: any | undefined) => Promise<void>",
2216
+ "parameters": [{
2217
+ "name": "metaData",
2218
+ "type": "any",
2219
+ "docs": ""
2220
+ }],
2221
+ "references": {
2222
+ "Promise": {
2223
+ "location": "global",
2224
+ "id": "global::Promise"
2225
+ }
2226
+ },
2227
+ "return": "Promise<void>"
2228
+ },
2229
+ "docs": {
2230
+ "text": "Method for invoking the upload sequence",
2231
+ "tags": []
2232
+ }
2233
+ },
2234
+ "uploadPending": {
2235
+ "complexType": {
2236
+ "signature": "() => Promise<void>",
2237
+ "parameters": [],
2238
+ "references": {
2239
+ "Promise": {
2240
+ "location": "global",
2241
+ "id": "global::Promise"
2242
+ }
2243
+ },
2244
+ "return": "Promise<void>"
2245
+ },
2246
+ "docs": {
2247
+ "text": "Method for uploading pending files",
2248
+ "tags": []
2249
+ }
2250
+ },
2251
+ "refresh": {
2252
+ "complexType": {
2253
+ "signature": "() => Promise<void>",
2254
+ "parameters": [],
2255
+ "references": {
2256
+ "Promise": {
2257
+ "location": "global",
2258
+ "id": "global::Promise"
2259
+ }
2260
+ },
2261
+ "return": "Promise<void>"
2262
+ },
2263
+ "docs": {
2264
+ "text": "Method for forcing a render of the upload list, element.files can be changed externally\nBut it will only rerender on a new Map or a top Level change - this can be used to update\nthe tabular data if the automatic re-render is no sufficient",
2265
+ "tags": []
2266
+ }
2267
+ },
2268
+ "getFiles": {
2269
+ "complexType": {
2270
+ "signature": "() => Promise<false | { valid: any[]; invalid: any[]; }>",
2271
+ "parameters": [],
2272
+ "references": {
2273
+ "Promise": {
2274
+ "location": "global",
2275
+ "id": "global::Promise"
2276
+ }
2277
+ },
2278
+ "return": "Promise<false | { valid: any[]; invalid: any[]; }>"
2279
+ },
2280
+ "docs": {
2281
+ "text": "Get list of files, divided in errors and valid sections",
2282
+ "tags": []
2283
+ }
2284
+ },
2285
+ "updateValue": {
2286
+ "complexType": {
2287
+ "signature": "(item: string, key: string, value: any) => Promise<void>",
2288
+ "parameters": [{
2289
+ "name": "item",
2290
+ "type": "string",
2291
+ "docs": ""
2292
+ }, {
2293
+ "name": "key",
2294
+ "type": "string",
2295
+ "docs": ""
2296
+ }, {
2297
+ "name": "value",
2298
+ "type": "any",
2299
+ "docs": ""
2300
+ }],
2301
+ "references": {
2302
+ "Promise": {
2303
+ "location": "global",
2304
+ "id": "global::Promise"
2305
+ }
2306
+ },
2307
+ "return": "Promise<void>"
2308
+ },
2309
+ "docs": {
2310
+ "text": "Convenience method for updating the value of a key:value inside an item in the files attribute",
2311
+ "tags": []
2312
+ }
2313
+ },
2314
+ "focusActionButton": {
2315
+ "complexType": {
2316
+ "signature": "(uid: string) => Promise<void>",
2317
+ "parameters": [{
2318
+ "name": "uid",
2319
+ "type": "string",
2320
+ "docs": ""
2321
+ }],
2322
+ "references": {
2323
+ "Promise": {
2324
+ "location": "global",
2325
+ "id": "global::Promise"
2326
+ }
2327
+ },
2328
+ "return": "Promise<void>"
2329
+ },
2330
+ "docs": {
2331
+ "text": "focusActionButton.",
2332
+ "tags": []
2333
+ }
2320
2334
  }
2321
- },
2322
- "return": "Promise<void>"
2323
- },
2324
- "docs": {
2325
- "text": "focusActionButton.",
2326
- "tags": []
2327
- }
2328
- }
2329
- };
2330
- }
2331
- static get elementRef() { return "element"; }
2332
- static get watchers() {
2333
- return [{
2334
- "propName": "valid",
2335
- "methodName": "watchValidHandler"
2336
- }];
2337
- }
2335
+ };
2336
+ }
2337
+ static get elementRef() { return "element"; }
2338
+ static get watchers() {
2339
+ return [{
2340
+ "propName": "valid",
2341
+ "methodName": "watchValidHandler"
2342
+ }];
2343
+ }
2338
2344
  }