@duetds/components 4.35.4 → 4.36.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 (273) hide show
  1. package/hydrate/index.js +501 -7
  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-breadcrumb.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-button_2.cjs.entry.js +7 -2
  7. package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
  8. package/lib/cjs/duet-card.cjs.entry.js +2 -2
  9. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  10. package/lib/cjs/duet-choice_2.cjs.entry.js +3 -3
  11. package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
  12. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  13. package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
  14. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  15. package/lib/cjs/duet-editable-table-button.cjs.entry.js +1 -1
  16. package/lib/cjs/duet-editable-table_4.cjs.entry.js +4 -13
  17. package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
  18. package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
  19. package/lib/cjs/duet-footer.cjs.entry.js +1 -1
  20. package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
  21. package/lib/cjs/duet-header_2.cjs.entry.js +2 -2
  22. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-icon.cjs.entry.js +1 -1
  24. package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
  25. package/lib/cjs/duet-layout.cjs.entry.js +1 -1
  26. package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
  27. package/lib/cjs/duet-modal.cjs.entry.js +3 -3
  28. package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
  29. package/lib/cjs/duet-number-input.cjs.entry.js +2 -2
  30. package/lib/cjs/duet-pagination_2.cjs.entry.js +448 -0
  31. package/lib/cjs/duet-progress.cjs.entry.js +1 -1
  32. package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
  33. package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
  34. package/lib/cjs/duet-scrollable_3.cjs.entry.js +2 -2
  35. package/lib/cjs/duet-select.cjs.entry.js +16 -4
  36. package/lib/cjs/duet-step_2.cjs.entry.js +2 -2
  37. package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
  38. package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
  39. package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
  40. package/lib/cjs/duet-tray.cjs.entry.js +1 -1
  41. package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
  42. package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
  43. package/lib/cjs/duet.cjs.js +2 -2
  44. package/lib/cjs/{focus-utils-eb8c5b20.js → focus-utils-675b1aa3.js} +1 -1
  45. package/lib/cjs/{index-6ae8090f.js → index-58eb8f67.js} +4 -1
  46. package/lib/cjs/js-utils-33a9dbe3.js +16 -0
  47. package/lib/cjs/{keyboard-utils-b4e3d1d3.js → keyboard-utils-898cfe14.js} +8 -0
  48. package/lib/cjs/loader.cjs.js +2 -2
  49. package/lib/collection/collection-manifest.json +8 -0
  50. package/lib/collection/components/duet-button/duet-button.css +3 -0
  51. package/lib/collection/components/duet-button/duet-button.js +27 -0
  52. package/lib/collection/components/duet-card/duet-card.js +1 -1
  53. package/lib/collection/components/duet-pagination/duet-pagination-utils.js +9 -0
  54. package/lib/collection/components/duet-pagination/duet-pagination.css +120 -0
  55. package/lib/collection/components/duet-pagination/duet-pagination.js +511 -0
  56. package/lib/collection/components/duet-range-stepper/duet-range-stepper.css +100 -0
  57. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +342 -0
  58. package/lib/collection/components/duet-select/duet-select.css +26 -0
  59. package/lib/collection/components/duet-select/duet-select.js +39 -4
  60. package/lib/collection/utils/fixture-utils.js +0 -4
  61. package/lib/collection/utils/keyboard-utils.js +4 -0
  62. package/lib/collection/utils/test-utils.js +2 -1
  63. package/lib/custom-elements-bundle/index.d.ts +12 -0
  64. package/lib/custom-elements-bundle/index.js +471 -8
  65. package/lib/duet/duet.esm.js +1 -1
  66. package/lib/duet/duet.js +1 -1
  67. package/lib/duet/{p-94a2da86.system.entry.js → p-0349b691.system.entry.js} +1 -1
  68. package/lib/duet/{p-824d2360.system.entry.js → p-0769de2b.system.entry.js} +1 -1
  69. package/lib/duet/{p-0169d57e.entry.js → p-09920da9.entry.js} +1 -1
  70. package/lib/duet/{p-c122428f.entry.js → p-1aeb418c.entry.js} +1 -1
  71. package/lib/duet/{p-d5a4b17f.system.entry.js → p-1afe9641.system.entry.js} +1 -1
  72. package/lib/duet/p-1b56e483.system.entry.js +4 -0
  73. package/lib/duet/{p-5e895b06.entry.js → p-1c1c9705.entry.js} +1 -1
  74. package/lib/duet/p-21cd146b.system.entry.js +4 -0
  75. package/lib/duet/{p-4a60b131.system.entry.js → p-22e6615d.system.entry.js} +1 -1
  76. package/lib/duet/{p-f98fca13.system.entry.js → p-28a22555.system.entry.js} +1 -1
  77. package/lib/duet/p-298a9ffc.system.js +4 -0
  78. package/lib/duet/{p-8367a2d1.entry.js → p-2a9345a7.entry.js} +1 -1
  79. package/lib/duet/{p-61198eee.system.entry.js → p-314b64b4.system.entry.js} +1 -1
  80. package/lib/duet/{p-66bf27b9.system.entry.js → p-363abf26.system.entry.js} +1 -1
  81. package/lib/duet/{p-b3a2a1e8.entry.js → p-3c13a041.entry.js} +1 -1
  82. package/lib/duet/{p-ea30becb.system.entry.js → p-40360b4a.system.entry.js} +1 -1
  83. package/lib/duet/{p-9077cd24.system.entry.js → p-44a3794d.system.entry.js} +1 -1
  84. package/lib/duet/{p-753098ec.entry.js → p-4b688aea.entry.js} +1 -1
  85. package/lib/duet/{p-2bfe8b50.system.entry.js → p-4f32cc18.system.entry.js} +1 -1
  86. package/lib/duet/{p-caab828f.system.entry.js → p-59480299.system.entry.js} +1 -1
  87. package/lib/duet/{p-6cff80cb.system.entry.js → p-5e410fa9.system.entry.js} +1 -1
  88. package/lib/duet/{p-de5c3a36.entry.js → p-5f4362b4.entry.js} +1 -1
  89. package/lib/duet/{p-e3229d0d.entry.js → p-663aec3a.entry.js} +1 -1
  90. package/lib/duet/{p-a39a0a45.entry.js → p-6aa8d848.entry.js} +1 -1
  91. package/lib/duet/p-6da8743f.system.entry.js +4 -0
  92. package/lib/duet/{p-731444f6.entry.js → p-6df7b78c.entry.js} +1 -1
  93. package/lib/duet/{p-4a931c6c.system.entry.js → p-6e6e1b77.system.entry.js} +1 -1
  94. package/lib/duet/p-72ce134a.entry.js +4 -0
  95. package/lib/duet/p-74780bca.system.js +4 -0
  96. package/lib/duet/{p-c3d552d5.entry.js → p-7730d2b8.entry.js} +1 -1
  97. package/lib/duet/{p-b72ed5ef.system.entry.js → p-78779ba1.system.entry.js} +1 -1
  98. package/lib/duet/{p-c63e49e2.system.entry.js → p-78aa974b.system.entry.js} +1 -1
  99. package/lib/duet/p-7e2c06d0.js +4 -0
  100. package/lib/duet/{p-503f1286.entry.js → p-7f1cbb7d.entry.js} +1 -1
  101. package/lib/duet/{p-ec2aea5f.system.entry.js → p-80aa512a.system.entry.js} +1 -1
  102. package/lib/duet/p-81867417.system.js +4 -0
  103. package/lib/duet/{p-dfd96467.entry.js → p-818cd527.entry.js} +1 -1
  104. package/lib/duet/{p-bc6794bc.system.entry.js → p-84940fc4.system.entry.js} +1 -1
  105. package/lib/duet/{p-44fe8367.system.entry.js → p-84a9fbf4.system.entry.js} +1 -1
  106. package/lib/duet/{p-3025a411.system.js → p-85d9b1b0.system.js} +1 -1
  107. package/lib/duet/{p-253fd12a.system.entry.js → p-8706664b.system.entry.js} +1 -1
  108. package/lib/duet/{p-03a5fe42.system.entry.js → p-878c1c83.system.entry.js} +1 -1
  109. package/lib/duet/p-898f30a5.js +4 -0
  110. package/lib/duet/{p-f51f8554.entry.js → p-8a768d0b.entry.js} +1 -1
  111. package/lib/duet/{p-e4e99da0.entry.js → p-8b8c2ef4.entry.js} +1 -1
  112. package/lib/duet/p-8c0fd5de.js +4 -0
  113. package/lib/duet/{p-7b451394.system.js → p-8db453bf.system.js} +1 -1
  114. package/lib/duet/{p-a926b44b.entry.js → p-8f56fd3f.entry.js} +1 -1
  115. package/lib/duet/{p-477c2e5c.entry.js → p-8fa952df.entry.js} +1 -1
  116. package/lib/duet/{p-17f85b90.entry.js → p-90799d0a.entry.js} +1 -1
  117. package/lib/duet/{p-a0deb526.entry.js → p-9358e24b.entry.js} +1 -1
  118. package/lib/duet/p-95f71b43.system.entry.js +4 -0
  119. package/lib/duet/p-9782946f.entry.js +4 -0
  120. package/lib/duet/{p-01679b51.entry.js → p-995f20fc.entry.js} +1 -1
  121. package/lib/duet/{p-412f58cf.entry.js → p-99a112e4.entry.js} +1 -1
  122. package/lib/duet/{p-76fa8882.entry.js → p-9ead1c59.entry.js} +1 -1
  123. package/lib/duet/{p-efd978ee.entry.js → p-a0f979a4.entry.js} +1 -1
  124. package/lib/duet/{p-ee598605.entry.js → p-a154a0c0.entry.js} +1 -1
  125. package/lib/duet/{p-fc35b926.system.entry.js → p-a2db8ff2.system.entry.js} +1 -1
  126. package/lib/duet/{p-04304e51.entry.js → p-a75776f5.entry.js} +1 -1
  127. package/lib/duet/{p-e682d701.system.entry.js → p-a8f707d4.system.entry.js} +2 -2
  128. package/lib/duet/{p-c1b34a78.system.entry.js → p-aa5abb52.system.entry.js} +1 -1
  129. package/lib/duet/p-abcbdef5.entry.js +4 -0
  130. package/lib/duet/{p-fb98ac5a.entry.js → p-ac44ab7a.entry.js} +1 -1
  131. package/lib/duet/{p-5630828a.system.entry.js → p-ad06c91d.system.entry.js} +1 -1
  132. package/lib/duet/{p-6b24111b.system.entry.js → p-ad8a49a3.system.entry.js} +1 -1
  133. package/lib/duet/p-ae82d8e7.entry.js +4 -0
  134. package/lib/duet/{p-99262d61.entry.js → p-aebf6700.entry.js} +1 -1
  135. package/lib/duet/{p-01f3fbd4.system.entry.js → p-b11f2fcd.system.entry.js} +1 -1
  136. package/lib/duet/p-b25d3769.js +4 -0
  137. package/lib/duet/{p-bba528b5.entry.js → p-b42066e0.entry.js} +1 -1
  138. package/lib/duet/{p-40a76f20.entry.js → p-b5aaf161.entry.js} +1 -1
  139. package/lib/duet/{p-a69667c7.entry.js → p-b6b58d31.entry.js} +1 -1
  140. package/lib/duet/{p-55fff1fe.entry.js → p-bd602c98.entry.js} +1 -1
  141. package/lib/duet/{p-7cdb8bfa.entry.js → p-bf25e52a.entry.js} +1 -1
  142. package/lib/duet/{p-873e4c51.system.entry.js → p-c0a24b5e.system.entry.js} +1 -1
  143. package/lib/duet/{p-2395f96e.system.entry.js → p-c167a5aa.system.entry.js} +1 -1
  144. package/lib/duet/{p-0f185a8a.system.entry.js → p-c5db93a7.system.entry.js} +1 -1
  145. package/lib/duet/{p-da1f6193.system.entry.js → p-c61ace58.system.entry.js} +1 -1
  146. package/lib/duet/{p-a212f672.system.entry.js → p-d32b240d.system.entry.js} +1 -1
  147. package/lib/duet/{p-2c85e001.system.entry.js → p-d444e178.system.entry.js} +1 -1
  148. package/lib/duet/{p-e8ce8394.entry.js → p-daede773.entry.js} +1 -1
  149. package/lib/duet/{p-8ea92cc5.entry.js → p-dda7f098.entry.js} +1 -1
  150. package/lib/duet/{p-7fd62541.entry.js → p-e584ce1d.entry.js} +1 -1
  151. package/lib/duet/{p-9690681b.system.entry.js → p-e67fc1ed.system.entry.js} +1 -1
  152. package/lib/duet/{p-73b5248d.entry.js → p-e9ca7e01.entry.js} +1 -1
  153. package/lib/duet/{p-4ea864dd.system.entry.js → p-ea124391.system.entry.js} +1 -1
  154. package/lib/duet/{p-8973aa31.system.entry.js → p-f993e4c3.system.entry.js} +1 -1
  155. package/lib/duet/{p-24b4eefb.system.entry.js → p-fb55e381.system.entry.js} +1 -1
  156. package/lib/duet/{p-e6349dd2.entry.js → p-fc02d8e9.entry.js} +1 -1
  157. package/lib/duet/{p-4d8cd455.system.entry.js → p-fd561872.system.entry.js} +1 -1
  158. package/lib/esm/duet-alert.entry.js +1 -1
  159. package/lib/esm/duet-badge.entry.js +1 -1
  160. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  161. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  162. package/lib/esm/duet-button_2.entry.js +7 -2
  163. package/lib/esm/duet-caption_4.entry.js +1 -1
  164. package/lib/esm/duet-card.entry.js +2 -2
  165. package/lib/esm/duet-checkbox.entry.js +1 -1
  166. package/lib/esm/duet-choice_2.entry.js +3 -3
  167. package/lib/esm/duet-collapsible.entry.js +2 -2
  168. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  169. package/lib/esm/duet-date-picker.entry.js +2 -2
  170. package/lib/esm/duet-divider_2.entry.js +1 -1
  171. package/lib/esm/duet-editable-table-button.entry.js +1 -1
  172. package/lib/esm/duet-editable-table_4.entry.js +2 -11
  173. package/lib/esm/duet-empty-state.entry.js +1 -1
  174. package/lib/esm/duet-fieldset.entry.js +1 -1
  175. package/lib/esm/duet-footer.entry.js +1 -1
  176. package/lib/esm/duet-grid_2.entry.js +1 -1
  177. package/lib/esm/duet-header_2.entry.js +2 -2
  178. package/lib/esm/duet-hero.entry.js +1 -1
  179. package/lib/esm/duet-icon.entry.js +1 -1
  180. package/lib/esm/duet-input_2.entry.js +1 -1
  181. package/lib/esm/duet-layout.entry.js +1 -1
  182. package/lib/esm/duet-list_2.entry.js +1 -1
  183. package/lib/esm/duet-modal.entry.js +3 -3
  184. package/lib/esm/duet-notification_2.entry.js +1 -1
  185. package/lib/esm/duet-number-input.entry.js +2 -2
  186. package/lib/esm/duet-pagination_2.entry.js +443 -0
  187. package/lib/esm/duet-progress.entry.js +1 -1
  188. package/lib/esm/duet-radio_2.entry.js +1 -1
  189. package/lib/esm/duet-range-slider.entry.js +1 -1
  190. package/lib/esm/duet-scrollable_3.entry.js +2 -2
  191. package/lib/esm/duet-select.entry.js +16 -4
  192. package/lib/esm/duet-step_2.entry.js +2 -2
  193. package/lib/esm/duet-textarea.entry.js +1 -1
  194. package/lib/esm/duet-toggle.entry.js +1 -1
  195. package/lib/esm/duet-tooltip.entry.js +1 -1
  196. package/lib/esm/duet-tray.entry.js +1 -1
  197. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  198. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  199. package/lib/esm/duet.js +2 -2
  200. package/lib/esm/{focus-utils-6db957a7.js → focus-utils-bd3c1702.js} +1 -1
  201. package/lib/esm/{index-828dfb4e.js → index-49b2d31a.js} +4 -1
  202. package/lib/esm/js-utils-b69f17df.js +14 -0
  203. package/lib/esm/{keyboard-utils-584cedd7.js → keyboard-utils-6eb55cd5.js} +5 -1
  204. package/lib/esm/loader.js +2 -2
  205. package/lib/esm-es5/duet-alert.entry.js +1 -1
  206. package/lib/esm-es5/duet-badge.entry.js +1 -1
  207. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  208. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  209. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  210. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  211. package/lib/esm-es5/duet-card.entry.js +1 -1
  212. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  213. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  214. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  215. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  216. package/lib/esm-es5/duet-date-picker.entry.js +1 -1
  217. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  218. package/lib/esm-es5/duet-editable-table-button.entry.js +1 -1
  219. package/lib/esm-es5/duet-editable-table_4.entry.js +2 -2
  220. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  221. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  222. package/lib/esm-es5/duet-footer.entry.js +1 -1
  223. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  224. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  225. package/lib/esm-es5/duet-hero.entry.js +1 -1
  226. package/lib/esm-es5/duet-icon.entry.js +1 -1
  227. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  228. package/lib/esm-es5/duet-layout.entry.js +1 -1
  229. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  230. package/lib/esm-es5/duet-modal.entry.js +1 -1
  231. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  232. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  233. package/lib/esm-es5/duet-pagination_2.entry.js +4 -0
  234. package/lib/esm-es5/duet-progress.entry.js +1 -1
  235. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  236. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  237. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  238. package/lib/esm-es5/duet-select.entry.js +2 -2
  239. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  240. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  241. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  242. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  243. package/lib/esm-es5/duet-tray.entry.js +1 -1
  244. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  245. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  246. package/lib/esm-es5/duet.js +1 -1
  247. package/lib/esm-es5/focus-utils-bd3c1702.js +4 -0
  248. package/lib/esm-es5/{index-828dfb4e.js → index-49b2d31a.js} +1 -1
  249. package/lib/esm-es5/js-utils-b69f17df.js +4 -0
  250. package/lib/esm-es5/keyboard-utils-6eb55cd5.js +4 -0
  251. package/lib/esm-es5/loader.js +1 -1
  252. package/lib/types/components/duet-button/duet-button.d.ts +5 -0
  253. package/lib/types/components/duet-card/duet-card.d.ts +1 -1
  254. package/lib/types/components/duet-pagination/duet-pagination-utils.d.ts +1 -0
  255. package/lib/types/components/duet-pagination/duet-pagination.d.ts +100 -0
  256. package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +70 -0
  257. package/lib/types/components/duet-select/duet-select.d.ts +5 -0
  258. package/lib/types/components.d.ts +188 -2
  259. package/lib/types/utils/keyboard-utils.d.ts +4 -0
  260. package/package.json +5 -5
  261. package/lib/duet/p-0427e1a5.entry.js +0 -4
  262. package/lib/duet/p-04f9f1bf.js +0 -4
  263. package/lib/duet/p-0f91d386.system.entry.js +0 -4
  264. package/lib/duet/p-227e5196.js +0 -4
  265. package/lib/duet/p-2545734a.entry.js +0 -4
  266. package/lib/duet/p-2b8316ee.system.entry.js +0 -4
  267. package/lib/duet/p-68ecdc4f.system.entry.js +0 -4
  268. package/lib/duet/p-853cd059.js +0 -4
  269. package/lib/duet/p-b0c16ee5.entry.js +0 -4
  270. package/lib/duet/p-bb12b972.system.js +0 -4
  271. package/lib/duet/p-ef3fc3f3.system.js +0 -4
  272. package/lib/esm-es5/focus-utils-6db957a7.js +0 -4
  273. package/lib/esm-es5/keyboard-utils-584cedd7.js +0 -4
@@ -8,7 +8,7 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { DuetColor, DuetDirection, DuetGridBreakpoint, DuetHeadingLevel, DuetIconName, DuetLanguage, DuetLocale, DuetMargin, DuetPadding, DuetStatus, DuetTheme, DuetTooltipDirection, DuetVisualHeadingLevel } from "./common-types";
9
9
  import { DuetLangObject } from "./utils/language-utils";
10
10
  import { DuetAlertEvent } from "./components/duet-alert/duet-alert";
11
- import { DuetButtonIconSize, DuetButtonSize, DuetButtonVariation, DuetButtonWrapping } from "./components/duet-button/duet-button";
11
+ import { DuetButtonIconSize, DuetButtonSize, DuetButtonTextCentering, DuetButtonVariation, DuetButtonWrapping } from "./components/duet-button/duet-button";
12
12
  import { DuetCaptionSize } from "./components/duet-caption/duet-caption";
13
13
  import { DuetCardPadding, DuetCardToggleEvent, DuetCardVariation } from "./components/duet-card/duet-card";
14
14
  import { DuetCheckboxEvent } from "./components/duet-checkbox/duet-checkbox";
@@ -36,10 +36,12 @@ import { DuetLogoSize } from "./components/duet-logo/duet-logo";
36
36
  import { DuetModalCloseEvent, DuetModalSize } from "./components/duet-modal/duet-modal";
37
37
  import { DuetNotificationDrawerDirection } from "./components/duet-notification-drawer/duet-notification-drawer";
38
38
  import { DuetNumberInputEvent } from "./components/duet-number-input/duet-number-input";
39
+ import { DuetPaginationPageEvent } from "./components/duet-pagination/duet-pagination";
39
40
  import { DuetParagraphSize, DuetParagraphVariation, DuetParagraphWeight } from "./components/duet-paragraph/duet-paragraph";
40
41
  import { DuetRadioEvent } from "./components/duet-radio/duet-radio";
41
42
  import { DuetRangeChangeEvent } from "./components/duet-range-slider/duet-range-slider";
42
- import { DuetSelectEvent, DuetSelectItems } from "./components/duet-select/duet-select";
43
+ import { DuetRangeStepperUpdateEvent } from "./components/duet-range-stepper/duet-range-stepper";
44
+ import { DuetSelectEvent, DuetSelectItems, DuetSelectVariation } from "./components/duet-select/duet-select";
43
45
  import { DuetSpacerBreakpoint, DuetSpacerSize } from "./components/duet-spacer/duet-spacer";
44
46
  import { DuetSpinnerSize } from "./components/duet-spinner/duet-spinner";
45
47
  import { DuetStepClickEvent, DuetStepState } from "./components/duet-step/duet-step";
@@ -175,6 +177,10 @@ export namespace Components {
175
177
  * Tells screen reader the element is pressed.
176
178
  */
177
179
  "accessiblePressed": boolean;
180
+ /**
181
+ * Centers the text of a button
182
+ */
183
+ "centerText": DuetButtonTextCentering;
178
184
  /**
179
185
  * Custom color to be used for text, as a design token entered in camelCase or kebab-case. Example: "color-primary".
180
186
  */
@@ -1848,6 +1854,44 @@ export namespace Components {
1848
1854
  */
1849
1855
  "value": string;
1850
1856
  }
1857
+ interface DuetPagination {
1858
+ /**
1859
+ * Used to indicate which dom element with ID this element controls
1860
+ */
1861
+ "ariaControls": string;
1862
+ /**
1863
+ * Default pagination labels
1864
+ */
1865
+ "ariaLabels": Record<string, string>;
1866
+ /**
1867
+ * Default pagination labels
1868
+ */
1869
+ "ariaLabelsDefaults": DuetLangObject;
1870
+ /**
1871
+ * The current page
1872
+ */
1873
+ "current": number;
1874
+ /**
1875
+ * Characters to use for the jump buttons.
1876
+ */
1877
+ "jumpString": string;
1878
+ /**
1879
+ * The size of the take, when paginating.
1880
+ */
1881
+ "take": number;
1882
+ /**
1883
+ * Theme of the pagination.
1884
+ */
1885
+ "theme": DuetTheme;
1886
+ /**
1887
+ * The total size of the paginating data
1888
+ */
1889
+ "total": number;
1890
+ /**
1891
+ * Amount of visible page numbers to show
1892
+ */
1893
+ "visibleItems": number;
1894
+ }
1851
1895
  interface DuetParagraph {
1852
1896
  /**
1853
1897
  * Custom color to be used for text, as a design token entered in camelCase or kebab-case. Example: "color-primary".
@@ -2122,6 +2166,39 @@ export namespace Components {
2122
2166
  */
2123
2167
  "value": number;
2124
2168
  }
2169
+ interface DuetRangeStepper {
2170
+ /**
2171
+ * Used to indicate which dom element with ID this element controls
2172
+ */
2173
+ "ariaControls": string;
2174
+ /**
2175
+ * Default pagination labels
2176
+ */
2177
+ "ariaLabels": Record<string, string>;
2178
+ /**
2179
+ * Default range stepper labels
2180
+ */
2181
+ "ariaLabelsDefaults": DuetLangObject;
2182
+ /**
2183
+ * Start value
2184
+ * @default 1
2185
+ */
2186
+ "stepIndex": number;
2187
+ /**
2188
+ * How big is the step
2189
+ * @default 99
2190
+ */
2191
+ "stepSize": number;
2192
+ /**
2193
+ * Theme of the component.
2194
+ */
2195
+ "theme": DuetTheme;
2196
+ /**
2197
+ * Total of
2198
+ * @default undefined
2199
+ */
2200
+ "total": number;
2201
+ }
2125
2202
  interface DuetScrollable {
2126
2203
  /**
2127
2204
  * Optional identifier to add to buttons in the tab group
@@ -2229,6 +2306,10 @@ export namespace Components {
2229
2306
  * The selected value of the select
2230
2307
  */
2231
2308
  "value": string;
2309
+ /**
2310
+ * Variation of dropdown. -tiny is used for small numbers / tiny option ranges.
2311
+ */
2312
+ "variation": DuetSelectVariation;
2232
2313
  }
2233
2314
  interface DuetSpacer {
2234
2315
  /**
@@ -3139,6 +3220,12 @@ declare global {
3139
3220
  prototype: HTMLDuetNumberInputElement;
3140
3221
  new (): HTMLDuetNumberInputElement;
3141
3222
  };
3223
+ interface HTMLDuetPaginationElement extends Components.DuetPagination, HTMLStencilElement {
3224
+ }
3225
+ var HTMLDuetPaginationElement: {
3226
+ prototype: HTMLDuetPaginationElement;
3227
+ new (): HTMLDuetPaginationElement;
3228
+ };
3142
3229
  interface HTMLDuetParagraphElement extends Components.DuetParagraph, HTMLStencilElement {
3143
3230
  }
3144
3231
  var HTMLDuetParagraphElement: {
@@ -3169,6 +3256,12 @@ declare global {
3169
3256
  prototype: HTMLDuetRangeSliderElement;
3170
3257
  new (): HTMLDuetRangeSliderElement;
3171
3258
  };
3259
+ interface HTMLDuetRangeStepperElement extends Components.DuetRangeStepper, HTMLStencilElement {
3260
+ }
3261
+ var HTMLDuetRangeStepperElement: {
3262
+ prototype: HTMLDuetRangeStepperElement;
3263
+ new (): HTMLDuetRangeStepperElement;
3264
+ };
3172
3265
  interface HTMLDuetScrollableElement extends Components.DuetScrollable, HTMLStencilElement {
3173
3266
  }
3174
3267
  var HTMLDuetScrollableElement: {
@@ -3303,11 +3396,13 @@ declare global {
3303
3396
  "duet-notification": HTMLDuetNotificationElement;
3304
3397
  "duet-notification-drawer": HTMLDuetNotificationDrawerElement;
3305
3398
  "duet-number-input": HTMLDuetNumberInputElement;
3399
+ "duet-pagination": HTMLDuetPaginationElement;
3306
3400
  "duet-paragraph": HTMLDuetParagraphElement;
3307
3401
  "duet-progress": HTMLDuetProgressElement;
3308
3402
  "duet-radio": HTMLDuetRadioElement;
3309
3403
  "duet-radio-group": HTMLDuetRadioGroupElement;
3310
3404
  "duet-range-slider": HTMLDuetRangeSliderElement;
3405
+ "duet-range-stepper": HTMLDuetRangeStepperElement;
3311
3406
  "duet-scrollable": HTMLDuetScrollableElement;
3312
3407
  "duet-select": HTMLDuetSelectElement;
3313
3408
  "duet-spacer": HTMLDuetSpacerElement;
@@ -3452,6 +3547,10 @@ declare namespace LocalJSX {
3452
3547
  * Tells screen reader the element is pressed.
3453
3548
  */
3454
3549
  "accessiblePressed"?: boolean;
3550
+ /**
3551
+ * Centers the text of a button
3552
+ */
3553
+ "centerText"?: DuetButtonTextCentering;
3455
3554
  /**
3456
3555
  * Custom color to be used for text, as a design token entered in camelCase or kebab-case. Example: "color-primary".
3457
3556
  */
@@ -5193,6 +5292,48 @@ declare namespace LocalJSX {
5193
5292
  */
5194
5293
  "value"?: string;
5195
5294
  }
5295
+ interface DuetPagination {
5296
+ /**
5297
+ * Used to indicate which dom element with ID this element controls
5298
+ */
5299
+ "ariaControls"?: string;
5300
+ /**
5301
+ * Default pagination labels
5302
+ */
5303
+ "ariaLabels"?: Record<string, string>;
5304
+ /**
5305
+ * Default pagination labels
5306
+ */
5307
+ "ariaLabelsDefaults"?: DuetLangObject;
5308
+ /**
5309
+ * The current page
5310
+ */
5311
+ "current"?: number;
5312
+ /**
5313
+ * Characters to use for the jump buttons.
5314
+ */
5315
+ "jumpString"?: string;
5316
+ /**
5317
+ * Emitted a page selection has been made
5318
+ */
5319
+ "onDuetPageChange"?: (event: CustomEvent<DuetPaginationPageEvent>) => void;
5320
+ /**
5321
+ * The size of the take, when paginating.
5322
+ */
5323
+ "take"?: number;
5324
+ /**
5325
+ * Theme of the pagination.
5326
+ */
5327
+ "theme"?: DuetTheme;
5328
+ /**
5329
+ * The total size of the paginating data
5330
+ */
5331
+ "total"?: number;
5332
+ /**
5333
+ * Amount of visible page numbers to show
5334
+ */
5335
+ "visibleItems"?: number;
5336
+ }
5196
5337
  interface DuetParagraph {
5197
5338
  /**
5198
5339
  * Custom color to be used for text, as a design token entered in camelCase or kebab-case. Example: "color-primary".
@@ -5476,6 +5617,43 @@ declare namespace LocalJSX {
5476
5617
  */
5477
5618
  "value"?: number;
5478
5619
  }
5620
+ interface DuetRangeStepper {
5621
+ /**
5622
+ * Used to indicate which dom element with ID this element controls
5623
+ */
5624
+ "ariaControls"?: string;
5625
+ /**
5626
+ * Default pagination labels
5627
+ */
5628
+ "ariaLabels"?: Record<string, string>;
5629
+ /**
5630
+ * Default range stepper labels
5631
+ */
5632
+ "ariaLabelsDefaults"?: DuetLangObject;
5633
+ /**
5634
+ * Event emitted when the step heading is clicked.
5635
+ */
5636
+ "onDuetRangeStepUpdate"?: (event: CustomEvent<DuetRangeStepperUpdateEvent>) => void;
5637
+ /**
5638
+ * Start value
5639
+ * @default 1
5640
+ */
5641
+ "stepIndex"?: number;
5642
+ /**
5643
+ * How big is the step
5644
+ * @default 99
5645
+ */
5646
+ "stepSize"?: number;
5647
+ /**
5648
+ * Theme of the component.
5649
+ */
5650
+ "theme"?: DuetTheme;
5651
+ /**
5652
+ * Total of
5653
+ * @default undefined
5654
+ */
5655
+ "total"?: number;
5656
+ }
5479
5657
  interface DuetScrollable {
5480
5658
  /**
5481
5659
  * Optional identifier to add to buttons in the tab group
@@ -5591,6 +5769,10 @@ declare namespace LocalJSX {
5591
5769
  * The selected value of the select
5592
5770
  */
5593
5771
  "value"?: string;
5772
+ /**
5773
+ * Variation of dropdown. -tiny is used for small numbers / tiny option ranges.
5774
+ */
5775
+ "variation"?: DuetSelectVariation;
5594
5776
  }
5595
5777
  interface DuetSpacer {
5596
5778
  /**
@@ -6341,11 +6523,13 @@ declare namespace LocalJSX {
6341
6523
  "duet-notification": DuetNotification;
6342
6524
  "duet-notification-drawer": DuetNotificationDrawer;
6343
6525
  "duet-number-input": DuetNumberInput;
6526
+ "duet-pagination": DuetPagination;
6344
6527
  "duet-paragraph": DuetParagraph;
6345
6528
  "duet-progress": DuetProgress;
6346
6529
  "duet-radio": DuetRadio;
6347
6530
  "duet-radio-group": DuetRadioGroup;
6348
6531
  "duet-range-slider": DuetRangeSlider;
6532
+ "duet-range-stepper": DuetRangeStepper;
6349
6533
  "duet-scrollable": DuetScrollable;
6350
6534
  "duet-select": DuetSelect;
6351
6535
  "duet-spacer": DuetSpacer;
@@ -6405,11 +6589,13 @@ declare module "@stencil/core" {
6405
6589
  "duet-notification": LocalJSX.DuetNotification & JSXBase.HTMLAttributes<HTMLDuetNotificationElement>;
6406
6590
  "duet-notification-drawer": LocalJSX.DuetNotificationDrawer & JSXBase.HTMLAttributes<HTMLDuetNotificationDrawerElement>;
6407
6591
  "duet-number-input": LocalJSX.DuetNumberInput & JSXBase.HTMLAttributes<HTMLDuetNumberInputElement>;
6592
+ "duet-pagination": LocalJSX.DuetPagination & JSXBase.HTMLAttributes<HTMLDuetPaginationElement>;
6408
6593
  "duet-paragraph": LocalJSX.DuetParagraph & JSXBase.HTMLAttributes<HTMLDuetParagraphElement>;
6409
6594
  "duet-progress": LocalJSX.DuetProgress & JSXBase.HTMLAttributes<HTMLDuetProgressElement>;
6410
6595
  "duet-radio": LocalJSX.DuetRadio & JSXBase.HTMLAttributes<HTMLDuetRadioElement>;
6411
6596
  "duet-radio-group": LocalJSX.DuetRadioGroup & JSXBase.HTMLAttributes<HTMLDuetRadioGroupElement>;
6412
6597
  "duet-range-slider": LocalJSX.DuetRangeSlider & JSXBase.HTMLAttributes<HTMLDuetRangeSliderElement>;
6598
+ "duet-range-stepper": LocalJSX.DuetRangeStepper & JSXBase.HTMLAttributes<HTMLDuetRangeStepperElement>;
6413
6599
  "duet-scrollable": LocalJSX.DuetScrollable & JSXBase.HTMLAttributes<HTMLDuetScrollableElement>;
6414
6600
  "duet-select": LocalJSX.DuetSelect & JSXBase.HTMLAttributes<HTMLDuetSelectElement>;
6415
6601
  "duet-spacer": LocalJSX.DuetSpacer & JSXBase.HTMLAttributes<HTMLDuetSpacerElement>;
@@ -2,10 +2,14 @@ export declare const isArrowLeftKey: (e: KeyboardEvent) => boolean;
2
2
  export declare const isArrowUpKey: (e: KeyboardEvent) => boolean;
3
3
  export declare const isArrowRightKey: (e: KeyboardEvent) => boolean;
4
4
  export declare const isArrowDownKey: (e: KeyboardEvent) => boolean;
5
+ export declare const isArrowKey: (e: KeyboardEvent) => boolean;
5
6
  export declare const isEscapeKey: (e: KeyboardEvent) => boolean;
6
7
  export declare const isTabKey: (e: KeyboardEvent) => boolean;
7
8
  export declare const isBackspaceKey: (e: KeyboardEvent) => boolean;
8
9
  export declare const isSpaceKey: (e: KeyboardEvent) => boolean;
10
+ export declare const isPlusKey: (e: KeyboardEvent) => boolean;
11
+ export declare const isMinusKey: (e: KeyboardEvent) => boolean;
9
12
  export declare const isQuestionKey: (e: KeyboardEvent) => boolean;
10
13
  export declare const isEnterKey: (e: KeyboardEvent) => boolean;
11
14
  export declare const isKeyboardClick: (e: KeyboardEvent) => boolean;
15
+ export declare const isNumber: (e: KeyboardEvent) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duetds/components",
3
- "version": "4.35.4",
3
+ "version": "4.36.0",
4
4
  "description": "This package includes Duet Design System Web Components and related utilities.",
5
5
  "bugs": {
6
6
  "email": "duetdesignsystem@lahitapiola.fi"
@@ -53,11 +53,11 @@
53
53
  "koa-colorful-logger": "0.0.3"
54
54
  },
55
55
  "devDependencies": {
56
- "@duetds/fonts": "1.4.15",
57
- "@duetds/icons": "2.2.15",
56
+ "@duetds/fonts": "1.4.16",
57
+ "@duetds/icons": "2.2.16",
58
58
  "@duetds/stencil-angular-output-target": "0.0.2",
59
59
  "@duetds/stencil-react-output-target": "0.0.10",
60
- "@duetds/tokens": "2.4.15",
60
+ "@duetds/tokens": "2.4.16",
61
61
  "@koa/cors": "3.1.0",
62
62
  "@rollup/plugin-replace": "3.0.1",
63
63
  "@stencil/core": "2.12.1",
@@ -96,5 +96,5 @@
96
96
  "collection": "lib/collection/collection-manifest.json",
97
97
  "es2015": "lib/esm/index.js",
98
98
  "es2017": "lib/esm/index.js",
99
- "gitHead": "1f56f80a6a6e196d94212f538634d8eda80deaf5"
99
+ "gitHead": "2096e6f07babd0ce5bf820c5ca24fb7df554902e"
100
100
  }
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as t,h as e,H as a,g as i,c as s}from"./p-853cd059.js";import{s as o,g as d}from"./p-2764f081.js";import{i as l}from"./p-a28cf57b.js";import{m as n,h as r,i as h,j as u,k as p,l as b,n as m,s as c}from"./p-ad07f399.js";import{c as f}from"./p-c1325e35.js";import"./p-986779fb.js";const g=(t,e=50)=>{let a;return(...i)=>{clearTimeout(a),a=setTimeout((()=>{t.apply(void 0,i)}),e)}},y=function(){const t={};return function(e){"string"!=typeof e&&(e=e.outerHTML);let a=t[e];if(!a){const t=e.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g,(function(t,e){return`\${map.${e.trim()}}`})).replace(/(\$\{(?!map\.)[^}]+\})/g,"");a=Function("map",`return \`${t}\``)}return a}}();let v=class{constructor(e){t(this,e),this.template=void 0,this.tick=Date.now(),this.items=new Map,this.alignment="middle",this.groupsLabelDefaults={fi:"Kaikki",en:"All items",sv:"Alla objekt"},this.actionLabelDefaults={fi:"Toiminnot",en:"Actions",sv:"Handlingar"},this.groups=[{id:"all",label:this.groupsLabelDefaults,actionLabel:this.actionLabelDefaults}],this.actions=void 0,this.hideGroups=!1,this.accessibleRole=void 0,this.theme="",this.kick=g((()=>{this.tick=Date.now()}),100),this.getTemplate=()=>{const t=this.element.getElementsByTagName("template");return!!(null==t?void 0:t.length)&&y(t[0].content.firstElementChild.outerHTML)},this.getItemData=t=>{const{item:e,group:a,uid:i}=t;return this.template?{group:a,uid:i,item:this.template(e)}:{item:e,group:a,uid:i}},this.filterMap=t=>"all"===t?Array.from(this.items):Array.from(this.items).filter((e=>t===e[1].group))}componentWillLoad(){this.template=this.getTemplate(),this.internalGroupArray="string"==typeof this.groups?o(this.groups):this.groups,this.internalActionsArray="string"==typeof this.actions?o(this.actions):this.actions,l(this)}async updateTable(t){this.items=new Map(t||this.items),this.kick()}render(){return e(a,{class:{"duet-theme-turva":"turva"===this.theme}},this.internalGroupArray.map((t=>{const a=this.filterMap(t.id);if(a.length)return e("duet-table",{variation:"plain",breakpoint:"none",role:"",margin:this.hideGroups?"none":"auto"},e("table",{class:"duet-editable-table","aria-role":this.accessibleRole},e("thead",{class:"duet-editable-table-header"},e("tr",null,e("th",{class:{"duet-editable-table-header-hidden":this.hideGroups}},this.hideGroups?e("duet-visually-hidden",null,d(t.label)):d(t.label)),e("th",{class:{"duet-editable-table-header-hidden":this.hideGroups}},e("duet-visually-hidden",null,d(t.actionLabel?t.actionLabel:this.actionLabelDefaults))))),e("tbody",null,a.map((a=>{const[i,s]=a;return e("duet-editable-table-item",{theme:this.theme,keyName:i,data:this.getItemData(s),groupId:t.id,part:t.id,alignment:this.alignment,actions:this.internalActionsArray})})))))})))}get element(){return i(this)}};v.style="duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";const x=({data:t,groupId:a,alignment:i})=>"string"==typeof t?e("td",{innerHTML:t,class:"duet-editable-table-content",part:`${a}content`,style:{verticalAlign:i}}):e("td",{class:"duet-editable-table-content",part:`${a}content`,style:{verticalAlign:i}},t);let k=class{constructor(e){t(this,e),this.duetEditableItemAction=s(this,"duetEditableItemAction",7),this.isHovering=!1,this.theme="",this.actions=void 0,this.groupId="",this.alignment="middle",this.keyName="",this.data=void 0}watchPropHandler(t,e){}componentWillLoad(){l(this)}render(){return e(a,{role:"row"},e(x,{data:this.data.item,alignment:this.alignment,groupId:this.groupId}),e("td",{class:"duet-editable-table-actions",style:{verticalAlign:this.alignment}},e("div",{class:"duet-editable-table-actions-items",part:`${this.groupId}actions`},this.actions.map((t=>{const{map:a}=t;if(!a||a.includes(this.groupId))return e("duet-editable-table-button",{keyName:this.keyName,group:this.data.group,uid:this.data.uid,actions:t,theme:this.theme})})))))}get el(){return i(this)}static get watchers(){return{data:["watchPropHandler"]}}};k.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";const w=t=>t.substring(1,t.length-1),T={none:"all","none-scrollable":"all",small:w(b),medium:w(n),large:w(r),"x-large":w(h),"xx-large":w(u),"xxx-large":w(p)},z={none:0,"with-links":16*parseFloat(m),"without-links":16*parseFloat(c)};let E=class{constructor(e){t(this,e),this.matchesBreakpoint=!0,this.margin="auto",this.variation="striped",this.sticky=!1,this.stickyDistance="with-links",this.breakpoint="small",this.handleMediaQueryChange=t=>{this.matchesBreakpoint=t.matches}}connectedCallback(){this.mq=matchMedia(T[this.breakpoint]),this.mq.addEventListener("change",this.handleMediaQueryChange),this.handleMediaQueryChange(this.mq),this.observer=new MutationObserver((()=>this.copyHeadingsToCells())),this.observer.observe(this.element,{childList:!0,subtree:!0})}componentWillLoad(){if(l(this),this.copyHeadingsToCells(),this.sticky&&"none-scrollable"===this.breakpoint&&console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence'),this.sticky){const t=z[this.stickyDistance];this.element.querySelectorAll("thead th").forEach((e=>e.style.top=`${t}px`))}}componentDidLoad(){this.observer.takeRecords()}disconnectedCallback(){this.observer.disconnect(),this.observer=null,this.mq.removeListener(this.handleMediaQueryChange),this.mq=null,this.matchesBreakpoint=!0}copyHeadingsToCells(){const t=this.element.querySelectorAll("thead th"),e=this.element.querySelectorAll("tbody tr"),a=Array.from(t).map((t=>t.textContent.trim()));e.forEach((t=>{t.querySelectorAll("td").forEach(((t,e)=>{a[e]&&(t.dataset.heading=a[e])}))}))}render(){return e(a,{class:{[`duet-table-${this.variation}`]:!0,"duet-table-flattened":!this.matchesBreakpoint,"duet-table-sticky":this.matchesBreakpoint&&this.sticky,"duet-table-scrollable":"none-scrollable"===this.breakpoint,"duet-m-0":"none"===this.margin,"duet-theme-turva":"turva"===this.theme}},e("slot",null))}get element(){return i(this)}};E.style='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{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;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{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-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}';const M=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}],j=t=>{let e={type:void 0,system_message:void 0,message:void 0};return e=M.filter((e=>e.type==t))[0],e||(e=M.filter((t=>"default"===t.type))[0]),e},S=t=>{const e=j(t),a=d(e.message);return""!==a&&a?a:e.system_message},A=({data:t})=>{const{item:a,error:i}=t,{name:s}=a,{type:o}=i;return e("span",{class:"duet-upload-item-error",role:"status"},e("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},e("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"})," ",s),e("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},S(o)))},L=({progress:t,name:a})=>e("span",null,e("duet-paragraph",{color:"secondary",margin:"none",size:"small"},a),e("duet-spacer",{size:"xx-small"}),e("duet-progress",{progress:Math.ceil(t),"aria-hidden":!0})),D=({data:t,showLinks:a})=>{const{item:i,size:s,uploaded:o,url:d,meta:l}=t,{name:n}=i,r=e("span",{class:"duet-upload-item-name"},e("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"}),e("duet-spacer",{size:"xx-small",direction:"horizontal"}),n),h=e("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",((t,e=2)=>{if(0===t)return"0 Bytes";const a=e<0?0:e,i=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,i)).toFixed(a))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i]})(s),")"),u=e("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},o&&d&&a?e("duet-link",{url:d,external:!0},r):r,e("duet-spacer",{size:"xx-small",direction:"horizontal"}),h),p=l&&l.badges?e("span",null,e("duet-spacer",{size:"xx-small"}),l.badges.map((t=>e("duet-badge",{color:"primary"},t)))):void 0;return e("span",{class:"duet-upload-item-success"},e("div",null,u),p)},_=(t,e)=>{const{allowedMimetypes:a,allowedExtensions:i,maxBytes:s}=e;let o=!1,l=j("default");if(t){const{name:e,type:d,size:n}=t,r=((t,e)=>{if(!e||!t)return!0;const a=e.split(",");let i=!1;return a.forEach((e=>{const a=e.split("/"),s=t.split("/");a[0]!==s[0]||a[1]!==s[1]&&"*"!==a[1]||(i=!0)})),i})(d,a),h=((t,e)=>{if(!e)return!0;const a=t.split(".");return e.split(",").includes(a[a.length-1])})(e,i),u=((t,e)=>!e||!t||e>=t)(n,s);r||(l=j("duet-upload-101")),h||(l=j("duet-upload-100")),u||(l=j("duet-upload-201")),o=r&&h&&u}else o=!1;return{valid:o,errorMessage:o?void 0:d(l.message),errorSystem:o?void 0:l.system_message,errorType:o?void 0:l.type}},P=({payload:t,options:e,onFailure:a,onSuccess:i,onProgress:s})=>{const{type:o="POST",xhr:d,uri:l,argument:n=null,headers:r=null}=e;d.open(o,`${l}${n||""}`,!0);const{data:h,name:u}=t;return r&&Object.keys(r).forEach((t=>{d.setRequestHeader(t,r[t])})),"POST"===o&&(d.onreadystatechange=()=>{d.readyState===XMLHttpRequest.DONE&&d.status>=200&&d.status<300&&i(d,u,d.status),d.readyState===XMLHttpRequest.DONE&&d.status>=300&&d.status<999&&a(d,u,d.status)},s(u)),d.send(h),d};let $=class{constructor(a){t(this,a),this.duetChange=s(this,"duetChange",3),this.duetBlur=s(this,"duetBlur",7),this.duetFocus=s(this,"duetFocus",7),this.duetDone=s(this,"duetDone",3),this.duetState=s(this,"duetState",3),this.duetDelete=s(this,"duetDelete",3),this.duetCancel=s(this,"duetCancel",3),this.duetProgress=s(this,"duetProgress",3),this.duetUpload=s(this,"duetUpload",3),this.buttonId=f("DuetButton"),this.labelId=f("DuetLabel"),this.uploadId=f("DuetUpload"),this.editableTableId=f("DuetEditableTable"),this.filesInProgress=new Map,this.fileMaxReached=!1,this.bytesMaxReached=!1,this.internalStatusMessageLabel=void 0,this.DefaultGroups={inprogress:"inprogress",success:"success",failure:"failure"},this.tick=Date.now(),this.external=!1,this.hideButton=!1,this.actions=[{icon:"action-delete",color:"color-danger",color_hover:"primary-dark",id:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Poista tiedosto",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",color_hover:"primary-dark",id:"cancel",map:["inprogress"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}],this.showLinks=!1,this.statusLabelDefaults={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"}},this.statusMessageLabel=d(this.statusLabelDefaults),this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"},this.buttonLabel=d(this.buttonLabelDefaults),this.accessibleButtonLabel=void 0,this.theme="",this.disabled=!1,this.margin="auto",this.required=!1,this.alignment="middle",this.hideGroups=!1,this.files=new Map,this.valid=!this.required,this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"},this.label=d(this.labelDefaults),this.descriptionDefaults={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."},this.description=d(this.descriptionDefaults),this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."},this.fileListEmpty=d(this.fileListEmptyDefaults),this.error="",this.maxBytes=2e8,this.maxBytesTotal=void 0,this.maxFiles=99,this.allowedExtensions="all",this.allowedMimetypes="*",this.multiple=!0,this.limitSelection=!1,this.listenForActionEvents=()=>{this.element.addEventListener("duetEditableItemAction",(t=>{const e=t.detail,{action:a,keyName:i,originalEvent:s}=e;switch(a){case"delete":this.onDelete(i,s);break;case"cancel":this.onCancel(i,s)}}))},this.verifyValidity=()=>{const{invalid:t,valid:e}=this.getFilesAsArray(),a=this.valid;this.valid=0===t.length&&0!==e.length,this.valid!==a&&this.duetState.emit({originalEvent:void 0,data:{valid:this.valid,from:"componentWillRender"},component:"duet-upload"})},this.getGroupFromItemData=t=>t.valid&&100===t.progress?t.group?t.group:this.DefaultGroups.success:t.progress>0&&100!==t.progress?this.DefaultGroups.inprogress:t.valid?t.group?t.group:"none":this.DefaultGroups.failure,this.getItemHTMLFromItemData=(t,a)=>a===this.DefaultGroups.success?e(D,{data:t,showLinks:this.showLinks}):a===this.DefaultGroups.inprogress?e(L,{progress:t.progress,name:t.item.name}):a===this.DefaultGroups.failure?e(A,{data:t}):t.group?t.html:"none",this.convertToDuetEditableTableItems=()=>{const t=new Map;return this.files.forEach(((e,a)=>{const i=this.getGroupFromItemData(e),s=this.getItemHTMLFromItemData(e,i);t.set(a,{uid:e.uid,item:s,group:i})})),t},this.kick=g((()=>{this.tick=Date.now()}),30),this.genHashName=()=>Date.now().toString(36)+Math.random(),this.updateValueInMap=(t,e,a,i=!0)=>{const s=this.files.get(t);s[e]=a,this.files.set(t,s),i&&this.kick()},this.updateProgress=(t,e)=>{t.lengthComputable?(a=>{this.updateValueInMap(e,"progress",a),this.onProgress(e,a,t)})(t.loaded/t.total*100):console.log("cant read progress")},this.trackProgress=(t,e=!1)=>{e?this.filesInProgress.delete(t):this.filesInProgress.set(t,"inprogress"),0===this.filesInProgress.size&&this.onDone()},this.getFilesAsArray=()=>{const t=[],e=[];return this.files.forEach((a=>{a.valid&&!a.deleted?t.push(a):a.valid||a.deleted||e.push(a)})),{valid:t,invalid:e}},this.resetFormFields=()=>{this.nativeInput.value=""},this.startUpload=async(t,e)=>{await this.setFocus(),this.metaData=e,this.nativeInput.click(),this.onUpload(t,e),t.stopPropagation(),t.preventDefault()},this.transferComplete=t=>{this.updateValueInMap(t,"progress",100,!1),this.trackProgress(t,!0)},this.transferDone=(t,e,a)=>{this.updateValueInMap(e,"status",a,!1),this.updateValueInMap(e,"uploaded",!0,!1);try{const a=JSON.parse(t.response);this.updateValueInMap(e,"url",a.url)}catch(i){this.updateValueInMap(e,"url",null),console.error("Server did not respond with expected response {url: string}")}},this.transferDoneWithFailure=(t,e,a)=>{try{const{error:a}=JSON.parse(t.response);this.updateValueInMap(e,"error",{message:a.message,type:a.type},!1)}catch(i){console.error("Server did not respond with expected response error:{message: string, type: int}"),this.updateValueInMap(e,"error",{type:a},!1)}this.updateValueInMap(e,"valid",!1,!0)},this.transferFailed=t=>{this.updateValueInMap(t,"error",j("duet-upload-001"))},this.transferCanceled=t=>{this.files.delete(t),this.validateTotals(t),this.kick()},this.validateTotals=t=>{const e=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&t.size&&(a+=t.size)})),a<e))})(0,this.maxBytesTotal),a=((t,e)=>{let a=0;return!!(e&&(this.files.forEach((t=>{t.valid&&a++})),a>e))})(0,this.maxFiles);return e&&t&&this.updateValueInMap(t,"error",j("duet-upload-202"),!1),a&&t&&this.updateValueInMap(t,"error",j("duet-upload-301"),!1),this.bytesMaxReached=e,this.fileMaxReached=a,{bytesMaxReached:e,fileMaxReached:a}},this.onDelete=(t,e)=>{const a=this.files.get(t);this.files.delete(t),this.validateTotals(),this.kick(),this.duetDelete.emit({originalEvent:e,data:{deletion:a},component:"duet-upload"}),this.external||this.makeXHRDeleteRequest(a),this.resetFormFields()},this.onCancel=(t,e)=>{const a=this.files.get(t);if(this.files.delete(t),this.external)this.kick();else{const{xhr:t}=a;t.abort()}this.resetFormFields(),this.duetCancel.emit({originalEvent:e,data:{cancelled:a},component:"duet-upload"})},this.onUpload=(t,e)=>{this.duetUpload.emit({originalEvent:t,metaData:e,component:"duet-upload"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,component:"duet-upload"})},this.onProgress=(t,e,a)=>{this.duetChange.emit({originalEvent:a,data:{key:t,percentComplete:e},component:"duet-upload"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,component:"duet-upload"})},this.onDone=()=>{this.duetDone.emit({component:"duet-upload",data:{files:this.files}})}}watchValidHandler(t,e){t!==e&&this.kick()}componentWillLoad(){this.internalStatusMessageLabel="string"==typeof this.statusMessageLabel?o(this.groups):this.statusMessageLabel,l(this),this.listenForActionEvents()}componentWillRender(){this.verifyValidity()}makeXHRPostRequest(t){const e=new XMLHttpRequest,a=t.get("name");return e.upload.addEventListener("progress",(t=>{this.updateProgress(t,a)})),e.upload.addEventListener("load",(()=>{this.transferComplete(a)})),e.upload.addEventListener("error",(()=>{this.transferFailed(a)})),e.upload.addEventListener("abort",(()=>{this.transferCanceled(a)})),P({payload:{data:t,name:a},options:{type:"POST",uri:this.uri,xhr:e,argument:null,headers:null},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})}makeXHRDeleteRequest(t){const{uid:e,item:a}=t,i=new XMLHttpRequest;return P({payload:{data:null,name},options:{type:"DELETE",xhr:i,uri:this.uri,arguments:`?key=${e}&name=${a.name}`,headers:{"x-fileuid":e,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})}async onChange(t){var e;const a=Array.from(null===(e=this.nativeInput)||void 0===e?void 0:e.files);if(a)for(const s of a){const{valid:t,errorMessage:e,errorType:a,errorSystem:o}=_(s,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes}),d=this.genHashName(),l={uid:d,item:s,size:s.size,meta:this.metaData,uploaded:!1,valid:t,error:{type:t?void 0:a,message:t?void 0:e,system_message:t?void 0:o},progress:0,deleted:!1,xhr:!1,url:!1};this.files.set(s.name,l);const{bytesMaxReached:n,fileMaxReached:r}=this.validateTotals(s.name);if(n)this.updateValueInMap(s.name,"valid",!1,!1);else if(r)this.updateValueInMap(s.name,"valid",!1,!1);else if(t&&!this.external){const t=new FormData;t.append("file",s),t.append("uid",d),t.append("name",s.name),t.append("metadata",JSON.stringify({uid:d,url:this.uri,size:s.size,meta:l.meta}));try{l.xhr=await this.makeXHRPostRequest(t)}catch(i){this.updateValueInMap(s.name,"valid",!1,!1)}}this.kick()}this.resetFormFields(),this.metaData=void 0,this.duetChange.emit({originalEvent:t,data:{files:this.files},component:"duet-upload"})}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async upload(t){await this.setFocus(),this.metaData=t,this.nativeInput.click()}async refresh(){this.kick(),await this.setFocus()}async getFiles(){return!(!this.files||0===this.files.size)&&this.getFilesAsArray()}async updateValue(t,e,a){this.updateValueInMap(t,e,a)}render(){const t=this.identifier||this.uploadId;let i=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());return i=i.replace(/{maxbytes}/g,`${Math.floor(this.maxBytes/1024/1024)} MB`),i=i.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", ")),e(a,{class:{"duet-m-0":"none"===this.margin}},e("duet-fieldset",{label:this.label,caption:i},e("slot",{name:"header"}),!this.files.size&&e("duet-label",{part:this.identifier?`${this.identifier}-empty-state`:"duet-upload-empty-state",theme:"turva"===this.theme?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":!0,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:t},this.fileListEmpty),!!this.files.size&&e("slot",{name:"fileheader"}),!!this.files.size&&e("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&e("duet-editable-table",{part:this.identifier?`${this.identifier}-editable-table`:"duet-upload-editable-table","aria-live":"polite","aria-relevant":"removals",accessibleRole:"log",id:this.editableTableId,groups:this.groups,actions:this.actions,hideGroups:this.hideGroups,alignment:this.alignment,items:this.convertToDuetEditableTableItems()}),!!this.files.size&&e("slot",{name:"filefooter"}),e("duet-spacer",{size:"large"}),!this.hideButton&&e("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":t,size:"small",variation:"secondary",fixed:!0,icon:"action-add-circle",part:this.identifier?`${this.identifier}-button-upload`:"duet-upload-button-upload"},this.buttonLabel),e("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&e("duet-alert",{part:this.identifier?`${this.identifier}-error-notification`:"duet-upload-error-notification"},this.fileMaxReached&&S("duet-upload-301"),this.bytesMaxReached&&S("duet-upload-202")),e("duet-spacer",{size:"medium"}),e("duet-visually-hidden",null,e("input",{ref:t=>{this.nativeInput=t},accept:this.limitSelection?`${this.allowedMimetypes},${this.allowedExtensions}`:void 0,onBlur:this.onBlur,onFocus:this.onFocus,onChange:t=>this.onChange(t),type:"file",class:{"duet-upload":!0},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,capture:"user"}))))}get element(){return i(this)}static get watchers(){return{valid:["watchValidHandler"]}}};$.style="*,*::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}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";export{v as duet_editable_table,k as duet_editable_table_item,E as duet_table,$ as duet_upload}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- const a=a=>37===a.keyCode,s=a=>38===a.keyCode,c=a=>39===a.keyCode,e=a=>40===a.keyCode,p=a=>"Escape"===a.key||"Esc"===a.key||27===a.keyCode,t=a=>8===a.keyCode,E=a=>"Space"===a.key||32===a.keyCode,n=a=>"?"===a.key,o=a=>(a=>"Enter"===a.key||13===a.keyCode)(a)||E(a);export{c as a,s as b,e as c,a as d,t as e,p as f,E as g,n as h,o as i}
@@ -1,4 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,a,i){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function o(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?a(e.value):n(e.value).then(s,o)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(a)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(r=a.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(s[0]===6&&a.label<r[1]){a.label=r[1];r=s;break}if(r&&a.label<r[2]){a.label=r[2];a.ops.push(s);break}if(r[2])a.ops.pop();a.trys.pop();continue}s=t.call(e,a)}catch(o){s=[6,o];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
- /*!
3
- * Built with Duet Design System
4
- */System.register(["./p-3025a411.system.js","./p-70fafc98.system.js","./p-efaa0c04.system.js","./p-ddb6344c.system.js","./p-5f6bd5db.system.js","./p-9a945278.system.js"],(function(e){"use strict";var t,a,i,n,r,s,o,l,d,u,p,f,h,c,m,b,g;return{setters:[function(e){t=e.r;a=e.h;i=e.H;n=e.g;r=e.c},function(e){s=e.s;o=e.g},function(e){l=e.i},function(e){d=e.m;u=e.h;p=e.i;f=e.j;h=e.k;c=e.l;m=e.n;b=e.s},function(e){g=e.c},function(){}],execute:function(){var y=function(e,t){if(t===void 0){t=50}var a;return function(){var i=[];for(var n=0;n<arguments.length;n++){i[n]=arguments[n]}clearTimeout(a);a=setTimeout((function(){e.apply(undefined,i)}),t)}};var v=function(){var e={};function t(t){if(typeof t!=="string"){t=t.outerHTML}var a=e[t];if(!a){var i=t.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g,(function(e,t){return"${map."+t.trim()+"}"})).replace(/(\$\{(?!map\.)[^}]+\})/g,"");a=Function("map","return `"+i+"`")}return a}return t}();var x="duet-editable-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-editable-table-header tr .duet-editable-table-header-hidden{padding:0 !important;font-size:0;border-bottom:0}";var k=e("duet_editable_table",function(){function e(e){var a=this;t(this,e);this.template=undefined;this.tick=Date.now();this.items=new Map;this.alignment="middle";this.groupsLabelDefaults={fi:"Kaikki",en:"All items",sv:"Alla objekt"};this.actionLabelDefaults={fi:"Toiminnot",en:"Actions",sv:"Handlingar"};this.groups=[{id:"all",label:this.groupsLabelDefaults,actionLabel:this.actionLabelDefaults}];this.actions=undefined;this.hideGroups=false;this.accessibleRole=undefined;this.theme="";this.kick=y((function(){a.tick=Date.now()}),100);this.getTemplate=function(){var e=a.element.getElementsByTagName("template");if(e===null||e===void 0?void 0:e.length){var t=e[0].content.firstElementChild.outerHTML;return v(t)}else{return false}};this.getItemData=function(e){var t=e.item,i=e.group,n=e.uid;if(a.template){return{group:i,uid:n,item:a.template(t)}}return{item:t,group:i,uid:n}};this.filterMap=function(e){if(e==="all"){return Array.from(a.items)}return Array.from(a.items).filter((function(t){return e===t[1].group}))}}e.prototype.componentWillLoad=function(){this.template=this.getTemplate();if(typeof this.groups==="string"){this.internalGroupArray=s(this.groups)}else{this.internalGroupArray=this.groups}if(typeof this.actions==="string"){this.internalActionsArray=s(this.actions)}else{this.internalActionsArray=this.actions}l(this)};e.prototype.updateTable=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.items=new Map(e||this.items);this.kick();return[2]}))}))};e.prototype.render=function(){var e=this;return a(i,{class:{"duet-theme-turva":this.theme==="turva"}},this.internalGroupArray.map((function(t){var i=e.filterMap(t.id);if(!i.length){return}return a("duet-table",{variation:"plain",breakpoint:"none",role:"",margin:e.hideGroups?"none":"auto"},a("table",{class:"duet-editable-table","aria-role":e.accessibleRole},a("thead",{class:"duet-editable-table-header"},a("tr",null,a("th",{class:{"duet-editable-table-header-hidden":e.hideGroups}},!e.hideGroups?o(t.label):a("duet-visually-hidden",null,o(t.label))),a("th",{class:{"duet-editable-table-header-hidden":e.hideGroups}},a("duet-visually-hidden",null,t.actionLabel?o(t.actionLabel):o(e.actionLabelDefaults))))),a("tbody",null,i.map((function(i){var n=i[0],r=i[1];return a("duet-editable-table-item",{theme:e.theme,keyName:n,data:e.getItemData(r),groupId:t.id,part:t.id,alignment:e.alignment,actions:e.internalActionsArray})})))))})))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());k.style=x;var w=function(e,t){var i=e.data,n=e.groupId,r=e.alignment;if(typeof i==="string"){return a("td",{innerHTML:i,class:"duet-editable-table-content",part:n+"content",style:{verticalAlign:r}})}else{return a("td",{class:"duet-editable-table-content",part:n+"content",style:{verticalAlign:r}},i)}};var M="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{display:table-row;height:32px}.duet-editable-table-content,.duet-editable-table-actions{height:32px;padding:12px 0;vertical-align:middle;break-word:break-all;border-bottom:1px solid #e1e3e6}.duet-editable-table-actions-items{display:flex;justify-content:flex-end}.duet-editable-table-actions-items duet-editable-table-button{padding-left:8px}.duet-editable-table .editable-item-small{font-size:0.75rem;font-weight:400}";var D=e("duet_editable_table_item",function(){function e(e){t(this,e);this.duetEditableItemAction=r(this,"duetEditableItemAction",7);this.isHovering=false;this.theme="";this.actions=undefined;this.groupId="";this.alignment="middle";this.keyName="";this.data=undefined}e.prototype.watchPropHandler=function(e,t){};e.prototype.componentWillLoad=function(){l(this)};e.prototype.render=function(){var e=this;return a(i,{role:"row"},a(w,{data:this.data.item,alignment:this.alignment,groupId:this.groupId}),a("td",{class:"duet-editable-table-actions",style:{verticalAlign:this.alignment}},a("div",{class:"duet-editable-table-actions-items",part:this.groupId+"actions"},this.actions.map((function(t){var i=t.map,n=i===void 0?undefined:i;if(n&&!n.includes(e.groupId)){return}return a("duet-editable-table-button",{keyName:e.keyName,group:e.data.group,uid:e.data.uid,actions:t,theme:e.theme})})))))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{data:["watchPropHandler"]}},enumerable:false,configurable:true});return e}());D.style=M;var E='duet-table{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:20px !important;display:block;font-variant-numeric:tabular-nums}duet-table table,duet-table thead,duet-table tbody,duet-table tfoot,duet-table th,duet-table td,duet-table tr{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}duet-table.duet-m-0{margin:0 !important}duet-table table{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;text-align:left;border-spacing:0;border-collapse:separate}duet-table.duet-theme-turva table{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}duet-table td{-webkit-hyphens:auto;hyphens:auto;color:#00294d}duet-table.duet-theme-turva td{color:#171c3a}duet-table th{font-weight:600;line-height:1.25;color:#657787;text-align:left}duet-table.duet-theme-turva th{color:#747475}duet-table tbody th{font-weight:600;color:#00294d}duet-table.duet-theme-turva tbody th{color:#171c3a}.duet-table-flattened table,.duet-table-flattened thead,.duet-table-flattened tbody,.duet-table-flattened tfoot,.duet-table-flattened th,.duet-table-flattened td,.duet-table-flattened tr{display:block}.duet-table-flattened thead tr{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-table-flattened td{line-height:1.25}.duet-table-flattened td:not(:last-child){margin-bottom:16px !important}.duet-table-flattened tbody td,.duet-table-flattened tbody th,.duet-table-flattened tfoot td{padding:0 !important;text-align:left !important}.duet-table-flattened tbody th{font-weight:600;line-height:1.25;color:#657787;text-align:left}.duet-table-flattened td[data-heading]::before{margin-bottom:4px !important;display:block;font-size:1rem;font-weight:600;color:#00294d;content:attr(data-heading)}.duet-table-flattened.duet-theme-turva td[data-heading]::before{color:#171c3a}.duet-table-sticky thead th{position:sticky;top:0;background:white}.duet-table-striped td,.duet-table-striped th{padding:20px !important}@media (max-width: 35.9375em){.duet-table-striped td,.duet-table-striped th{padding:20px 12px !important}}.duet-table-striped tbody th{background:white}.duet-table-striped.duet-table-sticky thead th{border-bottom:1px solid #e1e3e6}.duet-table-striped.duet-table-sticky.duet-theme-turva thead th{border-bottom-color:#e4e4e6}.duet-table-striped tbody:not(:first-of-type) th{padding-top:40px !important}.duet-table-striped tbody:only-of-type tr:nth-of-type(odd){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:only-of-type tr:nth-of-type(odd){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(0, 80, 128, 0.04)}.duet-table-striped.duet-theme-turva tbody:not(:only-of-type) tr:nth-of-type(even){background:rgba(23, 28, 58, 0.04)}.duet-table-striped tfoot td{border-top:1px solid #e1e3e6}.duet-table-striped.duet-theme-turva tfoot td{border-top-color:#e4e4e6}.duet-table-striped.duet-table-flattened tbody:not(:first-of-type) th{padding-top:20px !important}.duet-table-striped.duet-table-flattened tr{padding:20px !important}.duet-table-striped.duet-table-flattened tfoot td{border-top:0}.duet-table-striped.duet-table-flattened tfoot tr{border-top:1px solid #e1e3e6}.duet-table-striped.duet-table-flattened.duet-theme-turva tfoot tr{border-top-color:#e4e4e6}.duet-table-fixed th,.duet-table-minimal th,.duet-table-plain th{padding:16px !important;border-bottom:1px solid #657787}.duet-table-fixed th:first-child,.duet-table-minimal th:first-child,.duet-table-plain th:first-child{padding-left:0 !important}.duet-table-fixed th:last-child,.duet-table-minimal th:last-child,.duet-table-plain th:last-child{padding-right:0 !important}.duet-theme-turva.duet-table-fixed th,.duet-theme-turva.duet-table-minimal th,.duet-theme-turva.duet-table-plain th{border-bottom-color:#444445}.duet-table-fixed tbody th,.duet-table-minimal tbody th,.duet-table-plain tbody th{padding-top:40px !important;border-bottom-color:#e1e3e6}.duet-theme-turva.duet-table-fixed tbody th,.duet-theme-turva.duet-table-minimal tbody th,.duet-theme-turva.duet-table-plain tbody th{border-bottom-color:#e4e4e6}.duet-table-fixed td,.duet-table-minimal td,.duet-table-plain td{padding:16px !important}.duet-table-fixed td:first-child,.duet-table-minimal td:first-child,.duet-table-plain td:first-child{padding-left:0 !important}.duet-table-fixed td:last-child,.duet-table-minimal td:last-child,.duet-table-plain td:last-child{padding-right:0 !important}.duet-table-fixed tbody td,.duet-table-minimal tbody td,.duet-table-plain tbody td{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-table-fixed tbody td,.duet-theme-turva.duet-table-minimal tbody td,.duet-theme-turva.duet-table-plain tbody td{border-bottom-color:#e4e4e6}.duet-table-flattened.duet-table-fixed tbody:first-of-type th,.duet-table-flattened.duet-table-minimal tbody:first-of-type th,.duet-table-flattened.duet-table-plain tbody:first-of-type th{padding-top:0 !important}.duet-table-flattened.duet-table-fixed td,.duet-table-flattened.duet-table-minimal td,.duet-table-flattened.duet-table-plain td,.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{border-bottom:0}.duet-table-flattened.duet-table-fixed tr,.duet-table-flattened.duet-table-minimal tr,.duet-table-flattened.duet-table-plain tr{padding:20px 0 !important}.duet-table-flattened.duet-table-fixed tbody th,.duet-table-flattened.duet-table-minimal tbody th,.duet-table-flattened.duet-table-plain tbody th{padding-top:20px !important}.duet-table-flattened.duet-table-fixed tfoot td,.duet-table-flattened.duet-table-minimal tfoot td,.duet-table-flattened.duet-table-plain tfoot td{margin-bottom:4px !important}.duet-table-flattened.duet-table-fixed tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-minimal tbody:not(:only-of-type) tr:first-child,.duet-table-flattened.duet-table-plain tbody:not(:only-of-type) tr:first-child{border-bottom:0}.duet-table-plain.duet-table-flattened tbody tr{border-bottom:1px solid #e1e3e6}.duet-table-plain.duet-table-flattened.duet-theme-turva tbody tr{border-bottom-color:#e4e4e6}.duet-table-minimal tbody tr,.duet-table-minimal tbody tr td{vertical-align:top;border-bottom:0 none}.duet-table-minimal tbody tr:last-of-type,.duet-table-minimal tbody tr:last-of-type td{border-bottom:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened tbody tr,.duet-table-minimal.duet-table-flattened tbody tr td{border-bottom:0 none}.duet-table-minimal.duet-table-flattened tbody tr td[data-heading]::before{display:none}.duet-table-minimal.duet-table-flattened tfoot{border-top:1px solid #e1e3e6}.duet-table-minimal.duet-table-flattened.duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-fixed table{table-layout:fixed}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td,.duet-table-fixed tbody tr td:first-child{padding:4px !important;vertical-align:text-bottom;border-bottom:0 none}.duet-table-fixed thead{display:none}.duet-table-fixed tbody tr,.duet-table-fixed tbody tr td{border-bottom:0 none}.duet-table-fixed:not(.duet-table-flattened) tfoot{border-top:1px solid #e1e3e6}.duet-table-fixed:not(.duet-table-flattened).duet-theme-turva tfoot{border-top-color:#e4e4e6}.duet-table-scrollable{position:relative;width:100%;overflow-x:auto;background:linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0)), linear-gradient(-90deg, #fff 0%, rgba(255, 255, 255, 0)) 100% 0, radial-gradient(farthest-side at 0% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0)) 100% 0%;background-repeat:no-repeat;background-attachment:local, local, scroll, scroll;background-size:100px 100%, 100px 100%, 12px 100%, 12px 100%}.duet-table-selected-column{background:rgba(0, 119, 179, 0.08)}.duet-theme-turva .duet-table-selected-column{background:rgba(68, 68, 69, 0.08)}';var I=function(e){return e.substring(1,e.length-1)};var T={none:"all","none-scrollable":"all",small:I(c),medium:I(d),large:I(u),"x-large":I(p),"xx-large":I(f),"xxx-large":I(h)};var _={none:0,"with-links":parseFloat(m)*16,"without-links":parseFloat(b)*16};var L=e("duet_table",function(){function e(e){var a=this;t(this,e);this.matchesBreakpoint=true;this.margin="auto";this.variation="striped";this.sticky=false;this.stickyDistance="with-links";this.breakpoint="small";this.handleMediaQueryChange=function(e){a.matchesBreakpoint=e.matches}}e.prototype.connectedCallback=function(){var e=this;this.mq=matchMedia(T[this.breakpoint]);this.mq.addEventListener("change",this.handleMediaQueryChange);this.handleMediaQueryChange(this.mq);this.observer=new MutationObserver((function(){return e.copyHeadingsToCells()}));this.observer.observe(this.element,{childList:true,subtree:true})};e.prototype.componentWillLoad=function(){l(this);this.copyHeadingsToCells();if(this.sticky&&this.breakpoint==="none-scrollable"){console.warn('[DUET WARNING]: sticky and breakpoint="none-scrollable" are incompatible. Scrollable takes precedence')}if(this.sticky){var e=_[this.stickyDistance];var t=this.element.querySelectorAll("thead th");t.forEach((function(t){return t.style.top=e+"px"}))}};e.prototype.componentDidLoad=function(){this.observer.takeRecords()};e.prototype.disconnectedCallback=function(){this.observer.disconnect();this.observer=null;this.mq.removeListener(this.handleMediaQueryChange);this.mq=null;this.matchesBreakpoint=true};e.prototype.copyHeadingsToCells=function(){var e=this.element.querySelectorAll("thead th");var t=this.element.querySelectorAll("tbody tr");var a=Array.from(e).map((function(e){return e.textContent.trim()}));t.forEach((function(e){e.querySelectorAll("td").forEach((function(e,t){if(a[t]){e.dataset.heading=a[t]}}))}))};e.prototype.render=function(){var e;return a(i,{class:(e={},e["duet-table-"+this.variation]=true,e["duet-table-flattened"]=!this.matchesBreakpoint,e["duet-table-sticky"]=this.matchesBreakpoint&&this.sticky,e["duet-table-scrollable"]=this.breakpoint==="none-scrollable",e["duet-m-0"]=this.margin==="none",e["duet-theme-turva"]=this.theme==="turva",e)},a("slot",null))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());L.style=E;var z=[{type:"default",system_message:"unknown error",message:{fi:"Tapahtui tuntematon virhe, ole hyvä ja yritä uudelleen.",sv:"Ett okänt fel uppstod, försök igen.",en:"An unknown error occured, please try again."}},{type:"400",system_message:"Bad Request: The server could not understand the request due to invalid syntax.",message:{fi:"Tiedostoa ei hyväksytty.",sv:"Servern avvisade din fil.",en:"The server rejected your file."}},{type:"401",system_message:"Not Authenticated: The client must authenticate itself to get the requested response...",message:{fi:"Vain kirjautunut käyttäjä voi lähettää tiedostoja.",sv:"Du måste vara inloggad för att ladda upp filer.",en:"You need to be logged in to upload files."}},{type:"403",system_message:"No Access: The client does not have access rights to the content.",message:{fi:"Ei oikeuksia lähettää tiedostoja.",sv:"Du har inte rätt åtkomsträttigheter för att ladda upp filer.",en:"You do not have the correct access rights to upload files."}},{type:"413",system_message:"Payload too large",message:{fi:"Tiedosto oli liian vastaanotettavaksi.",sv:"Filen var för stor för servern att hantera.",en:"The file was to large for the server to handle."}},{type:"415",system_message:"Unsupported media type",message:{fi:"Tiedoston tyyppi oli väärä.",sv:"Servern avvisade filen eftersom den hade fel typ.",en:"The server rejected the file because it had the wrong type."}},{type:"429",system_message:"Too many request from same address",message:{fi:"Liian monta yritystä, ole hyvä ja yritä myöhemmin uudelleen.",sv:"Servern har fått många förfrågningar från dig, försök igen senare.",en:"The server has received to many request from you, please try again later."}},{type:"500",system_message:"Internal Server Error",message:{fi:"Palvelin ilmoitti tuntemattomasta virheestä ja lataus epäonnistui.",sv:"Servern rapporterade ett okänt fel och uppladdningen misslyckades.",en:"The server reported an unknown error and the upload failed."}},{type:"duet-upload-100",system_message:"File extension not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den type.",en:"You cannot upload files with that extension."}},{type:"duet-upload-001",system_message:"File transfer failed",message:{fi:"Tiedoston lähetys keskeytyi, ole hyvä ja yritä uudelleen.",sv:"Din anslutning till servern avbröts, försök igen.",en:"Your connection to the server was interrupted, try again."}},{type:"duet-upload-101",system_message:"File mimetype not allowed",message:{fi:"Tiedoston tyyppi ei ole sallittu.",sv:"Du kan inte ladda upp filer av den typ.",en:"You cannot upload files of that type."}},{type:"duet-upload-201",system_message:"File is too large",message:{fi:"Tiedosto on liian iso.",sv:"Filen är större än tillåtet.",en:"The file is larger than permitted."}},{type:"duet-upload-202",system_message:"The combined size of all files is too large",message:{fi:"Tiedostojen yhteenlaskettu koko on liian iso.",sv:"Du har nått den maximala kombinerade filstorleken.",en:"You have reached the maximum combined filesize."}},{type:"duet-upload-301",system_message:"The maximum file limit has been reached",message:{fi:"Liitteiden maksimimäärä saavutettu.",sv:"Maximalt antal bilagor har uppnåtts.",en:"Maximum number of attachments reached."}}];var F=function(e){var t={type:undefined,system_message:undefined,message:undefined};t=z.filter((function(t){return t.type==e}))[0];if(!t){t=z.filter((function(e){return e.type==="default"}))[0]}return t};var A=function(e){var t=F(e);var a=o(t.message);if(a===""||!a){return t.system_message}else{return a}};var S=function(e){var t=e.data;var i=t.item,n=t.error;var r=i.name;var s=n.type;return a("span",{class:"duet-upload-item-error",role:"status"},a("duet-paragraph",{class:"duet-upload-item-name",color:"danger",margin:"none",weight:"semi-bold"},a("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"})," ",r),a("duet-paragraph",{class:"duet-upload-item-error-label",size:"small",margin:"none",color:"danger"},A(s)))};var P=function(e){var t=e.progress,i=e.name;return a("span",null,a("duet-paragraph",{color:"secondary",margin:"none",size:"small"},i),a("duet-spacer",{size:"xx-small"}),a("duet-progress",{progress:Math.ceil(t),"aria-hidden":true}))};var j=function(e,t){if(t===void 0){t=2}if(e===0){return"0 Bytes"}var a=1024;var i=t<0?0:t;var n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];var r=Math.floor(Math.log(e)/Math.log(a));return parseFloat((e/Math.pow(a,r)).toFixed(i))+" "+n[r]};var B=function(e){var t=e.data,i=e.showLinks;var n=t.item,r=t.size,s=t.uploaded,o=t.url,l=t.meta;var d=n.name;var u=a("span",{class:"duet-upload-item-name"},a("duet-icon",{margin:"none",size:"xx-small",name:"messaging-attachment"}),a("duet-spacer",{size:"xx-small",direction:"horizontal"}),d);var p=a("span",{class:"duet-upload-item-size",style:{fontSize:"14px",fontWeight:"400"}},"(",j(r),")");var f=s&&o&&i?a("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},a("duet-link",{url:o,external:true},u),a("duet-spacer",{size:"xx-small",direction:"horizontal"}),p):a("duet-paragraph",{color:"secondary",margin:"none",weight:"semi-bold"},u,a("duet-spacer",{size:"xx-small",direction:"horizontal"}),p);var h=l&&l.badges?a("span",null,a("duet-spacer",{size:"xx-small"}),l.badges.map((function(e){return a("duet-badge",{color:"primary"},e)}))):undefined;return a("span",{class:"duet-upload-item-success"},a("div",null,f),h)};var R=function(e,t){if(!t){return true}var a=e.split(".");var i=t.split(",");var n=a[a.length-1];return i.includes(n)};var C=function(e,t){if(!t||!e){return true}var a=t.split(",");var i=false;a.forEach((function(t){var a=t.split("/");var n=e.split("/");if(a[0]===n[0]&&(a[1]===n[1]||a[1]==="*")){i=true}}));return i};var H=function(e,t){if(!t||!e){return true}return t>=e};var q=function(e,t){var a=t.allowedMimetypes,i=t.allowedExtensions,n=t.maxBytes;var r=false;var s=F("default");if(e){var l=e.name,d=e.type,u=e.size;var p=C(d,a);var f=R(l,i);var h=H(u,n);if(!p){s=F("duet-upload-101")}if(!f){s=F("duet-upload-100")}if(!h){s=F("duet-upload-201")}r=p&&f&&h}else{r=false}return{valid:r,errorMessage:r?undefined:o(s.message),errorSystem:r?undefined:s.system_message,errorType:r?undefined:s.type}};var U=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid&&e.size){a+=e.size}}));if(a<t){return true}}return false};var V=function(e,t){var a=0;if(t){e.forEach((function(e){if(e.valid){a++}}));if(a>t){return true}}return false};var G=function(e){var t=e.payload,a=e.options,i=e.onFailure,n=e.onSuccess,r=e.onProgress;var s=a.type,o=s===void 0?"POST":s,l=a.xhr,d=a.uri,u=a.argument,p=u===void 0?null:u,f=a.headers,h=f===void 0?null:f;l.open(o,""+d+(p||""),true);var c=t.data,m=t.name;if(h){Object.keys(h).forEach((function(e){l.setRequestHeader(e,h[e])}))}if(o==="POST"){l.onreadystatechange=function(){if(l.readyState===XMLHttpRequest.DONE&&l.status>=200&&l.status<300){n(l,m,l.status)}if(l.readyState===XMLHttpRequest.DONE&&l.status>=300&&l.status<999){i(l,m,l.status)}};r(m)}l.send(c);return l};var W="*,*::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}::slotted([slot=header]){margin-bottom:16px}::slotted([slot=fileheader]){margin:16px 0 0 0}::slotted([slot=filefooter]){margin-top:16px}.duet-upload{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-upload-item-size{font-size:0.75rem;font-weight:400}.duet-upload-filelist{margin-bottom:25px}.duet-upload-filelist-empty{display:flex;align-items:center;justify-content:center;width:100%;height:75px;margin:0 auto;font-size:1rem;font-weight:400;background-color:#f5f8fa}";var N=e("duet_upload",function(){function e(e){var i=this;t(this,e);this.duetChange=r(this,"duetChange",3);this.duetBlur=r(this,"duetBlur",7);this.duetFocus=r(this,"duetFocus",7);this.duetDone=r(this,"duetDone",3);this.duetState=r(this,"duetState",3);this.duetDelete=r(this,"duetDelete",3);this.duetCancel=r(this,"duetCancel",3);this.duetProgress=r(this,"duetProgress",3);this.duetUpload=r(this,"duetUpload",3);this.buttonId=g("DuetButton");this.labelId=g("DuetLabel");this.uploadId=g("DuetUpload");this.editableTableId=g("DuetEditableTable");this.filesInProgress=new Map;this.fileMaxReached=false;this.bytesMaxReached=false;this.internalStatusMessageLabel=undefined;this.DefaultGroups={inprogress:"inprogress",success:"success",failure:"failure"};this.tick=Date.now();this.external=false;this.hideButton=false;this.actions=[{icon:"action-delete",color:"color-danger",color_hover:"primary-dark",id:"delete",map:["success","failure"],label:{fi:"Poista tiedosto",en:"Poista tiedosto",sv:"Ta bort filen"}},{icon:"navigation-close",color:"primary",color_hover:"primary-dark",id:"cancel",map:["inprogress"],label:{fi:"Keskeytä lähetys",en:"Cancel the upload",sv:"Stop överföringen"}}];this.showLinks=false;this.statusLabelDefaults={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"}};this.statusMessageLabel=o(this.statusLabelDefaults);this.buttonLabelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add an attachment"};this.buttonLabel=o(this.buttonLabelDefaults);this.accessibleButtonLabel=undefined;this.theme="";this.disabled=false;this.margin="auto";this.required=false;this.alignment="middle";this.hideGroups=false;this.files=new Map;this.valid=!this.required;this.labelDefaults={fi:"Lisää liite",sv:"Lägg till en bilaga",en:"Add attachments"};this.label=o(this.labelDefaults);this.descriptionDefaults={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."};this.description=o(this.descriptionDefaults);this.fileListEmptyDefaults={fi:"Ei vielä lisättyjä tiedostoja.",sv:"Inga filer har lagts till ännu.",en:"No files added yet."};this.fileListEmpty=o(this.fileListEmptyDefaults);this.error="";this.maxBytes=2e8;this.maxBytesTotal=undefined;this.maxFiles=99;this.allowedExtensions="all";this.allowedMimetypes="*";this.multiple=true;this.limitSelection=false;this.listenForActionEvents=function(){i.element.addEventListener("duetEditableItemAction",(function(e){var t=e.detail;var a=t.action,n=t.keyName,r=t.originalEvent;switch(a){case"delete":i.onDelete(n,r);break;case"cancel":i.onCancel(n,r);break}}))};this.verifyValidity=function(){var e=i.getFilesAsArray(),t=e.invalid,a=e.valid;var n=i.valid;i.valid=t.length===0&&a.length!==0;if(i.valid!==n){i.duetState.emit({originalEvent:undefined,data:{valid:i.valid,from:"componentWillRender"},component:"duet-upload"})}};this.getGroupFromItemData=function(e){if(e.valid&&e.progress===100){if(e.group){return e.group}return i.DefaultGroups.success}else if(e.progress>0&&e.progress!==100){return i.DefaultGroups.inprogress}else if(!e.valid){return i.DefaultGroups.failure}else if(e.group){return e.group}else{return"none"}};this.getItemHTMLFromItemData=function(e,t){if(t===i.DefaultGroups.success){return a(B,{data:e,showLinks:i.showLinks})}else if(t===i.DefaultGroups.inprogress){return a(P,{progress:e.progress,name:e.item.name})}else if(t===i.DefaultGroups.failure){return a(S,{data:e})}else if(e.group){return e.html}else{return"none"}};this.convertToDuetEditableTableItems=function(){var e=new Map;i.files.forEach((function(t,a,n){var r=i.getGroupFromItemData(t);var s=i.getItemHTMLFromItemData(t,r);e.set(a,{uid:t.uid,item:s,group:r})}));return e};this.kick=y((function(){i.tick=Date.now()}),30);this.genHashName=function(){return Date.now().toString(36)+Math.random()};this.updateValueInMap=function(e,t,a,n){if(n===void 0){n=true}var r=i.files.get(e);r[t]=a;i.files.set(e,r);if(n){i.kick()}};this.updateProgress=function(e,t){var a=function(a){i.updateValueInMap(t,"progress",a);i.onProgress(t,a,e)};if(e.lengthComputable){var n=e.loaded/e.total*100;a(n)}else{console.log("cant read progress")}};this.trackProgress=function(e,t){if(t===void 0){t=false}if(t){i.filesInProgress.delete(e)}else{i.filesInProgress.set(e,"inprogress")}if(i.filesInProgress.size===0){i.onDone()}};this.getFilesAsArray=function(){var e=[];var t=[];i.files.forEach((function(a){if(a.valid&&!a.deleted){e.push(a)}else if(!a.valid&&!a.deleted){t.push(a)}}));return{valid:e,invalid:t}};this.resetFormFields=function(){i.nativeInput.value=""};this.startUpload=function(e,t){if(t===void 0){t=undefined}return __awaiter(i,void 0,void 0,(function(){return __generator(this,(function(a){switch(a.label){case 0:return[4,this.setFocus()];case 1:a.sent();this.metaData=t;this.nativeInput.click();this.onUpload(e,t);e.stopPropagation();e.preventDefault();return[2]}}))}))};this.transferComplete=function(e){i.updateValueInMap(e,"progress",100,false);i.trackProgress(e,true)};this.transferDone=function(e,t,a){i.updateValueInMap(t,"status",a,false);i.updateValueInMap(t,"uploaded",true,false);try{var n=JSON.parse(e.response);i.updateValueInMap(t,"url",n.url)}catch(r){i.updateValueInMap(t,"url",null);console.error("Server did not respond with expected response {url: string}")}return};this.transferDoneWithFailure=function(e,t,a){try{var n=JSON.parse(e.response).error;i.updateValueInMap(t,"error",{message:n.message,type:n.type},false)}catch(r){console.error("Server did not respond with expected response error:{message: string, type: int}");i.updateValueInMap(t,"error",{type:a},false)}i.updateValueInMap(t,"valid",false,true)};this.transferFailed=function(e){i.updateValueInMap(e,"error",F("duet-upload-001"))};this.transferCanceled=function(e){i.files.delete(e);i.validateTotals(e);i.kick()};this.validateTotals=function(e){var t=U(i.files,i.maxBytesTotal);var a=V(i.files,i.maxFiles);if(t&&e){i.updateValueInMap(e,"error",F("duet-upload-202"),false)}if(a&&e){i.updateValueInMap(e,"error",F("duet-upload-301"),false)}i.bytesMaxReached=t;i.fileMaxReached=a;return{bytesMaxReached:t,fileMaxReached:a}};this.onDelete=function(e,t){var a=i.files.get(e);i.files.delete(e);i.validateTotals();i.kick();i.duetDelete.emit({originalEvent:t,data:{deletion:a},component:"duet-upload"});if(!i.external){i.makeXHRDeleteRequest(a)}i.resetFormFields()};this.onCancel=function(e,t){var a=i.files.get(e);i.files.delete(e);if(!i.external){var n=a.xhr;n.abort()}else{i.kick()}i.resetFormFields();i.duetCancel.emit({originalEvent:t,data:{cancelled:a},component:"duet-upload"})};this.onUpload=function(e,t){i.duetUpload.emit({originalEvent:e,metaData:t,component:"duet-upload"})};this.onBlur=function(e){i.duetBlur.emit({originalEvent:e,component:"duet-upload"})};this.onProgress=function(e,t,a){i.duetChange.emit({originalEvent:a,data:{key:e,percentComplete:t},component:"duet-upload"})};this.onFocus=function(e){i.duetFocus.emit({originalEvent:e,component:"duet-upload"})};this.onDone=function(){i.duetDone.emit({component:"duet-upload",data:{files:i.files}})}}e.prototype.watchValidHandler=function(e,t){if(e!==t){this.kick()}};e.prototype.componentWillLoad=function(){if(typeof this.statusMessageLabel==="string"){this.internalStatusMessageLabel=s(this.groups)}else{this.internalStatusMessageLabel=this.statusMessageLabel}l(this);this.listenForActionEvents()};e.prototype.componentWillRender=function(){this.verifyValidity()};e.prototype.makeXHRPostRequest=function(e){var t=this;var a=new XMLHttpRequest;var i=e.get("name");a.upload.addEventListener("progress",(function(e){t.updateProgress(e,i)}));a.upload.addEventListener("load",(function(){t.transferComplete(i)}));a.upload.addEventListener("error",(function(){t.transferFailed(i)}));a.upload.addEventListener("abort",(function(){t.transferCanceled(i)}));return G({payload:{data:e,name:i},options:{type:"POST",uri:this.uri,xhr:a,argument:null,headers:null},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})};e.prototype.makeXHRDeleteRequest=function(e){var t=e.uid,a=e.item;var i=new XMLHttpRequest;return G({payload:{data:null,name:name},options:{type:"DELETE",xhr:i,uri:this.uri,arguments:"?key="+t+"&name="+a.name,headers:{"x-fileuid":t,"x-filename":a.name}},onFailure:this.transferDoneWithFailure,onSuccess:this.transferDone,onProgress:this.trackProgress})};e.prototype.onChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,a,i,n,r,s,o,l,d,u,p,f,h,c,m,b,g,y;return __generator(this,(function(v){switch(v.label){case 0:a=Array.from((t=this.nativeInput)===null||t===void 0?void 0:t.files);if(!a)return[3,9];i=0,n=a;v.label=1;case 1:if(!(i<n.length))return[3,9];r=n[i];s=q(r,{maxBytes:this.maxBytes,allowedExtensions:this.allowedExtensions,allowedMimetypes:this.allowedMimetypes}),o=s.valid,l=s.errorMessage,d=s.errorType,u=s.errorSystem;p=this.genHashName();f={uid:p,item:r,size:r.size,meta:this.metaData,uploaded:false,valid:o,error:{type:o?undefined:d,message:o?undefined:l,system_message:o?undefined:u},progress:0,deleted:false,xhr:false,url:false};this.files.set(r.name,f);h=this.validateTotals(r.name),c=h.bytesMaxReached,m=h.fileMaxReached;if(!c)return[3,2];this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 2:if(!m)return[3,3];this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 3:if(!(o&&!this.external))return[3,7];b=new FormData;b.append("file",r);b.append("uid",p);b.append("name",r.name);b.append("metadata",JSON.stringify({uid:p,url:this.uri,size:r.size,meta:f.meta}));v.label=4;case 4:v.trys.push([4,6,,7]);g=f;return[4,this.makeXHRPostRequest(b)];case 5:g.xhr=v.sent();return[3,7];case 6:y=v.sent();this.updateValueInMap(r.name,"valid",false,false);return[3,7];case 7:this.kick();v.label=8;case 8:i++;return[3,1];case 9:this.resetFormFields();this.metaData=undefined;this.duetChange.emit({originalEvent:e,data:{files:this.files},component:"duet-upload"});return[2]}}))}))};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus(e)}return[2]}))}))};e.prototype.upload=function(e){if(e===void 0){e=undefined}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setFocus()];case 1:t.sent();this.metaData=e;this.nativeInput.click();return[2]}}))}))};e.prototype.refresh=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.kick();return[4,this.setFocus()];case 1:e.sent();return[2]}}))}))};e.prototype.getFiles=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.files||this.files.size===0){return[2,false]}return[2,this.getFilesAsArray()]}))}))};e.prototype.updateValue=function(e,t,a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.updateValueInMap(e,t,a);return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.identifier||this.uploadId;var n=this.description.replace(/{maxfiles}/g,this.maxFiles.toString());n=n.replace(/{maxbytes}/g,Math.floor(this.maxBytes/1024/1024)+" MB");n=n.replace(/{filetypes}/g,this.allowedExtensions.split(",").join(", "));return a(i,{class:{"duet-m-0":this.margin==="none"}},a("duet-fieldset",{label:this.label,caption:n},a("slot",{name:"header"}),!this.files.size&&a("duet-label",{part:this.identifier?this.identifier+"-empty-state":"duet-upload-empty-state",theme:this.theme==="turva"?"turva":"default",size:"small",class:{"duet-upload-filelist-empty":!this.files.size,"duet-upload-filelist":true,"duet-upload-filelist-filled":this.files.size},id:this.labelId,for:t},this.fileListEmpty),!!this.files.size&&a("slot",{name:"fileheader"}),!!this.files.size&&a("duet-upload-aria-status",{invalid:this.getFilesAsArray().invalid.length,valid:this.getFilesAsArray().valid.length,inprogress:this.filesInProgress.size,total:this.files.size,statusMessageLabel:this.internalStatusMessageLabel}),!!this.files.size&&a("duet-editable-table",{part:this.identifier?this.identifier+"-editable-table":"duet-upload-editable-table","aria-live":"polite","aria-relevant":"removals",accessibleRole:"log",id:this.editableTableId,groups:this.groups,actions:this.actions,hideGroups:this.hideGroups,alignment:this.alignment,items:this.convertToDuetEditableTableItems()}),!!this.files.size&&a("slot",{name:"filefooter"}),a("duet-spacer",{size:"large"}),!this.hideButton&&a("duet-button",{id:this.buttonId,onClick:this.startUpload,"accessible-controls":t,disabled:this.fileMaxReached,"accessible-label":this.accessibleButtonLabel,"accessible-owns":t,size:"small",variation:"secondary",fixed:true,icon:"action-add-circle",part:this.identifier?this.identifier+"-button-upload":"duet-upload-button-upload"},this.buttonLabel),a("duet-spacer",{size:"medium"}),(this.fileMaxReached||this.bytesMaxReached)&&a("duet-alert",{part:this.identifier?this.identifier+"-error-notification":"duet-upload-error-notification"},this.fileMaxReached&&A("duet-upload-301"),this.bytesMaxReached&&A("duet-upload-202")),a("duet-spacer",{size:"medium"}),a("duet-visually-hidden",null,a("input",{ref:function(t){e.nativeInput=t},accept:!this.limitSelection?undefined:this.allowedMimetypes+","+this.allowedExtensions,onBlur:this.onBlur,onFocus:this.onFocus,onChange:function(t){return e.onChange(t)},type:"file",class:{"duet-upload":true},disabled:this.disabled,"aria-hidden":"true",required:this.required,name:this.name,id:this.identifier,multiple:this.multiple,capture:"user"}))))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{valid:["watchValidHandler"]}},enumerable:false,configurable:true});return e}());N.style=W}}}));
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{h as o}from"./p-853cd059.js";const s=o=>{"setFocus"in o?o.setFocus():o.focus()},a=({moveFocusTo:a})=>o("div",{class:"duet-focus-guard","aria-hidden":"true",tabIndex:0,onFocus:()=>s(a)});export{a as F,s as f}
@@ -1,4 +0,0 @@
1
- /*!
2
- * Built with Duet Design System
3
- */
4
- import{r as t,c as e,h as o,H as n,g as r}from"./p-853cd059.js";import{D as i}from"./p-76f00bd5.js";import{a,g as u}from"./p-2764f081.js";import{i as d}from"./p-a28cf57b.js";import{g as s}from"./p-50b4fb2c.js";import"./p-986779fb.js";import"./p-ad07f399.js";let l=class{constructor(o){t(this,o),this.duetFocus=e(this,"duetFocus",7),this.duetBlur=e(this,"duetBlur",7),this.loading=!1,this.variation="default",this.negative=!1,this.theme="",this.margin="auto",this.padding="auto",this.wrapping="auto",this.expand=!1,this.fixed=!1,this.disabled=!1,this.submit=!1,this.external=!1,this.language=a(),this.accessibleLabelExternalDefaults=i,this.accessibleLabelExternal=u(this.accessibleLabelExternalDefaults),this.icon="",this.color="",this.iconRight=!1,this.iconSize="medium",this.size="medium",this.iconOnly=!1,this.handleClick=t=>{!this.url&&this.element.closest("form")&&(t.preventDefault(),this.proxyButton.click())},this.onFocus=()=>{this.duetFocus.emit()},this.onBlur=()=>{this.duetBlur.emit()}}componentWillLoad(){d(this),this.url&&this.external&&this.icon&&console.warn("[DUET]: Button used as an external link will override any icon that is set")}connectedCallback(){this.proxyButton=document.createElement("button"),this.proxyButton.style.display="none",this.syncToProxyButton(),!this.url&&this.element.closest("form")&&this.element.insertAdjacentElement("beforebegin",this.proxyButton)}disconnectedCallback(){this.proxyButton.remove(),this.proxyButton=null}syncToProxyButton(){this.proxyButton.type=this.getButtonType(),this.proxyButton.disabled=this.disabled,null!=this.name?this.proxyButton.name=this.name:this.proxyButton.removeAttribute("name"),null!=this.value?this.proxyButton.value=this.value:this.proxyButton.removeAttribute("value")}getButtonType(){return this.submit?"submit":"button"}async setFocus(t){this.nativeButton&&this.nativeButton.focus(t)}render(){const t=this.external&&this.url,e=t?"action-new-window":this.icon,r=!!t||this.iconRight,i=o("span",{class:"duet-button-contents",style:{color:s(this.color)}},e&&o("div",{"aria-hidden":"true",class:{"duet-button-icon":!0,left:!r,right:r,[this.iconSize]:!0}},o("duet-icon",{size:"auto",margin:"none",name:e,color:"currentColor"})),o("slot",null)),a={onFocus:this.onFocus,onBlur:this.onBlur,ref:t=>this.nativeButton=t,id:this.identifier,class:{"duet-m-0":"none"===this.margin,"duet-p-0":"none"===this.padding,"duet-no-wrap":"none"===this.wrapping,"duet-button":!0,"duet-button-is-small":"small"===this.size,"duet-button-icon-only":this.iconOnly,"duet-button-negative":this.negative||"negative"===this.variation,[this.variation]:!0,disabled:this.disabled,icon:!!e,"icon-right":r,[this.iconSize]:!0},"aria-controls":this.accessibleControls,"aria-label":this.accessibleLabel,"aria-expanded":null!=this.accessibleExpanded?this.accessibleExpanded.toString():void 0,"aria-activedescendant":this.accessibleActiveDescendant,"aria-owns":this.accessibleOwns,"aria-describedby":this.accessibleDescribedBy};return o(n,{onClick:this.handleClick,class:{"duet-m-0":"none"===this.margin,"duet-small":"small"===this.size,"duet-fixed":this.fixed,"duet-expand":this.expand}},o("div",{class:{"duet-button-container":!0,"duet-button-is-loading":this.loading,"duet-theme-turva":"turva"===this.theme,"duet-button-negative":this.negative||"negative"===this.variation,[this.variation]:!0}},this.url?o("a",Object.assign({},a,{href:this.url,target:this.external?"_blank":"_self",rel:this.external?"noopener":void 0}),i,this.external&&o("duet-visually-hidden",null,", ",this.accessibleLabelExternal)):o("button",Object.assign({},a,{type:this.getButtonType(),disabled:this.disabled,name:this.name,value:this.value,"aria-pressed":null!=this.accessiblePressed?this.accessiblePressed.toString():void 0}),i),this.loading&&o("duet-spinner",{color:"currentColor"})))}get element(){return r(this)}static get watchers(){return{disabled:["syncToProxyButton"],submit:["syncToProxyButton"],value:["syncToProxyButton"],name:["syncToProxyButton"]}}};l.style='*,*::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-right:8px !important;margin-bottom:12px !important;position:relative;z-index:1;display:inline-flex;width:auto;max-width:100%;vertical-align:bottom;-webkit-tap-highlight-color:transparent}:host:last-child,:host:last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host{width:100%}}:host(.duet-small){margin-right:2px !important;margin-bottom:8px !important}:host(.duet-small):last-child,:host(.duet-small):last-of-type{margin-right:0 !important}@media (max-width: 35.9375em){:host(.duet-small){width:auto}}:host(.duet-expand){width:100% !important}:host(.duet-m-0){margin:0 !important}:host(.duet-fixed){width:auto !important}:host(:last-child){margin-right:0 !important}.duet-button-container{position:relative;width:100%}.duet-button{padding:14px 27px 15px !important;-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;min-width:8rem;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;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.1;color:#0077b3 !important;text-align:center;text-decoration:none;cursor:pointer;background:transparent;border-style:solid;border-width:2px;border-radius:20rem;transition:background-color 300ms ease, color 300ms ease, border 300ms ease, box-shadow 300ms ease}.duet-button.duet-p-0{padding:0 !important}.duet-button.duet-m-0{margin:0 !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only){padding:9px 19px 10px !important;min-width:5.3333333333rem;font-size:0.875rem}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon{padding-left:48px !important}.duet-button.duet-button-is-small:not(.duet-button-icon-only).icon-right{padding-right:48px !important;padding-left:20px !important}.duet-theme-turva .duet-button{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#c60c30 !important}.duet-button .duet-button-contents{position:relative;display:inline-block;margin:0 auto;pointer-events:none}.duet-button.duet-no-wrap{white-space:nowrap}.duet-button.icon{padding-left:52px !important}.duet-button.icon-right{padding-right:52px !important;padding-left:28px !important}.duet-button svg{width:100%;min-width:100%;fill:currentColor}.duet-button .duet-button-icon{position:absolute;top:50%;left:-28px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;margin:0 !important;transform:translateY(-50%)}.duet-button .duet-button-icon duet-icon{width:16px;height:16px}.duet-button .duet-button-icon.right{right:-28px;left:auto}.duet-button .duet-button-icon.large{left:-32px;width:20px;height:20px}.duet-button .duet-button-icon.large duet-icon{width:20px;height:20px}.duet-button .duet-button-icon.large.right{right:-32px;left:auto}.duet-button .duet-button-icon.medium-small{left:-16px;width:10px;height:10px;padding-top:1px}.duet-button .duet-button-icon.medium-small duet-icon{width:10px;height:10px}.duet-button .duet-button-icon.medium-small.right{right:-16px;left:auto}.duet-button .duet-button-icon.small{left:-16px;width:7px;height:7px}.duet-button .duet-button-icon.small duet-icon{width:7px;height:7px}.duet-button .duet-button-icon.small.right{right:-16px;left:auto}.duet-button:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva .duet-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-button:active{opacity:0.75;transition:none}.duet-button.default{border-color:#e1e3e6}.duet-theme-turva .duet-button.default{color:#c60c30 !important;border-color:#e4e4e6}.duet-button.default:hover{border-color:#0077b3}.duet-theme-turva .duet-button.default:hover{border-color:#c60c30}.duet-button.default.duet-button-negative{background-color:white}.duet-theme-turva .duet-button.default.duet-button-negative{background-color:#e4e4e6 !important}.duet-button.default.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.default.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.primary{color:white !important;background:#0077b3;border-color:#0077b3}.duet-theme-turva .duet-button.primary{color:white !important;background:#c60c30;border-color:#c60c30}.duet-button.primary:hover{background:#005f8f;border-color:#005f8f;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.primary:hover{background:#940925;border-color:#940925}.duet-button.primary:focus{outline:0;box-shadow:0 0 0 1px white, 0 0 0 4px rgba(0, 119, 179, 0.75)}.duet-theme-turva .duet-button.primary:focus{box-shadow:0 0 0 1px white, 0 0 0 4px rgba(23, 28, 58, 0.7)}.duet-button.secondary{color:#00294d !important;background:transparent;border-color:#00294d}.duet-theme-turva .duet-button.secondary{color:#171c3a !important;border-color:#171c3a}.duet-button.secondary:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.secondary.duet-button-negative{color:#e1e3e6 !important;border-color:white}.duet-theme-turva .duet-button.secondary.duet-button-negative{color:#e4e4e6 !important}.duet-button.secondary.duet-button-negative:hover{color:#0077b3 !important;border-color:#0077b3}.duet-theme-turva .duet-button.secondary.duet-button-negative:hover{color:#c60c30 !important;border-color:#c60c30}.duet-button.negative{color:#00294d !important;background:white;border-color:white}.duet-theme-turva .duet-button.negative{color:#171c3a !important}.duet-button.negative:hover{color:white !important;background:transparent;border-color:white}.duet-button.negative:focus{outline:0;box-shadow:0 0 0 1px #00294d, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-theme-turva .duet-button.negative:focus{box-shadow:0 0 0 1px #171c3a, 0 0 0 4px rgba(255, 255, 255, 0.7)}.duet-button.destructive-primary{color:white !important;background:#de2362;border-color:#de2362}.duet-theme-turva .duet-button.destructive-primary{color:white !important;background:#e02a0d;border-color:#e02a0d}.duet-button.destructive-primary:hover{background:#b21c4e;border-color:#b21c4e;box-shadow:0 4px 20px rgba(34, 34, 34, 0.1)}.duet-theme-turva .duet-button.destructive-primary:hover{background:#b3220a}.duet-button.destructive,.duet-button.destructive-secondary{color:#de2362 !important;background:white;border-color:#de2362}.duet-theme-turva .duet-button.destructive,.duet-theme-turva .duet-button.destructive-secondary{color:#e02a0d !important;background:white;border-color:#e02a0d}.duet-button.destructive:hover,.duet-button.destructive-secondary:hover{color:white !important;background:#b21c4e;border-color:#b21c4e}.duet-theme-turva .duet-button.destructive:hover,.duet-theme-turva .duet-button.destructive-secondary:hover{color:white !important;background:#b3220a;border-color:#b3220a}.duet-button.plain{min-width:48px;padding-right:0 !important;padding-left:0 !important;line-height:1.5;text-align:left;background:transparent;border:0;border-color:transparent;border-radius:4px}.duet-theme-turva .duet-button.plain{color:#c60c30 !important;background:transparent;border-color:transparent}.duet-button.plain.icon{padding-left:20px !important}.duet-button.plain.icon.icon-right{padding-right:20px !important;padding-left:0 !important}.duet-button.plain.icon.medium{padding-left:24px !important}.duet-button.plain.icon.medium.icon-right{padding-right:24px !important;padding-left:0 !important}.duet-button.plain.icon.large{padding-left:30px !important}.duet-button.plain.icon.large.icon-right{padding-right:30px !important;padding-left:0 !important}.duet-button.plain .duet-button-icon.left{left:-16.6666666667px !important}.duet-button.plain .duet-button-icon.left.medium{left:-24px !important}.duet-button.plain .duet-button-icon.left.large{left:-30px !important}.duet-button.plain .duet-button-icon.right{right:-16.6666666667px !important}.duet-button.plain .duet-button-icon.right.medium{right:-24px !important}.duet-button.plain .duet-button-icon.right.large{right:-30px !important}.duet-button.plain[disabled]{color:#657787 !important;background:transparent !important;border-color:transparent !important}.duet-theme-turva .duet-button.plain[disabled]{color:transparent !important;background:transparent !important;border-color:#e4e4e6 !important}.duet-button.plain:hover{color:#004d80 !important;background:transparent !important}.duet-theme-turva .duet-button.plain:hover{color:#940925 !important}.duet-button.plain.duet-button-negative{color:white !important}.duet-theme-turva .duet-button.plain.duet-button-negative{color:#e4e4e6 !important}.duet-button.plain.duet-button-negative:hover{color:#0077b3 !important}.duet-theme-turva .duet-button.plain.duet-button-negative:hover{color:#c60c30 !important}.duet-button.duet-button-icon-only{min-width:48px;min-height:48px;padding:0 !important}.duet-button.duet-button-icon-only .duet-button-contents{position:static}.duet-button.duet-button-icon-only .duet-button-icon.left.large,.duet-button.duet-button-icon-only .duet-button-icon.left.medium,.duet-button.duet-button-icon-only .duet-button-icon.left.small{position:absolute;top:50% !important;left:50% !important;padding:0;margin:0;transform:translateX(-50%) translateY(-50%)}.duet-button[disabled],.duet-button[disabled]:hover,.duet-button.duet-button-negative[disabled],.duet-button.duet-button-negative[disabled]:hover{color:#657787 !important;background:#e1e3e6 !important;border-color:#e1e3e6 !important;box-shadow:none !important}.duet-theme-turva .duet-button[disabled],.duet-theme-turva .duet-button[disabled]:hover,.duet-theme-turva .duet-button.duet-button-negative [disabled],.duet-theme-turva .duet-button.duet-button-negative [disabled]:hover{color:#747475 !important;background:#e4e4e6 !important;border-color:#e4e4e6 !important}.duet-button-is-loading.primary{color:white}.duet-button-is-loading.default{color:#0077b3}.duet-button-is-loading.default.duet-theme-turva{color:#c60c30}.duet-button-is-loading .duet-button-contents{visibility:hidden;opacity:0}';let b=class{constructor(e){t(this,e),this.color="gray-lightest",this.size="small",this.theme=""}componentWillLoad(){d(this)}render(){const t="currentColor"===this.color?"currentColor":s(this.color);return o(n,{class:{"duet-custom-color":"currentColor"!==this.color&&"turva"!==this.theme&&"default"!==this.theme,"duet-theme-turva":"turva"===this.theme&&"currentColor"!==this.color,"duet-theme-default":"default"===this.theme&&"currentColor"!==this.color}},o("div",{class:{"duet-spinner":!0,[this.size]:!0},style:{color:t},"aria-label":this.accessibleLabel}))}};b.style=':host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute;top:50%;left:50%;z-index:800;max-width:100%}:host(.duet-theme-default) .duet-spinner{color:#0077b3 !important}:host(.duet-theme-turva) .duet-spinner{color:#c60c30 !important}:host(.duet-custom-color){color:inherit}*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.duet-spinner{-webkit-user-select:none;user-select:none;position:absolute;top:50%;left:50%;z-index:800;width:24px;height:24px;color:#0077b3;border:2px solid transparent;border-left:2px solid currentColor;border-radius:50%;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%;animation:duetRotate 0.6s linear infinite}.duet-spinner::after{position:absolute;top:50%;left:50%;z-index:200;box-sizing:content-box;width:100%;height:100%;overflow:hidden;content:"";border:2px solid currentColor;border-radius:50%;opacity:0.3;transform:translateZ(0) translateX(-50%) translateY(-50%);transform-origin:0% 0%}.duet-spinner.medium{width:36px;height:36px;border-width:4px}.duet-spinner.medium::after{border-width:4px}.duet-spinner.large{width:72px;height:72px;border-width:8px}.duet-spinner.large::after{border-width:8px}@keyframes duetRotate{0%{transform:translateZ(0) rotate(0deg) translateX(-50%) translateY(-50%)}100%{transform:translateZ(0) rotate(360deg) translateX(-50%) translateY(-50%)}}';export{l as duet_button,b as duet_spinner}