@duetds/components 4.32.0 → 4.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/hydrate/index.js +1933 -87
  2. package/lib/cjs/{dom-a28e5c5f.js → dom-c850c8d7.js} +1 -1
  3. package/lib/cjs/duet-alert.cjs.entry.js +2 -2
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-button_2.cjs.entry.js +4 -4
  6. package/lib/cjs/duet-caption_4.cjs.entry.js +17 -10
  7. package/lib/cjs/duet-card.cjs.entry.js +3 -3
  8. package/lib/cjs/duet-checkbox.cjs.entry.js +2 -2
  9. package/lib/cjs/duet-choice_2.cjs.entry.js +40 -18
  10. package/lib/cjs/duet-collapsible.cjs.entry.js +4 -1
  11. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  12. package/lib/cjs/duet-date-picker.cjs.entry.js +7 -7
  13. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-editable-table-button_3.cjs.entry.js +232 -0
  15. package/lib/cjs/{duet-table.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +206 -2
  16. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  17. package/lib/cjs/duet-footer.cjs.entry.js +2 -2
  18. package/lib/cjs/duet-grid_2.cjs.entry.js +52 -4
  19. package/lib/cjs/duet-header_2.cjs.entry.js +3 -3
  20. package/lib/cjs/duet-hero.cjs.entry.js +2 -2
  21. package/lib/cjs/duet-icon.cjs.entry.js +4 -4
  22. package/lib/cjs/duet-input_2.cjs.entry.js +6 -6
  23. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-list_2.cjs.entry.js +2 -2
  25. package/lib/cjs/duet-modal.cjs.entry.js +3 -3
  26. package/lib/cjs/duet-notification_2.cjs.entry.js +2 -2
  27. package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
  28. package/lib/cjs/duet-progress.cjs.entry.js +75 -0
  29. package/lib/cjs/duet-radio_2.cjs.entry.js +2 -2
  30. package/lib/cjs/duet-range-slider.cjs.entry.js +2 -2
  31. package/lib/cjs/duet-select.cjs.entry.js +5 -5
  32. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-tab_2.cjs.entry.js +3 -3
  34. package/lib/cjs/duet-textarea.cjs.entry.js +5 -5
  35. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-tooltip.cjs.entry.js +2 -2
  37. package/lib/cjs/duet-tray.cjs.entry.js +3 -3
  38. package/lib/cjs/duet-upload.cjs.entry.js +1089 -0
  39. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  40. package/lib/cjs/duet.cjs.js +4 -4
  41. package/lib/cjs/{focus-utils-55b5a616.js → focus-utils-a7a1fb8b.js} +1 -1
  42. package/lib/cjs/{index-03ed1f55.js → index-b724d698.js} +5 -2
  43. package/lib/cjs/js-utils-33a9dbe3.js +16 -0
  44. package/lib/cjs/{language-utils-48b8860b.js → language-utils-aa282901.js} +6 -2
  45. package/lib/cjs/loader.cjs.js +3 -3
  46. package/lib/cjs/{shadow-css-6560c90c.js → shadow-css-e3edeed1.js} +9 -10
  47. package/lib/cjs/{token-utils-13e5d13e.js → token-utils-63a9c8dc.js} +1 -1
  48. package/lib/cjs/{tokens.module-53b3bd92.js → tokens.module-6b2df1c2.js} +2 -0
  49. package/lib/cjs/{watch-options-3877c082.js → watch-options-d88afac0.js} +29 -6
  50. package/lib/collection/collection-manifest.json +15 -2
  51. package/lib/collection/components/duet-checkbox/duet-checkbox.css +1 -1
  52. package/lib/collection/components/duet-choice/duet-choice.js +95 -21
  53. package/lib/collection/components/duet-date-picker/duet-date-picker.js +9 -9
  54. package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +32 -0
  55. package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +218 -0
  56. package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +36 -0
  57. package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +203 -0
  58. package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +13 -0
  59. package/lib/collection/components/duet-editable-table/duet-editable-table.css +16 -0
  60. package/lib/collection/components/duet-editable-table/duet-editable-table.js +348 -0
  61. package/lib/collection/components/duet-grid/duet-grid.js +57 -6
  62. package/lib/collection/components/duet-heading/duet-heading.css +3 -0
  63. package/lib/collection/components/duet-heading/duet-heading.js +7 -6
  64. package/lib/collection/components/duet-icon/duet-icon.js +2 -6
  65. package/lib/collection/components/duet-input/duet-input.css +15 -0
  66. package/lib/collection/components/duet-input/duet-input.js +4 -4
  67. package/lib/collection/components/duet-paragraph/duet-paragraph.css +6 -0
  68. package/lib/collection/components/duet-paragraph/duet-paragraph.js +34 -3
  69. package/lib/collection/components/duet-progress/duet-progress.css +103 -0
  70. package/lib/collection/components/duet-progress/duet-progress.js +240 -0
  71. package/lib/collection/components/duet-select/duet-select.css +15 -0
  72. package/lib/collection/components/duet-select/duet-select.js +3 -3
  73. package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -2
  74. package/lib/collection/components/duet-textarea/duet-textarea.css +19 -0
  75. package/lib/collection/components/duet-textarea/duet-textarea.js +5 -4
  76. package/lib/collection/components/duet-upload/duet-upload-aria-status.js +217 -0
  77. package/lib/collection/components/duet-upload/duet-upload-editable-item-error.js +16 -0
  78. package/lib/collection/components/duet-upload/duet-upload-editable-item-inprogres.js +8 -0
  79. package/lib/collection/components/duet-upload/duet-upload-editable-item-success.js +30 -0
  80. package/lib/collection/components/duet-upload/duet-upload-validators.js +93 -0
  81. package/lib/collection/components/duet-upload/duet-upload.css +64 -0
  82. package/lib/collection/components/duet-upload/duet-upload.js +1838 -0
  83. package/lib/collection/components/duet-upload/errorcodes.utils.js +32 -0
  84. package/lib/collection/components/duet-upload/mock.helpers.js +91 -0
  85. package/lib/collection/components/duet-upload/upload.helpers.js +13 -0
  86. package/lib/collection/components/duet-upload/xhr.helpers.js +30 -0
  87. package/lib/collection/utils/js-utils.js +12 -0
  88. package/lib/collection/utils/language-utils.js +6 -3
  89. package/lib/collection/utils/watch-options.js +35 -6
  90. package/lib/custom-elements-bundle/index.d.ts +36 -0
  91. package/lib/custom-elements-bundle/index.js +1917 -277
  92. package/lib/duet/duet.esm.js +1 -1
  93. package/lib/duet/duet.js +1 -1
  94. package/lib/duet/{p-1391ec53.entry.js → p-00735436.entry.js} +1 -1
  95. package/lib/duet/p-060d79be.entry.js +4 -0
  96. package/lib/duet/p-0d22396e.system.js +16 -0
  97. package/lib/duet/p-10deead0.system.js +4 -0
  98. package/lib/duet/{p-72fd384a.entry.js → p-1208c84f.entry.js} +1 -1
  99. package/lib/duet/p-12721178.js +4 -0
  100. package/lib/duet/p-155ef581.system.entry.js +4 -0
  101. package/lib/duet/{p-08729381.entry.js → p-16c48c5d.entry.js} +1 -1
  102. package/lib/duet/p-1797df7b.system.entry.js +4 -0
  103. package/lib/duet/p-1a08fc22.system.entry.js +4 -0
  104. package/lib/duet/{p-b6a0caf8.system.entry.js → p-237e47b4.system.entry.js} +1 -1
  105. package/lib/duet/{p-4fcbcecd.system.entry.js → p-2443bdca.system.entry.js} +1 -1
  106. package/lib/duet/{p-432ba72e.system.entry.js → p-263bc9cd.system.entry.js} +1 -1
  107. package/lib/duet/p-2764f081.js +4 -0
  108. package/lib/duet/{p-b0bbbdba.system.entry.js → p-27d80cef.system.entry.js} +1 -1
  109. package/lib/duet/p-28e02c08.entry.js +4 -0
  110. package/lib/duet/{p-8740fa38.entry.js → p-2bb1460c.entry.js} +1 -1
  111. package/lib/duet/p-33c58756.entry.js +4 -0
  112. package/lib/duet/{p-9cdd361e.js → p-35a3794e.js} +0 -0
  113. package/lib/duet/{p-8c511832.system.entry.js → p-374fb7e6.system.entry.js} +1 -1
  114. package/lib/duet/{p-5a817929.system.entry.js → p-387823af.system.entry.js} +1 -1
  115. package/lib/duet/{p-a678da8c.entry.js → p-3af5d66f.entry.js} +1 -1
  116. package/lib/duet/{p-322d1c38.js → p-3c1971d8.js} +1 -1
  117. package/lib/duet/{p-d13874cb.entry.js → p-4607af59.entry.js} +1 -1
  118. package/lib/duet/{p-2c0dd9ba.system.entry.js → p-48d1eb1f.system.entry.js} +1 -1
  119. package/lib/duet/p-4a87e9ab.system.entry.js +4 -0
  120. package/lib/duet/{p-92103298.system.entry.js → p-4b6ebe40.system.entry.js} +1 -1
  121. package/lib/duet/{p-6cf41bfe.system.entry.js → p-4e28da18.system.entry.js} +1 -1
  122. package/lib/duet/p-548d484e.js +4 -0
  123. package/lib/duet/{p-2c679963.entry.js → p-5826523b.entry.js} +1 -1
  124. package/lib/duet/{p-7331f2fe.system.entry.js → p-58750bae.system.entry.js} +1 -1
  125. package/lib/duet/{p-7a868085.entry.js → p-597d99c7.entry.js} +1 -1
  126. package/lib/duet/p-5ea0cd19.entry.js +4 -0
  127. package/lib/duet/p-63d5bf73.system.entry.js +4 -0
  128. package/lib/duet/{p-68d09837.system.entry.js → p-67d9a9a9.system.entry.js} +1 -1
  129. package/lib/duet/{p-9542c540.entry.js → p-6a19b5ec.entry.js} +1 -1
  130. package/lib/duet/p-6cc3be76.system.entry.js +4 -0
  131. package/lib/duet/p-6e363557.system.js +4 -0
  132. package/lib/duet/{p-3b3bac3f.system.entry.js → p-6e6e76db.system.entry.js} +1 -1
  133. package/lib/duet/p-70fafc98.system.js +4 -0
  134. package/lib/duet/{p-2d1e2b23.system.entry.js → p-7368b14e.system.entry.js} +1 -1
  135. package/lib/duet/{p-2a3411b5.system.entry.js → p-751542a0.system.entry.js} +1 -1
  136. package/lib/duet/{p-b75c5f13.entry.js → p-794659ac.entry.js} +1 -1
  137. package/lib/duet/{p-b04d738f.system.entry.js → p-7e8d5bb9.system.entry.js} +1 -1
  138. package/lib/duet/p-7fee0d23.system.entry.js +4 -0
  139. package/lib/duet/p-81867417.system.js +4 -0
  140. package/lib/duet/{p-84ece735.entry.js → p-86daec1c.entry.js} +1 -1
  141. package/lib/duet/{p-94a5fd74.system.entry.js → p-8b5ca0e7.system.entry.js} +1 -1
  142. package/lib/duet/{p-ffc2ffff.entry.js → p-8cb7416d.entry.js} +1 -1
  143. package/lib/duet/p-8f826843.system.entry.js +4 -0
  144. package/lib/duet/p-94169303.entry.js +4 -0
  145. package/lib/duet/{p-807b2087.entry.js → p-9481e312.entry.js} +1 -1
  146. package/lib/duet/{p-977f2826.entry.js → p-984576c9.entry.js} +1 -1
  147. package/lib/duet/p-987edcd0.js +15 -0
  148. package/lib/duet/p-9d73343a.entry.js +4 -0
  149. package/lib/duet/{p-8652a7ab.system.entry.js → p-9dca5c22.system.entry.js} +1 -1
  150. package/lib/duet/p-a207b008.entry.js +4 -0
  151. package/lib/duet/p-a5b9c192.system.entry.js +4 -0
  152. package/lib/duet/p-a6a84ec6.entry.js +4 -0
  153. package/lib/duet/{p-9f0f5674.entry.js → p-a890da72.entry.js} +1 -1
  154. package/lib/duet/{p-0f2a478e.entry.js → p-a9859a82.entry.js} +1 -1
  155. package/lib/duet/{p-3040debf.entry.js → p-aba68b7b.entry.js} +1 -1
  156. package/lib/duet/p-acc57c77.entry.js +4 -0
  157. package/lib/duet/{p-2826f987.js → p-ad07f399.js} +1 -1
  158. package/lib/duet/{p-fb898d94.system.entry.js → p-aee24388.system.entry.js} +1 -1
  159. package/lib/duet/p-aef1b720.system.entry.js +4 -0
  160. package/lib/duet/{p-00eac879.system.entry.js → p-af41d894.system.entry.js} +1 -1
  161. package/lib/duet/p-b25d3769.js +4 -0
  162. package/lib/duet/{p-43dde575.system.entry.js → p-b32224fe.system.entry.js} +1 -1
  163. package/lib/duet/{p-f13a0883.entry.js → p-b3744481.entry.js} +1 -1
  164. package/lib/duet/{p-b374d7c2.system.js → p-b42d81c3.system.js} +1 -1
  165. package/lib/duet/{p-ed479d09.system.entry.js → p-b4e87f02.system.entry.js} +1 -1
  166. package/lib/duet/{p-b9683731.entry.js → p-bf93a991.entry.js} +1 -1
  167. package/lib/duet/{p-a962c8c1.system.js → p-c18a599e.system.js} +0 -0
  168. package/lib/duet/p-c2e77278.entry.js +4 -0
  169. package/lib/duet/p-c34329f3.entry.js +4 -0
  170. package/lib/duet/{p-c19094dd.entry.js → p-c36b4da0.entry.js} +1 -1
  171. package/lib/duet/{p-8002a095.entry.js → p-cdd70b93.entry.js} +1 -1
  172. package/lib/duet/p-d1c19f04.system.entry.js +4 -0
  173. package/lib/duet/{p-cc0bd28f.system.entry.js → p-d3a3c3c7.system.entry.js} +1 -1
  174. package/lib/duet/{p-19c28d99.system.entry.js → p-d4118b6e.system.entry.js} +1 -1
  175. package/lib/duet/{p-abd3bfb4.system.entry.js → p-d744d188.system.entry.js} +1 -1
  176. package/lib/duet/p-ddb6344c.system.js +4 -0
  177. package/lib/duet/p-de07c7d7.entry.js +4 -0
  178. package/lib/duet/{p-57cb58d4.system.entry.js → p-dfe79666.system.entry.js} +1 -1
  179. package/lib/duet/{p-c723d36e.system.js → p-e12f2b8b.system.js} +1 -1
  180. package/lib/duet/p-e2a44156.js +4 -0
  181. package/lib/duet/p-e76b722f.entry.js +4 -0
  182. package/lib/duet/{p-0b9b6393.entry.js → p-e964d062.entry.js} +1 -1
  183. package/lib/duet/p-eb55ccd2.system.js +4 -0
  184. package/lib/duet/p-f0a4b68d.system.entry.js +4 -0
  185. package/lib/duet/p-f364eb96.entry.js +4 -0
  186. package/lib/duet/{p-fbb7d194.entry.js → p-f8ce39fb.entry.js} +1 -1
  187. package/lib/esm/{dom-8516b24e.js → dom-58cd15f6.js} +1 -1
  188. package/lib/esm/duet-alert.entry.js +2 -2
  189. package/lib/esm/duet-badge.entry.js +1 -1
  190. package/lib/esm/duet-button_2.entry.js +4 -4
  191. package/lib/esm/duet-caption_4.entry.js +17 -10
  192. package/lib/esm/duet-card.entry.js +3 -3
  193. package/lib/esm/duet-checkbox.entry.js +2 -2
  194. package/lib/esm/duet-choice_2.entry.js +41 -19
  195. package/lib/esm/duet-collapsible.entry.js +4 -1
  196. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  197. package/lib/esm/duet-date-picker.entry.js +7 -7
  198. package/lib/esm/duet-divider_2.entry.js +1 -1
  199. package/lib/esm/duet-editable-table-button_3.entry.js +226 -0
  200. package/lib/esm/{duet-table.entry.js → duet-editable-table_3.entry.js} +205 -3
  201. package/lib/esm/duet-empty-state.entry.js +1 -1
  202. package/lib/esm/duet-footer.entry.js +2 -2
  203. package/lib/esm/duet-grid_2.entry.js +52 -4
  204. package/lib/esm/duet-header_2.entry.js +3 -3
  205. package/lib/esm/duet-hero.entry.js +2 -2
  206. package/lib/esm/duet-icon.entry.js +4 -4
  207. package/lib/esm/duet-input_2.entry.js +6 -6
  208. package/lib/esm/duet-layout.entry.js +1 -1
  209. package/lib/esm/duet-list_2.entry.js +2 -2
  210. package/lib/esm/duet-modal.entry.js +3 -3
  211. package/lib/esm/duet-notification_2.entry.js +2 -2
  212. package/lib/esm/duet-number-input.entry.js +2 -2
  213. package/lib/esm/duet-progress.entry.js +71 -0
  214. package/lib/esm/duet-radio_2.entry.js +2 -2
  215. package/lib/esm/duet-range-slider.entry.js +2 -2
  216. package/lib/esm/duet-select.entry.js +5 -5
  217. package/lib/esm/duet-step_2.entry.js +1 -1
  218. package/lib/esm/duet-tab_2.entry.js +3 -3
  219. package/lib/esm/duet-textarea.entry.js +5 -5
  220. package/lib/esm/duet-toggle.entry.js +1 -1
  221. package/lib/esm/duet-tooltip.entry.js +2 -2
  222. package/lib/esm/duet-tray.entry.js +3 -3
  223. package/lib/esm/duet-upload.entry.js +1085 -0
  224. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  225. package/lib/esm/duet.js +4 -4
  226. package/lib/esm/{focus-utils-6a282066.js → focus-utils-1fe0dcd0.js} +1 -1
  227. package/lib/esm/{index-3a265449.js → index-84d97bd1.js} +5 -2
  228. package/lib/esm/js-utils-b69f17df.js +14 -0
  229. package/lib/esm/{language-utils-d5c38f65.js → language-utils-344d894c.js} +6 -3
  230. package/lib/esm/loader.js +3 -3
  231. package/lib/esm/{shadow-css-9178c864.js → shadow-css-7c726abb.js} +9 -10
  232. package/lib/esm/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  233. package/lib/esm/{tokens.module-edb66c04.js → tokens.module-49cbf963.js} +3 -1
  234. package/lib/esm/watch-options-dd55bce8.js +57 -0
  235. package/lib/esm-es5/{dom-8516b24e.js → dom-58cd15f6.js} +0 -0
  236. package/lib/esm-es5/duet-alert.entry.js +1 -1
  237. package/lib/esm-es5/duet-badge.entry.js +1 -1
  238. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  239. package/lib/esm-es5/duet-caption_4.entry.js +2 -2
  240. package/lib/esm-es5/duet-card.entry.js +1 -1
  241. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  242. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  243. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  244. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  245. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  246. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  247. package/lib/esm-es5/duet-editable-table-button_3.entry.js +4 -0
  248. package/lib/esm-es5/duet-editable-table_3.entry.js +4 -0
  249. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  250. package/lib/esm-es5/duet-footer.entry.js +1 -1
  251. package/lib/esm-es5/duet-grid_2.entry.js +2 -2
  252. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  253. package/lib/esm-es5/duet-hero.entry.js +1 -1
  254. package/lib/esm-es5/duet-icon.entry.js +1 -1
  255. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  256. package/lib/esm-es5/duet-layout.entry.js +1 -1
  257. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  258. package/lib/esm-es5/duet-modal.entry.js +1 -1
  259. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  260. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  261. package/lib/esm-es5/duet-progress.entry.js +4 -0
  262. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  263. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  264. package/lib/esm-es5/duet-select.entry.js +1 -1
  265. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  266. package/lib/esm-es5/duet-tab_2.entry.js +2 -2
  267. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  268. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  269. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  270. package/lib/esm-es5/duet-tray.entry.js +1 -1
  271. package/lib/esm-es5/duet-upload.entry.js +4 -0
  272. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  273. package/lib/esm-es5/duet.js +1 -1
  274. package/lib/esm-es5/{focus-utils-6a282066.js → focus-utils-1fe0dcd0.js} +1 -1
  275. package/lib/esm-es5/index-84d97bd1.js +4 -0
  276. package/lib/esm-es5/js-utils-b69f17df.js +4 -0
  277. package/lib/esm-es5/{language-utils-d5c38f65.js → language-utils-344d894c.js} +1 -1
  278. package/lib/esm-es5/loader.js +1 -1
  279. package/lib/esm-es5/shadow-css-7c726abb.js +15 -0
  280. package/lib/esm-es5/{token-utils-5a35377f.js → token-utils-590d9413.js} +1 -1
  281. package/lib/esm-es5/tokens.module-49cbf963.js +4 -0
  282. package/lib/esm-es5/watch-options-dd55bce8.js +4 -0
  283. package/lib/types/components/duet-choice/duet-choice.d.ts +20 -1
  284. package/lib/types/components/duet-date-picker/duet-date-picker.d.ts +5 -5
  285. package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +72 -0
  286. package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +72 -0
  287. package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +7 -0
  288. package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +84 -0
  289. package/lib/types/components/duet-grid/duet-grid.d.ts +16 -2
  290. package/lib/types/components/duet-heading/duet-heading.d.ts +2 -2
  291. package/lib/types/components/duet-icon/duet-icon.d.ts +1 -1
  292. package/lib/types/components/duet-paragraph/duet-paragraph.d.ts +9 -1
  293. package/lib/types/components/duet-progress/duet-progress.d.ts +64 -0
  294. package/lib/types/components/duet-upload/duet-upload-aria-status.d.ts +49 -0
  295. package/lib/types/components/duet-upload/duet-upload-editable-item-error.d.ts +7 -0
  296. package/lib/types/components/duet-upload/duet-upload-editable-item-inprogres.d.ts +7 -0
  297. package/lib/types/components/duet-upload/duet-upload-editable-item-success.d.ts +8 -0
  298. package/lib/types/components/duet-upload/duet-upload-validators.d.ts +12 -0
  299. package/lib/types/components/duet-upload/duet-upload.d.ts +380 -0
  300. package/lib/types/components/duet-upload/errorcodes.utils.d.ts +8 -0
  301. package/lib/types/components/duet-upload/mock.helpers.d.ts +2 -0
  302. package/lib/types/components/duet-upload/upload.helpers.d.ts +1 -0
  303. package/lib/types/components/duet-upload/xhr.helpers.d.ts +18 -0
  304. package/lib/types/components.d.ts +789 -19
  305. package/lib/types/utils/js-utils.d.ts +1 -0
  306. package/lib/types/utils/language-utils.d.ts +5 -1
  307. package/lib/types/utils/watch-options.d.ts +2 -0
  308. package/package.json +6 -6
  309. package/lib/cjs/duet-fieldset.cjs.entry.js +0 -62
  310. package/lib/duet/p-0058512b.js +0 -4
  311. package/lib/duet/p-0b00e8d6.system.js +0 -16
  312. package/lib/duet/p-15922601.system.js +0 -4
  313. package/lib/duet/p-194e25ce.system.entry.js +0 -4
  314. package/lib/duet/p-1d87ea02.system.entry.js +0 -4
  315. package/lib/duet/p-3618aaee.entry.js +0 -4
  316. package/lib/duet/p-40d68321.entry.js +0 -4
  317. package/lib/duet/p-418b2ce7.system.js +0 -4
  318. package/lib/duet/p-43e39d98.system.js +0 -4
  319. package/lib/duet/p-4603830b.entry.js +0 -4
  320. package/lib/duet/p-52d7fbec.entry.js +0 -4
  321. package/lib/duet/p-60478325.system.entry.js +0 -4
  322. package/lib/duet/p-64ed7add.entry.js +0 -4
  323. package/lib/duet/p-6a356ab1.system.js +0 -4
  324. package/lib/duet/p-753b406c.entry.js +0 -4
  325. package/lib/duet/p-76c00d0c.entry.js +0 -4
  326. package/lib/duet/p-85fe1132.js +0 -4
  327. package/lib/duet/p-8c8e82aa.system.js +0 -4
  328. package/lib/duet/p-9a89ec39.js +0 -4
  329. package/lib/duet/p-a11df1b6.js +0 -15
  330. package/lib/duet/p-a1eccee1.system.entry.js +0 -4
  331. package/lib/duet/p-a89e88a3.js +0 -4
  332. package/lib/duet/p-ade33230.entry.js +0 -4
  333. package/lib/duet/p-cb827bb7.entry.js +0 -4
  334. package/lib/duet/p-d85fba2c.system.entry.js +0 -4
  335. package/lib/duet/p-dfa90f8a.system.entry.js +0 -4
  336. package/lib/duet/p-e6b9bd1d.entry.js +0 -4
  337. package/lib/duet/p-ec3eef3a.entry.js +0 -4
  338. package/lib/duet/p-ee64d6be.system.entry.js +0 -4
  339. package/lib/duet/p-f113671b.system.entry.js +0 -4
  340. package/lib/duet/p-f2f04396.entry.js +0 -4
  341. package/lib/duet/p-f364ce8b.system.entry.js +0 -4
  342. package/lib/duet/p-fc6624fe.system.entry.js +0 -4
  343. package/lib/esm/duet-fieldset.entry.js +0 -58
  344. package/lib/esm/watch-options-de55ea78.js +0 -35
  345. package/lib/esm-es5/duet-fieldset.entry.js +0 -4
  346. package/lib/esm-es5/duet-table.entry.js +0 -4
  347. package/lib/esm-es5/index-3a265449.js +0 -4
  348. package/lib/esm-es5/shadow-css-9178c864.js +0 -15
  349. package/lib/esm-es5/tokens.module-edb66c04.js +0 -4
  350. package/lib/esm-es5/watch-options-de55ea78.js +0 -4
@@ -0,0 +1,64 @@
1
+ import { DuetTheme } from "../../common-types";
2
+ import { DuetLangObject } from "../../utils/language-utils";
3
+ import { ThemeableComponent } from "../../utils/themeable-component";
4
+ export declare type DuetUploadEvent = {
5
+ originalEvent?: Event;
6
+ data?: Record<string, any>;
7
+ component: "duet-progress";
8
+ scoped: true;
9
+ };
10
+ export declare class DuetProgress implements ThemeableComponent {
11
+ /**
12
+ * Own Properties
13
+ */
14
+ private progressId;
15
+ private progressLabelId;
16
+ /**
17
+ * Reference to host HTML element.
18
+ */
19
+ element: HTMLElement;
20
+ /**
21
+ * Indicates the id of a component that describes the upload component.
22
+ */
23
+ accessibleDescribedBy: string;
24
+ /**
25
+ * Indicates the aria-label of the component -
26
+ * this will get combined with an label+uploading when uploading,
27
+ * and label+upload complete when upload is complete
28
+ */
29
+ accessibleLabel: string;
30
+ /**
31
+ * Defaults for accessibleLabel
32
+ */
33
+ accessibleLabelUploadDefaults: DuetLangObject | string;
34
+ /**
35
+ * Adds accessible label for upload in progress and upload complete states
36
+ * @default {fi: ["lähetys valmis", "lähetys käynnissä"],sv: ["Uppladdningen är klar", "Uppladdning pågår"], en: ["completed", "in progress"]}
37
+ */
38
+ accessibleLabelUpload: string;
39
+ /**
40
+ * Progress of the bar, a value from 0-100
41
+ */
42
+ progress: number;
43
+ /**
44
+ * Caption (underneath label) that can be set as a way of adding extra information
45
+ */
46
+ caption: string;
47
+ /**
48
+ * Height of progressbar
49
+ */
50
+ height: string;
51
+ /**
52
+ * Theme of the input.
53
+ */
54
+ theme: DuetTheme;
55
+ /**
56
+ * Component lifecycle events.
57
+ */
58
+ componentWillLoad(): void;
59
+ /**
60
+ * render() function
61
+ * Always the last one in the class.
62
+ */
63
+ render(): any;
64
+ }
@@ -0,0 +1,49 @@
1
+ export declare type StatusMessage = {
2
+ inProgress: string;
3
+ inProgressWithErrors: string;
4
+ done: string;
5
+ doneWithErrors: string;
6
+ file: string;
7
+ files: string;
8
+ };
9
+ export declare class DuetUploadAriaStatus {
10
+ /**
11
+ * State() variables
12
+ */
13
+ statusMessage: string;
14
+ /**
15
+ * State() variables
16
+ */
17
+ statusMessageLabel: StatusMessage;
18
+ /**
19
+ * Adds accessible label that is read aloud
20
+ */
21
+ accessibleAriaLive: "off" | "polite" | "assertive";
22
+ /**
23
+ * valid file amount
24
+ */
25
+ valid: number;
26
+ /**
27
+ * total files
28
+ */
29
+ total: number;
30
+ /**
31
+ * invalid file amount
32
+ */
33
+ invalid: number;
34
+ /**
35
+ * valid file amount
36
+ */
37
+ inprogress: number;
38
+ watchHandler(newValue: boolean, oldValue: boolean): void;
39
+ /**
40
+ * Component lifecycle events.
41
+ */
42
+ private replacePlaceHolders;
43
+ private getStatusMessage;
44
+ /**
45
+ * render() function
46
+ * Always the last one in the class.
47
+ */
48
+ render(): any;
49
+ }
@@ -0,0 +1,7 @@
1
+ import { FunctionalComponent } from "../../stencil-public-runtime";
2
+ import { DuetFileListItem } from "./duet-upload";
3
+ interface ErrorProps {
4
+ data: DuetFileListItem;
5
+ }
6
+ export declare const ErrorItem: FunctionalComponent<ErrorProps>;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FunctionalComponent } from "../../stencil-public-runtime";
2
+ interface ProgressProps {
3
+ progress: any;
4
+ name: string;
5
+ }
6
+ export declare const ProgressItem: FunctionalComponent<ProgressProps>;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FunctionalComponent } from "../../stencil-public-runtime";
2
+ import { DuetFileListItem } from "./duet-upload";
3
+ interface SuccessProps {
4
+ data: DuetFileListItem;
5
+ showLinks: boolean;
6
+ }
7
+ export declare const SuccessItem: FunctionalComponent<SuccessProps>;
8
+ export {};
@@ -0,0 +1,12 @@
1
+ import { StringMap } from "./duet-upload";
2
+ export declare const validateFileExtension: (name: string, allowedExtensions: string) => boolean;
3
+ export declare const validateFileMime: (type: any, allowedMimetypes: string) => boolean;
4
+ export declare const validateFileSize: (size: any, maxBytes: any) => boolean;
5
+ export declare const validateFile: (item: any, validators: Record<string, any>) => {
6
+ valid: boolean;
7
+ errorMessage: any;
8
+ errorSystem: string;
9
+ errorType: string;
10
+ };
11
+ export declare const validateTotalSizeIsAboveMax: (filelist: StringMap, maxTotalBytes: number) => boolean;
12
+ export declare const validateTotalAmountIsAboveMax: (filelist: StringMap, maxFiles: number) => boolean;
@@ -0,0 +1,380 @@
1
+ import { EventEmitter } from "../../stencil-public-runtime";
2
+ import { DuetMargin, DuetTheme } from "../../common-types";
3
+ import { FormComponent } from "../../utils/form-components";
4
+ import { DuetLangObject } from "../../utils/language-utils";
5
+ import { ThemeableComponent } from "../../utils/themeable-component";
6
+ import { DuetEditableTableGroupNames } from "../duet-editable-table/duet-editable-table";
7
+ import { DuetEditableTableActions } from "../duet-editable-table/duet-editable-table-item";
8
+ import { StatusMessage } from "./duet-upload-aria-status";
9
+ import { DuetUploadErrorCode } from "./errorcodes.utils";
10
+ import { DuetXhrRequest } from "./xhr.helpers";
11
+ export declare type DuetUploadEvent = {
12
+ originalEvent?: Event;
13
+ data?: Record<string, any>;
14
+ metaData?: Record<string, any>;
15
+ component: "duet-upload";
16
+ };
17
+ export declare type DuetFileListItem = {
18
+ uid: string;
19
+ item: File | null;
20
+ size: number;
21
+ meta?: Record<string, any>;
22
+ uploaded: boolean;
23
+ error: DuetUploadErrorCode;
24
+ progress: number;
25
+ deleted: boolean;
26
+ valid: boolean;
27
+ xhr: DuetXhrRequest | false;
28
+ url: string | false;
29
+ group?: string;
30
+ html?: string;
31
+ status?: number;
32
+ };
33
+ export interface StringMap {
34
+ [key: string]: any;
35
+ }
36
+ /**
37
+ * @slot header - named slot - to place content after description / caption
38
+ * @slot fileheader - named slot - to place content above "filelist" (only displayed when "filelist" contains items)
39
+ * @slot filelist - named slot - should always contain a configurable duet-editable-table or a component that exposes the same functionality
40
+ * @slot filefooter - named slot - to place content below "filelist" (only displayed when "filelist" contains items)
41
+ */
42
+ export declare class DuetUpload implements ThemeableComponent, FormComponent {
43
+ /**
44
+ * Own Properties
45
+ */
46
+ private buttonId;
47
+ private labelId;
48
+ private uploadId;
49
+ private editableTableId;
50
+ private filesInProgress;
51
+ private fileMaxReached;
52
+ private bytesMaxReached;
53
+ private metaData;
54
+ private nativeInput?;
55
+ /**
56
+ * Properties
57
+ */
58
+ private DefaultGroups;
59
+ /**
60
+ * Reference to host HTML element.
61
+ */
62
+ element: HTMLElement;
63
+ /**
64
+ * State() variables
65
+ */
66
+ tick: number;
67
+ /**
68
+ * Indicates the id of a related component’s visually focused element.
69
+ */
70
+ accessibleActiveDescendant: string;
71
+ /**
72
+ * Indicates the id of a component that describes the upload component.
73
+ */
74
+ accessibleDescribedBy: string;
75
+ /**
76
+ * Use this prop to add an aria-controls attribute. Use the attribute to
77
+ * indicate the id of a component controlled by this component.
78
+ */
79
+ accessibleControls: string;
80
+ /**
81
+ * Indicates the id of a component owned by the input.
82
+ */
83
+ accessibleOwns: string;
84
+ /**
85
+ * If external is set to true, the upload component will not actually upload the files, but only keep states
86
+ * it will be up to you to handle the upload and return progress information to the upload-component
87
+ */
88
+ external: boolean;
89
+ /**
90
+ * If set the upload component will not display an upload button, you will have to create on yourself
91
+ * and call the exposed methods startUpload
92
+ */
93
+ hideButton: boolean;
94
+ /**
95
+ * Default actions added to all files
96
+ */
97
+ actions: DuetEditableTableActions | string;
98
+ /**
99
+ * Endpoint URI that is capable of receiving the files
100
+ */
101
+ uri: string;
102
+ /**
103
+ * If enabled the filelist will create links on successfully uploaded items,
104
+ * this requires the server can respond with link URIs in the correct format
105
+ */
106
+ showLinks: boolean;
107
+ /**
108
+ * Caption (underneath label) that can be set as a way of adding extra information
109
+ */
110
+ caption: string;
111
+ /**
112
+ * Property to change the aria upload progress text read aloud by screenreaders
113
+ * @default {
114
+ fi: "Lisää liite",
115
+ sv: "Lägg till en bilaga",
116
+ en: "Choose files",
117
+ }
118
+ */
119
+ statusLabelDefaults: DuetLangObject | string;
120
+ /**
121
+ * Strings used for the status aria-label
122
+ */
123
+ statusMessageLabel: StatusMessage;
124
+ /**
125
+ * Property to change descriptionDefaults defaults on the component.
126
+ * normally you would handle these strings on an application level and override @label when needed
127
+ * @default {
128
+ fi: "Lisää liite",
129
+ sv: "Lägg till en bilaga",
130
+ en: "Add an attachment",
131
+ }
132
+ */
133
+ buttonLabelDefaults: DuetLangObject | string;
134
+ /**
135
+ * Label of button
136
+ * @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment" }
137
+ */
138
+ buttonLabel: string;
139
+ /**
140
+ * accessible Label of button
141
+ */
142
+ accessibleButtonLabel: string;
143
+ /**
144
+ * Theme of the input.
145
+ */
146
+ theme: DuetTheme;
147
+ /**
148
+ * Makes the input component disabled. This prevents users from being able to
149
+ * interact with the upload component, and conveys its inactive state to assistive technologies.
150
+ */
151
+ disabled: boolean;
152
+ /**
153
+ * Adds a unique identifier for the upload component.
154
+ */
155
+ identifier: string;
156
+ /**
157
+ * Controls the margin of the component.
158
+ */
159
+ margin: DuetMargin;
160
+ /**
161
+ * Set whether the input is required or not. Please note that this is necessary for
162
+ * accessible inputs when the user is required to fill them. When using this property
163
+ * you need to also set “novalidate” attribute to your form element to prevent
164
+ * browser from displaying its own validation errors.
165
+ */
166
+ required: boolean;
167
+ /**
168
+ * Array of group names that you want the editable table used to display files to display
169
+ * @required
170
+ * @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}]
171
+ */
172
+ groups: DuetEditableTableGroupNames | string;
173
+ /**
174
+ * Visually hides the groups labels in the editable table list used to display the list of files
175
+ */
176
+ hideGroups: boolean;
177
+ /**
178
+ * Map of string that contain list of uploaded files.
179
+ */
180
+ files: StringMap;
181
+ /**
182
+ * Property to read if filelist contains errors or not
183
+ */
184
+ valid: boolean;
185
+ watchValidHandler(newValue: boolean, oldValue: boolean): void;
186
+ /**
187
+ * Property to change labelDefaults defaults on the component.
188
+ * normally you would handle these strings on an application level and override @label when needed
189
+ * @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
190
+ */
191
+ labelDefaults: DuetLangObject | string;
192
+ /**
193
+ * Label for the input.
194
+ * @default { fi: "Lisää liite",sv: "Lägg till en bilaga",en: "Add attachments"}
195
+ */
196
+ label: string;
197
+ /**
198
+ * Property to change descriptionDefaults defaults on the component.
199
+ * normally you would handle these strings on an application level and override @label when needed
200
+ * @default {
201
+ fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
202
+ sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
203
+ en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.",
204
+ }
205
+ */
206
+ descriptionDefaults: DuetLangObject | string;
207
+ /**
208
+ * Description for the upload component.
209
+ * @default {
210
+ fi: "Voit liittää {filetypes}-muotoisia tiedostoja sekä yleisimpiä videotiedostoja. Voit lähettää {maxbytes} verran tiedostoja yhdellä kertaa, ja lisätä enintään {maxfiles} liitettä kerrallaan.",
211
+ sv: "Du kan bifoga filer i flg. formater {filetypes} samt de vanligaste videofilerna. Du kan ladda upp {maxbytes} filer åt gången och lägga till upp till {maxfiles} bilagor åt gången.",
212
+ en: "You may attach the following filetypes: {filetypes} - as well as the most common video files. You can upload {maxbytes} of files at a time, and add up to {maxfiles} attachments at a time.",
213
+ }
214
+ */
215
+ description: string;
216
+ /**
217
+ * Defaults for the filelist's empty state.
218
+ * @default {
219
+ fi: "Ei vielä lisättyjä tiedostoja.",
220
+ sv: "Inga filer har lagts till ännu.",
221
+ en: "No files added yet.",
222
+ }
223
+ */
224
+ fileListEmptyDefaults: DuetLangObject | string;
225
+ /**
226
+ * Label for the filelist's empty state.
227
+ * @default { fi: "Ei vielä lisättyjä tiedostoja.",sv: "Inga filer har lagts till ännu.",en: "No files added yet."}
228
+ */
229
+ fileListEmpty: string;
230
+ /**
231
+ * Display the input in error state along with an error message.
232
+ */
233
+ error: string;
234
+ /**
235
+ * Name of the upload component.
236
+ */
237
+ name: string;
238
+ /**
239
+ * Use maxBytes to specify the maximum size in Bytes of a file that can be uploaded.
240
+ */
241
+ maxBytes: number;
242
+ /**
243
+ * Use maxBytesTotal to specify the maximum size in Bytes of All files combined that can be uploaded.
244
+ */
245
+ maxBytesTotal: number;
246
+ /**
247
+ * Use maxFiles to specify the maximum amount of files that can be uploaded
248
+ */
249
+ maxFiles: number;
250
+ /**
251
+ * A string of commaseperated file type values that are allowed
252
+ * @example: .pdf,.doc,.docx
253
+ */
254
+ allowedExtensions: string;
255
+ /**
256
+ * A string of commaseperated mime type values that are allowed
257
+ * @example: image/*,application/msword,
258
+ */
259
+ allowedMimetypes: string;
260
+ /**
261
+ * Use multiple to allow the user to select multiple files when uploading
262
+ */
263
+ multiple: boolean;
264
+ /**
265
+ * Use limitSelection to enforce the value in allowedExtension & allowedMimetypes when selecting files,
266
+ * by default this is off, setting this to true will limit the users choices to what has been explicitly set
267
+ */
268
+ limitSelection: boolean;
269
+ /**
270
+ * Value of the input.
271
+ */
272
+ value: string;
273
+ /**
274
+ * Emitted when the value has changed.
275
+ */
276
+ duetChange: EventEmitter<DuetUploadEvent>;
277
+ /**
278
+ * Emitted when the input loses focus.
279
+ */
280
+ duetBlur: EventEmitter<DuetUploadEvent>;
281
+ /**
282
+ * Emitted when the input has focus.
283
+ */
284
+ duetFocus: EventEmitter<DuetUploadEvent>;
285
+ /**
286
+ * Emitted when the current upload batch finishes
287
+ */
288
+ duetDone: EventEmitter<DuetUploadEvent>;
289
+ /**
290
+ * Emitted when the current validation state changes internally
291
+ */
292
+ duetState: EventEmitter<DuetUploadEvent>;
293
+ /**
294
+ * Emitted when a user clicks delete to delete an uploaded file, or a file entry with error
295
+ */
296
+ duetDelete: EventEmitter<DuetUploadEvent>;
297
+ /**
298
+ * Emitted when a user clicks cancel on an upload in progress
299
+ */
300
+ duetCancel: EventEmitter<DuetUploadEvent>;
301
+ /**
302
+ * Emitted when the file progress is updated.
303
+ */
304
+ duetProgress: EventEmitter<DuetUploadEvent>;
305
+ /**
306
+ * Emitted when the user clicks the upload button
307
+ */
308
+ duetUpload: EventEmitter<DuetUploadEvent>;
309
+ /**
310
+ * Component lifecycle events.
311
+ */
312
+ componentWillLoad(): void;
313
+ componentWillRender(): void;
314
+ /**
315
+ * Private functions
316
+ */
317
+ private listenForActionEvents;
318
+ private verifyValidity;
319
+ private getGroupFromItemData;
320
+ private getItemHTMLFromItemData;
321
+ private convertToDuetEditableTableItems;
322
+ private kick;
323
+ private genHashName;
324
+ private updateValueInMap;
325
+ private updateProgress;
326
+ private trackProgress;
327
+ private getFilesAsArray;
328
+ private resetFormFields;
329
+ private startUpload;
330
+ /**
331
+ * Eventlisteners for the XHR requests
332
+ */
333
+ private transferComplete;
334
+ private transferDone;
335
+ private transferDoneWithFailure;
336
+ private transferFailed;
337
+ private transferCanceled;
338
+ private validateTotals;
339
+ /**
340
+ * XHR request utilities
341
+ */
342
+ private makeXHRPostRequest;
343
+ private makeXHRDeleteRequest;
344
+ /**
345
+ * Component event handling.
346
+ */
347
+ private onChange;
348
+ private onDelete;
349
+ private onCancel;
350
+ private onUpload;
351
+ private onBlur;
352
+ private onProgress;
353
+ private onFocus;
354
+ private onDone;
355
+ /**
356
+ * Sets focus on the specified `duet-input`. Use this method instead of the global
357
+ * `input.focus()`.
358
+ */
359
+ setFocus(options?: FocusOptions): Promise<void>;
360
+ /**
361
+ * Method for invoking the upload sequence
362
+ */
363
+ upload(metaData?: any | undefined): Promise<void>;
364
+ /**
365
+ * Get list of files, divided in errors and valid sections
366
+ */
367
+ getFiles(): Promise<false | {
368
+ valid: any[];
369
+ invalid: any[];
370
+ }>;
371
+ /**
372
+ * Convenience method for updating a of an item in the files attribute
373
+ */
374
+ updateValue(item: string, key: string, value: any): Promise<void>;
375
+ /**
376
+ * render() function
377
+ * Always the last one in the class.
378
+ */
379
+ render(): any;
380
+ }
@@ -0,0 +1,8 @@
1
+ import { DuetLangObject } from "../../utils/language-utils";
2
+ export declare type DuetUploadErrorCode = {
3
+ type: string | undefined;
4
+ system_message: string | undefined;
5
+ message: DuetLangObject | undefined;
6
+ };
7
+ export declare const getError: (code: string) => DuetUploadErrorCode;
8
+ export declare const getI18nError: (errorCode: string) => any;
@@ -0,0 +1,2 @@
1
+ /** list of mock File elements to pass the duet-upload component */
2
+ export declare function getBrowsedFiles(): Map<any, any>;
@@ -0,0 +1 @@
1
+ export declare const formatBytes: (bytes: any, decimals?: number) => string;
@@ -0,0 +1,18 @@
1
+ export declare type DuetXhrRequestOptions = {
2
+ type: "POST" | "DELETE";
3
+ xhr: XMLHttpRequest;
4
+ argument: string | null;
5
+ uri: string;
6
+ headers: Record<string, string> | null;
7
+ };
8
+ export declare type failureHandler = (xhr: XMLHttpRequest, name: string, status: XMLHttpRequest["status"]) => void;
9
+ export declare type successHandler = (xhr: XMLHttpRequest, name: string, status: XMLHttpRequest["status"]) => void;
10
+ export declare type progressTracker = (name: string) => void;
11
+ export declare type DuetXhrRequest = (payload: Record<string, any>, options: Partial<DuetXhrRequestOptions>, onFailure: failureHandler, onSuccess: successHandler, onProgress: progressTracker) => XMLHttpRequest;
12
+ export declare const makeXhrRequest: ({ payload, options, onFailure, onSuccess, onProgress }: {
13
+ payload: any;
14
+ options: any;
15
+ onFailure: any;
16
+ onSuccess: any;
17
+ onProgress: any;
18
+ }) => DuetXhrRequest;