@ukic/canary-web-components 2.0.0-canary.9 → 3.0.0-canary.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (815) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-7a069459.js → helpers-33b42cd6.js} +95 -101
  3. package/dist/cjs/helpers-33b42cd6.js.map +1 -0
  4. package/dist/cjs/{helpers-f75cf7cf.js → helpers-6817cfbb.js} +116 -1
  5. package/dist/cjs/helpers-6817cfbb.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +31 -9
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +7 -8
  9. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-alert.cjs.entry.js +28 -10
  11. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +17 -8
  13. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-badge.cjs.entry.js +67 -117
  15. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +37 -11
  17. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-breadcrumb.cjs.entry.js +8 -7
  19. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-button_3.cjs.entry.js +115 -128
  21. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-card-horizontal.cjs.entry.js +131 -0
  23. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
  24. package/dist/cjs/ic-card-vertical.cjs.entry.js +149 -0
  25. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -0
  26. package/dist/cjs/ic-checkbox-group.cjs.entry.js +27 -20
  27. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-checkbox.cjs.entry.js +45 -40
  29. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-chip.cjs.entry.js +40 -29
  31. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-classification-banner.cjs.entry.js +14 -5
  33. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-data-list.cjs.entry.js +32 -0
  35. package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -0
  36. package/dist/cjs/ic-data-row.cjs.entry.js +12 -12
  37. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
  39. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
  40. package/dist/cjs/ic-data-table.cjs.entry.js +805 -65
  41. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-date-input.cjs.entry.js +70 -33
  43. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-date-picker.cjs.entry.js +81 -55
  45. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-dialog.cjs.entry.js +27 -101
  47. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-divider.cjs.entry.js +2 -3
  49. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-empty-state_2.cjs.entry.js +317 -0
  51. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
  52. package/dist/cjs/ic-footer-link-group.cjs.entry.js +9 -10
  53. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-footer-link.cjs.entry.js +6 -8
  55. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-footer.cjs.entry.js +9 -10
  57. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-hero.cjs.entry.js +27 -12
  59. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -8
  61. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +38 -32
  63. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-link.cjs.entry.js +51 -24
  65. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -3
  67. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-menu-item.cjs.entry.js +6 -13
  69. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +186 -47
  71. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-menu.cjs.entry.js +16 -21
  73. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-navigation-button.cjs.entry.js +28 -8
  75. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-navigation-group.cjs.entry.js +23 -21
  77. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-navigation-item.cjs.entry.js +33 -38
  79. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-navigation-menu.cjs.entry.js +3 -4
  81. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-page-header.cjs.entry.js +10 -12
  83. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-pagination_4.cjs.entry.js +226 -185
  85. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-popover-menu.cjs.entry.js +15 -21
  87. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-radio-group.cjs.entry.js +75 -51
  89. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-radio-option.cjs.entry.js +44 -53
  91. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  92. package/dist/cjs/ic-search-bar.cjs.entry.js +23 -30
  93. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  95. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  96. package/dist/cjs/ic-select-with-multi.cjs.entry.js +15 -51
  97. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-side-navigation.cjs.entry.js +8 -9
  99. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-skeleton.cjs.entry.js +17 -37
  101. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-status-tag.cjs.entry.js +7 -15
  103. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-step.cjs.entry.js +42 -43
  105. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  106. package/dist/cjs/ic-stepper.cjs.entry.js +45 -24
  107. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  108. package/dist/cjs/ic-switch.cjs.entry.js +7 -9
  109. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  110. package/dist/cjs/ic-tab-context.cjs.entry.js +35 -18
  111. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  112. package/dist/cjs/ic-tab-group.cjs.entry.js +25 -11
  113. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  114. package/dist/cjs/ic-tab-panel.cjs.entry.js +6 -13
  115. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-tab.cjs.entry.js +10 -9
  117. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-theme.cjs.entry.js +39 -25
  119. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  120. package/dist/cjs/ic-toast-region.cjs.entry.js +6 -7
  121. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  122. package/dist/cjs/ic-toast.cjs.entry.js +88 -35
  123. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  124. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +17 -17
  125. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  126. package/dist/cjs/ic-toggle-button.cjs.entry.js +15 -14
  127. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  128. package/dist/cjs/ic-top-navigation.cjs.entry.js +62 -86
  129. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  130. package/dist/cjs/ic-tree-item.cjs.entry.js +241 -0
  131. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
  132. package/dist/cjs/ic-tree-view.cjs.entry.js +203 -0
  133. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
  134. package/dist/cjs/ic-typography.cjs.entry.js +55 -19
  135. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  136. package/dist/cjs/index-4cf27b16.js +26 -14
  137. package/dist/cjs/loader.cjs.js +1 -1
  138. package/dist/collection/assets/arrow-dropdown.svg +3 -0
  139. package/dist/collection/collection-manifest.json +7 -3
  140. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +661 -0
  141. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +373 -0
  142. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
  143. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
  144. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
  145. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +130 -0
  146. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
  147. package/dist/collection/components/ic-data-table/ic-data-table.css +155 -10
  148. package/dist/collection/components/ic-data-table/ic-data-table.js +1174 -90
  149. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  150. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  151. package/dist/collection/components/ic-data-table/story-data.js +758 -40
  152. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  153. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +339 -3
  154. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  155. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +93 -0
  156. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
  157. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
  158. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
  159. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
  160. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
  161. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
  162. package/dist/collection/components/ic-date-input/ic-date-input.css +2 -2
  163. package/dist/collection/components/ic-date-input/ic-date-input.js +140 -33
  164. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  165. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +23 -21
  166. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
  167. package/dist/collection/components/ic-date-picker/ic-date-picker.css +31 -29
  168. package/dist/collection/components/ic-date-picker/ic-date-picker.js +123 -56
  169. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  170. package/dist/collection/components/ic-date-picker/story-data.js +6 -1
  171. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
  172. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +73 -5
  173. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -1
  174. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +25 -14
  175. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +187 -69
  176. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
  177. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +229 -52
  178. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
  179. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +1 -1
  180. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +173 -158
  181. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  182. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +56 -11
  183. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
  184. package/dist/collection/components/ic-select-with-multi/ic-select.css +14 -12
  185. package/dist/collection/components/ic-select-with-multi/ic-select.js +16 -145
  186. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
  187. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +7 -7
  188. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -1
  189. package/dist/collection/components/ic-tree-item/ic-tree-item.css +172 -0
  190. package/dist/collection/components/ic-tree-item/ic-tree-item.js +592 -0
  191. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
  192. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +114 -0
  193. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
  194. package/dist/collection/components/ic-tree-view/ic-tree-view.css +59 -0
  195. package/dist/collection/components/ic-tree-view/ic-tree-view.js +296 -0
  196. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
  197. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
  198. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
  199. package/dist/collection/utils/helpers.js +44 -1
  200. package/dist/collection/utils/helpers.js.map +1 -1
  201. package/dist/collection/utils/types.js.map +1 -1
  202. package/dist/components/helpers.js +84 -90
  203. package/dist/components/helpers.js.map +1 -1
  204. package/dist/components/helpers2.js +107 -1
  205. package/dist/components/helpers2.js.map +1 -1
  206. package/dist/components/ic-accordion-group.js +39 -13
  207. package/dist/components/ic-accordion-group.js.map +1 -1
  208. package/dist/components/ic-accordion.js +6 -6
  209. package/dist/components/ic-accordion.js.map +1 -1
  210. package/dist/components/ic-alert.js +132 -1
  211. package/dist/components/ic-alert.js.map +1 -1
  212. package/dist/components/ic-back-to-top.js +37 -8
  213. package/dist/components/ic-back-to-top.js.map +1 -1
  214. package/dist/components/ic-badge.js +75 -121
  215. package/dist/components/ic-badge.js.map +1 -1
  216. package/dist/components/ic-breadcrumb-group.js +42 -10
  217. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  218. package/dist/components/ic-breadcrumb2.js +10 -7
  219. package/dist/components/ic-breadcrumb2.js.map +1 -1
  220. package/dist/components/ic-button2.js +65 -101
  221. package/dist/components/ic-button2.js.map +1 -1
  222. package/dist/components/ic-card-horizontal.d.ts +11 -0
  223. package/dist/components/ic-card-horizontal.js +167 -0
  224. package/dist/components/ic-card-horizontal.js.map +1 -0
  225. package/dist/components/ic-card-vertical.js +194 -0
  226. package/dist/components/ic-card-vertical.js.map +1 -0
  227. package/dist/components/ic-checkbox-group.js +31 -21
  228. package/dist/components/ic-checkbox-group.js.map +1 -1
  229. package/dist/components/ic-checkbox.js +52 -47
  230. package/dist/components/ic-checkbox.js.map +1 -1
  231. package/dist/components/ic-chip.js +45 -31
  232. package/dist/components/ic-chip.js.map +1 -1
  233. package/dist/components/ic-classification-banner.js +14 -5
  234. package/dist/components/ic-classification-banner.js.map +1 -1
  235. package/dist/components/ic-data-list.js +56 -0
  236. package/dist/components/ic-data-list.js.map +1 -0
  237. package/dist/components/ic-data-row.js +14 -13
  238. package/dist/components/ic-data-row.js.map +1 -1
  239. package/dist/components/ic-data-table-title-bar.d.ts +11 -0
  240. package/dist/components/ic-data-table-title-bar.js +136 -0
  241. package/dist/components/ic-data-table-title-bar.js.map +1 -0
  242. package/dist/components/ic-data-table.js +841 -72
  243. package/dist/components/ic-data-table.js.map +1 -1
  244. package/dist/components/ic-date-input2.js +79 -36
  245. package/dist/components/ic-date-input2.js.map +1 -1
  246. package/dist/components/ic-date-picker.js +87 -57
  247. package/dist/components/ic-date-picker.js.map +1 -1
  248. package/dist/components/ic-dialog.js +29 -115
  249. package/dist/components/ic-dialog.js.map +1 -1
  250. package/dist/components/ic-divider2.js +1 -2
  251. package/dist/components/ic-divider2.js.map +1 -1
  252. package/dist/components/ic-empty-state.js +1 -57
  253. package/dist/components/ic-empty-state.js.map +1 -1
  254. package/dist/components/ic-empty-state2.js +80 -0
  255. package/dist/components/ic-empty-state2.js.map +1 -0
  256. package/dist/components/ic-footer-link-group.js +10 -10
  257. package/dist/components/ic-footer-link-group.js.map +1 -1
  258. package/dist/components/ic-footer-link.js +13 -8
  259. package/dist/components/ic-footer-link.js.map +1 -1
  260. package/dist/components/ic-footer.js +9 -10
  261. package/dist/components/ic-footer.js.map +1 -1
  262. package/dist/components/ic-hero.js +28 -14
  263. package/dist/components/ic-hero.js.map +1 -1
  264. package/dist/components/ic-horizontal-scroll2.js +6 -8
  265. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  266. package/dist/components/ic-input-component-container2.js +25 -20
  267. package/dist/components/ic-input-component-container2.js.map +1 -1
  268. package/dist/components/ic-input-label2.js +9 -11
  269. package/dist/components/ic-input-label2.js.map +1 -1
  270. package/dist/components/ic-input-validation2.js +4 -5
  271. package/dist/components/ic-input-validation2.js.map +1 -1
  272. package/dist/components/ic-link2.js +54 -27
  273. package/dist/components/ic-link2.js.map +1 -1
  274. package/dist/components/ic-loading-indicator2.js +23 -19
  275. package/dist/components/ic-loading-indicator2.js.map +1 -1
  276. package/dist/components/ic-menu-group.js +2 -2
  277. package/dist/components/ic-menu-group.js.map +1 -1
  278. package/dist/components/ic-menu-item2.js +6 -12
  279. package/dist/components/ic-menu-item2.js.map +1 -1
  280. package/dist/components/ic-menu2.js +15 -20
  281. package/dist/components/ic-menu2.js.map +1 -1
  282. package/dist/components/ic-menu3.js +187 -49
  283. package/dist/components/ic-menu3.js.map +1 -1
  284. package/dist/components/ic-navigation-button.js +28 -8
  285. package/dist/components/ic-navigation-button.js.map +1 -1
  286. package/dist/components/ic-navigation-group.js +23 -20
  287. package/dist/components/ic-navigation-group.js.map +1 -1
  288. package/dist/components/ic-navigation-item.js +33 -37
  289. package/dist/components/ic-navigation-item.js.map +1 -1
  290. package/dist/components/ic-navigation-menu2.js +3 -3
  291. package/dist/components/ic-navigation-menu2.js.map +1 -1
  292. package/dist/components/ic-page-header.js +9 -11
  293. package/dist/components/ic-page-header.js.map +1 -1
  294. package/dist/components/ic-pagination-bar2.js +154 -143
  295. package/dist/components/ic-pagination-bar2.js.map +1 -1
  296. package/dist/components/ic-pagination-item2.js +22 -12
  297. package/dist/components/ic-pagination-item2.js.map +1 -1
  298. package/dist/components/ic-pagination2.js +50 -33
  299. package/dist/components/ic-pagination2.js.map +1 -1
  300. package/dist/components/ic-popover-menu.js +15 -20
  301. package/dist/components/ic-popover-menu.js.map +1 -1
  302. package/dist/components/ic-radio-group.js +76 -51
  303. package/dist/components/ic-radio-group.js.map +1 -1
  304. package/dist/components/ic-radio-option.js +47 -60
  305. package/dist/components/ic-radio-option.js.map +1 -1
  306. package/dist/components/ic-search-bar.js +21 -29
  307. package/dist/components/ic-search-bar.js.map +1 -1
  308. package/dist/components/ic-section-container2.js +1 -1
  309. package/dist/components/ic-section-container2.js.map +1 -1
  310. package/dist/components/ic-select-with-multi.js +15 -58
  311. package/dist/components/ic-select-with-multi.js.map +1 -1
  312. package/dist/components/ic-select2.js +59 -42
  313. package/dist/components/ic-select2.js.map +1 -1
  314. package/dist/components/ic-side-navigation.js +8 -9
  315. package/dist/components/ic-side-navigation.js.map +1 -1
  316. package/dist/components/ic-skeleton.js +18 -43
  317. package/dist/components/ic-skeleton.js.map +1 -1
  318. package/dist/components/ic-status-tag.js +7 -15
  319. package/dist/components/ic-status-tag.js.map +1 -1
  320. package/dist/components/ic-step.js +48 -48
  321. package/dist/components/ic-step.js.map +1 -1
  322. package/dist/components/ic-stepper.js +49 -23
  323. package/dist/components/ic-stepper.js.map +1 -1
  324. package/dist/components/ic-switch.js +7 -9
  325. package/dist/components/ic-switch.js.map +1 -1
  326. package/dist/components/ic-tab-context.js +40 -20
  327. package/dist/components/ic-tab-context.js.map +1 -1
  328. package/dist/components/ic-tab-group.js +27 -13
  329. package/dist/components/ic-tab-group.js.map +1 -1
  330. package/dist/components/ic-tab-panel.js +9 -16
  331. package/dist/components/ic-tab-panel.js.map +1 -1
  332. package/dist/components/ic-tab.js +12 -10
  333. package/dist/components/ic-tab.js.map +1 -1
  334. package/dist/components/ic-text-field2.js +104 -113
  335. package/dist/components/ic-text-field2.js.map +1 -1
  336. package/dist/components/ic-theme.js +45 -28
  337. package/dist/components/ic-theme.js.map +1 -1
  338. package/dist/components/ic-toast-region.js +7 -9
  339. package/dist/components/ic-toast-region.js.map +1 -1
  340. package/dist/components/ic-toast.js +93 -36
  341. package/dist/components/ic-toast.js.map +1 -1
  342. package/dist/components/ic-toggle-button-group.js +17 -17
  343. package/dist/components/ic-toggle-button-group.js.map +1 -1
  344. package/dist/components/ic-toggle-button.js +16 -14
  345. package/dist/components/ic-toggle-button.js.map +1 -1
  346. package/dist/components/ic-tooltip2.js +31 -9
  347. package/dist/components/ic-tooltip2.js.map +1 -1
  348. package/dist/components/ic-top-navigation.js +63 -87
  349. package/dist/components/ic-top-navigation.js.map +1 -1
  350. package/dist/components/ic-tree-item.d.ts +11 -0
  351. package/dist/components/ic-tree-item.js +286 -0
  352. package/dist/components/ic-tree-item.js.map +1 -0
  353. package/dist/components/ic-tree-view.d.ts +11 -0
  354. package/dist/components/ic-tree-view.js +237 -0
  355. package/dist/components/ic-tree-view.js.map +1 -0
  356. package/dist/components/ic-typography2.js +62 -21
  357. package/dist/components/ic-typography2.js.map +1 -1
  358. package/dist/core/core.css +38 -20
  359. package/dist/core/core.esm.js +1 -1
  360. package/dist/core/core.esm.js.map +1 -1
  361. package/dist/core/p-06eeb7f2.entry.js +2 -0
  362. package/dist/core/p-06eeb7f2.entry.js.map +1 -0
  363. package/dist/core/p-0922c552.entry.js +2 -0
  364. package/dist/core/p-0922c552.entry.js.map +1 -0
  365. package/dist/core/p-0bc0e852.entry.js +2 -0
  366. package/dist/core/p-0bc0e852.entry.js.map +1 -0
  367. package/dist/core/p-108a9029.entry.js +2 -0
  368. package/dist/core/p-108a9029.entry.js.map +1 -0
  369. package/dist/core/p-13100d3c.entry.js +2 -0
  370. package/dist/core/p-13100d3c.entry.js.map +1 -0
  371. package/dist/core/p-1769df1d.entry.js +2 -0
  372. package/dist/core/p-1769df1d.entry.js.map +1 -0
  373. package/dist/core/p-202bc922.entry.js +2 -0
  374. package/dist/core/p-202bc922.entry.js.map +1 -0
  375. package/dist/core/p-266341f5.entry.js +2 -0
  376. package/dist/core/p-266341f5.entry.js.map +1 -0
  377. package/dist/core/p-297e99cf.js +2 -0
  378. package/dist/core/p-297e99cf.js.map +1 -0
  379. package/dist/core/p-306def43.entry.js +2 -0
  380. package/dist/core/p-306def43.entry.js.map +1 -0
  381. package/dist/core/p-30b046b2.entry.js +2 -0
  382. package/dist/core/p-30b046b2.entry.js.map +1 -0
  383. package/dist/core/{p-f8cf2978.js → p-33dd24eb.js} +2 -2
  384. package/dist/core/p-3778cc5e.entry.js +2 -0
  385. package/dist/core/p-3778cc5e.entry.js.map +1 -0
  386. package/dist/core/p-383a5a76.entry.js +2 -0
  387. package/dist/core/p-383a5a76.entry.js.map +1 -0
  388. package/dist/core/p-3a0510e2.entry.js +2 -0
  389. package/dist/core/p-3a0510e2.entry.js.map +1 -0
  390. package/dist/core/p-3ace51f5.entry.js +2 -0
  391. package/dist/core/p-3ace51f5.entry.js.map +1 -0
  392. package/dist/core/p-3ef28704.entry.js +2 -0
  393. package/dist/core/p-3ef28704.entry.js.map +1 -0
  394. package/dist/core/p-3f0391c1.entry.js +2 -0
  395. package/dist/core/p-3f0391c1.entry.js.map +1 -0
  396. package/dist/core/p-41fecc61.entry.js +2 -0
  397. package/dist/core/p-41fecc61.entry.js.map +1 -0
  398. package/dist/core/p-46cb94a2.entry.js +2 -0
  399. package/dist/core/p-46cb94a2.entry.js.map +1 -0
  400. package/dist/core/p-4e67f127.entry.js +2 -0
  401. package/dist/core/p-4e67f127.entry.js.map +1 -0
  402. package/dist/core/p-505250cf.entry.js +2 -0
  403. package/dist/core/p-505250cf.entry.js.map +1 -0
  404. package/dist/core/p-50e48f4d.entry.js +2 -0
  405. package/dist/core/p-50e48f4d.entry.js.map +1 -0
  406. package/dist/core/p-56e7459a.entry.js +2 -0
  407. package/dist/core/p-56e7459a.entry.js.map +1 -0
  408. package/dist/core/p-59028160.entry.js +2 -0
  409. package/dist/core/p-59028160.entry.js.map +1 -0
  410. package/dist/core/p-5cfb5821.entry.js +2 -0
  411. package/dist/core/p-5cfb5821.entry.js.map +1 -0
  412. package/dist/core/p-5e6fd734.entry.js +2 -0
  413. package/dist/core/p-5e6fd734.entry.js.map +1 -0
  414. package/dist/core/p-5f313e1a.entry.js +2 -0
  415. package/dist/core/p-5f313e1a.entry.js.map +1 -0
  416. package/dist/core/{p-c2b5e7b1.entry.js → p-5f5403e2.entry.js} +2 -2
  417. package/dist/core/{p-c2b5e7b1.entry.js.map → p-5f5403e2.entry.js.map} +1 -1
  418. package/dist/core/p-710c6a42.entry.js +2 -0
  419. package/dist/core/p-710c6a42.entry.js.map +1 -0
  420. package/dist/core/p-73b40c79.entry.js +2 -0
  421. package/dist/core/p-73b40c79.entry.js.map +1 -0
  422. package/dist/core/p-77a32de5.entry.js +2 -0
  423. package/dist/core/p-77a32de5.entry.js.map +1 -0
  424. package/dist/core/p-7a9de008.entry.js +2 -0
  425. package/dist/core/p-7a9de008.entry.js.map +1 -0
  426. package/dist/core/p-801414e2.entry.js +2 -0
  427. package/dist/core/p-801414e2.entry.js.map +1 -0
  428. package/dist/core/p-82ba744d.entry.js +2 -0
  429. package/dist/core/p-82ba744d.entry.js.map +1 -0
  430. package/dist/core/p-897b8d16.entry.js +2 -0
  431. package/dist/core/p-897b8d16.entry.js.map +1 -0
  432. package/dist/core/p-9397b15b.js +2 -0
  433. package/dist/core/p-9397b15b.js.map +1 -0
  434. package/dist/core/p-9af6adb1.entry.js +2 -0
  435. package/dist/core/p-9af6adb1.entry.js.map +1 -0
  436. package/dist/core/p-9b54feca.entry.js +2 -0
  437. package/dist/core/p-9b54feca.entry.js.map +1 -0
  438. package/dist/core/{p-356b8a4c.entry.js → p-9f3cf053.entry.js} +2 -2
  439. package/dist/core/{p-356b8a4c.entry.js.map → p-9f3cf053.entry.js.map} +1 -1
  440. package/dist/core/p-a57cd616.entry.js +2 -0
  441. package/dist/core/p-a57cd616.entry.js.map +1 -0
  442. package/dist/core/p-a5eaed1a.entry.js +2 -0
  443. package/dist/core/p-a5eaed1a.entry.js.map +1 -0
  444. package/dist/core/p-a78cf2cb.entry.js +2 -0
  445. package/dist/core/p-a78cf2cb.entry.js.map +1 -0
  446. package/dist/core/p-a91340b4.entry.js +2 -0
  447. package/dist/core/p-a91340b4.entry.js.map +1 -0
  448. package/dist/core/p-aee8d45b.entry.js +2 -0
  449. package/dist/core/p-aee8d45b.entry.js.map +1 -0
  450. package/dist/core/{p-452985d9.entry.js → p-b40ecaef.entry.js} +2 -2
  451. package/dist/core/p-b40ecaef.entry.js.map +1 -0
  452. package/dist/core/p-badd4c8d.entry.js +2 -0
  453. package/dist/core/p-badd4c8d.entry.js.map +1 -0
  454. package/dist/core/p-bf670360.entry.js +2 -0
  455. package/dist/core/{p-b306cbc8.entry.js.map → p-bf670360.entry.js.map} +1 -1
  456. package/dist/core/p-c033e7d6.entry.js +2 -0
  457. package/dist/core/p-c033e7d6.entry.js.map +1 -0
  458. package/dist/core/p-c07af2d8.entry.js +2 -0
  459. package/dist/core/p-c07af2d8.entry.js.map +1 -0
  460. package/dist/core/p-c21d0db8.entry.js +2 -0
  461. package/dist/core/p-c21d0db8.entry.js.map +1 -0
  462. package/dist/core/p-c678f73d.entry.js +2 -0
  463. package/dist/core/p-c678f73d.entry.js.map +1 -0
  464. package/dist/core/p-c6ae9bad.entry.js +2 -0
  465. package/dist/core/p-c6ae9bad.entry.js.map +1 -0
  466. package/dist/core/p-c6c1e08e.entry.js +2 -0
  467. package/dist/core/p-c6c1e08e.entry.js.map +1 -0
  468. package/dist/core/p-cb6cebdd.entry.js +2 -0
  469. package/dist/core/p-cb6cebdd.entry.js.map +1 -0
  470. package/dist/core/p-d03374fc.entry.js +2 -0
  471. package/dist/core/p-d03374fc.entry.js.map +1 -0
  472. package/dist/core/p-d16f364a.entry.js +2 -0
  473. package/dist/core/p-d16f364a.entry.js.map +1 -0
  474. package/dist/core/p-d239c33b.entry.js +2 -0
  475. package/dist/core/p-d239c33b.entry.js.map +1 -0
  476. package/dist/core/p-d8563643.entry.js +2 -0
  477. package/dist/core/p-d8563643.entry.js.map +1 -0
  478. package/dist/core/p-da40757f.entry.js +2 -0
  479. package/dist/core/p-da40757f.entry.js.map +1 -0
  480. package/dist/core/p-de052137.entry.js +2 -0
  481. package/dist/core/p-de052137.entry.js.map +1 -0
  482. package/dist/core/p-e5d99316.entry.js +2 -0
  483. package/dist/core/p-e5d99316.entry.js.map +1 -0
  484. package/dist/core/p-e89bb650.entry.js +2 -0
  485. package/dist/core/p-e89bb650.entry.js.map +1 -0
  486. package/dist/core/{p-baf81f30.entry.js → p-f1072c28.entry.js} +2 -2
  487. package/dist/core/{p-452985d9.entry.js.map → p-f1072c28.entry.js.map} +1 -1
  488. package/dist/core/p-f37df214.entry.js +2 -0
  489. package/dist/core/{p-d3856ed3.entry.js.map → p-f37df214.entry.js.map} +1 -1
  490. package/dist/core/p-f743b0eb.entry.js +2 -0
  491. package/dist/core/p-f743b0eb.entry.js.map +1 -0
  492. package/dist/core/p-f98b1afc.entry.js +2 -0
  493. package/dist/core/p-f98b1afc.entry.js.map +1 -0
  494. package/dist/core/p-fe13f1ba.entry.js +2 -0
  495. package/dist/core/p-fe13f1ba.entry.js.map +1 -0
  496. package/dist/esm/core.js +1 -1
  497. package/dist/esm/{date-helpers-4f432e92.js → date-helpers-0e5e32a7.js} +2 -2
  498. package/dist/esm/{date-helpers-4f432e92.js.map → date-helpers-0e5e32a7.js.map} +1 -1
  499. package/dist/esm/{helpers-f328a7b6.js → helpers-5bd2012a.js} +108 -2
  500. package/dist/esm/helpers-5bd2012a.js.map +1 -0
  501. package/dist/esm/{helpers-7aa21b0a.js → helpers-dab8ddfe.js} +85 -91
  502. package/dist/esm/helpers-dab8ddfe.js.map +1 -0
  503. package/dist/esm/ic-accordion-group.entry.js +31 -9
  504. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  505. package/dist/esm/ic-accordion.entry.js +7 -8
  506. package/dist/esm/ic-accordion.entry.js.map +1 -1
  507. package/dist/esm/ic-alert.entry.js +27 -9
  508. package/dist/esm/ic-alert.entry.js.map +1 -1
  509. package/dist/esm/ic-back-to-top.entry.js +17 -8
  510. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  511. package/dist/esm/ic-badge.entry.js +67 -117
  512. package/dist/esm/ic-badge.entry.js.map +1 -1
  513. package/dist/esm/ic-breadcrumb-group.entry.js +37 -11
  514. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  515. package/dist/esm/ic-breadcrumb.entry.js +8 -7
  516. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  517. package/dist/esm/ic-button_3.entry.js +112 -125
  518. package/dist/esm/ic-button_3.entry.js.map +1 -1
  519. package/dist/esm/ic-card-horizontal.entry.js +127 -0
  520. package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
  521. package/dist/esm/ic-card-vertical.entry.js +145 -0
  522. package/dist/esm/ic-card-vertical.entry.js.map +1 -0
  523. package/dist/esm/ic-checkbox-group.entry.js +27 -20
  524. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  525. package/dist/esm/ic-checkbox.entry.js +45 -40
  526. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  527. package/dist/esm/ic-chip.entry.js +40 -29
  528. package/dist/esm/ic-chip.entry.js.map +1 -1
  529. package/dist/esm/ic-classification-banner.entry.js +14 -5
  530. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  531. package/dist/esm/ic-data-list.entry.js +28 -0
  532. package/dist/esm/ic-data-list.entry.js.map +1 -0
  533. package/dist/esm/ic-data-row.entry.js +12 -12
  534. package/dist/esm/ic-data-row.entry.js.map +1 -1
  535. package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
  536. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
  537. package/dist/esm/ic-data-table.entry.js +806 -66
  538. package/dist/esm/ic-data-table.entry.js.map +1 -1
  539. package/dist/esm/ic-date-input.entry.js +71 -34
  540. package/dist/esm/ic-date-input.entry.js.map +1 -1
  541. package/dist/esm/ic-date-picker.entry.js +82 -56
  542. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  543. package/dist/esm/ic-dialog.entry.js +27 -101
  544. package/dist/esm/ic-dialog.entry.js.map +1 -1
  545. package/dist/esm/ic-divider.entry.js +1 -2
  546. package/dist/esm/ic-divider.entry.js.map +1 -1
  547. package/dist/esm/ic-empty-state_2.entry.js +312 -0
  548. package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
  549. package/dist/esm/ic-footer-link-group.entry.js +9 -10
  550. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  551. package/dist/esm/ic-footer-link.entry.js +6 -8
  552. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  553. package/dist/esm/ic-footer.entry.js +9 -10
  554. package/dist/esm/ic-footer.entry.js.map +1 -1
  555. package/dist/esm/ic-hero.entry.js +28 -13
  556. package/dist/esm/ic-hero.entry.js.map +1 -1
  557. package/dist/esm/ic-horizontal-scroll.entry.js +6 -8
  558. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  559. package/dist/esm/ic-input-component-container_4.entry.js +35 -29
  560. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
  561. package/dist/esm/ic-link.entry.js +52 -25
  562. package/dist/esm/ic-link.entry.js.map +1 -1
  563. package/dist/esm/ic-menu-group.entry.js +2 -3
  564. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  565. package/dist/esm/ic-menu-item.entry.js +6 -13
  566. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  567. package/dist/esm/ic-menu-with-multi.entry.js +186 -47
  568. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
  569. package/dist/esm/ic-menu.entry.js +16 -21
  570. package/dist/esm/ic-menu.entry.js.map +1 -1
  571. package/dist/esm/ic-navigation-button.entry.js +28 -8
  572. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  573. package/dist/esm/ic-navigation-group.entry.js +23 -21
  574. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  575. package/dist/esm/ic-navigation-item.entry.js +33 -38
  576. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  577. package/dist/esm/ic-navigation-menu.entry.js +3 -4
  578. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  579. package/dist/esm/ic-page-header.entry.js +10 -12
  580. package/dist/esm/ic-page-header.entry.js.map +1 -1
  581. package/dist/esm/ic-pagination_4.entry.js +219 -178
  582. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  583. package/dist/esm/ic-popover-menu.entry.js +15 -21
  584. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  585. package/dist/esm/ic-radio-group.entry.js +75 -51
  586. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  587. package/dist/esm/ic-radio-option.entry.js +44 -53
  588. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  589. package/dist/esm/ic-search-bar.entry.js +19 -26
  590. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  591. package/dist/esm/ic-section-container.entry.js +1 -1
  592. package/dist/esm/ic-section-container.entry.js.map +1 -1
  593. package/dist/esm/ic-select-with-multi.entry.js +14 -50
  594. package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
  595. package/dist/esm/ic-side-navigation.entry.js +8 -9
  596. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  597. package/dist/esm/ic-skeleton.entry.js +17 -37
  598. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  599. package/dist/esm/ic-status-tag.entry.js +7 -15
  600. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  601. package/dist/esm/ic-step.entry.js +42 -43
  602. package/dist/esm/ic-step.entry.js.map +1 -1
  603. package/dist/esm/ic-stepper.entry.js +45 -24
  604. package/dist/esm/ic-stepper.entry.js.map +1 -1
  605. package/dist/esm/ic-switch.entry.js +7 -9
  606. package/dist/esm/ic-switch.entry.js.map +1 -1
  607. package/dist/esm/ic-tab-context.entry.js +35 -18
  608. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  609. package/dist/esm/ic-tab-group.entry.js +25 -11
  610. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  611. package/dist/esm/ic-tab-panel.entry.js +6 -13
  612. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  613. package/dist/esm/ic-tab.entry.js +10 -9
  614. package/dist/esm/ic-tab.entry.js.map +1 -1
  615. package/dist/esm/ic-theme.entry.js +39 -25
  616. package/dist/esm/ic-theme.entry.js.map +1 -1
  617. package/dist/esm/ic-toast-region.entry.js +6 -7
  618. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  619. package/dist/esm/ic-toast.entry.js +88 -35
  620. package/dist/esm/ic-toast.entry.js.map +1 -1
  621. package/dist/esm/ic-toggle-button-group.entry.js +17 -17
  622. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  623. package/dist/esm/ic-toggle-button.entry.js +15 -14
  624. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  625. package/dist/esm/ic-top-navigation.entry.js +62 -86
  626. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  627. package/dist/esm/ic-tree-item.entry.js +237 -0
  628. package/dist/esm/ic-tree-item.entry.js.map +1 -0
  629. package/dist/esm/ic-tree-view.entry.js +199 -0
  630. package/dist/esm/ic-tree-view.entry.js.map +1 -0
  631. package/dist/esm/ic-typography.entry.js +56 -20
  632. package/dist/esm/ic-typography.entry.js.map +1 -1
  633. package/dist/esm/index-93509377.js +26 -14
  634. package/dist/esm/loader.js +1 -1
  635. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
  636. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
  637. package/dist/types/components/ic-data-table/ic-data-table.d.ts +176 -19
  638. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +30 -0
  639. package/dist/types/components/ic-data-table/story-data.d.ts +236 -3
  640. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
  641. package/dist/types/components/ic-date-input/ic-date-input.d.ts +17 -0
  642. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +14 -25
  643. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +10 -4
  644. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +37 -18
  645. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +1 -31
  646. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +95 -0
  647. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +40 -0
  648. package/dist/types/components.d.ts +543 -114
  649. package/dist/types/interface.d.ts +1 -0
  650. package/dist/types/utils/helpers.d.ts +9 -0
  651. package/dist/types/utils/types.d.ts +24 -8
  652. package/hydrate/index.js +4264 -2362
  653. package/package.json +6 -6
  654. package/dist/cjs/helpers-7a069459.js.map +0 -1
  655. package/dist/cjs/helpers-f75cf7cf.js.map +0 -1
  656. package/dist/cjs/ic-card.cjs.entry.js +0 -126
  657. package/dist/cjs/ic-card.cjs.entry.js.map +0 -1
  658. package/dist/cjs/ic-data-entity.cjs.entry.js +0 -29
  659. package/dist/cjs/ic-data-entity.cjs.entry.js.map +0 -1
  660. package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
  661. package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
  662. package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -269
  663. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
  664. package/dist/cjs/types-17dba796.js +0 -16
  665. package/dist/cjs/types-17dba796.js.map +0 -1
  666. package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
  667. package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
  668. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +0 -146
  669. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +0 -1
  670. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +0 -2040
  671. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +0 -1
  672. package/dist/components/ic-alert2.js +0 -117
  673. package/dist/components/ic-alert2.js.map +0 -1
  674. package/dist/components/ic-card.js +0 -171
  675. package/dist/components/ic-card.js.map +0 -1
  676. package/dist/components/ic-data-entity.js +0 -53
  677. package/dist/components/ic-data-entity.js.map +0 -1
  678. package/dist/components/types.js +0 -16
  679. package/dist/components/types.js.map +0 -1
  680. package/dist/core/p-06ae5bec.entry.js +0 -2
  681. package/dist/core/p-06ae5bec.entry.js.map +0 -1
  682. package/dist/core/p-0939ce92.entry.js +0 -2
  683. package/dist/core/p-0939ce92.entry.js.map +0 -1
  684. package/dist/core/p-16f67397.entry.js +0 -2
  685. package/dist/core/p-16f67397.entry.js.map +0 -1
  686. package/dist/core/p-1832f4b5.entry.js +0 -2
  687. package/dist/core/p-1832f4b5.entry.js.map +0 -1
  688. package/dist/core/p-1b7d426b.entry.js +0 -2
  689. package/dist/core/p-1b7d426b.entry.js.map +0 -1
  690. package/dist/core/p-1ce75941.entry.js +0 -2
  691. package/dist/core/p-1ce75941.entry.js.map +0 -1
  692. package/dist/core/p-2e2e0099.entry.js +0 -2
  693. package/dist/core/p-2e2e0099.entry.js.map +0 -1
  694. package/dist/core/p-33679c06.entry.js +0 -2
  695. package/dist/core/p-33679c06.entry.js.map +0 -1
  696. package/dist/core/p-36508aad.entry.js +0 -2
  697. package/dist/core/p-36508aad.entry.js.map +0 -1
  698. package/dist/core/p-3745da83.entry.js +0 -2
  699. package/dist/core/p-3745da83.entry.js.map +0 -1
  700. package/dist/core/p-3f2e77c3.entry.js +0 -2
  701. package/dist/core/p-3f2e77c3.entry.js.map +0 -1
  702. package/dist/core/p-47ac6838.entry.js +0 -2
  703. package/dist/core/p-47ac6838.entry.js.map +0 -1
  704. package/dist/core/p-4f1ffa39.entry.js +0 -2
  705. package/dist/core/p-4f1ffa39.entry.js.map +0 -1
  706. package/dist/core/p-5759d771.entry.js +0 -2
  707. package/dist/core/p-5759d771.entry.js.map +0 -1
  708. package/dist/core/p-5e2e6c3b.entry.js +0 -2
  709. package/dist/core/p-5e2e6c3b.entry.js.map +0 -1
  710. package/dist/core/p-5fe96107.entry.js +0 -2
  711. package/dist/core/p-5fe96107.entry.js.map +0 -1
  712. package/dist/core/p-62e22508.entry.js +0 -2
  713. package/dist/core/p-62e22508.entry.js.map +0 -1
  714. package/dist/core/p-6690bc04.entry.js +0 -2
  715. package/dist/core/p-6690bc04.entry.js.map +0 -1
  716. package/dist/core/p-6c0e2ceb.entry.js +0 -2
  717. package/dist/core/p-6c0e2ceb.entry.js.map +0 -1
  718. package/dist/core/p-76915584.entry.js +0 -2
  719. package/dist/core/p-76915584.entry.js.map +0 -1
  720. package/dist/core/p-76d26018.entry.js +0 -2
  721. package/dist/core/p-76d26018.entry.js.map +0 -1
  722. package/dist/core/p-776671cf.entry.js +0 -2
  723. package/dist/core/p-776671cf.entry.js.map +0 -1
  724. package/dist/core/p-7cecf5d5.entry.js +0 -2
  725. package/dist/core/p-7cecf5d5.entry.js.map +0 -1
  726. package/dist/core/p-85609bdd.entry.js +0 -2
  727. package/dist/core/p-85609bdd.entry.js.map +0 -1
  728. package/dist/core/p-86012178.entry.js +0 -2
  729. package/dist/core/p-86012178.entry.js.map +0 -1
  730. package/dist/core/p-8a7e7d23.entry.js +0 -2
  731. package/dist/core/p-8a7e7d23.entry.js.map +0 -1
  732. package/dist/core/p-8c90110a.entry.js +0 -2
  733. package/dist/core/p-8c90110a.entry.js.map +0 -1
  734. package/dist/core/p-8ea47d42.entry.js +0 -2
  735. package/dist/core/p-8ea47d42.entry.js.map +0 -1
  736. package/dist/core/p-9777ebb1.entry.js +0 -2
  737. package/dist/core/p-9777ebb1.entry.js.map +0 -1
  738. package/dist/core/p-982a6e88.entry.js +0 -2
  739. package/dist/core/p-982a6e88.entry.js.map +0 -1
  740. package/dist/core/p-98448bdb.entry.js +0 -2
  741. package/dist/core/p-98448bdb.entry.js.map +0 -1
  742. package/dist/core/p-9d01a7ad.entry.js +0 -2
  743. package/dist/core/p-9d01a7ad.entry.js.map +0 -1
  744. package/dist/core/p-9d540656.entry.js +0 -2
  745. package/dist/core/p-9d540656.entry.js.map +0 -1
  746. package/dist/core/p-9e3178e8.entry.js +0 -2
  747. package/dist/core/p-9e3178e8.entry.js.map +0 -1
  748. package/dist/core/p-a0f9b259.entry.js +0 -2
  749. package/dist/core/p-a0f9b259.entry.js.map +0 -1
  750. package/dist/core/p-a42c2f37.entry.js +0 -2
  751. package/dist/core/p-a42c2f37.entry.js.map +0 -1
  752. package/dist/core/p-a6447b13.entry.js +0 -2
  753. package/dist/core/p-a6447b13.entry.js.map +0 -1
  754. package/dist/core/p-aabab75f.entry.js +0 -2
  755. package/dist/core/p-aabab75f.entry.js.map +0 -1
  756. package/dist/core/p-ae422058.entry.js +0 -2
  757. package/dist/core/p-ae422058.entry.js.map +0 -1
  758. package/dist/core/p-b2aa3d7c.entry.js +0 -2
  759. package/dist/core/p-b2aa3d7c.entry.js.map +0 -1
  760. package/dist/core/p-b306cbc8.entry.js +0 -2
  761. package/dist/core/p-baf81f30.entry.js.map +0 -1
  762. package/dist/core/p-c7590421.entry.js +0 -2
  763. package/dist/core/p-c7590421.entry.js.map +0 -1
  764. package/dist/core/p-c7820c23.entry.js +0 -2
  765. package/dist/core/p-c7820c23.entry.js.map +0 -1
  766. package/dist/core/p-ca8cbd6a.entry.js +0 -2
  767. package/dist/core/p-ca8cbd6a.entry.js.map +0 -1
  768. package/dist/core/p-caf857de.entry.js +0 -2
  769. package/dist/core/p-caf857de.entry.js.map +0 -1
  770. package/dist/core/p-cc7bc438.entry.js +0 -2
  771. package/dist/core/p-cc7bc438.entry.js.map +0 -1
  772. package/dist/core/p-cd799087.js +0 -2
  773. package/dist/core/p-cd799087.js.map +0 -1
  774. package/dist/core/p-d32692e2.entry.js +0 -2
  775. package/dist/core/p-d32692e2.entry.js.map +0 -1
  776. package/dist/core/p-d35c7c18.js +0 -2
  777. package/dist/core/p-d35c7c18.js.map +0 -1
  778. package/dist/core/p-d3856ed3.entry.js +0 -2
  779. package/dist/core/p-d4fdd8c1.entry.js +0 -2
  780. package/dist/core/p-d4fdd8c1.entry.js.map +0 -1
  781. package/dist/core/p-d5c99ec3.entry.js +0 -2
  782. package/dist/core/p-d5c99ec3.entry.js.map +0 -1
  783. package/dist/core/p-e189f1d0.entry.js +0 -2
  784. package/dist/core/p-e189f1d0.entry.js.map +0 -1
  785. package/dist/core/p-e473bbf8.entry.js +0 -2
  786. package/dist/core/p-e473bbf8.entry.js.map +0 -1
  787. package/dist/core/p-e74f1d09.entry.js +0 -2
  788. package/dist/core/p-e74f1d09.entry.js.map +0 -1
  789. package/dist/core/p-e79e0292.entry.js +0 -2
  790. package/dist/core/p-e79e0292.entry.js.map +0 -1
  791. package/dist/core/p-e84b0310.entry.js +0 -2
  792. package/dist/core/p-e84b0310.entry.js.map +0 -1
  793. package/dist/core/p-f55ad6ae.entry.js +0 -2
  794. package/dist/core/p-f55ad6ae.entry.js.map +0 -1
  795. package/dist/core/p-f91527a0.entry.js +0 -2
  796. package/dist/core/p-f91527a0.entry.js.map +0 -1
  797. package/dist/core/p-fbf4e9b7.entry.js +0 -2
  798. package/dist/core/p-fbf4e9b7.entry.js.map +0 -1
  799. package/dist/core/p-fd186591.js +0 -2
  800. package/dist/core/p-fd186591.js.map +0 -1
  801. package/dist/esm/helpers-7aa21b0a.js.map +0 -1
  802. package/dist/esm/helpers-f328a7b6.js.map +0 -1
  803. package/dist/esm/ic-card.entry.js +0 -122
  804. package/dist/esm/ic-card.entry.js.map +0 -1
  805. package/dist/esm/ic-data-entity.entry.js +0 -25
  806. package/dist/esm/ic-data-entity.entry.js.map +0 -1
  807. package/dist/esm/ic-empty-state.entry.js +0 -34
  808. package/dist/esm/ic-empty-state.entry.js.map +0 -1
  809. package/dist/esm/ic-pagination-bar.entry.js +0 -265
  810. package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
  811. package/dist/esm/types-f605c21c.js +0 -16
  812. package/dist/esm/types-f605c21c.js.map +0 -1
  813. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
  814. /package/dist/core/{p-f8cf2978.js.map → p-33dd24eb.js.map} +0 -0
  815. /package/dist/types/components/{ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts} +0 -0
@@ -1,4 +1,5 @@
1
- import { r as registerInstance, h, g as getElement } from './index-93509377.js';
1
+ import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-93509377.js';
2
+ import { d as dynamicDebounce, a as isEmptyString, p as pxToRem, i as isSlotUsed, b as addDataToPosition } from './helpers-5bd2012a.js';
2
3
 
3
4
  const unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
4
5
  <path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
@@ -12,16 +13,180 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
12
13
  <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
13
14
  </svg>`;
14
15
 
15
- const icDataTableCss = ":host{position:relative;display:block;height:100%;max-height:100%}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs))}.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:fixed;border-spacing:0;width:100%}.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-container{border:var(--ic-border-light)}.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-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.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{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.column-header,.row-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-architectural-40);border-right:var(--ic-border-light);border-bottom:var(--ic-border-light)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-border-light) !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}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important}.table-row:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px)}.data-type-string{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;vertical-align:top}.cell-alignment-top{vertical-align:top}.cell-alignment-middle{vertical-align:middle}.cell-alignment-bottom{vertical-align:bottom}.cell-emphasis-low{color:var(--ic-color-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}}";
16
+ 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)}.truncation-show-hide{overflow:visible;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-border-light)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.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-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.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)}.row-header,.column-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-architectural-40);border-right:var(--ic-border-light);border-bottom:var(--ic-border-light)}.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-border-light) !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:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px);overflow:hidden;box-sizing:border-box;max-width:var(--column-max-width);min-width:var(--column-min-width)}.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-color:var(--ic-color-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.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-border-light)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading.show-background{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}.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-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,.row-header-alignment-right>ic-typography,.cell-alignment-center>ic-typography{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%}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}}";
16
17
 
17
18
  const DataTable = class {
18
19
  constructor(hostRef) {
19
20
  registerInstance(this, hostRef);
21
+ this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
22
+ this.icSortChange = createEvent(this, "icSortChange", 7);
23
+ this.DENSITY_HEIGHT_MULTIPLIER = {
24
+ dense: 0.8,
25
+ default: 1,
26
+ spacious: 1.2,
27
+ };
28
+ this.DENSITY_PADDING_HEIGHT_DIFF = {
29
+ dense: 8,
30
+ default: 16,
31
+ spacious: 20,
32
+ };
20
33
  this.SORT_ICONS = {
21
34
  unsorted: unsortedIcon,
22
35
  ascending: ascendingIcon,
23
36
  descending: descendingIcon,
24
37
  };
38
+ this.hasLoadedForOneSecond = true;
39
+ this.resizeObserver = null;
40
+ this.SHOW_HIDE_STRING = "show-hide";
41
+ this.SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;
42
+ this.TOOLTIP_STRING = "tooltip";
43
+ this.TOOLTIP = `ic-${this.TOOLTIP_STRING}`;
44
+ this.TEXT_WRAP_STRING = "text-wrap";
45
+ this.TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;
46
+ this.dataUpdated = false;
47
+ this.rowHeightSet = false;
48
+ this.initialLoad = false;
49
+ this.icPageChangeEvent = false;
50
+ this.itemsPerPageChange = false;
51
+ this.DATA_ROW_HEIGHT_STRING = "data-row-height";
52
+ this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
53
+ this.DEFAULT_LINE_HEIGHT = 24;
54
+ this.densityUpdate = false;
55
+ this.truncationPatternUpdated = false;
56
+ this.isNewDebounceDelaySet = false;
57
+ this.updateSetRowHeight = (typographyEl) => {
58
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
59
+ if (typographyEl) {
60
+ const cellContainer = this.getCellContainer(typographyEl);
61
+ const rowHeight = fontSize *
62
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
63
+ if (typographyEl.scrollHeight > rowHeight) {
64
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
65
+ }
66
+ }
67
+ else {
68
+ this.getTypographyElements().forEach((typographyEl) => {
69
+ const cellContainer = this.getCellContainer(typographyEl);
70
+ const rowHeight = fontSize *
71
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
72
+ if (typographyEl.scrollHeight > rowHeight) {
73
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
74
+ }
75
+ });
76
+ }
77
+ };
78
+ this.debounceDataTruncation = () => {
79
+ this.getTypographyElements().forEach((typographyEl) => {
80
+ const cellContainer = this.getCellContainer(typographyEl);
81
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
82
+ this.resizeObserver = new ResizeObserver(
83
+ // This gets triggered twice due to updated data and see more/see less button
84
+ dynamicDebounce(() => {
85
+ this.dataTruncation(typographyEl);
86
+ if (!this.isNewDebounceDelaySet) {
87
+ this.setNewDebounceDelay(200);
88
+ }
89
+ }, () => this.debounceDelay));
90
+ this.resizeObserver.observe(typographyEl);
91
+ }
92
+ });
93
+ };
94
+ this.setNewDebounceDelay = (delay) => {
95
+ this.debounceDelay = delay;
96
+ this.isNewDebounceDelaySet = true;
97
+ };
98
+ this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
99
+ this.truncate = (typographyEl, cellContainer, tooltip) => {
100
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
101
+ //24 is the height of a single line
102
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
103
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
104
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltip);
105
+ }
106
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
107
+ this.addShowHideTruncation(cellContainer, typographyEl);
108
+ }
109
+ }
110
+ }
111
+ else {
112
+ if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
113
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
114
+ cellContainer.appendChild(typographyEl);
115
+ tooltip.remove();
116
+ }
117
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
118
+ !isEmptyString(typographyEl.getAttribute("max-lines"))) {
119
+ this.resetShowHideTruncation(typographyEl);
120
+ }
121
+ }
122
+ };
123
+ this.dataTruncation = (typographyEl) => {
124
+ // Tooltip truncation mentioned in AC. Will need revisiting
125
+ const tooltip = this.getTooltip(typographyEl);
126
+ const cellContainer = this.getCellContainer(typographyEl);
127
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
128
+ this.dataUpdated) {
129
+ return;
130
+ }
131
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
132
+ typographyEl.shadowRoot.querySelector("button")) {
133
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
134
+ // If the see more/see less is present and the max lines is equal to the cell container
135
+ // remove the see more/see less button
136
+ if (showHideBtn) {
137
+ const truncWrapper = this.getTruncWrapper(typographyEl);
138
+ if (this.getLines(truncWrapper.scrollHeight) ===
139
+ +typographyEl.getAttribute("max-lines")) {
140
+ this.resetShowHideTruncation(typographyEl);
141
+ }
142
+ }
143
+ }
144
+ // Deals with setting and resetting row height and re-truncating data
145
+ if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {
146
+ const truncWrapper = this.getTruncWrapper(typographyEl);
147
+ // cellContainer.clientHeight - 24 removes the extra line by see more/see less
148
+ if (truncWrapper &&
149
+ cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
150
+ truncWrapper.scrollHeight) {
151
+ this.resetShowHideTruncation(typographyEl);
152
+ return;
153
+ }
154
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
155
+ this.addShowHideTruncation(cellContainer, typographyEl);
156
+ return;
157
+ }
158
+ }
159
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > 0 &&
160
+ (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > 0 &&
161
+ (typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) === (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
162
+ if (tooltip) {
163
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
164
+ }
165
+ return;
166
+ }
167
+ this.truncate(typographyEl, cellContainer, tooltip);
168
+ };
169
+ this.removeTextWrap = () => {
170
+ this.getTypographyElements().forEach((typographyEl) => {
171
+ const tableCell = typographyEl.closest("td");
172
+ if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
173
+ tableCell.classList.remove(this.TEXT_WRAP_STRING);
174
+ }
175
+ });
176
+ };
177
+ this.getCellContainer = (typographyEl) => {
178
+ return typographyEl.closest(".cell-container");
179
+ };
180
+ this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
181
+ array.forEach((val) => val.textWrap && delete val.textWrap);
182
+ this.startLoadingTimer = () => {
183
+ this.hasLoadedForOneSecond = false;
184
+ this.timerStarted = Date.now();
185
+ setTimeout(() => {
186
+ this.hasLoadedForOneSecond = true;
187
+ this.timerStarted = null;
188
+ }, this.minimumLoadingDisplayDuration);
189
+ };
25
190
  this.isObject = (value) => typeof value === "object";
26
191
  this.notDefaultDensity = () => this.density !== "default";
27
192
  this.getCellContent = (cell, dataType) => {
@@ -39,9 +204,60 @@ const DataTable = class {
39
204
  return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
40
205
  }
41
206
  };
42
- this.createCells = (row) => {
207
+ this.getCellOptions = (cell, key) => {
208
+ if (!(this.isObject(cell) && Object.keys(cell).includes(key)))
209
+ return;
210
+ return this.getObjectValue(cell, key);
211
+ };
212
+ this.createUpdatingIndicator = () => {
213
+ const { appearance, description, max, min, progress } = this.updatingOptions || {};
214
+ return (h("th", { colSpan: this.columns.length, class: "updating-state" }, h("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
215
+ };
216
+ this.setRowHeight = (height) => {
217
+ return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
218
+ this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
219
+ };
220
+ this.setTruncationClass = () => {
221
+ if (this.truncationPattern) {
222
+ return { [`truncation-${this.truncationPattern}`]: true };
223
+ }
224
+ return {};
225
+ };
226
+ this.getColumnWidth = (columnWidth) => {
227
+ // TODO: Setting max width on columns
228
+ let columnWidthStyling = {};
229
+ if (columnWidth) {
230
+ if (typeof columnWidth === "string") {
231
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-width"]: columnWidth });
232
+ }
233
+ if (typeof columnWidth === "object" && !!Object.keys(columnWidth)) {
234
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth) {
235
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-min-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth });
236
+ }
237
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth) {
238
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-max-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth });
239
+ }
240
+ }
241
+ }
242
+ return columnWidthStyling;
243
+ };
244
+ this.getRowHeight = (currentRowHeight, columnProps, rowTextWrap, cell) => {
245
+ if ((this.truncationPattern || currentRowHeight) &&
246
+ !(columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) &&
247
+ !rowTextWrap &&
248
+ !this.getCellOptions(cell, "textWrap") &&
249
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element") {
250
+ return {
251
+ [this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight),
252
+ };
253
+ }
254
+ return {};
255
+ };
256
+ this.createCells = (row, rowIndex) => {
257
+ var _a;
43
258
  const rowValues = Object.values(row);
44
259
  const rowKeys = Object.keys(row);
260
+ const rowOptions = this.getRowOptions(rowKeys, rowValues);
45
261
  let rowAlignment;
46
262
  let rowEmphasis;
47
263
  const headerIndex = rowKeys.indexOf("header");
@@ -49,44 +265,70 @@ const DataTable = class {
49
265
  rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
50
266
  rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
51
267
  }
268
+ const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index: rowIndex }));
269
+ const currentRowHeight = variableRowHeightVal
270
+ ? variableRowHeightVal !== "auto" && variableRowHeightVal
271
+ : this.globalRowHeight !== "auto" && this.globalRowHeight;
52
272
  return rowValues.map((cell, index) => {
53
- const { columnAlignment, dataType, emphasis } = this.columns[index];
273
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
274
+ const columnProps = this.columns[index];
275
+ const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
276
+ const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
54
277
  const cellValue = (key) => this.getObjectValue(cell, key);
55
- return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
56
- ["row-header"]: true,
57
- [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
58
- ["row-header-sticky"]: this.stickyRowHeaders,
59
- } }, cellValue("title"))) : (h("td", { innerHTML: dataType === "element" ? cell : null, class: {
60
- ["table-cell"]: true,
61
- [`table-density-${this.density}`]: this.notDefaultDensity(),
62
- [`data-type-${dataType}`]: true,
63
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
64
- this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
65
- !!this.getCellAlignment(cell, "horizontal"),
66
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
67
- rowAlignment ||
68
- this.getCellAlignment(cell, "vertical")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
69
- !!rowAlignment ||
70
- !!this.getCellAlignment(cell, "vertical"),
71
- } }, h("ic-typography", { variant: "body", class: {
72
- [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
73
- emphasis ||
74
- rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
75
- !!emphasis ||
76
- !!rowEmphasis,
77
- [`text-${this.density}`]: this.notDefaultDensity(),
78
- } }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType)))));
278
+ if (rowKeys[index] === "header") {
279
+ return (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
280
+ ["row-header"]: true,
281
+ [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
282
+ ["row-header-sticky"]: this.stickyRowHeaders,
283
+ } }, cellValue("title")));
284
+ }
285
+ if (rowKeys[index] !== "rowOptions") {
286
+ return (h("td", { class: {
287
+ ["table-cell"]: true,
288
+ [`table-density-${this.density}`]: this.notDefaultDensity(),
289
+ }, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
290
+ !isSlotUsed(this.el, cellSlotName)
291
+ ? cell
292
+ : null, class: 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) ||
293
+ ((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
294
+ rowAlignment ||
295
+ this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
296
+ !!((_d = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _d === void 0 ? void 0 : _d.vertical) ||
297
+ !!rowAlignment ||
298
+ !!this.getCellAlignment(cell, "vertical"), [`cell-alignment-${((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _e === void 0 ? void 0 : _e.horizontal) ||
299
+ ((_f = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _f === void 0 ? void 0 : _f.horizontal) ||
300
+ this.getCellAlignment(cell, "horizontal")}`]: !!((_g = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _g === void 0 ? void 0 : _g.horizontal) ||
301
+ !!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
302
+ !!this.getCellAlignment(cell, "horizontal"), [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true, [this.TEXT_WRAP_STRING]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) ||
303
+ (rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
304
+ !!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), 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
305
+ ? this.setRowHeight(currentRowHeight)
306
+ : null }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
307
+ !isSlotUsed(this.el, cellSlotName) && (h("ic-typography", { variant: "body", class: {
308
+ [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
309
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
310
+ rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
311
+ !!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
312
+ !!rowEmphasis,
313
+ [`text-${this.density}`]: this.notDefaultDensity(),
314
+ } }, this.isObject(cell) &&
315
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType)))))))));
316
+ }
79
317
  });
80
318
  };
81
319
  this.createColumnHeaders = () => {
82
- return this.columns.map(({ cellAlignment, colspan, key, title }) => (h("th", { scope: "col", class: {
320
+ return this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }) => (h("th", { scope: "col", class: {
83
321
  ["column-header"]: true,
84
- [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
85
322
  [`table-density-${this.density}`]: this.notDefaultDensity(),
86
- }, colSpan: colspan }, this.sortable ? (h("div", { class: "column-header-inner-container" }, h("ic-typography", { variant: "body", class: {
323
+ ["updating-state-headers"]: this.updating && !this.loading,
324
+ }, style: Object.assign({}, this.getColumnWidth(columnWidth)), colSpan: colspan }, h("div", { class: {
325
+ "column-header-inner-container": true,
326
+ [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
327
+ } }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
328
+ !icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), h("ic-typography", { variant: "body", class: {
87
329
  ["column-header-text"]: true,
88
330
  [`text-${this.density}`]: this.notDefaultDensity(),
89
- } }, title), h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
331
+ } }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
90
332
  // eslint-disable-next-line react/jsx-no-bind
91
333
  onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
92
334
  ? this.sortedColumnOrder
@@ -94,21 +336,41 @@ const DataTable = class {
94
336
  ["sort-button"]: true,
95
337
  ["sort-button-unsorted"]: this.sortedColumn !== key ||
96
338
  this.sortedColumnOrder === "unsorted",
97
- } }))) : (h("ic-typography", { variant: "body", class: {
98
- ["column-header-text"]: true,
99
- [`text-${this.density}`]: this.notDefaultDensity(),
100
- } }, title)))));
339
+ } }))))));
340
+ };
341
+ this.onRowClick = (row) => {
342
+ this.selectedRow =
343
+ this.selectedRow !== row && !this.loading && !this.updating && row;
101
344
  };
102
345
  this.createRows = () => {
103
346
  const data = this.showPagination
104
347
  ? this.data.slice(this.fromRow, this.toRow)
105
348
  : this.data.slice();
106
- return data
349
+ /**
350
+ * Ensures that createCells has a value in data to map over to actually render the slot.
351
+ * Removes the need for the user to add it multiple times.
352
+ * `addDataToPosition` used to add the element in the correct column order.
353
+ * Adding empty string value in to give `createCells` something to loop over.
354
+ */
355
+ const organisedData = data.map((row, rowIndex) => {
356
+ const slottedColumns = this.columns
357
+ .map(({ key }, index) => isSlotUsed(this.el, `${key}-${rowIndex}`) && { key, index })
358
+ .filter((col) => !!col);
359
+ return slottedColumns.length > 0
360
+ ? addDataToPosition(row, slottedColumns, "")
361
+ : row;
362
+ });
363
+ return organisedData
107
364
  .sort(!this.sortable ? undefined : this.getSortFunction())
108
- .map((row) => (h("tr", { onClick: () => (this.selectedRow = this.selectedRow !== row && row), class: {
109
- ["table-row"]: true,
110
- ["table-row-selected"]: this.selectedRow === row,
111
- } }, this.createCells(row))));
365
+ .map((row, index) => {
366
+ return (h("tr", {
367
+ // eslint-disable-next-line react/jsx-no-bind
368
+ onClick: () => this.onRowClick(row), class: {
369
+ ["table-row"]: true,
370
+ ["table-row-selected"]: this.selectedRow === row,
371
+ }
372
+ }, this.createCells(row, index)));
373
+ });
112
374
  };
113
375
  this.getObjectValue = (cell, key) => {
114
376
  return Object.values(cell)[Object.keys(cell).indexOf(key)];
@@ -168,10 +430,49 @@ const DataTable = class {
168
430
  }
169
431
  this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
170
432
  sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
433
+ this.tableSorted = true;
434
+ this.icSortChange.emit({
435
+ columnName: column,
436
+ sorted: this.sortedColumnOrder,
437
+ });
438
+ };
439
+ this.getTypographyElements = () => {
440
+ return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));
441
+ };
442
+ this.getTooltip = (typographyEl) => {
443
+ return typographyEl.closest(this.TOOLTIP);
444
+ };
445
+ this.updateTruncationTooltip = (removeTooltipOnly = false) => {
446
+ this.getTypographyElements().forEach((typographyEl) => {
447
+ const tooltip = this.getTooltip(typographyEl);
448
+ const cellContainer = this.getCellContainer(typographyEl);
449
+ if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
450
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
451
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
452
+ return;
453
+ }
454
+ this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
455
+ });
171
456
  };
172
457
  this.updateScrollOffset = () => {
173
458
  this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
174
459
  };
460
+ this.setTableDimensions = () => {
461
+ let tableHostDimensions = {};
462
+ if (this.width) {
463
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-width"]: this.width });
464
+ }
465
+ if (this.height) {
466
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-height"]: this.height });
467
+ }
468
+ if (this.maxWidth) {
469
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-max-width"]: this.maxWidth });
470
+ }
471
+ if (this.minWidth) {
472
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-min-width"]: this.minWidth });
473
+ }
474
+ return tableHostDimensions;
475
+ };
175
476
  this.fromRow = 0;
176
477
  this.previousRowsPerPage = undefined;
177
478
  this.rowsPerPage = undefined;
@@ -181,23 +482,36 @@ const DataTable = class {
181
482
  this.sortedColumn = undefined;
182
483
  this.sortedColumnOrder = undefined;
183
484
  this.toRow = undefined;
485
+ this.currentRowHeight = undefined;
486
+ this.debounceDelay = 0;
184
487
  this.caption = undefined;
185
488
  this.columns = undefined;
186
489
  this.data = undefined;
187
490
  this.density = "default";
188
491
  this.embedded = false;
492
+ this.globalRowHeight = "auto";
493
+ this.height = undefined;
189
494
  this.hideColumnHeaders = false;
190
- this.paginationOptions = {
191
- itemsPerPage: [
495
+ this.loading = false;
496
+ this.loadingOptions = undefined;
497
+ this.maxWidth = undefined;
498
+ this.minWidth = undefined;
499
+ this.minimumLoadingDisplayDuration = 1000;
500
+ this.paginationBarOptions = {
501
+ itemsPerPageOptions: [
192
502
  { label: "10", value: "10" },
193
503
  { label: "25", value: "25" },
194
504
  { label: "50", value: "50" },
195
505
  ],
196
- type: "page",
197
- control: "simple",
198
- itemsPerPageControl: true,
199
- goToPageControl: true,
506
+ rangeLabelType: "page",
507
+ type: "simple",
508
+ showItemsPerPageControl: true,
509
+ showGoToPageControl: true,
200
510
  alignment: "right",
511
+ appearance: "default",
512
+ itemLabel: "Item",
513
+ pageLabel: "Page",
514
+ hideRangeLabel: false,
201
515
  };
202
516
  this.showPagination = false;
203
517
  this.sortable = false;
@@ -207,58 +521,484 @@ const DataTable = class {
207
521
  };
208
522
  this.stickyColumnHeaders = false;
209
523
  this.stickyRowHeaders = false;
524
+ this.tableLayout = "fixed";
525
+ this.truncationPattern = undefined;
526
+ this.updating = false;
527
+ this.updatingOptions = undefined;
528
+ this.variableRowHeight = undefined;
529
+ this.width = undefined;
530
+ }
531
+ disconnectedCallback() {
532
+ var _a;
533
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
210
534
  }
211
535
  componentWillLoad() {
212
- this.rowsPerPage = Number(this.paginationOptions.itemsPerPage[0].value);
536
+ var _a;
537
+ this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
213
538
  this.previousRowsPerPage = this.rowsPerPage;
214
539
  this.toRow = this.rowsPerPage;
215
540
  this.sortedColumn = this.sortOptions.defaultColumn;
216
541
  this.sortedColumnOrder = this.sortOptions.sortOrders[0];
542
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
543
+ this.initialLoad = true;
544
+ this.previousItemsPerPage = this.rowsPerPage;
217
545
  }
218
546
  componentDidLoad() {
219
547
  const tableElement = this.el.shadowRoot.querySelector("table");
220
548
  const tableContainer = this.el.shadowRoot.querySelector(".table-container");
549
+ if (this.dataUpdated) {
550
+ this.dataUpdated = false;
551
+ }
221
552
  if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
222
553
  (tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
223
554
  this.scrollable = true;
224
555
  }
556
+ if (this.loading) {
557
+ this.startLoadingTimer();
558
+ this.showLoadingIndicator();
559
+ }
560
+ if (this.truncationPattern) {
561
+ this.getTypographyElements().forEach((typographyEl) => {
562
+ const cellContainer = this.getCellContainer(typographyEl);
563
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
564
+ this.dataTruncation(typographyEl);
565
+ }
566
+ });
567
+ this.debounceDataTruncation();
568
+ }
569
+ if (this.globalRowHeight !== "auto") {
570
+ this.updateSetRowHeight();
571
+ }
225
572
  }
226
- handleItemsPerPageChange(ev) {
227
- this.previousRowsPerPage = this.rowsPerPage;
228
- this.rowsPerPage = ev.detail.value;
573
+ componentDidUpdate() {
574
+ // truncation updates invoked here once new/updated data has
575
+ // rendered to take into account updated .cell-container/ic-typography box model updates.
576
+ if (this.truncationPattern === this.SHOW_HIDE_STRING ||
577
+ this.truncationPattern === this.TOOLTIP_STRING) {
578
+ this.truncateUpdatedData();
579
+ }
229
580
  }
230
- handlePageChange(ev) {
231
- this.fromRow = (ev.detail.value - 1) * this.rowsPerPage;
232
- this.toRow = this.fromRow + this.rowsPerPage;
233
- const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
234
- if (this.previousRowsPerPage === this.rowsPerPage) {
235
- tableRowsContainer.scrollTop = 0;
581
+ truncateUpdatedData() {
582
+ if (this.dataUpdated) {
583
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
584
+ this.getTypographyElements().forEach((typographyEl) => {
585
+ const truncWrapper = this.getTruncWrapper(typographyEl);
586
+ const cellContainer = this.getCellContainer(typographyEl);
587
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >=
588
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
589
+ this.resetShowHideTruncation(typographyEl);
590
+ return;
591
+ }
592
+ setTimeout(() => {
593
+ // slight delay due to data rendering
594
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
595
+ this.addShowHideTruncation(cellContainer, typographyEl);
596
+ }
597
+ }, 150);
598
+ });
599
+ }
600
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
601
+ this.updateTruncationTooltip();
602
+ }
603
+ this.dataUpdated = false;
236
604
  }
237
- else if (this.previousRowsPerPage < this.rowsPerPage) {
238
- tableRowsContainer.scrollTop = this.scrollOffset;
239
- this.previousRowsPerPage = this.rowsPerPage;
605
+ if (this.tableSorted) {
606
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
607
+ this.updateTruncationTooltip();
608
+ }
609
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
610
+ this.getTypographyElements().forEach((typographyEl) => {
611
+ const cellContainer = this.getCellContainer(typographyEl);
612
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
613
+ this.createShowHideTruncation(typographyEl, cellContainer);
614
+ }
615
+ else {
616
+ typographyEl.resetTruncation().then(() => {
617
+ cellContainer.removeAttribute("style");
618
+ });
619
+ }
620
+ });
621
+ }
622
+ this.tableSorted = false;
240
623
  }
241
- else {
624
+ // This function recalculates the tooltip truncation when the rowHeight has been set.
625
+ // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
626
+ if (this.rowHeightSet) {
627
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
628
+ const hasAutoRowHeight = this.globalRowHeight === "auto";
629
+ this.getTypographyElements().forEach((typographyEl) => {
630
+ var _a;
631
+ const cellContainer = this.getCellContainer(typographyEl);
632
+ const tooltipEl = this.getTooltip(typographyEl);
633
+ if (hasAutoRowHeight) {
634
+ cellContainer.style.height = null;
635
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
636
+ this.removeTooltip(cellContainer, typographyEl, tooltipEl);
637
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
638
+ }
639
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
640
+ this.resetShowHideTruncation(typographyEl);
641
+ }
642
+ return;
643
+ }
644
+ const rowHeight = fontSize *
645
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
646
+ // If the set row height is bigger than the cell container even
647
+ // with textWrap, set the row height
648
+ if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
649
+ rowHeight > cellContainer.clientHeight &&
650
+ !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
651
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
652
+ }
653
+ if (this.truncationPattern) {
654
+ // If the set row height is bigger than the typography truncation wrapper
655
+ // scroll height, remove see more / see less button
656
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
657
+ const truncWrapper = this.getTruncWrapper(typographyEl);
658
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
659
+ if (showHideBtn &&
660
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
661
+ this.resetShowHideTruncation(typographyEl);
662
+ return;
663
+ }
664
+ }
665
+ this.truncate(typographyEl, cellContainer, tooltipEl);
666
+ }
667
+ else {
668
+ this.updateSetRowHeight(typographyEl);
669
+ }
670
+ });
671
+ this.rowHeightSet = false;
672
+ }
673
+ // Only run truncation on the new rows
674
+ // when the number of items per page has increased
675
+ if (this.itemsPerPageChange) {
676
+ const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
677
+ if (this.rowsPerPage > this.previousItemsPerPage) {
678
+ const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
679
+ newRows.forEach((row) => {
680
+ row
681
+ .querySelectorAll("ic-typography")
682
+ .forEach((typographyEl) => {
683
+ const cellContainer = this.getCellContainer(typographyEl);
684
+ const tooltipEl = this.getTooltip(typographyEl);
685
+ this.truncate(typographyEl, cellContainer, tooltipEl);
686
+ });
687
+ });
688
+ }
689
+ this.previousItemsPerPage = this.rowsPerPage;
690
+ this.itemsPerPageChange = false;
691
+ }
692
+ if (!this.initialLoad && this.icPageChangeEvent) {
693
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
694
+ this.updateTruncationTooltip();
695
+ }
696
+ // set truncation to see more if opened and next/previous page is pressed
697
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
698
+ this.getTypographyElements().forEach((typographyEl) => {
699
+ const cellContainer = this.getCellContainer(typographyEl);
700
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
701
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
702
+ !showHideBtn) {
703
+ this.addShowHideTruncation(cellContainer, typographyEl);
704
+ }
705
+ });
706
+ }
707
+ this.icPageChangeEvent = false;
708
+ }
709
+ if (this.densityUpdate) {
710
+ this.getTypographyElements().forEach((typographyEl) => {
711
+ const cellContainer = this.getCellContainer(typographyEl);
712
+ const tooltipEl = this.getTooltip(typographyEl);
713
+ this.truncate(typographyEl, cellContainer, tooltipEl);
714
+ });
715
+ this.densityUpdate = false;
716
+ }
717
+ if (this.truncationPatternUpdated) {
718
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
719
+ this.getTypographyElements().forEach((typographyEl) => {
720
+ const cellContainer = this.getCellContainer(typographyEl);
721
+ const tooltipEl = this.getTooltip(typographyEl);
722
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
723
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);
724
+ }
725
+ });
726
+ }
727
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
728
+ this.getTypographyElements().forEach((typographyEl) => {
729
+ const truncWrapper = this.getTruncWrapper(typographyEl);
730
+ const cellContainer = this.getCellContainer(typographyEl);
731
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
732
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
733
+ this.resetShowHideTruncation(typographyEl);
734
+ return;
735
+ }
736
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
737
+ this.addShowHideTruncation(cellContainer, typographyEl);
738
+ }
739
+ });
740
+ }
741
+ }
742
+ }
743
+ createShowHideTruncation(typographyEl, cellContainer) {
744
+ typographyEl.checkMaxLines(typographyEl.scrollHeight);
745
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
746
+ typographyEl.setShowHideExpanded(false);
747
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
748
+ }
749
+ addTooltipTruncation(typographyEl, cellContainer, tooltip) {
750
+ this.addLineClampCSS(typographyEl, cellContainer);
751
+ if (!tooltip) {
752
+ this.createTruncationTooltip(typographyEl, cellContainer);
753
+ }
754
+ }
755
+ addShowHideTruncation(cellContainer, typographyEl) {
756
+ cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
757
+ this.createShowHideTruncation(typographyEl, cellContainer);
758
+ }
759
+ getTruncWrapper(typographyEl) {
760
+ return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
761
+ }
762
+ // Set the height to initial if row height is set and the show / hide truncation
763
+ // is clicked
764
+ handleTypographyTruncationExpandToggle({ detail, }) {
765
+ const { expanded, typographyEl } = detail;
766
+ const cellContainer = this.getCellContainer(typographyEl);
767
+ if (cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&
768
+ expanded) {
769
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, "inherit");
770
+ }
771
+ }
772
+ handlePageChange({ detail, target }) {
773
+ if (target.parentElement !== this.el) {
774
+ this.fromRow = (detail.value - 1) * this.rowsPerPage;
775
+ this.toRow = this.fromRow + this.rowsPerPage;
776
+ const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
777
+ if (this.previousRowsPerPage === this.rowsPerPage) {
778
+ tableRowsContainer.scrollTop = 0;
779
+ }
780
+ else if (this.previousRowsPerPage < this.rowsPerPage) {
781
+ tableRowsContainer.scrollTop = this.scrollOffset;
782
+ this.previousRowsPerPage = this.rowsPerPage;
783
+ }
784
+ else {
785
+ this.previousRowsPerPage = this.rowsPerPage;
786
+ }
787
+ }
788
+ if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
789
+ // This is to prevent icPageChange from triggering truncation on first load
790
+ this.icPageChangeEvent = true;
791
+ }
792
+ this.previousPaginationPage = detail.value;
793
+ this.initialLoad = false;
794
+ }
795
+ handleItemsPerPageChange({ detail, target, }) {
796
+ if (target.parentElement !== this.el) {
242
797
  this.previousRowsPerPage = this.rowsPerPage;
798
+ this.rowsPerPage = detail.value;
243
799
  }
800
+ this.itemsPerPageChange = true;
801
+ }
802
+ handleDensityChange(ev) {
803
+ this.density = ev.detail.value;
244
804
  }
245
805
  clickListener(ev) {
246
806
  if (ev.target !== this.el)
247
807
  this.selectedRow = undefined;
248
808
  }
809
+ loadingHandler(newValue) {
810
+ if (newValue)
811
+ this.startLoadingTimer();
812
+ if (this.loading) {
813
+ setTimeout(() => {
814
+ this.showLoadingIndicator();
815
+ }, 500);
816
+ }
817
+ }
818
+ truncationPatternHandler(newValue) {
819
+ if (newValue === this.TOOLTIP_STRING) {
820
+ this.resetShowHideTruncation();
821
+ this.updateTruncationTooltip(true);
822
+ // Not using debounceDataTruncation here due to resizeObserver not being triggered
823
+ this.getTypographyElements().forEach((typographyEl) => {
824
+ const cellContainer = this.getCellContainer(typographyEl);
825
+ const tooltip = this.getTooltip(typographyEl);
826
+ this.truncate(typographyEl, cellContainer, tooltip);
827
+ });
828
+ }
829
+ if (newValue === this.SHOW_HIDE_STRING) {
830
+ // ResizeObserver is trigger here due to the see more/see less links being removed.
831
+ // The resizeObserver will also apply the tooltip where relevant
832
+ this.updateTruncationTooltip(true);
833
+ this.getTypographyElements().forEach((typographyEl) => {
834
+ const truncWrapper = this.getTruncWrapper(typographyEl);
835
+ const cellContainer = this.getCellContainer(typographyEl);
836
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
837
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
838
+ this.resetShowHideTruncation(typographyEl);
839
+ return;
840
+ }
841
+ setTimeout(() => {
842
+ // slight delay due to data rendering
843
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
844
+ this.addShowHideTruncation(cellContainer, typographyEl);
845
+ }
846
+ }, 150);
847
+ });
848
+ }
849
+ this.truncationPatternUpdated = true;
850
+ }
851
+ async dataHandler(newData) {
852
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
853
+ if (this.loading) {
854
+ !this.hasLoadedForOneSecond
855
+ ? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
856
+ (Date.now() - this.timerStarted))
857
+ : (this.loading = false);
858
+ }
859
+ if (this.updating)
860
+ this.updating = false;
861
+ this.dataUpdated = true;
862
+ }
863
+ async densityHandler() {
864
+ this.densityUpdate = true;
865
+ }
866
+ resetShowHideTruncation(typographyEl) {
867
+ if (typographyEl) {
868
+ const truncWrapper = this.getTruncWrapper(typographyEl);
869
+ const cellContainer = this.getCellContainer(typographyEl);
870
+ if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
871
+ !isEmptyString(typographyEl.getAttribute("max-lines")) &&
872
+ Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
873
+ +typographyEl.getAttribute("max-lines")) {
874
+ typographyEl.checkMaxLines(truncWrapper.scrollHeight);
875
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
876
+ typographyEl.setShowHideExpanded(false);
877
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
878
+ }
879
+ else {
880
+ typographyEl.resetTruncation().then(() => {
881
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
882
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
883
+ }
884
+ });
885
+ }
886
+ }
887
+ else {
888
+ this.getTypographyElements().forEach((typographyEl) => {
889
+ const cellContainer = this.getCellContainer(typographyEl);
890
+ typographyEl.resetTruncation().then(() => {
891
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
892
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
893
+ }
894
+ });
895
+ });
896
+ }
897
+ }
898
+ rowHeightChangeHandler(newValue, oldValue) {
899
+ if (+newValue !== +oldValue) {
900
+ this.deleteTextWrapDataKey(this.data);
901
+ this.deleteTextWrapDataKey(this.columns);
902
+ this.removeTextWrap();
903
+ this.icRowHeightChange.emit();
904
+ this.rowHeightSet = true;
905
+ }
906
+ }
907
+ /**
908
+ * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.
909
+ */
910
+ async resetRowHeights(rowHeight) {
911
+ this.globalRowHeight = rowHeight || "auto";
912
+ this.variableRowHeight = null;
913
+ }
914
+ showLoadingIndicator() {
915
+ this.loadingIndicator.classList.add("show");
916
+ }
917
+ getRowOptions(rowKeys, rowValues) {
918
+ const rowOptionsIndex = rowKeys.indexOf("rowOptions");
919
+ return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];
920
+ }
921
+ regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly) {
922
+ // When sorting the table, instead of regenerating the tooltip,
923
+ // the tooltip details are updated
924
+ if (tooltip) {
925
+ if (this.tableSorted) {
926
+ tooltip.setAttribute("target", typographyEl.id);
927
+ tooltip.setAttribute("label", typographyEl.textContent);
928
+ }
929
+ else {
930
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
931
+ }
932
+ if (removeTooltipOnly) {
933
+ return;
934
+ }
935
+ }
936
+ // This add line clamp to data only when
937
+ // the data object has been updated
938
+ if (!typographyEl.getAttribute("style") && this.dataUpdated) {
939
+ this.addLineClampCSS(typographyEl, cellContainer);
940
+ }
941
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
942
+ this.truncationPattern === this.TOOLTIP_STRING) {
943
+ if (!typographyEl.getAttribute("style") ||
944
+ typographyEl.style.cssText.includes("--ic-line-clamp: 0;")) {
945
+ this.addLineClampCSS(typographyEl, cellContainer);
946
+ }
947
+ this.createTruncationTooltip(typographyEl, cellContainer);
948
+ }
949
+ }
950
+ removeTooltip(cellContainer, typographyEl, tooltip) {
951
+ cellContainer.appendChild(typographyEl);
952
+ if (tooltip) {
953
+ tooltip.remove();
954
+ }
955
+ }
956
+ addLineClampCSS(typographyEl, cellContainer) {
957
+ typographyEl.setAttribute("style", `--ic-line-clamp: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
958
+ }
959
+ createTruncationTooltip(typographyEl, cellContainer) {
960
+ const tooltipEl = document.createElement("ic-tooltip");
961
+ tooltipEl.setAttribute("target", typographyEl.id);
962
+ tooltipEl.setAttribute("label", typographyEl.textContent);
963
+ tooltipEl.classList.add("ic-tooltip-overflow");
964
+ tooltipEl.setExternalPopperProps({
965
+ // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
966
+ strategy: "fixed",
967
+ });
968
+ cellContainer.appendChild(tooltipEl);
969
+ tooltipEl.appendChild(typographyEl);
970
+ }
249
971
  render() {
250
- const { caption, createColumnHeaders, createRows, data, hideColumnHeaders, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, } = this;
251
- return (h("div", { class: "table-container" }, h("div", { class: {
972
+ const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
973
+ return (h(Host, { style: Object.assign({}, this.setTableDimensions()) }, h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
252
974
  ["table-row-container"]: true,
253
975
  scrollable,
254
- }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
976
+ }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("table", { style: {
977
+ ["--table-layout"]: this.tableLayout,
978
+ } }, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
255
979
  ["column-header-sticky"]: stickyColumnHeaders,
256
980
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
257
- } }, h("tr", null, createColumnHeaders()))), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows()))), showPagination && (h("div", { class: "pagination-container" }, h("ic-pagination-bar", { totalItems: data.length, paginationType: paginationOptions.type, paginationControl: paginationOptions.control, showItemsPerPageControl: paginationOptions.itemsPerPageControl, showGoToPageControl: paginationOptions.goToPageControl, itemsPerPageOptions: paginationOptions.itemsPerPage, alignment: paginationOptions.alignment }))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
981
+ } }, h("tr", null, createColumnHeaders()))), updating &&
982
+ !loading &&
983
+ (hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && !loading && h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
984
+ !loading &&
985
+ (isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
986
+ "loading-empty": loading,
987
+ loading: true,
988
+ "show-background": loadingOptions.showBackground,
989
+ }, 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) })), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: data.length, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, appearance: paginationBarOptions.appearance, itemLabel: paginationBarOptions.itemLabel, pageLabel: paginationBarOptions.pageLabel, hideRangeLabel: paginationBarOptions.hideRangeLabel })))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
258
990
  ? `${sortedColumn} sorted ${sortedColumnOrder}`
259
- : "table unsorted"))));
991
+ : "table unsorted")))));
260
992
  }
261
993
  get el() { return getElement(this); }
994
+ static get watchers() { return {
995
+ "loading": ["loadingHandler"],
996
+ "truncationPattern": ["truncationPatternHandler"],
997
+ "data": ["dataHandler"],
998
+ "density": ["densityHandler"],
999
+ "globalRowHeight": ["rowHeightChangeHandler"],
1000
+ "variableRowHeight": ["rowHeightChangeHandler"]
1001
+ }; }
262
1002
  };
263
1003
  DataTable.style = icDataTableCss;
264
1004