@ukic/canary-web-components 2.0.0-canary.21 → 2.0.0-canary.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (706) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-081d6031.js → helpers-093368be.js} +3 -1
  3. package/dist/cjs/helpers-093368be.js.map +1 -0
  4. package/dist/cjs/{helpers-261701cd.js → helpers-85c5ca15.js} +14 -1
  5. package/dist/cjs/helpers-85c5ca15.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +8 -8
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +4 -4
  9. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-alert.cjs.entry.js +1 -3
  11. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +12 -15
  13. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-badge.cjs.entry.js +15 -27
  15. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +4 -4
  17. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-breadcrumb.cjs.entry.js +3 -3
  19. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-button_3.cjs.entry.js +27 -22
  21. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
  23. package/dist/cjs/{ic-card.cjs.entry.js → ic-card-vertical.cjs.entry.js} +6 -6
  24. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -0
  25. package/dist/cjs/ic-checkbox-group.cjs.entry.js +6 -5
  26. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-checkbox.cjs.entry.js +6 -15
  28. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-chip.cjs.entry.js +9 -10
  30. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-classification-banner.cjs.entry.js +2 -2
  32. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-data-list.cjs.entry.js +28 -0
  34. package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -0
  35. package/dist/cjs/ic-data-row.cjs.entry.js +9 -10
  36. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +2 -2
  38. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-data-table.cjs.entry.js +526 -71
  40. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-date-input.cjs.entry.js +4 -3
  42. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-date-picker.cjs.entry.js +7 -3
  44. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-dialog.cjs.entry.js +12 -97
  46. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-empty-state_2.cjs.entry.js +8 -8
  49. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-footer-link-group.cjs.entry.js +9 -9
  51. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-footer-link.cjs.entry.js +6 -7
  53. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-footer.cjs.entry.js +8 -8
  55. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-hero.cjs.entry.js +8 -9
  57. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
  59. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +21 -25
  61. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-link.cjs.entry.js +6 -7
  63. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-menu-item.cjs.entry.js +3 -3
  66. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +9 -11
  68. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-menu.cjs.entry.js +8 -10
  70. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  72. package/dist/cjs/ic-navigation-group.cjs.entry.js +9 -9
  73. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-navigation-item.cjs.entry.js +5 -5
  75. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-navigation-menu.cjs.entry.js +2 -2
  77. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-page-header.cjs.entry.js +7 -8
  79. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-pagination_4.cjs.entry.js +95 -101
  81. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-popover-menu.cjs.entry.js +3 -3
  83. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-radio-group.cjs.entry.js +40 -25
  85. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -18
  87. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-search-bar.cjs.entry.js +18 -24
  89. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-select-with-multi.cjs.entry.js +13 -21
  91. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
  92. package/dist/cjs/ic-side-navigation.cjs.entry.js +7 -7
  93. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-skeleton.cjs.entry.js +4 -5
  95. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  96. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -11
  97. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-step.cjs.entry.js +40 -43
  99. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-stepper.cjs.entry.js +16 -16
  101. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-switch.cjs.entry.js +5 -6
  103. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-tab-context.cjs.entry.js +0 -11
  105. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  106. package/dist/cjs/ic-tab-group.cjs.entry.js +4 -5
  107. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  108. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -8
  109. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  110. package/dist/cjs/ic-tab.cjs.entry.js +4 -4
  111. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  112. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  113. package/dist/cjs/ic-toast-region.cjs.entry.js +0 -7
  114. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  115. package/dist/cjs/ic-toast.cjs.entry.js +83 -35
  116. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  117. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +16 -16
  118. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  119. package/dist/cjs/ic-toggle-button.cjs.entry.js +13 -13
  120. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  121. package/dist/cjs/ic-top-navigation.cjs.entry.js +4 -4
  122. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  123. package/dist/cjs/ic-tree-item.cjs.entry.js +241 -0
  124. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
  125. package/dist/cjs/ic-tree-view.cjs.entry.js +203 -0
  126. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
  127. package/dist/cjs/ic-typography.cjs.entry.js +51 -16
  128. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  129. package/dist/cjs/index-4cf27b16.js +16 -8
  130. package/dist/cjs/loader.cjs.js +1 -1
  131. package/dist/collection/assets/arrow-dropdown.svg +3 -0
  132. package/dist/collection/collection-manifest.json +5 -3
  133. package/dist/collection/components/ic-data-table/ic-data-table.css +55 -5
  134. package/dist/collection/components/ic-data-table/ic-data-table.js +570 -77
  135. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  136. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  137. package/dist/collection/components/ic-data-table/story-data.js +364 -21
  138. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  139. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +1 -1
  140. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  141. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +1 -1
  142. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -1
  143. package/dist/collection/components/ic-date-input/ic-date-input.js +21 -2
  144. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  145. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +7 -0
  146. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
  147. package/dist/collection/components/ic-date-picker/ic-date-picker.css +24 -24
  148. package/dist/collection/components/ic-date-picker/ic-date-picker.js +23 -1
  149. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  150. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +11 -11
  151. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +7 -30
  152. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
  153. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +1 -1
  154. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
  155. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +1 -1
  156. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  157. package/dist/collection/components/ic-select-with-multi/ic-select.css +14 -12
  158. package/dist/collection/components/ic-select-with-multi/ic-select.js +13 -142
  159. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
  160. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +1 -1
  161. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +1 -1
  162. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +6 -6
  163. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -1
  164. package/dist/collection/components/ic-tree-item/ic-tree-item.css +150 -0
  165. package/dist/collection/components/ic-tree-item/ic-tree-item.js +592 -0
  166. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
  167. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +114 -0
  168. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
  169. package/dist/collection/components/ic-tree-view/ic-tree-view.css +56 -0
  170. package/dist/collection/components/ic-tree-view/ic-tree-view.js +296 -0
  171. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
  172. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
  173. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
  174. package/dist/collection/utils/types.js.map +1 -1
  175. package/dist/components/helpers.js +2 -1
  176. package/dist/components/helpers.js.map +1 -1
  177. package/dist/components/helpers2.js +11 -1
  178. package/dist/components/helpers2.js.map +1 -1
  179. package/dist/components/ic-accordion-group.js +8 -8
  180. package/dist/components/ic-accordion-group.js.map +1 -1
  181. package/dist/components/ic-accordion.js +3 -3
  182. package/dist/components/ic-accordion.js.map +1 -1
  183. package/dist/components/ic-alert.js +127 -1
  184. package/dist/components/ic-alert.js.map +1 -1
  185. package/dist/components/ic-back-to-top.js +25 -16
  186. package/dist/components/ic-back-to-top.js.map +1 -1
  187. package/dist/components/ic-badge.js +17 -31
  188. package/dist/components/ic-badge.js.map +1 -1
  189. package/dist/components/ic-breadcrumb-group.js +4 -4
  190. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  191. package/dist/components/ic-breadcrumb2.js +3 -3
  192. package/dist/components/ic-breadcrumb2.js.map +1 -1
  193. package/dist/components/ic-button2.js +10 -10
  194. package/dist/components/ic-button2.js.map +1 -1
  195. package/dist/components/{ic-card.js → ic-card-vertical.js} +11 -11
  196. package/dist/components/ic-card-vertical.js.map +1 -0
  197. package/dist/components/ic-checkbox-group.js +6 -6
  198. package/dist/components/ic-checkbox-group.js.map +1 -1
  199. package/dist/components/ic-checkbox.js +6 -21
  200. package/dist/components/ic-checkbox.js.map +1 -1
  201. package/dist/components/ic-chip.js +9 -11
  202. package/dist/components/ic-chip.js.map +1 -1
  203. package/dist/components/ic-classification-banner.js +2 -2
  204. package/dist/components/ic-classification-banner.js.map +1 -1
  205. package/dist/components/ic-data-list.js +51 -0
  206. package/dist/components/ic-data-list.js.map +1 -0
  207. package/dist/components/ic-data-row.js +10 -12
  208. package/dist/components/ic-data-row.js.map +1 -1
  209. package/dist/components/ic-data-table-title-bar.js +1 -1
  210. package/dist/components/ic-data-table-title-bar.js.map +1 -1
  211. package/dist/components/ic-data-table.js +531 -72
  212. package/dist/components/ic-data-table.js.map +1 -1
  213. package/dist/components/ic-date-input2.js +5 -3
  214. package/dist/components/ic-date-input2.js.map +1 -1
  215. package/dist/components/ic-date-picker.js +8 -3
  216. package/dist/components/ic-date-picker.js.map +1 -1
  217. package/dist/components/ic-dialog.js +14 -112
  218. package/dist/components/ic-dialog.js.map +1 -1
  219. package/dist/components/ic-divider2.js +1 -1
  220. package/dist/components/ic-empty-state2.js +7 -7
  221. package/dist/components/ic-empty-state2.js.map +1 -1
  222. package/dist/components/ic-footer-link-group.js +10 -10
  223. package/dist/components/ic-footer-link-group.js.map +1 -1
  224. package/dist/components/ic-footer-link.js +13 -8
  225. package/dist/components/ic-footer-link.js.map +1 -1
  226. package/dist/components/ic-footer.js +8 -8
  227. package/dist/components/ic-footer.js.map +1 -1
  228. package/dist/components/ic-hero.js +8 -10
  229. package/dist/components/ic-hero.js.map +1 -1
  230. package/dist/components/ic-horizontal-scroll2.js +5 -5
  231. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  232. package/dist/components/ic-input-component-container2.js +11 -16
  233. package/dist/components/ic-input-component-container2.js.map +1 -1
  234. package/dist/components/ic-input-label2.js +10 -12
  235. package/dist/components/ic-input-label2.js.map +1 -1
  236. package/dist/components/ic-input-validation2.js +4 -4
  237. package/dist/components/ic-input-validation2.js.map +1 -1
  238. package/dist/components/ic-link2.js +6 -8
  239. package/dist/components/ic-link2.js.map +1 -1
  240. package/dist/components/ic-loading-indicator2.js +9 -9
  241. package/dist/components/ic-loading-indicator2.js.map +1 -1
  242. package/dist/components/ic-menu-group.js +1 -1
  243. package/dist/components/ic-menu-item2.js +3 -3
  244. package/dist/components/ic-menu-item2.js.map +1 -1
  245. package/dist/components/ic-menu2.js +7 -10
  246. package/dist/components/ic-menu2.js.map +1 -1
  247. package/dist/components/ic-menu3.js +9 -12
  248. package/dist/components/ic-menu3.js.map +1 -1
  249. package/dist/components/ic-navigation-button.js +1 -1
  250. package/dist/components/ic-navigation-group.js +9 -9
  251. package/dist/components/ic-navigation-group.js.map +1 -1
  252. package/dist/components/ic-navigation-item.js +5 -5
  253. package/dist/components/ic-navigation-item.js.map +1 -1
  254. package/dist/components/ic-navigation-menu2.js +2 -2
  255. package/dist/components/ic-navigation-menu2.js.map +1 -1
  256. package/dist/components/ic-page-header.js +7 -9
  257. package/dist/components/ic-page-header.js.map +1 -1
  258. package/dist/components/ic-pagination-bar2.js +2 -2
  259. package/dist/components/ic-pagination-bar2.js.map +1 -1
  260. package/dist/components/ic-pagination-item2.js +1 -1
  261. package/dist/components/ic-pagination2.js +38 -36
  262. package/dist/components/ic-pagination2.js.map +1 -1
  263. package/dist/components/ic-popover-menu.js +3 -3
  264. package/dist/components/ic-popover-menu.js.map +1 -1
  265. package/dist/components/ic-radio-group.js +41 -26
  266. package/dist/components/ic-radio-group.js.map +1 -1
  267. package/dist/components/ic-radio-option.js +6 -25
  268. package/dist/components/ic-radio-option.js.map +1 -1
  269. package/dist/components/ic-search-bar.js +20 -27
  270. package/dist/components/ic-search-bar.js.map +1 -1
  271. package/dist/components/ic-select-with-multi.js +14 -29
  272. package/dist/components/ic-select-with-multi.js.map +1 -1
  273. package/dist/components/ic-select2.js +14 -29
  274. package/dist/components/ic-select2.js.map +1 -1
  275. package/dist/components/ic-side-navigation.js +7 -7
  276. package/dist/components/ic-side-navigation.js.map +1 -1
  277. package/dist/components/ic-skeleton.js +4 -6
  278. package/dist/components/ic-skeleton.js.map +1 -1
  279. package/dist/components/ic-status-tag.js +1 -12
  280. package/dist/components/ic-status-tag.js.map +1 -1
  281. package/dist/components/ic-step.js +46 -49
  282. package/dist/components/ic-step.js.map +1 -1
  283. package/dist/components/ic-stepper.js +16 -16
  284. package/dist/components/ic-stepper.js.map +1 -1
  285. package/dist/components/ic-switch.js +5 -7
  286. package/dist/components/ic-switch.js.map +1 -1
  287. package/dist/components/ic-tab-context.js +0 -11
  288. package/dist/components/ic-tab-context.js.map +1 -1
  289. package/dist/components/ic-tab-group.js +3 -5
  290. package/dist/components/ic-tab-group.js.map +1 -1
  291. package/dist/components/ic-tab-panel.js +1 -9
  292. package/dist/components/ic-tab-panel.js.map +1 -1
  293. package/dist/components/ic-tab.js +3 -3
  294. package/dist/components/ic-tab.js.map +1 -1
  295. package/dist/components/ic-text-field2.js +51 -53
  296. package/dist/components/ic-text-field2.js.map +1 -1
  297. package/dist/components/ic-theme.js +1 -1
  298. package/dist/components/ic-toast-region.js +1 -9
  299. package/dist/components/ic-toast-region.js.map +1 -1
  300. package/dist/components/ic-toast.js +86 -36
  301. package/dist/components/ic-toast.js.map +1 -1
  302. package/dist/components/ic-toggle-button-group.js +16 -16
  303. package/dist/components/ic-toggle-button-group.js.map +1 -1
  304. package/dist/components/ic-toggle-button.js +13 -13
  305. package/dist/components/ic-toggle-button.js.map +1 -1
  306. package/dist/components/ic-tooltip2.js +12 -5
  307. package/dist/components/ic-tooltip2.js.map +1 -1
  308. package/dist/components/ic-top-navigation.js +4 -4
  309. package/dist/components/ic-top-navigation.js.map +1 -1
  310. package/dist/components/ic-tree-item.d.ts +11 -0
  311. package/dist/components/ic-tree-item.js +286 -0
  312. package/dist/components/ic-tree-item.js.map +1 -0
  313. package/dist/components/ic-tree-view.d.ts +11 -0
  314. package/dist/components/ic-tree-view.js +237 -0
  315. package/dist/components/ic-tree-view.js.map +1 -0
  316. package/dist/components/ic-typography2.js +57 -19
  317. package/dist/components/ic-typography2.js.map +1 -1
  318. package/dist/core/core.css +1 -1
  319. package/dist/core/core.esm.js +1 -1
  320. package/dist/core/core.esm.js.map +1 -1
  321. package/dist/core/p-00b29b5c.entry.js +2 -0
  322. package/dist/core/p-00b29b5c.entry.js.map +1 -0
  323. package/dist/core/p-01937eb0.entry.js +2 -0
  324. package/dist/core/p-01937eb0.entry.js.map +1 -0
  325. package/dist/core/p-06db67a5.entry.js +2 -0
  326. package/dist/core/p-06db67a5.entry.js.map +1 -0
  327. package/dist/core/{p-e5b1dd58.entry.js → p-0896531a.entry.js} +2 -2
  328. package/dist/core/p-0896531a.entry.js.map +1 -0
  329. package/dist/core/{p-fdacc7f7.entry.js → p-125bc120.entry.js} +2 -2
  330. package/dist/core/p-155054f4.entry.js +2 -0
  331. package/dist/core/p-155054f4.entry.js.map +1 -0
  332. package/dist/core/p-19be677b.entry.js +2 -0
  333. package/dist/core/p-19be677b.entry.js.map +1 -0
  334. package/dist/core/p-20aae323.entry.js +2 -0
  335. package/dist/core/p-20aae323.entry.js.map +1 -0
  336. package/dist/core/{p-b3ed5423.entry.js → p-21ecca00.entry.js} +2 -2
  337. package/dist/core/p-21ecca00.entry.js.map +1 -0
  338. package/dist/core/{p-1d0cff8a.entry.js → p-22260ed4.entry.js} +2 -2
  339. package/dist/core/{p-fab8da25.entry.js → p-2533d147.entry.js} +2 -2
  340. package/dist/core/p-2533d147.entry.js.map +1 -0
  341. package/dist/core/p-2ec4ced3.entry.js +2 -0
  342. package/dist/core/p-2ec4ced3.entry.js.map +1 -0
  343. package/dist/core/{p-45ebcb74.js → p-2fb52051.js} +2 -2
  344. package/dist/{esm/helpers-d41662f3.js.map → core/p-2fb52051.js.map} +1 -1
  345. package/dist/core/{p-d5d36143.entry.js → p-30d385c6.entry.js} +2 -2
  346. package/dist/core/p-30d385c6.entry.js.map +1 -0
  347. package/dist/core/p-3bd8a4fa.entry.js +2 -0
  348. package/dist/core/p-3bd8a4fa.entry.js.map +1 -0
  349. package/dist/core/{p-9e7a5c72.entry.js → p-3f2ae26e.entry.js} +2 -2
  350. package/dist/core/p-3f2ae26e.entry.js.map +1 -0
  351. package/dist/core/p-401d0c66.entry.js +2 -0
  352. package/dist/core/p-401d0c66.entry.js.map +1 -0
  353. package/dist/core/{p-452985d9.entry.js → p-4188b38a.entry.js} +2 -2
  354. package/dist/core/p-4188b38a.entry.js.map +1 -0
  355. package/dist/core/{p-d44b7f21.entry.js → p-41a53070.entry.js} +2 -2
  356. package/dist/core/p-41a53070.entry.js.map +1 -0
  357. package/dist/core/p-4309460f.entry.js +2 -0
  358. package/dist/core/p-4309460f.entry.js.map +1 -0
  359. package/dist/core/p-436d179b.entry.js +2 -0
  360. package/dist/core/p-436d179b.entry.js.map +1 -0
  361. package/dist/core/p-439d1a97.entry.js +2 -0
  362. package/dist/core/p-439d1a97.entry.js.map +1 -0
  363. package/dist/core/p-4974da93.entry.js +2 -0
  364. package/dist/core/p-4974da93.entry.js.map +1 -0
  365. package/dist/core/p-4d316a43.entry.js +2 -0
  366. package/dist/core/p-4d316a43.entry.js.map +1 -0
  367. package/dist/core/{p-5fea8f1c.entry.js → p-54306250.entry.js} +2 -2
  368. package/dist/core/{p-5fea8f1c.entry.js.map → p-54306250.entry.js.map} +1 -1
  369. package/dist/core/p-57527684.entry.js +2 -0
  370. package/dist/core/p-57527684.entry.js.map +1 -0
  371. package/dist/core/p-5a95dd44.entry.js +2 -0
  372. package/dist/core/p-5a95dd44.entry.js.map +1 -0
  373. package/dist/core/p-5cecbd1f.entry.js +2 -0
  374. package/dist/core/p-5cecbd1f.entry.js.map +1 -0
  375. package/dist/core/p-5e41f96d.entry.js +2 -0
  376. package/dist/core/p-5e41f96d.entry.js.map +1 -0
  377. package/dist/core/p-64826d54.entry.js +2 -0
  378. package/dist/core/p-64826d54.entry.js.map +1 -0
  379. package/dist/core/{p-d91428b4.entry.js → p-64b1e4a8.entry.js} +2 -2
  380. package/dist/core/p-64b1e4a8.entry.js.map +1 -0
  381. package/dist/core/p-65cf6a11.entry.js +2 -0
  382. package/dist/core/p-65cf6a11.entry.js.map +1 -0
  383. package/dist/core/{p-a589ead8.entry.js → p-6a5ffe7d.entry.js} +2 -2
  384. package/dist/core/p-6a5ffe7d.entry.js.map +1 -0
  385. package/dist/core/p-6c6c71ba.entry.js +2 -0
  386. package/dist/core/p-6c6c71ba.entry.js.map +1 -0
  387. package/dist/core/p-6f0e9434.entry.js +2 -0
  388. package/dist/core/p-6f0e9434.entry.js.map +1 -0
  389. package/dist/core/p-84eaa486.entry.js +2 -0
  390. package/dist/core/p-84eaa486.entry.js.map +1 -0
  391. package/dist/core/p-85cb6bb7.entry.js +2 -0
  392. package/dist/core/p-85cb6bb7.entry.js.map +1 -0
  393. package/dist/core/{p-fb4219d6.entry.js → p-88ba5a88.entry.js} +2 -2
  394. package/dist/core/{p-6b74397a.entry.js → p-8c5b63c6.entry.js} +2 -2
  395. package/dist/core/p-8c5b63c6.entry.js.map +1 -0
  396. package/dist/core/p-8da08c05.entry.js +2 -0
  397. package/dist/core/p-8da08c05.entry.js.map +1 -0
  398. package/dist/core/{p-569a68c0.entry.js → p-91cf89c8.entry.js} +2 -2
  399. package/dist/core/p-91cf89c8.entry.js.map +1 -0
  400. package/dist/core/p-98981fa7.entry.js +2 -0
  401. package/dist/core/p-98981fa7.entry.js.map +1 -0
  402. package/dist/core/p-9d3e0e60.entry.js +2 -0
  403. package/dist/core/p-9d3e0e60.entry.js.map +1 -0
  404. package/dist/core/p-a2194364.entry.js +2 -0
  405. package/dist/core/p-a2194364.entry.js.map +1 -0
  406. package/dist/core/{p-59d9ea22.entry.js → p-a4d0f166.entry.js} +2 -2
  407. package/dist/core/p-a4d0f166.entry.js.map +1 -0
  408. package/dist/core/p-aaa6f849.entry.js +2 -0
  409. package/dist/core/p-aaa6f849.entry.js.map +1 -0
  410. package/dist/core/p-adbe0d89.js +2 -0
  411. package/dist/core/p-adbe0d89.js.map +1 -0
  412. package/dist/core/p-b4ab627a.entry.js +2 -0
  413. package/dist/core/p-b4ab627a.entry.js.map +1 -0
  414. package/dist/core/{p-9e69f517.entry.js → p-b6e208e3.entry.js} +2 -2
  415. package/dist/core/p-b7abaec8.entry.js +2 -0
  416. package/dist/core/p-b7abaec8.entry.js.map +1 -0
  417. package/dist/core/p-bc4aec3a.entry.js +2 -0
  418. package/dist/core/p-bc4aec3a.entry.js.map +1 -0
  419. package/dist/core/{p-0ea28e7a.entry.js → p-bcf04b18.entry.js} +2 -2
  420. package/dist/core/p-bcf04b18.entry.js.map +1 -0
  421. package/dist/core/{p-d39239be.entry.js → p-be70c278.entry.js} +2 -2
  422. package/dist/core/{p-d39239be.entry.js.map → p-be70c278.entry.js.map} +1 -1
  423. package/dist/core/p-bf009b9a.entry.js +2 -0
  424. package/dist/core/p-bf009b9a.entry.js.map +1 -0
  425. package/dist/core/{p-40fc7162.entry.js → p-cbd730aa.entry.js} +2 -2
  426. package/dist/core/p-cbd730aa.entry.js.map +1 -0
  427. package/dist/core/p-d76e24e4.entry.js +2 -0
  428. package/dist/core/p-d76e24e4.entry.js.map +1 -0
  429. package/dist/core/p-d7bf1057.entry.js +2 -0
  430. package/dist/core/p-d7bf1057.entry.js.map +1 -0
  431. package/dist/core/p-d9254b14.entry.js +2 -0
  432. package/dist/core/p-d9254b14.entry.js.map +1 -0
  433. package/dist/core/p-e20f8772.entry.js +2 -0
  434. package/dist/core/p-e20f8772.entry.js.map +1 -0
  435. package/dist/core/p-e26769b0.entry.js +2 -0
  436. package/dist/core/p-e26769b0.entry.js.map +1 -0
  437. package/dist/core/p-e2dba05a.entry.js +2 -0
  438. package/dist/core/p-e2dba05a.entry.js.map +1 -0
  439. package/dist/core/p-ec862c7e.entry.js +2 -0
  440. package/dist/core/p-ec862c7e.entry.js.map +1 -0
  441. package/dist/core/{p-145c8074.entry.js → p-ede631c5.entry.js} +2 -2
  442. package/dist/core/p-ef9175d8.entry.js +2 -0
  443. package/dist/core/p-ef9175d8.entry.js.map +1 -0
  444. package/dist/core/{p-787ffd96.entry.js → p-f1072c28.entry.js} +2 -2
  445. package/dist/core/{p-452985d9.entry.js.map → p-f1072c28.entry.js.map} +1 -1
  446. package/dist/core/p-f4db39eb.entry.js +2 -0
  447. package/dist/core/p-f4db39eb.entry.js.map +1 -0
  448. package/dist/esm/core.js +1 -1
  449. package/dist/esm/{helpers-d41662f3.js → helpers-0f5fe29b.js} +3 -2
  450. package/dist/esm/helpers-0f5fe29b.js.map +1 -0
  451. package/dist/esm/{helpers-e75fd113.js → helpers-f543bc77.js} +12 -2
  452. package/dist/esm/helpers-f543bc77.js.map +1 -0
  453. package/dist/esm/ic-accordion-group.entry.js +8 -8
  454. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  455. package/dist/esm/ic-accordion.entry.js +4 -4
  456. package/dist/esm/ic-accordion.entry.js.map +1 -1
  457. package/dist/esm/ic-alert.entry.js +1 -3
  458. package/dist/esm/ic-alert.entry.js.map +1 -1
  459. package/dist/esm/ic-back-to-top.entry.js +12 -15
  460. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  461. package/dist/esm/ic-badge.entry.js +15 -27
  462. package/dist/esm/ic-badge.entry.js.map +1 -1
  463. package/dist/esm/ic-breadcrumb-group.entry.js +4 -4
  464. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  465. package/dist/esm/ic-breadcrumb.entry.js +3 -3
  466. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  467. package/dist/esm/ic-button_3.entry.js +27 -22
  468. package/dist/esm/ic-button_3.entry.js.map +1 -1
  469. package/dist/esm/ic-card-horizontal.entry.js +1 -1
  470. package/dist/esm/{ic-card.entry.js → ic-card-vertical.entry.js} +6 -6
  471. package/dist/esm/ic-card-vertical.entry.js.map +1 -0
  472. package/dist/esm/ic-checkbox-group.entry.js +6 -5
  473. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  474. package/dist/esm/ic-checkbox.entry.js +6 -15
  475. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  476. package/dist/esm/ic-chip.entry.js +9 -10
  477. package/dist/esm/ic-chip.entry.js.map +1 -1
  478. package/dist/esm/ic-classification-banner.entry.js +2 -2
  479. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  480. package/dist/esm/ic-data-list.entry.js +24 -0
  481. package/dist/esm/ic-data-list.entry.js.map +1 -0
  482. package/dist/esm/ic-data-row.entry.js +9 -10
  483. package/dist/esm/ic-data-row.entry.js.map +1 -1
  484. package/dist/esm/ic-data-table-title-bar.entry.js +2 -2
  485. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -1
  486. package/dist/esm/ic-data-table.entry.js +526 -71
  487. package/dist/esm/ic-data-table.entry.js.map +1 -1
  488. package/dist/esm/ic-date-input.entry.js +4 -3
  489. package/dist/esm/ic-date-input.entry.js.map +1 -1
  490. package/dist/esm/ic-date-picker.entry.js +7 -3
  491. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  492. package/dist/esm/ic-dialog.entry.js +12 -97
  493. package/dist/esm/ic-dialog.entry.js.map +1 -1
  494. package/dist/esm/ic-divider.entry.js +1 -1
  495. package/dist/esm/ic-empty-state_2.entry.js +8 -8
  496. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  497. package/dist/esm/ic-footer-link-group.entry.js +9 -9
  498. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  499. package/dist/esm/ic-footer-link.entry.js +6 -7
  500. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  501. package/dist/esm/ic-footer.entry.js +8 -8
  502. package/dist/esm/ic-footer.entry.js.map +1 -1
  503. package/dist/esm/ic-hero.entry.js +8 -9
  504. package/dist/esm/ic-hero.entry.js.map +1 -1
  505. package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
  506. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  507. package/dist/esm/ic-input-component-container_4.entry.js +21 -25
  508. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
  509. package/dist/esm/ic-link.entry.js +6 -7
  510. package/dist/esm/ic-link.entry.js.map +1 -1
  511. package/dist/esm/ic-menu-group.entry.js +1 -1
  512. package/dist/esm/ic-menu-item.entry.js +3 -3
  513. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  514. package/dist/esm/ic-menu-with-multi.entry.js +9 -11
  515. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
  516. package/dist/esm/ic-menu.entry.js +8 -10
  517. package/dist/esm/ic-menu.entry.js.map +1 -1
  518. package/dist/esm/ic-navigation-button.entry.js +1 -1
  519. package/dist/esm/ic-navigation-group.entry.js +9 -9
  520. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  521. package/dist/esm/ic-navigation-item.entry.js +5 -5
  522. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  523. package/dist/esm/ic-navigation-menu.entry.js +2 -2
  524. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  525. package/dist/esm/ic-page-header.entry.js +7 -8
  526. package/dist/esm/ic-page-header.entry.js.map +1 -1
  527. package/dist/esm/ic-pagination_4.entry.js +95 -101
  528. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  529. package/dist/esm/ic-popover-menu.entry.js +3 -3
  530. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  531. package/dist/esm/ic-radio-group.entry.js +40 -25
  532. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  533. package/dist/esm/ic-radio-option.entry.js +5 -18
  534. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  535. package/dist/esm/ic-search-bar.entry.js +18 -24
  536. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  537. package/dist/esm/ic-select-with-multi.entry.js +13 -21
  538. package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
  539. package/dist/esm/ic-side-navigation.entry.js +7 -7
  540. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  541. package/dist/esm/ic-skeleton.entry.js +4 -5
  542. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  543. package/dist/esm/ic-status-tag.entry.js +2 -11
  544. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  545. package/dist/esm/ic-step.entry.js +40 -43
  546. package/dist/esm/ic-step.entry.js.map +1 -1
  547. package/dist/esm/ic-stepper.entry.js +16 -16
  548. package/dist/esm/ic-stepper.entry.js.map +1 -1
  549. package/dist/esm/ic-switch.entry.js +5 -6
  550. package/dist/esm/ic-switch.entry.js.map +1 -1
  551. package/dist/esm/ic-tab-context.entry.js +0 -11
  552. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  553. package/dist/esm/ic-tab-group.entry.js +4 -5
  554. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  555. package/dist/esm/ic-tab-panel.entry.js +1 -8
  556. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  557. package/dist/esm/ic-tab.entry.js +4 -4
  558. package/dist/esm/ic-tab.entry.js.map +1 -1
  559. package/dist/esm/ic-theme.entry.js +1 -1
  560. package/dist/esm/ic-toast-region.entry.js +0 -7
  561. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  562. package/dist/esm/ic-toast.entry.js +83 -35
  563. package/dist/esm/ic-toast.entry.js.map +1 -1
  564. package/dist/esm/ic-toggle-button-group.entry.js +16 -16
  565. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  566. package/dist/esm/ic-toggle-button.entry.js +13 -13
  567. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  568. package/dist/esm/ic-top-navigation.entry.js +4 -4
  569. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  570. package/dist/esm/ic-tree-item.entry.js +237 -0
  571. package/dist/esm/ic-tree-item.entry.js.map +1 -0
  572. package/dist/esm/ic-tree-view.entry.js +199 -0
  573. package/dist/esm/ic-tree-view.entry.js.map +1 -0
  574. package/dist/esm/ic-typography.entry.js +52 -17
  575. package/dist/esm/ic-typography.entry.js.map +1 -1
  576. package/dist/esm/index-93509377.js +16 -8
  577. package/dist/esm/loader.js +1 -1
  578. package/dist/types/components/ic-data-table/ic-data-table.d.ts +68 -7
  579. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +9 -0
  580. package/dist/types/components/ic-data-table/story-data.d.ts +112 -0
  581. package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
  582. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  583. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +0 -4
  584. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +1 -31
  585. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +95 -0
  586. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +40 -0
  587. package/dist/types/components.d.ts +175 -72
  588. package/dist/types/utils/types.d.ts +1 -1
  589. package/hydrate/index.js +1925 -1126
  590. package/package.json +3 -3
  591. package/dist/cjs/helpers-081d6031.js.map +0 -1
  592. package/dist/cjs/helpers-261701cd.js.map +0 -1
  593. package/dist/cjs/ic-card.cjs.entry.js.map +0 -1
  594. package/dist/cjs/ic-data-entity.cjs.entry.js +0 -29
  595. package/dist/cjs/ic-data-entity.cjs.entry.js.map +0 -1
  596. package/dist/components/ic-alert2.js +0 -133
  597. package/dist/components/ic-alert2.js.map +0 -1
  598. package/dist/components/ic-card.js.map +0 -1
  599. package/dist/components/ic-data-entity.js +0 -53
  600. package/dist/components/ic-data-entity.js.map +0 -1
  601. package/dist/core/p-007da09d.entry.js +0 -2
  602. package/dist/core/p-007da09d.entry.js.map +0 -1
  603. package/dist/core/p-01008e8d.entry.js +0 -2
  604. package/dist/core/p-01008e8d.entry.js.map +0 -1
  605. package/dist/core/p-01297278.entry.js +0 -2
  606. package/dist/core/p-01297278.entry.js.map +0 -1
  607. package/dist/core/p-0551f0cf.entry.js +0 -2
  608. package/dist/core/p-0551f0cf.entry.js.map +0 -1
  609. package/dist/core/p-0944d33b.entry.js +0 -2
  610. package/dist/core/p-0944d33b.entry.js.map +0 -1
  611. package/dist/core/p-0ea28e7a.entry.js.map +0 -1
  612. package/dist/core/p-169bcf0f.entry.js +0 -2
  613. package/dist/core/p-169bcf0f.entry.js.map +0 -1
  614. package/dist/core/p-1733278a.entry.js +0 -2
  615. package/dist/core/p-1733278a.entry.js.map +0 -1
  616. package/dist/core/p-1ac733c1.entry.js +0 -2
  617. package/dist/core/p-1ac733c1.entry.js.map +0 -1
  618. package/dist/core/p-2647931d.entry.js +0 -2
  619. package/dist/core/p-2647931d.entry.js.map +0 -1
  620. package/dist/core/p-32a3b6c8.entry.js +0 -2
  621. package/dist/core/p-32a3b6c8.entry.js.map +0 -1
  622. package/dist/core/p-354e5dbe.entry.js +0 -2
  623. package/dist/core/p-354e5dbe.entry.js.map +0 -1
  624. package/dist/core/p-3ba4335c.entry.js +0 -2
  625. package/dist/core/p-3ba4335c.entry.js.map +0 -1
  626. package/dist/core/p-3be4aae0.entry.js +0 -2
  627. package/dist/core/p-3be4aae0.entry.js.map +0 -1
  628. package/dist/core/p-3d9eca50.entry.js +0 -2
  629. package/dist/core/p-3d9eca50.entry.js.map +0 -1
  630. package/dist/core/p-40fc7162.entry.js.map +0 -1
  631. package/dist/core/p-45ebcb74.js.map +0 -1
  632. package/dist/core/p-4e6f7cfe.entry.js +0 -2
  633. package/dist/core/p-4e6f7cfe.entry.js.map +0 -1
  634. package/dist/core/p-569a68c0.entry.js.map +0 -1
  635. package/dist/core/p-59d9ea22.entry.js.map +0 -1
  636. package/dist/core/p-6358925c.entry.js +0 -2
  637. package/dist/core/p-6358925c.entry.js.map +0 -1
  638. package/dist/core/p-66595f5f.entry.js +0 -2
  639. package/dist/core/p-66595f5f.entry.js.map +0 -1
  640. package/dist/core/p-693a77bb.entry.js +0 -2
  641. package/dist/core/p-693a77bb.entry.js.map +0 -1
  642. package/dist/core/p-6b74397a.entry.js.map +0 -1
  643. package/dist/core/p-6e697a16.entry.js +0 -2
  644. package/dist/core/p-6e697a16.entry.js.map +0 -1
  645. package/dist/core/p-6f8fd43e.entry.js +0 -2
  646. package/dist/core/p-6f8fd43e.entry.js.map +0 -1
  647. package/dist/core/p-787ffd96.entry.js.map +0 -1
  648. package/dist/core/p-7f690fa3.entry.js +0 -2
  649. package/dist/core/p-7f690fa3.entry.js.map +0 -1
  650. package/dist/core/p-96670e29.entry.js +0 -2
  651. package/dist/core/p-96670e29.entry.js.map +0 -1
  652. package/dist/core/p-9777ebb1.entry.js +0 -2
  653. package/dist/core/p-9777ebb1.entry.js.map +0 -1
  654. package/dist/core/p-9e7a5c72.entry.js.map +0 -1
  655. package/dist/core/p-9f8ef2bc.entry.js +0 -2
  656. package/dist/core/p-9f8ef2bc.entry.js.map +0 -1
  657. package/dist/core/p-a4585c7e.entry.js +0 -2
  658. package/dist/core/p-a4585c7e.entry.js.map +0 -1
  659. package/dist/core/p-a589ead8.entry.js.map +0 -1
  660. package/dist/core/p-a6d3743c.entry.js +0 -2
  661. package/dist/core/p-a6d3743c.entry.js.map +0 -1
  662. package/dist/core/p-a8c97918.entry.js +0 -2
  663. package/dist/core/p-a8c97918.entry.js.map +0 -1
  664. package/dist/core/p-a970d653.entry.js +0 -2
  665. package/dist/core/p-a970d653.entry.js.map +0 -1
  666. package/dist/core/p-ae7c2c39.entry.js +0 -2
  667. package/dist/core/p-ae7c2c39.entry.js.map +0 -1
  668. package/dist/core/p-b3ed5423.entry.js.map +0 -1
  669. package/dist/core/p-be4c0cc8.entry.js +0 -2
  670. package/dist/core/p-be4c0cc8.entry.js.map +0 -1
  671. package/dist/core/p-c04f1bfb.entry.js +0 -2
  672. package/dist/core/p-c04f1bfb.entry.js.map +0 -1
  673. package/dist/core/p-d06c0049.entry.js +0 -2
  674. package/dist/core/p-d06c0049.entry.js.map +0 -1
  675. package/dist/core/p-d3ea79e1.entry.js +0 -2
  676. package/dist/core/p-d3ea79e1.entry.js.map +0 -1
  677. package/dist/core/p-d448bdbd.entry.js +0 -2
  678. package/dist/core/p-d448bdbd.entry.js.map +0 -1
  679. package/dist/core/p-d44b7f21.entry.js.map +0 -1
  680. package/dist/core/p-d5d36143.entry.js.map +0 -1
  681. package/dist/core/p-d68e0c94.entry.js +0 -2
  682. package/dist/core/p-d68e0c94.entry.js.map +0 -1
  683. package/dist/core/p-d91428b4.entry.js.map +0 -1
  684. package/dist/core/p-e191290c.entry.js +0 -2
  685. package/dist/core/p-e191290c.entry.js.map +0 -1
  686. package/dist/core/p-e2421111.entry.js +0 -2
  687. package/dist/core/p-e2421111.entry.js.map +0 -1
  688. package/dist/core/p-e393e53c.entry.js +0 -2
  689. package/dist/core/p-e393e53c.entry.js.map +0 -1
  690. package/dist/core/p-e5b1dd58.entry.js.map +0 -1
  691. package/dist/core/p-f6735e4a.js +0 -2
  692. package/dist/core/p-f6735e4a.js.map +0 -1
  693. package/dist/core/p-fab8da25.entry.js.map +0 -1
  694. package/dist/core/p-fc0eac8b.entry.js +0 -2
  695. package/dist/core/p-fc0eac8b.entry.js.map +0 -1
  696. package/dist/core/p-ffeca3c7.entry.js +0 -2
  697. package/dist/core/p-ffeca3c7.entry.js.map +0 -1
  698. package/dist/esm/helpers-e75fd113.js.map +0 -1
  699. package/dist/esm/ic-card.entry.js.map +0 -1
  700. package/dist/esm/ic-data-entity.entry.js +0 -25
  701. package/dist/esm/ic-data-entity.entry.js.map +0 -1
  702. /package/dist/core/{p-fdacc7f7.entry.js.map → p-125bc120.entry.js.map} +0 -0
  703. /package/dist/core/{p-1d0cff8a.entry.js.map → p-22260ed4.entry.js.map} +0 -0
  704. /package/dist/core/{p-fb4219d6.entry.js.map → p-88ba5a88.entry.js.map} +0 -0
  705. /package/dist/core/{p-9e69f517.entry.js.map → p-b6e208e3.entry.js.map} +0 -0
  706. /package/dist/core/{p-145c8074.entry.js.map → p-ede631c5.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-93509377.js';
2
- import { i as isSlotUsed, a as getSlotContent } from './helpers-e75fd113.js';
2
+ import { d as debounce, a as isEmptyString, p as pxToRem, i as isSlotUsed, b as getSlotContent } from './helpers-f543bc77.js';
3
3
 
4
4
  const unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
5
5
  <path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
@@ -13,23 +13,161 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
13
13
  <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
14
14
  </svg>`;
15
15
 
16
- const icDataTableCss = ":host{position:relative;display:block;height:100%;max-height:100%}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs))}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: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-row-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;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.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)}.data-type-string{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}.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}.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}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}.cell-container{display:flex}}";
16
+ const icDataTableCss = ":host{position:relative;display:block;height:100%;max-height:100%}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden}.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: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-row-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;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}.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{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}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}}";
17
17
 
18
- const DENSITY_HEIGHT_MULTIPLIER = {
19
- dense: 0.8,
20
- default: 1,
21
- spacious: 1.2,
22
- };
23
- const SORT_ICONS = {
24
- unsorted: unsortedIcon,
25
- ascending: ascendingIcon,
26
- descending: descendingIcon,
27
- };
28
18
  const DataTable = class {
29
19
  constructor(hostRef) {
30
20
  registerInstance(this, hostRef);
31
21
  this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
22
+ this.DENSITY_HEIGHT_MULTIPLIER = {
23
+ dense: 0.8,
24
+ default: 1,
25
+ spacious: 1.2,
26
+ };
27
+ this.DENSITY_PADDING_HEIGHT_DIFF = {
28
+ dense: 8,
29
+ default: 16,
30
+ spacious: 20,
31
+ };
32
+ this.SORT_ICONS = {
33
+ unsorted: unsortedIcon,
34
+ ascending: ascendingIcon,
35
+ descending: descendingIcon,
36
+ };
32
37
  this.hasLoadedForOneSecond = true;
38
+ this.resizeObserver = null;
39
+ this.SHOW_HIDE_STRING = "show-hide";
40
+ this.SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;
41
+ this.TOOLTIP_STRING = "tooltip";
42
+ this.TOOLTIP = `ic-${this.TOOLTIP_STRING}`;
43
+ this.TEXT_WRAP_STRING = "text-wrap";
44
+ this.TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;
45
+ this.dataUpdated = false;
46
+ this.rowHeightSet = false;
47
+ this.initialLoad = false;
48
+ this.icPageChangeEvent = false;
49
+ this.itemsPerPageChange = false;
50
+ this.DATA_ROW_HEIGHT_STRING = "data-row-height";
51
+ this.DEFAULT_LINE_HEIGHT = 24;
52
+ this.densityUpdate = false;
53
+ this.updateSetRowHeight = (typographyEl) => {
54
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
55
+ if (typographyEl) {
56
+ const cellContainer = this.getCellContainer(typographyEl);
57
+ const rowHeight = fontSize *
58
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
59
+ if (typographyEl.scrollHeight > rowHeight) {
60
+ cellContainer.style.removeProperty("height");
61
+ }
62
+ }
63
+ else {
64
+ this.getTypographyElements().forEach((typographyEl) => {
65
+ const cellContainer = this.getCellContainer(typographyEl);
66
+ const rowHeight = fontSize *
67
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
68
+ if (typographyEl.scrollHeight > rowHeight) {
69
+ cellContainer.style.removeProperty("height");
70
+ }
71
+ });
72
+ }
73
+ };
74
+ this.debounceDataTruncation = () => {
75
+ this.getTypographyElements().forEach((typographyEl) => {
76
+ if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
77
+ this.resizeObserver = new ResizeObserver(
78
+ // This gets triggered twice due to updated data and see more/see less button
79
+ debounce(() => {
80
+ // console.log("resizeObserver triggered");
81
+ this.dataTruncation(typographyEl);
82
+ }, 200));
83
+ this.resizeObserver.observe(typographyEl);
84
+ }
85
+ });
86
+ };
87
+ this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
88
+ this.truncate = (typographyEl, cellContainer, tooltip) => {
89
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
90
+ //24 is the height of a single line
91
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
92
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
93
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltip);
94
+ }
95
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
96
+ this.addShowHideTruncation(cellContainer, typographyEl);
97
+ }
98
+ }
99
+ }
100
+ else {
101
+ if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
102
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
103
+ cellContainer.appendChild(typographyEl);
104
+ tooltip.remove();
105
+ }
106
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
107
+ !isEmptyString(typographyEl.getAttribute("max-lines"))) {
108
+ this.resetShowHideTruncation(typographyEl);
109
+ }
110
+ }
111
+ };
112
+ this.dataTruncation = (typographyEl) => {
113
+ // Tooltip truncation mentioned in AC. Will need revisiting
114
+ const tooltip = this.getTooltip(typographyEl);
115
+ const cellContainer = this.getCellContainer(typographyEl);
116
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
117
+ this.dataUpdated) {
118
+ return;
119
+ }
120
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
121
+ typographyEl.shadowRoot.querySelector("button")) {
122
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
123
+ // If the see more/see less is present and the max lines is equal to the cell container
124
+ // remove the see more/see less button
125
+ if (showHideBtn) {
126
+ const truncWrapper = this.getTruncWrapper(typographyEl);
127
+ if (this.getLines(truncWrapper.scrollHeight) ===
128
+ +typographyEl.getAttribute("max-lines")) {
129
+ this.resetShowHideTruncation(typographyEl);
130
+ }
131
+ }
132
+ }
133
+ // Deals with setting and resetting row height and re-truncating data
134
+ if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {
135
+ const truncWrapper = this.getTruncWrapper(typographyEl);
136
+ // cellContainer.clientHeight - 24 removes the extra line by see more/see less
137
+ if (truncWrapper &&
138
+ cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
139
+ truncWrapper.scrollHeight) {
140
+ this.resetShowHideTruncation(typographyEl);
141
+ return;
142
+ }
143
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
144
+ this.addShowHideTruncation(cellContainer, typographyEl);
145
+ return;
146
+ }
147
+ }
148
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > 0 &&
149
+ (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > 0 &&
150
+ (typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) === (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
151
+ if (tooltip) {
152
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
153
+ }
154
+ return;
155
+ }
156
+ this.truncate(typographyEl, cellContainer, tooltip);
157
+ };
158
+ this.removeTextWrap = () => {
159
+ this.getTypographyElements().forEach((typographyEl) => {
160
+ const tableCell = typographyEl.closest("td");
161
+ if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
162
+ tableCell.classList.remove(this.TEXT_WRAP_STRING);
163
+ }
164
+ });
165
+ };
166
+ this.getCellContainer = (typographyEl) => {
167
+ return typographyEl.closest(".cell-container");
168
+ };
169
+ this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
170
+ array.forEach((val) => val.textWrap && delete val.textWrap);
33
171
  this.startLoadingTimer = () => {
34
172
  this.hasLoadedForOneSecond = false;
35
173
  this.timerStarted = Date.now();
@@ -55,13 +193,31 @@ const DataTable = class {
55
193
  return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
56
194
  }
57
195
  };
196
+ this.getCellOptions = (cell, key) => {
197
+ if (!(this.isObject(cell) && Object.keys(cell).includes(key)))
198
+ return;
199
+ return this.getObjectValue(cell, key);
200
+ };
58
201
  this.createUpdatingIndicator = () => {
59
202
  const { appearance, description, max, min, progress } = this.updatingOptions || {};
60
203
  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" })));
61
204
  };
205
+ this.setRowHeight = (height) => {
206
+ return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
207
+ this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
208
+ };
209
+ this.setTruncationClass = () => {
210
+ if (this.truncationPattern) {
211
+ return { [`truncation-${this.truncationPattern}`]: true };
212
+ }
213
+ return {};
214
+ };
62
215
  this.createCells = (row, rowIndex) => {
216
+ var _a;
63
217
  const rowValues = Object.values(row);
64
218
  const rowKeys = Object.keys(row);
219
+ const index = rowIndex;
220
+ const rowOptions = this.getRowOptions(rowKeys, rowValues);
65
221
  let rowAlignment;
66
222
  let rowEmphasis;
67
223
  const headerIndex = rowKeys.indexOf("header");
@@ -69,42 +225,63 @@ const DataTable = class {
69
225
  rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
70
226
  rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
71
227
  }
228
+ const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
229
+ const currentRowHeight = variableRowHeightVal
230
+ ? variableRowHeightVal !== "auto" && variableRowHeightVal
231
+ : this.globalRowHeight !== "auto" && this.globalRowHeight;
72
232
  return rowValues.map((cell, index) => {
73
- var _a, _b, _c, _d, _e;
233
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
74
234
  const columnProps = this.columns[index];
75
235
  const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
76
236
  const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
77
237
  const cellValue = (key) => this.getObjectValue(cell, key);
78
- return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
79
- ["row-header"]: true,
80
- [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
81
- ["row-header-sticky"]: this.stickyRowHeaders,
82
- } }, cellValue("title"))) : (h("td", { class: {
83
- ["table-cell"]: true,
84
- [`table-density-${this.density}`]: this.notDefaultDensity(),
85
- [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
86
- [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
87
- rowAlignment ||
88
- this.getCellAlignment(cell, "vertical")}`]: !!((_b = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
89
- !!rowAlignment ||
90
- !!this.getCellAlignment(cell, "vertical"),
91
- } }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
92
- !isSlotUsed(this.el, cellSlotName)
93
- ? cell
94
- : null, class: {
95
- "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element",
96
- [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
97
- [`cell-alignment-${((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.horizontal) ||
98
- this.getCellAlignment(cell, "horizontal")}`]: !!((_d = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _d === void 0 ? void 0 : _d.horizontal) ||
99
- !!this.getCellAlignment(cell, "horizontal"),
100
- } }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _e === void 0 ? void 0 : _e.onAllCells)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), h("ic-typography", { variant: "body", class: {
101
- [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
102
- (columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
103
- rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
104
- !!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
105
- !!rowEmphasis,
106
- [`text-${this.density}`]: this.notDefaultDensity(),
107
- } }, this.isObject(cell) && (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))))))));
238
+ if (rowKeys[index] === "header") {
239
+ return (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
240
+ ["row-header"]: true,
241
+ [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
242
+ ["row-header-sticky"]: this.stickyRowHeaders,
243
+ } }, cellValue("title")));
244
+ }
245
+ if (rowKeys[index] !== "rowOptions") {
246
+ return (h("td", { class: {
247
+ ["table-cell"]: true,
248
+ [`table-density-${this.density}`]: this.notDefaultDensity(),
249
+ } }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
250
+ !isSlotUsed(this.el, cellSlotName)
251
+ ? cell
252
+ : 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) ||
253
+ ((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
254
+ rowAlignment ||
255
+ this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
256
+ !!((_d = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _d === void 0 ? void 0 : _d.vertical) ||
257
+ !!rowAlignment ||
258
+ !!this.getCellAlignment(cell, "vertical"), [`cell-alignment-${((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _e === void 0 ? void 0 : _e.horizontal) ||
259
+ ((_f = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _f === void 0 ? void 0 : _f.horizontal) ||
260
+ this.getCellAlignment(cell, "horizontal")}`]: !!((_g = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _g === void 0 ? void 0 : _g.horizontal) ||
261
+ !!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
262
+ !!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) ||
263
+ (rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
264
+ !!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: {
265
+ height: (this.truncationPattern || currentRowHeight) &&
266
+ !columnProps.textWrap &&
267
+ !rowOptions.textWrap &&
268
+ !this.getCellOptions(cell, "textWrap") &&
269
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element"
270
+ ? this.setRowHeight(currentRowHeight)
271
+ : null,
272
+ }, "data-row-height": this.truncationPattern || currentRowHeight
273
+ ? this.setRowHeight(currentRowHeight)
274
+ : 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" &&
275
+ !isSlotUsed(this.el, cellSlotName) && (h("ic-typography", { variant: "body", class: {
276
+ [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
277
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
278
+ rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
279
+ !!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
280
+ !!rowEmphasis,
281
+ [`text-${this.density}`]: this.notDefaultDensity(),
282
+ } }, this.isObject(cell) &&
283
+ (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)))))))));
284
+ }
108
285
  });
109
286
  };
110
287
  this.createColumnHeaders = () => {
@@ -121,7 +298,7 @@ const DataTable = class {
121
298
  [`text-${this.density}`]: this.notDefaultDensity(),
122
299
  } }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
123
300
  // eslint-disable-next-line react/jsx-no-bind
124
- onClick: () => this.sortRows(key), innerHTML: SORT_ICONS[this.sortedColumn === key
301
+ onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
125
302
  ? this.sortedColumnOrder
126
303
  : "unsorted"], class: {
127
304
  ["sort-button"]: true,
@@ -129,6 +306,10 @@ const DataTable = class {
129
306
  this.sortedColumnOrder === "unsorted",
130
307
  } }))))));
131
308
  };
309
+ this.onRowClick = (row) => {
310
+ this.selectedRow =
311
+ this.selectedRow !== row && !this.loading && !this.updating && row;
312
+ };
132
313
  this.createRows = () => {
133
314
  const data = this.showPagination
134
315
  ? this.data.slice(this.fromRow, this.toRow)
@@ -148,24 +329,11 @@ const DataTable = class {
148
329
  return data
149
330
  .sort(!this.sortable ? undefined : this.getSortFunction())
150
331
  .map((row, index) => {
151
- var _a;
152
- const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
153
- const findRowHeight = variableRowHeightVal
154
- ? variableRowHeightVal !== "auto" && variableRowHeightVal
155
- : this.globalRowHeight !== "auto" && this.globalRowHeight;
156
332
  return (h("tr", {
157
333
  // eslint-disable-next-line react/jsx-no-bind
158
- onClick: () => (this.selectedRow =
159
- this.selectedRow !== row &&
160
- !this.loading &&
161
- !this.updating &&
162
- row), class: {
334
+ onClick: () => this.onRowClick(row), class: {
163
335
  ["table-row"]: true,
164
336
  ["table-row-selected"]: this.selectedRow === row,
165
- }, style: {
166
- height: findRowHeight
167
- ? `${findRowHeight * DENSITY_HEIGHT_MULTIPLIER[this.density]}px`
168
- : null,
169
337
  }
170
338
  }, this.createCells(row, index)));
171
339
  });
@@ -228,6 +396,25 @@ const DataTable = class {
228
396
  }
229
397
  this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
230
398
  sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
399
+ this.tableSorted = true;
400
+ };
401
+ this.getTypographyElements = () => {
402
+ return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));
403
+ };
404
+ this.getTooltip = (typographyEl) => {
405
+ return typographyEl.closest(this.TOOLTIP);
406
+ };
407
+ this.updateTruncationTooltip = (removeTooltipOnly = false) => {
408
+ this.getTypographyElements().forEach((typographyEl) => {
409
+ const tooltip = this.getTooltip(typographyEl);
410
+ const cellContainer = this.getCellContainer(typographyEl);
411
+ if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
412
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
413
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
414
+ return;
415
+ }
416
+ this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
417
+ });
231
418
  };
232
419
  this.updateScrollOffset = () => {
233
420
  this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
@@ -241,12 +428,13 @@ const DataTable = class {
241
428
  this.sortedColumn = undefined;
242
429
  this.sortedColumnOrder = undefined;
243
430
  this.toRow = undefined;
431
+ this.currentRowHeight = undefined;
244
432
  this.caption = undefined;
245
433
  this.columns = undefined;
246
434
  this.data = undefined;
247
435
  this.density = "default";
248
436
  this.embedded = false;
249
- this.globalRowHeight = 40;
437
+ this.globalRowHeight = "auto";
250
438
  this.hideColumnHeaders = false;
251
439
  this.loading = false;
252
440
  this.loadingOptions = undefined;
@@ -275,10 +463,15 @@ const DataTable = class {
275
463
  };
276
464
  this.stickyColumnHeaders = false;
277
465
  this.stickyRowHeaders = false;
466
+ this.truncationPattern = undefined;
278
467
  this.updating = false;
279
468
  this.updatingOptions = undefined;
280
469
  this.variableRowHeight = undefined;
281
470
  }
471
+ disconnectedCallback() {
472
+ var _a;
473
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
474
+ }
282
475
  componentWillLoad() {
283
476
  var _a;
284
477
  this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
@@ -287,10 +480,15 @@ const DataTable = class {
287
480
  this.sortedColumn = this.sortOptions.defaultColumn;
288
481
  this.sortedColumnOrder = this.sortOptions.sortOrders[0];
289
482
  this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
483
+ this.initialLoad = true;
484
+ this.previousItemsPerPage = this.rowsPerPage;
290
485
  }
291
486
  componentDidLoad() {
292
487
  const tableElement = this.el.shadowRoot.querySelector("table");
293
488
  const tableContainer = this.el.shadowRoot.querySelector(".table-container");
489
+ if (this.dataUpdated) {
490
+ this.dataUpdated = false;
491
+ }
294
492
  if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
295
493
  (tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
296
494
  this.scrollable = true;
@@ -299,11 +497,144 @@ const DataTable = class {
299
497
  this.startLoadingTimer();
300
498
  this.showLoadingIndicator();
301
499
  }
500
+ if (this.truncationPattern) {
501
+ this.getTypographyElements().forEach((typographyEl) => {
502
+ if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {
503
+ this.dataTruncation(typographyEl);
504
+ }
505
+ });
506
+ this.debounceDataTruncation();
507
+ }
508
+ if (this.globalRowHeight !== "auto") {
509
+ this.updateSetRowHeight();
510
+ }
302
511
  }
303
- handleItemsPerPageChange({ detail, target, }) {
304
- if (target.parentElement !== this.el) {
305
- this.previousRowsPerPage = this.rowsPerPage;
306
- this.rowsPerPage = detail.value;
512
+ componentDidUpdate() {
513
+ this.truncateUpdatedData();
514
+ }
515
+ truncateUpdatedData() {
516
+ if (this.dataUpdated) {
517
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
518
+ this.resetShowHideTruncation();
519
+ }
520
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
521
+ this.updateTruncationTooltip();
522
+ }
523
+ this.dataUpdated = false;
524
+ }
525
+ if (this.tableSorted) {
526
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
527
+ this.updateTruncationTooltip();
528
+ }
529
+ this.tableSorted = false;
530
+ }
531
+ // This function recalculates the tooltip truncation when the rowHeight has been set.
532
+ // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
533
+ if (this.rowHeightSet) {
534
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
535
+ this.getTypographyElements().forEach((typographyEl) => {
536
+ var _a;
537
+ const cellContainer = this.getCellContainer(typographyEl);
538
+ const tooltipEl = this.getTooltip(typographyEl);
539
+ const rowHeight = fontSize *
540
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
541
+ // If the set row height is bigger than the cell container even
542
+ // with textWrap, set the row height
543
+ if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
544
+ rowHeight > cellContainer.clientHeight) {
545
+ cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
546
+ }
547
+ if (this.truncationPattern) {
548
+ // If the set row height is bigger than the typography truncation wrapper
549
+ // scroll height, remove see more / see less button
550
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
551
+ const truncWrapper = this.getTruncWrapper(typographyEl);
552
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
553
+ if (showHideBtn &&
554
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
555
+ this.resetShowHideTruncation(typographyEl);
556
+ return;
557
+ }
558
+ }
559
+ this.truncate(typographyEl, cellContainer, tooltipEl);
560
+ }
561
+ else {
562
+ this.updateSetRowHeight(typographyEl);
563
+ }
564
+ });
565
+ this.rowHeightSet = false;
566
+ }
567
+ // Only run truncation on the new rows
568
+ // when the number of items per page has increased
569
+ if (this.itemsPerPageChange) {
570
+ const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
571
+ if (this.rowsPerPage > this.previousItemsPerPage) {
572
+ const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
573
+ newRows.forEach((row) => {
574
+ row
575
+ .querySelectorAll("ic-typography")
576
+ .forEach((typographyEl) => {
577
+ const cellContainer = this.getCellContainer(typographyEl);
578
+ const tooltipEl = this.getTooltip(typographyEl);
579
+ this.truncate(typographyEl, cellContainer, tooltipEl);
580
+ });
581
+ });
582
+ }
583
+ this.previousItemsPerPage = this.rowsPerPage;
584
+ this.itemsPerPageChange = false;
585
+ }
586
+ if (!this.initialLoad && this.icPageChangeEvent) {
587
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
588
+ this.updateTruncationTooltip();
589
+ }
590
+ // set truncation to see more if opened and next/previous page is pressed
591
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
592
+ this.getTypographyElements().forEach((typographyEl) => {
593
+ const cellContainer = this.getCellContainer(typographyEl);
594
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
595
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
596
+ !showHideBtn) {
597
+ this.addShowHideTruncation(cellContainer, typographyEl);
598
+ }
599
+ });
600
+ }
601
+ this.icPageChangeEvent = false;
602
+ }
603
+ if (this.densityUpdate) {
604
+ this.getTypographyElements().forEach((typographyEl) => {
605
+ const cellContainer = this.getCellContainer(typographyEl);
606
+ const tooltipEl = this.getTooltip(typographyEl);
607
+ this.truncate(typographyEl, cellContainer, tooltipEl);
608
+ });
609
+ this.densityUpdate = false;
610
+ }
611
+ }
612
+ createShowHideTruncation(typographyEl, cellContainer) {
613
+ typographyEl.checkMaxLines(typographyEl.scrollHeight);
614
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
615
+ typographyEl.setShowHideExpanded(false);
616
+ cellContainer.style.height = null;
617
+ }
618
+ addTooltipTruncation(typographyEl, cellContainer, tooltip) {
619
+ this.addLineClampCSS(typographyEl, cellContainer);
620
+ if (!tooltip) {
621
+ this.createTruncationTooltip(typographyEl, cellContainer);
622
+ }
623
+ }
624
+ addShowHideTruncation(cellContainer, typographyEl) {
625
+ cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
626
+ this.createShowHideTruncation(typographyEl, cellContainer);
627
+ }
628
+ getTruncWrapper(typographyEl) {
629
+ return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
630
+ }
631
+ // Set the height to initial if row height is set and the show / hide truncation
632
+ // is clicked
633
+ handleTypographyTruncationExpandToggle({ detail, }) {
634
+ const { expanded, typographyEl } = detail;
635
+ const cellContainer = this.getCellContainer(typographyEl);
636
+ if (cellContainer.style.height && expanded) {
637
+ cellContainer.style.height = "inherit";
307
638
  }
308
639
  }
309
640
  handlePageChange({ detail, target }) {
@@ -322,6 +653,19 @@ const DataTable = class {
322
653
  this.previousRowsPerPage = this.rowsPerPage;
323
654
  }
324
655
  }
656
+ if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
657
+ // This is to prevent icPageChange from triggering truncation on first load
658
+ this.icPageChangeEvent = true;
659
+ }
660
+ this.previousPaginationPage = detail.value;
661
+ this.initialLoad = false;
662
+ }
663
+ handleItemsPerPageChange({ detail, target, }) {
664
+ if (target.parentElement !== this.el) {
665
+ this.previousRowsPerPage = this.rowsPerPage;
666
+ this.rowsPerPage = detail.value;
667
+ }
668
+ this.itemsPerPageChange = true;
325
669
  }
326
670
  handleDensityChange(ev) {
327
671
  this.density = ev.detail.value;
@@ -339,7 +683,23 @@ const DataTable = class {
339
683
  }, 500);
340
684
  }
341
685
  }
342
- dataHandler(newData) {
686
+ truncationPatternHandler(newValue) {
687
+ if (newValue === this.SHOW_HIDE_STRING) {
688
+ this.updateTruncationTooltip(true);
689
+ // Not using debounceDataTruncation here due to resizeObserver not being triggered
690
+ this.getTypographyElements().forEach((typographyEl) => {
691
+ const cellContainer = this.getCellContainer(typographyEl);
692
+ const tooltip = this.getTooltip(typographyEl);
693
+ this.truncate(typographyEl, cellContainer, tooltip);
694
+ });
695
+ }
696
+ if (newValue === this.TOOLTIP_STRING) {
697
+ // ResizeObserver is trigger here due to the see more/see less links being removed.
698
+ // The resizeObserver will also apply the tooltip where relevant
699
+ this.resetShowHideTruncation();
700
+ }
701
+ }
702
+ async dataHandler(newData) {
343
703
  this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
344
704
  if (this.loading) {
345
705
  !this.hasLoadedForOneSecond
@@ -349,31 +709,124 @@ const DataTable = class {
349
709
  }
350
710
  if (this.updating)
351
711
  this.updating = false;
712
+ this.dataUpdated = true;
352
713
  }
353
- rowHeightChangeHandler() {
354
- this.icRowHeightChange.emit();
714
+ async densityHandler() {
715
+ this.densityUpdate = true;
716
+ }
717
+ resetShowHideTruncation(typographyEl) {
718
+ if (typographyEl) {
719
+ const truncWrapper = this.getTruncWrapper(typographyEl);
720
+ const cellContainer = this.getCellContainer(typographyEl);
721
+ if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
722
+ !isEmptyString(typographyEl.getAttribute("max-lines")) &&
723
+ Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
724
+ +typographyEl.getAttribute("max-lines")) {
725
+ typographyEl.checkMaxLines(truncWrapper.scrollHeight);
726
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
727
+ typographyEl.setShowHideExpanded(false);
728
+ cellContainer.style.height = null;
729
+ }
730
+ else {
731
+ typographyEl.resetTruncation().then(() => {
732
+ cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
733
+ });
734
+ }
735
+ }
736
+ else {
737
+ this.getTypographyElements().forEach((typographyEl) => {
738
+ const cellContainer = this.getCellContainer(typographyEl);
739
+ typographyEl.resetTruncation().then(() => {
740
+ cellContainer.style.setProperty("height", cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
741
+ });
742
+ });
743
+ }
744
+ }
745
+ rowHeightChangeHandler(newValue, oldValue) {
746
+ if (+newValue !== +oldValue) {
747
+ this.deleteTextWrapDataKey(this.data);
748
+ this.deleteTextWrapDataKey(this.columns);
749
+ this.removeTextWrap();
750
+ this.icRowHeightChange.emit();
751
+ this.rowHeightSet = true;
752
+ }
355
753
  }
356
754
  /**
357
- * Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.
755
+ * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.
358
756
  */
359
- async resetRowHeights() {
360
- this.globalRowHeight = 40;
757
+ async resetRowHeights(rowHeight) {
758
+ this.globalRowHeight = rowHeight || "auto";
361
759
  this.variableRowHeight = null;
362
760
  }
363
761
  showLoadingIndicator() {
364
762
  this.loadingIndicator.classList.add("show");
365
763
  }
764
+ getRowOptions(rowKeys, rowValues) {
765
+ const rowOptionsIndex = rowKeys.indexOf("rowOptions");
766
+ return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];
767
+ }
768
+ regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly) {
769
+ // When sorting the table, instead of regenerating the tooltip,
770
+ // the tooltip details are updated
771
+ if (tooltip) {
772
+ if (this.tableSorted) {
773
+ tooltip.setAttribute("target", typographyEl.id);
774
+ tooltip.setAttribute("label", typographyEl.textContent);
775
+ }
776
+ else {
777
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
778
+ }
779
+ if (removeTooltipOnly) {
780
+ return;
781
+ }
782
+ }
783
+ // This add line clamp to data only when
784
+ // the data object has been updated
785
+ if (!typographyEl.getAttribute("style") && this.dataUpdated) {
786
+ this.addLineClampCSS(typographyEl, cellContainer);
787
+ }
788
+ // Adding the tableSorted boolean prevents the tooltip
789
+ // being regenerated and flashing
790
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
791
+ !this.tableSorted) {
792
+ if (!typographyEl.getAttribute("style")) {
793
+ this.addLineClampCSS(typographyEl, cellContainer);
794
+ }
795
+ this.createTruncationTooltip(typographyEl, cellContainer);
796
+ }
797
+ }
798
+ removeTooltip(cellContainer, typographyEl, tooltip) {
799
+ cellContainer.appendChild(typographyEl);
800
+ if (tooltip) {
801
+ tooltip.remove();
802
+ }
803
+ }
804
+ addLineClampCSS(typographyEl, cellContainer) {
805
+ typographyEl.setAttribute("style", `--ic-line-clamp: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
806
+ }
807
+ createTruncationTooltip(typographyEl, cellContainer) {
808
+ const tooltipEl = document.createElement("ic-tooltip");
809
+ tooltipEl.setAttribute("target", typographyEl.id);
810
+ tooltipEl.setAttribute("label", typographyEl.textContent);
811
+ tooltipEl.classList.add("ic-tooltip-overflow");
812
+ tooltipEl.setExternalPopperProps({
813
+ // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
814
+ strategy: "fixed",
815
+ });
816
+ cellContainer.appendChild(tooltipEl);
817
+ tooltipEl.appendChild(typographyEl);
818
+ }
366
819
  render() {
367
820
  const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
368
821
  return (h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
369
822
  ["table-row-container"]: true,
370
823
  scrollable,
371
- }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
824
+ }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
372
825
  ["column-header-sticky"]: stickyColumnHeaders,
373
826
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
374
827
  } }, h("tr", null, createColumnHeaders()))), updating &&
375
828
  !loading &&
376
- (hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
829
+ (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) &&
377
830
  !loading &&
378
831
  (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: {
379
832
  "loading-empty": loading,
@@ -386,7 +839,9 @@ const DataTable = class {
386
839
  get el() { return getElement(this); }
387
840
  static get watchers() { return {
388
841
  "loading": ["loadingHandler"],
842
+ "truncationPattern": ["truncationPatternHandler"],
389
843
  "data": ["dataHandler"],
844
+ "density": ["densityHandler"],
390
845
  "globalRowHeight": ["rowHeightChangeHandler"],
391
846
  "variableRowHeight": ["rowHeightChangeHandler"]
392
847
  }; }