@ukic/canary-web-components 2.0.0-canary.11 → 2.0.0-canary.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (474) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-7a069459.js → helpers-b525d45a.js} +2 -7
  3. package/dist/cjs/helpers-b525d45a.js.map +1 -0
  4. package/dist/cjs/{helpers-f75cf7cf.js → helpers-c4444a7e.js} +48 -94
  5. package/dist/cjs/helpers-c4444a7e.js.map +1 -0
  6. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-badge.cjs.entry.js +8 -16
  10. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +2 -8
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
  21. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
  22. package/dist/cjs/ic-data-table.cjs.entry.js +308 -43
  23. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-dialog.cjs.entry.js +2 -3
  25. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  27. package/dist/cjs/{ic-pagination-bar.cjs.entry.js → ic-empty-state_2.cjs.entry.js} +34 -4
  28. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
  29. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  34. package/dist/cjs/{ic-menu.cjs.entry.js → ic-input-component-container_3.cjs.entry.js} +69 -5
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -0
  36. package/dist/cjs/ic-input-label_2.cjs.entry.js +86 -0
  37. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -0
  38. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-navigation-group.cjs.entry.js +13 -16
  45. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-navigation-item.cjs.entry.js +32 -28
  47. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-pagination_4.cjs.entry.js +5 -5
  51. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-select-with-multi.cjs.entry.js +19 -6
  57. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-top-navigation.cjs.entry.js +60 -46
  70. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-typography.cjs.entry.js +35 -11
  72. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  73. package/dist/cjs/index-4cf27b16.js +10 -18
  74. package/dist/cjs/loader.cjs.js +1 -1
  75. package/dist/collection/collection-manifest.json +1 -2
  76. package/dist/collection/components/ic-data-table/ic-data-table.css +82 -7
  77. package/dist/collection/components/ic-data-table/ic-data-table.js +535 -44
  78. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  79. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  80. package/dist/collection/components/ic-data-table/story-data.js +386 -11
  81. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  82. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.e2e.js +217 -0
  83. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.e2e.js.map +1 -0
  84. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +319 -0
  85. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  86. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +87 -0
  87. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
  88. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
  89. package/dist/collection/components/{ic-date-picker/test/a11y/ic-date-picker.test.a11y.js → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js} +3 -5
  90. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
  91. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
  92. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
  93. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +2 -2
  94. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
  95. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +1 -1
  96. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  97. package/dist/collection/components/ic-select-with-multi/ic-select.js +2 -2
  98. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
  99. package/dist/collection/utils/constants.js +0 -55
  100. package/dist/collection/utils/constants.js.map +1 -1
  101. package/dist/collection/utils/helpers.js +42 -272
  102. package/dist/collection/utils/helpers.js.map +1 -1
  103. package/dist/collection/utils/types.js +0 -45
  104. package/dist/collection/utils/types.js.map +1 -1
  105. package/dist/components/helpers.js +2 -7
  106. package/dist/components/helpers.js.map +1 -1
  107. package/dist/components/helpers2.js +45 -91
  108. package/dist/components/helpers2.js.map +1 -1
  109. package/dist/components/ic-badge.js +8 -16
  110. package/dist/components/ic-badge.js.map +1 -1
  111. package/dist/components/ic-button2.js +3 -11
  112. package/dist/components/ic-button2.js.map +1 -1
  113. package/dist/components/ic-card.js +1 -1
  114. package/dist/components/ic-checkbox-group.js +1 -1
  115. package/dist/components/ic-checkbox.js +1 -1
  116. package/dist/components/ic-chip.js +1 -1
  117. package/dist/components/{ic-date-input.d.ts → ic-data-table-title-bar.d.ts} +4 -4
  118. package/dist/components/ic-data-table-title-bar.js +136 -0
  119. package/dist/components/ic-data-table-title-bar.js.map +1 -0
  120. package/dist/components/ic-data-table.js +334 -49
  121. package/dist/components/ic-data-table.js.map +1 -1
  122. package/dist/components/ic-dialog.js +1 -2
  123. package/dist/components/ic-dialog.js.map +1 -1
  124. package/dist/components/ic-empty-state.js +1 -57
  125. package/dist/components/ic-empty-state.js.map +1 -1
  126. package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +38 -11
  127. package/dist/components/ic-empty-state2.js.map +1 -0
  128. package/dist/components/ic-input-component-container2.js +1 -1
  129. package/dist/components/ic-input-component-container2.js.map +1 -1
  130. package/dist/components/ic-link2.js +1 -1
  131. package/dist/components/ic-menu-item2.js +1 -1
  132. package/dist/components/ic-menu2.js +2 -2
  133. package/dist/components/ic-menu2.js.map +1 -1
  134. package/dist/components/ic-menu3.js +1 -1
  135. package/dist/components/ic-menu3.js.map +1 -1
  136. package/dist/components/ic-navigation-button.js +1 -1
  137. package/dist/components/ic-navigation-group.js +12 -15
  138. package/dist/components/ic-navigation-group.js.map +1 -1
  139. package/dist/components/ic-navigation-item.js +32 -28
  140. package/dist/components/ic-navigation-item.js.map +1 -1
  141. package/dist/components/ic-pagination-bar2.js +1 -1
  142. package/dist/components/ic-pagination-bar2.js.map +1 -1
  143. package/dist/components/ic-pagination-item2.js +1 -1
  144. package/dist/components/ic-pagination2.js +5 -5
  145. package/dist/components/ic-pagination2.js.map +1 -1
  146. package/dist/components/ic-radio-group.js +1 -1
  147. package/dist/components/ic-radio-option.js +1 -1
  148. package/dist/components/ic-search-bar.js +1 -1
  149. package/dist/components/ic-select-with-multi.js +14 -1
  150. package/dist/components/ic-select-with-multi.js.map +1 -1
  151. package/dist/components/ic-select2.js +1 -1
  152. package/dist/components/ic-switch.js +1 -1
  153. package/dist/components/ic-tab.js +1 -1
  154. package/dist/components/ic-text-field2.js +1 -1
  155. package/dist/components/ic-toggle-button.js +1 -1
  156. package/dist/components/ic-top-navigation.js +61 -47
  157. package/dist/components/ic-top-navigation.js.map +1 -1
  158. package/dist/components/ic-typography2.js +38 -12
  159. package/dist/components/ic-typography2.js.map +1 -1
  160. package/dist/core/core.css +1 -1
  161. package/dist/core/core.esm.js +1 -1
  162. package/dist/core/core.esm.js.map +1 -1
  163. package/dist/core/p-045359e1.entry.js +2 -0
  164. package/dist/core/{p-b1e3f20a.entry.js.map → p-045359e1.entry.js.map} +1 -1
  165. package/dist/core/{p-e9e7a7f9.entry.js → p-10fb4c46.entry.js} +2 -2
  166. package/dist/core/p-169bfa51.entry.js +2 -0
  167. package/dist/core/p-169bfa51.entry.js.map +1 -0
  168. package/dist/core/{p-21da96a9.entry.js → p-1ca332ca.entry.js} +2 -2
  169. package/dist/core/p-1e91f540.entry.js +2 -0
  170. package/dist/core/p-1e91f540.entry.js.map +1 -0
  171. package/dist/core/{p-170f6408.entry.js → p-204ace96.entry.js} +2 -2
  172. package/dist/core/{p-2f31bb92.entry.js → p-2eac7dcc.entry.js} +2 -2
  173. package/dist/core/p-347e8dab.entry.js +2 -0
  174. package/dist/core/p-347e8dab.entry.js.map +1 -0
  175. package/dist/core/p-3803a5b5.entry.js +2 -0
  176. package/dist/core/p-3803a5b5.entry.js.map +1 -0
  177. package/dist/core/p-4753bac8.entry.js +2 -0
  178. package/dist/core/p-4753bac8.entry.js.map +1 -0
  179. package/dist/core/{p-a16c6ff3.entry.js → p-4baa0916.entry.js} +2 -2
  180. package/dist/core/{p-655df7fe.entry.js → p-4f413fc0.entry.js} +2 -2
  181. package/dist/core/p-5171169f.entry.js +2 -0
  182. package/dist/core/p-5171169f.entry.js.map +1 -0
  183. package/dist/core/{p-56d01bdb.entry.js → p-595be57d.entry.js} +2 -2
  184. package/dist/core/{p-23a13636.entry.js → p-5ae93c16.entry.js} +2 -2
  185. package/dist/core/{p-0b32ba5b.entry.js → p-5e0c830b.entry.js} +2 -2
  186. package/dist/core/p-5ee4319c.entry.js +2 -0
  187. package/dist/core/p-5ee4319c.entry.js.map +1 -0
  188. package/dist/core/p-5f4e96ec.entry.js +2 -0
  189. package/dist/core/p-5f4e96ec.entry.js.map +1 -0
  190. package/dist/core/{p-95374ba1.entry.js → p-624d4f5f.entry.js} +2 -2
  191. package/dist/core/{p-df63896a.entry.js → p-6933f8e9.entry.js} +2 -2
  192. package/dist/core/{p-70b48a14.entry.js → p-6c3044b6.entry.js} +2 -2
  193. package/dist/core/p-7267fe19.entry.js +2 -0
  194. package/dist/core/p-7267fe19.entry.js.map +1 -0
  195. package/dist/core/{p-02d0ecd2.entry.js → p-75dac3d1.entry.js} +2 -2
  196. package/dist/core/{p-a6e9a8e7.entry.js → p-7ef8d616.entry.js} +2 -2
  197. package/dist/core/{p-0388b484.entry.js → p-81ddc39d.entry.js} +2 -2
  198. package/dist/core/{p-6e32683c.entry.js → p-869954a2.entry.js} +2 -2
  199. package/dist/core/{p-e2155d7f.entry.js → p-88d54b72.entry.js} +2 -2
  200. package/dist/core/{p-98c8d46a.entry.js → p-8b08d8fe.entry.js} +2 -2
  201. package/dist/core/{p-0080bbce.entry.js → p-917c5721.entry.js} +2 -2
  202. package/dist/core/p-942282cd.entry.js +2 -0
  203. package/dist/core/p-942282cd.entry.js.map +1 -0
  204. package/dist/core/p-96b3e7e2.js +2 -0
  205. package/dist/core/p-96b3e7e2.js.map +1 -0
  206. package/dist/core/p-9caf19eb.js +2 -0
  207. package/dist/core/p-9caf19eb.js.map +1 -0
  208. package/dist/core/{p-7373beb0.entry.js → p-a0f8efb2.entry.js} +2 -2
  209. package/dist/core/{p-1f1b4b8b.entry.js → p-a31031a5.entry.js} +2 -2
  210. package/dist/core/{p-221d03e1.entry.js → p-a434c3d4.entry.js} +2 -2
  211. package/dist/core/{p-25a458bf.entry.js → p-a43c12cd.entry.js} +2 -2
  212. package/dist/core/{p-31fdb740.entry.js → p-a50c3b9e.entry.js} +2 -2
  213. package/dist/core/p-aac4185b.entry.js +2 -0
  214. package/dist/core/p-aac4185b.entry.js.map +1 -0
  215. package/dist/core/{p-65a8c1d6.entry.js → p-ab09986c.entry.js} +2 -2
  216. package/dist/core/{p-9e3178e8.entry.js → p-b6639e4a.entry.js} +2 -2
  217. package/dist/core/{p-9e3178e8.entry.js.map → p-b6639e4a.entry.js.map} +1 -1
  218. package/dist/core/{p-e21083c8.entry.js → p-b82dcc29.entry.js} +2 -2
  219. package/dist/core/p-ba86928c.entry.js +2 -0
  220. package/dist/core/{p-4f0178a7.entry.js.map → p-ba86928c.entry.js.map} +1 -1
  221. package/dist/core/{p-b3ce9fe4.entry.js → p-c34848da.entry.js} +2 -2
  222. package/dist/core/{p-8f1aa87d.entry.js → p-d8469ac0.entry.js} +2 -2
  223. package/dist/core/{p-75a2cdac.entry.js → p-db9c03c0.entry.js} +2 -2
  224. package/dist/core/{p-fb58d1d1.entry.js → p-e3997d60.entry.js} +2 -2
  225. package/dist/core/{p-06aef486.entry.js → p-e834344e.entry.js} +2 -2
  226. package/dist/core/p-f14454b1.entry.js +2 -0
  227. package/dist/core/{p-9f9b3151.entry.js.map → p-f14454b1.entry.js.map} +1 -1
  228. package/dist/core/{p-ee09f1b3.entry.js → p-f3c840cd.entry.js} +2 -2
  229. package/dist/core/p-f6888309.entry.js +2 -0
  230. package/dist/core/p-f6888309.entry.js.map +1 -0
  231. package/dist/core/p-f74a8752.entry.js +2 -0
  232. package/dist/core/p-f74a8752.entry.js.map +1 -0
  233. package/dist/core/{p-b1e646e4.entry.js → p-f7a14c01.entry.js} +2 -2
  234. package/dist/core/{p-ce898d90.entry.js → p-f843da01.entry.js} +2 -2
  235. package/dist/core/p-fc5611e2.entry.js +2 -0
  236. package/dist/core/p-fc5611e2.entry.js.map +1 -0
  237. package/dist/esm/core.js +1 -1
  238. package/dist/esm/{helpers-b5f64263.js → helpers-12b4266a.js} +3 -8
  239. package/dist/esm/helpers-12b4266a.js.map +1 -0
  240. package/dist/esm/{helpers-f328a7b6.js → helpers-1f07eb61.js} +46 -92
  241. package/dist/esm/helpers-1f07eb61.js.map +1 -0
  242. package/dist/esm/ic-accordion.entry.js +1 -1
  243. package/dist/esm/ic-alert.entry.js +1 -1
  244. package/dist/esm/ic-back-to-top.entry.js +1 -1
  245. package/dist/esm/ic-badge.entry.js +8 -16
  246. package/dist/esm/ic-badge.entry.js.map +1 -1
  247. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  248. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  249. package/dist/esm/ic-button_3.entry.js +2 -8
  250. package/dist/esm/ic-button_3.entry.js.map +1 -1
  251. package/dist/esm/ic-card.entry.js +1 -1
  252. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  253. package/dist/esm/ic-checkbox.entry.js +1 -1
  254. package/dist/esm/ic-chip.entry.js +1 -1
  255. package/dist/esm/ic-data-row.entry.js +1 -1
  256. package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
  257. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
  258. package/dist/esm/ic-data-table.entry.js +309 -44
  259. package/dist/esm/ic-data-table.entry.js.map +1 -1
  260. package/dist/esm/ic-dialog.entry.js +2 -3
  261. package/dist/esm/ic-dialog.entry.js.map +1 -1
  262. package/dist/esm/ic-divider.entry.js +1 -1
  263. package/dist/esm/{ic-pagination-bar.entry.js → ic-empty-state_2.entry.js} +34 -5
  264. package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
  265. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  266. package/dist/esm/ic-footer-link.entry.js +1 -1
  267. package/dist/esm/ic-footer.entry.js +1 -1
  268. package/dist/esm/ic-hero.entry.js +1 -1
  269. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  270. package/dist/esm/{ic-menu.entry.js → ic-input-component-container_3.entry.js} +69 -7
  271. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -0
  272. package/dist/esm/ic-input-label_2.entry.js +81 -0
  273. package/dist/esm/ic-input-label_2.entry.js.map +1 -0
  274. package/dist/esm/ic-link.entry.js +1 -1
  275. package/dist/esm/ic-menu-group.entry.js +1 -1
  276. package/dist/esm/ic-menu-item.entry.js +1 -1
  277. package/dist/esm/ic-menu-with-multi.entry.js +1 -1
  278. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
  279. package/dist/esm/ic-navigation-button.entry.js +1 -1
  280. package/dist/esm/ic-navigation-group.entry.js +13 -16
  281. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  282. package/dist/esm/ic-navigation-item.entry.js +32 -28
  283. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  284. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  285. package/dist/esm/ic-page-header.entry.js +1 -1
  286. package/dist/esm/ic-pagination_4.entry.js +5 -5
  287. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  288. package/dist/esm/ic-popover-menu.entry.js +1 -1
  289. package/dist/esm/ic-radio-group.entry.js +1 -1
  290. package/dist/esm/ic-radio-option.entry.js +1 -1
  291. package/dist/esm/ic-search-bar.entry.js +1 -1
  292. package/dist/esm/ic-select-with-multi.entry.js +14 -1
  293. package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
  294. package/dist/esm/ic-side-navigation.entry.js +1 -1
  295. package/dist/esm/ic-status-tag.entry.js +1 -1
  296. package/dist/esm/ic-step.entry.js +1 -1
  297. package/dist/esm/ic-stepper.entry.js +1 -1
  298. package/dist/esm/ic-switch.entry.js +1 -1
  299. package/dist/esm/ic-tab-group.entry.js +1 -1
  300. package/dist/esm/ic-tab-panel.entry.js +1 -1
  301. package/dist/esm/ic-tab.entry.js +1 -1
  302. package/dist/esm/ic-theme.entry.js +1 -1
  303. package/dist/esm/ic-toast.entry.js +1 -1
  304. package/dist/esm/ic-toggle-button.entry.js +1 -1
  305. package/dist/esm/ic-top-navigation.entry.js +60 -46
  306. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  307. package/dist/esm/ic-typography.entry.js +36 -12
  308. package/dist/esm/ic-typography.entry.js.map +1 -1
  309. package/dist/esm/index-93509377.js +10 -18
  310. package/dist/esm/loader.js +1 -1
  311. package/dist/esm/polyfills/core-js.js +0 -0
  312. package/dist/esm/polyfills/dom.js +0 -0
  313. package/dist/esm/polyfills/es5-html-element.js +0 -0
  314. package/dist/esm/polyfills/index.js +0 -0
  315. package/dist/esm/polyfills/system.js +0 -0
  316. package/dist/types/components/ic-data-table/ic-data-table.d.ts +96 -1
  317. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +11 -0
  318. package/dist/types/components/ic-data-table/story-data.d.ts +99 -0
  319. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
  320. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +2 -2
  321. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +2 -2
  322. package/dist/types/components.d.ts +141 -390
  323. package/dist/types/utils/constants.d.ts +0 -37
  324. package/dist/types/utils/helpers.d.ts +16 -84
  325. package/dist/types/utils/types.d.ts +1 -92
  326. package/hydrate/index.js +952 -2965
  327. package/package.json +3 -4
  328. package/dist/cjs/date-helpers-c9551119.js +0 -150
  329. package/dist/cjs/date-helpers-c9551119.js.map +0 -1
  330. package/dist/cjs/helpers-7a069459.js.map +0 -1
  331. package/dist/cjs/helpers-f75cf7cf.js.map +0 -1
  332. package/dist/cjs/ic-date-input.cjs.entry.js +0 -1089
  333. package/dist/cjs/ic-date-input.cjs.entry.js.map +0 -1
  334. package/dist/cjs/ic-date-picker.cjs.entry.js +0 -1050
  335. package/dist/cjs/ic-date-picker.cjs.entry.js.map +0 -1
  336. package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
  337. package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
  338. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +0 -150
  339. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +0 -1
  340. package/dist/cjs/ic-menu.cjs.entry.js.map +0 -1
  341. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
  342. package/dist/collection/assets/calendar.svg +0 -3
  343. package/dist/collection/components/ic-date-input/ic-date-input.css +0 -560
  344. package/dist/collection/components/ic-date-input/ic-date-input.js +0 -1712
  345. package/dist/collection/components/ic-date-input/ic-date-input.js.map +0 -1
  346. package/dist/collection/components/ic-date-input/story-data.js +0 -28
  347. package/dist/collection/components/ic-date-input/story-data.js.map +0 -1
  348. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +0 -1139
  349. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +0 -1
  350. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +0 -42
  351. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +0 -1
  352. package/dist/collection/components/ic-date-picker/ic-date-picker.css +0 -878
  353. package/dist/collection/components/ic-date-picker/ic-date-picker.js +0 -1506
  354. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +0 -1
  355. package/dist/collection/components/ic-date-picker/ic-day-button.js +0 -36
  356. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +0 -1
  357. package/dist/collection/components/ic-date-picker/ic-month-picker.js +0 -29
  358. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +0 -1
  359. package/dist/collection/components/ic-date-picker/ic-year-picker.js +0 -39
  360. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +0 -1
  361. package/dist/collection/components/ic-date-picker/story-data.js +0 -148
  362. package/dist/collection/components/ic-date-picker/story-data.js.map +0 -1
  363. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +0 -1
  364. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +0 -207
  365. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +0 -1
  366. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +0 -962
  367. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +0 -1
  368. package/dist/collection/utils/date-helpers.js +0 -133
  369. package/dist/collection/utils/date-helpers.js.map +0 -1
  370. package/dist/components/ic-date-input.js +0 -8
  371. package/dist/components/ic-date-input.js.map +0 -1
  372. package/dist/components/ic-date-input2.js +0 -1318
  373. package/dist/components/ic-date-input2.js.map +0 -1
  374. package/dist/components/ic-date-picker.d.ts +0 -11
  375. package/dist/components/ic-date-picker.js +0 -1171
  376. package/dist/components/ic-date-picker.js.map +0 -1
  377. package/dist/core/p-1857e9a7.entry.js +0 -2
  378. package/dist/core/p-1857e9a7.entry.js.map +0 -1
  379. package/dist/core/p-2c3cdfa3.js +0 -2
  380. package/dist/core/p-2c3cdfa3.js.map +0 -1
  381. package/dist/core/p-33dd24eb.js +0 -2
  382. package/dist/core/p-33dd24eb.js.map +0 -1
  383. package/dist/core/p-40ba5a51.entry.js +0 -2
  384. package/dist/core/p-40ba5a51.entry.js.map +0 -1
  385. package/dist/core/p-4f0178a7.entry.js +0 -2
  386. package/dist/core/p-5d6750ea.entry.js +0 -2
  387. package/dist/core/p-5d6750ea.entry.js.map +0 -1
  388. package/dist/core/p-7c0f24b6.entry.js +0 -2
  389. package/dist/core/p-7c0f24b6.entry.js.map +0 -1
  390. package/dist/core/p-9f9b3151.entry.js +0 -2
  391. package/dist/core/p-a22fd338.entry.js +0 -2
  392. package/dist/core/p-a22fd338.entry.js.map +0 -1
  393. package/dist/core/p-aabab75f.entry.js +0 -2
  394. package/dist/core/p-aabab75f.entry.js.map +0 -1
  395. package/dist/core/p-b1e3f20a.entry.js +0 -2
  396. package/dist/core/p-c680c7f9.entry.js +0 -2
  397. package/dist/core/p-c680c7f9.entry.js.map +0 -1
  398. package/dist/core/p-c7590421.entry.js +0 -2
  399. package/dist/core/p-c7590421.entry.js.map +0 -1
  400. package/dist/core/p-cd799087.js +0 -2
  401. package/dist/core/p-cd799087.js.map +0 -1
  402. package/dist/core/p-d184d9e2.entry.js +0 -2
  403. package/dist/core/p-d184d9e2.entry.js.map +0 -1
  404. package/dist/core/p-df5d7aa4.entry.js +0 -2
  405. package/dist/core/p-df5d7aa4.entry.js.map +0 -1
  406. package/dist/core/p-e189f1d0.entry.js +0 -2
  407. package/dist/core/p-e189f1d0.entry.js.map +0 -1
  408. package/dist/core/p-e33bdca9.entry.js +0 -2
  409. package/dist/core/p-e33bdca9.entry.js.map +0 -1
  410. package/dist/core/p-eeacd610.entry.js +0 -2
  411. package/dist/core/p-eeacd610.entry.js.map +0 -1
  412. package/dist/core/p-f24c9356.entry.js +0 -2
  413. package/dist/core/p-f24c9356.entry.js.map +0 -1
  414. package/dist/core/p-f5d5f0be.entry.js +0 -2
  415. package/dist/core/p-f5d5f0be.entry.js.map +0 -1
  416. package/dist/core/p-f62cd6d2.entry.js +0 -2
  417. package/dist/core/p-f62cd6d2.entry.js.map +0 -1
  418. package/dist/esm/date-helpers-0e5e32a7.js +0 -136
  419. package/dist/esm/date-helpers-0e5e32a7.js.map +0 -1
  420. package/dist/esm/helpers-b5f64263.js.map +0 -1
  421. package/dist/esm/helpers-f328a7b6.js.map +0 -1
  422. package/dist/esm/ic-date-input.entry.js +0 -1085
  423. package/dist/esm/ic-date-input.entry.js.map +0 -1
  424. package/dist/esm/ic-date-picker.entry.js +0 -1046
  425. package/dist/esm/ic-date-picker.entry.js.map +0 -1
  426. package/dist/esm/ic-empty-state.entry.js.map +0 -1
  427. package/dist/esm/ic-input-component-container_4.entry.js +0 -143
  428. package/dist/esm/ic-input-component-container_4.entry.js.map +0 -1
  429. package/dist/esm/ic-menu.entry.js.map +0 -1
  430. package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
  431. package/dist/types/components/ic-date-input/ic-date-input.d.ts +0 -248
  432. package/dist/types/components/ic-date-input/story-data.d.ts +0 -1
  433. package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +0 -23
  434. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +0 -251
  435. package/dist/types/components/ic-date-picker/ic-day-button.d.ts +0 -16
  436. package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +0 -14
  437. package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +0 -16
  438. package/dist/types/components/ic-date-picker/story-data.d.ts +0 -22
  439. package/dist/types/utils/date-helpers.d.ts +0 -22
  440. /package/dist/core/{p-e9e7a7f9.entry.js.map → p-10fb4c46.entry.js.map} +0 -0
  441. /package/dist/core/{p-21da96a9.entry.js.map → p-1ca332ca.entry.js.map} +0 -0
  442. /package/dist/core/{p-170f6408.entry.js.map → p-204ace96.entry.js.map} +0 -0
  443. /package/dist/core/{p-2f31bb92.entry.js.map → p-2eac7dcc.entry.js.map} +0 -0
  444. /package/dist/core/{p-a16c6ff3.entry.js.map → p-4baa0916.entry.js.map} +0 -0
  445. /package/dist/core/{p-655df7fe.entry.js.map → p-4f413fc0.entry.js.map} +0 -0
  446. /package/dist/core/{p-56d01bdb.entry.js.map → p-595be57d.entry.js.map} +0 -0
  447. /package/dist/core/{p-23a13636.entry.js.map → p-5ae93c16.entry.js.map} +0 -0
  448. /package/dist/core/{p-0b32ba5b.entry.js.map → p-5e0c830b.entry.js.map} +0 -0
  449. /package/dist/core/{p-95374ba1.entry.js.map → p-624d4f5f.entry.js.map} +0 -0
  450. /package/dist/core/{p-df63896a.entry.js.map → p-6933f8e9.entry.js.map} +0 -0
  451. /package/dist/core/{p-70b48a14.entry.js.map → p-6c3044b6.entry.js.map} +0 -0
  452. /package/dist/core/{p-02d0ecd2.entry.js.map → p-75dac3d1.entry.js.map} +0 -0
  453. /package/dist/core/{p-a6e9a8e7.entry.js.map → p-7ef8d616.entry.js.map} +0 -0
  454. /package/dist/core/{p-0388b484.entry.js.map → p-81ddc39d.entry.js.map} +0 -0
  455. /package/dist/core/{p-6e32683c.entry.js.map → p-869954a2.entry.js.map} +0 -0
  456. /package/dist/core/{p-e2155d7f.entry.js.map → p-88d54b72.entry.js.map} +0 -0
  457. /package/dist/core/{p-98c8d46a.entry.js.map → p-8b08d8fe.entry.js.map} +0 -0
  458. /package/dist/core/{p-0080bbce.entry.js.map → p-917c5721.entry.js.map} +0 -0
  459. /package/dist/core/{p-7373beb0.entry.js.map → p-a0f8efb2.entry.js.map} +0 -0
  460. /package/dist/core/{p-1f1b4b8b.entry.js.map → p-a31031a5.entry.js.map} +0 -0
  461. /package/dist/core/{p-221d03e1.entry.js.map → p-a434c3d4.entry.js.map} +0 -0
  462. /package/dist/core/{p-25a458bf.entry.js.map → p-a43c12cd.entry.js.map} +0 -0
  463. /package/dist/core/{p-31fdb740.entry.js.map → p-a50c3b9e.entry.js.map} +0 -0
  464. /package/dist/core/{p-65a8c1d6.entry.js.map → p-ab09986c.entry.js.map} +0 -0
  465. /package/dist/core/{p-e21083c8.entry.js.map → p-b82dcc29.entry.js.map} +0 -0
  466. /package/dist/core/{p-b3ce9fe4.entry.js.map → p-c34848da.entry.js.map} +0 -0
  467. /package/dist/core/{p-8f1aa87d.entry.js.map → p-d8469ac0.entry.js.map} +0 -0
  468. /package/dist/core/{p-75a2cdac.entry.js.map → p-db9c03c0.entry.js.map} +0 -0
  469. /package/dist/core/{p-fb58d1d1.entry.js.map → p-e3997d60.entry.js.map} +0 -0
  470. /package/dist/core/{p-06aef486.entry.js.map → p-e834344e.entry.js.map} +0 -0
  471. /package/dist/core/{p-ee09f1b3.entry.js.map → p-f3c840cd.entry.js.map} +0 -0
  472. /package/dist/core/{p-b1e646e4.entry.js.map → p-f7a14c01.entry.js.map} +0 -0
  473. /package/dist/core/{p-ce898d90.entry.js.map → p-f843da01.entry.js.map} +0 -0
  474. /package/dist/types/components/{ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts} +0 -0
@@ -1,14 +1,139 @@
1
- import { h } from "@stencil/core";
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { h, Fragment, } from "@stencil/core";
2
3
  import unsortedIcon from "./assets/unsorted-icon.svg";
3
4
  import ascendingIcon from "./assets/ascending-icon.svg";
4
5
  import descendingIcon from "./assets/descending-icon.svg";
6
+ // Unable to import helper functions via @ukic/web-components
7
+ import { getSlotContent, isSlotUsed, pxToRem } from "../../utils/helpers";
8
+ /**
9
+ * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
10
+ * @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
11
+ * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.
12
+ * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.
13
+ */
5
14
  export class DataTable {
6
15
  constructor() {
16
+ this.DENSITY_HEIGHT_MULTIPLIER = {
17
+ dense: 0.8,
18
+ default: 1,
19
+ spacious: 1.2,
20
+ };
21
+ this.DENSITY_PADDING_HEIGHT_DIFF = {
22
+ dense: 8,
23
+ default: 16,
24
+ spacious: 20,
25
+ };
7
26
  this.SORT_ICONS = {
8
27
  unsorted: unsortedIcon,
9
28
  ascending: ascendingIcon,
10
29
  descending: descendingIcon,
11
30
  };
31
+ this.dataIsSorted = false;
32
+ this.hasLoadedForOneSecond = true;
33
+ this.itemsPerPageChanged = false;
34
+ this.updateTruncation = false;
35
+ this.removeDivStyles = (parentDiv) => {
36
+ parentDiv.style["height"] = null;
37
+ parentDiv.style["overflowY"] = null;
38
+ };
39
+ this.VERTICAL_CLASSES = ["cell-alignment-middle", "cell-alignment-bottom"];
40
+ this.removeVerticalAlignment = (el) => {
41
+ if (this.VERTICAL_CLASSES.some((className) => Array.from(el.classList).includes(className))) {
42
+ el.classList.remove(...this.VERTICAL_CLASSES);
43
+ }
44
+ };
45
+ this.setMaxLines = (typographyEl, cellContainer) => {
46
+ typographyEl.maxLines = Math.max(Math.floor(cellContainer.clientHeight / 24) - 1, 1); // Math.floor
47
+ typographyEl.checkCellTextMaxLines(cellContainer.clientHeight, typographyEl.scrollHeight);
48
+ this.removeDivStyles(cellContainer);
49
+ };
50
+ this.resetMaxLines = (typographyEl) => {
51
+ typographyEl.maxLines = undefined;
52
+ };
53
+ this.dataTruncation = () => {
54
+ Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)")).forEach((typographyEl) => {
55
+ const tableCell = typographyEl.closest("td");
56
+ const tooltip = typographyEl.closest("ic-tooltip");
57
+ const cellContainer = typographyEl.closest(".cell-container");
58
+ if (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element"))
59
+ return;
60
+ if (this.updateTruncation && !this.dataIsSorted) {
61
+ this.resetMaxLines(typographyEl);
62
+ cellContainer.appendChild(typographyEl);
63
+ tooltip === null || tooltip === void 0 ? void 0 : tooltip.remove();
64
+ }
65
+ if (
66
+ // If cellContainer is bigger than the content inside
67
+ (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > typographyEl.scrollHeight &&
68
+ !!typographyEl.scrollHeight) {
69
+ if (tooltip) {
70
+ // Move the content into the cell container and remove the tooltip as the content shouldnt be truncated
71
+ cellContainer.appendChild(typographyEl);
72
+ tooltip.remove();
73
+ }
74
+ else {
75
+ // Remove an maxLines as the content is not truncated
76
+ typographyEl.maxLines = undefined;
77
+ }
78
+ // If content is bigger than cellContainer
79
+ }
80
+ else if (typographyEl.scrollHeight > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
81
+ // and the truncationPattern is tooltips
82
+ if (this.truncationPattern === "tooltip") {
83
+ // Get the number of lines by dividing by 24 (the eq of a line of text - in height) and add as line-clamp CSS
84
+ typographyEl.style.webkitLineClamp = `${Math.floor(cellContainer.clientHeight / 24)}`;
85
+ // Items that already have a tooltip before a change to the items per change, keep their tooltip
86
+ if (tooltip && !this.itemsPerPageChanged && !this.dataIsSorted) {
87
+ cellContainer.appendChild(typographyEl);
88
+ tooltip.remove();
89
+ }
90
+ if (tooltip && this.dataIsSorted) {
91
+ tooltip.setAttribute("target", typographyEl.id);
92
+ tooltip.setAttribute("label", typographyEl.textContent);
93
+ }
94
+ if (!tooltip) {
95
+ // if truncation pattern is tooltip and the tooltip does not exist, dynamically create one and add the content inside
96
+ const tooltipEl = document.createElement("ic-tooltip");
97
+ const rowIndex = Number(typographyEl.id.match(/-(\d+)$/)[1]);
98
+ tooltipEl.setAttribute("target", typographyEl.id);
99
+ tooltipEl.setAttribute("label", typographyEl.textContent);
100
+ // Checks if the truncated text is in the first row of the displayed page
101
+ rowIndex === 0 && tooltipEl.setAttribute("placement", "bottom");
102
+ // Checks if the truncated text is in the last row of the displayed page
103
+ if (rowIndex === this.data.length - 1 ||
104
+ rowIndex === this.rowsPerPage - 1) {
105
+ tooltipEl.setAttribute("placement", "top");
106
+ }
107
+ // Checks if the truncated text is in the first column
108
+ typographyEl.id.includes(this.columns[0].key) &&
109
+ tooltipEl.setAttribute("placement", "right");
110
+ // Checks if the truncated text is in the last column
111
+ typographyEl.id.includes(this.columns[this.columns.length - 1].key) && tooltipEl.setAttribute("placement", "left");
112
+ typographyEl.parentNode.replaceChild(tooltipEl, typographyEl);
113
+ tooltipEl.appendChild(typographyEl);
114
+ }
115
+ }
116
+ else {
117
+ // Else set the maxLines and add the see more/see less truncation link under
118
+ this.setMaxLines(typographyEl, cellContainer);
119
+ // Truncation should remove all alignment styling
120
+ this.removeVerticalAlignment(tableCell);
121
+ this.removeVerticalAlignment(cellContainer);
122
+ }
123
+ }
124
+ });
125
+ if (this.updateTruncation) {
126
+ this.updateTruncation = false;
127
+ }
128
+ };
129
+ this.startLoadingTimer = () => {
130
+ this.hasLoadedForOneSecond = false;
131
+ this.timerStarted = Date.now();
132
+ setTimeout(() => {
133
+ this.hasLoadedForOneSecond = true;
134
+ this.timerStarted = null;
135
+ }, this.minimumLoadingDisplayDuration);
136
+ };
12
137
  this.isObject = (value) => typeof value === "object";
13
138
  this.notDefaultDensity = () => this.density !== "default";
14
139
  this.getCellContent = (cell, dataType) => {
@@ -26,9 +151,20 @@ export class DataTable {
26
151
  return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
27
152
  }
28
153
  };
29
- this.createCells = (row) => {
154
+ this.createUpdatingIndicator = () => {
155
+ const { appearance, description, max, min, progress } = this.updatingOptions || {};
156
+ 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" })));
157
+ };
158
+ this.setRowHeight = (height) => {
159
+ return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
160
+ this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
161
+ };
162
+ this.createCells = (row, rowIndex) => {
163
+ // Get the name of the row??
30
164
  const rowValues = Object.values(row);
31
165
  const rowKeys = Object.keys(row);
166
+ const rowTextWrapIndex = rowKeys.indexOf("textWrap");
167
+ const rowTextWrap = rowTextWrapIndex > -1 && rowValues[rowTextWrapIndex];
32
168
  let rowAlignment;
33
169
  let rowEmphasis;
34
170
  const headerIndex = rowKeys.indexOf("header");
@@ -37,43 +173,73 @@ export class DataTable {
37
173
  rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
38
174
  }
39
175
  return rowValues.map((cell, index) => {
40
- const { columnAlignment, dataType, emphasis } = this.columns[index];
176
+ const { columnAlignment, dataType, emphasis, icon, key, textWrap } = this.columns[index] || {};
177
+ const cellSlotName = `${key}-${rowIndex}`;
178
+ const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
179
+ const isNotElement = dataType !== "element";
41
180
  const cellValue = (key) => this.getObjectValue(cell, key);
42
- return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
43
- ["row-header"]: true,
44
- [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
45
- ["row-header-sticky"]: this.stickyRowHeaders,
46
- } }, cellValue("title"))) : (h("td", { innerHTML: dataType === "element" ? cell : null, class: {
47
- ["table-cell"]: true,
48
- [`table-density-${this.density}`]: this.notDefaultDensity(),
49
- [`data-type-${dataType}`]: true,
50
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
51
- this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
52
- !!this.getCellAlignment(cell, "horizontal"),
53
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
54
- rowAlignment ||
55
- this.getCellAlignment(cell, "vertical")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
56
- !!rowAlignment ||
57
- !!this.getCellAlignment(cell, "vertical"),
58
- } }, h("ic-typography", { variant: "body", class: {
59
- [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
60
- emphasis ||
61
- rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
62
- !!emphasis ||
63
- !!rowEmphasis,
64
- [`text-${this.density}`]: this.notDefaultDensity(),
65
- } }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType)))));
181
+ return (key &&
182
+ (rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
183
+ ["row-header"]: true,
184
+ [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
185
+ ["row-header-sticky"]: this.stickyRowHeaders,
186
+ } }, cellValue("title"))) : (h("td", { class: {
187
+ ["table-cell"]: true,
188
+ [`table-density-${this.density}`]: this.notDefaultDensity(),
189
+ [`data-type-${dataType}-cell`]: true,
190
+ [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
191
+ rowAlignment ||
192
+ this.getCellAlignment(cell, "vertical")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
193
+ !!rowAlignment ||
194
+ !!this.getCellAlignment(cell, "vertical"),
195
+ } }, h("div", { innerHTML: dataType === "element" && !isSlotUsed(this.el, cellSlotName)
196
+ ? cell
197
+ : null, class: {
198
+ "cell-container": isNotElement,
199
+ [`data-type-${dataType}`]: true,
200
+ [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
201
+ this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
202
+ !!this.getCellAlignment(cell, "horizontal"),
203
+ [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
204
+ rowAlignment ||
205
+ this.getCellAlignment(cell, "vertical")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
206
+ !!rowAlignment ||
207
+ !!this.getCellAlignment(cell, "vertical"),
208
+ }, style: {
209
+ height: this.currentRowHeight &&
210
+ !rowTextWrap &&
211
+ !textWrap &&
212
+ isNotElement
213
+ ? this.setRowHeight(this.currentRowHeight)
214
+ : null,
215
+ overflowY: this.truncationPattern === "tooltip" &&
216
+ !(rowTextWrap && textWrap) &&
217
+ isNotElement
218
+ ? "hidden"
219
+ : null,
220
+ } }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || (icon === null || icon === void 0 ? void 0 : icon.onAllCells)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || icon.icon }))), h("ic-typography", { id: cellSlotName, variant: "body", class: {
221
+ [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
222
+ emphasis ||
223
+ rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
224
+ !!emphasis ||
225
+ !!rowEmphasis,
226
+ [`text-${this.density}`]: this.notDefaultDensity(),
227
+ } }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType))))))))));
66
228
  });
67
229
  };
68
230
  this.createColumnHeaders = () => {
69
- return this.columns.map(({ cellAlignment, colspan, key, title }) => (h("th", { scope: "col", class: {
231
+ return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (h("th", { scope: "col", class: {
70
232
  ["column-header"]: true,
71
- [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
72
233
  [`table-density-${this.density}`]: this.notDefaultDensity(),
73
- }, colSpan: colspan }, this.sortable ? (h("div", { class: "column-header-inner-container" }, h("ic-typography", { variant: "body", class: {
234
+ ["updating-state-headers"]: this.updating && !this.loading,
235
+ }, colSpan: colspan }, h("div", { class: {
236
+ "column-header-inner-container": true,
237
+ [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
238
+ } }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
239
+ !icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), h("ic-typography", { variant: "body", class: {
74
240
  ["column-header-text"]: true,
75
241
  [`text-${this.density}`]: this.notDefaultDensity(),
76
- } }, title), h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
242
+ } }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
77
243
  // eslint-disable-next-line react/jsx-no-bind
78
244
  onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
79
245
  ? this.sortedColumnOrder
@@ -81,21 +247,47 @@ export class DataTable {
81
247
  ["sort-button"]: true,
82
248
  ["sort-button-unsorted"]: this.sortedColumn !== key ||
83
249
  this.sortedColumnOrder === "unsorted",
84
- } }))) : (h("ic-typography", { variant: "body", class: {
85
- ["column-header-text"]: true,
86
- [`text-${this.density}`]: this.notDefaultDensity(),
87
- } }, title)))));
250
+ } }))))));
251
+ };
252
+ this.onRowClick = (target, row) => {
253
+ if (target.tagName !== "IC-TYPOGRAPHY" &&
254
+ !target.style.getPropertyValue("--truncation-max-lines")) {
255
+ this.selectedRow =
256
+ !(this.selectedRow === row && this.loading && this.updating) && row;
257
+ }
88
258
  };
89
259
  this.createRows = () => {
90
260
  const data = this.showPagination
91
261
  ? this.data.slice(this.fromRow, this.toRow)
92
262
  : this.data.slice();
263
+ /**
264
+ * Ensures that createCells has a value in data to map over to actually render the slot.
265
+ * Removes the need for the user to add it multiple times.
266
+ */
267
+ this.columns.forEach(({ key }) => {
268
+ data.forEach((row, rowIndex) => {
269
+ const cellSlotName = `${key}-${rowIndex}`;
270
+ if (isSlotUsed(this.el, cellSlotName)) {
271
+ row[key] = getSlotContent(this.el, cellSlotName);
272
+ }
273
+ });
274
+ });
93
275
  return data
94
276
  .sort(!this.sortable ? undefined : this.getSortFunction())
95
- .map((row) => (h("tr", { onClick: () => (this.selectedRow = this.selectedRow !== row && row), class: {
96
- ["table-row"]: true,
97
- ["table-row-selected"]: this.selectedRow === row,
98
- } }, this.createCells(row))));
277
+ .map((row, index) => {
278
+ var _a;
279
+ const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
280
+ this.currentRowHeight = variableRowHeightVal
281
+ ? variableRowHeightVal !== "auto" && variableRowHeightVal
282
+ : this.globalRowHeight !== "auto" && this.globalRowHeight;
283
+ return (h("tr", {
284
+ // eslint-disable-next-line react/jsx-no-bind
285
+ onClick: (event) => this.onRowClick(event.target, row), class: {
286
+ ["table-row"]: true,
287
+ ["table-row-selected"]: this.selectedRow === row,
288
+ }
289
+ }, this.createCells(row, index)));
290
+ });
99
291
  };
100
292
  this.getObjectValue = (cell, key) => {
101
293
  return Object.values(cell)[Object.keys(cell).indexOf(key)];
@@ -140,6 +332,7 @@ export class DataTable {
140
332
  };
141
333
  this.sortRows = (column) => {
142
334
  const sortButton = this.el.shadowRoot.querySelector(`#sort-button-${column}`);
335
+ this.dataIsSorted = true;
143
336
  const sortOrders = this.sortOptions.sortOrders;
144
337
  if (column !== this.sortedColumn) {
145
338
  if (this.sortedColumn) {
@@ -173,7 +366,11 @@ export class DataTable {
173
366
  this.data = undefined;
174
367
  this.density = "default";
175
368
  this.embedded = false;
369
+ this.globalRowHeight = 40;
176
370
  this.hideColumnHeaders = false;
371
+ this.loading = false;
372
+ this.loadingOptions = undefined;
373
+ this.minimumLoadingDisplayDuration = 1000;
177
374
  this.paginationOptions = {
178
375
  itemsPerPage: [
179
376
  { label: "10", value: "10" },
@@ -194,13 +391,19 @@ export class DataTable {
194
391
  };
195
392
  this.stickyColumnHeaders = false;
196
393
  this.stickyRowHeaders = false;
394
+ this.truncationPattern = "tooltip";
395
+ this.updating = false;
396
+ this.updatingOptions = undefined;
397
+ this.variableRowHeight = undefined;
197
398
  }
198
399
  componentWillLoad() {
400
+ var _a;
199
401
  this.rowsPerPage = Number(this.paginationOptions.itemsPerPage[0].value);
200
402
  this.previousRowsPerPage = this.rowsPerPage;
201
403
  this.toRow = this.rowsPerPage;
202
404
  this.sortedColumn = this.sortOptions.defaultColumn;
203
405
  this.sortedColumnOrder = this.sortOptions.sortOrders[0];
406
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
204
407
  }
205
408
  componentDidLoad() {
206
409
  const tableElement = this.el.shadowRoot.querySelector("table");
@@ -209,10 +412,25 @@ export class DataTable {
209
412
  (tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
210
413
  this.scrollable = true;
211
414
  }
415
+ if (this.loading) {
416
+ this.startLoadingTimer();
417
+ this.showLoadingIndicator();
418
+ }
419
+ this.dataTruncation();
420
+ }
421
+ componentDidUpdate() {
422
+ if (!this.itemsPerPageChanged) {
423
+ this.updateTruncation = true;
424
+ }
425
+ this.dataTruncation();
426
+ this.itemsPerPageChanged = false;
427
+ this.dataIsSorted = false;
212
428
  }
213
429
  handleItemsPerPageChange(ev) {
214
430
  this.previousRowsPerPage = this.rowsPerPage;
215
431
  this.rowsPerPage = ev.detail.value;
432
+ this.itemsPerPageChanged = true;
433
+ this.dataTruncation();
216
434
  }
217
435
  handlePageChange(ev) {
218
436
  this.fromRow = (ev.detail.value - 1) * this.rowsPerPage;
@@ -228,20 +446,68 @@ export class DataTable {
228
446
  else {
229
447
  this.previousRowsPerPage = this.rowsPerPage;
230
448
  }
449
+ this.dataTruncation();
450
+ }
451
+ handleDensityChange(ev) {
452
+ this.density = ev.detail.value;
231
453
  }
232
454
  clickListener(ev) {
233
455
  if (ev.target !== this.el)
234
456
  this.selectedRow = undefined;
235
457
  }
458
+ loadingHandler(newValue) {
459
+ if (newValue)
460
+ this.startLoadingTimer();
461
+ if (this.loading) {
462
+ setTimeout(() => {
463
+ this.showLoadingIndicator();
464
+ }, 500);
465
+ }
466
+ }
467
+ dataHandler(newData) {
468
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
469
+ if (this.loading) {
470
+ !this.hasLoadedForOneSecond
471
+ ? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
472
+ (Date.now() - this.timerStarted))
473
+ : (this.loading = false);
474
+ }
475
+ this.updating && (this.updating = false);
476
+ }
477
+ rowHeightChangeHandler() {
478
+ this.dataTruncation();
479
+ const deleteTextWrapKey = (array) => array.forEach((val) => val.textWrap && delete val.textWrap);
480
+ deleteTextWrapKey(this.data);
481
+ deleteTextWrapKey(this.columns);
482
+ this.icRowHeightChange.emit();
483
+ }
484
+ /**
485
+ * Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.
486
+ */
487
+ async resetRowHeights() {
488
+ this.globalRowHeight = 40;
489
+ this.variableRowHeight = null;
490
+ }
491
+ showLoadingIndicator() {
492
+ this.loadingIndicator.classList.add("show");
493
+ }
236
494
  render() {
237
- const { caption, createColumnHeaders, createRows, data, hideColumnHeaders, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, } = this;
238
- return (h("div", { class: "table-container" }, h("div", { class: {
495
+ const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
496
+ return (h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
239
497
  ["table-row-container"]: true,
240
498
  scrollable,
241
- }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
499
+ }, 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: {
242
500
  ["column-header-sticky"]: stickyColumnHeaders,
243
501
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
244
- } }, 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
502
+ } }, h("tr", null, createColumnHeaders()))), updating &&
503
+ !loading &&
504
+ (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) &&
505
+ !loading &&
506
+ (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: {
507
+ "loading-empty": loading,
508
+ loading: true,
509
+ "show-background": loadingOptions.showBackground,
510
+ }, 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 && (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
245
511
  ? `${sortedColumn} sorted ${sortedColumnOrder}`
246
512
  : "table unsorted"))));
247
513
  }
@@ -314,7 +580,7 @@ export class DataTable {
314
580
  },
315
581
  "density": {
316
582
  "type": "string",
317
- "mutable": false,
583
+ "mutable": true,
318
584
  "complexType": {
319
585
  "original": "IcDataTableDensityOptions",
320
586
  "resolved": "\"default\" | \"dense\" | \"spacious\"",
@@ -354,6 +620,30 @@ export class DataTable {
354
620
  "reflect": false,
355
621
  "defaultValue": "false"
356
622
  },
623
+ "globalRowHeight": {
624
+ "type": "any",
625
+ "mutable": true,
626
+ "complexType": {
627
+ "original": "IcDataTableRowHeights",
628
+ "resolved": "\"auto\" | number",
629
+ "references": {
630
+ "IcDataTableRowHeights": {
631
+ "location": "import",
632
+ "path": "./ic-data-table.types",
633
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
634
+ }
635
+ }
636
+ },
637
+ "required": false,
638
+ "optional": true,
639
+ "docs": {
640
+ "tags": [],
641
+ "text": "Sets the row height on all rows in the table that aren't set using the variableRowHeight method."
642
+ },
643
+ "attribute": "global-row-height",
644
+ "reflect": false,
645
+ "defaultValue": "40"
646
+ },
357
647
  "hideColumnHeaders": {
358
648
  "type": "boolean",
359
649
  "mutable": false,
@@ -372,6 +662,63 @@ export class DataTable {
372
662
  "reflect": false,
373
663
  "defaultValue": "false"
374
664
  },
665
+ "loading": {
666
+ "type": "boolean",
667
+ "mutable": true,
668
+ "complexType": {
669
+ "original": "boolean",
670
+ "resolved": "boolean",
671
+ "references": {}
672
+ },
673
+ "required": false,
674
+ "optional": true,
675
+ "docs": {
676
+ "tags": [],
677
+ "text": "When set to `true`, the full table will show a loading state, featuring a radial indicator."
678
+ },
679
+ "attribute": "loading",
680
+ "reflect": false,
681
+ "defaultValue": "false"
682
+ },
683
+ "loadingOptions": {
684
+ "type": "unknown",
685
+ "mutable": false,
686
+ "complexType": {
687
+ "original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n }",
688
+ "resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; }",
689
+ "references": {
690
+ "IcThemeForegroundNoDefault": {
691
+ "location": "import",
692
+ "path": "@ukic/web-components/dist/types/utils/types",
693
+ "id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
694
+ }
695
+ }
696
+ },
697
+ "required": false,
698
+ "optional": true,
699
+ "docs": {
700
+ "tags": [],
701
+ "text": "Sets the props for the circular loading indicator used in the loading state."
702
+ }
703
+ },
704
+ "minimumLoadingDisplayDuration": {
705
+ "type": "number",
706
+ "mutable": false,
707
+ "complexType": {
708
+ "original": "number",
709
+ "resolved": "number",
710
+ "references": {}
711
+ },
712
+ "required": false,
713
+ "optional": true,
714
+ "docs": {
715
+ "tags": [],
716
+ "text": "The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component."
717
+ },
718
+ "attribute": "minimum-loading-display-duration",
719
+ "reflect": false,
720
+ "defaultValue": "1000"
721
+ },
375
722
  "paginationOptions": {
376
723
  "type": "unknown",
377
724
  "mutable": false,
@@ -497,6 +844,90 @@ export class DataTable {
497
844
  "attribute": "sticky-row-headers",
498
845
  "reflect": false,
499
846
  "defaultValue": "false"
847
+ },
848
+ "truncationPattern": {
849
+ "type": "string",
850
+ "mutable": false,
851
+ "complexType": {
852
+ "original": "IcDataTableTruncationTypes",
853
+ "resolved": "\"showHide\" | \"tooltip\"",
854
+ "references": {
855
+ "IcDataTableTruncationTypes": {
856
+ "location": "import",
857
+ "path": "./ic-data-table.types",
858
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableTruncationTypes"
859
+ }
860
+ }
861
+ },
862
+ "required": false,
863
+ "optional": true,
864
+ "docs": {
865
+ "tags": [],
866
+ "text": "For long text in cells that aren't set to textWrap, define how they should be truncated.\n`tooltip` adds a tooltip for the rest of the text, `showHide` adds the ic-typography \"See More\"/\"See Less\" buttons."
867
+ },
868
+ "attribute": "truncation-pattern",
869
+ "reflect": false,
870
+ "defaultValue": "\"tooltip\""
871
+ },
872
+ "updating": {
873
+ "type": "boolean",
874
+ "mutable": false,
875
+ "complexType": {
876
+ "original": "boolean",
877
+ "resolved": "boolean",
878
+ "references": {}
879
+ },
880
+ "required": false,
881
+ "optional": true,
882
+ "docs": {
883
+ "tags": [],
884
+ "text": "If `true`, the table displays a linear loading indicator below the header row to indicate an updating state."
885
+ },
886
+ "attribute": "updating",
887
+ "reflect": false,
888
+ "defaultValue": "false"
889
+ },
890
+ "updatingOptions": {
891
+ "type": "unknown",
892
+ "mutable": false,
893
+ "complexType": {
894
+ "original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n }",
895
+ "resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; max?: number; min?: number; progress?: number; }",
896
+ "references": {
897
+ "IcThemeForegroundNoDefault": {
898
+ "location": "import",
899
+ "path": "@ukic/web-components/dist/types/utils/types",
900
+ "id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
901
+ }
902
+ }
903
+ },
904
+ "required": false,
905
+ "optional": true,
906
+ "docs": {
907
+ "tags": [],
908
+ "text": "Sets the props for the linear loading indicator used in the updating state."
909
+ }
910
+ },
911
+ "variableRowHeight": {
912
+ "type": "unknown",
913
+ "mutable": true,
914
+ "complexType": {
915
+ "original": "(params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null",
916
+ "resolved": "(params: { [key: string]: any; index: number; }) => IcDataTableRowHeights",
917
+ "references": {
918
+ "IcDataTableRowHeights": {
919
+ "location": "import",
920
+ "path": "./ic-data-table.types",
921
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
922
+ }
923
+ }
924
+ },
925
+ "required": false,
926
+ "optional": true,
927
+ "docs": {
928
+ "tags": [],
929
+ "text": "Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\nIf the function returns `null`, that row's height will be set to the `globalRowHeight` property."
930
+ }
500
931
  }
501
932
  };
502
933
  }
@@ -513,7 +944,61 @@ export class DataTable {
513
944
  "toRow": {}
514
945
  };
515
946
  }
947
+ static get events() {
948
+ return [{
949
+ "method": "icRowHeightChange",
950
+ "name": "icRowHeightChange",
951
+ "bubbles": true,
952
+ "cancelable": true,
953
+ "composed": true,
954
+ "docs": {
955
+ "tags": [],
956
+ "text": "Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table."
957
+ },
958
+ "complexType": {
959
+ "original": "void",
960
+ "resolved": "void",
961
+ "references": {}
962
+ }
963
+ }];
964
+ }
965
+ static get methods() {
966
+ return {
967
+ "resetRowHeights": {
968
+ "complexType": {
969
+ "signature": "() => Promise<void>",
970
+ "parameters": [],
971
+ "references": {
972
+ "Promise": {
973
+ "location": "global",
974
+ "id": "global::Promise"
975
+ }
976
+ },
977
+ "return": "Promise<void>"
978
+ },
979
+ "docs": {
980
+ "text": "Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.",
981
+ "tags": []
982
+ }
983
+ }
984
+ };
985
+ }
516
986
  static get elementRef() { return "el"; }
987
+ static get watchers() {
988
+ return [{
989
+ "propName": "loading",
990
+ "methodName": "loadingHandler"
991
+ }, {
992
+ "propName": "data",
993
+ "methodName": "dataHandler"
994
+ }, {
995
+ "propName": "globalRowHeight",
996
+ "methodName": "rowHeightChangeHandler"
997
+ }, {
998
+ "propName": "variableRowHeight",
999
+ "methodName": "rowHeightChangeHandler"
1000
+ }];
1001
+ }
517
1002
  static get listeners() {
518
1003
  return [{
519
1004
  "name": "icItemsPerPageChange",
@@ -527,6 +1012,12 @@ export class DataTable {
527
1012
  "target": undefined,
528
1013
  "capture": false,
529
1014
  "passive": false
1015
+ }, {
1016
+ "name": "icTableDensityUpdate",
1017
+ "method": "handleDensityChange",
1018
+ "target": undefined,
1019
+ "capture": false,
1020
+ "passive": false
530
1021
  }, {
531
1022
  "name": "click",
532
1023
  "method": "clickListener",