@duetds/components 4.33.0 → 4.33.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 (253) hide show
  1. package/hydrate/index.js +82 -40
  2. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  3. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-card.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  8. package/lib/cjs/duet-choice_2.cjs.entry.js +2 -3
  9. package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  12. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-editable-table-button.cjs.entry.js +89 -0
  14. package/lib/cjs/{duet-upload.cjs.entry.js → duet-editable-table_4.cjs.entry.js} +386 -30
  15. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  16. package/lib/cjs/duet-fieldset.cjs.entry.js +62 -0
  17. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-icon.cjs.entry.js +16 -6
  22. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-modal.cjs.entry.js +2 -2
  26. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
  28. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  30. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  31. package/lib/cjs/duet-select.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-tab_2.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  35. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  36. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  37. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +100 -0
  39. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  40. package/lib/cjs/duet.cjs.js +2 -2
  41. package/lib/cjs/{focus-utils-a7a1fb8b.js → focus-utils-b609a7a5.js} +1 -1
  42. package/lib/cjs/{index-b724d698.js → index-9a57d969.js} +8 -1
  43. package/lib/cjs/loader.cjs.js +2 -2
  44. package/lib/collection/collection-manifest.json +9 -8
  45. package/lib/collection/components/duet-choice/duet-choice.js +0 -1
  46. package/lib/collection/components/duet-icon/icon-utils.js +15 -5
  47. package/lib/collection/components/duet-upload/duet-upload.js +72 -47
  48. package/lib/collection/components/duet-upload/{duet-upload-editable-item-error.js → upload-editable-item-error.js} +0 -0
  49. package/lib/collection/components/duet-upload/{duet-upload-editable-item-inprogres.js → upload-editable-item-inprogres.js} +0 -0
  50. package/lib/collection/components/duet-upload/{duet-upload-editable-item-success.js → upload-editable-item-success.js} +0 -0
  51. package/lib/collection/components/duet-upload/{duet-upload-validators.js → upload-validators.js} +0 -0
  52. package/lib/collection/components/{duet-upload → duet-upload-aria-status}/duet-upload-aria-status.js +3 -3
  53. package/lib/custom-elements-bundle/index.js +75 -36
  54. package/lib/duet/duet.esm.js +1 -1
  55. package/lib/duet/duet.js +1 -1
  56. package/lib/duet/{p-a207b008.entry.js → p-00210a63.entry.js} +1 -1
  57. package/lib/duet/{p-8cb7416d.entry.js → p-0205162d.entry.js} +1 -1
  58. package/lib/duet/{p-d744d188.system.entry.js → p-020a2c42.system.entry.js} +1 -1
  59. package/lib/duet/{p-c36b4da0.entry.js → p-079795e5.entry.js} +1 -1
  60. package/lib/duet/{p-6e6e76db.system.entry.js → p-09013a48.system.entry.js} +1 -1
  61. package/lib/duet/p-0a89315d.entry.js +4 -0
  62. package/lib/duet/{p-6cc3be76.system.entry.js → p-0e90f075.system.entry.js} +1 -1
  63. package/lib/duet/{p-8f826843.system.entry.js → p-19d7d9d5.system.entry.js} +1 -1
  64. package/lib/duet/{p-c2e77278.entry.js → p-1cbc6269.entry.js} +1 -1
  65. package/lib/duet/{p-a5b9c192.system.entry.js → p-2297d13f.system.entry.js} +1 -1
  66. package/lib/duet/{p-263bc9cd.system.entry.js → p-2a822e91.system.entry.js} +1 -1
  67. package/lib/duet/{p-2bb1460c.entry.js → p-2fdcff82.entry.js} +1 -1
  68. package/lib/duet/{p-67d9a9a9.system.entry.js → p-3013c9bb.system.entry.js} +1 -1
  69. package/lib/duet/{p-c34329f3.entry.js → p-3212a556.entry.js} +1 -1
  70. package/lib/duet/{p-b32224fe.system.entry.js → p-323643af.system.entry.js} +1 -1
  71. package/lib/duet/{p-a9859a82.entry.js → p-32b7397d.entry.js} +1 -1
  72. package/lib/duet/{p-6a19b5ec.entry.js → p-360086f8.entry.js} +1 -1
  73. package/lib/duet/{p-bf93a991.entry.js → p-37cda933.entry.js} +1 -1
  74. package/lib/duet/{p-af41d894.system.entry.js → p-3ba62cf1.system.entry.js} +1 -1
  75. package/lib/duet/{p-4a87e9ab.system.entry.js → p-3fd9190b.system.entry.js} +1 -1
  76. package/lib/duet/{p-acc57c77.entry.js → p-43847557.entry.js} +1 -1
  77. package/lib/duet/{p-374fb7e6.system.entry.js → p-4b6e8558.system.entry.js} +1 -1
  78. package/lib/duet/p-4c5eedf8.entry.js +4 -0
  79. package/lib/duet/{p-a6a84ec6.entry.js → p-4c827f0d.entry.js} +1 -1
  80. package/lib/duet/{p-b42d81c3.system.js → p-51955fc0.system.js} +1 -1
  81. package/lib/duet/{p-e964d062.entry.js → p-5cfc53f9.entry.js} +1 -1
  82. package/lib/duet/{p-2443bdca.system.entry.js → p-5decc259.system.entry.js} +1 -1
  83. package/lib/duet/{p-548d484e.js → p-5e0071d6.js} +1 -1
  84. package/lib/duet/p-5e77432e.system.entry.js +4 -0
  85. package/lib/duet/{p-58750bae.system.entry.js → p-6024e484.system.entry.js} +1 -1
  86. package/lib/duet/{p-9d73343a.entry.js → p-68008644.entry.js} +1 -1
  87. package/lib/duet/p-69385972.system.entry.js +4 -0
  88. package/lib/duet/{p-4e28da18.system.entry.js → p-6a4d85ed.system.entry.js} +1 -1
  89. package/lib/duet/{p-984576c9.entry.js → p-6a5ab3eb.entry.js} +1 -1
  90. package/lib/duet/{p-aba68b7b.entry.js → p-6e4b1c0d.entry.js} +1 -1
  91. package/lib/duet/{p-27d80cef.system.entry.js → p-6f36f647.system.entry.js} +1 -1
  92. package/lib/duet/{p-7e8d5bb9.system.entry.js → p-6fa6c4fb.system.entry.js} +1 -1
  93. package/lib/duet/{p-d1c19f04.system.entry.js → p-71a77368.system.entry.js} +1 -1
  94. package/lib/duet/p-73f9db25.system.entry.js +4 -0
  95. package/lib/duet/{p-63d5bf73.system.entry.js → p-74f4a0d8.system.entry.js} +1 -1
  96. package/lib/duet/{p-aef1b720.system.entry.js → p-7530be48.system.entry.js} +1 -1
  97. package/lib/duet/{p-9481e312.entry.js → p-75edcaed.entry.js} +1 -1
  98. package/lib/duet/{p-237e47b4.system.entry.js → p-7a8597c2.system.entry.js} +1 -1
  99. package/lib/duet/p-85ad012a.system.entry.js +4 -0
  100. package/lib/duet/{p-cdd70b93.entry.js → p-85e52be8.entry.js} +1 -1
  101. package/lib/duet/{p-94169303.entry.js → p-8aaf3383.entry.js} +1 -1
  102. package/lib/duet/{p-86daec1c.entry.js → p-9e79e033.entry.js} +1 -1
  103. package/lib/duet/{p-4607af59.entry.js → p-9f35d682.entry.js} +1 -1
  104. package/lib/duet/{p-d3a3c3c7.system.entry.js → p-a2a00146.system.entry.js} +1 -1
  105. package/lib/duet/{p-1208c84f.entry.js → p-a545398c.entry.js} +1 -1
  106. package/lib/duet/{p-00735436.entry.js → p-af49d4f9.entry.js} +1 -1
  107. package/lib/duet/p-b25edbbe.entry.js +4 -0
  108. package/lib/duet/{p-e12f2b8b.system.js → p-b314348c.system.js} +2 -2
  109. package/lib/duet/{p-751542a0.system.entry.js → p-b4111e88.system.entry.js} +1 -1
  110. package/lib/duet/{p-7fee0d23.system.entry.js → p-b5c7d304.system.entry.js} +1 -1
  111. package/lib/duet/{p-16c48c5d.entry.js → p-b6e9860a.entry.js} +1 -1
  112. package/lib/duet/{p-060d79be.entry.js → p-ba18b56e.entry.js} +1 -1
  113. package/lib/duet/{p-387823af.system.entry.js → p-bf4596bd.system.entry.js} +1 -1
  114. package/lib/duet/{p-8b5ca0e7.system.entry.js → p-bf9f6d80.system.entry.js} +1 -1
  115. package/lib/duet/{p-e2a44156.js → p-c1a1ea1b.js} +1 -1
  116. package/lib/duet/{p-7368b14e.system.entry.js → p-c742856b.system.entry.js} +1 -1
  117. package/lib/duet/{p-48d1eb1f.system.entry.js → p-cbdb9e98.system.entry.js} +1 -1
  118. package/lib/duet/{p-b4e87f02.system.entry.js → p-cf319832.system.entry.js} +1 -1
  119. package/lib/duet/p-d67fff56.entry.js +4 -0
  120. package/lib/duet/{p-4b6ebe40.system.entry.js → p-dd76db9b.system.entry.js} +1 -1
  121. package/lib/duet/{p-d4118b6e.system.entry.js → p-de5ec54e.system.entry.js} +1 -1
  122. package/lib/duet/{p-5826523b.entry.js → p-df6f39a3.entry.js} +1 -1
  123. package/lib/duet/p-e1dc86b5.system.js +4 -0
  124. package/lib/duet/{p-b3744481.entry.js → p-e2596ea0.entry.js} +1 -1
  125. package/lib/duet/{p-e76b722f.entry.js → p-e370c18b.entry.js} +1 -1
  126. package/lib/duet/{p-9dca5c22.system.entry.js → p-e48f3a32.system.entry.js} +1 -1
  127. package/lib/duet/p-e5031543.entry.js +4 -0
  128. package/lib/duet/{p-597d99c7.entry.js → p-e60ee8b0.entry.js} +1 -1
  129. package/lib/duet/{p-794659ac.entry.js → p-e70088d5.entry.js} +1 -1
  130. package/lib/duet/{p-aee24388.system.entry.js → p-e7b90769.system.entry.js} +1 -1
  131. package/lib/duet/{p-f8ce39fb.entry.js → p-e8123a53.entry.js} +1 -1
  132. package/lib/duet/{p-a890da72.entry.js → p-ef7251bf.entry.js} +1 -1
  133. package/lib/duet/p-f0cfe033.system.entry.js +4 -0
  134. package/lib/duet/{p-1a08fc22.system.entry.js → p-f2a087a8.system.entry.js} +1 -1
  135. package/lib/duet/{p-3af5d66f.entry.js → p-f5a55b3c.entry.js} +1 -1
  136. package/lib/duet/p-fd613733.entry.js +4 -0
  137. package/lib/esm/duet-alert.entry.js +1 -1
  138. package/lib/esm/duet-badge.entry.js +1 -1
  139. package/lib/esm/duet-button_2.entry.js +1 -1
  140. package/lib/esm/duet-caption_4.entry.js +1 -1
  141. package/lib/esm/duet-card.entry.js +1 -1
  142. package/lib/esm/duet-checkbox.entry.js +1 -1
  143. package/lib/esm/duet-choice_2.entry.js +2 -3
  144. package/lib/esm/duet-collapsible.entry.js +1 -1
  145. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  146. package/lib/esm/duet-date-picker.entry.js +2 -2
  147. package/lib/esm/duet-divider_2.entry.js +1 -1
  148. package/lib/esm/duet-editable-table-button.entry.js +85 -0
  149. package/lib/esm/{duet-upload.entry.js → duet-editable-table_4.entry.js} +384 -31
  150. package/lib/esm/duet-empty-state.entry.js +1 -1
  151. package/lib/esm/duet-fieldset.entry.js +58 -0
  152. package/lib/esm/duet-footer.entry.js +1 -1
  153. package/lib/esm/duet-grid_2.entry.js +1 -1
  154. package/lib/esm/duet-header_2.entry.js +1 -1
  155. package/lib/esm/duet-hero.entry.js +1 -1
  156. package/lib/esm/duet-icon.entry.js +16 -6
  157. package/lib/esm/duet-input_2.entry.js +1 -1
  158. package/lib/esm/duet-layout.entry.js +1 -1
  159. package/lib/esm/duet-list_2.entry.js +1 -1
  160. package/lib/esm/duet-modal.entry.js +2 -2
  161. package/lib/esm/duet-notification_2.entry.js +1 -1
  162. package/lib/esm/duet-number-input.entry.js +1 -1
  163. package/lib/esm/duet-progress.entry.js +1 -1
  164. package/lib/esm/duet-radio_2.entry.js +1 -1
  165. package/lib/esm/duet-range-slider.entry.js +1 -1
  166. package/lib/esm/duet-select.entry.js +1 -1
  167. package/lib/esm/duet-step_2.entry.js +1 -1
  168. package/lib/esm/duet-tab_2.entry.js +1 -1
  169. package/lib/esm/duet-textarea.entry.js +1 -1
  170. package/lib/esm/duet-toggle.entry.js +1 -1
  171. package/lib/esm/duet-tooltip.entry.js +1 -1
  172. package/lib/esm/duet-tray.entry.js +1 -1
  173. package/lib/esm/duet-upload-aria-status.entry.js +96 -0
  174. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  175. package/lib/esm/duet.js +2 -2
  176. package/lib/esm/{focus-utils-1fe0dcd0.js → focus-utils-aeb6ca93.js} +1 -1
  177. package/lib/esm/{index-84d97bd1.js → index-e8c7d36f.js} +8 -2
  178. package/lib/esm/loader.js +2 -2
  179. package/lib/esm-es5/duet-alert.entry.js +1 -1
  180. package/lib/esm-es5/duet-badge.entry.js +1 -1
  181. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  182. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  183. package/lib/esm-es5/duet-card.entry.js +1 -1
  184. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  185. package/lib/esm-es5/duet-choice_2.entry.js +2 -2
  186. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  187. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  188. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  189. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  190. package/lib/esm-es5/duet-editable-table-button.entry.js +4 -0
  191. package/lib/esm-es5/duet-editable-table_4.entry.js +4 -0
  192. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  193. package/lib/esm-es5/duet-fieldset.entry.js +4 -0
  194. package/lib/esm-es5/duet-footer.entry.js +1 -1
  195. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  196. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  197. package/lib/esm-es5/duet-hero.entry.js +1 -1
  198. package/lib/esm-es5/duet-icon.entry.js +2 -2
  199. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  200. package/lib/esm-es5/duet-layout.entry.js +1 -1
  201. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  202. package/lib/esm-es5/duet-modal.entry.js +1 -1
  203. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  204. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  205. package/lib/esm-es5/duet-progress.entry.js +1 -1
  206. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  207. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  208. package/lib/esm-es5/duet-select.entry.js +1 -1
  209. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  210. package/lib/esm-es5/duet-tab_2.entry.js +1 -1
  211. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  212. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  213. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  214. package/lib/esm-es5/duet-tray.entry.js +1 -1
  215. package/lib/esm-es5/duet-upload-aria-status.entry.js +4 -0
  216. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  217. package/lib/esm-es5/duet.js +1 -1
  218. package/lib/esm-es5/focus-utils-aeb6ca93.js +4 -0
  219. package/lib/esm-es5/{index-84d97bd1.js → index-e8c7d36f.js} +2 -2
  220. package/lib/esm-es5/loader.js +1 -1
  221. package/lib/html.html-data.json +4906 -0
  222. package/lib/types/components/duet-icon/icon-utils.d.ts +1 -1
  223. package/lib/types/components/duet-upload/duet-upload.d.ts +42 -18
  224. package/lib/types/components/duet-upload/{duet-upload-editable-item-error.d.ts → upload-editable-item-error.d.ts} +0 -0
  225. package/lib/types/components/duet-upload/{duet-upload-editable-item-inprogres.d.ts → upload-editable-item-inprogres.d.ts} +0 -0
  226. package/lib/types/components/duet-upload/{duet-upload-editable-item-success.d.ts → upload-editable-item-success.d.ts} +0 -0
  227. package/lib/types/components/duet-upload/{duet-upload-validators.d.ts → upload-validators.d.ts} +0 -0
  228. package/lib/types/components/{duet-upload → duet-upload-aria-status}/duet-upload-aria-status.d.ts +2 -2
  229. package/lib/types/components.d.ts +25 -25
  230. package/package.json +6 -5
  231. package/lib/cjs/duet-editable-table-button_3.cjs.entry.js +0 -232
  232. package/lib/cjs/duet-editable-table_3.cjs.entry.js +0 -336
  233. package/lib/cjs/js-utils-33a9dbe3.js +0 -16
  234. package/lib/duet/p-10deead0.system.js +0 -4
  235. package/lib/duet/p-155ef581.system.entry.js +0 -4
  236. package/lib/duet/p-1797df7b.system.entry.js +0 -4
  237. package/lib/duet/p-28e02c08.entry.js +0 -4
  238. package/lib/duet/p-33c58756.entry.js +0 -4
  239. package/lib/duet/p-5ea0cd19.entry.js +0 -4
  240. package/lib/duet/p-81867417.system.js +0 -4
  241. package/lib/duet/p-b25d3769.js +0 -4
  242. package/lib/duet/p-de07c7d7.entry.js +0 -4
  243. package/lib/duet/p-dfe79666.system.entry.js +0 -4
  244. package/lib/duet/p-f0a4b68d.system.entry.js +0 -4
  245. package/lib/duet/p-f364eb96.entry.js +0 -4
  246. package/lib/esm/duet-editable-table-button_3.entry.js +0 -226
  247. package/lib/esm/duet-editable-table_3.entry.js +0 -330
  248. package/lib/esm/js-utils-b69f17df.js +0 -14
  249. package/lib/esm-es5/duet-editable-table-button_3.entry.js +0 -4
  250. package/lib/esm-es5/duet-editable-table_3.entry.js +0 -4
  251. package/lib/esm-es5/duet-upload.entry.js +0 -4
  252. package/lib/esm-es5/focus-utils-1fe0dcd0.js +0 -4
  253. package/lib/esm-es5/js-utils-b69f17df.js +0 -4
@@ -1,2 +1,2 @@
1
1
  export declare const buildIconUrl: (iconName: string) => string;
2
- export declare function fetchIconByUrl(url: string): Promise<string>;
2
+ export declare function fetchIconByUrl(url: string, isServer?: boolean): Promise<string>;
@@ -5,7 +5,7 @@ import { DuetLangObject } from "../../utils/language-utils";
5
5
  import { ThemeableComponent } from "../../utils/themeable-component";
6
6
  import { DuetEditableTableGroupNames } from "../duet-editable-table/duet-editable-table";
7
7
  import { DuetEditableTableActions } from "../duet-editable-table/duet-editable-table-item";
8
- import { StatusMessage } from "./duet-upload-aria-status";
8
+ import { StatusMessage } from "../duet-upload-aria-status/duet-upload-aria-status";
9
9
  import { DuetUploadErrorCode } from "./errorcodes.utils";
10
10
  import { DuetXhrRequest } from "./xhr.helpers";
11
11
  export declare type DuetUploadEvent = {
@@ -36,7 +36,6 @@ export interface StringMap {
36
36
  /**
37
37
  * @slot header - named slot - to place content after description / caption
38
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
39
  * @slot filefooter - named slot - to place content below "filelist" (only displayed when "filelist" contains items)
41
40
  */
42
41
  export declare class DuetUpload implements ThemeableComponent, FormComponent {
@@ -50,6 +49,7 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
50
49
  private filesInProgress;
51
50
  private fileMaxReached;
52
51
  private bytesMaxReached;
52
+ private internalStatusMessageLabel;
53
53
  private metaData;
54
54
  private nativeInput?;
55
55
  /**
@@ -87,12 +87,12 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
87
87
  */
88
88
  external: boolean;
89
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
90
+ * If set the upload component will not display an upload button, you will have to create one yourself
91
+ * and call the exposed method startUpload
92
92
  */
93
93
  hideButton: boolean;
94
94
  /**
95
- * Default actions added to all files
95
+ * Default actions added to the internally used duet-editable-table
96
96
  */
97
97
  actions: DuetEditableTableActions | string;
98
98
  /**
@@ -100,8 +100,9 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
100
100
  */
101
101
  uri: string;
102
102
  /**
103
- * If enabled the filelist will create links on successfully uploaded items,
103
+ * If enabled the editable-table will display links on successfully uploaded items,
104
104
  * this requires the server can respond with link URIs in the correct format
105
+ * and that the files are accessible to the user
105
106
  */
106
107
  showLinks: boolean;
107
108
  /**
@@ -111,19 +112,43 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
111
112
  /**
112
113
  * Property to change the aria upload progress text read aloud by screenreaders
113
114
  * @default {
114
- fi: "Lisää liite",
115
- sv: "Lägg till en bilaga",
116
- en: "Choose files",
117
- }
115
+ * fi: {
116
+ * inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta",
117
+ * inProgressWithErrors:
118
+ * "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä",
119
+ * done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti",
120
+ * doneWithErrors:
121
+ * "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä",
122
+ * files: "tiedostot",
123
+ * file: "tiedosto",
124
+ * },
125
+ * sv: {
126
+ * inProgress: "Adding {filesUploaded} of {filesTotal}",
127
+ * inProgressWithErrors:
128
+ * "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades",
129
+ * done: "Alla {filesTotal} har lagts till",
130
+ * doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades",
131
+ * files: "filer",
132
+ * file: "fil",
133
+ * },
134
+ * en: {
135
+ * inProgress: "Adding {filesUploaded} of {filesTotal}",
136
+ * inProgressWithErrors:
137
+ * "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed",
138
+ * done: "All {filesTotal} added successfully",
139
+ * doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors",
140
+ * files: "tiedostoa",
141
+ * file: "tiedosto",
142
+ * },
143
+ * }
118
144
  */
119
145
  statusLabelDefaults: DuetLangObject | string;
120
146
  /**
121
147
  * Strings used for the status aria-label
122
148
  */
123
- statusMessageLabel: StatusMessage;
149
+ statusMessageLabel: StatusMessage | string;
124
150
  /**
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
151
+ * Property to change button label defaults on the component.
127
152
  * @default {
128
153
  fi: "Lisää liite",
129
154
  sv: "Lägg till en bilaga",
@@ -137,7 +162,7 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
137
162
  */
138
163
  buttonLabel: string;
139
164
  /**
140
- * accessible Label of button
165
+ * accessible aria-Label of button
141
166
  */
142
167
  accessibleButtonLabel: string;
143
168
  /**
@@ -165,7 +190,7 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
165
190
  */
166
191
  required: boolean;
167
192
  /**
168
- * Array of group names that you want the editable table used to display files to display
193
+ * Array of group names that you want the editable table to use to display files
169
194
  * @required
170
195
  * @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}]
171
196
  */
@@ -179,7 +204,7 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
179
204
  */
180
205
  files: StringMap;
181
206
  /**
182
- * Property to read if filelist contains errors or not
207
+ * Property to read if the internally used editable-table contains errors or not
183
208
  */
184
209
  valid: boolean;
185
210
  watchValidHandler(newValue: boolean, oldValue: boolean): void;
@@ -196,7 +221,6 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
196
221
  label: string;
197
222
  /**
198
223
  * 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
224
  * @default {
201
225
  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
226
  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.",
@@ -369,7 +393,7 @@ export declare class DuetUpload implements ThemeableComponent, FormComponent {
369
393
  invalid: any[];
370
394
  }>;
371
395
  /**
372
- * Convenience method for updating a of an item in the files attribute
396
+ * Convenience method for updating the value of a key:value inside an item in the files attribute
373
397
  */
374
398
  updateValue(item: string, key: string, value: any): Promise<void>;
375
399
  /**
@@ -12,7 +12,7 @@ export declare class DuetUploadAriaStatus {
12
12
  */
13
13
  statusMessage: string;
14
14
  /**
15
- * State() variables
15
+ * Status labels used in the component
16
16
  */
17
17
  statusMessageLabel: StatusMessage;
18
18
  /**
@@ -37,7 +37,7 @@ export declare class DuetUploadAriaStatus {
37
37
  inprogress: number;
38
38
  watchHandler(newValue: boolean, oldValue: boolean): void;
39
39
  /**
40
- * Component lifecycle events.
40
+ * Private functions
41
41
  */
42
42
  private replacePlaceHolders;
43
43
  private getStatusMessage;
@@ -49,10 +49,10 @@ import { DuetTableBreakpoint, DuetTableStickyDistance, DuetTableVariant } from "
49
49
  import { DuetTextareaEvent } from "./components/duet-textarea/duet-textarea";
50
50
  import { DuetToggleChangeEvent } from "./components/duet-toggle/duet-toggle";
51
51
  import { DuetTooltipBreakpoint } from "./components/duet-tooltip/duet-tooltip";
52
- import { StatusMessage } from "./components/duet-upload/duet-upload-aria-status";
52
+ import { StatusMessage } from "./components/duet-upload-aria-status/duet-upload-aria-status";
53
53
  import { DuetEditableTableGroupNames as DuetEditableTableGroupNames1 } from "./components/duet-editable-table/duet-editable-table";
54
54
  import { DuetUploadEvent, StringMap } from "./components/duet-upload/duet-upload";
55
- import { StatusMessage as StatusMessage1 } from "./components/duet-upload/duet-upload-aria-status";
55
+ import { StatusMessage as StatusMessage1 } from "./components/duet-upload-aria-status/duet-upload-aria-status";
56
56
  export namespace Components {
57
57
  interface DuetAlert {
58
58
  /**
@@ -2617,7 +2617,7 @@ export namespace Components {
2617
2617
  */
2618
2618
  "accessibleActiveDescendant": string;
2619
2619
  /**
2620
- * accessible Label of button
2620
+ * accessible aria-Label of button
2621
2621
  */
2622
2622
  "accessibleButtonLabel": string;
2623
2623
  /**
@@ -2633,7 +2633,7 @@ export namespace Components {
2633
2633
  */
2634
2634
  "accessibleOwns": string;
2635
2635
  /**
2636
- * Default actions added to all files
2636
+ * Default actions added to the internally used duet-editable-table
2637
2637
  */
2638
2638
  "actions": DuetEditableTableActions | string;
2639
2639
  /**
@@ -2652,7 +2652,7 @@ export namespace Components {
2652
2652
  */
2653
2653
  "buttonLabel": string;
2654
2654
  /**
2655
- * Property to change descriptionDefaults defaults on the component. normally you would handle these strings on an application level and override @label when needed
2655
+ * Property to change button label defaults on the component.
2656
2656
  * @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment", }
2657
2657
  */
2658
2658
  "buttonLabelDefaults": DuetLangObject | string;
@@ -2666,7 +2666,7 @@ export namespace Components {
2666
2666
  */
2667
2667
  "description": string;
2668
2668
  /**
2669
- * Property to change descriptionDefaults defaults on the component. normally you would handle these strings on an application level and override @label when needed
2669
+ * Property to change descriptionDefaults defaults on the component.
2670
2670
  * @default { 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.", 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.", 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.", }
2671
2671
  */
2672
2672
  "descriptionDefaults": DuetLangObject | string;
@@ -2701,13 +2701,13 @@ export namespace Components {
2701
2701
  */
2702
2702
  "getFiles": () => Promise<false | { valid: any[]; invalid: any[]; }>;
2703
2703
  /**
2704
- * Array of group names that you want the editable table used to display files to display
2704
+ * Array of group names that you want the editable table to use to display files
2705
2705
  * @required
2706
2706
  * @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}]
2707
2707
  */
2708
2708
  "groups": DuetEditableTableGroupNames | string;
2709
2709
  /**
2710
- * If set the upload component will not display an upload button, you will have to create on yourself and call the exposed methods startUpload
2710
+ * If set the upload component will not display an upload button, you will have to create one yourself and call the exposed method startUpload
2711
2711
  */
2712
2712
  "hideButton": boolean;
2713
2713
  /**
@@ -2765,24 +2765,24 @@ export namespace Components {
2765
2765
  */
2766
2766
  "setFocus": (options?: FocusOptions) => Promise<void>;
2767
2767
  /**
2768
- * If enabled the filelist will create links on successfully uploaded items, this requires the server can respond with link URIs in the correct format
2768
+ * If enabled the editable-table will display links on successfully uploaded items, this requires the server can respond with link URIs in the correct format and that the files are accessible to the user
2769
2769
  */
2770
2770
  "showLinks": boolean;
2771
2771
  /**
2772
2772
  * Property to change the aria upload progress text read aloud by screenreaders
2773
- * @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Choose files", }
2773
+ * @default { fi: { inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta", inProgressWithErrors: "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä", done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti", doneWithErrors: "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä", files: "tiedostot", file: "tiedosto", }, sv: { inProgress: "Adding {filesUploaded} of {filesTotal}", inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades", done: "Alla {filesTotal} har lagts till", doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades", files: "filer", file: "fil", }, en: { inProgress: "Adding {filesUploaded} of {filesTotal}", inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed", done: "All {filesTotal} added successfully", doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors", files: "tiedostoa", file: "tiedosto", }, }
2774
2774
  */
2775
2775
  "statusLabelDefaults": DuetLangObject | string;
2776
2776
  /**
2777
2777
  * Strings used for the status aria-label
2778
2778
  */
2779
- "statusMessageLabel": StatusMessage;
2779
+ "statusMessageLabel": StatusMessage | string;
2780
2780
  /**
2781
2781
  * Theme of the input.
2782
2782
  */
2783
2783
  "theme": DuetTheme;
2784
2784
  /**
2785
- * Convenience method for updating a of an item in the files attribute
2785
+ * Convenience method for updating the value of a key:value inside an item in the files attribute
2786
2786
  */
2787
2787
  "updateValue": (item: string, key: string, value: any) => Promise<void>;
2788
2788
  /**
@@ -2794,7 +2794,7 @@ export namespace Components {
2794
2794
  */
2795
2795
  "uri": string;
2796
2796
  /**
2797
- * Property to read if filelist contains errors or not
2797
+ * Property to read if the internally used editable-table contains errors or not
2798
2798
  */
2799
2799
  "valid": boolean;
2800
2800
  /**
@@ -2816,7 +2816,7 @@ export namespace Components {
2816
2816
  */
2817
2817
  "invalid": number;
2818
2818
  /**
2819
- * State() variables
2819
+ * Status labels used in the component
2820
2820
  */
2821
2821
  "statusMessageLabel": StatusMessage;
2822
2822
  /**
@@ -5879,7 +5879,7 @@ declare namespace LocalJSX {
5879
5879
  */
5880
5880
  "accessibleActiveDescendant"?: string;
5881
5881
  /**
5882
- * accessible Label of button
5882
+ * accessible aria-Label of button
5883
5883
  */
5884
5884
  "accessibleButtonLabel"?: string;
5885
5885
  /**
@@ -5895,7 +5895,7 @@ declare namespace LocalJSX {
5895
5895
  */
5896
5896
  "accessibleOwns"?: string;
5897
5897
  /**
5898
- * Default actions added to all files
5898
+ * Default actions added to the internally used duet-editable-table
5899
5899
  */
5900
5900
  "actions"?: DuetEditableTableActions | string;
5901
5901
  /**
@@ -5914,7 +5914,7 @@ declare namespace LocalJSX {
5914
5914
  */
5915
5915
  "buttonLabel"?: string;
5916
5916
  /**
5917
- * Property to change descriptionDefaults defaults on the component. normally you would handle these strings on an application level and override @label when needed
5917
+ * Property to change button label defaults on the component.
5918
5918
  * @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Add an attachment", }
5919
5919
  */
5920
5920
  "buttonLabelDefaults"?: DuetLangObject | string;
@@ -5928,7 +5928,7 @@ declare namespace LocalJSX {
5928
5928
  */
5929
5929
  "description"?: string;
5930
5930
  /**
5931
- * Property to change descriptionDefaults defaults on the component. normally you would handle these strings on an application level and override @label when needed
5931
+ * Property to change descriptionDefaults defaults on the component.
5932
5932
  * @default { 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.", 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.", 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.", }
5933
5933
  */
5934
5934
  "descriptionDefaults"?: DuetLangObject | string;
@@ -5959,13 +5959,13 @@ declare namespace LocalJSX {
5959
5959
  */
5960
5960
  "files"?: StringMap;
5961
5961
  /**
5962
- * Array of group names that you want the editable table used to display files to display
5962
+ * Array of group names that you want the editable table to use to display files
5963
5963
  * @required
5964
5964
  * @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}]
5965
5965
  */
5966
5966
  "groups"?: DuetEditableTableGroupNames | string;
5967
5967
  /**
5968
- * If set the upload component will not display an upload button, you will have to create on yourself and call the exposed methods startUpload
5968
+ * If set the upload component will not display an upload button, you will have to create one yourself and call the exposed method startUpload
5969
5969
  */
5970
5970
  "hideButton"?: boolean;
5971
5971
  /**
@@ -6055,18 +6055,18 @@ declare namespace LocalJSX {
6055
6055
  */
6056
6056
  "required"?: boolean;
6057
6057
  /**
6058
- * If enabled the filelist will create links on successfully uploaded items, this requires the server can respond with link URIs in the correct format
6058
+ * If enabled the editable-table will display links on successfully uploaded items, this requires the server can respond with link URIs in the correct format and that the files are accessible to the user
6059
6059
  */
6060
6060
  "showLinks"?: boolean;
6061
6061
  /**
6062
6062
  * Property to change the aria upload progress text read aloud by screenreaders
6063
- * @default { fi: "Lisää liite", sv: "Lägg till en bilaga", en: "Choose files", }
6063
+ * @default { fi: { inProgress: "Lähetetään {filesUploaded} lähetettävästä {filesTotal} tiedostosta", inProgressWithErrors: "Lähetetään {filesInProgress} tiedostoa, lähetetty {filesUploaded} lähetettävästä {filesTotal} tiedostosta, {filesWithErrors} tiedostossa on virheitä", done: "Kaikki {filesTotal} tiedostoa lähetetty onnistuneesti", doneWithErrors: "Lähetys valmis, {filesUploaded} tiedostoa on lähetetty onnistuneesti, {filesWithErrors} tiedostossa oli virheitä", files: "tiedostot", file: "tiedosto", }, sv: { inProgress: "Adding {filesUploaded} of {filesTotal}", inProgressWithErrors: "Laddar upp {filesInProgress}, {filesUploaded} uppladdad av {filesTotal}, {filesWithErrors} misslyckades", done: "Alla {filesTotal} har lagts till", doneWithErrors: "Handling slutförd, {filesUploaded} har lagts till, {filesWithErrors} misslyckades", files: "filer", file: "fil", }, en: { inProgress: "Adding {filesUploaded} of {filesTotal}", inProgressWithErrors: "Uploading {filesInProgress}, {filesUploaded} uploaded of {filesTotal}, {filesWithErrors} failed", done: "All {filesTotal} added successfully", doneWithErrors: "Action completed, {filesUploaded} has been added successfully, {filesWithErrors} had errors", files: "tiedostoa", file: "tiedosto", }, }
6064
6064
  */
6065
6065
  "statusLabelDefaults"?: DuetLangObject | string;
6066
6066
  /**
6067
6067
  * Strings used for the status aria-label
6068
6068
  */
6069
- "statusMessageLabel"?: StatusMessage;
6069
+ "statusMessageLabel"?: StatusMessage | string;
6070
6070
  /**
6071
6071
  * Theme of the input.
6072
6072
  */
@@ -6076,7 +6076,7 @@ declare namespace LocalJSX {
6076
6076
  */
6077
6077
  "uri"?: string;
6078
6078
  /**
6079
- * Property to read if filelist contains errors or not
6079
+ * Property to read if the internally used editable-table contains errors or not
6080
6080
  */
6081
6081
  "valid"?: boolean;
6082
6082
  /**
@@ -6098,7 +6098,7 @@ declare namespace LocalJSX {
6098
6098
  */
6099
6099
  "invalid"?: number;
6100
6100
  /**
6101
- * State() variables
6101
+ * Status labels used in the component
6102
6102
  */
6103
6103
  "statusMessageLabel"?: StatusMessage;
6104
6104
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duetds/components",
3
- "version": "4.33.0",
3
+ "version": "4.33.1",
4
4
  "description": "This package includes Duet Design System Web Components and related utilities.",
5
5
  "bugs": {
6
6
  "email": "duetdesignsystem@lahitapiola.fi"
@@ -52,11 +52,11 @@
52
52
  "koa-colorful-logger": "0.0.3"
53
53
  },
54
54
  "devDependencies": {
55
- "@duetds/fonts": "1.4.3",
56
- "@duetds/icons": "2.2.3",
55
+ "@duetds/fonts": "1.4.4",
56
+ "@duetds/icons": "2.2.4",
57
57
  "@duetds/stencil-angular-output-target": "0.0.2",
58
58
  "@duetds/stencil-react-output-target": "0.0.10",
59
- "@duetds/tokens": "2.4.3",
59
+ "@duetds/tokens": "2.4.4",
60
60
  "@koa/cors": "3.1.0",
61
61
  "@rollup/plugin-replace": "3.0.0",
62
62
  "@stencil/core": "2.11.0",
@@ -84,6 +84,7 @@
84
84
  "onchange": "7.1.0",
85
85
  "prettier": "2.4.1",
86
86
  "puppeteer": "9.1.1",
87
+ "rollup-plugin-node-polyfills": "0.2.1",
87
88
  "sass": "1.42.1",
88
89
  "stylelint": "13.13.1",
89
90
  "stylelint-config-recess-order": "2.5.0",
@@ -95,5 +96,5 @@
95
96
  "collection": "lib/collection/collection-manifest.json",
96
97
  "es2015": "lib/esm/index.js",
97
98
  "es2017": "lib/esm/index.js",
98
- "gitHead": "ccdc77cb7f1ab6c33ecda78ae82ae84cf8f9d07b"
99
+ "gitHead": "43d69ade79c0291bfb0ae22468e186171b49a5d6"
99
100
  }
@@ -1,232 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- 'use strict';
5
-
6
- Object.defineProperty(exports, '__esModule', { value: true });
7
-
8
- const index = require('./index-b724d698.js');
9
- const languageUtils = require('./language-utils-aa282901.js');
10
- const themeableComponent = require('./themeable-component-0c1be552.js');
11
- const tokenUtils = require('./token-utils-63a9c8dc.js');
12
- const createId = require('./create-id-c3b984b1.js');
13
- require('./string-utils-267e3dbb.js');
14
- require('./tokens.module-6b2df1c2.js');
15
-
16
- const duetEditableTableButtonCss = "*.sc-duet-editable-table-button,*.sc-duet-editable-table-button::after,*.sc-duet-editable-table-button::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button{display:flex;align-content:space-between;justify-content:center;min-width:32px;max-width:32px;height:100%;min-height:32px;max-height:32px;padding:0;margin:0;cursor:pointer !important;background-color:transparent;border:1px solid;border-radius:50%}.sc-duet-editable-table-button-h button.sc-duet-editable-table-button duet-icon.sc-duet-editable-table-button{align-self:center}";
17
-
18
- let DuetEditableTableButton = class {
19
- constructor(hostRef) {
20
- index.registerInstance(this, hostRef);
21
- this.duetEditableItemAction = index.createEvent(this, "duetEditableItemAction", 7);
22
- this.isHovering = false;
23
- /**
24
- * Theme of the empty state component.
25
- */
26
- this.theme = "";
27
- /**
28
- * action items passed from host component
29
- * @internal
30
- */
31
- this.actions = undefined;
32
- /**
33
- * uid that gets passed along when the action is emitted
34
- * @internal
35
- */
36
- this.uid = "";
37
- /**
38
- * group associated with action
39
- * @internal
40
- */
41
- this.group = "";
42
- /**
43
- * key of the item in the map
44
- * @internal
45
- */
46
- this.keyName = "";
47
- this.onMouseEnter = () => {
48
- this.isHovering = true;
49
- };
50
- this.onMouseLeave = () => {
51
- this.isHovering = false;
52
- };
53
- }
54
- /**
55
- /**
56
- * Component lifecycle events.
57
- */
58
- componentWillLoad() {
59
- themeableComponent.inheritGlobalTheme(this);
60
- }
61
- /**
62
- /**
63
- * private functions
64
- */
65
- emitActionEvent(ev) {
66
- this.duetEditableItemAction.emit({
67
- originalEvent: ev,
68
- uid: this.uid,
69
- group: this.group,
70
- action: this.actions.id,
71
- keyName: this.keyName,
72
- component: "duet-editable-table-item",
73
- });
74
- }
75
- /**
76
- * render() function
77
- * Always the last one in the class.
78
- */
79
- render() {
80
- return (index.h("button", { style: {
81
- "border-color": this.isHovering
82
- ? tokenUtils.getColorByName(this.actions.color_hover)
83
- : tokenUtils.getColorByName(this.actions.color),
84
- }, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, role: "menuitem", class: "duet-editable-table-actions-items-button", "aria-label": this.actions.label ? languageUtils.getLocaleString(this.actions.label) : undefined, onClick: ev => this.emitActionEvent(ev) }, index.h("duet-icon", { class: "duet-editable-table-actions-items-icon", size: "x-small", name: this.actions.icon, color: this.isHovering ? this.actions.color_hover : this.actions.color, margin: "none" })));
85
- }
86
- get el() { return index.getElement(this); }
87
- };
88
- DuetEditableTableButton.style = duetEditableTableButtonCss;
89
-
90
- const duetFieldsetCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;display:block;width:100%}:host(.duet-m-0){margin:0 !important}fieldset{border:0}legend{position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}.duet-legend-wrapper{position:relative;display:block;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;text-align:left;background:transparent}.duet-theme-turva .duet-legend-wrapper{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}.duet-fieldset-label{margin-bottom:12px !important;margin-top:8px}.duet-legend-has-caption .duet-fieldset-label{margin-bottom:6px !important}.duet-legend-has-tooltip .duet-fieldset-label{padding-right:36px}@media (min-width: 48em){.duet-legend-has-tooltip .duet-fieldset-label{margin-bottom:3px !important;padding-right:0}}@media (min-width: 48em){.duet-legend-has-tooltip.duet-legend-has-caption .duet-fieldset-label{margin-bottom:-3px !important}}.duet-fieldset-caption{margin-bottom:12px !important}.duet-fieldset-help{display:block;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:0.875rem;font-weight:400;line-height:1.25;color:#de2362;border-radius:4px}.duet-fieldset-help span{display:block;margin-top:12px}.duet-theme-turva .duet-fieldset-help{color:#e02a0d}::slotted(duet-tooltip){position:absolute;top:4px;right:0}@media (min-width: 48em){::slotted(duet-tooltip){position:relative;right:auto}}.duet-legend-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}";
91
-
92
- let DuetFieldset = class {
93
- constructor(hostRef) {
94
- index.registerInstance(this, hostRef);
95
- this.errorId = createId.createID("DuetError");
96
- this.labelId = createId.createID("DuetLabel");
97
- this.hasTooltip = false;
98
- /**
99
- * Theme of the fieldset.
100
- */
101
- this.theme = "";
102
- /**
103
- * Controls the margin of the component.
104
- */
105
- this.margin = "auto";
106
- /**
107
- * Visually hide the label, but still show it to screen readers.
108
- */
109
- this.labelHidden = false;
110
- this.checkHasTooltip = () => {
111
- this.hasTooltip = !!this.element.querySelector("[slot='tooltip']");
112
- };
113
- }
114
- /**
115
- * Component lifecycle events.
116
- */
117
- componentWillLoad() {
118
- themeableComponent.inheritGlobalTheme(this);
119
- this.checkHasTooltip();
120
- }
121
- /**
122
- * render() function
123
- * Always the last one in the class.
124
- */
125
- render() {
126
- return (index.h(index.Host, { class: { "duet-m-0": this.margin === "none" } }, index.h("fieldset", { "aria-labelledby": `${this.labelId} ${this.errorId}`, class: {
127
- "duet-fieldset": true,
128
- "duet-theme-turva": this.theme === "turva",
129
- } }, index.h("legend", { id: this.labelId }, index.h("span", null, this.label), this.caption && index.h("span", null, this.caption)), index.h("div", { class: {
130
- "duet-legend-wrapper": true,
131
- "duet-legend-has-caption": !!this.caption,
132
- "duet-legend-has-tooltip": this.hasTooltip,
133
- "duet-legend-hidden": this.labelHidden,
134
- } }, index.h("div", { class: "duet-fieldset-label" }, index.h("span", { "aria-hidden": "true" }, this.label), index.h("slot", { onSlotchange: this.checkHasTooltip, name: "tooltip" })), this.caption && (index.h("div", { class: "duet-fieldset-caption", "aria-hidden": "true" }, index.h("duet-caption", { margin: "none" }, this.caption)))), index.h("slot", null), index.h("span", { class: "duet-fieldset-help", id: this.errorId, "aria-live": "assertive", "aria-relevant": "additions removals" }, this.error && index.h("span", null, this.error)))));
135
- }
136
- get element() { return index.getElement(this); }
137
- };
138
- DuetFieldset.style = duetFieldsetCss;
139
-
140
- let DuetUploadAriaStatus = class {
141
- constructor(hostRef) {
142
- index.registerInstance(this, hostRef);
143
- /**
144
- * State() variables
145
- */
146
- this.statusMessage = null;
147
- /**
148
- * State() variables
149
- */
150
- this.statusMessageLabel = null;
151
- /**
152
- * Adds accessible label that is read aloud
153
- */
154
- this.accessibleAriaLive = "polite";
155
- /**
156
- * valid file amount
157
- */
158
- this.valid = undefined;
159
- /**
160
- * total files
161
- */
162
- this.total = undefined;
163
- /**
164
- * invalid file amount
165
- */
166
- this.invalid = undefined;
167
- /**
168
- * valid file amount
169
- */
170
- this.inprogress = undefined;
171
- /**
172
- * Component lifecycle events.
173
- */
174
- this.replacePlaceHolders = (statusString) => {
175
- const addFiles = (amount) => {
176
- return amount > 1 ? `${amount} ${this.statusMessageLabel.files}` : `${amount} ${this.statusMessageLabel.file}`;
177
- };
178
- return statusString
179
- .replace("{filesUploaded}", addFiles(this.valid))
180
- .replace("{filesInProgress}", addFiles(this.inprogress))
181
- .replace("{filesTotal}", addFiles(this.total))
182
- .replace("{filesWithErrors}", addFiles(this.invalid));
183
- };
184
- this.getStatusMessage = () => {
185
- const { done, inProgress, doneWithErrors, inProgressWithErrors } = this.statusMessageLabel;
186
- const hasErrors = this.invalid > 0;
187
- const isInProgress = this.inprogress > 0;
188
- const isInProgressWithErrors = this.inprogress > 0 && hasErrors;
189
- const isDone = this.valid === this.total && !isInProgress && !hasErrors;
190
- const isDoneWithErrors = this.valid + this.invalid === this.total && !isInProgress;
191
- if (isDone) {
192
- this.statusMessage = this.replacePlaceHolders(done);
193
- return;
194
- }
195
- else if (isInProgressWithErrors) {
196
- this.statusMessage = this.replacePlaceHolders(inProgressWithErrors);
197
- return;
198
- }
199
- else if (isInProgress) {
200
- this.statusMessage = this.replacePlaceHolders(inProgress);
201
- return;
202
- }
203
- else if (isDoneWithErrors) {
204
- this.statusMessage = this.replacePlaceHolders(doneWithErrors);
205
- return;
206
- }
207
- return;
208
- };
209
- }
210
- watchHandler(newValue, oldValue) {
211
- if (newValue !== oldValue) {
212
- this.getStatusMessage();
213
- }
214
- }
215
- /**
216
- * render() function
217
- * Always the last one in the class.
218
- */
219
- render() {
220
- return (index.h(index.Host, { role: "status", "aria-live": "assertive", "aria-atomic": "true", "aria-relevant": "all" }, index.h("duet-visually-hidden", null, this.statusMessage)));
221
- }
222
- static get watchers() { return {
223
- "valid": ["watchHandler"],
224
- "invalid": ["watchHandler"],
225
- "inprogress": ["watchHandler"],
226
- "total": ["watchHandler"]
227
- }; }
228
- };
229
-
230
- exports.duet_editable_table_button = DuetEditableTableButton;
231
- exports.duet_fieldset = DuetFieldset;
232
- exports.duet_upload_aria_status = DuetUploadAriaStatus;