@duetds/components 4.35.4 → 5.0.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 (332) hide show
  1. package/hydrate/index.js +1708 -1055
  2. package/lib/cjs/duet-action-button.cjs.entry.js +163 -0
  3. package/lib/cjs/duet-alert.cjs.entry.js +1 -1
  4. package/lib/cjs/duet-badge.cjs.entry.js +1 -1
  5. package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
  6. package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
  7. package/lib/cjs/duet-button_2.cjs.entry.js +14 -5
  8. package/lib/cjs/duet-caption_4.cjs.entry.js +3 -3
  9. package/lib/cjs/duet-card.cjs.entry.js +4 -4
  10. package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
  11. package/lib/cjs/duet-choice_2.cjs.entry.js +3 -3
  12. package/lib/cjs/duet-collapsible.cjs.entry.js +4 -4
  13. package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
  14. package/lib/cjs/duet-date-picker.cjs.entry.js +4 -4
  15. package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
  16. package/lib/cjs/{duet-editable-table_4.cjs.entry.js → duet-editable-table_3.cjs.entry.js} +382 -346
  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 +2 -2
  21. package/lib/cjs/duet-header_2.cjs.entry.js +4 -4
  22. package/lib/cjs/duet-hero.cjs.entry.js +1 -1
  23. package/lib/cjs/duet-icon.cjs.entry.js +3 -3
  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 +458 -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 +2 -2
  34. package/lib/cjs/duet-scrollable_3.cjs.entry.js +3 -3
  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 +2 -2
  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-7a11c463.js} +1 -1
  45. package/lib/cjs/{index-6ae8090f.js → index-da5d5aaf.js} +4 -1
  46. package/lib/cjs/js-utils-be1d29ae.js +39 -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/cjs/{token-utils-05bd23b4.js → token-utils-ac8432d1.js} +10 -7
  50. package/lib/cjs/{tokens-8596cece.js → tokens-72efc7fd.js} +0 -0
  51. package/lib/cjs/{tokens.module-6b2df1c2.js → tokens.module-6afcc9c1.js} +0 -0
  52. package/lib/collection/collection-manifest.json +22 -11
  53. package/lib/collection/components/duet-action-button/duet-action-button.css +87 -0
  54. package/lib/collection/components/duet-action-button/duet-action-button.js +489 -0
  55. package/lib/collection/components/duet-button/duet-button.css +3 -0
  56. package/lib/collection/components/duet-button/duet-button.js +50 -1
  57. package/lib/collection/components/duet-card/duet-card.js +1 -1
  58. package/lib/collection/components/duet-collapsible/duet-collapsible.js +2 -1
  59. package/lib/collection/components/duet-date-picker/duet-date-picker.css +2 -57
  60. package/lib/collection/components/duet-date-picker/duet-date-picker.js +2 -6
  61. package/lib/collection/components/duet-editable-table/duet-editable-table-tabledata.js +3 -2
  62. package/lib/collection/components/duet-editable-table/duet-editable-table.css +20 -1
  63. package/lib/collection/components/duet-editable-table/duet-editable-table.js +331 -205
  64. package/lib/collection/components/duet-pagination/duet-pagination-utils.js +9 -0
  65. package/lib/collection/components/duet-pagination/duet-pagination.css +61 -0
  66. package/lib/collection/components/duet-pagination/duet-pagination.js +541 -0
  67. package/lib/collection/components/duet-range-stepper/duet-range-stepper.css +49 -0
  68. package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +340 -0
  69. package/lib/collection/components/duet-select/duet-select.css +26 -0
  70. package/lib/collection/components/duet-select/duet-select.js +39 -4
  71. package/lib/collection/components/duet-tab-group/duet-tab-group.js +5 -1
  72. package/lib/collection/components/duet-table/duet-table.css +42 -8
  73. package/lib/collection/components/duet-table/duet-table.js +11 -2
  74. package/lib/collection/components/duet-upload/duet-upload.css +25 -0
  75. package/lib/collection/components/duet-upload/duet-upload.js +270 -166
  76. package/lib/collection/components/duet-upload/upload-validators.js +1 -1
  77. package/lib/collection/utils/fixture-utils.js +3 -5
  78. package/lib/collection/utils/js-utils.js +36 -1
  79. package/lib/collection/utils/keyboard-utils.js +4 -0
  80. package/lib/collection/utils/test-utils.js +2 -1
  81. package/lib/collection/utils/token-utils.js +33 -6
  82. package/lib/custom-elements-bundle/index.d.ts +18 -12
  83. package/lib/custom-elements-bundle/index.js +1653 -1046
  84. package/lib/duet/duet.esm.js +1 -1
  85. package/lib/duet/duet.js +1 -1
  86. package/lib/duet/{p-503f1286.entry.js → p-00209700.entry.js} +1 -1
  87. package/lib/duet/{p-76fa8882.entry.js → p-01144f93.entry.js} +1 -1
  88. package/lib/duet/{p-ec2aea5f.system.entry.js → p-021bf3a2.system.entry.js} +1 -1
  89. package/lib/duet/{p-0169d57e.entry.js → p-04c6e557.entry.js} +1 -1
  90. package/lib/duet/{p-03a5fe42.system.entry.js → p-06fd151e.system.entry.js} +1 -1
  91. package/lib/duet/p-0988f548.entry.js +4 -0
  92. package/lib/duet/{p-d5a4b17f.system.entry.js → p-0e1130a0.system.entry.js} +1 -1
  93. package/lib/duet/{p-e4e99da0.entry.js → p-0fedc1c6.entry.js} +1 -1
  94. package/lib/duet/{p-2c85e001.system.entry.js → p-111b70c5.system.entry.js} +1 -1
  95. package/lib/duet/p-12825e2c.entry.js +4 -0
  96. package/lib/duet/p-166c09ce.system.entry.js +4 -0
  97. package/lib/duet/{p-8367a2d1.entry.js → p-1be45fc6.entry.js} +1 -1
  98. package/lib/duet/{p-253fd12a.system.entry.js → p-1da57e19.system.entry.js} +1 -1
  99. package/lib/duet/{p-b72ed5ef.system.entry.js → p-21c9efa8.system.entry.js} +1 -1
  100. package/lib/duet/{p-01679b51.entry.js → p-2245c56b.entry.js} +1 -1
  101. package/lib/duet/p-2273fc88.js +4 -0
  102. package/lib/duet/{p-5630828a.system.entry.js → p-232762b3.system.entry.js} +1 -1
  103. package/lib/duet/{p-3025a411.system.js → p-251dc733.system.js} +1 -1
  104. package/lib/duet/{p-ddb6344c.system.js → p-268c0abb.system.js} +0 -0
  105. package/lib/duet/{p-9077cd24.system.entry.js → p-2b6dac5c.system.entry.js} +1 -1
  106. package/lib/duet/{p-bba528b5.entry.js → p-35cdec32.entry.js} +1 -1
  107. package/lib/duet/{p-ee598605.entry.js → p-37bdfcc6.entry.js} +1 -1
  108. package/lib/duet/{p-c3d552d5.entry.js → p-3c7d81b0.entry.js} +1 -1
  109. package/lib/duet/{p-824d2360.system.entry.js → p-3f77090f.system.entry.js} +1 -1
  110. package/lib/duet/{p-7b451394.system.js → p-3fafe82f.system.js} +1 -1
  111. package/lib/duet/{p-2395f96e.system.entry.js → p-4b221aa3.system.entry.js} +1 -1
  112. package/lib/duet/{p-4ea864dd.system.entry.js → p-4b7b1d2a.system.entry.js} +1 -1
  113. package/lib/duet/p-4c282c1a.entry.js +4 -0
  114. package/lib/duet/p-51a7c020.entry.js +4 -0
  115. package/lib/duet/{p-e8ce8394.entry.js → p-5298f6fb.entry.js} +1 -1
  116. package/lib/duet/p-5746d88c.js +4 -0
  117. package/lib/duet/{p-dfd96467.entry.js → p-589c2f28.entry.js} +1 -1
  118. package/lib/duet/{p-f98fca13.system.entry.js → p-592315ca.system.entry.js} +1 -1
  119. package/lib/duet/{p-6cff80cb.system.entry.js → p-59a0ec33.system.entry.js} +1 -1
  120. package/lib/duet/p-5e1f64cb.entry.js +4 -0
  121. package/lib/duet/{p-73b5248d.entry.js → p-608645ed.entry.js} +1 -1
  122. package/lib/duet/{p-8ea92cc5.entry.js → p-683f1962.entry.js} +1 -1
  123. package/lib/duet/{p-55fff1fe.entry.js → p-6932c6d8.entry.js} +1 -1
  124. package/lib/duet/{p-731444f6.entry.js → p-6934cb1b.entry.js} +1 -1
  125. package/lib/duet/{p-caab828f.system.entry.js → p-6d209c01.system.entry.js} +1 -1
  126. package/lib/duet/{p-61198eee.system.entry.js → p-70e5c803.system.entry.js} +1 -1
  127. package/lib/duet/p-74780bca.system.js +4 -0
  128. package/lib/duet/p-74d267d3.system.entry.js +4 -0
  129. package/lib/duet/{p-2bfe8b50.system.entry.js → p-766daacb.system.entry.js} +1 -1
  130. package/lib/duet/p-77acbfe4.system.js +4 -0
  131. package/lib/duet/p-7953cff9.system.entry.js +4 -0
  132. package/lib/duet/{p-01f3fbd4.system.entry.js → p-7e939e57.system.entry.js} +1 -1
  133. package/lib/duet/{p-fa99eaa4.system.js → p-812b0905.system.js} +0 -0
  134. package/lib/duet/{p-c122428f.entry.js → p-814ed07c.entry.js} +1 -1
  135. package/lib/duet/{p-04304e51.entry.js → p-82a0e535.entry.js} +1 -1
  136. package/lib/duet/{p-4a60b131.system.entry.js → p-8338702d.system.entry.js} +1 -1
  137. package/lib/duet/{p-e682d701.system.entry.js → p-85b4b5c0.system.entry.js} +2 -2
  138. package/lib/duet/{p-e3229d0d.entry.js → p-86538787.entry.js} +1 -1
  139. package/lib/duet/p-898f30a5.js +4 -0
  140. package/lib/duet/{p-40a76f20.entry.js → p-8f01f647.entry.js} +1 -1
  141. package/lib/duet/{p-a39a0a45.entry.js → p-8f6def3f.entry.js} +1 -1
  142. package/lib/duet/{p-753098ec.entry.js → p-90464434.entry.js} +1 -1
  143. package/lib/duet/p-92639d0b.system.js +4 -0
  144. package/lib/duet/{p-873e4c51.system.entry.js → p-97f95c02.system.entry.js} +2 -2
  145. package/lib/duet/{p-ea30becb.system.entry.js → p-982deb44.system.entry.js} +1 -1
  146. package/lib/duet/{p-7fd62541.entry.js → p-9dc88c43.entry.js} +1 -1
  147. package/lib/duet/{p-412f58cf.entry.js → p-a37e57d8.entry.js} +1 -1
  148. package/lib/duet/{p-da1f6193.system.entry.js → p-a71510b8.system.entry.js} +1 -1
  149. package/lib/duet/p-a8eec12e.system.entry.js +4 -0
  150. package/lib/duet/{p-4d8cd455.system.entry.js → p-abcfbb23.system.entry.js} +1 -1
  151. package/lib/duet/{p-99262d61.entry.js → p-ac2b38e6.entry.js} +1 -1
  152. package/lib/duet/{p-24b4eefb.system.entry.js → p-ace2cd17.system.entry.js} +1 -1
  153. package/lib/duet/{p-94a2da86.system.entry.js → p-ad278903.system.entry.js} +1 -1
  154. package/lib/duet/{p-a0deb526.entry.js → p-aea907ad.entry.js} +1 -1
  155. package/lib/duet/{p-9690681b.system.entry.js → p-b432d318.system.entry.js} +1 -1
  156. package/lib/duet/{p-44fe8367.system.entry.js → p-b4e75f80.system.entry.js} +1 -1
  157. package/lib/duet/{p-c1b34a78.system.entry.js → p-b8c8105c.system.entry.js} +1 -1
  158. package/lib/duet/{p-efd978ee.entry.js → p-ba7480e9.entry.js} +1 -1
  159. package/lib/duet/p-bc7dba26.entry.js +4 -0
  160. package/lib/duet/{p-a926b44b.entry.js → p-bf06f635.entry.js} +1 -1
  161. package/lib/duet/p-c6ccf366.system.entry.js +4 -0
  162. package/lib/duet/{p-7cdb8bfa.entry.js → p-cd1a767f.entry.js} +1 -1
  163. package/lib/duet/p-d6d9b0c6.system.entry.js +4 -0
  164. package/lib/duet/{p-8143f3de.js → p-d7bc0102.js} +0 -0
  165. package/lib/duet/{p-fb98ac5a.entry.js → p-d9e329c0.entry.js} +1 -1
  166. package/lib/duet/p-dbb4a588.js +4 -0
  167. package/lib/duet/{p-f51f8554.entry.js → p-dc67d989.entry.js} +1 -1
  168. package/lib/duet/{p-a69667c7.entry.js → p-de9ff67c.entry.js} +1 -1
  169. package/lib/duet/{p-0f185a8a.system.entry.js → p-deb8ac4d.system.entry.js} +1 -1
  170. package/lib/duet/p-e2e0bc49.system.js +4 -0
  171. package/lib/duet/{p-6b24111b.system.entry.js → p-e624799f.system.entry.js} +1 -1
  172. package/lib/duet/{p-8973aa31.system.entry.js → p-e887d6db.system.entry.js} +1 -1
  173. package/lib/duet/p-e9c3053b.js +4 -0
  174. package/lib/duet/{p-a212f672.system.entry.js → p-ebed7c5e.system.entry.js} +1 -1
  175. package/lib/duet/{p-ad07f399.js → p-ed75c8b3.js} +0 -0
  176. package/lib/duet/{p-4a931c6c.system.entry.js → p-f020852e.system.entry.js} +1 -1
  177. package/lib/duet/p-f2abd301.entry.js +4 -0
  178. package/lib/duet/{p-fc35b926.system.entry.js → p-f54d1487.system.entry.js} +1 -1
  179. package/lib/duet/{p-17f85b90.entry.js → p-fc44a819.entry.js} +1 -1
  180. package/lib/duet/{p-bc6794bc.system.entry.js → p-fcdd24f8.system.entry.js} +1 -1
  181. package/lib/duet/{p-5e895b06.entry.js → p-fed35d92.entry.js} +1 -1
  182. package/lib/duet/{p-de5c3a36.entry.js → p-ff308f4c.entry.js} +1 -1
  183. package/lib/esm/duet-action-button.entry.js +159 -0
  184. package/lib/esm/duet-alert.entry.js +1 -1
  185. package/lib/esm/duet-badge.entry.js +1 -1
  186. package/lib/esm/duet-breadcrumb.entry.js +1 -1
  187. package/lib/esm/duet-breadcrumbs.entry.js +1 -1
  188. package/lib/esm/duet-button_2.entry.js +14 -5
  189. package/lib/esm/duet-caption_4.entry.js +3 -3
  190. package/lib/esm/duet-card.entry.js +4 -4
  191. package/lib/esm/duet-checkbox.entry.js +1 -1
  192. package/lib/esm/duet-choice_2.entry.js +3 -3
  193. package/lib/esm/duet-collapsible.entry.js +4 -4
  194. package/lib/esm/duet-cookie-consent.entry.js +1 -1
  195. package/lib/esm/duet-date-picker.entry.js +4 -4
  196. package/lib/esm/duet-divider_2.entry.js +1 -1
  197. package/lib/esm/{duet-editable-table_4.entry.js → duet-editable-table_3.entry.js} +384 -347
  198. package/lib/esm/duet-empty-state.entry.js +1 -1
  199. package/lib/esm/duet-fieldset.entry.js +1 -1
  200. package/lib/esm/duet-footer.entry.js +1 -1
  201. package/lib/esm/duet-grid_2.entry.js +2 -2
  202. package/lib/esm/duet-header_2.entry.js +4 -4
  203. package/lib/esm/duet-hero.entry.js +1 -1
  204. package/lib/esm/duet-icon.entry.js +3 -3
  205. package/lib/esm/duet-input_2.entry.js +1 -1
  206. package/lib/esm/duet-layout.entry.js +1 -1
  207. package/lib/esm/duet-list_2.entry.js +1 -1
  208. package/lib/esm/duet-modal.entry.js +3 -3
  209. package/lib/esm/duet-notification_2.entry.js +1 -1
  210. package/lib/esm/duet-number-input.entry.js +2 -2
  211. package/lib/esm/duet-pagination_2.entry.js +453 -0
  212. package/lib/esm/duet-progress.entry.js +1 -1
  213. package/lib/esm/duet-radio_2.entry.js +1 -1
  214. package/lib/esm/duet-range-slider.entry.js +2 -2
  215. package/lib/esm/duet-scrollable_3.entry.js +3 -3
  216. package/lib/esm/duet-select.entry.js +16 -4
  217. package/lib/esm/duet-step_2.entry.js +2 -2
  218. package/lib/esm/duet-textarea.entry.js +1 -1
  219. package/lib/esm/duet-toggle.entry.js +1 -1
  220. package/lib/esm/duet-tooltip.entry.js +1 -1
  221. package/lib/esm/duet-tray.entry.js +2 -2
  222. package/lib/esm/duet-upload-aria-status.entry.js +1 -1
  223. package/lib/esm/duet-visually-hidden.entry.js +1 -1
  224. package/lib/esm/duet.js +2 -2
  225. package/lib/esm/{focus-utils-6db957a7.js → focus-utils-b0b3361f.js} +1 -1
  226. package/lib/esm/{index-828dfb4e.js → index-16f4da7f.js} +4 -1
  227. package/lib/esm/js-utils-52e0944c.js +36 -0
  228. package/lib/esm/{keyboard-utils-584cedd7.js → keyboard-utils-6eb55cd5.js} +5 -1
  229. package/lib/esm/loader.js +2 -2
  230. package/lib/esm/{token-utils-75f78ca4.js → token-utils-e9a0cb88.js} +10 -7
  231. package/lib/esm/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
  232. package/lib/esm/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
  233. package/lib/esm-es5/duet-action-button.entry.js +4 -0
  234. package/lib/esm-es5/duet-alert.entry.js +1 -1
  235. package/lib/esm-es5/duet-badge.entry.js +1 -1
  236. package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
  237. package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
  238. package/lib/esm-es5/duet-button_2.entry.js +1 -1
  239. package/lib/esm-es5/duet-caption_4.entry.js +1 -1
  240. package/lib/esm-es5/duet-card.entry.js +1 -1
  241. package/lib/esm-es5/duet-checkbox.entry.js +1 -1
  242. package/lib/esm-es5/duet-choice_2.entry.js +1 -1
  243. package/lib/esm-es5/duet-collapsible.entry.js +1 -1
  244. package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
  245. package/lib/esm-es5/duet-date-picker.entry.js +2 -2
  246. package/lib/esm-es5/duet-divider_2.entry.js +1 -1
  247. package/lib/esm-es5/duet-editable-table_3.entry.js +4 -0
  248. package/lib/esm-es5/duet-empty-state.entry.js +1 -1
  249. package/lib/esm-es5/duet-fieldset.entry.js +1 -1
  250. package/lib/esm-es5/duet-footer.entry.js +1 -1
  251. package/lib/esm-es5/duet-grid_2.entry.js +1 -1
  252. package/lib/esm-es5/duet-header_2.entry.js +1 -1
  253. package/lib/esm-es5/duet-hero.entry.js +1 -1
  254. package/lib/esm-es5/duet-icon.entry.js +1 -1
  255. package/lib/esm-es5/duet-input_2.entry.js +1 -1
  256. package/lib/esm-es5/duet-layout.entry.js +1 -1
  257. package/lib/esm-es5/duet-list_2.entry.js +1 -1
  258. package/lib/esm-es5/duet-modal.entry.js +1 -1
  259. package/lib/esm-es5/duet-notification_2.entry.js +1 -1
  260. package/lib/esm-es5/duet-number-input.entry.js +1 -1
  261. package/lib/esm-es5/duet-pagination_2.entry.js +4 -0
  262. package/lib/esm-es5/duet-progress.entry.js +1 -1
  263. package/lib/esm-es5/duet-radio_2.entry.js +1 -1
  264. package/lib/esm-es5/duet-range-slider.entry.js +1 -1
  265. package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
  266. package/lib/esm-es5/duet-select.entry.js +2 -2
  267. package/lib/esm-es5/duet-step_2.entry.js +1 -1
  268. package/lib/esm-es5/duet-textarea.entry.js +1 -1
  269. package/lib/esm-es5/duet-toggle.entry.js +1 -1
  270. package/lib/esm-es5/duet-tooltip.entry.js +1 -1
  271. package/lib/esm-es5/duet-tray.entry.js +1 -1
  272. package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
  273. package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
  274. package/lib/esm-es5/duet.js +1 -1
  275. package/lib/esm-es5/focus-utils-b0b3361f.js +4 -0
  276. package/lib/esm-es5/{index-828dfb4e.js → index-16f4da7f.js} +1 -1
  277. package/lib/esm-es5/js-utils-52e0944c.js +4 -0
  278. package/lib/esm-es5/keyboard-utils-6eb55cd5.js +4 -0
  279. package/lib/esm-es5/loader.js +1 -1
  280. package/lib/esm-es5/token-utils-e9a0cb88.js +4 -0
  281. package/lib/esm-es5/{tokens-e110dc89.js → tokens-57d98824.js} +0 -0
  282. package/lib/esm-es5/{tokens.module-49cbf963.js → tokens.module-a13e9683.js} +0 -0
  283. package/lib/html.html-data.json +5266 -0
  284. package/lib/types/components/duet-action-button/duet-action-button.d.ts +112 -0
  285. package/lib/types/components/duet-button/duet-button.d.ts +9 -0
  286. package/lib/types/components/duet-card/duet-card.d.ts +1 -1
  287. package/lib/types/components/duet-collapsible/duet-collapsible.d.ts +1 -0
  288. package/lib/types/components/duet-editable-table/duet-editable-table-tabledata.d.ts +2 -2
  289. package/lib/types/components/duet-editable-table/duet-editable-table.d.ts +106 -48
  290. package/lib/types/components/duet-pagination/duet-pagination-utils.d.ts +1 -0
  291. package/lib/types/components/duet-pagination/duet-pagination.d.ts +105 -0
  292. package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +70 -0
  293. package/lib/types/components/duet-select/duet-select.d.ts +5 -0
  294. package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +4 -0
  295. package/lib/types/components/duet-table/duet-table.d.ts +16 -0
  296. package/lib/types/components/duet-upload/duet-upload.d.ts +68 -58
  297. package/lib/types/components.d.ts +402 -140
  298. package/lib/types/utils/js-utils.d.ts +2 -0
  299. package/lib/types/utils/keyboard-utils.d.ts +4 -0
  300. package/lib/types/utils/token-utils.d.ts +2 -0
  301. package/package.json +5 -6
  302. package/lib/cjs/duet-editable-table-button.cjs.entry.js +0 -96
  303. package/lib/collection/components/duet-editable-table/duet-editable-table-button.css +0 -32
  304. package/lib/collection/components/duet-editable-table/duet-editable-table-button.js +0 -225
  305. package/lib/collection/components/duet-editable-table/duet-editable-table-item.css +0 -36
  306. package/lib/collection/components/duet-editable-table/duet-editable-table-item.js +0 -225
  307. package/lib/duet/p-0427e1a5.entry.js +0 -4
  308. package/lib/duet/p-04f9f1bf.js +0 -4
  309. package/lib/duet/p-0f91d386.system.entry.js +0 -4
  310. package/lib/duet/p-227e5196.js +0 -4
  311. package/lib/duet/p-2545734a.entry.js +0 -4
  312. package/lib/duet/p-2b8316ee.system.entry.js +0 -4
  313. package/lib/duet/p-477c2e5c.entry.js +0 -4
  314. package/lib/duet/p-50b4fb2c.js +0 -4
  315. package/lib/duet/p-66bf27b9.system.entry.js +0 -4
  316. package/lib/duet/p-68ecdc4f.system.entry.js +0 -4
  317. package/lib/duet/p-853cd059.js +0 -4
  318. package/lib/duet/p-a16a58c1.system.js +0 -4
  319. package/lib/duet/p-b0c16ee5.entry.js +0 -4
  320. package/lib/duet/p-b3a2a1e8.entry.js +0 -4
  321. package/lib/duet/p-bb12b972.system.js +0 -4
  322. package/lib/duet/p-c63e49e2.system.entry.js +0 -4
  323. package/lib/duet/p-e6349dd2.entry.js +0 -4
  324. package/lib/duet/p-ef3fc3f3.system.js +0 -4
  325. package/lib/esm/duet-editable-table-button.entry.js +0 -92
  326. package/lib/esm-es5/duet-editable-table-button.entry.js +0 -4
  327. package/lib/esm-es5/duet-editable-table_4.entry.js +0 -4
  328. package/lib/esm-es5/focus-utils-6db957a7.js +0 -4
  329. package/lib/esm-es5/keyboard-utils-584cedd7.js +0 -4
  330. package/lib/esm-es5/token-utils-75f78ca4.js +0 -4
  331. package/lib/types/components/duet-editable-table/duet-editable-table-button.d.ts +0 -73
  332. package/lib/types/components/duet-editable-table/duet-editable-table-item.d.ts +0 -76
@@ -1,174 +1,228 @@
1
1
  /*!
2
2
  * Built with Duet Design System
3
3
  */
4
- import { Component, Element, h, Host, Method, Prop, State } from "@stencil/core";
5
- import { debounce } from "../../utils/js-utils";
6
- import { getLocaleString, sanitizeString } from "../../utils/language-utils";
7
- import { generateTemplateFn } from "../../utils/template-utils";
4
+ import { Component, Element, Event, h, Host, Prop } from "@stencil/core";
5
+ import { fieldSorter } from "../../utils/js-utils";
6
+ import { isKeyboardClick } from "../../utils/keyboard-utils";
7
+ import { getLocaleString } from "../../utils/language-utils";
8
8
  import { inheritGlobalTheme } from "../../utils/themeable-component";
9
+ import { TableData } from "./duet-editable-table-tabledata";
9
10
  export class DuetEditableTable {
10
11
  constructor() {
11
- this.template = undefined;
12
12
  /**
13
- * State() variables
14
- * @internal
13
+ * Duet-table: margin of the component.
15
14
  */
16
- this.tick = Date.now();
15
+ this.margin = "auto";
17
16
  /**
18
- * Map of items that contain list of things.
17
+ * Duet-table: Style variation of the table.
19
18
  */
20
- this.items = new Map();
19
+ this.variation = "striped";
21
20
  /**
22
- * Key used to set vertical alignment of action buttons
21
+ * Duet-table: Controls whether the table has a sticky header.
22
+ * Sticky headers are not compatible with breakpoint="none-scrollable".
23
23
  */
24
- this.alignment = "middle";
24
+ this.sticky = false;
25
25
  /**
26
- * Array of internationalized defaults for the default groups labels.
26
+ * Duet-table: Adjust the distance from top of the viewport (in pixels) when the
27
+ * table header becomes sticky.
27
28
  */
28
- this.groupsLabelDefaults = {
29
- fi: "Kaikki",
30
- en: "All items",
31
- sv: "Alla objekt",
32
- };
29
+ this.stickyDistance = "with-links";
33
30
  /**
34
- * Array of internationalized defaults for the default action labels.
31
+ * Duet-table: By default the table is responsive - it will be flattened at narrow viewport widths.
32
+ * This prop controls the breakpoint at which the table should be rendered as a _regular_ table.
33
+ * Set to "none" to disable the responsive functionality.
34
+ * Set to "none-scrollable" to disable responsive functionality _and_ allow horizontal scrolling -
35
+ * this is useful for comparison tables where it's important to maintain column and row layout.
35
36
  */
36
- this.actionLabelDefaults = {
37
- fi: "Toiminnot",
38
- en: "Actions",
39
- sv: "Handlingar",
40
- };
37
+ this.breakpoint = "small";
41
38
  /**
42
- * Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions).
43
- * @default { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }.
44
- * @example [{ id: "success", label: {fi: "Onnistunut", en: "Success", sv: "Alt klart", }}].
39
+ * Define actions for all items in a table
40
+ * An alternative to inline HTML table.
41
+ * required for Sortable tables
42
+ * @default undefined
45
43
  */
46
- this.groups = [
47
- { id: "all", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },
48
- ];
44
+ this.actions = undefined;
49
45
  /**
50
- * Array of actions that are mapped via the map variable to the various groups defined in group.
46
+ * Define columns for a table
47
+ * An alternative to inline HTML table.
48
+ * required for Sortable tables
51
49
  * @default undefined
52
- * @example [{
53
- variation: "default",
54
- icon: "action-edit-2",
55
- id: "edit",
56
- map: ["success"],
57
- label: {
58
- fi: " Label",
59
- en: " Label",
60
- sv: " Label",
61
- }
62
- }]
63
50
  */
64
- this.actions = undefined;
51
+ this.columns = undefined;
65
52
  /**
66
- * Shows or hides the table labels.
53
+ * Define rows for a table
54
+ * An alternative to inline HTML table.
55
+ * required for Sortable tables
56
+ * @default undefined
67
57
  */
68
- this.hideGroups = false;
58
+ this.rows = undefined;
69
59
  /**
70
- * Exposes the aria role for optimizing accessibility.
60
+ * Controls whether the table is sortable by headers
71
61
  */
72
- this.accessibleRole = undefined;
62
+ this.sortable = false;
63
+ /**
64
+ * Optional id that get passed to the table and used to setup ::parts
65
+ */
66
+ this.groupId = "";
73
67
  /**
74
68
  * Theme of the table.
75
69
  */
76
70
  this.theme = "";
77
71
  /**
78
- * Private methods.
72
+ * Exposes the aria role for optimizing accessibility.
79
73
  */
80
- this.kick = debounce(() => {
81
- this.tick = Date.now();
82
- }, 100); // will trigger re-render
74
+ this.accessibleRole = undefined;
75
+ this.sortableDefaultLabel = {
76
+ fi: "Järjestä",
77
+ en: "Click to sort",
78
+ sv: "Klicka för att sortera",
79
+ };
80
+ this.actionColumnLabel = {
81
+ en: "Actions for rows",
82
+ fi: "Toiminnot rivillä",
83
+ sv: "Åtgärder för rader",
84
+ };
83
85
  /**
84
- * If a user defines a template section within editable table, try to read an use it.
86
+ * Private methods.
85
87
  */
86
- this.getTemplate = () => {
87
- const templateDom = this.element.getElementsByTagName("template");
88
- if (templateDom === null || templateDom === void 0 ? void 0 : templateDom.length) {
89
- const templateString = templateDom[0].content.firstElementChild.outerHTML;
90
- return generateTemplateFn(templateString);
91
- }
92
- else {
93
- return false;
94
- }
95
- };
96
- this.getItemData = (data) => {
97
- const { item, group, uid } = data;
98
- if (this.template) {
99
- return {
100
- group,
101
- uid,
102
- item: this.template(item),
103
- };
104
- }
105
- return { item, group, uid };
88
+ this.toggleColumn = (column, e) => {
89
+ e.preventDefault();
90
+ const { sort_order, direction, index, key } = column;
91
+ this.duetTableToggle.emit({
92
+ sort_order,
93
+ index,
94
+ direction,
95
+ key,
96
+ component: "duet-editable-table",
97
+ originalEvent: e,
98
+ });
106
99
  };
107
- this.filterMap = needle => {
108
- if (needle === "all") {
109
- return Array.from(this.items);
100
+ this.handleKeyDown = (column, e) => {
101
+ if (isKeyboardClick(e)) {
102
+ this.toggleColumn(column, e);
110
103
  }
111
- return Array.from(this.items).filter(item => needle === item[1].group);
112
104
  };
113
105
  }
114
106
  /**
115
107
  * Component lifecycle events.
116
108
  */
117
109
  componentWillLoad() {
118
- // look for a <template> region in the duet-editable-table
119
- this.template = this.getTemplate();
120
- // take care of the case where groups and actions are defined as html properties instead of javascript objects
121
- if (typeof this.groups === "string") {
122
- this.internalGroupArray = sanitizeString(this.groups);
123
- }
124
- else {
125
- this.internalGroupArray = this.groups;
110
+ inheritGlobalTheme(this);
111
+ }
112
+ createLabel(column) {
113
+ const { sort_order, direction, index, label } = column;
114
+ const i18nLabel = getLocaleString(label);
115
+ if (!this.sortable) {
116
+ return i18nLabel;
126
117
  }
127
- if (typeof this.actions === "string") {
128
- this.internalActionsArray = sanitizeString(this.actions);
118
+ const getButtonIcon = () => {
119
+ // "action-subtract-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-subtract-small.svg
120
+ // "action-arrow-down-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-down-small.svg
121
+ // "action-arrow-up-small" https://cdn.duetds.com/api/icons/2.2.12/lib/assets/action-arrow-up-small.svg
122
+ if (!!sort_order && direction === 1) {
123
+ return "action-arrow-down-small";
124
+ }
125
+ else if (!!sort_order && direction === -1) {
126
+ return "action-arrow-up-small";
127
+ }
128
+ return "action-subtract-small";
129
+ };
130
+ return (h("span", { class: "duet-table-label", "data-index": index },
131
+ h("duet-button", { size: "small", icon: getButtonIcon(), "icon-size": "medium-small", "accessible-label": getLocaleString(this.sortableDefaultLabel), variation: "plain", margin: "none", "icon-right": true, onClick: event => this.toggleColumn(column, event), onKeyDown: event => this.handleKeyDown(column, event) }, i18nLabel)));
132
+ }
133
+ getSortedColumns() {
134
+ //create a new array from sort instead of mutating original
135
+ return [...this.columns].sort(fieldSorter(["index"]));
136
+ }
137
+ getRowSortOrder() {
138
+ //create a new array from sort instead of mutating original
139
+ const fields = [...this.columns].sort(fieldSorter(["sort_order"]));
140
+ //return only key from objects that have sort_order
141
+ return fields
142
+ .filter(column => column.sort_order)
143
+ .map(column => {
144
+ // add - in-front of descending direction (required by field-sorter)
145
+ return column.direction === -1 ? `-${column.key}` : column.key;
146
+ });
147
+ }
148
+ renderTableHeader() {
149
+ if (!this.columns) {
150
+ return;
129
151
  }
130
- else {
131
- this.internalActionsArray = this.actions;
152
+ const sortedColumns = this.getSortedColumns();
153
+ return (h("tr", { class: {
154
+ "duet-table-action-header": !!this.actions,
155
+ } },
156
+ sortedColumns.map(column => {
157
+ if (column.display !== false) {
158
+ return h("th", { scope: "col" }, this.createLabel(column));
159
+ }
160
+ }),
161
+ this.actions && (h("th", { scope: "col", class: "duet-table-action-header-heading" }, this.actions && h("duet-visually-hidden", null, getLocaleString(this.actionColumnLabel))))));
162
+ }
163
+ renderActions(rowItem, index) {
164
+ // escape early
165
+ if (!this.actions) {
166
+ return;
132
167
  }
133
- inheritGlobalTheme(this);
168
+ // iterate through actions and add them in the sidebar
169
+ return (h("td", { class: "duet-text-right" }, this.actions.map(actionItem => {
170
+ return (h("duet-action-button", { actionMeta: Object.assign({}, (rowItem === null || rowItem === void 0 ? void 0 : rowItem.meta) || {}, { index }), actionId: (rowItem === null || rowItem === void 0 ? void 0 : rowItem.uid) || (rowItem === null || rowItem === void 0 ? void 0 : rowItem.id) || null, actionName: actionItem.name, theme: this.theme, iconName: actionItem.icon, iconColor: actionItem.color, iconSize: actionItem.size, background: actionItem.background }));
171
+ })));
172
+ }
173
+ renderTableBody() {
174
+ const columns = this.getSortedColumns();
175
+ const rowSortOrder = this.getRowSortOrder();
176
+ const sortedRows = [...this.rows].sort(fieldSorter(rowSortOrder));
177
+ // return a tbody with rows for each item in sortedRows
178
+ return sortedRows.map((row, index) => (h("tr", { class: {
179
+ "duet-table-action-row": !!this.actions,
180
+ "duet-editable-table-row": true,
181
+ [`duet-editable-table-row-${this.groupId}`]: true,
182
+ }, "data-meta": JSON.stringify(row.meta) },
183
+ columns.map(column => {
184
+ //if we don't have any data for this column, try getting an item instead (for backwards compatibility
185
+ const value = row[column.key] ? row[column.key] : row.item;
186
+ if (column.display !== false) {
187
+ return h(TableData, { data: value, groupId: this.groupId });
188
+ }
189
+ }),
190
+ this.actions && this.renderActions(row, index))));
134
191
  }
135
192
  /**
136
- * Method to force an update of a tabular data array.
137
- * when called the method will rerender the entire tabular structure.
193
+ * Render Methods
138
194
  */
139
- async updateTable(passedItems = undefined) {
140
- this.items = new Map(passedItems || this.items);
141
- this.kick();
142
- }
143
195
  render() {
144
196
  return (h(Host, { class: {
197
+ [`duet-editable-table-${this.variation}`]: true,
198
+ [`duet-editable-table-${this.theme}`]: true,
199
+ // sticky only valid when in regular table layout
200
+ "duet-editable-table-scrollable": this.breakpoint === "none-scrollable",
201
+ "duet-editable-table-sortable": this.sortable,
202
+ "duet-editable-table-actions": !!this.actions,
203
+ "duet-m-0": this.margin === "none",
145
204
  "duet-theme-turva": this.theme === "turva",
146
- } }, this.internalGroupArray.map(group => {
147
- const currentGroup = this.filterMap(group.id);
148
- if (!currentGroup.length) {
149
- return;
150
- }
151
- return (h("duet-table", { variation: "plain", breakpoint: "none", role: "", margin: this.hideGroups ? "none" : "auto" },
152
- h("table", { class: "duet-editable-table", "aria-role": this.accessibleRole },
153
- h("thead", { class: "duet-editable-table-header" },
205
+ } },
206
+ h("duet-table", { sticky: this.sticky, stickyDistance: this.stickyDistance, margin: this.margin, theme: this.theme, variation: this.variation, breakpoint: this.breakpoint },
207
+ h("table", { role: this.accessibleRole },
208
+ h("caption", null,
209
+ h("slot", { name: "tcaption" })),
210
+ h("thead", null,
154
211
  h("tr", null,
155
- h("th", { class: {
156
- "duet-editable-table-header-hidden": this.hideGroups,
157
- } }, !this.hideGroups ? (getLocaleString(group.label)) : (h("duet-visually-hidden", null, getLocaleString(group.label)))),
158
- h("th", { class: {
159
- "duet-editable-table-header-hidden": this.hideGroups,
160
- } },
161
- h("duet-visually-hidden", null, group.actionLabel
162
- ? getLocaleString(group.actionLabel)
163
- : getLocaleString(this.actionLabelDefaults))))),
164
- h("tbody", null, currentGroup.map(dataAsArray => {
165
- const [key, value] = dataAsArray;
166
- return (h("duet-editable-table-item", { theme: this.theme, keyName: key, data: this.getItemData(value), groupId: group.id, part: group.id, alignment: this.alignment, actions: this.internalActionsArray }));
167
- })))));
168
- })));
212
+ h("td", { class: "duet-editable-table-actions-menu", colSpan: 99 },
213
+ h("slot", { name: "thead-first" }))),
214
+ this.renderTableHeader(),
215
+ h("tr", null,
216
+ h("td", { class: "duet-editable-table-actions-menu", colSpan: 99 },
217
+ h("slot", { name: "thead-last" })))),
218
+ h("tbody", null, this.renderTableBody()),
219
+ h("tfoot", null,
220
+ h("tr", null,
221
+ h("th", { class: "duet-editable-table-footer-menu", colSpan: 99 },
222
+ h("slot", { name: "tfoot" }))))))));
169
223
  }
170
224
  static get is() { return "duet-editable-table"; }
171
- static get encapsulation() { return "shadow"; }
225
+ static get encapsulation() { return "scoped"; }
172
226
  static get originalStyleUrls() { return {
173
227
  "$": ["duet-editable-table.scss"]
174
228
  }; }
@@ -176,15 +230,16 @@ export class DuetEditableTable {
176
230
  "$": ["duet-editable-table.css"]
177
231
  }; }
178
232
  static get properties() { return {
179
- "items": {
180
- "type": "unknown",
181
- "mutable": true,
233
+ "margin": {
234
+ "type": "string",
235
+ "mutable": false,
182
236
  "complexType": {
183
- "original": "DuetEditableTableItems",
184
- "resolved": "Map<any, DuetEditableTableItemData>",
237
+ "original": "DuetMargin",
238
+ "resolved": "\"auto\" | \"none\"",
185
239
  "references": {
186
- "DuetEditableTableItems": {
187
- "location": "local"
240
+ "DuetMargin": {
241
+ "location": "import",
242
+ "path": "../../common-types"
188
243
  }
189
244
  }
190
245
  },
@@ -192,38 +247,63 @@ export class DuetEditableTable {
192
247
  "optional": false,
193
248
  "docs": {
194
249
  "tags": [],
195
- "text": "Map of items that contain list of things."
250
+ "text": "Duet-table: margin of the component."
196
251
  },
197
- "defaultValue": "new Map()"
252
+ "attribute": "margin",
253
+ "reflect": false,
254
+ "defaultValue": "\"auto\""
198
255
  },
199
- "alignment": {
256
+ "variation": {
200
257
  "type": "string",
201
258
  "mutable": false,
202
259
  "complexType": {
203
- "original": "string",
204
- "resolved": "string",
260
+ "original": "DuetTableVariant",
261
+ "resolved": "\"fixed\" | \"plain\" | \"striped\"",
262
+ "references": {
263
+ "DuetTableVariant": {
264
+ "location": "import",
265
+ "path": "../duet-table/duet-table"
266
+ }
267
+ }
268
+ },
269
+ "required": false,
270
+ "optional": false,
271
+ "docs": {
272
+ "tags": [],
273
+ "text": "Duet-table: Style variation of the table."
274
+ },
275
+ "attribute": "variation",
276
+ "reflect": false,
277
+ "defaultValue": "\"striped\""
278
+ },
279
+ "sticky": {
280
+ "type": "boolean",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "boolean",
284
+ "resolved": "boolean",
205
285
  "references": {}
206
286
  },
207
287
  "required": false,
208
288
  "optional": false,
209
289
  "docs": {
210
290
  "tags": [],
211
- "text": "Key used to set vertical alignment of action buttons"
291
+ "text": "Duet-table: Controls whether the table has a sticky header.\nSticky headers are not compatible with breakpoint=\"none-scrollable\"."
212
292
  },
213
- "attribute": "alignment",
293
+ "attribute": "sticky",
214
294
  "reflect": false,
215
- "defaultValue": "\"middle\""
295
+ "defaultValue": "false"
216
296
  },
217
- "groupsLabelDefaults": {
218
- "type": "unknown",
297
+ "stickyDistance": {
298
+ "type": "string",
219
299
  "mutable": false,
220
300
  "complexType": {
221
- "original": "DuetLangObject",
222
- "resolved": "DuetLangObject",
301
+ "original": "DuetTableStickyDistance",
302
+ "resolved": "\"none\" | \"with-links\" | \"without-links\"",
223
303
  "references": {
224
- "DuetLangObject": {
304
+ "DuetTableStickyDistance": {
225
305
  "location": "import",
226
- "path": "../../utils/language-utils"
306
+ "path": "../duet-table/duet-table"
227
307
  }
228
308
  }
229
309
  },
@@ -231,20 +311,22 @@ export class DuetEditableTable {
231
311
  "optional": false,
232
312
  "docs": {
233
313
  "tags": [],
234
- "text": "Array of internationalized defaults for the default groups labels."
314
+ "text": "Duet-table: Adjust the distance from top of the viewport (in pixels) when the\ntable header becomes sticky."
235
315
  },
236
- "defaultValue": "{\n fi: \"Kaikki\",\n en: \"All items\",\n sv: \"Alla objekt\",\n }"
316
+ "attribute": "sticky-distance",
317
+ "reflect": false,
318
+ "defaultValue": "\"with-links\""
237
319
  },
238
- "actionLabelDefaults": {
239
- "type": "unknown",
320
+ "breakpoint": {
321
+ "type": "string",
240
322
  "mutable": false,
241
323
  "complexType": {
242
- "original": "DuetLangObject",
243
- "resolved": "DuetLangObject",
324
+ "original": "DuetTableBreakpoint",
325
+ "resolved": "\"large\" | \"medium\" | \"none\" | \"none-scrollable\" | \"small\" | \"x-large\" | \"xx-large\" | \"xxx-large\"",
244
326
  "references": {
245
- "DuetLangObject": {
327
+ "DuetTableBreakpoint": {
246
328
  "location": "import",
247
- "path": "../../utils/language-utils"
329
+ "path": "../duet-table/duet-table"
248
330
  }
249
331
  }
250
332
  },
@@ -252,18 +334,20 @@ export class DuetEditableTable {
252
334
  "optional": false,
253
335
  "docs": {
254
336
  "tags": [],
255
- "text": "Array of internationalized defaults for the default action labels."
337
+ "text": "Duet-table: By default the table is responsive - it will be flattened at narrow viewport widths.\nThis prop controls the breakpoint at which the table should be rendered as a _regular_ table.\nSet to \"none\" to disable the responsive functionality.\nSet to \"none-scrollable\" to disable responsive functionality _and_ allow horizontal scrolling -\nthis is useful for comparison tables where it's important to maintain column and row layout."
256
338
  },
257
- "defaultValue": "{\n fi: \"Toiminnot\",\n en: \"Actions\",\n sv: \"Handlingar\",\n }"
339
+ "attribute": "breakpoint",
340
+ "reflect": false,
341
+ "defaultValue": "\"small\""
258
342
  },
259
- "groups": {
260
- "type": "string",
261
- "mutable": false,
343
+ "actions": {
344
+ "type": "unknown",
345
+ "mutable": true,
262
346
  "complexType": {
263
- "original": "DuetEditableTableGroupNames | string",
264
- "resolved": "string | { id: string; label: DuetLangObject; actionLabel?: DuetLangObject; }[]",
347
+ "original": "DuetEditableTableActions",
348
+ "resolved": "{ icon: string; color: string; background: string; size: DuetActionButtonIconSize; name: string; map?: string[]; label?: DuetLangObject; }[]",
265
349
  "references": {
266
- "DuetEditableTableGroupNames": {
350
+ "DuetEditableTableActions": {
267
351
  "location": "local"
268
352
  }
269
353
  }
@@ -273,27 +357,21 @@ export class DuetEditableTable {
273
357
  "docs": {
274
358
  "tags": [{
275
359
  "name": "default",
276
- "text": "{ id: \"all\", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults }."
277
- }, {
278
- "name": "example",
279
- "text": "[{ id: \"success\", label: {fi: \"Onnistunut\", en: \"Success\", sv: \"Alt klart\", }}]."
360
+ "text": "undefined"
280
361
  }],
281
- "text": "Array of group names that you want the editable table to display (can be used to hide or show groups depending on conditions)."
362
+ "text": "Define actions for all items in a table\nAn alternative to inline HTML table.\nrequired for Sortable tables"
282
363
  },
283
- "attribute": "groups",
284
- "reflect": false,
285
- "defaultValue": "[\n { id: \"all\", label: this.groupsLabelDefaults, actionLabel: this.actionLabelDefaults },\n ]"
364
+ "defaultValue": "undefined"
286
365
  },
287
- "actions": {
288
- "type": "string",
289
- "mutable": false,
366
+ "columns": {
367
+ "type": "unknown",
368
+ "mutable": true,
290
369
  "complexType": {
291
- "original": "DuetEditableTableActions | string",
292
- "resolved": "string | { icon: string; color: string; color_hover: string; id: string; map?: string[]; label?: DuetLangObject; }[]",
370
+ "original": "DuetEditableTableColumns",
371
+ "resolved": "DuetEditableTableColumn[]",
293
372
  "references": {
294
- "DuetEditableTableActions": {
295
- "location": "import",
296
- "path": "./duet-editable-table-item"
373
+ "DuetEditableTableColumns": {
374
+ "location": "local"
297
375
  }
298
376
  }
299
377
  },
@@ -303,17 +381,35 @@ export class DuetEditableTable {
303
381
  "tags": [{
304
382
  "name": "default",
305
383
  "text": "undefined"
306
- }, {
307
- "name": "example",
308
- "text": "[{\nvariation: \"default\",\nicon: \"action-edit-2\",\nid: \"edit\",\nmap: [\"success\"],\nlabel: {\n fi: \" Label\",\n en: \" Label\",\n sv: \" Label\",\n}\n}]"
309
384
  }],
310
- "text": "Array of actions that are mapped via the map variable to the various groups defined in group."
385
+ "text": "Define columns for a table\nAn alternative to inline HTML table.\nrequired for Sortable tables"
386
+ },
387
+ "defaultValue": "undefined"
388
+ },
389
+ "rows": {
390
+ "type": "unknown",
391
+ "mutable": true,
392
+ "complexType": {
393
+ "original": "DuetEditableTableRows",
394
+ "resolved": "Record<string, any>[]",
395
+ "references": {
396
+ "DuetEditableTableRows": {
397
+ "location": "local"
398
+ }
399
+ }
400
+ },
401
+ "required": false,
402
+ "optional": false,
403
+ "docs": {
404
+ "tags": [{
405
+ "name": "default",
406
+ "text": "undefined"
407
+ }],
408
+ "text": "Define rows for a table\nAn alternative to inline HTML table.\nrequired for Sortable tables"
311
409
  },
312
- "attribute": "actions",
313
- "reflect": false,
314
410
  "defaultValue": "undefined"
315
411
  },
316
- "hideGroups": {
412
+ "sortable": {
317
413
  "type": "boolean",
318
414
  "mutable": false,
319
415
  "complexType": {
@@ -325,13 +421,13 @@ export class DuetEditableTable {
325
421
  "optional": false,
326
422
  "docs": {
327
423
  "tags": [],
328
- "text": "Shows or hides the table labels."
424
+ "text": "Controls whether the table is sortable by headers"
329
425
  },
330
- "attribute": "hide-table-labels",
426
+ "attribute": "sortable",
331
427
  "reflect": false,
332
428
  "defaultValue": "false"
333
429
  },
334
- "accessibleRole": {
430
+ "groupId": {
335
431
  "type": "string",
336
432
  "mutable": false,
337
433
  "complexType": {
@@ -343,11 +439,11 @@ export class DuetEditableTable {
343
439
  "optional": false,
344
440
  "docs": {
345
441
  "tags": [],
346
- "text": "Exposes the aria role for optimizing accessibility."
442
+ "text": "Optional id that get passed to the table and used to setup ::parts"
347
443
  },
348
- "attribute": "accessible-role",
444
+ "attribute": "group-id",
349
445
  "reflect": false,
350
- "defaultValue": "undefined"
446
+ "defaultValue": "\"\""
351
447
  },
352
448
  "theme": {
353
449
  "type": "string",
@@ -371,34 +467,64 @@ export class DuetEditableTable {
371
467
  "attribute": "theme",
372
468
  "reflect": false,
373
469
  "defaultValue": "\"\""
470
+ },
471
+ "accessibleRole": {
472
+ "type": "string",
473
+ "mutable": false,
474
+ "complexType": {
475
+ "original": "string",
476
+ "resolved": "string",
477
+ "references": {}
478
+ },
479
+ "required": false,
480
+ "optional": false,
481
+ "docs": {
482
+ "tags": [],
483
+ "text": "Exposes the aria role for optimizing accessibility."
484
+ },
485
+ "attribute": "accessible-role",
486
+ "reflect": false,
487
+ "defaultValue": "undefined"
374
488
  }
375
489
  }; }
376
- static get states() { return {
377
- "tick": {}
378
- }; }
379
- static get methods() { return {
380
- "updateTable": {
490
+ static get events() { return [{
491
+ "method": "duetTableToggle",
492
+ "name": "duetTableToggle",
493
+ "bubbles": true,
494
+ "cancelable": true,
495
+ "composed": true,
496
+ "docs": {
497
+ "tags": [],
498
+ "text": "Event emitted when table is sortable and a header item is clicked/enter is pressed"
499
+ },
381
500
  "complexType": {
382
- "signature": "(passedItems?: DuetEditableTableItems) => Promise<void>",
383
- "parameters": [{
384
- "tags": [],
385
- "text": ""
386
- }],
501
+ "original": "DuetTableToggleEvent",
502
+ "resolved": "{ component: \"duet-editable-table\"; sort_order?: number; direction: 1 | -1; index: number; key: string; originalEvent: MouseEvent | KeyboardEvent; }",
387
503
  "references": {
388
- "Promise": {
389
- "location": "global"
390
- },
391
- "DuetEditableTableItems": {
504
+ "DuetTableToggleEvent": {
392
505
  "location": "local"
393
506
  }
394
- },
395
- "return": "Promise<void>"
396
- },
507
+ }
508
+ }
509
+ }, {
510
+ "method": "duetMenuClick",
511
+ "name": "duetMenuClick",
512
+ "bubbles": true,
513
+ "cancelable": true,
514
+ "composed": true,
397
515
  "docs": {
398
- "text": "Method to force an update of a tabular data array.\nwhen called the method will rerender the entire tabular structure.",
399
- "tags": []
516
+ "tags": [],
517
+ "text": "Event emitted when table is sortable and a header item is clicked/enter is pressed"
518
+ },
519
+ "complexType": {
520
+ "original": "DuetTableMenuEvent",
521
+ "resolved": "{ component: \"duet-editable-table\"; originalEvent: MouseEvent | KeyboardEvent; }",
522
+ "references": {
523
+ "DuetTableMenuEvent": {
524
+ "location": "local"
525
+ }
526
+ }
400
527
  }
401
- }
402
- }; }
528
+ }]; }
403
529
  static get elementRef() { return "element"; }
404
530
  }