@ds-autonomie/web-components 2.18.0 → 2.19.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 (479) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/cdn/chunks/{chunk.HJUAHLY6.js → chunk.2EC2JS5U.js} +1 -1
  3. package/cdn/chunks/{chunk.3G5TZAEL.js → chunk.2J6VNJAV.js} +2 -2
  4. package/cdn/chunks/chunk.2JTZGBMF.js +1 -0
  5. package/cdn/chunks/chunk.3D5VBTZM.js +6 -0
  6. package/cdn/chunks/chunk.3FMDB6AF.js +19 -0
  7. package/cdn/chunks/{chunk.AZWPWL5D.js → chunk.3URUFDPU.js} +4 -4
  8. package/cdn/chunks/chunk.4A2SP2JA.js +68 -0
  9. package/cdn/chunks/{chunk.2RZZILUX.js → chunk.4IWXGSUM.js} +7 -7
  10. package/cdn/chunks/chunk.4VP4RPNY.js +25 -0
  11. package/cdn/chunks/{chunk.QLA42ORC.js → chunk.535I3ZDX.js} +6 -6
  12. package/cdn/chunks/{chunk.ZPW2DSUP.js → chunk.5KCVCUSX.js} +1 -1
  13. package/cdn/chunks/{chunk.L7SDBPGB.js → chunk.5MXBS7CA.js} +1 -1
  14. package/cdn/chunks/chunk.5OGTGPR7.js +1 -0
  15. package/cdn/chunks/{chunk.W3ZGFMS3.js → chunk.5PWPU25F.js} +1 -1
  16. package/cdn/chunks/{chunk.23QXZAWH.js → chunk.5V6ZBY2X.js} +1 -1
  17. package/cdn/chunks/{chunk.VE5CSYN4.js → chunk.67UP3FZD.js} +1 -1
  18. package/cdn/chunks/chunk.6HXGZFOB.js +68 -0
  19. package/cdn/chunks/{chunk.F5LRDLVV.js → chunk.77YRGKFQ.js} +1 -1
  20. package/cdn/chunks/{chunk.VO4NFG2W.js → chunk.7OMTHUFI.js} +1 -1
  21. package/cdn/chunks/{chunk.FHS54ZO7.js → chunk.7RWZ2YNR.js} +1 -1
  22. package/cdn/chunks/{chunk.H5VVBPCR.js → chunk.7TKKYYU2.js} +1 -1
  23. package/cdn/chunks/{chunk.LFI7CMVX.js → chunk.7WZQFRLE.js} +1 -1
  24. package/cdn/chunks/{chunk.TM7AGXEU.js → chunk.7YNQVYS2.js} +1 -1
  25. package/cdn/chunks/{chunk.3TFD5K7U.js → chunk.7ZYAJWHQ.js} +1 -1
  26. package/cdn/chunks/{chunk.YXR5X3ZH.js → chunk.AB4OF3RS.js} +1 -1
  27. package/cdn/chunks/{chunk.CJZS4FSB.js → chunk.AGA6W4U2.js} +1 -1
  28. package/cdn/chunks/chunk.AGX2JVB6.js +1 -0
  29. package/cdn/chunks/{chunk.LSD5NIU2.js → chunk.AYT5ORA7.js} +1 -1
  30. package/cdn/chunks/{chunk.2MLSQPMY.js → chunk.AZVWRRFP.js} +1 -1
  31. package/cdn/chunks/{chunk.AOPSMRYY.js → chunk.BDRT5OOU.js} +1 -1
  32. package/cdn/chunks/{chunk.OTTGEQF6.js → chunk.BOCMAV5D.js} +1 -1
  33. package/cdn/chunks/{chunk.2S76L6WY.js → chunk.BXY7ZIT5.js} +5 -5
  34. package/cdn/chunks/{chunk.2DV64XU7.js → chunk.CCKFL63L.js} +1 -1
  35. package/cdn/chunks/{chunk.4HSGYXFW.js → chunk.CLIKZB5P.js} +8 -14
  36. package/cdn/chunks/chunk.CMPRHBFO.js +1 -0
  37. package/cdn/chunks/{chunk.QSJXNN7N.js → chunk.COMV5MJ5.js} +1 -1
  38. package/cdn/chunks/{chunk.THOSFGWY.js → chunk.CWHPCCQQ.js} +3 -1
  39. package/cdn/chunks/{chunk.ZWCO2GBI.js → chunk.CWT6MEMU.js} +1 -1
  40. package/cdn/chunks/{chunk.ILCY7FNR.js → chunk.DFIOQK4K.js} +1 -1
  41. package/cdn/chunks/chunk.DR6FOTG4.js +1 -0
  42. package/cdn/chunks/{chunk.A45JZ63N.js → chunk.DRNNBI43.js} +1 -1
  43. package/cdn/chunks/{chunk.V3N4CMN7.js → chunk.DY5MCIEV.js} +3 -3
  44. package/cdn/chunks/chunk.E2BYQFB7.js +11 -0
  45. package/cdn/chunks/{chunk.PZ6VFJYI.js → chunk.EAWHOXCM.js} +1 -1
  46. package/cdn/chunks/chunk.EZQSKUPG.js +20 -0
  47. package/cdn/chunks/{chunk.QJLFNSIA.js → chunk.F4EQPWW4.js} +1 -1
  48. package/cdn/chunks/{chunk.SDPQMM4W.js → chunk.GDNVDKSZ.js} +1 -1
  49. package/cdn/chunks/chunk.GPW6JCHZ.js +13 -0
  50. package/cdn/chunks/{chunk.VE2TTZQA.js → chunk.GQ75QMJG.js} +12 -4
  51. package/cdn/chunks/{chunk.KC2NESXB.js → chunk.GVL377SN.js} +1 -1
  52. package/cdn/chunks/{chunk.JO6IBXF3.js → chunk.H6KRGKOT.js} +1 -1
  53. package/cdn/chunks/chunk.H7CICKO6.js +173 -0
  54. package/cdn/chunks/chunk.HEWKH2LT.js +44 -0
  55. package/cdn/chunks/{chunk.ZFWCNYR2.js → chunk.HGNNGE53.js} +1 -1
  56. package/cdn/chunks/{chunk.2LF6OMUV.js → chunk.HW5UT2FF.js} +15 -15
  57. package/cdn/chunks/{chunk.NIH3WB32.js → chunk.IDTMD6WQ.js} +1 -1
  58. package/cdn/chunks/{chunk.GYURCDPD.js → chunk.IMDJ7GD2.js} +1 -1
  59. package/cdn/chunks/{chunk.3FHGJRJ3.js → chunk.IMVLXBHS.js} +9 -10
  60. package/cdn/chunks/{chunk.YRJIHG6T.js → chunk.IUOHXTHC.js} +1 -1
  61. package/cdn/chunks/{chunk.SLTCOGOD.js → chunk.IYPKQQOD.js} +1 -1
  62. package/cdn/chunks/chunk.J7MFL7JZ.js +11 -0
  63. package/cdn/chunks/{chunk.GEV6DKVB.js → chunk.JFLIH5L5.js} +2 -22
  64. package/cdn/chunks/{chunk.NEWNV55I.js → chunk.JFT7O46L.js} +1 -1
  65. package/cdn/chunks/chunk.JLB52ESL.js +130 -0
  66. package/cdn/chunks/chunk.KOU7YZ7Z.js +32 -0
  67. package/cdn/chunks/{chunk.3LUZLW6F.js → chunk.KSJJM4LY.js} +3 -3
  68. package/cdn/chunks/{chunk.YZK4IVQW.js → chunk.KTJAW66F.js} +1 -1
  69. package/cdn/chunks/{chunk.TGVZIOKS.js → chunk.KVPC6DC4.js} +1 -1
  70. package/cdn/chunks/{chunk.GHHMVWM2.js → chunk.KWBL3MII.js} +4 -4
  71. package/cdn/chunks/{chunk.YRQ4GUXM.js → chunk.KX5QV54N.js} +1 -1
  72. package/cdn/chunks/{chunk.GM4KTNXL.js → chunk.LBAIMDY3.js} +1 -1
  73. package/cdn/chunks/chunk.M7BLJVGV.js +28 -0
  74. package/cdn/chunks/chunk.MC7ZQO6Z.js +1 -0
  75. package/cdn/chunks/chunk.MN7GWB3J.js +66 -0
  76. package/cdn/chunks/{chunk.F3UE7567.js → chunk.MRVUEYXZ.js} +1 -1
  77. package/cdn/chunks/{chunk.ZKKBL76K.js → chunk.PVV7WADS.js} +1 -1
  78. package/cdn/chunks/chunk.QEODND2O.js +8 -0
  79. package/cdn/chunks/chunk.QOIUR37X.js +1 -0
  80. package/cdn/chunks/chunk.QTD6NQFL.js +1 -0
  81. package/cdn/chunks/{chunk.FEXCFMDC.js → chunk.RMI7CBAO.js} +5 -5
  82. package/cdn/chunks/{chunk.QQLTDM2A.js → chunk.RTVNV4IL.js} +1 -1
  83. package/cdn/chunks/{chunk.UAGWSEWC.js → chunk.STCKZYIM.js} +6 -6
  84. package/cdn/chunks/chunk.THWI644G.js +54 -0
  85. package/cdn/chunks/{chunk.23NGYECZ.js → chunk.TPKY6SO3.js} +1 -1
  86. package/cdn/chunks/chunk.U6OE2WNY.js +51 -0
  87. package/cdn/chunks/{chunk.J5EBYKBM.js → chunk.UXV7IG5J.js} +1 -1
  88. package/cdn/chunks/{chunk.PSXSWQCS.js → chunk.VOJKFSPN.js} +1 -1
  89. package/cdn/chunks/{chunk.H5XLHNHE.js → chunk.VVOUCVXZ.js} +1 -1
  90. package/cdn/chunks/{chunk.UWBADC7U.js → chunk.WMOV27WV.js} +5 -2
  91. package/cdn/chunks/chunk.WQIMDJJX.js +101 -0
  92. package/cdn/chunks/{chunk.OTNGFYHL.js → chunk.WWRGGVFZ.js} +1 -1
  93. package/cdn/chunks/{chunk.HO6LFH7Z.js → chunk.WXQKHJC3.js} +1 -1
  94. package/cdn/chunks/chunk.YBVIKP5F.js +41 -0
  95. package/cdn/chunks/chunk.YDZQVGSP.js +47 -0
  96. package/cdn/chunks/{chunk.D3BOAL4N.js → chunk.YWOAIOEZ.js} +1 -1
  97. package/cdn/chunks/chunk.YZO4H6DD.js +57 -0
  98. package/cdn/chunks/{chunk.MTXJMWYM.js → chunk.Z226LHQY.js} +1 -1
  99. package/cdn/chunks/{chunk.2QOKOUSD.js → chunk.ZMEW7RFS.js} +1 -1
  100. package/cdn/components/accordion/accordion.js +1 -1
  101. package/cdn/components/accordion-group/accordion-group.js +1 -1
  102. package/cdn/components/alert/alert.js +1 -1
  103. package/cdn/components/breadcrumb/breadcrumb.js +1 -1
  104. package/cdn/components/breadcrumb-item/breadcrumb-item.js +1 -1
  105. package/cdn/components/button/button.js +1 -1
  106. package/cdn/components/calendar/calendar.js +1 -1
  107. package/cdn/components/card-nav-accordion/card-nav-accordion.js +1 -1
  108. package/cdn/components/checkbox/checkbox.js +1 -1
  109. package/cdn/components/checkbox/checkbox.styles.js +1 -1
  110. package/cdn/components/checkbox-button/checkbox-button.js +1 -1
  111. package/cdn/components/checkbox-card/checkbox-card.js +1 -1
  112. package/cdn/components/checkbox-group/checkbox-group.js +1 -1
  113. package/cdn/components/combobox/combobox.js +1 -1
  114. package/cdn/components/combobox/combobox.styles.js +1 -1
  115. package/cdn/components/copy-button/copy-button.js +1 -1
  116. package/cdn/components/dialog/dialog.js +1 -1
  117. package/cdn/components/drawer/drawer.js +1 -1
  118. package/cdn/components/dropdown/dropdown.js +1 -1
  119. package/cdn/components/error-message-panel/error-message-panel.js +1 -1
  120. package/cdn/components/file-upload/file-upload.js +1 -1
  121. package/cdn/components/filter-button/filter-button.js +1 -1
  122. package/cdn/components/filter-counter/filter-counter.js +1 -1
  123. package/cdn/components/filter-date/filter-date.js +1 -1
  124. package/cdn/components/filter-range/filter-range.js +1 -1
  125. package/cdn/components/filter-select/filter-select.js +1 -1
  126. package/cdn/components/footer/footer.js +1 -1
  127. package/cdn/components/format-bytes/format-bytes.js +1 -1
  128. package/cdn/components/format-date/format-date.js +1 -1
  129. package/cdn/components/format-number/format-number.js +1 -1
  130. package/cdn/components/header/header.d.ts +1 -0
  131. package/cdn/components/header/header.js +1 -1
  132. package/cdn/components/header-external-link/header-external-link.js +1 -1
  133. package/cdn/components/header-modern/header-modern.d.ts +1 -0
  134. package/cdn/components/header-modern/header-modern.js +1 -1
  135. package/cdn/components/header-search/header-search.js +1 -1
  136. package/cdn/components/input/input.js +1 -1
  137. package/cdn/components/input-amount/input-amount.js +1 -1
  138. package/cdn/components/input-date/input-date.js +1 -1
  139. package/cdn/components/input-mask/input-mask.js +1 -1
  140. package/cdn/components/input-native/input-native.js +1 -1
  141. package/cdn/components/input-phone/input-phone.js +1 -1
  142. package/cdn/components/input-time/input-time.js +1 -1
  143. package/cdn/components/menu-accordion/menu-accordion.js +1 -1
  144. package/cdn/components/menu-item/menu-item.js +1 -1
  145. package/cdn/components/menu-navigation/menu-navigation.js +1 -1
  146. package/cdn/components/navbar-link/navbar-link.js +1 -1
  147. package/cdn/components/navbar-menu/navbar-menu.js +1 -1
  148. package/cdn/components/option/option.d.ts +2 -0
  149. package/cdn/components/option/option.js +1 -1
  150. package/cdn/components/option/option.styles.js +1 -1
  151. package/cdn/components/pagination/pagination.js +1 -1
  152. package/cdn/components/profile-button/profile-button.js +1 -1
  153. package/cdn/components/progress-bar/progress-bar.js +1 -1
  154. package/cdn/components/radio/radio.js +1 -1
  155. package/cdn/components/radio/radio.styles.js +1 -1
  156. package/cdn/components/radio-button/radio-button.js +1 -1
  157. package/cdn/components/radio-card/radio-card.js +1 -1
  158. package/cdn/components/radio-group/radio-group.js +1 -1
  159. package/cdn/components/relative-time/relative-time.js +1 -1
  160. package/cdn/components/search/search.js +1 -1
  161. package/cdn/components/search/search.styles.js +1 -1
  162. package/cdn/components/select/select.d.ts +3 -1
  163. package/cdn/components/select/select.js +1 -1
  164. package/cdn/components/select/select.styles.js +1 -1
  165. package/cdn/components/sidenav/sidenav.d.ts +4 -1
  166. package/cdn/components/sidenav/sidenav.js +1 -1
  167. package/cdn/components/sidenav-info-accordion/sidenav-info-accordion.js +1 -1
  168. package/cdn/components/skip-link-item/skip-link-item.js +1 -1
  169. package/cdn/components/skip-links/skip-links.js +1 -1
  170. package/cdn/components/spinner/spinner.js +1 -1
  171. package/cdn/components/split-panel/split-panel.js +1 -1
  172. package/cdn/components/step/step.js +1 -1
  173. package/cdn/components/step/step.styles.js +1 -1
  174. package/cdn/components/stepper/stepper.d.ts +4 -1
  175. package/cdn/components/stepper/stepper.js +1 -1
  176. package/cdn/components/switch/switch.js +1 -1
  177. package/cdn/components/switch/switch.styles.js +1 -1
  178. package/cdn/components/tab/tab.d.ts +3 -0
  179. package/cdn/components/tab/tab.js +1 -1
  180. package/cdn/components/tab/tab.styles.js +1 -1
  181. package/cdn/components/tab-group/tab-group.d.ts +1 -0
  182. package/cdn/components/tab-group/tab-group.js +1 -1
  183. package/cdn/components/tab-group/tab-group.styles.js +1 -1
  184. package/cdn/components/tab-panel/tab-panel.js +1 -1
  185. package/cdn/components/table/table.d.ts +29 -0
  186. package/cdn/components/table/table.js +1 -1
  187. package/cdn/components/table-action/table-action.js +1 -1
  188. package/cdn/components/table-body/table-body.js +1 -1
  189. package/cdn/components/table-caption/table-caption.js +1 -1
  190. package/cdn/components/table-container/table-container.js +1 -1
  191. package/cdn/components/table-head/table-head.js +1 -1
  192. package/cdn/components/table-header-row/table-header-row.d.ts +1 -0
  193. package/cdn/components/table-header-row/table-header-row.js +1 -1
  194. package/cdn/components/table-header-row/table-header-row.styles.js +1 -1
  195. package/cdn/components/table-of-contents/table-of-contents.js +1 -1
  196. package/cdn/components/table-row/table-row-base.styles.js +1 -1
  197. package/cdn/components/table-row/table-row.d.ts +20 -0
  198. package/cdn/components/table-row/table-row.js +1 -1
  199. package/cdn/components/table-row/table-row.styles.js +1 -1
  200. package/cdn/components/tag/tag.js +1 -1
  201. package/cdn/components/tooltip/tooltip.js +1 -1
  202. package/cdn/components/tree/tree.d.ts +4 -0
  203. package/cdn/components/tree/tree.js +1 -1
  204. package/cdn/components/tree-item/tree-item.js +1 -1
  205. package/cdn/custom-elements.json +936 -43
  206. package/cdn/design-system.js +1 -1
  207. package/cdn/events/dsa-table-row-reordered.d.ts +14 -0
  208. package/cdn/events/dsa-table-row-reordered.js +1 -0
  209. package/cdn/events/events.d.ts +1 -0
  210. package/cdn/internal/components/form-selectable-card/form-selectable-card.js +3 -2
  211. package/cdn/internal/components/form-selectable-card/form-selectable-card.styles.js +4 -4
  212. package/cdn/internal/components/form-toggle-button/form-toggle-button.js +3 -2
  213. package/cdn/internal/components/form-toggle-button/form-toggle-button.styles.js +2 -2
  214. package/cdn/translations/en-gb.js +1 -1
  215. package/cdn/translations/en.js +1 -1
  216. package/cdn/translations/fr.js +1 -1
  217. package/cdn/utilities/helpers.d.ts +2 -0
  218. package/cdn/utilities/helpers.js +1 -1
  219. package/cdn/utilities/localize.d.ts +2 -0
  220. package/cdn/utilities/localize.js +1 -1
  221. package/cdn/utilities/storybook.js +1 -1
  222. package/cdn/vscode.html-custom-data.json +42 -2
  223. package/cdn/web-types.json +452 -4
  224. package/dist/chunks/{chunk.TNZEC73D.js → chunk.2AMILV3O.js} +1 -1
  225. package/dist/chunks/{chunk.TZZRAR42.js → chunk.2GJ46J7Q.js} +1 -1
  226. package/dist/chunks/{chunk.C6UENJ2Y.js → chunk.2WW7OJZT.js} +1 -1
  227. package/dist/chunks/{chunk.PFQ6NGY7.js → chunk.33P7XYHC.js} +1 -1
  228. package/dist/chunks/{chunk.WHHYA5VY.js → chunk.34HS7ICN.js} +4 -0
  229. package/dist/chunks/{chunk.SLXERY4H.js → chunk.4535HZ7L.js} +8 -4
  230. package/dist/chunks/{chunk.MGW4E3VW.js → chunk.47AQXN3U.js} +2 -2
  231. package/dist/chunks/{chunk.EXHYWKQB.js → chunk.4E2FKC3C.js} +1 -1
  232. package/dist/chunks/{chunk.MPV4OPIK.js → chunk.4K6WZ7K7.js} +9 -3
  233. package/dist/chunks/{chunk.D6D5UTHQ.js → chunk.4NY2E4AU.js} +9 -5
  234. package/dist/chunks/{chunk.X6SEIMM4.js → chunk.4VSGAJJL.js} +2 -2
  235. package/dist/chunks/{chunk.TF4MJ3XV.js → chunk.5R7OHVIP.js} +3 -3
  236. package/dist/chunks/{chunk.NMU6DWUH.js → chunk.5SH25FOL.js} +27 -6
  237. package/dist/chunks/{chunk.EXGB2DIR.js → chunk.5TBGCNJD.js} +46 -25
  238. package/dist/chunks/{chunk.TRVKPMDO.js → chunk.6BCJJGLC.js} +1 -1
  239. package/dist/chunks/{chunk.RKKRGVJW.js → chunk.6RXEQKWZ.js} +13 -3
  240. package/dist/chunks/{chunk.P2KNRWE5.js → chunk.72FKNFBS.js} +1 -1
  241. package/dist/chunks/{chunk.FF67XKLP.js → chunk.75USPA7U.js} +26 -18
  242. package/dist/chunks/{chunk.V5GAH4HU.js → chunk.7BBNETYY.js} +3 -3
  243. package/dist/chunks/{chunk.AFSUKPIV.js → chunk.7MY3WW7C.js} +5 -3
  244. package/dist/chunks/{chunk.EHGHV3EE.js → chunk.B3QEXOQE.js} +2 -1
  245. package/dist/chunks/{chunk.ANOLAL4B.js → chunk.BUGXYS34.js} +1 -1
  246. package/dist/chunks/chunk.D5YUY5BG.js +608 -0
  247. package/dist/chunks/{chunk.5A6XLOZY.js → chunk.DN3K2GHZ.js} +1 -1
  248. package/dist/chunks/{chunk.6TDKZD7U.js → chunk.E6D32GY2.js} +14 -2
  249. package/dist/chunks/{chunk.TP5XEQ2O.js → chunk.ELOLGOFM.js} +1 -1
  250. package/dist/chunks/{chunk.M5X6QE4H.js → chunk.ERMNNF77.js} +1 -1
  251. package/dist/chunks/{chunk.5T4IWZR2.js → chunk.FBY2IM6R.js} +1 -1
  252. package/dist/chunks/{chunk.N2SYQR7M.js → chunk.FLI47BNN.js} +1 -1
  253. package/dist/chunks/{chunk.3WHBR6ML.js → chunk.FLRNIL37.js} +1 -1
  254. package/dist/chunks/chunk.FOZRSNGL.js +111 -0
  255. package/dist/chunks/{chunk.OAJEHJJO.js → chunk.FZFK3D6L.js} +1 -1
  256. package/dist/chunks/{chunk.CABJDFOO.js → chunk.GMHRN23H.js} +6 -6
  257. package/dist/chunks/{chunk.ZBTNV3E7.js → chunk.GSSDOCVR.js} +42 -14
  258. package/dist/chunks/{chunk.LQAWGV5K.js → chunk.GTO6NACR.js} +1 -1
  259. package/dist/chunks/{chunk.WRFA56CD.js → chunk.H26XMOUA.js} +1 -1
  260. package/dist/chunks/{chunk.3NOR7Y4Y.js → chunk.HKP752UH.js} +2 -1
  261. package/dist/chunks/{chunk.GBBK2LRH.js → chunk.HRZVG552.js} +2 -2
  262. package/dist/chunks/{chunk.PEWNJNAP.js → chunk.HYAC2WLH.js} +1 -1
  263. package/dist/chunks/{chunk.DT6Y5ZUB.js → chunk.IMZ2EJ3J.js} +2 -2
  264. package/dist/chunks/{chunk.RIMN7NRW.js → chunk.JATRBE3H.js} +7 -7
  265. package/dist/chunks/{chunk.XGZ4IJ57.js → chunk.JTPMSU67.js} +51 -33
  266. package/dist/chunks/{chunk.JUOYMIGK.js → chunk.KD27MP6C.js} +5 -2
  267. package/dist/chunks/{chunk.5NUD3TZO.js → chunk.KD5YM72X.js} +12 -4
  268. package/dist/chunks/{chunk.A6WS4GML.js → chunk.KPVDLRVV.js} +2 -2
  269. package/dist/chunks/{chunk.ZU3DGID3.js → chunk.KW762SFE.js} +3 -3
  270. package/dist/chunks/chunk.LH65ZIEN.js +412 -0
  271. package/dist/chunks/{chunk.7NJP4D2X.js → chunk.LLOSO7FC.js} +5 -5
  272. package/dist/chunks/{chunk.ZJEACN47.js → chunk.LT44CVRV.js} +1 -1
  273. package/dist/chunks/{chunk.6K3AZQXP.js → chunk.LYVWDO7O.js} +1 -1
  274. package/dist/chunks/{chunk.6JFNUOJL.js → chunk.M47KXEXM.js} +1 -1
  275. package/dist/chunks/{chunk.PGXKP7ME.js → chunk.PSWGNIVT.js} +18 -6
  276. package/dist/chunks/{chunk.FLRB45SF.js → chunk.PSYTLBRK.js} +12 -0
  277. package/dist/chunks/{chunk.2LWUWDHO.js → chunk.Q3SL7AWD.js} +3 -3
  278. package/dist/chunks/{chunk.AECIJYFZ.js → chunk.Q4BEX42U.js} +49 -33
  279. package/dist/chunks/{chunk.HPAWBSR5.js → chunk.Q7YCE4UA.js} +1 -1
  280. package/dist/chunks/{chunk.ABJLUGLR.js → chunk.QKUUHXNR.js} +65 -25
  281. package/dist/chunks/{chunk.T3CLPVPE.js → chunk.QUEYKUIS.js} +4 -4
  282. package/dist/chunks/{chunk.XJCHW2GZ.js → chunk.RG7MUNLM.js} +27 -17
  283. package/dist/chunks/{chunk.6NRREKDF.js → chunk.RK2WN36C.js} +1 -1
  284. package/dist/chunks/{chunk.ZZ67C4V2.js → chunk.RZRBWZ7K.js} +14 -5
  285. package/dist/chunks/{chunk.QZC7F7NX.js → chunk.SAKI57GG.js} +2 -2
  286. package/dist/chunks/{chunk.H7L4YNKB.js → chunk.SAQFLKP7.js} +40 -16
  287. package/dist/chunks/{chunk.UKH2D4DL.js → chunk.SGPAUD26.js} +32 -14
  288. package/dist/chunks/{chunk.7WQZIM7N.js → chunk.SGRSRDWP.js} +17 -9
  289. package/dist/chunks/{chunk.JFAQ5QOI.js → chunk.SP2SVH7K.js} +3 -3
  290. package/dist/chunks/{chunk.UNDVQ2N3.js → chunk.SXFVCR7O.js} +2 -2
  291. package/dist/chunks/{chunk.2O3KAV2X.js → chunk.T6OAGTAP.js} +2 -2
  292. package/dist/chunks/{chunk.BO3GUSFS.js → chunk.TCW77JY3.js} +1 -1
  293. package/dist/chunks/{chunk.IAJLX5AF.js → chunk.TPO64PVN.js} +11 -5
  294. package/dist/chunks/{chunk.ZQ56PQ6F.js → chunk.U4W57NV6.js} +6 -3
  295. package/dist/chunks/{chunk.DMSUKPJE.js → chunk.UESIZCBP.js} +1 -1
  296. package/dist/chunks/{chunk.LZOGVU7B.js → chunk.UQ7ZIOBO.js} +1 -1
  297. package/dist/chunks/{chunk.2K5QPKBA.js → chunk.V26NK6TM.js} +5 -4
  298. package/dist/chunks/{chunk.APWZSSG6.js → chunk.V2HQ7IVJ.js} +1 -1
  299. package/dist/chunks/{chunk.VHSA53PH.js → chunk.V3LWOWUB.js} +1 -1
  300. package/dist/chunks/{chunk.WDPZ4NSH.js → chunk.V4SDZV6L.js} +1 -1
  301. package/dist/chunks/{chunk.BHEY6E7D.js → chunk.VJMPU2K5.js} +24 -26
  302. package/dist/chunks/{chunk.HFTU6LUQ.js → chunk.VNGKMC5T.js} +1 -1
  303. package/dist/chunks/{chunk.WLP7MATK.js → chunk.VO73SGIU.js} +1 -1
  304. package/dist/chunks/{chunk.FQZVV2TO.js → chunk.VOKBXFKF.js} +8 -4
  305. package/dist/chunks/{chunk.2SQ6UBOQ.js → chunk.VPBDM3F2.js} +11 -4
  306. package/dist/chunks/{chunk.LZPAAWTZ.js → chunk.VPZ2H23V.js} +0 -20
  307. package/dist/chunks/{chunk.BSSSDSVK.js → chunk.VYX5ZSFI.js} +2 -2
  308. package/dist/chunks/{chunk.ACM36IFE.js → chunk.WAEFCPAX.js} +6 -6
  309. package/dist/chunks/{chunk.UHSLPBTG.js → chunk.WEPA3NJG.js} +1 -1
  310. package/dist/chunks/{chunk.JEWVIFAO.js → chunk.WJU4UHF5.js} +4 -1
  311. package/dist/chunks/{chunk.O3SPGNIU.js → chunk.WSQ2ZYD4.js} +9 -5
  312. package/dist/chunks/{chunk.4NZ25HB6.js → chunk.XAYOMJ4X.js} +27 -17
  313. package/dist/chunks/{chunk.SOF3BQCV.js → chunk.XMBQRPGX.js} +10 -6
  314. package/dist/chunks/{chunk.YC2VYNCD.js → chunk.XTVVSORU.js} +1 -1
  315. package/dist/chunks/{chunk.6RDA3XLH.js → chunk.YF2V46J3.js} +9 -10
  316. package/dist/chunks/{chunk.63ACYDSJ.js → chunk.YI6BUIUL.js} +3 -3
  317. package/dist/chunks/{chunk.FB4KLQQL.js → chunk.YYKAI7FO.js} +6 -12
  318. package/dist/chunks/{chunk.VKBTTWXW.js → chunk.ZFGRB56M.js} +94 -38
  319. package/dist/chunks/{chunk.MVDMKWDN.js → chunk.ZHPIA4F4.js} +3 -1
  320. package/dist/chunks/{chunk.HBYJN6RA.js → chunk.ZS3JNRJE.js} +2 -2
  321. package/dist/chunks/{chunk.ATUDHG2E.js → chunk.ZYGCOBUE.js} +1 -1
  322. package/dist/components/accordion/accordion.js +2 -2
  323. package/dist/components/accordion-group/accordion-group.js +4 -4
  324. package/dist/components/alert/alert.js +2 -2
  325. package/dist/components/breadcrumb/breadcrumb.js +2 -2
  326. package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -2
  327. package/dist/components/button/button.js +3 -3
  328. package/dist/components/calendar/calendar.js +2 -2
  329. package/dist/components/card-nav-accordion/card-nav-accordion.js +2 -2
  330. package/dist/components/checkbox/checkbox.js +4 -3
  331. package/dist/components/checkbox/checkbox.styles.js +1 -1
  332. package/dist/components/checkbox-button/checkbox-button.js +4 -3
  333. package/dist/components/checkbox-card/checkbox-card.js +3 -2
  334. package/dist/components/checkbox-group/checkbox-group.js +1 -1
  335. package/dist/components/combobox/combobox.js +9 -9
  336. package/dist/components/combobox/combobox.styles.js +1 -1
  337. package/dist/components/copy-button/copy-button.js +3 -3
  338. package/dist/components/dialog/dialog.js +2 -2
  339. package/dist/components/drawer/drawer.js +2 -2
  340. package/dist/components/dropdown/dropdown.js +2 -2
  341. package/dist/components/error-message-panel/error-message-panel.js +2 -2
  342. package/dist/components/file-upload/file-upload.js +3 -3
  343. package/dist/components/filter-button/filter-button.js +2 -2
  344. package/dist/components/filter-counter/filter-counter.js +13 -13
  345. package/dist/components/filter-date/filter-date.js +8 -8
  346. package/dist/components/filter-range/filter-range.js +13 -13
  347. package/dist/components/filter-select/filter-select.js +16 -16
  348. package/dist/components/footer/footer.js +2 -2
  349. package/dist/components/format-bytes/format-bytes.js +2 -2
  350. package/dist/components/format-date/format-date.js +2 -2
  351. package/dist/components/format-number/format-number.js +2 -2
  352. package/dist/components/header/header.d.ts +1 -0
  353. package/dist/components/header/header.js +3 -2
  354. package/dist/components/header-external-link/header-external-link.js +2 -1
  355. package/dist/components/header-modern/header-modern.d.ts +1 -0
  356. package/dist/components/header-modern/header-modern.js +3 -2
  357. package/dist/components/header-search/header-search.js +6 -6
  358. package/dist/components/input/input.js +8 -8
  359. package/dist/components/input-amount/input-amount.js +2 -2
  360. package/dist/components/input-date/input-date.js +4 -4
  361. package/dist/components/input-mask/input-mask.js +2 -2
  362. package/dist/components/input-native/input-native.js +2 -2
  363. package/dist/components/input-phone/input-phone.js +9 -8
  364. package/dist/components/input-time/input-time.js +2 -2
  365. package/dist/components/menu-accordion/menu-accordion.js +3 -3
  366. package/dist/components/menu-item/menu-item.js +3 -3
  367. package/dist/components/menu-navigation/menu-navigation.js +4 -4
  368. package/dist/components/navbar-link/navbar-link.js +4 -4
  369. package/dist/components/navbar-menu/navbar-menu.js +2 -2
  370. package/dist/components/option/option.d.ts +2 -0
  371. package/dist/components/option/option.js +4 -3
  372. package/dist/components/option/option.styles.js +1 -1
  373. package/dist/components/pagination/pagination.js +9 -9
  374. package/dist/components/profile-button/profile-button.js +3 -3
  375. package/dist/components/progress-bar/progress-bar.js +2 -2
  376. package/dist/components/radio/radio.js +3 -2
  377. package/dist/components/radio/radio.styles.js +1 -1
  378. package/dist/components/radio-button/radio-button.js +4 -3
  379. package/dist/components/radio-card/radio-card.js +4 -3
  380. package/dist/components/radio-group/radio-group.js +2 -1
  381. package/dist/components/relative-time/relative-time.js +2 -2
  382. package/dist/components/search/search.js +3 -3
  383. package/dist/components/search/search.styles.js +1 -1
  384. package/dist/components/select/select.d.ts +3 -1
  385. package/dist/components/select/select.js +5 -5
  386. package/dist/components/select/select.styles.js +1 -1
  387. package/dist/components/sidenav/sidenav.d.ts +4 -1
  388. package/dist/components/sidenav/sidenav.js +4 -4
  389. package/dist/components/sidenav-info-accordion/sidenav-info-accordion.js +4 -4
  390. package/dist/components/skip-link-item/skip-link-item.js +2 -1
  391. package/dist/components/skip-links/skip-links.js +2 -2
  392. package/dist/components/spinner/spinner.js +2 -2
  393. package/dist/components/split-panel/split-panel.js +2 -2
  394. package/dist/components/step/step.js +4 -3
  395. package/dist/components/step/step.styles.js +1 -1
  396. package/dist/components/stepper/stepper.d.ts +4 -1
  397. package/dist/components/stepper/stepper.js +1 -1
  398. package/dist/components/switch/switch.js +3 -3
  399. package/dist/components/switch/switch.styles.js +1 -1
  400. package/dist/components/tab/tab.d.ts +3 -0
  401. package/dist/components/tab/tab.js +4 -3
  402. package/dist/components/tab/tab.styles.js +1 -1
  403. package/dist/components/tab-group/tab-group.d.ts +1 -0
  404. package/dist/components/tab-group/tab-group.js +4 -3
  405. package/dist/components/tab-group/tab-group.styles.js +1 -1
  406. package/dist/components/tab-panel/tab-panel.js +2 -1
  407. package/dist/components/table/table.d.ts +29 -0
  408. package/dist/components/table/table.js +2 -1
  409. package/dist/components/table-action/table-action.js +4 -4
  410. package/dist/components/table-body/table-body.js +3 -2
  411. package/dist/components/table-caption/table-caption.js +2 -2
  412. package/dist/components/table-container/table-container.js +3 -2
  413. package/dist/components/table-head/table-head.js +3 -2
  414. package/dist/components/table-header-row/table-header-row.d.ts +1 -0
  415. package/dist/components/table-header-row/table-header-row.js +10 -9
  416. package/dist/components/table-header-row/table-header-row.styles.js +2 -2
  417. package/dist/components/table-of-contents/table-of-contents.js +2 -2
  418. package/dist/components/table-row/table-row-base.styles.js +1 -1
  419. package/dist/components/table-row/table-row.d.ts +20 -0
  420. package/dist/components/table-row/table-row.js +8 -7
  421. package/dist/components/table-row/table-row.styles.js +2 -2
  422. package/dist/components/tag/tag.js +3 -3
  423. package/dist/components/tooltip/tooltip.js +2 -2
  424. package/dist/components/tree/tree.d.ts +4 -0
  425. package/dist/components/tree/tree.js +8 -7
  426. package/dist/components/tree-item/tree-item.js +7 -6
  427. package/dist/custom-elements.json +936 -43
  428. package/dist/design-system.js +98 -98
  429. package/dist/events/dsa-table-row-reordered.d.ts +14 -0
  430. package/dist/events/dsa-table-row-reordered.js +1 -0
  431. package/dist/events/events.d.ts +1 -0
  432. package/dist/internal/components/form-selectable-card/form-selectable-card.js +3 -2
  433. package/dist/internal/components/form-selectable-card/form-selectable-card.styles.js +4 -4
  434. package/dist/internal/components/form-toggle-button/form-toggle-button.js +3 -2
  435. package/dist/internal/components/form-toggle-button/form-toggle-button.styles.js +2 -2
  436. package/dist/translations/en-gb.js +1 -1
  437. package/dist/translations/en.js +1 -1
  438. package/dist/translations/fr.js +1 -1
  439. package/dist/utilities/helpers.d.ts +2 -0
  440. package/dist/utilities/helpers.js +7 -3
  441. package/dist/utilities/localize.d.ts +2 -0
  442. package/dist/utilities/localize.js +1 -1
  443. package/dist/utilities/storybook.js +2 -2
  444. package/dist/vscode.html-custom-data.json +42 -2
  445. package/dist/web-types.json +452 -4
  446. package/package.json +1 -1
  447. package/cdn/chunks/chunk.2PN56GC6.js +0 -1
  448. package/cdn/chunks/chunk.4RIUPE2O.js +0 -1
  449. package/cdn/chunks/chunk.63QVJAPP.js +0 -11
  450. package/cdn/chunks/chunk.67MZYN3N.js +0 -37
  451. package/cdn/chunks/chunk.6AGU5DOT.js +0 -1
  452. package/cdn/chunks/chunk.6GAHBGOF.js +0 -47
  453. package/cdn/chunks/chunk.A6JUKRCA.js +0 -38
  454. package/cdn/chunks/chunk.AEBG7WOW.js +0 -20
  455. package/cdn/chunks/chunk.AKVKEBPE.js +0 -13
  456. package/cdn/chunks/chunk.DYSLQ6GC.js +0 -68
  457. package/cdn/chunks/chunk.E6XLVREY.js +0 -11
  458. package/cdn/chunks/chunk.EHLI2NSG.js +0 -26
  459. package/cdn/chunks/chunk.FGDBYD7N.js +0 -41
  460. package/cdn/chunks/chunk.IJNUBDIJ.js +0 -1
  461. package/cdn/chunks/chunk.IYKXS5B3.js +0 -66
  462. package/cdn/chunks/chunk.JNOQLPCE.js +0 -8
  463. package/cdn/chunks/chunk.K6YUVAOE.js +0 -6
  464. package/cdn/chunks/chunk.N4VN25E6.js +0 -44
  465. package/cdn/chunks/chunk.PFU2C3OZ.js +0 -1
  466. package/cdn/chunks/chunk.QO3O2UNB.js +0 -68
  467. package/cdn/chunks/chunk.QVF2D4NC.js +0 -1
  468. package/cdn/chunks/chunk.SIT3GCR7.js +0 -173
  469. package/cdn/chunks/chunk.TFJB3OT3.js +0 -19
  470. package/cdn/chunks/chunk.UEYALIC7.js +0 -25
  471. package/cdn/chunks/chunk.W7AY6BP2.js +0 -130
  472. package/cdn/chunks/chunk.W7S553SV.js +0 -50
  473. package/cdn/chunks/chunk.WJLFKSRJ.js +0 -51
  474. package/cdn/chunks/chunk.X2G2BFIN.js +0 -1
  475. package/cdn/chunks/chunk.X4U7WI77.js +0 -28
  476. package/cdn/chunks/chunk.YUUDCDMZ.js +0 -1
  477. package/dist/chunks/chunk.DMQJ4GLL.js +0 -209
  478. package/dist/chunks/chunk.DYZHSPWO.js +0 -48
  479. package/dist/chunks/chunk.RFJJRWWT.js +0 -282
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.CJ6WHQAI.js";
4
4
  import {
5
5
  DSATable
6
- } from "./chunk.RFJJRWWT.js";
6
+ } from "./chunk.D5YUY5BG.js";
7
7
  import {
8
8
  LoadingStateElement
9
9
  } from "./chunk.YROTOHU3.js";
@@ -28,6 +28,7 @@ var DSATableBody = class extends LoadingStateElement {
28
28
  if (customElements.get("dsa-table")) {
29
29
  parent.handleRowExpandable();
30
30
  parent.handleRowSelectable();
31
+ parent.handleRowReorderable();
31
32
  parent.handleHeaderCellsCount();
32
33
  parent.handleSizeChange();
33
34
  } else {
@@ -75,7 +75,7 @@ var radio_styles_default = css`
75
75
  }
76
76
 
77
77
  /* Error */
78
- .radio__label.radio__label--error {
78
+ .radio__label--error {
79
79
  color: var(--dsa-wc-input-label-color-error) !important;
80
80
  }
81
81
 
@@ -0,0 +1,608 @@
1
+ import {
2
+ table_styles_default
3
+ } from "./chunk.PHSUFADX.js";
4
+ import {
5
+ removeAttributeIfPresent,
6
+ setAttributeIfDifferent
7
+ } from "./chunk.PSYTLBRK.js";
8
+ import {
9
+ watch
10
+ } from "./chunk.QB2NJE2Y.js";
11
+ import {
12
+ ShoelaceElement
13
+ } from "./chunk.SVWU6JW4.js";
14
+ import {
15
+ __decorateClass
16
+ } from "./chunk.N3L4GIUO.js";
17
+
18
+ // src/components/table/table.ts
19
+ import { html } from "lit";
20
+ import { customElement, property } from "lit/decorators.js";
21
+ var DSATable = class extends ShoelaceElement {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.suppressHoverClass = "reordering-no-hover";
25
+ this.draggingRow = null;
26
+ this.dropTargetRow = null;
27
+ this.rearrangingRow = null;
28
+ this.role = "table";
29
+ this.size = "medium";
30
+ this.alignment = "left";
31
+ }
32
+ connectedCallback() {
33
+ super.connectedCallback();
34
+ this.handleRowSelect = this.handleRowSelect.bind(this);
35
+ this.handleAllRowsSelect = this.handleAllRowsSelect.bind(this);
36
+ this.handleRowReorderToggle = this.handleRowReorderToggle.bind(this);
37
+ this.handleRowReorderMove = this.handleRowReorderMove.bind(this);
38
+ this.handleRowReorderDragStart = this.handleRowReorderDragStart.bind(this);
39
+ this.handleRowReorderDragEnd = this.handleRowReorderDragEnd.bind(this);
40
+ this.handleDragOver = this.handleDragOver.bind(this);
41
+ this.handleWindowDragOver = this.handleWindowDragOver.bind(this);
42
+ this.handleDrop = this.handleDrop.bind(this);
43
+ this.handleMouseMoveAfterReorder = this.handleMouseMoveAfterReorder.bind(this);
44
+ }
45
+ disconnectedCallback() {
46
+ super.disconnectedCallback();
47
+ this.removeRowSelectionListeners();
48
+ this.removeRowReorderListeners();
49
+ this.enableRowHover();
50
+ this.clearReorderState();
51
+ }
52
+ async firstUpdated() {
53
+ if (!this.selectable) {
54
+ return;
55
+ }
56
+ const headerRow = this.querySelector(
57
+ this.selectorHeaderRow
58
+ );
59
+ if (headerRow) {
60
+ await headerRow.updateComplete;
61
+ const allRows = [
62
+ ...this.querySelectorAll(this.selectorAllRows)
63
+ ];
64
+ if (headerRow == null ? void 0 : headerRow.selected) {
65
+ allRows.forEach((row) => row.selected = headerRow.selected);
66
+ } else {
67
+ const selectedRows = allRows.filter((row) => row.selected);
68
+ const selectedRowsCount = selectedRows.length;
69
+ const allRowsSelected = selectedRowsCount === allRows.length;
70
+ headerRow.checkbox.checked = selectedRowsCount > 0 && allRowsSelected;
71
+ headerRow.checkbox.indeterminate = selectedRowsCount > 0 && !allRowsSelected;
72
+ }
73
+ }
74
+ }
75
+ // Listeners
76
+ addRowSelectionListeners() {
77
+ this.addEventListener(
78
+ "dsa-table-row-change-selection",
79
+ this.handleRowSelect
80
+ );
81
+ this.addEventListener(
82
+ "dsa-table-row-all-change-selection",
83
+ this.handleAllRowsSelect
84
+ );
85
+ }
86
+ removeRowSelectionListeners() {
87
+ this.removeEventListener(
88
+ "dsa-table-row-change-selection",
89
+ this.handleRowSelect
90
+ );
91
+ this.removeEventListener(
92
+ "dsa-table-row-all-change-selection",
93
+ this.handleAllRowsSelect
94
+ );
95
+ }
96
+ addRowReorderListeners() {
97
+ this.addEventListener(
98
+ "dsa-table-row-reorder-toggle",
99
+ this.handleRowReorderToggle
100
+ );
101
+ this.addEventListener(
102
+ "dsa-table-row-reorder-move",
103
+ this.handleRowReorderMove
104
+ );
105
+ this.addEventListener(
106
+ "dsa-table-row-reorder-drag-start",
107
+ this.handleRowReorderDragStart
108
+ );
109
+ this.addEventListener(
110
+ "dsa-table-row-reorder-drag-end",
111
+ this.handleRowReorderDragEnd
112
+ );
113
+ this.addEventListener("dragover", this.handleDragOver);
114
+ this.addEventListener("drop", this.handleDrop);
115
+ window.addEventListener("dragover", this.handleWindowDragOver, true);
116
+ }
117
+ removeRowReorderListeners() {
118
+ this.removeEventListener(
119
+ "dsa-table-row-reorder-toggle",
120
+ this.handleRowReorderToggle
121
+ );
122
+ this.removeEventListener(
123
+ "dsa-table-row-reorder-move",
124
+ this.handleRowReorderMove
125
+ );
126
+ this.removeEventListener(
127
+ "dsa-table-row-reorder-drag-start",
128
+ this.handleRowReorderDragStart
129
+ );
130
+ this.removeEventListener(
131
+ "dsa-table-row-reorder-drag-end",
132
+ this.handleRowReorderDragEnd
133
+ );
134
+ this.removeEventListener("dragover", this.handleDragOver);
135
+ this.removeEventListener("drop", this.handleDrop);
136
+ window.removeEventListener("dragover", this.handleWindowDragOver, true);
137
+ }
138
+ clearDropTarget() {
139
+ if (this.dropTargetRow) {
140
+ removeAttributeIfPresent(this.dropTargetRow, "drop-target");
141
+ removeAttributeIfPresent(this.dropTargetRow, "drop-target-position");
142
+ this.dropTargetRow = null;
143
+ }
144
+ }
145
+ clearReorderState() {
146
+ if (this.rearrangingRow) {
147
+ this.rearrangingRow.rearranging = false;
148
+ this.rearrangingRow = null;
149
+ }
150
+ if (this.draggingRow) {
151
+ removeAttributeIfPresent(this.draggingRow, "dragging");
152
+ this.draggingRow = null;
153
+ }
154
+ if (this.dropTargetRow) {
155
+ this.clearDropTarget();
156
+ }
157
+ }
158
+ handleWindowDragOver(event) {
159
+ if (!this.reorderable || !this.draggingRow) {
160
+ return;
161
+ }
162
+ if (!event.composedPath().includes(this)) {
163
+ this.clearDropTarget();
164
+ }
165
+ }
166
+ getRows() {
167
+ return [...this.querySelectorAll(this.selectorAllRows)];
168
+ }
169
+ getRowBlock(row) {
170
+ const nextSibling = row.nextElementSibling;
171
+ const expandedRow = (nextSibling == null ? void 0 : nextSibling.matches(this.selectorAllExpandedRows)) ? nextSibling : null;
172
+ return { row, expandedRow };
173
+ }
174
+ getNodeAfterRowBlock(row) {
175
+ var _a;
176
+ const { expandedRow } = this.getRowBlock(row);
177
+ return (_a = expandedRow == null ? void 0 : expandedRow.nextSibling) != null ? _a : row.nextSibling;
178
+ }
179
+ moveRowToIndex(row, requestedIndex, source) {
180
+ var _a, _b;
181
+ const rows = this.getRows();
182
+ const oldIndex = rows.indexOf(row);
183
+ if (oldIndex < 0) {
184
+ return;
185
+ }
186
+ const maxIndex = rows.length - 1;
187
+ const targetIndex = Math.max(0, Math.min(requestedIndex, maxIndex));
188
+ if (targetIndex === oldIndex) {
189
+ return;
190
+ }
191
+ const targetRow = rows[targetIndex];
192
+ const { expandedRow } = this.getRowBlock(row);
193
+ const referenceNode = oldIndex < targetIndex ? this.getNodeAfterRowBlock(targetRow) : targetRow;
194
+ (_a = row.parentNode) == null ? void 0 : _a.insertBefore(row, referenceNode);
195
+ if (expandedRow) {
196
+ (_b = row.parentNode) == null ? void 0 : _b.insertBefore(expandedRow, row.nextSibling);
197
+ }
198
+ const reorderedRows = this.getRows();
199
+ const newIndex = reorderedRows.indexOf(row);
200
+ this.disableRowHoverUntilMouseMove();
201
+ this.emit("dsa-table-row-reordered", {
202
+ detail: {
203
+ movedRow: row,
204
+ oldIndex,
205
+ newIndex,
206
+ rows: reorderedRows,
207
+ source
208
+ }
209
+ });
210
+ }
211
+ handleMouseMoveAfterReorder() {
212
+ this.enableRowHover();
213
+ }
214
+ disableRowHoverUntilMouseMove() {
215
+ this.getRows().forEach((row) => {
216
+ if (!row.classList.contains(this.suppressHoverClass)) {
217
+ row.classList.add(this.suppressHoverClass);
218
+ }
219
+ });
220
+ window.removeEventListener("mousemove", this.handleMouseMoveAfterReorder);
221
+ window.addEventListener("mousemove", this.handleMouseMoveAfterReorder, {
222
+ once: true
223
+ });
224
+ }
225
+ enableRowHover() {
226
+ this.getRows().forEach((row) => {
227
+ if (row.classList.contains(this.suppressHoverClass)) {
228
+ row.classList.remove(this.suppressHoverClass);
229
+ }
230
+ });
231
+ window.removeEventListener("mousemove", this.handleMouseMoveAfterReorder);
232
+ }
233
+ findRowFromEvent(event) {
234
+ const row = event.composedPath().find(
235
+ (node) => {
236
+ var _a;
237
+ return node instanceof HTMLElement && ((_a = node.matches) == null ? void 0 : _a.call(node, this.selectorAllRows));
238
+ }
239
+ );
240
+ return row != null ? row : null;
241
+ }
242
+ handleRowReorderToggle(event) {
243
+ var _a;
244
+ if (!this.reorderable) {
245
+ return;
246
+ }
247
+ const { row } = event.detail;
248
+ event.stopPropagation();
249
+ const shouldActivate = this.rearrangingRow !== row;
250
+ if (this.rearrangingRow) {
251
+ this.rearrangingRow.rearranging = false;
252
+ }
253
+ this.rearrangingRow = shouldActivate ? row : null;
254
+ row.rearranging = shouldActivate;
255
+ (_a = row.reorderButton) == null ? void 0 : _a.focus();
256
+ }
257
+ handleRowReorderMove(event) {
258
+ var _a;
259
+ if (!this.reorderable) {
260
+ return;
261
+ }
262
+ const { row, direction } = event.detail;
263
+ event.stopPropagation();
264
+ if (this.rearrangingRow !== row) {
265
+ return;
266
+ }
267
+ const rows = this.getRows();
268
+ const rowIndex = rows.indexOf(row);
269
+ if (rowIndex < 0) {
270
+ return;
271
+ }
272
+ const targetIndex = direction === "up" ? Math.max(0, rowIndex - 1) : Math.min(rows.length - 1, rowIndex + 1);
273
+ this.moveRowToIndex(row, targetIndex, "keyboard");
274
+ (_a = row.reorderButton) == null ? void 0 : _a.focus();
275
+ }
276
+ handleRowReorderDragStart(event) {
277
+ if (!this.reorderable) {
278
+ return;
279
+ }
280
+ const { row } = event.detail;
281
+ event.stopPropagation();
282
+ this.draggingRow = row;
283
+ setAttributeIfDifferent(row, "dragging", "true");
284
+ if (this.rearrangingRow && this.rearrangingRow !== row) {
285
+ this.rearrangingRow.rearranging = false;
286
+ }
287
+ this.rearrangingRow = row;
288
+ }
289
+ handleRowReorderDragEnd() {
290
+ this.clearReorderState();
291
+ }
292
+ handleDragOver(event) {
293
+ if (!this.reorderable || !this.draggingRow) {
294
+ return;
295
+ }
296
+ const targetRow = this.findRowFromEvent(event);
297
+ if (!targetRow || targetRow === this.draggingRow) {
298
+ this.clearDropTarget();
299
+ return;
300
+ }
301
+ event.preventDefault();
302
+ if (event.dataTransfer) {
303
+ event.dataTransfer.dropEffect = "move";
304
+ }
305
+ if (this.dropTargetRow && this.dropTargetRow !== targetRow) {
306
+ removeAttributeIfPresent(this.dropTargetRow, "drop-target");
307
+ removeAttributeIfPresent(this.dropTargetRow, "drop-target-position");
308
+ }
309
+ if (this.dropTargetRow !== targetRow) {
310
+ this.dropTargetRow = targetRow;
311
+ setAttributeIfDifferent(targetRow, "drop-target", "true");
312
+ }
313
+ const rect = targetRow.getBoundingClientRect();
314
+ const isAfterTarget = event.clientY > rect.top + rect.height / 2;
315
+ const nextDropTargetPosition = isAfterTarget ? "after" : "before";
316
+ if (targetRow.getAttribute("drop-target-position") !== nextDropTargetPosition) {
317
+ setAttributeIfDifferent(
318
+ targetRow,
319
+ "drop-target-position",
320
+ nextDropTargetPosition
321
+ );
322
+ }
323
+ }
324
+ handleDrop(event) {
325
+ var _a;
326
+ if (!this.reorderable || !this.draggingRow) {
327
+ return;
328
+ }
329
+ const targetRow = this.findRowFromEvent(event);
330
+ event.preventDefault();
331
+ if (!targetRow || targetRow === this.draggingRow) {
332
+ this.clearReorderState();
333
+ return;
334
+ }
335
+ const rows = this.getRows();
336
+ const oldIndex = rows.indexOf(this.draggingRow);
337
+ const targetIndex = rows.indexOf(targetRow);
338
+ if (oldIndex < 0 || targetIndex < 0) {
339
+ this.clearReorderState();
340
+ return;
341
+ }
342
+ const rect = targetRow.getBoundingClientRect();
343
+ const isAfterTarget = event.clientY > rect.top + rect.height / 2;
344
+ let requestedIndex = targetIndex + (isAfterTarget ? 1 : 0);
345
+ if (oldIndex < requestedIndex) {
346
+ requestedIndex -= 1;
347
+ }
348
+ this.moveRowToIndex(this.draggingRow, requestedIndex, "pointer");
349
+ (_a = this.draggingRow.reorderButton) == null ? void 0 : _a.focus();
350
+ this.clearReorderState();
351
+ }
352
+ handleAllRowsSelect() {
353
+ const headerRow = this.querySelector(
354
+ this.selectorHeaderRow
355
+ );
356
+ if (headerRow === null) {
357
+ return;
358
+ }
359
+ const allRows = [
360
+ ...this.querySelectorAll(this.selectorAllRows)
361
+ ];
362
+ allRows.forEach((row) => row.selected = headerRow.selected);
363
+ const selectedRows = allRows.filter((row) => row.selected);
364
+ this.emit("dsa-table-row-all-selected", {
365
+ detail: { selectedRows }
366
+ });
367
+ }
368
+ handleRowSelect(event) {
369
+ const { target } = event;
370
+ const allRows = [
371
+ ...this.querySelectorAll(this.selectorAllRows)
372
+ ];
373
+ const selectedRows = allRows.filter((row) => row.selected);
374
+ const selectedRowsCount = selectedRows.length;
375
+ const headerRow = this.querySelector(
376
+ this.selectorHeaderRow
377
+ );
378
+ const allRowsSelected = selectedRowsCount === allRows.length;
379
+ if (headerRow !== null) {
380
+ headerRow.checkbox.checked = selectedRowsCount > 0 && allRowsSelected;
381
+ headerRow.checkbox.indeterminate = selectedRowsCount > 0 && !allRowsSelected;
382
+ }
383
+ this.emit("dsa-table-row-selected", {
384
+ detail: {
385
+ selectedRow: target,
386
+ selectedRows
387
+ }
388
+ });
389
+ }
390
+ handleRowExpandable() {
391
+ const allRows = [
392
+ ...this.querySelectorAll(this.selectorAllRows)
393
+ ];
394
+ allRows.forEach((row) => {
395
+ if (this.expandable) {
396
+ setAttributeIfDifferent(row, "expandable", "true");
397
+ } else {
398
+ removeAttributeIfPresent(row, "expandable");
399
+ }
400
+ });
401
+ }
402
+ handleHeaderRowExpandable() {
403
+ const headerRow = this.querySelector(
404
+ this.selectorHeaderRow
405
+ );
406
+ if (headerRow === null) {
407
+ return;
408
+ }
409
+ if (this.expandable) {
410
+ setAttributeIfDifferent(headerRow, "expandable", "true");
411
+ } else {
412
+ removeAttributeIfPresent(headerRow, "expandable");
413
+ }
414
+ }
415
+ handleRowReorderable() {
416
+ const allRows = [
417
+ ...this.querySelectorAll(this.selectorAllRows)
418
+ ];
419
+ allRows.forEach((row) => {
420
+ if (this.reorderable) {
421
+ setAttributeIfDifferent(row, "reorderable", "true");
422
+ setAttributeIfDifferent(row, "draggable", "true");
423
+ } else {
424
+ removeAttributeIfPresent(row, "reorderable");
425
+ removeAttributeIfPresent(row, "draggable");
426
+ row.rearranging = false;
427
+ }
428
+ });
429
+ }
430
+ handleHeaderRowReorderable() {
431
+ const headerRow = this.querySelector(
432
+ this.selectorHeaderRow
433
+ );
434
+ if (headerRow) {
435
+ if (this.reorderable) {
436
+ setAttributeIfDifferent(headerRow, "reorderable", "true");
437
+ } else {
438
+ removeAttributeIfPresent(headerRow, "reorderable");
439
+ }
440
+ }
441
+ }
442
+ handleRowSelectable() {
443
+ const allRows = [
444
+ ...this.querySelectorAll(this.selectorAllRows)
445
+ ];
446
+ allRows.forEach((row, index) => {
447
+ if (this.selectable === true && row.getAttribute("selection-name") === "") {
448
+ setAttributeIfDifferent(row, "selection-name", `row-${index}`);
449
+ } else if (!this.selectable) {
450
+ setAttributeIfDifferent(row, "selection-name", "");
451
+ }
452
+ });
453
+ }
454
+ handleHeaderRowSelectable() {
455
+ const headerRow = this.querySelector(
456
+ this.selectorHeaderRow
457
+ );
458
+ if (headerRow) {
459
+ setAttributeIfDifferent(
460
+ headerRow,
461
+ "selection-name",
462
+ this.selectable ? "header" : ""
463
+ );
464
+ }
465
+ }
466
+ handleSizeChange() {
467
+ const allRows = [
468
+ ...this.querySelectorAll(this.selectorAllRows),
469
+ ...this.querySelectorAll(this.selectorHeaderRow)
470
+ ];
471
+ allRows.forEach((row) => {
472
+ setAttributeIfDifferent(row, "size", this.size);
473
+ });
474
+ }
475
+ handleExpandableChange() {
476
+ this.handleRowExpandable();
477
+ this.handleHeaderRowExpandable();
478
+ }
479
+ handleHeaderCellsCount() {
480
+ const headerCells = [
481
+ ...this.querySelectorAll(this.selectorHeaderCell)
482
+ ];
483
+ const headerCellsCount = headerCells.length + Number(!!this.expandable) + Number(!!this.selectable) + Number(!!this.reorderable);
484
+ const allExpandedRows = [
485
+ ...this.querySelectorAll(
486
+ this.selectorAllExpandedRows
487
+ )
488
+ ];
489
+ allExpandedRows.forEach((row) => {
490
+ setAttributeIfDifferent(row, "colspan", String(headerCellsCount));
491
+ });
492
+ const allSingleCellRows = [
493
+ ...this.querySelectorAll(
494
+ this.selectorAllSingleCellRows
495
+ )
496
+ ];
497
+ allSingleCellRows.forEach((row) => {
498
+ setAttributeIfDifferent(row, "colspan", String(headerCellsCount));
499
+ });
500
+ }
501
+ handleSortableChange() {
502
+ const headerCells = this.querySelectorAll(
503
+ this.selectorHeaderCell
504
+ );
505
+ headerCells.forEach((cell) => {
506
+ if (this.sortable) {
507
+ setAttributeIfDifferent(cell, "sortable", "true");
508
+ } else {
509
+ removeAttributeIfPresent(cell, "sortable");
510
+ }
511
+ });
512
+ }
513
+ handleSelectableChange() {
514
+ if (this.selectable) {
515
+ this.addRowSelectionListeners();
516
+ } else {
517
+ this.removeRowSelectionListeners();
518
+ }
519
+ this.handleRowSelectable();
520
+ this.handleHeaderRowSelectable();
521
+ }
522
+ handleReorderableChange() {
523
+ if (this.reorderable) {
524
+ this.addRowReorderListeners();
525
+ } else {
526
+ this.removeRowReorderListeners();
527
+ this.clearReorderState();
528
+ }
529
+ this.handleRowReorderable();
530
+ this.handleHeaderRowReorderable();
531
+ }
532
+ handleAlignmentChange() {
533
+ const headerCells = this.querySelectorAll(
534
+ this.selectorHeaderCell
535
+ );
536
+ headerCells.forEach((cell) => {
537
+ setAttributeIfDifferent(cell, "alignment", this.alignment);
538
+ });
539
+ }
540
+ render() {
541
+ return html` <slot></slot> `;
542
+ }
543
+ get selectorHeaderCell() {
544
+ return "dsa-table-header-cell";
545
+ }
546
+ get selectorHeaderRow() {
547
+ return "dsa-table-header-row";
548
+ }
549
+ get selectorAllRows() {
550
+ return "dsa-table-row";
551
+ }
552
+ get selectorAllExpandedRows() {
553
+ return "dsa-table-expanded-row";
554
+ }
555
+ get selectorAllSingleCellRows() {
556
+ return "dsa-table-single-cell-row";
557
+ }
558
+ };
559
+ DSATable.styles = table_styles_default;
560
+ __decorateClass([
561
+ property({ reflect: true })
562
+ ], DSATable.prototype, "role", 2);
563
+ __decorateClass([
564
+ property({ reflect: true })
565
+ ], DSATable.prototype, "size", 2);
566
+ __decorateClass([
567
+ property({ type: Boolean, reflect: true })
568
+ ], DSATable.prototype, "sortable", 2);
569
+ __decorateClass([
570
+ property({ type: Boolean, reflect: true })
571
+ ], DSATable.prototype, "selectable", 2);
572
+ __decorateClass([
573
+ property({ type: Boolean, reflect: true })
574
+ ], DSATable.prototype, "expandable", 2);
575
+ __decorateClass([
576
+ property({ type: Boolean, reflect: true })
577
+ ], DSATable.prototype, "reorderable", 2);
578
+ __decorateClass([
579
+ property()
580
+ ], DSATable.prototype, "alignment", 2);
581
+ __decorateClass([
582
+ watch("size", { waitUntilFirstUpdate: true })
583
+ ], DSATable.prototype, "handleSizeChange", 1);
584
+ __decorateClass([
585
+ watch("expandable")
586
+ ], DSATable.prototype, "handleExpandableChange", 1);
587
+ __decorateClass([
588
+ watch(["expandable", "selectable", "reorderable"])
589
+ ], DSATable.prototype, "handleHeaderCellsCount", 1);
590
+ __decorateClass([
591
+ watch("sortable")
592
+ ], DSATable.prototype, "handleSortableChange", 1);
593
+ __decorateClass([
594
+ watch("selectable")
595
+ ], DSATable.prototype, "handleSelectableChange", 1);
596
+ __decorateClass([
597
+ watch("reorderable")
598
+ ], DSATable.prototype, "handleReorderableChange", 1);
599
+ __decorateClass([
600
+ watch("alignment", { waitUntilFirstUpdate: true })
601
+ ], DSATable.prototype, "handleAlignmentChange", 1);
602
+ DSATable = __decorateClass([
603
+ customElement("dsa-table")
604
+ ], DSATable);
605
+
606
+ export {
607
+ DSATable
608
+ };
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk.LJ2VCS7Q.js";
8
8
  import {
9
9
  LocalizeController
10
- } from "./chunk.WHHYA5VY.js";
10
+ } from "./chunk.34HS7ICN.js";
11
11
  import {
12
12
  watch
13
13
  } from "./chunk.QB2NJE2Y.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  DSATableRow
3
- } from "./chunk.DMQJ4GLL.js";
3
+ } from "./chunk.LH65ZIEN.js";
4
4
  import {
5
5
  DSATableHeaderCell
6
6
  } from "./chunk.TURUUPFG.js";
7
7
  import {
8
8
  table_header_row_styles_default
9
- } from "./chunk.WLP7MATK.js";
9
+ } from "./chunk.VO73SGIU.js";
10
10
  import {
11
11
  DSAVisuallyHidden
12
12
  } from "./chunk.JIN6PGAK.js";
@@ -58,6 +58,18 @@ var DSATableHeaderRow = class extends DSATableRow {
58
58
  </dsa-table-header-cell>
59
59
  `;
60
60
  }
61
+ renderReorderButton() {
62
+ if (!this.reorderable) {
63
+ return html``;
64
+ }
65
+ return html`
66
+ <dsa-table-header-cell aria-hidden=${this.loading}>
67
+ <dsa-visually-hidden>
68
+ ${this.localize.term("reorderTableRowsHeader")}
69
+ </dsa-visually-hidden>
70
+ </dsa-table-header-cell>
71
+ `;
72
+ }
61
73
  };
62
74
  DSATableHeaderRow.styles = table_header_row_styles_default;
63
75
  DSATableHeaderRow.dependencies = __spreadProps(__spreadValues({}, DSATableRow.dependencies), {
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk.PWL7QCVG.js";
22
22
  import {
23
23
  LocalizeController
24
- } from "./chunk.WHHYA5VY.js";
24
+ } from "./chunk.34HS7ICN.js";
25
25
  import {
26
26
  watch
27
27
  } from "./chunk.QB2NJE2Y.js";
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk.PWL7QCVG.js";
18
18
  import {
19
19
  LocalizeController
20
- } from "./chunk.WHHYA5VY.js";
20
+ } from "./chunk.34HS7ICN.js";
21
21
  import {
22
22
  DSAIcon
23
23
  } from "./chunk.CKJJ4MSU.js";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk.ZQJVCRB2.js";
15
15
  import {
16
16
  LocalizeController
17
- } from "./chunk.WHHYA5VY.js";
17
+ } from "./chunk.34HS7ICN.js";
18
18
  import {
19
19
  watch
20
20
  } from "./chunk.QB2NJE2Y.js";