@ukic/canary-web-components 3.0.0-canary.13 → 3.0.0-canary.15

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 (602) hide show
  1. package/dist/cjs/core.cjs.js +2 -2
  2. package/dist/cjs/{date-helpers-c9551119.js → date-helpers-6f70dd03.js} +20 -66
  3. package/dist/cjs/date-helpers-6f70dd03.js.map +1 -0
  4. package/dist/cjs/{helpers-fc51fdcb.js → helpers-bec0dbd4.js} +2 -2
  5. package/dist/cjs/{helpers-fc51fdcb.js.map → helpers-bec0dbd4.js.map} +1 -1
  6. package/dist/cjs/{helpers-0e4c4fdd.js → helpers-d01564f7.js} +35 -17
  7. package/dist/cjs/helpers-d01564f7.js.map +1 -0
  8. package/dist/cjs/ic-accordion-group.cjs.entry.js +2 -2
  9. package/dist/cjs/ic-accordion.cjs.entry.js +2 -2
  10. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -2
  12. package/dist/cjs/ic-badge.cjs.entry.js +3 -3
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -2
  15. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
  16. package/dist/cjs/ic-button_3.cjs.entry.js +61 -3
  17. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-card-horizontal.cjs.entry.js +16 -12
  19. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-card-vertical.cjs.entry.js +3 -3
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-checkbox-group.cjs.entry.js +7 -7
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  24. package/dist/cjs/{ic-empty-state_2.cjs.entry.js → ic-checkbox_3.cjs.entry.js} +158 -24
  25. package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -0
  26. package/dist/cjs/ic-chip.cjs.entry.js +3 -3
  27. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-classification-banner.cjs.entry.js +3 -3
  29. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-data-list.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
  32. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +7 -7
  33. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-data-table.cjs.entry.js +310 -276
  35. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-date-input.cjs.entry.js +175 -160
  37. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-date-picker.cjs.entry.js +92 -70
  39. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  40. package/dist/cjs/ic-dialog.cjs.entry.js +38 -47
  41. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-divider.cjs.entry.js +2 -2
  43. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  44. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  45. package/dist/cjs/ic-footer.cjs.entry.js +2 -2
  46. package/dist/cjs/ic-hero.cjs.entry.js +2 -2
  47. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +2 -2
  48. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +3 -3
  49. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-input-label_2.cjs.entry.js +2 -2
  51. package/dist/cjs/ic-link.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  53. package/dist/cjs/ic-menu-item.cjs.entry.js +3 -3
  54. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
  56. package/dist/cjs/ic-navigation-group.cjs.entry.js +23 -17
  57. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -2
  59. package/dist/cjs/ic-navigation-menu.cjs.entry.js +38 -24
  60. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-page-header.cjs.entry.js +12 -11
  62. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-pagination_4.cjs.entry.js +53 -32
  64. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-popover-menu.cjs.entry.js +7 -6
  66. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-radio-group.cjs.entry.js +7 -7
  68. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-radio-option.cjs.entry.js +2 -2
  70. package/dist/cjs/ic-search-bar.cjs.entry.js +3 -3
  71. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-section-container.cjs.entry.js +3 -3
  73. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-side-navigation.cjs.entry.js +10 -7
  75. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-skeleton.cjs.entry.js +3 -3
  77. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-skip-link.cjs.entry.js +11 -10
  79. package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-status-tag.cjs.entry.js +5 -5
  81. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-step.cjs.entry.js +17 -16
  83. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-stepper.cjs.entry.js +4 -4
  85. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-switch.cjs.entry.js +6 -6
  87. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-tab-context.cjs.entry.js +2 -2
  89. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-tab-group.cjs.entry.js +4 -4
  91. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  92. package/dist/cjs/ic-tab-panel.cjs.entry.js +3 -3
  93. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-tab.cjs.entry.js +3 -3
  95. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  96. package/dist/cjs/ic-theme.cjs.entry.js +3 -3
  97. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-toast-region.cjs.entry.js +2 -2
  99. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-toast.cjs.entry.js +6 -6
  101. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -4
  103. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-toggle-button.cjs.entry.js +5 -5
  105. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  106. package/dist/cjs/ic-top-navigation.cjs.entry.js +5 -9
  107. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  108. package/dist/cjs/ic-tree-item.cjs.entry.js +56 -42
  109. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  110. package/dist/cjs/ic-tree-view.cjs.entry.js +127 -22
  111. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  112. package/dist/cjs/ic-typography.cjs.entry.js +2 -2
  113. package/dist/cjs/{index-8a24b20c.js → index-d337cd8a.js} +6 -11
  114. package/dist/cjs/index-d337cd8a.js.map +1 -0
  115. package/dist/cjs/loader.cjs.js +2 -2
  116. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +1 -1
  117. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +27 -23
  118. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
  119. package/dist/collection/components/ic-data-table/ic-data-table.css +19 -2
  120. package/dist/collection/components/ic-data-table/ic-data-table.js +385 -330
  121. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  122. package/dist/collection/components/ic-data-table/ic-data-table.stories.js +8 -9
  123. package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -1
  124. package/dist/collection/components/ic-data-table/story-data.js +13 -14
  125. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  126. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +9 -9
  127. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -1
  128. package/dist/collection/components/ic-date-input/ic-date-input.js +240 -198
  129. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  130. package/dist/collection/components/ic-date-input/ic-date-input.stories.js +19 -1
  131. package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -1
  132. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +6 -3
  133. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -1
  134. package/dist/collection/components/ic-date-picker/ic-date-picker.js +133 -91
  135. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  136. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js +9 -1
  137. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -1
  138. package/dist/collection/components/ic-date-picker/ic-day-button.js +1 -1
  139. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -1
  140. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -1
  141. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -1
  142. package/dist/collection/components/ic-date-picker/story-data.js +16 -1
  143. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
  144. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +41 -38
  145. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  146. package/dist/collection/components/ic-tree-item/ic-tree-item.js +86 -50
  147. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  148. package/dist/collection/components/ic-tree-view/ic-tree-view.js +165 -31
  149. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  150. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js +384 -12
  151. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -1
  152. package/dist/collection/components/ic-tree-view/ic-tree-view.types.js +2 -0
  153. package/dist/collection/components/ic-tree-view/ic-tree-view.types.js.map +1 -0
  154. package/dist/collection/utils/date-helpers.js +19 -61
  155. package/dist/collection/utils/date-helpers.js.map +1 -1
  156. package/dist/collection/utils/helpers.js +44 -61
  157. package/dist/collection/utils/helpers.js.map +1 -1
  158. package/dist/collection/utils/testa11y.helpers.js +2 -1
  159. package/dist/collection/utils/testa11y.helpers.js.map +1 -1
  160. package/dist/components/helpers.js +1 -1
  161. package/dist/components/helpers2.js +32 -16
  162. package/dist/components/helpers2.js.map +1 -1
  163. package/dist/components/ic-badge.js +1 -1
  164. package/dist/components/ic-badge.js.map +1 -1
  165. package/dist/components/ic-button2.js +59 -1
  166. package/dist/components/ic-button2.js.map +1 -1
  167. package/dist/components/ic-card-horizontal.js +14 -10
  168. package/dist/components/ic-card-horizontal.js.map +1 -1
  169. package/dist/components/ic-card-vertical.js +1 -1
  170. package/dist/components/ic-card-vertical.js.map +1 -1
  171. package/dist/components/ic-checkbox-group.js +5 -5
  172. package/dist/components/ic-checkbox-group.js.map +1 -1
  173. package/dist/components/ic-checkbox.js +1 -175
  174. package/dist/components/ic-checkbox.js.map +1 -1
  175. package/dist/{esm/ic-checkbox.entry.js → components/ic-checkbox2.js} +53 -11
  176. package/dist/components/ic-checkbox2.js.map +1 -0
  177. package/dist/components/ic-chip.js +1 -1
  178. package/dist/components/ic-chip.js.map +1 -1
  179. package/dist/components/ic-classification-banner.js +2 -2
  180. package/dist/components/ic-classification-banner.js.map +1 -1
  181. package/dist/components/ic-data-table-title-bar.js +5 -5
  182. package/dist/components/ic-data-table-title-bar.js.map +1 -1
  183. package/dist/components/ic-data-table.js +319 -279
  184. package/dist/components/ic-data-table.js.map +1 -1
  185. package/dist/components/ic-date-input2.js +198 -225
  186. package/dist/components/ic-date-input2.js.map +1 -1
  187. package/dist/components/ic-date-picker.js +90 -67
  188. package/dist/components/ic-date-picker.js.map +1 -1
  189. package/dist/components/ic-dialog.js +38 -47
  190. package/dist/components/ic-dialog.js.map +1 -1
  191. package/dist/components/ic-input-component-container2.js +1 -1
  192. package/dist/components/ic-input-component-container2.js.map +1 -1
  193. package/dist/components/ic-menu-item2.js +1 -1
  194. package/dist/components/ic-menu-item2.js.map +1 -1
  195. package/dist/components/ic-navigation-group.js +22 -15
  196. package/dist/components/ic-navigation-group.js.map +1 -1
  197. package/dist/components/ic-navigation-menu2.js +37 -23
  198. package/dist/components/ic-navigation-menu2.js.map +1 -1
  199. package/dist/components/ic-page-header.js +10 -9
  200. package/dist/components/ic-page-header.js.map +1 -1
  201. package/dist/components/ic-pagination-bar2.js +22 -20
  202. package/dist/components/ic-pagination-bar2.js.map +1 -1
  203. package/dist/components/ic-pagination-item2.js +2 -2
  204. package/dist/components/ic-pagination-item2.js.map +1 -1
  205. package/dist/components/ic-pagination2.js +5 -5
  206. package/dist/components/ic-pagination2.js.map +1 -1
  207. package/dist/components/ic-popover-menu.js +5 -4
  208. package/dist/components/ic-popover-menu.js.map +1 -1
  209. package/dist/components/ic-radio-group.js +5 -5
  210. package/dist/components/ic-radio-group.js.map +1 -1
  211. package/dist/components/ic-search-bar.js +1 -1
  212. package/dist/components/ic-search-bar.js.map +1 -1
  213. package/dist/components/ic-section-container2.js +2 -2
  214. package/dist/components/ic-section-container2.js.map +1 -1
  215. package/dist/components/ic-select2.js +13 -10
  216. package/dist/components/ic-select2.js.map +1 -1
  217. package/dist/components/ic-side-navigation.js +8 -5
  218. package/dist/components/ic-side-navigation.js.map +1 -1
  219. package/dist/components/ic-skeleton.js +2 -2
  220. package/dist/components/ic-skeleton.js.map +1 -1
  221. package/dist/components/ic-skip-link.js +10 -9
  222. package/dist/components/ic-skip-link.js.map +1 -1
  223. package/dist/components/ic-status-tag.js +3 -3
  224. package/dist/components/ic-status-tag.js.map +1 -1
  225. package/dist/components/ic-step.js +15 -14
  226. package/dist/components/ic-step.js.map +1 -1
  227. package/dist/components/ic-stepper.js +2 -2
  228. package/dist/components/ic-stepper.js.map +1 -1
  229. package/dist/components/ic-switch.js +4 -4
  230. package/dist/components/ic-switch.js.map +1 -1
  231. package/dist/components/ic-tab-context.js +1 -1
  232. package/dist/components/ic-tab-context.js.map +1 -1
  233. package/dist/components/ic-tab-group.js +2 -2
  234. package/dist/components/ic-tab-group.js.map +1 -1
  235. package/dist/components/ic-tab-panel.js +2 -2
  236. package/dist/components/ic-tab-panel.js.map +1 -1
  237. package/dist/components/ic-tab.js +1 -1
  238. package/dist/components/ic-tab.js.map +1 -1
  239. package/dist/components/ic-text-field2.js +35 -13
  240. package/dist/components/ic-text-field2.js.map +1 -1
  241. package/dist/components/ic-theme.js +1 -1
  242. package/dist/components/ic-theme.js.map +1 -1
  243. package/dist/components/ic-toast-region.js +1 -1
  244. package/dist/components/ic-toast-region.js.map +1 -1
  245. package/dist/components/ic-toast.js +5 -5
  246. package/dist/components/ic-toast.js.map +1 -1
  247. package/dist/components/ic-toggle-button-group.js +2 -2
  248. package/dist/components/ic-toggle-button-group.js.map +1 -1
  249. package/dist/components/ic-toggle-button.js +3 -3
  250. package/dist/components/ic-toggle-button.js.map +1 -1
  251. package/dist/components/ic-top-navigation.js +4 -8
  252. package/dist/components/ic-top-navigation.js.map +1 -1
  253. package/dist/components/ic-tree-item.js +55 -40
  254. package/dist/components/ic-tree-item.js.map +1 -1
  255. package/dist/components/ic-tree-view.js +132 -23
  256. package/dist/components/ic-tree-view.js.map +1 -1
  257. package/dist/core/core.css +353 -245
  258. package/dist/core/core.esm.js +1 -1
  259. package/dist/core/core.esm.js.map +1 -1
  260. package/dist/core/{p-8d73a3cc.entry.js → p-0616dfbe.entry.js} +2 -2
  261. package/dist/core/p-0616dfbe.entry.js.map +1 -0
  262. package/dist/core/{p-b17e7059.entry.js → p-06bf2cea.entry.js} +2 -2
  263. package/dist/core/{p-b17e7059.entry.js.map → p-06bf2cea.entry.js.map} +1 -1
  264. package/dist/core/{p-f2f7299b.entry.js → p-071f4748.entry.js} +2 -2
  265. package/dist/core/{p-f2f7299b.entry.js.map → p-071f4748.entry.js.map} +1 -1
  266. package/dist/core/p-09e8b002.entry.js +2 -0
  267. package/dist/core/p-09e8b002.entry.js.map +1 -0
  268. package/dist/core/{p-b18a5861.entry.js → p-110486f0.entry.js} +2 -2
  269. package/dist/core/{p-b18a5861.entry.js.map → p-110486f0.entry.js.map} +1 -1
  270. package/dist/core/p-19ecd2a6.entry.js +2 -0
  271. package/dist/core/p-19ecd2a6.entry.js.map +1 -0
  272. package/dist/core/p-1a2b4803.entry.js +2 -0
  273. package/dist/core/p-1a2b4803.entry.js.map +1 -0
  274. package/dist/core/{p-32720276.entry.js → p-1bbae4b3.entry.js} +2 -2
  275. package/dist/core/{p-0fd762bf.entry.js → p-1f415138.entry.js} +2 -2
  276. package/dist/core/p-1f415138.entry.js.map +1 -0
  277. package/dist/core/{p-b8aa37f9.entry.js → p-20bd48cf.entry.js} +2 -2
  278. package/dist/core/{p-be5ad372.entry.js → p-21193099.entry.js} +2 -2
  279. package/dist/core/p-264335c5.entry.js +2 -0
  280. package/dist/core/p-264335c5.entry.js.map +1 -0
  281. package/dist/core/{p-a214a9f8.entry.js → p-30a5b319.entry.js} +2 -2
  282. package/dist/core/{p-a214a9f8.entry.js.map → p-30a5b319.entry.js.map} +1 -1
  283. package/dist/core/{p-9f4fa820.entry.js → p-3244a174.entry.js} +2 -2
  284. package/dist/core/{p-9f4fa820.entry.js.map → p-3244a174.entry.js.map} +1 -1
  285. package/dist/core/{p-5dc25d11.entry.js → p-37df68fe.entry.js} +2 -2
  286. package/dist/core/{p-5dc25d11.entry.js.map → p-37df68fe.entry.js.map} +1 -1
  287. package/dist/core/{p-3e9564b5.entry.js → p-39269b62.entry.js} +2 -2
  288. package/dist/core/p-3955fa94.entry.js +2 -0
  289. package/dist/core/p-3955fa94.entry.js.map +1 -0
  290. package/dist/core/p-3f185257.entry.js +2 -0
  291. package/dist/core/p-3f185257.entry.js.map +1 -0
  292. package/dist/core/p-401f0043.entry.js +2 -0
  293. package/dist/core/{p-144b1dee.entry.js.map → p-401f0043.entry.js.map} +1 -1
  294. package/dist/core/{p-da798f58.entry.js → p-44ac8f8a.entry.js} +2 -2
  295. package/dist/core/{p-afc4ce53.entry.js → p-4d39cab8.entry.js} +2 -2
  296. package/dist/core/{p-fd006a9b.entry.js → p-4e187a11.entry.js} +2 -2
  297. package/dist/core/{p-d154b26c.entry.js → p-50324682.entry.js} +2 -2
  298. package/dist/core/{p-cd9e1ffa.entry.js → p-50f4d151.entry.js} +2 -2
  299. package/dist/core/{p-cd9e1ffa.entry.js.map → p-50f4d151.entry.js.map} +1 -1
  300. package/dist/core/{p-22e0ed96.entry.js → p-5796b6cd.entry.js} +2 -2
  301. package/dist/core/{p-96551ddf.entry.js → p-57c80527.entry.js} +2 -2
  302. package/dist/core/p-59aed40c.entry.js +2 -0
  303. package/dist/core/p-59aed40c.entry.js.map +1 -0
  304. package/dist/core/{p-b6db0cc1.entry.js → p-60d15d35.entry.js} +2 -2
  305. package/dist/core/p-65d3a515.entry.js +2 -0
  306. package/dist/core/p-65d3a515.entry.js.map +1 -0
  307. package/dist/core/{p-272352cb.entry.js → p-6aa1e928.entry.js} +2 -2
  308. package/dist/core/p-6e0f93c5.entry.js +2 -0
  309. package/dist/core/p-6e0f93c5.entry.js.map +1 -0
  310. package/dist/core/p-6f6d793f.entry.js +2 -0
  311. package/dist/core/p-6f6d793f.entry.js.map +1 -0
  312. package/dist/core/{p-507ec499.entry.js → p-701696aa.entry.js} +2 -2
  313. package/dist/core/{p-507ec499.entry.js.map → p-701696aa.entry.js.map} +1 -1
  314. package/dist/core/{p-1334a78f.entry.js → p-73e41eac.entry.js} +2 -2
  315. package/dist/core/p-7bbd9fcb.entry.js +2 -0
  316. package/dist/core/p-7bbd9fcb.entry.js.map +1 -0
  317. package/dist/core/p-7d054704.js +2 -0
  318. package/dist/core/p-7d054704.js.map +1 -0
  319. package/dist/core/{p-08fd225f.entry.js → p-857c46c0.entry.js} +2 -2
  320. package/dist/core/p-858dd362.entry.js +2 -0
  321. package/dist/core/p-858dd362.entry.js.map +1 -0
  322. package/dist/core/{p-0e3cb8d0.entry.js → p-8856dff4.entry.js} +2 -2
  323. package/dist/core/p-8c5a23b4.entry.js +2 -0
  324. package/dist/core/p-8c5a23b4.entry.js.map +1 -0
  325. package/dist/core/{p-00135a74.js → p-8e4e97b4.js} +3 -3
  326. package/dist/core/p-8e4e97b4.js.map +1 -0
  327. package/dist/core/p-91dc6ad3.entry.js +2 -0
  328. package/dist/core/p-91dc6ad3.entry.js.map +1 -0
  329. package/dist/core/{p-0c3bd9e6.entry.js → p-94427b50.entry.js} +2 -2
  330. package/dist/core/{p-e13b43b1.entry.js → p-9cf7494c.entry.js} +2 -2
  331. package/dist/core/{p-0848efa2.entry.js → p-a2671eb0.entry.js} +2 -2
  332. package/dist/core/p-a2fcea60.entry.js +2 -0
  333. package/dist/core/p-a2fcea60.entry.js.map +1 -0
  334. package/dist/core/p-a5ee9c8d.entry.js +2 -0
  335. package/dist/core/p-a5ee9c8d.entry.js.map +1 -0
  336. package/dist/core/{p-a4582939.entry.js → p-a88369e1.entry.js} +2 -2
  337. package/dist/core/p-a88369e1.entry.js.map +1 -0
  338. package/dist/core/{p-a30d165d.entry.js → p-af405fc0.entry.js} +2 -2
  339. package/dist/core/p-af405fc0.entry.js.map +1 -0
  340. package/dist/core/p-b953b22f.entry.js +2 -0
  341. package/dist/core/p-b953b22f.entry.js.map +1 -0
  342. package/dist/core/p-bb9142fe.entry.js +2 -0
  343. package/dist/core/{p-67f3bf1a.entry.js.map → p-bb9142fe.entry.js.map} +1 -1
  344. package/dist/core/{p-60a0c711.entry.js → p-bfdefe7a.entry.js} +2 -2
  345. package/dist/core/{p-60a0c711.entry.js.map → p-bfdefe7a.entry.js.map} +1 -1
  346. package/dist/core/p-c4baa405.entry.js +2 -0
  347. package/dist/core/p-c4baa405.entry.js.map +1 -0
  348. package/dist/core/p-c86ca475.js +2 -0
  349. package/dist/core/p-c86ca475.js.map +1 -0
  350. package/dist/core/p-cda2a461.entry.js +2 -0
  351. package/dist/core/p-cda2a461.entry.js.map +1 -0
  352. package/dist/core/{p-f6013934.entry.js → p-ce83c802.entry.js} +2 -2
  353. package/dist/core/p-ce83c802.entry.js.map +1 -0
  354. package/dist/core/p-cea17764.entry.js +2 -0
  355. package/dist/core/{p-4e5934f3.entry.js.map → p-cea17764.entry.js.map} +1 -1
  356. package/dist/core/{p-f541034c.entry.js → p-d0768256.entry.js} +2 -2
  357. package/dist/core/p-d2d6f1eb.entry.js +2 -0
  358. package/dist/core/p-d2d6f1eb.entry.js.map +1 -0
  359. package/dist/core/{p-c6f1e205.entry.js → p-d4628704.entry.js} +2 -2
  360. package/dist/core/p-d4628704.entry.js.map +1 -0
  361. package/dist/core/{p-0f6b9686.js → p-e246d84b.js} +2 -2
  362. package/dist/core/p-e4fa4ee5.entry.js +2 -0
  363. package/dist/core/p-e4fa4ee5.entry.js.map +1 -0
  364. package/dist/core/{p-3d1ba098.entry.js → p-e6779171.entry.js} +2 -2
  365. package/dist/core/{p-fd42f129.entry.js → p-e8bb1522.entry.js} +2 -2
  366. package/dist/core/p-e8bb1522.entry.js.map +1 -0
  367. package/dist/core/{p-4da17eda.entry.js → p-f42ca69f.entry.js} +2 -2
  368. package/dist/core/{p-3dc4e128.entry.js → p-f5e9c8c8.entry.js} +2 -2
  369. package/dist/core/p-f5e9c8c8.entry.js.map +1 -0
  370. package/dist/core/{p-0e119312.entry.js → p-fa02a267.entry.js} +2 -2
  371. package/dist/core/{p-0e119312.entry.js.map → p-fa02a267.entry.js.map} +1 -1
  372. package/dist/esm/core.js +3 -3
  373. package/dist/esm/{date-helpers-0e5e32a7.js → date-helpers-3b8c39ab.js} +20 -66
  374. package/dist/esm/date-helpers-3b8c39ab.js.map +1 -0
  375. package/dist/esm/{helpers-bbab69a2.js → helpers-bf471ace.js} +3 -3
  376. package/dist/esm/{helpers-bbab69a2.js.map → helpers-bf471ace.js.map} +1 -1
  377. package/dist/esm/{helpers-4e38ba2b.js → helpers-ddc2008a.js} +34 -18
  378. package/dist/esm/helpers-ddc2008a.js.map +1 -0
  379. package/dist/esm/ic-accordion-group.entry.js +2 -2
  380. package/dist/esm/ic-accordion.entry.js +2 -2
  381. package/dist/esm/ic-alert.entry.js +2 -2
  382. package/dist/esm/ic-back-to-top.entry.js +2 -2
  383. package/dist/esm/ic-badge.entry.js +3 -3
  384. package/dist/esm/ic-badge.entry.js.map +1 -1
  385. package/dist/esm/ic-breadcrumb-group.entry.js +2 -2
  386. package/dist/esm/ic-breadcrumb.entry.js +2 -2
  387. package/dist/esm/ic-button_3.entry.js +61 -3
  388. package/dist/esm/ic-button_3.entry.js.map +1 -1
  389. package/dist/esm/ic-card-horizontal.entry.js +16 -12
  390. package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
  391. package/dist/esm/ic-card-vertical.entry.js +3 -3
  392. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  393. package/dist/esm/ic-checkbox-group.entry.js +7 -7
  394. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  395. package/dist/esm/{ic-empty-state_2.entry.js → ic-checkbox_3.entry.js} +158 -25
  396. package/dist/esm/ic-checkbox_3.entry.js.map +1 -0
  397. package/dist/esm/ic-chip.entry.js +3 -3
  398. package/dist/esm/ic-chip.entry.js.map +1 -1
  399. package/dist/esm/ic-classification-banner.entry.js +3 -3
  400. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  401. package/dist/esm/ic-data-list.entry.js +1 -1
  402. package/dist/esm/ic-data-row.entry.js +2 -2
  403. package/dist/esm/ic-data-table-title-bar.entry.js +7 -7
  404. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -1
  405. package/dist/esm/ic-data-table.entry.js +310 -276
  406. package/dist/esm/ic-data-table.entry.js.map +1 -1
  407. package/dist/esm/ic-date-input.entry.js +175 -160
  408. package/dist/esm/ic-date-input.entry.js.map +1 -1
  409. package/dist/esm/ic-date-picker.entry.js +92 -70
  410. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  411. package/dist/esm/ic-dialog.entry.js +38 -47
  412. package/dist/esm/ic-dialog.entry.js.map +1 -1
  413. package/dist/esm/ic-divider.entry.js +2 -2
  414. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  415. package/dist/esm/ic-footer-link.entry.js +2 -2
  416. package/dist/esm/ic-footer.entry.js +2 -2
  417. package/dist/esm/ic-hero.entry.js +2 -2
  418. package/dist/esm/ic-horizontal-scroll.entry.js +2 -2
  419. package/dist/esm/ic-input-component-container_3.entry.js +3 -3
  420. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  421. package/dist/esm/ic-input-label_2.entry.js +2 -2
  422. package/dist/esm/ic-link.entry.js +2 -2
  423. package/dist/esm/ic-menu-group.entry.js +2 -2
  424. package/dist/esm/ic-menu-item.entry.js +3 -3
  425. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  426. package/dist/esm/ic-navigation-button.entry.js +2 -2
  427. package/dist/esm/ic-navigation-group.entry.js +23 -17
  428. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  429. package/dist/esm/ic-navigation-item.entry.js +2 -2
  430. package/dist/esm/ic-navigation-menu.entry.js +38 -24
  431. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  432. package/dist/esm/ic-page-header.entry.js +12 -11
  433. package/dist/esm/ic-page-header.entry.js.map +1 -1
  434. package/dist/esm/ic-pagination_4.entry.js +53 -32
  435. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  436. package/dist/esm/ic-popover-menu.entry.js +7 -6
  437. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  438. package/dist/esm/ic-radio-group.entry.js +7 -7
  439. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  440. package/dist/esm/ic-radio-option.entry.js +2 -2
  441. package/dist/esm/ic-search-bar.entry.js +3 -3
  442. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  443. package/dist/esm/ic-section-container.entry.js +3 -3
  444. package/dist/esm/ic-section-container.entry.js.map +1 -1
  445. package/dist/esm/ic-side-navigation.entry.js +10 -7
  446. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  447. package/dist/esm/ic-skeleton.entry.js +3 -3
  448. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  449. package/dist/esm/ic-skip-link.entry.js +11 -10
  450. package/dist/esm/ic-skip-link.entry.js.map +1 -1
  451. package/dist/esm/ic-status-tag.entry.js +5 -5
  452. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  453. package/dist/esm/ic-step.entry.js +17 -16
  454. package/dist/esm/ic-step.entry.js.map +1 -1
  455. package/dist/esm/ic-stepper.entry.js +4 -4
  456. package/dist/esm/ic-stepper.entry.js.map +1 -1
  457. package/dist/esm/ic-switch.entry.js +6 -6
  458. package/dist/esm/ic-switch.entry.js.map +1 -1
  459. package/dist/esm/ic-tab-context.entry.js +2 -2
  460. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  461. package/dist/esm/ic-tab-group.entry.js +4 -4
  462. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  463. package/dist/esm/ic-tab-panel.entry.js +3 -3
  464. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  465. package/dist/esm/ic-tab.entry.js +3 -3
  466. package/dist/esm/ic-tab.entry.js.map +1 -1
  467. package/dist/esm/ic-theme.entry.js +3 -3
  468. package/dist/esm/ic-theme.entry.js.map +1 -1
  469. package/dist/esm/ic-toast-region.entry.js +2 -2
  470. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  471. package/dist/esm/ic-toast.entry.js +6 -6
  472. package/dist/esm/ic-toast.entry.js.map +1 -1
  473. package/dist/esm/ic-toggle-button-group.entry.js +4 -4
  474. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  475. package/dist/esm/ic-toggle-button.entry.js +5 -5
  476. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  477. package/dist/esm/ic-top-navigation.entry.js +5 -9
  478. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  479. package/dist/esm/ic-tree-item.entry.js +56 -42
  480. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  481. package/dist/esm/ic-tree-view.entry.js +127 -22
  482. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  483. package/dist/esm/ic-typography.entry.js +2 -2
  484. package/dist/esm/{index-163fe708.js → index-a7a720e7.js} +6 -11
  485. package/dist/esm/index-a7a720e7.js.map +1 -0
  486. package/dist/esm/loader.js +3 -3
  487. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +3 -3
  488. package/dist/types/components/ic-data-table/ic-data-table.d.ts +30 -20
  489. package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +3 -9
  490. package/dist/types/components/ic-data-table/story-data.d.ts +15 -4
  491. package/dist/types/components/ic-date-input/ic-date-input.d.ts +46 -29
  492. package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +6 -0
  493. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +18 -12
  494. package/dist/types/components/ic-date-picker/ic-date-picker.stories.d.ts +8 -0
  495. package/dist/types/components/ic-date-picker/ic-day-button.d.ts +2 -2
  496. package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +3 -3
  497. package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +3 -3
  498. package/dist/types/components/ic-date-picker/story-data.d.ts +1 -0
  499. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +2 -2
  500. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +8 -2
  501. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +21 -4
  502. package/dist/types/components/ic-tree-view/ic-tree-view.stories.d.ts +91 -13
  503. package/dist/types/components/ic-tree-view/ic-tree-view.types.d.ts +12 -0
  504. package/dist/types/components.d.ts +129 -73
  505. package/dist/types/utils/date-helpers.d.ts +4 -4
  506. package/dist/types/utils/helpers.d.ts +8 -17
  507. package/hydrate/index.js +1223 -955
  508. package/hydrate/index.mjs +1223 -955
  509. package/package.json +3 -3
  510. package/dist/cjs/date-helpers-c9551119.js.map +0 -1
  511. package/dist/cjs/helpers-0e4c4fdd.js.map +0 -1
  512. package/dist/cjs/ic-checkbox.cjs.entry.js +0 -141
  513. package/dist/cjs/ic-checkbox.cjs.entry.js.map +0 -1
  514. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +0 -1
  515. package/dist/cjs/index-8a24b20c.js.map +0 -1
  516. package/dist/core/p-00135a74.js.map +0 -1
  517. package/dist/core/p-0efeab8a.entry.js +0 -2
  518. package/dist/core/p-0efeab8a.entry.js.map +0 -1
  519. package/dist/core/p-0fd762bf.entry.js.map +0 -1
  520. package/dist/core/p-144b1dee.entry.js +0 -2
  521. package/dist/core/p-1cf61bf2.entry.js +0 -2
  522. package/dist/core/p-1cf61bf2.entry.js.map +0 -1
  523. package/dist/core/p-33dd24eb.js +0 -2
  524. package/dist/core/p-33dd24eb.js.map +0 -1
  525. package/dist/core/p-3dc4e128.entry.js.map +0 -1
  526. package/dist/core/p-44ffa951.entry.js +0 -2
  527. package/dist/core/p-44ffa951.entry.js.map +0 -1
  528. package/dist/core/p-47962514.entry.js +0 -2
  529. package/dist/core/p-47962514.entry.js.map +0 -1
  530. package/dist/core/p-4e5934f3.entry.js +0 -2
  531. package/dist/core/p-5329e478.entry.js +0 -2
  532. package/dist/core/p-5329e478.entry.js.map +0 -1
  533. package/dist/core/p-5b2a7c1a.entry.js +0 -2
  534. package/dist/core/p-5b2a7c1a.entry.js.map +0 -1
  535. package/dist/core/p-67f3bf1a.entry.js +0 -2
  536. package/dist/core/p-6eaf585a.entry.js +0 -2
  537. package/dist/core/p-6eaf585a.entry.js.map +0 -1
  538. package/dist/core/p-8c4f212a.entry.js +0 -2
  539. package/dist/core/p-8c4f212a.entry.js.map +0 -1
  540. package/dist/core/p-8d73a3cc.entry.js.map +0 -1
  541. package/dist/core/p-9265efef.entry.js +0 -2
  542. package/dist/core/p-9265efef.entry.js.map +0 -1
  543. package/dist/core/p-95f2c59a.entry.js +0 -2
  544. package/dist/core/p-95f2c59a.entry.js.map +0 -1
  545. package/dist/core/p-a30d165d.entry.js.map +0 -1
  546. package/dist/core/p-a35cdfc3.entry.js +0 -2
  547. package/dist/core/p-a35cdfc3.entry.js.map +0 -1
  548. package/dist/core/p-a4582939.entry.js.map +0 -1
  549. package/dist/core/p-a7f95a61.entry.js +0 -2
  550. package/dist/core/p-a7f95a61.entry.js.map +0 -1
  551. package/dist/core/p-a81c9048.entry.js +0 -2
  552. package/dist/core/p-a81c9048.entry.js.map +0 -1
  553. package/dist/core/p-ac74cdac.entry.js +0 -2
  554. package/dist/core/p-ac74cdac.entry.js.map +0 -1
  555. package/dist/core/p-ad3e543e.entry.js +0 -2
  556. package/dist/core/p-ad3e543e.entry.js.map +0 -1
  557. package/dist/core/p-ae2bae87.entry.js +0 -2
  558. package/dist/core/p-ae2bae87.entry.js.map +0 -1
  559. package/dist/core/p-afde50b8.js +0 -2
  560. package/dist/core/p-afde50b8.js.map +0 -1
  561. package/dist/core/p-b84213d1.entry.js +0 -2
  562. package/dist/core/p-b84213d1.entry.js.map +0 -1
  563. package/dist/core/p-c2aef5cc.entry.js +0 -2
  564. package/dist/core/p-c2aef5cc.entry.js.map +0 -1
  565. package/dist/core/p-c6f1e205.entry.js.map +0 -1
  566. package/dist/core/p-cd59dc16.entry.js +0 -2
  567. package/dist/core/p-cd59dc16.entry.js.map +0 -1
  568. package/dist/core/p-e86c1c95.entry.js +0 -2
  569. package/dist/core/p-e86c1c95.entry.js.map +0 -1
  570. package/dist/core/p-f6013934.entry.js.map +0 -1
  571. package/dist/core/p-fba58c42.entry.js +0 -2
  572. package/dist/core/p-fba58c42.entry.js.map +0 -1
  573. package/dist/core/p-fd42f129.entry.js.map +0 -1
  574. package/dist/core/p-fde3bbb2.entry.js +0 -2
  575. package/dist/core/p-fde3bbb2.entry.js.map +0 -1
  576. package/dist/esm/date-helpers-0e5e32a7.js.map +0 -1
  577. package/dist/esm/helpers-4e38ba2b.js.map +0 -1
  578. package/dist/esm/ic-checkbox.entry.js.map +0 -1
  579. package/dist/esm/ic-empty-state_2.entry.js.map +0 -1
  580. package/dist/esm/index-163fe708.js.map +0 -1
  581. /package/dist/core/{p-32720276.entry.js.map → p-1bbae4b3.entry.js.map} +0 -0
  582. /package/dist/core/{p-b8aa37f9.entry.js.map → p-20bd48cf.entry.js.map} +0 -0
  583. /package/dist/core/{p-be5ad372.entry.js.map → p-21193099.entry.js.map} +0 -0
  584. /package/dist/core/{p-3e9564b5.entry.js.map → p-39269b62.entry.js.map} +0 -0
  585. /package/dist/core/{p-da798f58.entry.js.map → p-44ac8f8a.entry.js.map} +0 -0
  586. /package/dist/core/{p-afc4ce53.entry.js.map → p-4d39cab8.entry.js.map} +0 -0
  587. /package/dist/core/{p-fd006a9b.entry.js.map → p-4e187a11.entry.js.map} +0 -0
  588. /package/dist/core/{p-d154b26c.entry.js.map → p-50324682.entry.js.map} +0 -0
  589. /package/dist/core/{p-22e0ed96.entry.js.map → p-5796b6cd.entry.js.map} +0 -0
  590. /package/dist/core/{p-96551ddf.entry.js.map → p-57c80527.entry.js.map} +0 -0
  591. /package/dist/core/{p-b6db0cc1.entry.js.map → p-60d15d35.entry.js.map} +0 -0
  592. /package/dist/core/{p-272352cb.entry.js.map → p-6aa1e928.entry.js.map} +0 -0
  593. /package/dist/core/{p-1334a78f.entry.js.map → p-73e41eac.entry.js.map} +0 -0
  594. /package/dist/core/{p-08fd225f.entry.js.map → p-857c46c0.entry.js.map} +0 -0
  595. /package/dist/core/{p-0e3cb8d0.entry.js.map → p-8856dff4.entry.js.map} +0 -0
  596. /package/dist/core/{p-0c3bd9e6.entry.js.map → p-94427b50.entry.js.map} +0 -0
  597. /package/dist/core/{p-e13b43b1.entry.js.map → p-9cf7494c.entry.js.map} +0 -0
  598. /package/dist/core/{p-0848efa2.entry.js.map → p-a2671eb0.entry.js.map} +0 -0
  599. /package/dist/core/{p-f541034c.entry.js.map → p-d0768256.entry.js.map} +0 -0
  600. /package/dist/core/{p-0f6b9686.js.map → p-e246d84b.js.map} +0 -0
  601. /package/dist/core/{p-3d1ba098.entry.js.map → p-e6779171.entry.js.map} +0 -0
  602. /package/dist/core/{p-4da17eda.entry.js.map → p-f42ca69f.entry.js.map} +0 -0
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-8a24b20c.js');
6
- const helpers = require('./helpers-0e4c4fdd.js');
5
+ const index = require('./index-d337cd8a.js');
6
+ const helpers = require('./helpers-d01564f7.js');
7
7
 
8
8
  const unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
9
9
  <path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
@@ -17,13 +17,14 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
17
17
  <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
18
18
  </svg>`;
19
19
 
20
- const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height);--ic-typography-color:var(--ic-data-table-text-default-emphasis)}.truncation-show-hide{display:block}.cell-icon.truncation-show-hide{display:flex}.cell-container:not(.data-type-element,.truncation-show-hide){overflow-x:hidden}ic-loading-indicator{position:sticky;top:20px}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:var(--table-layout, \"fixed\");border-spacing:0;width:100%;height:var(--table-height, auto)}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded=\"true\"]) .table-row-container{border:var(--ic-space-1px) solid var(--ic-data-table-border)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.column-header-inner-container ic-tooltip{pointer-events:none}.column-header-inner-container ic-tooltip.show-trunc-tooltip{pointer-events:auto}.column-header-inner-container ic-tooltip .column-header-text{--ic-line-clamp:1}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-data-table-cell-background-selected) !important}.table-row:hover{background-color:var(--ic-data-table-cell-background-hover) !important}.table-row-selected:hover{background-color:var(\n --ic-data-table-cell-background-selected-hover\n ) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-data-table-icon-button-background-hover)}.sort-button:active{background-color:var(--ic-data-table-icon-button-background-pressed)}.sort-button svg{color:var(--ic-data-table-sort-toggle-icon)}.sort-button-unsorted svg{color:var(--ic-data-table-sort-toggle-icon-default)}.table-density-dense .column-header-inner-container,td.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious .column-header-inner-container,td.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.dummy-column-header-text{white-space:nowrap;overflow:hidden;height:0;width:-moz-fit-content;width:fit-content}.row-header,.column-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-data-table-header-background);border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);color:var(--ic-data-table-header-text)}.column-header{padding:0;width:var(--column-width);min-width:var(--column-min-width, 4rem);max-width:var(--column-max-width)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.cell-alignment-right.truncation-show-hide ic-typography{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content:center !important}.table-row{background-color:var(--ic-data-table-cell-background)}.table-row:nth-child(even){background-color:var(--ic-data-table-cell-background-stripe)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-data-table-cell-keyline) var(--ic-space-1px);overflow:hidden;box-sizing:border-box;max-width:var(--column-max-width);min-width:var(--column-min-width)}.table-cell.with-overflow{overflow:visible}.data-type-string,.data-type-address{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;justify-content:end;vertical-align:top}.cell-alignment-top{vertical-align:top;align-items:flex-start}.cell-alignment-middle{vertical-align:middle;align-items:center}.cell-alignment-bottom{vertical-align:bottom;align-items:flex-end}.cell-emphasis-low ic-typography{--ic-typography-color:var(--ic-data-table-text-low-emphasis)}.cell-emphasis-high ic-typography{--ic-typography-color:var(--ic-data-table-text-high-emphasis);font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-data-table-pagination-bar-background-color);border-top:var(--ic-space-1px) solid\n var(--ic-data-table-pagination-bar-keyline)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow);z-index:calc(var(--ic-z-index-dialog) - 1);background-color:var(--ic-data-table-overlay-background);border:var(--ic-space-1px) solid var(--ic-data-table-overlay-border)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header .icon>svg,.column-header ::slotted(svg){fill:var(--ic-data-table-icon)}.table-cell .icon>svg,.table-cell ::slotted(svg){fill:var(--ic-data-table-icon-default-emphasis)}.cell-emphasis-high .icon>svg,.cell-emphasis-high ::slotted(svg){fill:var(--ic-data-table-icon-high-emphasis)}.cell-emphasis-low .icon>svg,.cell-emphasis-low ::slotted(svg){fill:var(--ic-data-table-icon-low-emphasis)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.column-header-alignment-center>.cell-text-wrapper,.row-header-alignment-right>ic-typography,.row-header-alignment-right>.cell-text-wrapper,.cell-alignment-center>ic-typography,.cell-alignment-center>.cell-text-wrapper{flex:1}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.truncation-tooltip ic-typography{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}.truncation-tooltip ic-typography,.truncation-show-hide ic-typography{white-space:normal}.ic-tooltip-overflow{overflow:hidden;width:100%}.action-element{display:flex;justify-content:right}.cell-grid-wrapper{display:grid;grid-template-columns:auto auto}.loading-overlay{visibility:hidden;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--ic-data-table-loading-indicator-overlay-background);z-index:calc(var(--ic-z-index-dialog) - 2);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading-overlay.show{visibility:visible;opacity:0.6}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){.loading-overlay{transition:none}}.cell-text-wrapper{overflow:hidden}.cell-text-wrapper>ic-typography{margin-left:2px}.cell-text-no-wrap{word-wrap:initial}.cell-container-with-description{display:flex;flex-direction:row}.cell-description{display:flex;flex-direction:row;margin-top:var(--ic-space-xxs);word-break:break-all}.cell-description-text{color:var(--ic-color-secondary-text)}.cell-description-icon{padding-right:var(--ic-space-xs)}.cell-description-icon>svg{height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs));display:flex}@media (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}@media (max-width: 577px){.cell-icon{flex-wrap:wrap}.cell-description-icon{padding-right:0}}@media (forced-colors: active){.icon,::slotted(svg),.cell-description-icon>svg{fill:currentcolor}.sort-button svg{color:currentcolor}.table-row-selected{background-color:Highlight !important}}";
20
+ const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height);--ic-typography-color:var(--ic-data-table-text-default-emphasis)}.truncation-show-hide{display:block}.cell-icon.truncation-show-hide{display:flex}.cell-container:not(.data-type-element,.truncation-show-hide){overflow-x:hidden}ic-loading-indicator{position:sticky;top:20px}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:var(--table-layout, \"fixed\");border-spacing:0;width:100%;height:var(--table-height, auto)}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded=\"true\"]) .table-row-container{border:var(--ic-space-1px) solid var(--ic-data-table-border)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.column-header-inner-container ic-tooltip{pointer-events:none}.column-header-inner-container ic-tooltip.show-trunc-tooltip{pointer-events:auto}.column-header-inner-container ic-tooltip .column-header-text{--ic-line-clamp:1}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-data-table-cell-background-selected) !important}.table-row:hover{background-color:var(--ic-data-table-cell-background-hover) !important}.table-row-selected:hover{background-color:var(\n --ic-data-table-cell-background-selected-hover\n ) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-data-table-icon-button-background-hover)}.sort-button:active{background-color:var(--ic-data-table-icon-button-background-pressed)}.sort-button svg{color:var(--ic-data-table-sort-toggle-icon)}.sort-button-unsorted svg{color:var(--ic-data-table-sort-toggle-icon-default)}.table-density-dense .column-header-inner-container,td.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious .column-header-inner-container,td.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.dummy-column-header-text{white-space:nowrap;overflow:hidden;height:0;width:-moz-fit-content;width:fit-content}.row-header,.column-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-data-table-header-background);border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);color:var(--ic-data-table-header-text)}.column-header{padding:0;width:var(--column-width);min-width:var(--column-min-width, 4rem);max-width:var(--column-max-width)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.cell-alignment-right.truncation-show-hide ic-typography{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content:center !important}.table-row{background-color:var(--ic-data-table-cell-background)}.table-row:nth-child(even){background-color:var(--ic-data-table-cell-background-stripe)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-data-table-cell-keyline) var(--ic-space-1px);overflow:hidden;box-sizing:border-box;max-width:var(--column-max-width);min-width:var(--column-min-width)}.table-cell.with-overflow{overflow:visible}.data-type-string,.data-type-address{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;justify-content:end;vertical-align:top}.cell-alignment-top{vertical-align:top;align-items:flex-start}.cell-alignment-middle{vertical-align:middle;align-items:center}.cell-alignment-bottom{vertical-align:bottom;align-items:flex-end}.cell-emphasis-low ic-typography{--ic-typography-color:var(--ic-data-table-text-low-emphasis)}.cell-emphasis-high ic-typography{--ic-typography-color:var(--ic-data-table-text-high-emphasis);font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-data-table-pagination-bar-background-color);border-top:var(--ic-space-1px) solid\n var(--ic-data-table-pagination-bar-keyline)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow);z-index:calc(var(--ic-z-index-dialog) - 1);background-color:var(--ic-data-table-overlay-background);border:var(--ic-space-1px) solid var(--ic-data-table-overlay-border)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header .icon>svg,.column-header ::slotted(svg){fill:var(--ic-data-table-icon)}.table-cell .icon>svg,.table-cell ::slotted(svg),.cell-description-icon>svg{fill:var(--ic-data-table-icon-default-emphasis)}.cell-emphasis-high .icon>svg,.cell-emphasis-high ::slotted(svg){fill:var(--ic-data-table-icon-high-emphasis)}.cell-emphasis-low .icon>svg,.cell-emphasis-low ::slotted(svg){fill:var(--ic-data-table-icon-low-emphasis)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.column-header-alignment-center>.cell-text-wrapper,.row-header-alignment-right>ic-typography,.row-header-alignment-right>.cell-text-wrapper,.cell-alignment-center>ic-typography,.cell-alignment-center>.cell-text-wrapper{flex:1}.checkbox-cell{--column-width:var(--ic-space-xxl);align-content:center;border-right:none}.table-density-dense.checkbox-cell{--column-width:2.5rem}.checkbox-wrapper{display:flex;justify-content:center}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.truncation-tooltip ic-typography{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}.truncation-tooltip ic-typography,.truncation-show-hide ic-typography{white-space:normal}.ic-tooltip-overflow{overflow:hidden;width:100%}.action-element{display:flex;justify-content:right}.cell-grid-wrapper{display:grid;grid-template-columns:auto auto}.loading-overlay{visibility:hidden;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--ic-data-table-loading-indicator-overlay-background);z-index:calc(var(--ic-z-index-dialog) - 2);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading-overlay.show{visibility:visible;opacity:0.6}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){.loading-overlay{transition:none}}.cell-text-wrapper{overflow:hidden}.cell-text-wrapper>ic-typography{margin-left:2px}.cell-text-no-wrap{word-wrap:initial}.cell-container-with-description{display:flex;flex-direction:row}.cell-description{display:flex;flex-direction:row;margin-top:var(--ic-space-xxs);word-break:break-all}.cell-description-text{color:var(--ic-data-table-cell-description-text)}.cell-description-icon{padding-right:var(--ic-space-xs)}.cell-description-icon>svg{height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs));display:flex}@media (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}@media (max-width: 577px){.cell-icon{flex-wrap:wrap}.cell-description-icon{padding-right:0}}@media (forced-colors: active){.icon,::slotted(svg),.cell-description-icon>svg{fill:currentcolor}.sort-button svg{color:currentcolor}.table-row-selected{background-color:Highlight !important}}";
21
21
  const IcDataTableStyle0 = icDataTableCss;
22
22
 
23
23
  const DataTable = class {
24
24
  constructor(hostRef) {
25
25
  index.registerInstance(this, hostRef);
26
26
  this.icRowHeightChange = index.createEvent(this, "icRowHeightChange", 7);
27
+ this.icSelectAllRows = index.createEvent(this, "icSelectAllRows", 7);
27
28
  this.icSelectedRowChange = index.createEvent(this, "icSelectedRowChange", 7);
28
29
  this.icSortChange = index.createEvent(this, "icSortChange", 7);
29
30
  this.DENSITY_HEIGHT_MULTIPLIER = {
@@ -71,6 +72,7 @@ const DataTable = class {
71
72
  this.fromRow = 0;
72
73
  this.scrollable = false;
73
74
  this.scrollOffset = 0;
75
+ this.selectedRows = [];
74
76
  this.debounceDelay = 0;
75
77
  /**
76
78
  * Determines whether the column header should be truncated and display a tooltip. Default is `false`.
@@ -92,10 +94,6 @@ const DataTable = class {
92
94
  * Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method.
93
95
  */
94
96
  this.globalRowHeight = "auto";
95
- /**
96
- * If `true`, the selected row is highlighted using a background colour.
97
- */
98
- this.highlightSelectedRow = true;
99
97
  /**
100
98
  * If `true`, column headers will not be visible.
101
99
  */
@@ -130,6 +128,10 @@ const DataTable = class {
130
128
  showItemsPerPageControl: true,
131
129
  type: "simple",
132
130
  };
131
+ /**
132
+ * If `true`, a checkbox column will be displayed to the left of the table which allows multiple rows to be selected.
133
+ */
134
+ this.rowSelection = false;
133
135
  /**
134
136
  * If `true`, adds a pagination bar to the bottom of the table.
135
137
  */
@@ -172,11 +174,12 @@ const DataTable = class {
172
174
  this.headerResizeObserver.observe(this.el);
173
175
  };
174
176
  this.headerResizeCallback = () => {
177
+ var _a, _b, _c;
175
178
  if (!this.hideColumnHeaders && this.columnHeaderTruncation) {
176
- const tableContainerWidth = this.el.shadowRoot.querySelector(".table-container").clientWidth;
177
- if (tableContainerWidth !== this.prevTableContainerWidth) {
178
- const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
179
- headers.forEach((header) => {
179
+ const tableContainerWidth = (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".table-container")) === null || _b === void 0 ? void 0 : _b.clientWidth;
180
+ if (tableContainerWidth &&
181
+ tableContainerWidth !== this.prevTableContainerWidth) {
182
+ (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll("th.column-header").forEach((header) => {
180
183
  const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
181
184
  const typographyEls = header.querySelectorAll(this.IC_TYPOGRAPHY_STRING);
182
185
  if (tooltip && typographyEls && typographyEls.length === 2) {
@@ -190,49 +193,46 @@ const DataTable = class {
190
193
  }
191
194
  }
192
195
  };
196
+ this.getRowHeight = (cellContainer) => parseInt(getComputedStyle(document.documentElement).fontSize) *
197
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING) || "");
193
198
  this.updateSetRowHeight = (typographyEl) => {
194
- const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
195
- if (typographyEl) {
196
- const cellContainer = this.getCellContainer(typographyEl);
197
- const rowHeight = fontSize *
198
- parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
199
- if (typographyEl.scrollHeight > rowHeight) {
199
+ const removeRowHeightVariable = (element) => {
200
+ const cellContainer = this.getCellContainer(element);
201
+ if (cellContainer &&
202
+ element.scrollHeight > this.getRowHeight(cellContainer)) {
200
203
  cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
201
204
  }
205
+ };
206
+ if (typographyEl) {
207
+ removeRowHeightVariable(typographyEl);
202
208
  }
203
209
  else {
204
210
  this.getTypographyElements().forEach((typographyEl) => {
205
- const cellContainer = this.getCellContainer(typographyEl);
206
- const rowHeight = fontSize *
207
- parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
208
- if (typographyEl.scrollHeight > rowHeight) {
209
- cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
210
- }
211
+ removeRowHeightVariable(typographyEl);
211
212
  });
212
213
  }
213
214
  };
214
215
  this.debounceDataTruncation = () => {
215
216
  this.getTypographyElements().forEach((typographyEl) => {
216
217
  const cellContainer = this.getCellContainer(typographyEl);
217
- if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
218
+ if (cellContainer &&
219
+ !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
218
220
  this.resizeObserver = new ResizeObserver(
219
221
  // This gets triggered twice due to updated data and see more/see less button
220
222
  helpers.dynamicDebounce(() => {
221
223
  this.dataTruncation(typographyEl);
222
224
  if (!this.isNewDebounceDelaySet) {
223
- this.setNewDebounceDelay(200);
225
+ this.debounceDelay = 200;
226
+ this.isNewDebounceDelaySet = true;
224
227
  }
225
228
  }, () => this.debounceDelay));
226
229
  this.resizeObserver.observe(typographyEl);
227
230
  }
228
231
  });
229
232
  };
230
- this.setNewDebounceDelay = (delay) => {
231
- this.debounceDelay = delay;
232
- this.isNewDebounceDelaySet = true;
233
- };
234
233
  this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
235
234
  this.truncate = (typographyEl, cellContainer, tooltip) => {
235
+ var _a;
236
236
  if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
237
237
  //24 is the height of a single line
238
238
  if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
@@ -247,33 +247,36 @@ const DataTable = class {
247
247
  else {
248
248
  if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
249
249
  typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
250
- const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
251
- cellTextWrapper.prepend(typographyEl);
250
+ (_a = cellContainer
251
+ .querySelector(this.CELL_TEXT_WRAPPER_STRING)) === null || _a === void 0 ? void 0 : _a.prepend(typographyEl);
252
252
  tooltip.remove();
253
253
  }
254
254
  if (this.truncationPattern === this.SHOW_HIDE_STRING &&
255
- !helpers.isEmptyString(typographyEl.getAttribute("max-lines"))) {
255
+ !helpers.isEmptyString(typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.getAttribute("max-lines"))) {
256
256
  this.resetShowHideTruncation(typographyEl);
257
257
  }
258
258
  }
259
259
  };
260
260
  this.dataTruncation = (typographyEl) => {
261
+ var _a;
261
262
  // Tooltip truncation mentioned in AC. Will need revisiting
262
263
  const tooltip = this.getTooltip(typographyEl);
263
264
  const cellContainer = this.getCellContainer(typographyEl);
264
- if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
265
+ if (!cellContainer ||
266
+ cellContainer.classList.contains("data-type-element") ||
265
267
  this.dataUpdated) {
266
268
  return;
267
269
  }
268
270
  if (this.truncationPattern === this.SHOW_HIDE_STRING &&
269
- typographyEl.shadowRoot.querySelector("button")) {
271
+ ((_a = typographyEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("button"))) {
270
272
  const showHideBtn = typographyEl.shadowRoot.querySelector("button");
271
273
  // If the see more/see less is present and the max lines is equal to the cell container
272
274
  // remove the see more/see less button
273
275
  if (showHideBtn) {
274
276
  const truncWrapper = this.getTruncWrapper(typographyEl);
275
- if (this.getLines(truncWrapper.scrollHeight) ===
276
- +typographyEl.getAttribute("max-lines")) {
277
+ if (truncWrapper &&
278
+ this.getLines(truncWrapper.scrollHeight) ===
279
+ Number(typographyEl.getAttribute("max-lines"))) {
277
280
  this.resetShowHideTruncation(typographyEl);
278
281
  }
279
282
  }
@@ -303,18 +306,16 @@ const DataTable = class {
303
306
  }
304
307
  this.truncate(typographyEl, cellContainer, tooltip);
305
308
  };
306
- this.getTruncWrapper = (typographyEl) => typographyEl.shadowRoot.querySelector(".trunc-wrapper");
309
+ this.getTruncWrapper = (typographyEl) => { var _a; return (_a = typographyEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".trunc-wrapper"); };
307
310
  this.removeTextWrap = () => {
308
311
  this.getTypographyElements().forEach((typographyEl) => {
309
312
  const tableCell = typographyEl.closest("td");
310
- if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
313
+ if (tableCell === null || tableCell === void 0 ? void 0 : tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
311
314
  tableCell.classList.remove(this.TEXT_WRAP_STRING);
312
315
  }
313
316
  });
314
317
  };
315
- this.getCellContainer = (typographyEl) => {
316
- return typographyEl.closest(".cell-container");
317
- };
318
+ this.getCellContainer = (typographyEl) => typographyEl.closest(".cell-container");
318
319
  this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
319
320
  array.forEach((val) => val.textWrap && delete val.textWrap);
320
321
  this.startLoadingTimer = () => {
@@ -322,7 +323,7 @@ const DataTable = class {
322
323
  this.timerStarted = Date.now();
323
324
  setTimeout(() => {
324
325
  this.hasLoadedForOneSecond = true;
325
- this.timerStarted = null;
326
+ this.timerStarted = 0;
326
327
  }, this.minimumLoadingDisplayDuration);
327
328
  };
328
329
  this.isObject = (value) => value !== undefined && value !== null && typeof value === "object";
@@ -351,32 +352,28 @@ const DataTable = class {
351
352
  const { description, max, min, progress, monochrome } = this.updatingOptions || {};
352
353
  return (index.h("th", { colSpan: this.columns.length, class: "updating-state" }, index.h("ic-loading-indicator", { theme: this.theme, monochrome: monochrome, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
353
354
  };
354
- this.setRowHeight = (height) => {
355
- return helpers.pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
356
- this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
357
- };
355
+ this.setRowHeight = (height) => helpers.pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
356
+ this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
358
357
  this.setTruncationClass = () => this.truncationPattern
359
358
  ? { [`truncation-${this.truncationPattern}`]: true }
360
359
  : {};
361
360
  this.getColumnWidth = (columnWidth) => {
362
361
  // TODO: Setting max width on columns
363
362
  let columnWidthStyling = {};
364
- if (columnWidth) {
365
- if (typeof columnWidth === "string") {
366
- columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-width"]: columnWidth });
363
+ if (typeof columnWidth === "string") {
364
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-width"]: columnWidth });
365
+ }
366
+ else if (columnWidth && Object.keys(columnWidth).length > 0) {
367
+ if (columnWidth.minWidth) {
368
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-min-width"]: columnWidth.minWidth });
367
369
  }
368
- if (typeof columnWidth === "object" && !!Object.keys(columnWidth)) {
369
- if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth) {
370
- columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-min-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth });
371
- }
372
- if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth) {
373
- columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-max-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth });
374
- }
370
+ if (columnWidth.maxWidth) {
371
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-max-width"]: columnWidth.maxWidth });
375
372
  }
376
373
  }
377
374
  return columnWidthStyling;
378
375
  };
379
- this.getRowHeight = (currentRowHeight, columnProps, rowTextWrap, cell) => {
376
+ this.getCalculatedRowHeight = (columnProps, rowTextWrap, cell, currentRowHeight) => {
380
377
  if ((this.truncationPattern || currentRowHeight) &&
381
378
  !(columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) &&
382
379
  !rowTextWrap &&
@@ -389,20 +386,22 @@ const DataTable = class {
389
386
  return {};
390
387
  };
391
388
  this.adjustWidthForActionElement = () => {
392
- const elements = this.el.shadowRoot.querySelectorAll(".action-element");
393
- elements.forEach((element) => {
389
+ var _a;
390
+ const elements = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".action-element");
391
+ elements === null || elements === void 0 ? void 0 : elements.forEach((element) => {
394
392
  const width = element.firstChild.getBoundingClientRect()
395
393
  .width;
396
394
  const gridWrapper = element.closest(".cell-grid-wrapper");
397
- gridWrapper.style.gridTemplateColumns = `auto calc(${width}px + var(--ic-space-xs))`;
395
+ if (gridWrapper)
396
+ gridWrapper.style.gridTemplateColumns = `auto calc(${width}px + var(--ic-space-xs))`;
398
397
  });
399
398
  };
400
- this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis) => {
399
+ this.createCellContent = (columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, cellValue, rowEmphasis, currentRowHeight) => {
401
400
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
402
401
  return (index.h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
403
402
  !helpers.isSlotUsed(this.el, cellSlotName)
404
403
  ? cell
405
- : null, class: Object.assign(Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
404
+ : undefined, class: Object.assign(Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
406
405
  ((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
407
406
  rowAlignment ||
408
407
  this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
@@ -418,7 +417,7 @@ const DataTable = class {
418
417
  (columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
419
418
  rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
420
419
  !!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
421
- !!rowEmphasis }, this.setTruncationClass()), { [this.CELL_CONTAINER_WITH_DESCRIPTION_STRING]: this.isObject(cell) && Object.keys(cell).includes("description") }), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
420
+ !!rowEmphasis }, this.setTruncationClass()), { [this.CELL_CONTAINER_WITH_DESCRIPTION_STRING]: this.isObject(cell) && Object.keys(cell).includes("description") }), style: Object.assign(Object.assign({}, this.getCalculatedRowHeight(columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell, currentRowHeight)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
422
421
  ? this.setRowHeight(currentRowHeight)
423
422
  : null }, helpers.isSlotUsed(this.el, cellSlotName) ? (index.h("slot", { name: cellSlotName })) : (index.h(index.Fragment, null, helpers.isSlotUsed(this.el, `${cellSlotName}-icon`) ? (index.h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) &&
424
423
  (cellValue("icon") || ((_l = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _l === void 0 ? void 0 : _l.icon)) && (index.h("span", { class: "icon", innerHTML: cellValue("icon") || ((_m = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _m === void 0 ? void 0 : _m.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
@@ -466,17 +465,18 @@ const DataTable = class {
466
465
  ["row-header-sticky"]: this.stickyRowHeaders,
467
466
  } }, cellValue("title")));
468
467
  }
468
+ const CellContent = this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, cellValue, rowEmphasis, currentRowHeight || undefined);
469
469
  if (rowKeys[index$1] !== "rowOptions") {
470
470
  return (index.h("td", { class: {
471
471
  ["table-cell"]: true,
472
472
  [`table-density-${this.density}`]: this.notDefaultDensity(),
473
473
  ["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
474
474
  }, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, this.isObject(cell) &&
475
- Object.keys(cell).includes("actionElement") ? (index.h("div", { class: "cell-grid-wrapper" }, this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis), index.h("span", { class: "action-element", innerHTML: cellValue("actionElement"),
475
+ Object.keys(cell).includes("actionElement") ? (index.h("div", { class: "cell-grid-wrapper" }, CellContent, index.h("span", { class: "action-element", innerHTML: cellValue("actionElement"),
476
476
  // eslint-disable-next-line react/jsx-no-bind
477
477
  onClick: cell.actionOnClick
478
478
  ? (event) => this.handleClick(event, cell.actionOnClick)
479
- : undefined }))) : (this.createCellContent(columnProps, cell, cellSlotName, rowOptions, rowAlignment, hasIcon, currentRowHeight, cellValue, rowEmphasis))));
479
+ : undefined }))) : (CellContent)));
480
480
  }
481
481
  });
482
482
  };
@@ -509,16 +509,28 @@ const DataTable = class {
509
509
  [`text-${this.density}`]: this.notDefaultDensity(),
510
510
  } }, title)))));
511
511
  this.onRowClick = (row) => {
512
- if (!this.loading && !this.updating) {
513
- this.icSelectedRowChange.emit(this.selectedRow !== row ? row : null);
514
- }
515
- this.selectedRow =
516
- this.selectedRow !== row && !this.loading && !this.updating && row;
512
+ const notCurrentlySelected = !this.selectedRows.includes(row);
513
+ this.selectedRows = notCurrentlySelected
514
+ ? [...this.selectedRows, row]
515
+ : this.selectedRows.filter((selectedRow) => selectedRow !== row);
516
+ this.icSelectedRowChange.emit({
517
+ row: notCurrentlySelected ? row : null,
518
+ selectedRows: this.selectedRows,
519
+ });
520
+ };
521
+ this.selectAllRows = () => {
522
+ this.selectedRows =
523
+ this.organisedData &&
524
+ this.selectedRows.length !== this.organisedData.length
525
+ ? [...this.organisedData]
526
+ : [];
527
+ this.icSelectAllRows.emit(this.selectedRows);
517
528
  };
518
529
  this.createRows = () => {
530
+ var _a, _b, _c;
519
531
  const data = this.showPagination
520
- ? this.data.slice(this.fromRow, this.toRow)
521
- : this.data.slice();
532
+ ? (_a = this.data) === null || _a === void 0 ? void 0 : _a.slice(this.fromRow, this.toRow)
533
+ : (_b = this.data) === null || _b === void 0 ? void 0 : _b.slice();
522
534
  const paginationOffset = this.showPagination ? this.fromRow : 0;
523
535
  /**
524
536
  * Ensures that createCells has a value in data to map over to actually render the slot.
@@ -526,7 +538,7 @@ const DataTable = class {
526
538
  * `addDataToPosition` used to add the element in the correct column order.
527
539
  * Adding empty string value in to give `createCells` something to loop over.
528
540
  */
529
- const organisedData = data.map((row, rowIndex) => {
541
+ this.organisedData = data === null || data === void 0 ? void 0 : data.map((row, rowIndex) => {
530
542
  const slottedColumns = this.columns
531
543
  .map(({ key }, index) => helpers.isSlotUsed(this.el, `${key}-${rowIndex + paginationOffset}`) && {
532
544
  key,
@@ -539,18 +551,19 @@ const DataTable = class {
539
551
  ? helpers.addDataToPosition(row, slottedColumns, "")
540
552
  : row;
541
553
  });
542
- return organisedData
543
- .sort(!this.sortable || this.disableAutoSort
554
+ return (_c = this.organisedData) === null || _c === void 0 ? void 0 : _c.sort(!this.sortable || this.disableAutoSort
544
555
  ? undefined
545
- : this.getSortFunction())
546
- .map((row, index$1) => {
547
- return (index.h("tr", {
548
- // eslint-disable-next-line react/jsx-no-bind
549
- onClick: () => this.onRowClick(row), class: {
550
- ["table-row"]: true,
551
- ["table-row-selected"]: this.highlightSelectedRow && this.selectedRow === row,
552
- }
553
- }, this.createCells(row, index$1 + paginationOffset)));
556
+ : this.getSortFunction()).map((row, index$1) => {
557
+ const isRowSelected = this.rowSelection && this.selectedRows.includes(row);
558
+ const cellIndex = index$1 + paginationOffset;
559
+ return (index.h("tr", { class: {
560
+ "table-row": true,
561
+ "table-row-selected": isRowSelected,
562
+ } }, this.rowSelection && (index.h("td", { class: {
563
+ "table-cell": true,
564
+ "checkbox-cell": true,
565
+ [`table-density-${this.density}`]: this.notDefaultDensity(),
566
+ } }, index.h("div", { class: "checkbox-wrapper" }, index.h("ic-checkbox", { class: "ic-data-table-checkbox", checked: isRowSelected, disabled: this.updating || this.loading, hideLabel: true, label: `${isRowSelected ? "Deselect" : "Select"} row ${cellIndex}`, onIcCheck: () => this.onRowClick(row), size: this.density === "dense" ? "small" : "medium", value: cellIndex })))), this.createCells(row, cellIndex)));
554
567
  });
555
568
  };
556
569
  this.getObjectValue = (cell, key) => Object.values(cell)[Object.keys(cell).indexOf(key)];
@@ -593,12 +606,11 @@ const DataTable = class {
593
606
  }
594
607
  };
595
608
  this.sortRows = (column) => {
596
- const sortButton = this.el.shadowRoot.querySelector(`#sort-button-${column}`);
609
+ var _a, _b, _c, _d;
597
610
  const sortOrders = this.sortOptions.sortOrders;
598
611
  if (column !== this.sortedColumn) {
599
612
  if (this.sortedColumn) {
600
- const previousSortedButton = this.el.shadowRoot.querySelector(`#sort-button-${this.sortedColumn}`);
601
- previousSortedButton.setAttribute("aria-label", this.getSortButtonLabel(column)); // Passing through unsorted column returns correct label for newly unsorted column
613
+ (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`#sort-button-${this.sortedColumn}`)) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-label", this.getSortButtonLabel(column)); // Passing through unsorted column returns correct label for newly unsorted column
602
614
  }
603
615
  this.sortedColumn = column;
604
616
  this.sortedColumnOrder = "unsorted";
@@ -608,50 +620,57 @@ const DataTable = class {
608
620
  nextSortOrderIndex = 0;
609
621
  }
610
622
  this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
611
- sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
623
+ (_d = (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector(`#sort-button-${column}`)) === null || _d === void 0 ? void 0 : _d.setAttribute("aria-label", this.getSortButtonLabel(column));
612
624
  this.tableSorted = true;
613
625
  this.icSortChange.emit({
614
626
  columnName: column,
615
627
  sorted: this.sortedColumnOrder,
616
628
  });
617
629
  };
630
+ /** Gets all `ic-typography`elements within the data table, excluding column headers and cell descriptions */
618
631
  this.getTypographyElements = () => {
619
- // Filter out column headers and cell descriptions
620
- return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)"));
621
- };
622
- this.getTooltip = (typographyEl) => {
623
- return typographyEl.closest(this.TOOLTIP);
632
+ var _a;
633
+ return Array.from(((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-text)")) || []);
624
634
  };
635
+ this.getTooltip = (typographyEl) => typographyEl.closest(this.TOOLTIP);
625
636
  this.updateTruncationTooltip = (removeTooltipOnly = false) => {
626
637
  this.getTypographyElements().forEach((typographyEl) => {
627
638
  const tooltip = this.getTooltip(typographyEl);
628
639
  const cellContainer = this.getCellContainer(typographyEl);
629
- if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
630
- this.removeTooltip(cellContainer, typographyEl, tooltip);
631
- typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
632
- return;
640
+ if (cellContainer) {
641
+ if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
642
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
643
+ typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
644
+ return;
645
+ }
646
+ this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
633
647
  }
634
- this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
635
648
  });
636
649
  };
637
650
  this.updateScrollOffset = () => {
638
- this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
651
+ var _a;
652
+ const tableRowContainer = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".table-row-container");
653
+ if (tableRowContainer)
654
+ this.scrollOffset = tableRowContainer.scrollTop;
639
655
  };
640
656
  this.updateRowHeightForDescriptions = (rowHeight, cellContainer) => {
641
- cellContainer.setAttribute("data-row-height", rowHeight.toString());
657
+ cellContainer.setAttribute(this.DATA_ROW_HEIGHT_STRING, rowHeight.toString());
642
658
  cellContainer.setAttribute("style", `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`);
643
659
  };
644
- // Method to update the row heights on cells with descriptions and tooltip truncation
660
+ /** Method to update the row heights on cells with descriptions and tooltip truncation */
645
661
  this.updateCellHeightsWithDescriptions = () => {
646
- const descriptions = this.el.shadowRoot.querySelectorAll(this.CELL_DESCRIPTION_STRING);
647
- descriptions.forEach((description) => {
662
+ var _a, _b;
663
+ (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.forEach((description) => {
648
664
  const cellContainer = description.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);
649
- const typography = cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
665
+ const typography = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(this.IC_TYPOGRAPHY_STRING);
650
666
  const descriptionMarginTop = window
651
667
  .getComputedStyle(description)
652
668
  .getPropertyValue("margin-top");
653
669
  const descriptionHeight = description.clientHeight + parseInt(descriptionMarginTop, 10);
654
- if (this.globalRowHeight && this.globalRowHeight !== "auto") {
670
+ if (typography &&
671
+ cellContainer &&
672
+ this.globalRowHeight &&
673
+ this.globalRowHeight !== "auto") {
655
674
  if (!typography.textContent &&
656
675
  descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight) {
657
676
  this.updateRowHeightForDescriptions(descriptionHeight, cellContainer);
@@ -659,7 +678,7 @@ const DataTable = class {
659
678
  else if (this.truncationPattern === this.TOOLTIP_STRING) {
660
679
  if (descriptionHeight + this.DEFAULT_LINE_HEIGHT >
661
680
  this.globalRowHeight) {
662
- const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
681
+ const cellIcon = cellContainer.querySelector(".icon");
663
682
  if (helpers.deviceSizeMatches(helpers.IC_DEVICE_SIZES.XS) && cellIcon) {
664
683
  // recalculate descriptionHeight as when a word break occurs this value changes
665
684
  // Additional spacing given for 300-400% zoom
@@ -676,7 +695,8 @@ const DataTable = class {
676
695
  // isn't overflowing the cell to trigger the show more button to appear.
677
696
  }
678
697
  else if (this.truncationPattern === this.SHOW_HIDE_STRING &&
679
- descriptionHeight + this.DEFAULT_LINE_HEIGHT > this.globalRowHeight &&
698
+ descriptionHeight + this.DEFAULT_LINE_HEIGHT >
699
+ this.globalRowHeight &&
680
700
  typography.style.getPropertyValue("--truncation-max-lines") !==
681
701
  "initial") {
682
702
  this.updateRowHeightForDescriptions(descriptionHeight + this.DEFAULT_LINE_HEIGHT, cellContainer);
@@ -704,40 +724,36 @@ const DataTable = class {
704
724
  return tableHostDimensions;
705
725
  };
706
726
  this.fixCellTooltip = (element) => {
707
- var _a, _b, _c;
708
- let tooltip;
727
+ var _a, _b;
728
+ let tooltip = null;
729
+ const tooltipChildElement = (_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING);
709
730
  if (element.tagName === "IC-TOOLTIP") {
710
731
  tooltip = element;
711
732
  }
712
- else if ((_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(this.IC_TOOLTIP_STRING)) {
713
- tooltip = (_b = element.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(this.IC_TOOLTIP_STRING);
714
- }
715
- else {
716
- if (((_c = element.children) === null || _c === void 0 ? void 0 : _c.length) > 0) {
717
- Array.from(element.children).forEach((el) => {
718
- this.fixCellTooltip(el);
719
- });
720
- }
721
- else {
722
- return;
723
- }
733
+ else if (tooltipChildElement) {
734
+ tooltip = tooltipChildElement;
724
735
  }
725
- if (tooltip) {
726
- tooltip.setExternalPopperProps({
727
- strategy: "fixed",
736
+ else if (((_b = element.children) === null || _b === void 0 ? void 0 : _b.length) > 0) {
737
+ Array.from(element.children).forEach((el) => {
738
+ this.fixCellTooltip(el);
728
739
  });
729
740
  }
741
+ else {
742
+ return;
743
+ }
744
+ tooltip === null || tooltip === void 0 ? void 0 : tooltip.setExternalPopperProps({
745
+ strategy: "fixed",
746
+ });
730
747
  };
731
748
  this.fixCellTooltips = () => {
732
- const elements = this.el.shadowRoot.querySelectorAll(".data-type-element");
733
- elements.forEach((element) => {
749
+ var _a, _b, _c, _d;
750
+ (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".data-type-element")) === null || _b === void 0 ? void 0 : _b.forEach((element) => {
734
751
  const slotElements = helpers.getSlotElements(element);
735
752
  slotElements === null || slotElements === void 0 ? void 0 : slotElements.forEach((slottedEl) => {
736
753
  this.fixCellTooltip(slottedEl);
737
754
  });
738
755
  });
739
- const actionElements = this.el.shadowRoot.querySelectorAll(".action-element");
740
- actionElements === null || actionElements === void 0 ? void 0 : actionElements.forEach((actionElementSpan) => {
756
+ (_d = (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll(".action-element")) === null || _d === void 0 ? void 0 : _d.forEach((actionElementSpan) => {
741
757
  const actionElement = actionElementSpan.firstChild;
742
758
  if (actionElement) {
743
759
  this.fixCellTooltip(actionElement);
@@ -745,7 +761,7 @@ const DataTable = class {
745
761
  });
746
762
  };
747
763
  this.handleClick = (event, callback) => callback(event);
748
- this.renderTableBody = (data, loading, overlay) => {
764
+ this.renderTableBody = (loading, data, overlay) => {
749
765
  if (!(data === null || data === void 0 ? void 0 : data.length))
750
766
  return;
751
767
  if (overlay && loading) {
@@ -764,7 +780,7 @@ const DataTable = class {
764
780
  return (index.h(index.Fragment, null, index.h("div", { class: "loading-overlay", ref: (el) => (this.loadingOverlay = el) }), index.h("ic-loading-indicator", { theme: this.theme, monochrome: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.monochrome, class: {
765
781
  "loading-empty": isLoading,
766
782
  loading: true,
767
- }, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })));
783
+ }, description: (loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.description) || "Loading table data", label: (loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.label) || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })));
768
784
  };
769
785
  this.renderAriaLiveLoading = () => {
770
786
  var _a, _b;
@@ -778,7 +794,7 @@ const DataTable = class {
778
794
  return "";
779
795
  }
780
796
  };
781
- this.renderEmptyState = (data, loading, overlay) => {
797
+ this.renderEmptyState = (loading, data, overlay) => {
782
798
  const emptyStateEl = helpers.isSlotUsed(this.el, "empty-state") ? (index.h("slot", { name: "empty-state" })) : (index.h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" }));
783
799
  if (loading && !(data === null || data === void 0 ? void 0 : data.length) && overlay) {
784
800
  return emptyStateEl;
@@ -792,16 +808,15 @@ const DataTable = class {
792
808
  };
793
809
  }
794
810
  headerTruncationChangeHandler() {
811
+ var _a, _b;
795
812
  if (this.columnHeaderTruncation) {
796
813
  this.prevTableContainerWidth = 0;
797
814
  }
798
815
  else {
799
- const headers = this.el.shadowRoot.querySelectorAll("th.column-header");
800
- headers.forEach((header) => {
801
- const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);
802
- if (tooltip) {
803
- tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
804
- }
816
+ (_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll("th.column-header")) === null || _b === void 0 ? void 0 : _b.forEach((header) => {
817
+ var _a;
818
+ (_a = header
819
+ .querySelector(this.IC_TOOLTIP_STRING)) === null || _a === void 0 ? void 0 : _a.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);
805
820
  });
806
821
  }
807
822
  }
@@ -821,14 +836,17 @@ const DataTable = class {
821
836
  this.previousItemsPerPage = this.rowsPerPage;
822
837
  }
823
838
  componentDidLoad() {
824
- const tableElement = this.el.shadowRoot.querySelector("table");
825
- const tableContainer = this.el.shadowRoot.querySelector(".table-container");
839
+ var _a, _b;
840
+ const tableElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("table");
841
+ const tableContainer = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(".table-container");
826
842
  helpers.checkResizeObserver(this.runHeaderResizeObserver);
827
843
  if (this.dataUpdated) {
828
844
  this.dataUpdated = false;
829
845
  }
830
- if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
831
- (tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
846
+ if (tableElement &&
847
+ tableContainer &&
848
+ (tableElement.clientHeight > tableContainer.clientHeight ||
849
+ tableElement.clientWidth > tableContainer.clientWidth)) {
832
850
  this.scrollable = true;
833
851
  }
834
852
  if (this.loading) {
@@ -838,7 +856,8 @@ const DataTable = class {
838
856
  if (this.truncationPattern) {
839
857
  this.getTypographyElements().forEach((typographyEl) => {
840
858
  const cellContainer = this.getCellContainer(typographyEl);
841
- if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
859
+ if (cellContainer &&
860
+ !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
842
861
  this.dataTruncation(typographyEl);
843
862
  }
844
863
  });
@@ -863,19 +882,23 @@ const DataTable = class {
863
882
  this.adjustWidthForActionElement();
864
883
  }
865
884
  truncateUpdatedData() {
885
+ var _a;
866
886
  if (this.dataUpdated) {
867
887
  if (this.truncationPattern === this.SHOW_HIDE_STRING) {
868
888
  this.getTypographyElements().forEach((typographyEl) => {
869
889
  const truncWrapper = this.getTruncWrapper(typographyEl);
870
890
  const cellContainer = this.getCellContainer(typographyEl);
871
- if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >=
872
- (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
891
+ if (truncWrapper &&
892
+ cellContainer &&
893
+ cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >=
894
+ truncWrapper.scrollHeight) {
873
895
  this.resetShowHideTruncation(typographyEl);
874
896
  return;
875
897
  }
876
898
  setTimeout(() => {
877
899
  // slight delay due to data rendering
878
- if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
900
+ if (cellContainer &&
901
+ typographyEl.scrollHeight > cellContainer.clientHeight) {
879
902
  this.addShowHideTruncation(cellContainer, typographyEl);
880
903
  }
881
904
  }, 150);
@@ -893,13 +916,15 @@ const DataTable = class {
893
916
  if (this.truncationPattern === this.SHOW_HIDE_STRING) {
894
917
  this.getTypographyElements().forEach((typographyEl) => {
895
918
  const cellContainer = this.getCellContainer(typographyEl);
896
- if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
897
- this.createShowHideTruncation(typographyEl, cellContainer);
898
- }
899
- else {
900
- typographyEl.resetTruncation().then(() => {
901
- cellContainer.removeAttribute("style");
902
- });
919
+ if (cellContainer) {
920
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
921
+ this.createShowHideTruncation(typographyEl, cellContainer);
922
+ }
923
+ else {
924
+ typographyEl.resetTruncation().then(() => {
925
+ cellContainer.removeAttribute("style");
926
+ });
927
+ }
903
928
  }
904
929
  });
905
930
  }
@@ -908,49 +933,48 @@ const DataTable = class {
908
933
  // This function recalculates the tooltip truncation when the rowHeight has been set.
909
934
  // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
910
935
  if (this.rowHeightSet) {
911
- const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
912
- const hasAutoRowHeight = this.globalRowHeight === "auto";
913
936
  this.getTypographyElements().forEach((typographyEl) => {
914
- var _a;
937
+ var _a, _b;
915
938
  const cellContainer = this.getCellContainer(typographyEl);
916
939
  const tooltipEl = this.getTooltip(typographyEl);
917
- if (hasAutoRowHeight) {
918
- cellContainer.style.height = null;
919
- if (this.truncationPattern === this.TOOLTIP_STRING) {
920
- this.removeTooltip(cellContainer, typographyEl, tooltipEl);
921
- typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
940
+ if (cellContainer) {
941
+ if (this.globalRowHeight === "auto") {
942
+ cellContainer.style.height = "";
943
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
944
+ this.removeTooltip(cellContainer, typographyEl, tooltipEl);
945
+ typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: 0`);
946
+ }
947
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
948
+ this.resetShowHideTruncation(typographyEl);
949
+ }
950
+ return;
922
951
  }
923
- else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
924
- this.resetShowHideTruncation(typographyEl);
952
+ // If the set row height is bigger than the cell container even
953
+ // with textWrap, set the row height
954
+ if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
955
+ !((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
956
+ this.getRowHeight(cellContainer) > cellContainer.clientHeight &&
957
+ !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
958
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
925
959
  }
926
- return;
927
- }
928
- const rowHeight = fontSize *
929
- parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
930
- // If the set row height is bigger than the cell container even
931
- // with textWrap, set the row height
932
- if (!cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
933
- !((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
934
- rowHeight > cellContainer.clientHeight &&
935
- !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
936
- cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
937
- }
938
- if (this.truncationPattern) {
939
- // If the set row height is bigger than the typography truncation wrapper
940
- // scroll height, remove see more / see less button
941
- if (this.truncationPattern === this.SHOW_HIDE_STRING) {
942
- const truncWrapper = this.getTruncWrapper(typographyEl);
943
- const showHideBtn = typographyEl.shadowRoot.querySelector("button");
944
- if (showHideBtn &&
945
- (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
946
- this.resetShowHideTruncation(typographyEl);
947
- return;
960
+ if (this.truncationPattern) {
961
+ // If the set row height is bigger than the typography truncation wrapper
962
+ // scroll height, remove see more / see less button
963
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
964
+ const truncWrapper = this.getTruncWrapper(typographyEl);
965
+ const showHideBtn = (_b = typographyEl.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("button");
966
+ if (showHideBtn &&
967
+ truncWrapper &&
968
+ truncWrapper.scrollHeight <= cellContainer.clientHeight) {
969
+ this.resetShowHideTruncation(typographyEl);
970
+ return;
971
+ }
948
972
  }
973
+ this.truncate(typographyEl, cellContainer, tooltipEl);
974
+ }
975
+ else {
976
+ this.updateSetRowHeight(typographyEl);
949
977
  }
950
- this.truncate(typographyEl, cellContainer, tooltipEl);
951
- }
952
- else {
953
- this.updateSetRowHeight(typographyEl);
954
978
  }
955
979
  });
956
980
  this.rowHeightSet = false;
@@ -958,16 +982,15 @@ const DataTable = class {
958
982
  // Only run truncation on the new rows
959
983
  // when the number of items per page has increased
960
984
  if (this.itemsPerPageChange) {
961
- const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
962
- if (this.rowsPerPage > this.previousItemsPerPage) {
985
+ const allRows = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".table-row");
986
+ if (allRows && this.rowsPerPage > this.previousItemsPerPage) {
963
987
  const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
964
988
  newRows.forEach((row) => {
965
- row
966
- .querySelectorAll(this.IC_TYPOGRAPHY_STRING)
967
- .forEach((typographyEl) => {
989
+ row.querySelectorAll("ic-typography").forEach((typographyEl) => {
968
990
  const cellContainer = this.getCellContainer(typographyEl);
969
991
  const tooltipEl = this.getTooltip(typographyEl);
970
- this.truncate(typographyEl, cellContainer, tooltipEl);
992
+ if (cellContainer)
993
+ this.truncate(typographyEl, cellContainer, tooltipEl);
971
994
  });
972
995
  });
973
996
  }
@@ -981,9 +1004,11 @@ const DataTable = class {
981
1004
  // set truncation to see more if opened and next/previous page is pressed
982
1005
  if (this.truncationPattern === this.SHOW_HIDE_STRING) {
983
1006
  this.getTypographyElements().forEach((typographyEl) => {
1007
+ var _a;
984
1008
  const cellContainer = this.getCellContainer(typographyEl);
985
- const showHideBtn = typographyEl.shadowRoot.querySelector("button");
986
- if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
1009
+ const showHideBtn = (_a = typographyEl.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("button");
1010
+ if (cellContainer &&
1011
+ (typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
987
1012
  !showHideBtn) {
988
1013
  this.addShowHideTruncation(cellContainer, typographyEl);
989
1014
  }
@@ -995,7 +1020,8 @@ const DataTable = class {
995
1020
  this.getTypographyElements().forEach((typographyEl) => {
996
1021
  const cellContainer = this.getCellContainer(typographyEl);
997
1022
  const tooltipEl = this.getTooltip(typographyEl);
998
- this.truncate(typographyEl, cellContainer, tooltipEl);
1023
+ if (cellContainer)
1024
+ this.truncate(typographyEl, cellContainer, tooltipEl);
999
1025
  });
1000
1026
  this.densityUpdate = false;
1001
1027
  }
@@ -1004,7 +1030,8 @@ const DataTable = class {
1004
1030
  this.getTypographyElements().forEach((typographyEl) => {
1005
1031
  const cellContainer = this.getCellContainer(typographyEl);
1006
1032
  const tooltipEl = this.getTooltip(typographyEl);
1007
- if (typographyEl.scrollHeight > cellContainer.clientHeight) {
1033
+ if (cellContainer &&
1034
+ typographyEl.scrollHeight > cellContainer.clientHeight) {
1008
1035
  this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);
1009
1036
  }
1010
1037
  });
@@ -1013,29 +1040,24 @@ const DataTable = class {
1013
1040
  this.getTypographyElements().forEach((typographyEl) => {
1014
1041
  const truncWrapper = this.getTruncWrapper(typographyEl);
1015
1042
  const cellContainer = this.getCellContainer(typographyEl);
1016
- if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
1017
- (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
1018
- this.resetShowHideTruncation(typographyEl);
1019
- return;
1020
- }
1021
- if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
1022
- this.addShowHideTruncation(cellContainer, typographyEl);
1043
+ if (cellContainer) {
1044
+ if (truncWrapper &&
1045
+ (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
1046
+ truncWrapper.scrollHeight) {
1047
+ this.resetShowHideTruncation(typographyEl);
1048
+ return;
1049
+ }
1050
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
1051
+ this.addShowHideTruncation(cellContainer, typographyEl);
1052
+ }
1023
1053
  }
1024
1054
  });
1025
1055
  }
1026
1056
  }
1027
1057
  }
1028
- createShowHideTruncation(typographyEl, cellContainer, descriptionHeight) {
1058
+ createShowHideTruncation(typographyEl, cellContainer, descriptionHeight = 0) {
1029
1059
  typographyEl.checkMaxLines(typographyEl.scrollHeight);
1030
- typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
1031
- if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
1032
- descriptionHeight) {
1033
- typographyEl.setAttribute("max-lines", `${Math.floor(((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - descriptionHeight) /
1034
- this.DEFAULT_LINE_HEIGHT)}`);
1035
- }
1036
- else {
1037
- typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
1038
- }
1060
+ typographyEl.setAttribute("max-lines", `${this.getLines(cellContainer.clientHeight - descriptionHeight)}`);
1039
1061
  typographyEl.setShowHideExpanded(false);
1040
1062
  cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
1041
1063
  }
@@ -1054,26 +1076,30 @@ const DataTable = class {
1054
1076
  handleTypographyTruncationExpandToggle({ detail, }) {
1055
1077
  const { expanded, typographyEl } = detail;
1056
1078
  const cellContainer = this.getCellContainer(typographyEl);
1057
- if (cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&
1079
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE)) &&
1058
1080
  expanded) {
1059
1081
  cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, "inherit");
1060
1082
  }
1061
1083
  }
1062
1084
  handlePageChange({ detail, target }) {
1085
+ var _a;
1063
1086
  if (target.parentElement !== this.el) {
1064
1087
  this.fromRow = (detail.value - 1) * this.rowsPerPage;
1065
1088
  this.toRow = this.fromRow + this.rowsPerPage;
1066
- const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
1067
- if (this.previousRowsPerPage === this.rowsPerPage) {
1068
- tableRowsContainer.scrollTop = 0;
1069
- }
1070
- else if (this.previousRowsPerPage < this.rowsPerPage) {
1071
- tableRowsContainer.scrollTop = this.scrollOffset;
1072
- this.previousRowsPerPage = this.rowsPerPage;
1073
- }
1074
- else {
1075
- this.previousRowsPerPage = this.rowsPerPage;
1089
+ const tableRowsContainer = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".table-row-container");
1090
+ if (tableRowsContainer) {
1091
+ if (this.previousRowsPerPage === this.rowsPerPage) {
1092
+ tableRowsContainer.scrollTop = 0;
1093
+ }
1094
+ else if (this.previousRowsPerPage < this.rowsPerPage) {
1095
+ tableRowsContainer.scrollTop = this.scrollOffset;
1096
+ this.previousRowsPerPage = this.rowsPerPage;
1097
+ }
1098
+ else {
1099
+ this.previousRowsPerPage = this.rowsPerPage;
1100
+ }
1076
1101
  }
1102
+ this.selectedRows = [];
1077
1103
  }
1078
1104
  if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
1079
1105
  // This is to prevent icPageChange from triggering truncation on first load
@@ -1092,10 +1118,6 @@ const DataTable = class {
1092
1118
  handleDensityChange(ev) {
1093
1119
  this.density = ev.detail.value;
1094
1120
  }
1095
- clickListener(ev) {
1096
- if (ev.target !== this.el)
1097
- this.selectedRow = undefined;
1098
- }
1099
1121
  loadingHandler(newValue) {
1100
1122
  if (newValue)
1101
1123
  this.startLoadingTimer();
@@ -1113,7 +1135,8 @@ const DataTable = class {
1113
1135
  this.getTypographyElements().forEach((typographyEl) => {
1114
1136
  const cellContainer = this.getCellContainer(typographyEl);
1115
1137
  const tooltip = this.getTooltip(typographyEl);
1116
- this.truncate(typographyEl, cellContainer, tooltip);
1138
+ if (cellContainer)
1139
+ this.truncate(typographyEl, cellContainer, tooltip);
1117
1140
  });
1118
1141
  }
1119
1142
  if (newValue === this.SHOW_HIDE_STRING) {
@@ -1123,17 +1146,20 @@ const DataTable = class {
1123
1146
  this.getTypographyElements().forEach((typographyEl) => {
1124
1147
  const truncWrapper = this.getTruncWrapper(typographyEl);
1125
1148
  const cellContainer = this.getCellContainer(typographyEl);
1126
- if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
1127
- (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
1128
- this.resetShowHideTruncation(typographyEl);
1129
- return;
1130
- }
1131
- setTimeout(() => {
1132
- // slight delay due to data rendering
1133
- if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
1134
- this.addShowHideTruncation(cellContainer, typographyEl);
1149
+ if (cellContainer) {
1150
+ if (truncWrapper &&
1151
+ cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
1152
+ truncWrapper.scrollHeight) {
1153
+ this.resetShowHideTruncation(typographyEl);
1154
+ return;
1135
1155
  }
1136
- }, 150);
1156
+ setTimeout(() => {
1157
+ // slight delay due to data rendering
1158
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
1159
+ this.addShowHideTruncation(cellContainer, typographyEl);
1160
+ }
1161
+ }, 150);
1162
+ }
1137
1163
  });
1138
1164
  }
1139
1165
  this.truncationPatternUpdated = true;
@@ -1157,10 +1183,12 @@ const DataTable = class {
1157
1183
  if (typographyEl) {
1158
1184
  const truncWrapper = this.getTruncWrapper(typographyEl);
1159
1185
  const cellContainer = this.getCellContainer(typographyEl);
1160
- if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
1186
+ if (!(cellContainer && truncWrapper))
1187
+ return;
1188
+ if (truncWrapper.scrollHeight > cellContainer.clientHeight &&
1161
1189
  !helpers.isEmptyString(typographyEl.getAttribute("max-lines")) &&
1162
1190
  Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
1163
- +typographyEl.getAttribute("max-lines")) {
1191
+ Number(typographyEl.getAttribute("max-lines"))) {
1164
1192
  typographyEl.checkMaxLines(truncWrapper.scrollHeight);
1165
1193
  typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
1166
1194
  typographyEl.setShowHideExpanded(false);
@@ -1178,7 +1206,7 @@ const DataTable = class {
1178
1206
  this.getTypographyElements().forEach((typographyEl) => {
1179
1207
  const cellContainer = this.getCellContainer(typographyEl);
1180
1208
  typographyEl.resetTruncation().then(() => {
1181
- if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
1209
+ if (cellContainer && !typographyEl.closest(this.TEXT_WRAP_CLASS)) {
1182
1210
  cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
1183
1211
  }
1184
1212
  });
@@ -1199,7 +1227,7 @@ const DataTable = class {
1199
1227
  */
1200
1228
  async resetRowHeights(rowHeight) {
1201
1229
  this.globalRowHeight = rowHeight || "auto";
1202
- this.variableRowHeight = null;
1230
+ this.variableRowHeight = undefined;
1203
1231
  }
1204
1232
  showLoadingIndicator() {
1205
1233
  var _a, _b, _c;
@@ -1243,35 +1271,28 @@ const DataTable = class {
1243
1271
  }
1244
1272
  }
1245
1273
  removeTooltip(cellContainer, typographyEl, tooltip) {
1246
- const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
1247
- cellTextWrapper.prepend(typographyEl);
1248
- if (tooltip) {
1249
- tooltip.remove();
1250
- }
1274
+ var _a;
1275
+ (_a = cellContainer
1276
+ .querySelector(this.CELL_TEXT_WRAPPER_STRING)) === null || _a === void 0 ? void 0 : _a.prepend(typographyEl);
1277
+ tooltip === null || tooltip === void 0 ? void 0 : tooltip.remove();
1251
1278
  }
1252
1279
  addLineClampCSS(typographyEl, cellContainer) {
1253
1280
  var _a, _b;
1254
1281
  const descriptionCellHeight = (_a = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _a === void 0 ? void 0 : _a.clientHeight;
1282
+ const cellContainerHeight = cellContainer.clientHeight;
1283
+ let totalHeight = cellContainerHeight;
1255
1284
  if (cellContainer.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING) &&
1256
- (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > descriptionCellHeight) {
1257
- let iconHeight;
1258
- if (helpers.deviceSizeMatches(helpers.IC_DEVICE_SIZES.XS)) {
1259
- const cellIcon = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon");
1260
- iconHeight = cellIcon ? cellIcon.clientHeight : 0;
1261
- }
1262
- else {
1263
- iconHeight = 0;
1264
- }
1265
- const height = (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) -
1266
- ((_b = cellContainer.querySelector(this.CELL_DESCRIPTION_STRING)) === null || _b === void 0 ? void 0 : _b.clientHeight) -
1267
- iconHeight;
1268
- typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(height || 0)}`);
1269
- }
1270
- else {
1271
- typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
1285
+ descriptionCellHeight &&
1286
+ cellContainerHeight > descriptionCellHeight) {
1287
+ const iconHeight = (helpers.deviceSizeMatches(helpers.IC_DEVICE_SIZES.XS) &&
1288
+ ((_b = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.querySelector(".icon")) === null || _b === void 0 ? void 0 : _b.clientHeight)) ||
1289
+ 0;
1290
+ totalHeight = totalHeight - descriptionCellHeight - iconHeight;
1272
1291
  }
1292
+ typographyEl.setAttribute("style", `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(totalHeight || 0)}`);
1273
1293
  }
1274
1294
  createTruncationTooltip(typographyEl, cellContainer) {
1295
+ var _a;
1275
1296
  const tooltipEl = document.createElement(this.IC_TOOLTIP_STRING);
1276
1297
  tooltipEl.setAttribute("target", typographyEl.id);
1277
1298
  tooltipEl.setAttribute("label", typographyEl.textContent);
@@ -1280,25 +1301,38 @@ const DataTable = class {
1280
1301
  // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
1281
1302
  strategy: "fixed",
1282
1303
  });
1283
- const cellTextWrapper = cellContainer.querySelector(this.CELL_TEXT_WRAPPER_STRING);
1284
- cellTextWrapper.prepend(tooltipEl);
1304
+ (_a = cellContainer
1305
+ .querySelector(this.CELL_TEXT_WRAPPER_STRING)) === null || _a === void 0 ? void 0 : _a.prepend(tooltipEl);
1285
1306
  tooltipEl.prepend(typographyEl);
1286
1307
  }
1287
1308
  render() {
1288
1309
  var _a, _b;
1289
- const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumn, sortedColumnOrder, stickyColumnHeaders, updateScrollOffset, updating, theme, } = this;
1290
- return (index.h(index.Host, { key: '9fa1cc109610d4370a73d9e9d1dc39ad9b2e34fc', style: Object.assign({}, this.setTableDimensions()), class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, index.h("div", { key: '7af203ceb2819160686a3074b9800820ed7100a3', class: "table-container" }, helpers.isSlotUsed(this.el, "title-bar") && index.h("slot", { key: '3cf4ec7bc6edaea9fe152c48b2dad4a8bdf8e347', name: "title-bar" }), index.h("div", { key: '6fee471259fe2cb37f1646b5e4ffd83b97d6765c', class: {
1310
+ const { caption, columns, createColumnHeaders, createUpdatingIndicator, data, density, hideColumnHeaders, rowSelection, loading, loadingOptions, paginationBarOptions, rowsPerPage, scrollable, scrollOffset, selectAllRows, selectedRows, showPagination, sortable, sortedColumn, sortedColumnOrder, stickyColumnHeaders, updateScrollOffset, updating, tableLayout, theme, } = this;
1311
+ const rowsSelected = selectedRows.length > 0;
1312
+ const allRowsSelected = selectedRows.length === (showPagination ? rowsPerPage : data === null || data === void 0 ? void 0 : data.length);
1313
+ const headerCheckboxLabelState = rowsSelected
1314
+ ? allRowsSelected
1315
+ ? "deselect all"
1316
+ : "select all remaining"
1317
+ : "select all";
1318
+ return (index.h(index.Host, { key: 'c70d98425c01e5f0d7b23d12a0a22fcde6bfa8aa', style: Object.assign({}, this.setTableDimensions()), class: { [`ic-theme-${theme}`]: theme !== "inherit" } }, index.h("div", { key: 'b7411965f1bd64038922da836d86791d9fce0766', class: "table-container" }, helpers.isSlotUsed(this.el, "title-bar") && index.h("slot", { key: 'de14d3c9613fc5f216f9318c8b584a4fe6d7d0b9', name: "title-bar" }), index.h("div", { key: 'c28d8074bb81266c7104ce842b2ea0e415ea7576', class: {
1291
1319
  ["table-row-container"]: true,
1292
1320
  scrollable,
1293
- }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, index.h("table", { key: 'e054307fa0e64ba9ee446315db0ab693af13f076', style: {
1294
- ["--table-layout"]: this.tableLayout,
1295
- } }, index.h("caption", { key: '79a44a034f1718e9a4bca422ec67cba2cf168530', class: "table-caption" }, caption), !hideColumnHeaders && (index.h("thead", { key: '0275b1bbf9983e1cdda744148ffe2e404dfc343f', class: {
1321
+ }, tabIndex: scrollable ? 0 : undefined, onScroll: updateScrollOffset }, index.h("table", { key: '283aac0915752eb13c7651fe2594cbbce7eb1164', style: {
1322
+ "--table-layout": tableLayout,
1323
+ } }, index.h("caption", { key: '9d49941bb4a1f14337af61c35057895a32466c0e', class: "table-caption" }, caption), !hideColumnHeaders && (index.h("thead", { key: '970d0ecda5d04b06b394f0f1cf1e58dfdd93660f', class: {
1296
1324
  ["column-header-sticky"]: stickyColumnHeaders,
1297
1325
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
1298
- } }, index.h("tr", { key: '3be8c99629bef5f9be93a907dacd9c3609ae9167' }, createColumnHeaders()))), updating &&
1326
+ } }, index.h("tr", { key: 'dd2b7e0e731a8652d726b98c4d4b53de1d4bc89a' }, rowSelection && data && (index.h("th", { key: 'd1c97faa5830737aa4c9d7020b7bf89a2357d127', class: {
1327
+ "column-header": true,
1328
+ "checkbox-cell": true,
1329
+ "updating-state-headers": updating && !loading,
1330
+ [`table-density-${density}`]: this.notDefaultDensity(),
1331
+ } }, index.h("div", { key: '93aad327435bc6bc944fc3c7e141c0281beb421b', class: "checkbox-wrapper" }, index.h("ic-checkbox", { key: '9f984d73bf5172d756d1553c631a571adad238f6', class: "ic-data-table-checkbox", checked: rowsSelected && allRowsSelected, disabled: updating || loading, hideLabel: true, indeterminate: rowsSelected && !allRowsSelected, label: `${caption} ${headerCheckboxLabelState} rows`, nativeIndeterminateBehaviour: true, onIcCheck: () => selectAllRows(), size: density === "dense" ? "small" : "medium", value: caption })))), createColumnHeaders()))), updating &&
1299
1332
  !loading &&
1300
- (hideColumnHeaders ? (index.h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), this.renderTableBody(data, loading, loadingOptions.overlay)), this.renderEmptyState(data, loading, loadingOptions.overlay)), index.h("div", { key: 'f39b60c55de7d1769a84429d203ba67d4db7b391', "aria-live": "assertive", class: "sr-only" }, this.renderAriaLiveLoading()), this.renderLoadingIndicator(loading, loadingOptions), (showPagination || helpers.isSlotUsed(this.el, "pagination-bar")) && (index.h("div", { key: '243db49f9f520eb7cc784574e8cd8e55a317069b', class: "pagination-container" }, helpers.isSlotUsed(this.el, "pagination-bar") ? (index.h("slot", { name: "pagination-bar" })) : (index.h("ic-pagination-bar", { alignment: paginationBarOptions.alignment, hideAllFromItemsPerPage: paginationBarOptions.hideAllFromItemsPerPage, hideRangeLabel: paginationBarOptions.hideRangeLabel, itemLabel: paginationBarOptions.itemLabel, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, monochrome: paginationBarOptions.monochrome, pageLabel: paginationBarOptions.pageLabel, rangeLabelType: paginationBarOptions.rangeLabelType, selectedItemsPerPage: paginationBarOptions.selectedItemsPerPage, setToFirstPageOnPaginationChange: paginationBarOptions.setToFirstPageOnPaginationChange, showGoToPageControl: paginationBarOptions.showGoToPageControl, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, theme: theme, totalItems: (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0, type: paginationBarOptions.type })))), sortable && (index.h("div", { key: 'c67e73ce64617844507147a3a5abb5c54990918e', class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
1301
- ? `${((_b = this.columns.find((col) => col.key === sortedColumn)) === null || _b === void 0 ? void 0 : _b.title) || sortedColumn} sorted ${sortedColumnOrder}`
1333
+ (hideColumnHeaders ? (index.h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), this.renderTableBody(loading, data, loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.overlay)), this.renderEmptyState(loading, data, loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.overlay)), index.h("div", { key: '3b3d4811530dabad832180f06631b32724b7c3c8', "aria-live": "assertive", class: "sr-only" }, this.renderAriaLiveLoading()), this.renderLoadingIndicator(loading, loadingOptions), (showPagination || helpers.isSlotUsed(this.el, "pagination-bar")) && (index.h("div", { key: '4efe794f7f5e48ff1ad762780b5a8e3f291cb8f0', class: "pagination-container" }, helpers.isSlotUsed(this.el, "pagination-bar") ? (index.h("slot", { name: "pagination-bar" })) : (index.h("ic-pagination-bar", { alignment: paginationBarOptions.alignment, hideAllFromItemsPerPage: paginationBarOptions.hideAllFromItemsPerPage, hideRangeLabel: paginationBarOptions.hideRangeLabel, itemLabel: paginationBarOptions.itemLabel, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, monochrome: paginationBarOptions.monochrome, pageLabel: paginationBarOptions.pageLabel, rangeLabelType: paginationBarOptions.rangeLabelType, selectedItemsPerPage: paginationBarOptions.selectedItemsPerPage, setToFirstPageOnPaginationChange: paginationBarOptions.setToFirstPageOnPaginationChange, showGoToPageControl: paginationBarOptions.showGoToPageControl, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, theme: theme, totalItems: (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0, type: paginationBarOptions.type })))), sortable && (index.h("div", { key: '2eadf2de56bcbccfdb70707846a5eaa920cba050', class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
1334
+ ? `${((_b = columns.find((col) => col.key === sortedColumn)) === null || _b === void 0 ? void 0 : _b.title) ||
1335
+ sortedColumn} sorted ${sortedColumnOrder}`
1302
1336
  : "table unsorted")))));
1303
1337
  }
1304
1338
  get el() { return index.getElement(this); }