@ukic/canary-web-components 2.0.0-canary.20 → 2.0.0-canary.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (449) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-73d277d1.js → helpers-093368be.js} +6 -2
  3. package/dist/cjs/helpers-093368be.js.map +1 -0
  4. package/dist/cjs/{helpers-fc9441f8.js → helpers-85c5ca15.js} +94 -1
  5. package/dist/cjs/helpers-85c5ca15.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-alert.cjs.entry.js +17 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-button_3.cjs.entry.js +11 -6
  15. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-card-horizontal.cjs.entry.js +131 -0
  17. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
  18. package/dist/cjs/ic-card.cjs.entry.js +25 -1
  19. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-chip.cjs.entry.js +9 -3
  23. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-classification-banner.cjs.entry.js +12 -3
  25. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-data-table.cjs.entry.js +526 -71
  29. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-date-input.cjs.entry.js +4 -3
  31. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-date-picker.cjs.entry.js +15 -4
  33. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-empty-state_2.cjs.entry.js +21 -2
  37. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-hero.cjs.entry.js +17 -1
  42. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-menu.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-pagination_4.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-radio-group.cjs.entry.js +41 -22
  58. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-select-with-multi.cjs.entry.js +2 -30
  62. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  72. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  75. package/dist/cjs/ic-tree-item.cjs.entry.js +241 -0
  76. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
  77. package/dist/cjs/ic-tree-view.cjs.entry.js +203 -0
  78. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
  79. package/dist/cjs/ic-typography.cjs.entry.js +47 -12
  80. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  81. package/dist/cjs/index-4cf27b16.js +12 -0
  82. package/dist/cjs/loader.cjs.js +1 -1
  83. package/dist/collection/assets/arrow-dropdown.svg +3 -0
  84. package/dist/collection/collection-manifest.json +4 -1
  85. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +655 -0
  86. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +373 -0
  87. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
  88. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
  89. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
  90. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +130 -0
  91. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
  92. package/dist/collection/components/ic-data-table/ic-data-table.css +55 -5
  93. package/dist/collection/components/ic-data-table/ic-data-table.js +570 -77
  94. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  95. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  96. package/dist/collection/components/ic-data-table/story-data.js +364 -21
  97. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  98. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +1 -1
  99. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  100. package/dist/collection/components/ic-date-input/ic-date-input.js +21 -2
  101. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  102. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +7 -0
  103. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
  104. package/dist/collection/components/ic-date-picker/ic-date-picker.js +34 -3
  105. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  106. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +29 -0
  107. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -1
  108. package/dist/collection/components/ic-tree-item/ic-tree-item.css +150 -0
  109. package/dist/collection/components/ic-tree-item/ic-tree-item.js +592 -0
  110. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
  111. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +114 -0
  112. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
  113. package/dist/collection/components/ic-tree-view/ic-tree-view.css +56 -0
  114. package/dist/collection/components/ic-tree-view/ic-tree-view.js +296 -0
  115. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
  116. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
  117. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
  118. package/dist/collection/utils/helpers.js +4 -0
  119. package/dist/collection/utils/helpers.js.map +1 -1
  120. package/dist/components/helpers.js +5 -2
  121. package/dist/components/helpers.js.map +1 -1
  122. package/dist/components/helpers2.js +88 -1
  123. package/dist/components/helpers2.js.map +1 -1
  124. package/dist/components/ic-alert2.js +18 -2
  125. package/dist/components/ic-alert2.js.map +1 -1
  126. package/dist/components/ic-back-to-top.js +1 -1
  127. package/dist/components/ic-badge.js +1 -1
  128. package/dist/components/ic-breadcrumb-group.js +1 -1
  129. package/dist/components/ic-breadcrumb2.js +1 -1
  130. package/dist/components/ic-button2.js +1 -1
  131. package/dist/components/ic-card-horizontal.d.ts +11 -0
  132. package/dist/components/ic-card-horizontal.js +167 -0
  133. package/dist/components/ic-card-horizontal.js.map +1 -0
  134. package/dist/components/ic-card.js +26 -2
  135. package/dist/components/ic-card.js.map +1 -1
  136. package/dist/components/ic-checkbox-group.js +1 -1
  137. package/dist/components/ic-checkbox.js +1 -1
  138. package/dist/components/ic-chip.js +9 -3
  139. package/dist/components/ic-chip.js.map +1 -1
  140. package/dist/components/ic-classification-banner.js +12 -3
  141. package/dist/components/ic-classification-banner.js.map +1 -1
  142. package/dist/components/ic-data-row.js +1 -1
  143. package/dist/components/ic-data-table.js +531 -72
  144. package/dist/components/ic-data-table.js.map +1 -1
  145. package/dist/components/ic-date-input2.js +5 -3
  146. package/dist/components/ic-date-input2.js.map +1 -1
  147. package/dist/components/ic-date-picker.js +17 -4
  148. package/dist/components/ic-date-picker.js.map +1 -1
  149. package/dist/components/ic-dialog.js +1 -1
  150. package/dist/components/ic-divider2.js +1 -1
  151. package/dist/components/ic-empty-state2.js +21 -2
  152. package/dist/components/ic-empty-state2.js.map +1 -1
  153. package/dist/components/ic-footer-link-group.js +1 -1
  154. package/dist/components/ic-footer-link.js +1 -1
  155. package/dist/components/ic-footer.js +1 -1
  156. package/dist/components/ic-hero.js +18 -2
  157. package/dist/components/ic-hero.js.map +1 -1
  158. package/dist/components/ic-horizontal-scroll2.js +1 -1
  159. package/dist/components/ic-input-component-container2.js +1 -1
  160. package/dist/components/ic-input-label2.js +1 -1
  161. package/dist/components/ic-input-validation2.js +1 -1
  162. package/dist/components/ic-link2.js +1 -1
  163. package/dist/components/ic-loading-indicator2.js +1 -1
  164. package/dist/components/ic-menu-group.js +1 -1
  165. package/dist/components/ic-menu-item2.js +1 -1
  166. package/dist/components/ic-menu3.js +1 -1
  167. package/dist/components/ic-navigation-button.js +1 -1
  168. package/dist/components/ic-navigation-group.js +1 -1
  169. package/dist/components/ic-navigation-item.js +1 -1
  170. package/dist/components/ic-navigation-menu2.js +1 -1
  171. package/dist/components/ic-page-header.js +1 -1
  172. package/dist/components/ic-pagination-bar2.js +1 -1
  173. package/dist/components/ic-pagination-item2.js +1 -1
  174. package/dist/components/ic-popover-menu.js +1 -1
  175. package/dist/components/ic-radio-group.js +41 -22
  176. package/dist/components/ic-radio-group.js.map +1 -1
  177. package/dist/components/ic-radio-option.js +1 -1
  178. package/dist/components/ic-search-bar.js +1 -1
  179. package/dist/components/ic-select-with-multi.js +1 -29
  180. package/dist/components/ic-select-with-multi.js.map +1 -1
  181. package/dist/components/ic-select2.js +1 -1
  182. package/dist/components/ic-side-navigation.js +1 -1
  183. package/dist/components/ic-step.js +1 -1
  184. package/dist/components/ic-stepper.js +1 -1
  185. package/dist/components/ic-switch.js +1 -1
  186. package/dist/components/ic-tab-panel.js +1 -1
  187. package/dist/components/ic-text-field2.js +1 -1
  188. package/dist/components/ic-theme.js +1 -1
  189. package/dist/components/ic-toast.js +1 -1
  190. package/dist/components/ic-tooltip2.js +12 -5
  191. package/dist/components/ic-tooltip2.js.map +1 -1
  192. package/dist/components/ic-top-navigation.js +1 -1
  193. package/dist/components/ic-tree-item.d.ts +11 -0
  194. package/dist/components/ic-tree-item.js +286 -0
  195. package/dist/components/ic-tree-item.js.map +1 -0
  196. package/dist/components/ic-tree-view.d.ts +11 -0
  197. package/dist/components/ic-tree-view.js +237 -0
  198. package/dist/components/ic-tree-view.js.map +1 -0
  199. package/dist/components/ic-typography2.js +53 -15
  200. package/dist/components/ic-typography2.js.map +1 -1
  201. package/dist/core/core.esm.js +1 -1
  202. package/dist/core/core.esm.js.map +1 -1
  203. package/dist/core/{p-0cdd4c93.entry.js → p-0180e00a.entry.js} +2 -2
  204. package/dist/core/{p-0970c8a1.entry.js → p-046f4de6.entry.js} +2 -2
  205. package/dist/core/{p-2536b95b.entry.js → p-06732eaf.entry.js} +2 -2
  206. package/dist/core/p-0ec04c16.entry.js +2 -0
  207. package/dist/core/p-0ec04c16.entry.js.map +1 -0
  208. package/dist/core/{p-4c57eef0.entry.js → p-13993bf3.entry.js} +2 -2
  209. package/dist/core/p-16a48a63.entry.js +2 -0
  210. package/dist/core/p-16a48a63.entry.js.map +1 -0
  211. package/dist/core/{p-12120521.entry.js → p-216fbd5e.entry.js} +2 -2
  212. package/dist/core/{p-14b363d0.entry.js → p-2d063032.entry.js} +2 -2
  213. package/dist/core/{p-e2387530.entry.js → p-2ee5d3fb.entry.js} +2 -2
  214. package/dist/core/p-355c8532.entry.js +2 -0
  215. package/dist/core/p-355c8532.entry.js.map +1 -0
  216. package/dist/core/p-3a59391f.entry.js +2 -0
  217. package/dist/core/{p-2b9b9f6e.entry.js.map → p-3a59391f.entry.js.map} +1 -1
  218. package/dist/core/{p-edf3411a.entry.js → p-3f2723aa.entry.js} +2 -2
  219. package/dist/core/p-401d0c66.entry.js +2 -0
  220. package/dist/core/p-401d0c66.entry.js.map +1 -0
  221. package/dist/core/p-413e68be.entry.js +2 -0
  222. package/dist/core/{p-60ca1000.entry.js.map → p-413e68be.entry.js.map} +1 -1
  223. package/dist/core/{p-a484c41c.entry.js → p-418a84d4.entry.js} +2 -2
  224. package/dist/core/{p-a1369740.entry.js → p-41916ef7.entry.js} +2 -2
  225. package/dist/core/p-4309460f.entry.js +2 -0
  226. package/dist/core/p-4309460f.entry.js.map +1 -0
  227. package/dist/core/{p-7168b71a.entry.js → p-486a6957.entry.js} +2 -2
  228. package/dist/core/{p-87868dd2.entry.js → p-5348af01.entry.js} +2 -2
  229. package/dist/core/p-57043b1e.entry.js +2 -0
  230. package/dist/core/p-57043b1e.entry.js.map +1 -0
  231. package/dist/core/p-59993f36.entry.js +2 -0
  232. package/dist/core/p-59993f36.entry.js.map +1 -0
  233. package/dist/core/{p-c2b5e7b1.entry.js → p-5fea8f1c.entry.js} +2 -2
  234. package/dist/core/{p-c2b5e7b1.entry.js.map → p-5fea8f1c.entry.js.map} +1 -1
  235. package/dist/core/{p-eeae7272.entry.js → p-6398a726.entry.js} +2 -2
  236. package/dist/core/{p-0629691b.entry.js → p-648fb902.entry.js} +2 -2
  237. package/dist/core/{p-7e850bad.entry.js → p-673a4a62.entry.js} +2 -2
  238. package/dist/core/{p-0ecde7a8.entry.js → p-67ae9d37.entry.js} +2 -2
  239. package/dist/core/{p-d3e186a3.entry.js → p-6b01e096.entry.js} +2 -2
  240. package/dist/core/{p-92a858f7.entry.js → p-6b1fcf87.entry.js} +2 -2
  241. package/dist/core/{p-94ce6f29.entry.js → p-6fb3d61e.entry.js} +2 -2
  242. package/dist/core/{p-47c91e08.entry.js → p-789ae7f5.entry.js} +2 -2
  243. package/dist/core/{p-1440cdd1.js → p-8128572e.js} +2 -2
  244. package/dist/core/p-8128572e.js.map +1 -0
  245. package/dist/core/p-84eaa486.entry.js +2 -0
  246. package/dist/core/p-84eaa486.entry.js.map +1 -0
  247. package/dist/core/{p-24f9f6d4.entry.js → p-89c7ea3e.entry.js} +2 -2
  248. package/dist/core/{p-992b6161.entry.js → p-8d276e8f.entry.js} +2 -2
  249. package/dist/core/{p-db5c4969.entry.js → p-91cf89c8.entry.js} +2 -2
  250. package/dist/core/p-91cf89c8.entry.js.map +1 -0
  251. package/dist/core/p-969cadfa.entry.js +2 -0
  252. package/dist/core/p-969cadfa.entry.js.map +1 -0
  253. package/dist/core/p-97f141a6.entry.js +2 -0
  254. package/dist/core/p-97f141a6.entry.js.map +1 -0
  255. package/dist/core/{p-cb7793b0.entry.js → p-99185fd5.entry.js} +2 -2
  256. package/dist/core/{p-4883e147.entry.js → p-99f96c33.entry.js} +2 -2
  257. package/dist/core/p-a052bb95.entry.js +2 -0
  258. package/dist/core/p-a052bb95.entry.js.map +1 -0
  259. package/dist/core/{p-8100f45c.entry.js → p-a72af8db.entry.js} +2 -2
  260. package/dist/core/{p-6eafa62e.entry.js → p-a787bba7.entry.js} +2 -2
  261. package/dist/core/{p-6c5c6aaf.entry.js → p-aa72f551.entry.js} +2 -2
  262. package/dist/core/{p-781e8391.entry.js → p-aaaa9261.entry.js} +2 -2
  263. package/dist/core/p-adbe0d89.js +2 -0
  264. package/dist/core/p-adbe0d89.js.map +1 -0
  265. package/dist/core/{p-646b886c.entry.js → p-b29e96b5.entry.js} +2 -2
  266. package/dist/core/p-b97eba08.entry.js +2 -0
  267. package/dist/core/p-b97eba08.entry.js.map +1 -0
  268. package/dist/core/{p-3245554e.entry.js → p-bfc5f3f4.entry.js} +2 -2
  269. package/dist/core/{p-e1e04f34.entry.js → p-cb3afdbf.entry.js} +2 -2
  270. package/dist/core/{p-6cf5343b.entry.js → p-ccf72538.entry.js} +2 -2
  271. package/dist/core/{p-3eb33ef4.entry.js → p-ce0999f1.entry.js} +2 -2
  272. package/dist/core/{p-0a99994a.entry.js → p-d02a4d1b.entry.js} +2 -2
  273. package/dist/core/{p-b7161816.entry.js → p-d8322108.entry.js} +2 -2
  274. package/dist/core/{p-d67a5c90.entry.js → p-d86cdbc8.entry.js} +2 -2
  275. package/dist/core/{p-a5bb7bb0.entry.js → p-da8255b8.entry.js} +2 -2
  276. package/dist/core/{p-6a7a5ed5.entry.js → p-e9f5ebb3.entry.js} +2 -2
  277. package/dist/core/p-e9f5ebb3.entry.js.map +1 -0
  278. package/dist/core/p-ede631c5.entry.js +2 -0
  279. package/dist/core/p-ede631c5.entry.js.map +1 -0
  280. package/dist/core/{p-66c26240.entry.js → p-f09b2041.entry.js} +2 -2
  281. package/dist/core/{p-b8d3f121.entry.js → p-f1044e4d.entry.js} +2 -2
  282. package/dist/core/{p-af21360a.entry.js → p-f10f7f37.entry.js} +2 -2
  283. package/dist/core/{p-34cc7b3d.entry.js → p-fa77211d.entry.js} +2 -2
  284. package/dist/esm/core.js +1 -1
  285. package/dist/esm/{helpers-4e2e4787.js → helpers-886489d5.js} +6 -3
  286. package/dist/esm/helpers-886489d5.js.map +1 -0
  287. package/dist/esm/{helpers-1cd71f8a.js → helpers-f543bc77.js} +89 -2
  288. package/dist/{cjs/helpers-fc9441f8.js.map → esm/helpers-f543bc77.js.map} +1 -1
  289. package/dist/esm/ic-accordion-group.entry.js +1 -1
  290. package/dist/esm/ic-accordion.entry.js +1 -1
  291. package/dist/esm/ic-alert.entry.js +18 -2
  292. package/dist/esm/ic-alert.entry.js.map +1 -1
  293. package/dist/esm/ic-back-to-top.entry.js +1 -1
  294. package/dist/esm/ic-badge.entry.js +1 -1
  295. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  296. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  297. package/dist/esm/ic-button_3.entry.js +11 -6
  298. package/dist/esm/ic-button_3.entry.js.map +1 -1
  299. package/dist/esm/ic-card-horizontal.entry.js +127 -0
  300. package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
  301. package/dist/esm/ic-card.entry.js +26 -2
  302. package/dist/esm/ic-card.entry.js.map +1 -1
  303. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  304. package/dist/esm/ic-checkbox.entry.js +1 -1
  305. package/dist/esm/ic-chip.entry.js +9 -3
  306. package/dist/esm/ic-chip.entry.js.map +1 -1
  307. package/dist/esm/ic-classification-banner.entry.js +12 -3
  308. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  309. package/dist/esm/ic-data-row.entry.js +1 -1
  310. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  311. package/dist/esm/ic-data-table.entry.js +526 -71
  312. package/dist/esm/ic-data-table.entry.js.map +1 -1
  313. package/dist/esm/ic-date-input.entry.js +4 -3
  314. package/dist/esm/ic-date-input.entry.js.map +1 -1
  315. package/dist/esm/ic-date-picker.entry.js +15 -4
  316. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  317. package/dist/esm/ic-dialog.entry.js +1 -1
  318. package/dist/esm/ic-divider.entry.js +1 -1
  319. package/dist/esm/ic-empty-state_2.entry.js +22 -3
  320. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  321. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  322. package/dist/esm/ic-footer-link.entry.js +1 -1
  323. package/dist/esm/ic-footer.entry.js +1 -1
  324. package/dist/esm/ic-hero.entry.js +18 -2
  325. package/dist/esm/ic-hero.entry.js.map +1 -1
  326. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  327. package/dist/esm/ic-input-component-container_4.entry.js +1 -1
  328. package/dist/esm/ic-link.entry.js +1 -1
  329. package/dist/esm/ic-menu-group.entry.js +1 -1
  330. package/dist/esm/ic-menu-item.entry.js +1 -1
  331. package/dist/esm/ic-menu-with-multi.entry.js +1 -1
  332. package/dist/esm/ic-menu.entry.js +1 -1
  333. package/dist/esm/ic-navigation-button.entry.js +1 -1
  334. package/dist/esm/ic-navigation-group.entry.js +1 -1
  335. package/dist/esm/ic-navigation-item.entry.js +1 -1
  336. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  337. package/dist/esm/ic-page-header.entry.js +1 -1
  338. package/dist/esm/ic-pagination_4.entry.js +1 -1
  339. package/dist/esm/ic-popover-menu.entry.js +1 -1
  340. package/dist/esm/ic-radio-group.entry.js +41 -22
  341. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  342. package/dist/esm/ic-radio-option.entry.js +1 -1
  343. package/dist/esm/ic-search-bar.entry.js +1 -1
  344. package/dist/esm/ic-select-with-multi.entry.js +1 -29
  345. package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
  346. package/dist/esm/ic-side-navigation.entry.js +1 -1
  347. package/dist/esm/ic-status-tag.entry.js +1 -1
  348. package/dist/esm/ic-step.entry.js +1 -1
  349. package/dist/esm/ic-stepper.entry.js +1 -1
  350. package/dist/esm/ic-switch.entry.js +1 -1
  351. package/dist/esm/ic-tab-group.entry.js +1 -1
  352. package/dist/esm/ic-tab-panel.entry.js +1 -1
  353. package/dist/esm/ic-tab.entry.js +1 -1
  354. package/dist/esm/ic-theme.entry.js +1 -1
  355. package/dist/esm/ic-toast.entry.js +1 -1
  356. package/dist/esm/ic-toggle-button.entry.js +1 -1
  357. package/dist/esm/ic-top-navigation.entry.js +1 -1
  358. package/dist/esm/ic-tree-item.entry.js +237 -0
  359. package/dist/esm/ic-tree-item.entry.js.map +1 -0
  360. package/dist/esm/ic-tree-view.entry.js +199 -0
  361. package/dist/esm/ic-tree-view.entry.js.map +1 -0
  362. package/dist/esm/ic-typography.entry.js +48 -13
  363. package/dist/esm/ic-typography.entry.js.map +1 -1
  364. package/dist/esm/index-93509377.js +12 -0
  365. package/dist/esm/loader.js +1 -1
  366. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
  367. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
  368. package/dist/types/components/ic-data-table/ic-data-table.d.ts +68 -7
  369. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +9 -0
  370. package/dist/types/components/ic-data-table/story-data.d.ts +112 -0
  371. package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
  372. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +5 -0
  373. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +95 -0
  374. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +40 -0
  375. package/dist/types/components.d.ts +272 -6
  376. package/dist/types/utils/helpers.d.ts +1 -0
  377. package/hydrate/index.js +2198 -899
  378. package/package.json +3 -3
  379. package/dist/cjs/helpers-73d277d1.js.map +0 -1
  380. package/dist/core/p-06e0b5b6.entry.js +0 -2
  381. package/dist/core/p-06e0b5b6.entry.js.map +0 -1
  382. package/dist/core/p-0b14be10.entry.js +0 -2
  383. package/dist/core/p-0b14be10.entry.js.map +0 -1
  384. package/dist/core/p-1440cdd1.js.map +0 -1
  385. package/dist/core/p-20d4ded5.js +0 -2
  386. package/dist/core/p-20d4ded5.js.map +0 -1
  387. package/dist/core/p-2b9b9f6e.entry.js +0 -2
  388. package/dist/core/p-34e72f79.entry.js +0 -2
  389. package/dist/core/p-34e72f79.entry.js.map +0 -1
  390. package/dist/core/p-352b9c17.entry.js +0 -2
  391. package/dist/core/p-352b9c17.entry.js.map +0 -1
  392. package/dist/core/p-3fa986f8.entry.js +0 -2
  393. package/dist/core/p-3fa986f8.entry.js.map +0 -1
  394. package/dist/core/p-4ec1ce96.entry.js +0 -2
  395. package/dist/core/p-4ec1ce96.entry.js.map +0 -1
  396. package/dist/core/p-60ca1000.entry.js +0 -2
  397. package/dist/core/p-6a7a5ed5.entry.js.map +0 -1
  398. package/dist/core/p-9769c195.entry.js +0 -2
  399. package/dist/core/p-9769c195.entry.js.map +0 -1
  400. package/dist/core/p-cb15d0b6.entry.js +0 -2
  401. package/dist/core/p-cb15d0b6.entry.js.map +0 -1
  402. package/dist/core/p-db5c4969.entry.js.map +0 -1
  403. package/dist/core/p-e32cce28.entry.js +0 -2
  404. package/dist/core/p-e32cce28.entry.js.map +0 -1
  405. package/dist/core/p-ef996e40.entry.js +0 -2
  406. package/dist/core/p-ef996e40.entry.js.map +0 -1
  407. package/dist/esm/helpers-1cd71f8a.js.map +0 -1
  408. package/dist/esm/helpers-4e2e4787.js.map +0 -1
  409. /package/dist/core/{p-0cdd4c93.entry.js.map → p-0180e00a.entry.js.map} +0 -0
  410. /package/dist/core/{p-0970c8a1.entry.js.map → p-046f4de6.entry.js.map} +0 -0
  411. /package/dist/core/{p-2536b95b.entry.js.map → p-06732eaf.entry.js.map} +0 -0
  412. /package/dist/core/{p-4c57eef0.entry.js.map → p-13993bf3.entry.js.map} +0 -0
  413. /package/dist/core/{p-12120521.entry.js.map → p-216fbd5e.entry.js.map} +0 -0
  414. /package/dist/core/{p-14b363d0.entry.js.map → p-2d063032.entry.js.map} +0 -0
  415. /package/dist/core/{p-e2387530.entry.js.map → p-2ee5d3fb.entry.js.map} +0 -0
  416. /package/dist/core/{p-edf3411a.entry.js.map → p-3f2723aa.entry.js.map} +0 -0
  417. /package/dist/core/{p-a484c41c.entry.js.map → p-418a84d4.entry.js.map} +0 -0
  418. /package/dist/core/{p-a1369740.entry.js.map → p-41916ef7.entry.js.map} +0 -0
  419. /package/dist/core/{p-7168b71a.entry.js.map → p-486a6957.entry.js.map} +0 -0
  420. /package/dist/core/{p-87868dd2.entry.js.map → p-5348af01.entry.js.map} +0 -0
  421. /package/dist/core/{p-eeae7272.entry.js.map → p-6398a726.entry.js.map} +0 -0
  422. /package/dist/core/{p-0629691b.entry.js.map → p-648fb902.entry.js.map} +0 -0
  423. /package/dist/core/{p-7e850bad.entry.js.map → p-673a4a62.entry.js.map} +0 -0
  424. /package/dist/core/{p-0ecde7a8.entry.js.map → p-67ae9d37.entry.js.map} +0 -0
  425. /package/dist/core/{p-d3e186a3.entry.js.map → p-6b01e096.entry.js.map} +0 -0
  426. /package/dist/core/{p-92a858f7.entry.js.map → p-6b1fcf87.entry.js.map} +0 -0
  427. /package/dist/core/{p-94ce6f29.entry.js.map → p-6fb3d61e.entry.js.map} +0 -0
  428. /package/dist/core/{p-47c91e08.entry.js.map → p-789ae7f5.entry.js.map} +0 -0
  429. /package/dist/core/{p-24f9f6d4.entry.js.map → p-89c7ea3e.entry.js.map} +0 -0
  430. /package/dist/core/{p-992b6161.entry.js.map → p-8d276e8f.entry.js.map} +0 -0
  431. /package/dist/core/{p-cb7793b0.entry.js.map → p-99185fd5.entry.js.map} +0 -0
  432. /package/dist/core/{p-4883e147.entry.js.map → p-99f96c33.entry.js.map} +0 -0
  433. /package/dist/core/{p-8100f45c.entry.js.map → p-a72af8db.entry.js.map} +0 -0
  434. /package/dist/core/{p-6eafa62e.entry.js.map → p-a787bba7.entry.js.map} +0 -0
  435. /package/dist/core/{p-6c5c6aaf.entry.js.map → p-aa72f551.entry.js.map} +0 -0
  436. /package/dist/core/{p-781e8391.entry.js.map → p-aaaa9261.entry.js.map} +0 -0
  437. /package/dist/core/{p-646b886c.entry.js.map → p-b29e96b5.entry.js.map} +0 -0
  438. /package/dist/core/{p-3245554e.entry.js.map → p-bfc5f3f4.entry.js.map} +0 -0
  439. /package/dist/core/{p-e1e04f34.entry.js.map → p-cb3afdbf.entry.js.map} +0 -0
  440. /package/dist/core/{p-6cf5343b.entry.js.map → p-ccf72538.entry.js.map} +0 -0
  441. /package/dist/core/{p-3eb33ef4.entry.js.map → p-ce0999f1.entry.js.map} +0 -0
  442. /package/dist/core/{p-0a99994a.entry.js.map → p-d02a4d1b.entry.js.map} +0 -0
  443. /package/dist/core/{p-b7161816.entry.js.map → p-d8322108.entry.js.map} +0 -0
  444. /package/dist/core/{p-d67a5c90.entry.js.map → p-d86cdbc8.entry.js.map} +0 -0
  445. /package/dist/core/{p-a5bb7bb0.entry.js.map → p-da8255b8.entry.js.map} +0 -0
  446. /package/dist/core/{p-66c26240.entry.js.map → p-f09b2041.entry.js.map} +0 -0
  447. /package/dist/core/{p-b8d3f121.entry.js.map → p-f1044e4d.entry.js.map} +0 -0
  448. /package/dist/core/{p-af21360a.entry.js.map → p-f10f7f37.entry.js.map} +0 -0
  449. /package/dist/core/{p-34cc7b3d.entry.js.map → p-fa77211d.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["VARIANT_ICONS","neutral","icon","neutralIcon","ariaLabel","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","IC_INHERITED_ARIA","IC_DEVICE_SIZES","XS","S","M","L","XL","IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","DARK_MODE_THRESHOLD","icInput","linkIcInput","inheritAttributes","element","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","always","container","name","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","renderFileHiddenInput","multiple","accept","hidden","files","onchange","click","removeHiddenInput","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","trim","getThemeFromContext","themeFromEvent","_a","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","includes","IcThemeForegroundEnum","Default","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","test","userAgent","handleHiddenFormButtonClick","form","button","hiddenFormButton","document","setAttribute","style","display","isEmptyString","length","isPropDefined","prop","getLabelFromValue","options","valueField","labelField","ungroupedOptions","map","option","children","push","matchingValue","find","getFilteredMenuOptions","includeDescriptions","searchString","position","label","description","lowerSearchString","startsWith","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getThemeColorBrightness","themeRed","themeGreen","themeBlue","parseInt","getThemeForegroundColor","brightness","getSlot","querySelector","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","Number","replace","hasValidationStatus","status","isSlotUsed","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","propName","console","kebabToCamelCase","kebabCase","split","word","index","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","hexChars","char","repeat","r","slice","g","b","a","rgbaStrToObj","rgbaStr","isRGBA","rgbValues","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","removeDisabledFalse","convertToRGBA","color","firstChar","capitalize","text","charAt","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","isArray","isElInAGGrid"],"sources":["../web-components/dist/collection/utils/constants.js","../web-components/dist/collection/utils/helpers.js"],"sourcesContent":["import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\nexport const IC_BLOCK_COLOR_EXCEPTIONS = {\n \"ic-alert\": [\"ic-link\"],\n};\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n//# sourceMappingURL=constants.js.map\n","import { IcThemeForegroundEnum, } from \"../utils/types\";\nimport { IC_BLOCK_COLOR_COMPONENTS, IC_BLOCK_COLOR_EXCEPTIONS, IC_FIXED_COLOR_COMPONENTS, } from \"./constants\";\nconst DARK_MODE_THRESHOLD = 133.3505;\nconst icInput = \"ic-input\";\nconst linkIcInput = \"input.ic-input\";\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (theEnum) => {\n const arr = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val;\n arr.push(str);\n }\n });\n return arr;\n};\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (element, attributes = []) => {\n const attributeObject = {};\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n }\n element.removeAttribute(attr);\n }\n });\n return attributeObject;\n};\nexport const debounceEvent = (event, wait) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = event._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n };\n};\nexport const debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (always, container, name, value, disabled) => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(linkIcInput);\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n let input = filtered[0];\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n }\n else {\n input.value = value || \"\";\n }\n }\n};\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n */\nexport const renderFileHiddenInput = (event, container, multiple, name, value, disabled, accept) => {\n if (name !== undefined && hasShadowDom(container)) {\n const inputs = container.querySelectorAll(linkIcInput);\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n let input = filtered[0];\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.files = value;\n input.disabled = disabled;\n input.accept = accept;\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\n }\n};\nexport const removeHiddenInput = (container) => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0];\n input === null || input === void 0 ? void 0 : input.remove();\n};\nexport const hasShadowDom = (el) => !!el.shadowRoot && !!el.attachShadow;\nexport const getInputHelperTextID = (id) => id + \"-helper-text\";\nexport const getInputValidationTextID = (id) => id + \"-validation-text\";\nexport const getInputDescribedByText = (inputId, helperText, validationText) => `${helperText ? getInputHelperTextID(inputId) : \"\"} ${validationText ? getInputValidationTextID(inputId) : \"\"}`.trim();\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcThemeForeground depending on the context\n */\nexport const getThemeFromContext = (el, themeFromEvent = null) => {\n var _a;\n const parentElement = el.parentElement || el.getRootNode().host.parentElement;\n const blockColorParent = parentElement.closest(IC_BLOCK_COLOR_COMPONENTS.join(\",\"));\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n if ((_a = IC_BLOCK_COLOR_EXCEPTIONS[parentTag]) === null || _a === void 0 ? void 0 : _a.includes(currentTag)) {\n return IcThemeForegroundEnum.Default;\n }\n else if (themeFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)) {\n return themeFromEvent;\n }\n else if (blockColorParent.classList.contains(IcThemeForegroundEnum.Dark)) {\n return IcThemeForegroundEnum.Dark;\n }\n return IcThemeForegroundEnum.Light;\n }\n return IcThemeForegroundEnum.Default;\n};\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = () => \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)\n : false;\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (form, button) => {\n const hiddenFormButton = document.createElement(\"button\");\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n form.appendChild(hiddenFormButton);\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\nexport const isEmptyString = (value) => value ? value.trim().length === 0 : true;\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop) => prop !== undefined ? prop : null;\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (value, options, valueField = \"value\", labelField = \"label\") => {\n const ungroupedOptions = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => ungroupedOptions.push(option));\n }\n else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find((option) => option[valueField] === value);\n if (matchingValue !== undefined)\n return matchingValue[labelField];\n }\n return undefined;\n};\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (options, includeDescriptions, searchString, position, labelField = \"label\") => options.filter((option) => {\n var _a;\n const label = option[labelField].toLowerCase();\n const description = (_a = option.description) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n return position === \"anywhere\"\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n (description === null || description === void 0 ? void 0 : description.includes(lowerSearchString))\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n (description === null || description === void 0 ? void 0 : description.startsWith(lowerSearchString))\n : label.startsWith(lowerSearchString);\n});\nexport const deviceSizeMatches = (size) => window.matchMedia(`(max-width: ${size}px)`).matches;\nexport const getCurrentDeviceSize = () => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\nexport const getCssProperty = (cssVar) => getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-theme-text\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getThemeColorBrightness = () => {\n const themeRed = getCssProperty(\"--ic-theme-primary-r\");\n const themeGreen = getCssProperty(\"--ic-theme-primary-g\");\n const themeBlue = getCssProperty(\"--ic-theme-primary-b\");\n return ((parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000);\n};\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getThemeColorBrightness`\n */\nexport const getThemeForegroundColor = (brightness = getThemeColorBrightness()) => brightness > DARK_MODE_THRESHOLD\n ? IcThemeForegroundEnum.Dark\n : IcThemeForegroundEnum.Light;\nexport const getSlot = (element, name) => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\nexport const slotHasContent = (element, name) => getSlot(element, name) !== null;\nexport const getSlotContent = (element, name) => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n return null;\n};\nexport const getSlotElements = (slot) => {\n const slotContent = slot.firstElementChild;\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n }\n else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\nexport const getNavItemParentDetails = ({ parentElement, }) => {\n let navType = { navType: \"\", parent: null };\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\nexport const DEVICE_SIZES = {\n XS: Number(getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")), // 0\n S: Number(getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")), // 576\n M: Number(getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")), // 768\n L: Number(getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")), // 992\n XL: Number(getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")), // 1200\n UNDEFINED: 1200,\n};\nexport const hasValidationStatus = (status, disabled) => !!status && !disabled;\nexport const isSlotUsed = ({ children }, slotName) => Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (oldValue, newValue, callback) => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\nexport const onComponentRequiredPropUndefined = (props, component) => {\n props.forEach(({ prop, propName }) => {\n if (prop === null || prop === undefined) {\n console.error(`No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(propName)}' (react) required`);\n }\n });\n};\nexport const kebabToCamelCase = (kebabCase) => kebabCase\n .toLowerCase()\n .split(\"-\")\n .map((word, index) => index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`)\n .join(\"\");\nexport const checkResizeObserver = (callbackFn) => {\n if (typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\") {\n callbackFn();\n }\n};\nconst hex2dec = (v) => parseInt(v, 16);\nexport const hexToRgba = (hex) => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\nexport const rgbaStrToObj = (rgbaStr) => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\nexport const elementOverflowsX = ({ scrollWidth, clientWidth, }) => scrollWidth > clientWidth;\nexport const hasClassificationBanner = () => !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\nexport const addFormResetListener = (el, callbackFn) => {\n var _a;\n (_a = el.closest(\"FORM\")) === null || _a === void 0 ? void 0 : _a.addEventListener(\"reset\", callbackFn);\n};\nexport const removeFormResetListener = (el, callbackFn) => {\n var _a;\n (_a = el.closest(\"FORM\")) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"reset\", callbackFn);\n};\nexport const pxToRem = (px, base = 16) => `${(1 / base) * parseInt(px)}rem`;\nexport const removeDisabledFalse = (disabled, element) => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\nexport const isMacDevice = () => window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\nexport const isNumeric = (value) => /^-?\\d+$/.test(value);\nexport async function waitForHydration() {\n const elements = document.getElementsByTagName(\"*\");\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n }\n else {\n return false;\n }\n }\n return false;\n}\nexport const convertToRGBA = (color) => {\n const firstChar = color === null || color === void 0 ? void 0 : color.slice(0, 1).toLowerCase();\n return firstChar === \"#\"\n ? hexToRgba(color)\n : firstChar === \"r\"\n ? rgbaStrToObj(color)\n : null;\n};\nexport const capitalize = (text) => text.charAt(0).toUpperCase() + text.slice(1);\nexport const checkSlotInChildMutations = (addedNodes, removedNodes, slotName) => {\n const hasSlot = (nodeList) => Array.from(nodeList).some((node) => Array.isArray(slotName)\n ? slotName.some((name) => node.slot === name)\n : node.slot === slotName);\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\nexport const isElInAGGrid = (el) => !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n//# sourceMappingURL=helpers.js.map\n"],"mappings":"49FAMY,MAACA,EAAgB,CACzBC,QAAS,CACLC,KAAMC,EACNC,UAAW,WAEfC,KAAM,CACFH,KAAMI,EACNF,UAAW,wBAEfG,QAAS,CACLL,KAAMM,EACNJ,UAAW,WAEfK,MAAO,CACHP,KAAMQ,EACNN,UAAW,SAEfO,QAAS,CACLT,KAAMU,EACNR,UAAW,YAIP,MAACS,EAAoB,CAC7B,cACA,oBACA,YACA,gBACA,eACA,mBACA,mBACA,eACA,gBACA,k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aiB,GACb,IAAI,EAEN,MAACE,GAAcC,GAASA,EAAKC,OAAO,GAAGrC,cAAgBoC,EAAKxB,MAAM,GAClE,MAAC0B,GAA4B,CAACC,EAAYC,EAAc1D,KAChE,MAAM2D,EAAWC,GAAa3L,MAAMC,KAAK0L,GAAU3D,MAAM4D,GAAS5L,MAAM6L,QAAQ9D,GAC1EA,EAASC,MAAMvI,GAASmM,EAAK5E,OAASvH,IACtCmM,EAAK5E,OAASe,IACpB,OAAO2D,EAAQF,IAAeE,EAAQD,EAAa,EAE3C,MAACK,GAAgB1L,KAASA,EAAGoC,QAAQ,eAAiBpC,EAAGoC,QAAQ,mB"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,F as s,g as n}from"./p-8455d1bb.js";import{d as a,a as o,p as l,i as h,b as r}from"./p-adbe0d89.js";const d=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">\n <path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>\n</svg>`;const c=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(-90deg);">\n <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>\n</svg>`;const u=`<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" style="transform: rotate(90deg)">\n <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>\n</svg>`;const g=':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}}';const v=class{constructor(n){t(this,n);this.icRowHeightChange=i(this,"icRowHeightChange",7);this.DENSITY_HEIGHT_MULTIPLIER={dense:.8,default:1,spacious:1.2};this.DENSITY_PADDING_HEIGHT_DIFF={dense:8,default:16,spacious:20};this.SORT_ICONS={unsorted:d,ascending:c,descending:u};this.hasLoadedForOneSecond=true;this.resizeObserver=null;this.SHOW_HIDE_STRING="show-hide";this.SHOW_HIDE_CSS_CLASS=`${this.SHOW_HIDE_STRING}-wrap`;this.TOOLTIP_STRING="tooltip";this.TOOLTIP=`ic-${this.TOOLTIP_STRING}`;this.TEXT_WRAP_STRING="text-wrap";this.TEXT_WRAP_CLASS=`.${this.TEXT_WRAP_STRING}`;this.dataUpdated=false;this.rowHeightSet=false;this.initialLoad=false;this.icPageChangeEvent=false;this.itemsPerPageChange=false;this.DATA_ROW_HEIGHT_STRING="data-row-height";this.DEFAULT_LINE_HEIGHT=24;this.densityUpdate=false;this.updateSetRowHeight=t=>{const i=parseInt(getComputedStyle(document.documentElement).fontSize);if(t){const e=this.getCellContainer(t);const s=i*parseFloat(e.getAttribute(this.DATA_ROW_HEIGHT_STRING));if(t.scrollHeight>s){e.style.removeProperty("height")}}else{this.getTypographyElements().forEach((t=>{const e=this.getCellContainer(t);const s=i*parseFloat(e.getAttribute(this.DATA_ROW_HEIGHT_STRING));if(t.scrollHeight>s){e.style.removeProperty("height")}}))}};this.debounceDataTruncation=()=>{this.getTypographyElements().forEach((t=>{if(!t.classList.contains(this.TEXT_WRAP_STRING)){this.resizeObserver=new ResizeObserver(a((()=>{this.dataTruncation(t)}),200));this.resizeObserver.observe(t)}}))};this.getLines=t=>Math.floor(t/this.DEFAULT_LINE_HEIGHT);this.truncate=(t,i,e)=>{if((t===null||t===void 0?void 0:t.scrollHeight)>(i===null||i===void 0?void 0:i.clientHeight)){if(!t.closest(this.TEXT_WRAP_CLASS)){if(this.truncationPattern===this.TOOLTIP_STRING){this.addTooltipTruncation(t,i,e)}if(this.truncationPattern===this.SHOW_HIDE_STRING){this.addShowHideTruncation(i,t)}}}else{if(this.truncationPattern===this.TOOLTIP_STRING&&e){t.setAttribute("style",`--ic-line-clamp: 0`);i.appendChild(t);e.remove()}if(this.truncationPattern===this.SHOW_HIDE_STRING&&!o(t.getAttribute("max-lines"))){this.resetShowHideTruncation(t)}}};this.dataTruncation=t=>{const i=this.getTooltip(t);const e=this.getCellContainer(t);if((e===null||e===void 0?void 0:e.classList.contains("data-type-element"))||this.dataUpdated){return}if(this.truncationPattern===this.SHOW_HIDE_STRING&&t.shadowRoot.querySelector("button")){const i=t.shadowRoot.querySelector("button");if(i){const i=this.getTruncWrapper(t);if(this.getLines(i.scrollHeight)===+t.getAttribute("max-lines")){this.resetShowHideTruncation(t)}}}if(this.rowHeightSet&&this.truncationPattern===this.SHOW_HIDE_STRING){const i=this.getTruncWrapper(t);if(i&&e.clientHeight-this.DEFAULT_LINE_HEIGHT>i.scrollHeight){this.resetShowHideTruncation(t);return}if(t.scrollHeight>e.clientHeight){this.addShowHideTruncation(e,t);return}}if((t===null||t===void 0?void 0:t.scrollHeight)>0&&(e===null||e===void 0?void 0:e.clientHeight)>0&&(t===null||t===void 0?void 0:t.scrollHeight)===(e===null||e===void 0?void 0:e.clientHeight)){if(i){this.removeTooltip(e,t,i)}return}this.truncate(t,e,i)};this.removeTextWrap=()=>{this.getTypographyElements().forEach((t=>{const i=t.closest("td");if(i.classList.contains(this.TEXT_WRAP_STRING)){i.classList.remove(this.TEXT_WRAP_STRING)}}))};this.getCellContainer=t=>t.closest(".cell-container");this.deleteTextWrapDataKey=t=>Array.isArray(t)&&t.forEach((t=>t.textWrap&&delete t.textWrap));this.startLoadingTimer=()=>{this.hasLoadedForOneSecond=false;this.timerStarted=Date.now();setTimeout((()=>{this.hasLoadedForOneSecond=true;this.timerStarted=null}),this.minimumLoadingDisplayDuration)};this.isObject=t=>typeof t==="object";this.notDefaultDensity=()=>this.density!=="default";this.getCellContent=(t,i)=>{switch(i){case"element":return undefined;case"date":return(t instanceof Date?t:new Date(t)).toLocaleDateString();default:return t}};this.getCellAlignment=(t,i)=>{if(this.isObject(t)&&Object.keys(t).includes("cellAlignment")){return this.getObjectValue(this.getObjectValue(t,"cellAlignment"),i)}};this.getCellOptions=(t,i)=>{if(!(this.isObject(t)&&Object.keys(t).includes(i)))return;return this.getObjectValue(t,i)};this.createUpdatingIndicator=()=>{const{appearance:t,description:i,max:s,min:n,progress:a}=this.updatingOptions||{};return e("th",{colSpan:this.columns.length,class:"updating-state"},e("ic-loading-indicator",{appearance:t,description:i||"Updating table data",fullWidth:true,max:s,min:n,progress:a,type:"linear",size:"small"}))};this.setRowHeight=t=>l(`${t*this.DENSITY_HEIGHT_MULTIPLIER[this.density]-this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);this.setTruncationClass=()=>{if(this.truncationPattern){return{[`truncation-${this.truncationPattern}`]:true}}return{}};this.createCells=(t,i)=>{var n;const a=Object.values(t);const o=Object.keys(t);const l=i;const r=this.getRowOptions(o,a);let d;let c;const u=o.indexOf("header");if(u>-1){d=this.getObjectValue(a[u],"rowAlignment");c=this.getObjectValue(a[u],"emphasis")}const g=(n=this.variableRowHeight)===null||n===void 0?void 0:n.call(this,Object.assign(Object.assign({},t),{index:l}));const v=g?g!=="auto"&&g:this.globalRowHeight!=="auto"&&this.globalRowHeight;return a.map(((t,n)=>{var a,l,u,g,p,f,m,b,w,y;const x=this.columns[n];const k=`${x===null||x===void 0?void 0:x.key}-${i}`;const $=this.isObject(t)&&Object.keys(t).includes("icon");const H=i=>this.getObjectValue(t,i);if(o[n]==="header"){return e("th",{scope:"row",colSpan:H("colspan"),class:{["row-header"]:true,[`row-header-alignment-${H("cellAlignment")}`]:!!H("cellAlignment"),["row-header-sticky"]:this.stickyRowHeaders}},H("title"))}if(o[n]!=="rowOptions"){return e("td",{class:{["table-cell"]:true,[`table-density-${this.density}`]:this.notDefaultDensity()}},e("div",{innerHTML:(x===null||x===void 0?void 0:x.dataType)==="element"&&!h(this.el,k)?t:null,class:Object.assign({"cell-container":(x===null||x===void 0?void 0:x.dataType)!=="element",[`cell-alignment-${((a=x===null||x===void 0?void 0:x.columnAlignment)===null||a===void 0?void 0:a.vertical)||((l=r===null||r===void 0?void 0:r.rowAlignment)===null||l===void 0?void 0:l.vertical)||d||this.getCellAlignment(t,"vertical")}`]:!!((u=x===null||x===void 0?void 0:x.columnAlignment)===null||u===void 0?void 0:u.vertical)||!!((g=r===null||r===void 0?void 0:r.rowAlignment)===null||g===void 0?void 0:g.vertical)||!!d||!!this.getCellAlignment(t,"vertical"),[`cell-alignment-${((p=x===null||x===void 0?void 0:x.columnAlignment)===null||p===void 0?void 0:p.horizontal)||((f=r===null||r===void 0?void 0:r.rowAlignment)===null||f===void 0?void 0:f.horizontal)||this.getCellAlignment(t,"horizontal")}`]:!!((m=x===null||x===void 0?void 0:x.columnAlignment)===null||m===void 0?void 0:m.horizontal)||!!((b=r===null||r===void 0?void 0:r.rowAlignment)===null||b===void 0?void 0:b.horizontal)||!!this.getCellAlignment(t,"horizontal"),[`data-type-${x===null||x===void 0?void 0:x.dataType}`]:true,[this.TEXT_WRAP_STRING]:(x===null||x===void 0?void 0:x.textWrap)||(r===null||r===void 0?void 0:r.textWrap)||!!this.getCellOptions(t,"textWrap"),["cell-icon"]:$||!!((w=x===null||x===void 0?void 0:x.icon)===null||w===void 0?void 0:w.icon)},this.setTruncationClass()),style:{height:(this.truncationPattern||v)&&!x.textWrap&&!r.textWrap&&!this.getCellOptions(t,"textWrap")&&(x===null||x===void 0?void 0:x.dataType)!=="element"?this.setRowHeight(v):null},"data-row-height":this.truncationPattern||v?this.setRowHeight(v):null},h(this.el,k)?e("slot",{name:k}):e(s,null,h(this.el,`${k}-icon`)?e("slot",{name:`${k}-icon`}):($||((y=x===null||x===void 0?void 0:x.icon)===null||y===void 0?void 0:y.onAllCells))&&e("span",{class:"icon",innerHTML:H("icon")||(x===null||x===void 0?void 0:x.icon.icon)}),(x===null||x===void 0?void 0:x.dataType)!=="element"&&!h(this.el,k)&&e("ic-typography",{variant:"body",class:{[`cell-emphasis-${this.isObject(t)&&H("emphasis")||(x===null||x===void 0?void 0:x.emphasis)||c}`]:this.isObject(t)&&!!H("emphasis")||!!(x===null||x===void 0?void 0:x.emphasis)||!!c,[`text-${this.density}`]:this.notDefaultDensity()}},this.isObject(t)&&(x===null||x===void 0?void 0:x.dataType)!=="date"?Object.keys(t).includes("href")?e("ic-link",{href:H("href")},H("data")):H("data"):this.getCellContent(t,x===null||x===void 0?void 0:x.dataType)))))}}))};this.createColumnHeaders=()=>this.columns.map((({cellAlignment:t,colspan:i,icon:s,key:n,title:a})=>e("th",{scope:"col",class:{["column-header"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),["updating-state-headers"]:this.updating&&!this.loading},colSpan:i},e("div",{class:{"column-header-inner-container":true,[`column-header-alignment-${t}`]:!!t}},h(this.el,`${n}-column-icon`)?e("slot",{name:`${n}-column-icon`}):s&&!s.hideOnHeader&&e("span",{class:"icon",innerHTML:s.icon}),e("ic-typography",{variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},a),this.sortable&&e("ic-button",{variant:"icon",id:`sort-button-${n}`,"aria-label":this.getSortButtonLabel(n),onClick:()=>this.sortRows(n),innerHTML:this.SORT_ICONS[this.sortedColumn===n?this.sortedColumnOrder:"unsorted"],class:{["sort-button"]:true,["sort-button-unsorted"]:this.sortedColumn!==n||this.sortedColumnOrder==="unsorted"}})))));this.onRowClick=t=>{this.selectedRow=this.selectedRow!==t&&!this.loading&&!this.updating&&t};this.createRows=()=>{const t=this.showPagination?this.data.slice(this.fromRow,this.toRow):this.data.slice();this.columns.forEach((({key:i})=>{t.forEach(((t,e)=>{const s=`${i}-${e}`;if(h(this.el,s)){t[i]=r(this.el,s)}}))}));return t.sort(!this.sortable?undefined:this.getSortFunction()).map(((t,i)=>e("tr",{onClick:()=>this.onRowClick(t),class:{["table-row"]:true,["table-row-selected"]:this.selectedRow===t}},this.createCells(t,i))))};this.getObjectValue=(t,i)=>Object.values(t)[Object.keys(t).indexOf(i)];this.getSortButtonLabel=t=>{let i="";const e=t=>{const i=this.sortOptions.sortOrders;return i[(i.indexOf(t)+1)%i.length]};if(this.sortedColumn===t){const t=e(this.sortedColumnOrder);i=t!=="unsorted"?`Sort ${t}`:"Remove sort"}else{i=`Sort ${e("unsorted")}`}return i};this.getComparison=(t,i)=>{const e=t[this.sortedColumn];const s=i[this.sortedColumn];return this.columns.find((t=>t.key===this.sortedColumn)).dataType==="date"?new Date(e).valueOf()-new Date(s).valueOf():String(this.isObject(e)?Object.values(e)[0]:e).localeCompare(String(this.isObject(s)?Object.values(s)[0]:s),undefined,{numeric:true,sensitivity:"base"})};this.getSortFunction=()=>{switch(this.sortedColumnOrder){case"ascending":return(t,i)=>this.getComparison(t,i);case"descending":return(t,i)=>this.getComparison(i,t);default:return undefined}};this.sortRows=t=>{const i=this.el.shadowRoot.querySelector(`#sort-button-${t}`);const e=this.sortOptions.sortOrders;if(t!==this.sortedColumn){if(this.sortedColumn){const i=this.el.shadowRoot.querySelector(`#sort-button-${this.sortedColumn}`);i.setAttribute("aria-label",this.getSortButtonLabel(t))}this.sortedColumn=t;this.sortedColumnOrder="unsorted"}let s=e.indexOf(this.sortedColumnOrder)+1;if(s>e.length-1){s=0}this.sortedColumnOrder=e[s];i.setAttribute("aria-label",this.getSortButtonLabel(t));this.tableSorted=true};this.getTypographyElements=()=>Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));this.getTooltip=t=>t.closest(this.TOOLTIP);this.updateTruncationTooltip=(t=false)=>{this.getTypographyElements().forEach((i=>{const e=this.getTooltip(i);const s=this.getCellContainer(i);if(i.closest(this.TEXT_WRAP_CLASS)){this.removeTooltip(s,i,e);i.setAttribute("style",`--ic-line-clamp: 0`);return}this.regenerateTooltip(s,i,e,t)}))};this.updateScrollOffset=()=>{this.scrollOffset=this.el.shadowRoot.querySelector(".table-row-container").scrollTop};this.fromRow=0;this.previousRowsPerPage=undefined;this.rowsPerPage=undefined;this.scrollable=false;this.scrollOffset=0;this.selectedRow=undefined;this.sortedColumn=undefined;this.sortedColumnOrder=undefined;this.toRow=undefined;this.currentRowHeight=undefined;this.caption=undefined;this.columns=undefined;this.data=undefined;this.density="default";this.embedded=false;this.globalRowHeight="auto";this.hideColumnHeaders=false;this.loading=false;this.loadingOptions=undefined;this.minimumLoadingDisplayDuration=1e3;this.paginationBarOptions={itemsPerPageOptions:[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}],rangeLabelType:"page",type:"simple",showItemsPerPageControl:true,showGoToPageControl:true,alignment:"right",appearance:"default",itemLabel:"Item",pageLabel:"Page",hideRangeLabel:false};this.showPagination=false;this.sortable=false;this.sortOptions={sortOrders:["unsorted","ascending","descending"],defaultColumn:""};this.stickyColumnHeaders=false;this.stickyRowHeaders=false;this.truncationPattern=undefined;this.updating=false;this.updatingOptions=undefined;this.variableRowHeight=undefined}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){var t;this.rowsPerPage=Number(this.paginationBarOptions.itemsPerPageOptions[0].value);this.previousRowsPerPage=this.rowsPerPage;this.toRow=this.rowsPerPage;this.sortedColumn=this.sortOptions.defaultColumn;this.sortedColumnOrder=this.sortOptions.sortOrders[0];this.loadingOptions=Object.assign(Object.assign({},this.loadingOptions),{showBackground:((t=this.data)===null||t===void 0?void 0:t.length)>0});this.initialLoad=true;this.previousItemsPerPage=this.rowsPerPage}componentDidLoad(){const t=this.el.shadowRoot.querySelector("table");const i=this.el.shadowRoot.querySelector(".table-container");if(this.dataUpdated){this.dataUpdated=false}if((t===null||t===void 0?void 0:t.clientHeight)>(i===null||i===void 0?void 0:i.clientHeight)||(t===null||t===void 0?void 0:t.clientWidth)>(i===null||i===void 0?void 0:i.clientWidth)){this.scrollable=true}if(this.loading){this.startLoadingTimer();this.showLoadingIndicator()}if(this.truncationPattern){this.getTypographyElements().forEach((t=>{if(!t.classList.contains(this.TEXT_WRAP_STRING)){this.dataTruncation(t)}}));this.debounceDataTruncation()}if(this.globalRowHeight!=="auto"){this.updateSetRowHeight()}}componentDidUpdate(){this.truncateUpdatedData()}truncateUpdatedData(){if(this.dataUpdated){if(this.truncationPattern===this.SHOW_HIDE_STRING){this.resetShowHideTruncation()}if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}this.dataUpdated=false}if(this.tableSorted){if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}this.tableSorted=false}if(this.rowHeightSet){const t=parseInt(getComputedStyle(document.documentElement).fontSize);this.getTypographyElements().forEach((i=>{var e;const s=this.getCellContainer(i);const n=this.getTooltip(i);const a=t*parseFloat(s.getAttribute(this.DATA_ROW_HEIGHT_STRING));if(!((e=s===null||s===void 0?void 0:s.style)===null||e===void 0?void 0:e.height)&&a>s.clientHeight){s.style.setProperty("height",s.getAttribute(this.DATA_ROW_HEIGHT_STRING))}if(this.truncationPattern){if(this.truncationPattern===this.SHOW_HIDE_STRING){const t=this.getTruncWrapper(i);const e=i.shadowRoot.querySelector("button");if(e&&(t===null||t===void 0?void 0:t.scrollHeight)<=s.clientHeight){this.resetShowHideTruncation(i);return}}this.truncate(i,s,n)}else{this.updateSetRowHeight(i)}}));this.rowHeightSet=false}if(this.itemsPerPageChange){const t=this.el.shadowRoot.querySelectorAll(".table-row");if(this.rowsPerPage>this.previousItemsPerPage){const i=Array.from(t).slice(this.previousItemsPerPage);i.forEach((t=>{t.querySelectorAll("ic-typography").forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);this.truncate(t,i,e)}))}))}this.previousItemsPerPage=this.rowsPerPage;this.itemsPerPageChange=false}if(!this.initialLoad&&this.icPageChangeEvent){if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=t.shadowRoot.querySelector("button");if((t===null||t===void 0?void 0:t.scrollHeight)>i.clientHeight&&!e){this.addShowHideTruncation(i,t)}}))}this.icPageChangeEvent=false}if(this.densityUpdate){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);this.truncate(t,i,e)}));this.densityUpdate=false}}createShowHideTruncation(t,i){t.checkMaxLines(t.scrollHeight);t.setAttribute("max-lines",`${Math.floor((i===null||i===void 0?void 0:i.clientHeight)/this.DEFAULT_LINE_HEIGHT)}`);t.setShowHideExpanded(false);i.style.height=null}addTooltipTruncation(t,i,e){this.addLineClampCSS(t,i);if(!e){this.createTruncationTooltip(t,i)}}addShowHideTruncation(t,i){t.classList.add(this.SHOW_HIDE_CSS_CLASS);this.createShowHideTruncation(i,t)}getTruncWrapper(t){return t.shadowRoot.querySelector(".trunc-wrapper")}handleTypographyTruncationExpandToggle({detail:t}){const{expanded:i,typographyEl:e}=t;const s=this.getCellContainer(e);if(s.style.height&&i){s.style.height="inherit"}}handlePageChange({detail:t,target:i}){if(i.parentElement!==this.el){this.fromRow=(t.value-1)*this.rowsPerPage;this.toRow=this.fromRow+this.rowsPerPage;const i=this.el.shadowRoot.querySelector(".table-row-container");if(this.previousRowsPerPage===this.rowsPerPage){i.scrollTop=0}else if(this.previousRowsPerPage<this.rowsPerPage){i.scrollTop=this.scrollOffset;this.previousRowsPerPage=this.rowsPerPage}else{this.previousRowsPerPage=this.rowsPerPage}}if(!this.initialLoad&&this.previousPaginationPage!==t.value){this.icPageChangeEvent=true}this.previousPaginationPage=t.value;this.initialLoad=false}handleItemsPerPageChange({detail:t,target:i}){if(i.parentElement!==this.el){this.previousRowsPerPage=this.rowsPerPage;this.rowsPerPage=t.value}this.itemsPerPageChange=true}handleDensityChange(t){this.density=t.detail.value}clickListener(t){if(t.target!==this.el)this.selectedRow=undefined}loadingHandler(t){if(t)this.startLoadingTimer();if(this.loading){setTimeout((()=>{this.showLoadingIndicator()}),500)}}truncationPatternHandler(t){if(t===this.SHOW_HIDE_STRING){this.updateTruncationTooltip(true);this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);this.truncate(t,i,e)}))}if(t===this.TOOLTIP_STRING){this.resetShowHideTruncation()}}async dataHandler(t){this.loadingOptions=Object.assign(Object.assign({},this.loadingOptions),{showBackground:(t===null||t===void 0?void 0:t.length)>0});if(this.loading){!this.hasLoadedForOneSecond?setTimeout((()=>this.loading=false),this.minimumLoadingDisplayDuration-(Date.now()-this.timerStarted)):this.loading=false}if(this.updating)this.updating=false;this.dataUpdated=true}async densityHandler(){this.densityUpdate=true}resetShowHideTruncation(t){if(t){const i=this.getTruncWrapper(t);const e=this.getCellContainer(t);if((i===null||i===void 0?void 0:i.scrollHeight)>(e===null||e===void 0?void 0:e.clientHeight)&&!o(t.getAttribute("max-lines"))&&Math.floor((e===null||e===void 0?void 0:e.clientHeight)/this.DEFAULT_LINE_HEIGHT)!==+t.getAttribute("max-lines")){t.checkMaxLines(i.scrollHeight);t.setAttribute("max-lines",`${Math.floor((e===null||e===void 0?void 0:e.clientHeight)/this.DEFAULT_LINE_HEIGHT)}`);t.setShowHideExpanded(false);e.style.height=null}else{t.resetTruncation().then((()=>{e.style.setProperty("height",e.getAttribute(this.DATA_ROW_HEIGHT_STRING))}))}}else{this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);t.resetTruncation().then((()=>{i.style.setProperty("height",i.getAttribute(this.DATA_ROW_HEIGHT_STRING))}))}))}}rowHeightChangeHandler(t,i){if(+t!==+i){this.deleteTextWrapDataKey(this.data);this.deleteTextWrapDataKey(this.columns);this.removeTextWrap();this.icRowHeightChange.emit();this.rowHeightSet=true}}async resetRowHeights(t){this.globalRowHeight=t||"auto";this.variableRowHeight=null}showLoadingIndicator(){this.loadingIndicator.classList.add("show")}getRowOptions(t,i){const e=t.indexOf("rowOptions");return e>-1&&i[e]}regenerateTooltip(t,i,e,s){if(e){if(this.tableSorted){e.setAttribute("target",i.id);e.setAttribute("label",i.textContent)}else{this.removeTooltip(t,i,e)}if(s){return}}if(!i.getAttribute("style")&&this.dataUpdated){this.addLineClampCSS(i,t)}if((i===null||i===void 0?void 0:i.scrollHeight)>(t===null||t===void 0?void 0:t.clientHeight)&&!this.tableSorted){if(!i.getAttribute("style")){this.addLineClampCSS(i,t)}this.createTruncationTooltip(i,t)}}removeTooltip(t,i,e){t.appendChild(i);if(e){e.remove()}}addLineClampCSS(t,i){t.setAttribute("style",`--ic-line-clamp: ${this.getLines(i===null||i===void 0?void 0:i.clientHeight)}`)}createTruncationTooltip(t,i){const e=document.createElement("ic-tooltip");e.setAttribute("target",t.id);e.setAttribute("label",t.textContent);e.classList.add("ic-tooltip-overflow");e.setExternalPopperProps({strategy:"fixed"});i.appendChild(e);e.appendChild(t)}render(){const{caption:t,createColumnHeaders:i,createRows:s,createUpdatingIndicator:n,data:a,hideColumnHeaders:o,loading:l,loadingOptions:r,paginationBarOptions:d,scrollable:c,scrollOffset:u,showPagination:g,sortable:v,sortedColumnOrder:p,sortedColumn:f,stickyColumnHeaders:m,updateScrollOffset:b,updating:w}=this;return e("div",{class:"table-container"},h(this.el,"title-bar")&&e("slot",{name:"title-bar"}),e("div",{class:{["table-row-container"]:true,scrollable:c},tabIndex:c?0:null,onScroll:b},h(this.el,"title-bar")&&e("slot",{name:"title-bar"}),e("table",null,e("caption",{class:"table-caption"},t),!o&&e("thead",{class:{["column-header-sticky"]:m,["column-header-overlay"]:m&&u!==0}},e("tr",null,i())),w&&!l&&(o?e("thead",null,n()):n()),(a===null||a===void 0?void 0:a.length)>0&&!l&&e("tbody",null,s())),!(a===null||a===void 0?void 0:a.length)&&!l&&(h(this.el,"empty-state")?e("slot",{name:"empty-state"}):e("ic-empty-state",{aligned:"center",heading:"No Data",class:"loading-empty"}))),l&&e("ic-loading-indicator",{appearance:r===null||r===void 0?void 0:r.appearance,class:{"loading-empty":l,loading:true,"show-background":r.showBackground},description:r.description||"Loading table data",label:r.label||"Loading...",labelDuration:r===null||r===void 0?void 0:r.labelDuration,max:r===null||r===void 0?void 0:r.max,min:r===null||r===void 0?void 0:r.min,progress:r===null||r===void 0?void 0:r.progress,ref:t=>this.loadingIndicator=t}),(g||h(this.el,"pagination-bar"))&&e("div",{class:"pagination-container"},h(this.el,"pagination-bar")?e("slot",{name:"pagination-bar"}):e("ic-pagination-bar",{totalItems:a.length,type:d.type,rangeLabelType:d.rangeLabelType,showItemsPerPageControl:d.showItemsPerPageControl,showGoToPageControl:d.showGoToPageControl,itemsPerPageOptions:d.itemsPerPageOptions,alignment:d.alignment,appearance:d.appearance,itemLabel:d.itemLabel,pageLabel:d.pageLabel,hideRangeLabel:d.hideRangeLabel})),v&&e("div",{class:"screen-reader-sort-text","aria-live":"polite"},p!=="unsorted"&&f?`${f} sorted ${p}`:"table unsorted"))}get el(){return n(this)}static get watchers(){return{loading:["loadingHandler"],truncationPattern:["truncationPatternHandler"],data:["dataHandler"],density:["densityHandler"],globalRowHeight:["rowHeightChangeHandler"],variableRowHeight:["rowHeightChangeHandler"]}}};v.style=g;export{v as ic_data_table};
2
+ //# sourceMappingURL=p-84eaa486.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icDataTableCss","DataTable","this","DENSITY_HEIGHT_MULTIPLIER","dense","default","spacious","DENSITY_PADDING_HEIGHT_DIFF","SORT_ICONS","unsorted","unsortedIcon","ascending","ascendingIcon","descending","descendingIcon","hasLoadedForOneSecond","resizeObserver","SHOW_HIDE_STRING","SHOW_HIDE_CSS_CLASS","TOOLTIP_STRING","TOOLTIP","TEXT_WRAP_STRING","TEXT_WRAP_CLASS","dataUpdated","rowHeightSet","initialLoad","icPageChangeEvent","itemsPerPageChange","DATA_ROW_HEIGHT_STRING","DEFAULT_LINE_HEIGHT","densityUpdate","updateSetRowHeight","typographyEl","fontSize","parseInt","getComputedStyle","document","documentElement","cellContainer","getCellContainer","rowHeight","parseFloat","getAttribute","scrollHeight","style","removeProperty","getTypographyElements","forEach","debounceDataTruncation","classList","contains","ResizeObserver","debounce","dataTruncation","observe","getLines","height","Math","floor","truncate","tooltip","clientHeight","closest","truncationPattern","addTooltipTruncation","addShowHideTruncation","setAttribute","appendChild","remove","isEmptyString","resetShowHideTruncation","getTooltip","shadowRoot","querySelector","showHideBtn","truncWrapper","getTruncWrapper","removeTooltip","removeTextWrap","tableCell","deleteTextWrapDataKey","array","Array","isArray","val","textWrap","startLoadingTimer","timerStarted","Date","now","setTimeout","minimumLoadingDisplayDuration","isObject","value","notDefaultDensity","density","getCellContent","cell","dataType","undefined","toLocaleDateString","getCellAlignment","alignment","Object","keys","includes","getObjectValue","getCellOptions","key","createUpdatingIndicator","appearance","description","max","min","progress","updatingOptions","h","colSpan","columns","length","class","fullWidth","type","size","setRowHeight","pxToRem","setTruncationClass","createCells","row","rowIndex","rowValues","values","rowKeys","index","rowOptions","getRowOptions","rowAlignment","rowEmphasis","headerIndex","indexOf","variableRowHeightVal","_a","variableRowHeight","call","assign","currentRowHeight","globalRowHeight","map","columnProps","cellSlotName","hasIcon","cellValue","scope","stickyRowHeaders","innerHTML","isSlotUsed","el","columnAlignment","vertical","_b","_c","_d","_e","horizontal","_f","_g","_h","_j","icon","name","Fragment","_k","onAllCells","variant","emphasis","href","createColumnHeaders","cellAlignment","colspan","title","updating","loading","hideOnHeader","sortable","id","getSortButtonLabel","onClick","sortRows","sortedColumn","sortedColumnOrder","onRowClick","selectedRow","createRows","data","showPagination","slice","fromRow","toRow","getSlotContent","sort","getSortFunction","label","getNextSortOption","option","sortOrders","sortOptions","sortOption","getComparison","targetRow","comparisonRow","targetRowValue","comparisonRowValue","find","col","valueOf","String","localeCompare","numeric","sensitivity","a","b","column","sortButton","previousSortedButton","nextSortOrderIndex","tableSorted","from","querySelectorAll","updateTruncationTooltip","removeTooltipOnly","regenerateTooltip","updateScrollOffset","scrollOffset","scrollTop","itemsPerPageOptions","rangeLabelType","showItemsPerPageControl","showGoToPageControl","itemLabel","pageLabel","hideRangeLabel","defaultColumn","disconnectedCallback","disconnect","componentWillLoad","rowsPerPage","Number","paginationBarOptions","previousRowsPerPage","loadingOptions","showBackground","previousItemsPerPage","componentDidLoad","tableElement","tableContainer","clientWidth","scrollable","showLoadingIndicator","componentDidUpdate","truncateUpdatedData","tooltipEl","setProperty","allRows","newRows","createShowHideTruncation","checkMaxLines","setShowHideExpanded","addLineClampCSS","createTruncationTooltip","add","handleTypographyTruncationExpandToggle","detail","expanded","handlePageChange","target","parentElement","tableRowsContainer","previousPaginationPage","handleItemsPerPageChange","handleDensityChange","ev","clickListener","loadingHandler","newValue","truncationPatternHandler","dataHandler","newData","densityHandler","resetTruncation","then","rowHeightChangeHandler","oldValue","icRowHeightChange","emit","resetRowHeights","loadingIndicator","rowOptionsIndex","textContent","createElement","setExternalPopperProps","strategy","render","caption","hideColumnHeaders","stickyColumnHeaders","tabIndex","onScroll","aligned","heading","labelDuration","ref","totalItems"],"sources":["src/components/ic-data-table/ic-data-table.css?tag=ic-data-table&encapsulation=shadow","src/components/ic-data-table/ic-data-table.tsx"],"sourcesContent":[":host {\n position: relative;\n display: block;\n height: 100%;\n max-height: 100%;\n}\n\ntbody {\n vertical-align: top;\n}\n\n.table-container {\n position: relative;\n height: calc(100% - var(--ic-space-xxxs));\n display: flex;\n flex-direction: column;\n}\n\n.cell-container {\n display: flex;\n min-height: 1.5rem;\n overflow-y: hidden;\n}\n\n.truncation-show-hide {\n overflow: visible;\n display: block;\n}\n\n.cell-icon.truncation-show-hide {\n display: flex;\n}\n\n.cell-container:not(.data-type-element, .truncation-show-hide) {\n overflow-x: hidden;\n}\n\nic-loading-indicator {\n position: sticky;\n top: 20px;\n}\n\n.table-row-container {\n position: relative;\n height: 100%;\n overflow: auto;\n transition: var(--ic-easing-transition-fast);\n overflow-anchor: none;\n}\n\n:host([show-pagination=\"true\"]) .table-row-container {\n height: calc(100% - 3.5625rem);\n}\n\ntable {\n table-layout: fixed;\n border-spacing: 0;\n width: 100%;\n}\n\n.table-row-container:focus {\n outline: none;\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n z-index: 1;\n}\n\n:host([embedded=\"true\"]) .table-row-container {\n border: var(--ic-border-light);\n}\n\n.column-header-sticky {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.column-header-overlay {\n position: sticky;\n top: 0;\n z-index: 1;\n box-shadow: 0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%);\n}\n\n.row-header-sticky {\n position: sticky;\n left: 0;\n}\n\n.column-header,\n.table-row {\n box-sizing: border-box;\n}\n\n.table-row-selected {\n background-color: var(--ic-table-row-selected) !important;\n}\n\n.sort-button {\n margin-left: auto;\n}\n\n.sort-button:hover {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.sort-button:active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.sort-button svg {\n color: var(--ic-architectural-black);\n}\n\n.sort-button-unsorted svg {\n color: var(--ic-color-tertiary-text);\n}\n\n.table-density-dense {\n padding: var(--ic-space-xxs) var(--ic-space-xs) !important;\n}\n\n.text-dense {\n font-size: var(--ic-font-size-label);\n}\n\n.table-density-spacious {\n padding: 0.625rem var(--ic-space-xs) !important;\n}\n\n.text-spacious {\n font-size: 1.125rem;\n}\n\n.column-header-text {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.column-header,\n.row-header {\n text-align: left;\n padding: var(--ic-space-xs);\n background-color: var(--ic-architectural-40);\n border-right: var(--ic-border-light);\n border-bottom: var(--ic-border-light);\n}\n\n.column-header:last-child {\n border-right: none;\n}\n\n.scrollable .column-header:last-child {\n border-right: var(--ic-border-light) !important;\n}\n\n:host([embedded=\"true\"]) tr:last-child .table-cell,\n:host([embedded=\"true\"]) tr:last-child .row-header {\n border-bottom: none;\n}\n\n.column-header-alignment-left,\n.row-header-alignment-left,\n.cell-alignment-left {\n text-align: left !important;\n justify-content: start !important;\n}\n\n.column-header-alignment-right,\n.row-header-alignment-right,\n.cell-alignment-right {\n text-align: right !important;\n justify-content: end !important;\n}\n\n.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography {\n padding-right: calc(var(--ic-space-xxs) + var(--ic-space-xs));\n}\n\n.cell-alignment-right.truncation-show-hide ic-typography {\n --ellipsis-padding-right: calc(var(--ic-space-xxs) + var(--ic-space-xs));\n}\n\n.column-header-alignment-center,\n.row-header-alignment-center,\n.cell-alignment-center {\n text-align: center !important;\n justify-content: center !important;\n}\n\n.table-row:nth-child(even) {\n background-color: var(--ic-architectural-20);\n}\n\n.table-cell {\n padding: var(--ic-space-xs);\n border-bottom: solid var(--ic-architectural-100) var(--ic-space-1px);\n overflow: hidden;\n}\n\n.data-type-string,\n.data-type-address {\n text-align: left;\n vertical-align: top;\n}\n\n.data-type-number,\n.data-type-date {\n text-align: right;\n justify-content: end;\n vertical-align: top;\n}\n\n.cell-alignment-top {\n vertical-align: top;\n align-items: flex-start;\n}\n\n.cell-alignment-middle {\n vertical-align: middle;\n align-items: center;\n}\n\n.cell-alignment-bottom {\n vertical-align: bottom;\n align-items: flex-end;\n}\n\n.cell-emphasis-low {\n color: var(--ic-color-secondary-text);\n}\n\n.cell-emphasis-high {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.pagination-container {\n background-color: var(--ic-architectural-40);\n border-top: var(--ic-border-light);\n}\n\n.screen-reader-sort-text,\n.table-caption {\n position: absolute;\n left: -100rem;\n}\n\n.table-cell,\n.column-header,\n.row-header {\n word-wrap: break-word;\n white-space: pre-wrap;\n}\n\n.loading-empty {\n padding: var(--ic-space-xl) var(--ic-space-xxl);\n margin-top: var(--ic-space-xl);\n}\n\n.updating-state {\n padding: 0;\n border-bottom: var(--ic-border-light);\n}\n\n.updating-state-headers {\n border-bottom: none;\n}\n\n.loading {\n position: absolute;\n left: calc(50% - 5.9741rem);\n opacity: 0;\n transition: opacity var(--ic-transition-duration-slow);\n}\n\n.loading.show-background {\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-light);\n}\n\n.loading.show {\n opacity: 1;\n}\n\n.icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-right: var(--ic-space-xxs);\n}\n\n.column-header-alignment-right > .icon,\n.row-header-alignment-right > .icon,\n.cell-alignment-right > .icon,\n.column-header-alignment-right > ::slotted(svg),\n.row-header-alignment-right > ::slotted(svg),\n.cell-alignment-right > ::slotted(svg) {\n margin-right: auto;\n}\n\n.column-header-alignment-center > ic-typography,\n.row-header-alignment-right > ic-typography,\n.cell-alignment-center > ic-typography {\n flex: 1;\n}\n\n.icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n.truncation-tooltip ic-typography {\n display: -webkit-box;\n -webkit-line-clamp: var(--ic-line-clamp, 0);\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.truncation-tooltip ic-typography,\n.truncation-show-hide ic-typography {\n white-space: normal;\n}\n\n.ic-tooltip-overflow {\n overflow: hidden;\n}\n\n@media screen and (min-width: 576px) {\n .column-header-inner-container {\n display: flex;\n align-items: center;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Element,\n h,\n Prop,\n State,\n Listen,\n Watch,\n Fragment,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport unsortedIcon from \"./assets/unsorted-icon.svg\";\nimport ascendingIcon from \"./assets/ascending-icon.svg\";\nimport descendingIcon from \"./assets/descending-icon.svg\";\nimport {\n IcDataTableColumnDataTypes,\n IcDataTableColumnObject,\n IcDataTableDensityOptions,\n IcDataTableRowHeights,\n IcDataTableSortOrderOptions,\n IcDataTableTruncationTypes,\n IcDensityUpdateEventDetail,\n} from \"./ic-data-table.types\";\nimport { IcThemeForegroundNoDefault } from \"@ukic/web-components/dist/types/utils/types\";\nimport { IcPaginationBarOptions } from \"../../utils/types\";\n// Unable to import helper functions via @ukic/web-components\nimport {\n getSlotContent,\n isEmptyString,\n isSlotUsed,\n pxToRem,\n debounce,\n} from \"../../utils/helpers\";\n\n/**\n * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.\n * @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.\n * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.\n * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.\n * @slot pagination-bar - A custom ic-pagination-bar can be slotted below the data to provide enhanced control over how the data is interacted with when being fetched externally.\n */\n@Component({\n tag: \"ic-data-table\",\n styleUrl: \"ic-data-table.css\",\n shadow: true,\n})\nexport class DataTable {\n private DENSITY_HEIGHT_MULTIPLIER = {\n dense: 0.8,\n default: 1,\n spacious: 1.2,\n };\n\n private DENSITY_PADDING_HEIGHT_DIFF = {\n dense: 8,\n default: 16,\n spacious: 20,\n };\n\n private SORT_ICONS = {\n unsorted: unsortedIcon,\n ascending: ascendingIcon,\n descending: descendingIcon,\n };\n\n private hasLoadedForOneSecond: boolean = true;\n private loadingIndicator: HTMLIcLoadingIndicatorElement;\n private timerStarted: number;\n private resizeObserver: ResizeObserver = null;\n private SHOW_HIDE_STRING = \"show-hide\";\n private SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;\n private TOOLTIP_STRING = \"tooltip\";\n private TOOLTIP = `ic-${this.TOOLTIP_STRING}`;\n private TEXT_WRAP_STRING = \"text-wrap\";\n private TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;\n private dataUpdated = false;\n private tableSorted: boolean;\n private rowHeightSet = false;\n private initialLoad: boolean = false;\n private icPageChangeEvent: boolean = false;\n private itemsPerPageChange: boolean = false;\n private DATA_ROW_HEIGHT_STRING = \"data-row-height\";\n private previousItemsPerPage: number;\n private DEFAULT_LINE_HEIGHT = 24;\n private densityUpdate: boolean = false;\n private previousPaginationPage: number;\n\n @Element() el: HTMLIcDataTableElement;\n\n @State() fromRow: number = 0;\n\n @State() previousRowsPerPage: number;\n\n @State() rowsPerPage: number;\n\n @State() scrollable: boolean = false;\n\n @State() scrollOffset: number = 0;\n\n @State() selectedRow: object;\n\n @State() sortedColumn: string;\n\n @State() sortedColumnOrder: IcDataTableSortOrderOptions;\n\n @State() toRow: number;\n\n @State() currentRowHeight: number;\n\n /**\n * The title for the table only visible to screen readers.\n */\n @Prop() caption!: string;\n\n /**\n * The column headers for the table.\n */\n @Prop() columns!: IcDataTableColumnObject[];\n\n /**\n * The row content for the table.\n */\n @Prop() data: { [key: string]: any }[];\n\n /**\n * Set the density of the table including font and padding.\n */\n @Prop({ mutable: true }) density?: IcDataTableDensityOptions = \"default\";\n\n /**\n * Applies a border to the table container.\n */\n @Prop() embedded?: boolean = false;\n\n /**\n * Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method.\n */\n @Prop({ mutable: true }) globalRowHeight?: IcDataTableRowHeights = \"auto\";\n\n /**\n * If `true`, column headers will not be visible.\n */\n @Prop() hideColumnHeaders?: boolean = false;\n\n /**\n * When set to `true`, the full table will show a loading state, featuring a radial indicator.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n /**\n * Sets the props for the circular loading indicator used in the loading state.\n */\n @Prop() loadingOptions?: {\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 };\n\n /**\n * The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component.\n */\n @Prop() minimumLoadingDisplayDuration?: number = 1000;\n\n /**\n * Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored.\n */\n @Prop() paginationBarOptions?: IcPaginationBarOptions = {\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n };\n\n /**\n * If `true`, adds a pagination bar to the bottom of the table.\n */\n @Prop() showPagination?: boolean = false;\n\n /**\n * If `true`, allows table columns to be sorted using applied sort buttons.\n */\n @Prop() sortable?: boolean = false;\n\n /**\n * Sets the order columns will be sorted in and allows for 'default' sorts to be added.\n */\n @Prop() sortOptions?: {\n sortOrders: IcDataTableSortOrderOptions[];\n defaultColumn?: string;\n } = {\n sortOrders: [\"unsorted\", \"ascending\", \"descending\"],\n defaultColumn: \"\",\n };\n\n /**\n * If `true`, column headers will remain at the top of the table when scrolling vertically.\n */\n @Prop() stickyColumnHeaders?: boolean = false;\n\n /**\n * If `true`, row headers will remain to the left when scrolling horizontally.\n */\n @Prop() stickyRowHeaders?: boolean = false;\n\n /**\n * Sets the method used to truncate longer text in cells where textWrap is `false`.\n * The `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\"/\"See less\" buttons.\n */\n @Prop() truncationPattern?: IcDataTableTruncationTypes;\n\n /**\n * If `true`, the table displays a linear loading indicator below the header row to indicate an updating state.\n */\n @Prop() updating?: boolean = false;\n\n /**\n * Sets the props for the linear loading indicator used in the updating state.\n */\n @Prop() updatingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n };\n\n /**\n * Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\n * If the function returns `null`, that row's height will be set to the `globalRowHeight` property.\n */\n @Prop({ mutable: true }) variableRowHeight?: (params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null;\n\n /**\n * Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table.\n */\n @Event() icRowHeightChange: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.rowsPerPage = Number(\n this.paginationBarOptions.itemsPerPageOptions[0].value\n );\n this.previousRowsPerPage = this.rowsPerPage;\n this.toRow = this.rowsPerPage;\n this.sortedColumn = this.sortOptions.defaultColumn;\n this.sortedColumnOrder = this.sortOptions.sortOrders[0];\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: this.data?.length > 0,\n };\n this.initialLoad = true;\n this.previousItemsPerPage = this.rowsPerPage;\n }\n\n componentDidLoad(): void {\n const tableElement = this.el.shadowRoot.querySelector(\"table\");\n const tableContainer = this.el.shadowRoot.querySelector(\".table-container\");\n\n if (this.dataUpdated) {\n this.dataUpdated = false;\n }\n\n if (\n tableElement?.clientHeight > tableContainer?.clientHeight ||\n tableElement?.clientWidth > tableContainer?.clientWidth\n ) {\n this.scrollable = true;\n }\n if (this.loading) {\n this.startLoadingTimer();\n this.showLoadingIndicator();\n }\n\n if (this.truncationPattern) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {\n this.dataTruncation(typographyEl);\n }\n }\n );\n\n this.debounceDataTruncation();\n }\n\n if (this.globalRowHeight !== \"auto\") {\n this.updateSetRowHeight();\n }\n }\n\n componentDidUpdate(): void {\n this.truncateUpdatedData();\n }\n\n private truncateUpdatedData() {\n if (this.dataUpdated) {\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.resetShowHideTruncation();\n }\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.dataUpdated = false;\n }\n\n if (this.tableSorted) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.tableSorted = false;\n }\n\n // This function recalculates the tooltip truncation when the rowHeight has been set.\n // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete\n if (this.rowHeightSet) {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n // If the set row height is bigger than the cell container even\n // with textWrap, set the row height\n if (\n !cellContainer?.style?.height &&\n rowHeight > cellContainer.clientHeight\n ) {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n\n if (this.truncationPattern) {\n // If the set row height is bigger than the typography truncation wrapper\n // scroll height, remove see more / see less button\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const showHideBtn =\n typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n showHideBtn &&\n truncWrapper?.scrollHeight <= cellContainer.clientHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n }\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n } else {\n this.updateSetRowHeight(typographyEl);\n }\n }\n );\n\n this.rowHeightSet = false;\n }\n\n // Only run truncation on the new rows\n // when the number of items per page has increased\n if (this.itemsPerPageChange) {\n const allRows = this.el.shadowRoot.querySelectorAll(\".table-row\");\n\n if (this.rowsPerPage > this.previousItemsPerPage) {\n const newRows = Array.from(allRows).slice(this.previousItemsPerPage);\n\n newRows.forEach((row) => {\n row\n .querySelectorAll(\"ic-typography\")\n .forEach((typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n });\n }\n\n this.previousItemsPerPage = this.rowsPerPage;\n this.itemsPerPageChange = false;\n }\n\n if (!this.initialLoad && this.icPageChangeEvent) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n // set truncation to see more if opened and next/previous page is pressed\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n typographyEl?.scrollHeight > cellContainer.clientHeight &&\n !showHideBtn\n ) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n });\n }\n\n this.icPageChangeEvent = false;\n }\n\n if (this.densityUpdate) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n\n this.densityUpdate = false;\n }\n }\n\n private updateSetRowHeight = (typographyEl?: HTMLIcTypographyElement) => {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n\n if (typographyEl) {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(\"height\");\n }\n } else {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(\"height\");\n }\n }\n );\n }\n };\n\n private createShowHideTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.checkMaxLines(typographyEl.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT)}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.height = null;\n }\n\n private debounceDataTruncation = () => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {\n this.resizeObserver = new ResizeObserver(\n // This gets triggered twice due to updated data and see more/see less button\n debounce(() => {\n // console.log(\"resizeObserver triggered\");\n this.dataTruncation(typographyEl);\n }, 200) as ResizeObserverCallback\n );\n\n this.resizeObserver.observe(typographyEl);\n }\n }\n );\n };\n\n private getLines = (height: number): number =>\n Math.floor(height / this.DEFAULT_LINE_HEIGHT);\n\n private truncate = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) => {\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n //24 is the height of a single line\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.addTooltipTruncation(typographyEl, cellContainer, tooltip);\n }\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }\n } else {\n if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n\n cellContainer.appendChild(typographyEl);\n tooltip.remove();\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\"))\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n };\n\n private addTooltipTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n\n if (!tooltip) {\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private addShowHideTruncation(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement\n ) {\n cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);\n this.createShowHideTruncation(typographyEl, cellContainer);\n }\n\n private dataTruncation = (typographyEl: HTMLIcTypographyElement) => {\n // Tooltip truncation mentioned in AC. Will need revisiting\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n if (\n cellContainer?.classList.contains(\"data-type-element\") ||\n this.dataUpdated\n ) {\n return;\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n typographyEl.shadowRoot.querySelector(\"button\")\n ) {\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n // If the see more/see less is present and the max lines is equal to the cell container\n // remove the see more/see less button\n if (showHideBtn) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n\n if (\n this.getLines(truncWrapper.scrollHeight) ===\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n }\n\n // Deals with setting and resetting row height and re-truncating data\n if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n // cellContainer.clientHeight - 24 removes the extra line by see more/see less\n if (\n truncWrapper &&\n cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n if (typographyEl.scrollHeight > cellContainer.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n return;\n }\n }\n\n if (\n typographyEl?.scrollHeight > 0 &&\n cellContainer?.clientHeight > 0 &&\n typographyEl?.scrollHeight === cellContainer?.clientHeight\n ) {\n if (tooltip) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n return;\n }\n\n this.truncate(typographyEl, cellContainer, tooltip);\n };\n\n private getTruncWrapper(typographyEl: HTMLIcTypographyElement) {\n return typographyEl.shadowRoot.querySelector(\".trunc-wrapper\");\n }\n\n // Set the height to initial if row height is set and the show / hide truncation\n // is clicked\n @Listen(\"typographyTruncationExpandToggle\")\n handleTypographyTruncationExpandToggle({\n detail,\n }: CustomEvent<{\n expanded: boolean;\n typographyEl: HTMLIcTypographyElement;\n }>) {\n const { expanded, typographyEl } = detail;\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (cellContainer.style.height && expanded) {\n cellContainer.style.height = \"inherit\";\n }\n }\n\n @Listen(\"icPageChange\")\n handlePageChange({ detail, target }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.fromRow = (detail.value - 1) * this.rowsPerPage;\n this.toRow = this.fromRow + this.rowsPerPage;\n const tableRowsContainer = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n );\n if (this.previousRowsPerPage === this.rowsPerPage) {\n tableRowsContainer.scrollTop = 0;\n } else if (this.previousRowsPerPage < this.rowsPerPage) {\n tableRowsContainer.scrollTop = this.scrollOffset;\n this.previousRowsPerPage = this.rowsPerPage;\n } else {\n this.previousRowsPerPage = this.rowsPerPage;\n }\n }\n\n if (!this.initialLoad && this.previousPaginationPage !== detail.value) {\n // This is to prevent icPageChange from triggering truncation on first load\n this.icPageChangeEvent = true;\n }\n\n this.previousPaginationPage = detail.value;\n this.initialLoad = false;\n }\n\n @Listen(\"icItemsPerPageChange\")\n handleItemsPerPageChange({\n detail,\n target,\n }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.previousRowsPerPage = this.rowsPerPage;\n this.rowsPerPage = detail.value;\n }\n\n this.itemsPerPageChange = true;\n }\n\n @Listen(\"icTableDensityUpdate\")\n handleDensityChange(ev: CustomEvent<IcDensityUpdateEventDetail>): void {\n this.density = ev.detail.value;\n }\n\n @Listen(\"click\", { target: \"window\" })\n clickListener(ev: MouseEvent): void {\n if (ev.target !== this.el) this.selectedRow = undefined;\n }\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n if (newValue) this.startLoadingTimer();\n\n if (this.loading) {\n setTimeout(() => {\n this.showLoadingIndicator();\n }, 500);\n }\n }\n\n @Watch(\"truncationPattern\")\n truncationPatternHandler(newValue: IcDataTableTruncationTypes): void {\n if (newValue === this.SHOW_HIDE_STRING) {\n this.updateTruncationTooltip(true);\n\n // Not using debounceDataTruncation here due to resizeObserver not being triggered\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltip);\n }\n );\n }\n\n if (newValue === this.TOOLTIP_STRING) {\n // ResizeObserver is trigger here due to the see more/see less links being removed.\n // The resizeObserver will also apply the tooltip where relevant\n this.resetShowHideTruncation();\n }\n }\n\n @Watch(\"data\")\n async dataHandler(newData: { [key: string]: any }[]) {\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: newData?.length > 0,\n };\n if (this.loading) {\n !this.hasLoadedForOneSecond\n ? setTimeout(\n () => (this.loading = false),\n this.minimumLoadingDisplayDuration -\n (Date.now() - this.timerStarted)\n )\n : (this.loading = false);\n }\n if (this.updating) this.updating = false;\n\n this.dataUpdated = true;\n }\n\n @Watch(\"density\")\n async densityHandler() {\n this.densityUpdate = true;\n }\n\n private removeTextWrap = (): void => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tableCell = typographyEl.closest(\"td\");\n if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {\n tableCell.classList.remove(this.TEXT_WRAP_STRING);\n }\n }\n );\n };\n\n private getCellContainer = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLElement => {\n return typographyEl.closest(\".cell-container\");\n };\n\n private deleteTextWrapDataKey = (\n array: IcDataTableColumnObject[] | object[]\n ) =>\n Array.isArray(array) &&\n array.forEach((val) => val.textWrap && delete val.textWrap);\n\n private resetShowHideTruncation(typographyEl?: HTMLIcTypographyElement) {\n if (typographyEl) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n truncWrapper?.scrollHeight > cellContainer?.clientHeight &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\")) &&\n Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT) !==\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n typographyEl.checkMaxLines(truncWrapper.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(\n cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT\n )}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.height = null;\n } else {\n typographyEl.resetTruncation().then(() => {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n });\n }\n } else {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n typographyEl.resetTruncation().then(() => {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n });\n });\n }\n }\n\n @Watch(\"globalRowHeight\")\n @Watch(\"variableRowHeight\")\n rowHeightChangeHandler(newValue: number, oldValue: number): void {\n if (+newValue !== +oldValue) {\n this.deleteTextWrapDataKey(this.data);\n this.deleteTextWrapDataKey(this.columns);\n this.removeTextWrap();\n\n this.icRowHeightChange.emit();\n\n this.rowHeightSet = true;\n }\n }\n\n /**\n * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.\n */\n @Method()\n async resetRowHeights(rowHeight?: number | \"auto\"): Promise<void> {\n this.globalRowHeight = rowHeight || \"auto\";\n this.variableRowHeight = null;\n }\n\n private showLoadingIndicator() {\n this.loadingIndicator.classList.add(\"show\");\n }\n\n private startLoadingTimer = (): void => {\n this.hasLoadedForOneSecond = false;\n this.timerStarted = Date.now();\n setTimeout(() => {\n this.hasLoadedForOneSecond = true;\n this.timerStarted = null;\n }, this.minimumLoadingDisplayDuration);\n };\n\n private isObject = (value: any) => typeof value === \"object\";\n\n private notDefaultDensity = () => this.density !== \"default\";\n\n private getCellContent = (\n cell: any,\n dataType: IcDataTableColumnDataTypes\n ): any => {\n switch (dataType) {\n case \"element\":\n return undefined;\n case \"date\":\n return (\n cell instanceof Date ? cell : new Date(cell)\n ).toLocaleDateString();\n default:\n return cell;\n }\n };\n\n private getCellAlignment = (\n cell: any,\n alignment: \"horizontal\" | \"vertical\"\n ) => {\n if (this.isObject(cell) && Object.keys(cell).includes(\"cellAlignment\")) {\n return this.getObjectValue(\n this.getObjectValue(cell, \"cellAlignment\"),\n alignment\n );\n }\n };\n\n private getCellOptions = (cell: any, key: string) => {\n if (!(this.isObject(cell) && Object.keys(cell).includes(key))) return;\n\n return this.getObjectValue(cell, key);\n };\n\n private createUpdatingIndicator = () => {\n const { appearance, description, max, min, progress } =\n this.updatingOptions || {};\n return (\n <th colSpan={this.columns.length} class=\"updating-state\">\n <ic-loading-indicator\n appearance={appearance}\n description={description || \"Updating table data\"}\n fullWidth={true}\n max={max}\n min={min}\n progress={progress}\n type=\"linear\"\n size=\"small\"\n ></ic-loading-indicator>\n </th>\n );\n };\n\n private setRowHeight = (height: number) => {\n return pxToRem(\n `${\n height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -\n this.DENSITY_PADDING_HEIGHT_DIFF[this.density]\n }px`\n );\n };\n\n private setTruncationClass = () => {\n if (this.truncationPattern) {\n return { [`truncation-${this.truncationPattern}`]: true };\n }\n\n return {};\n };\n\n private createCells = (row: object, rowIndex: number) => {\n const rowValues = Object.values(row);\n const rowKeys = Object.keys(row);\n const index = rowIndex;\n\n const rowOptions = this.getRowOptions(rowKeys, rowValues);\n let rowAlignment: string;\n let rowEmphasis: string;\n\n const headerIndex = rowKeys.indexOf(\"header\");\n if (headerIndex > -1) {\n rowAlignment = this.getObjectValue(\n rowValues[headerIndex],\n \"rowAlignment\"\n );\n rowEmphasis = this.getObjectValue(rowValues[headerIndex], \"emphasis\");\n }\n\n const variableRowHeightVal = this.variableRowHeight?.({\n ...row,\n index,\n });\n const currentRowHeight = variableRowHeightVal\n ? variableRowHeightVal !== \"auto\" && variableRowHeightVal\n : this.globalRowHeight !== \"auto\" && this.globalRowHeight;\n\n return rowValues.map((cell, index) => {\n const columnProps = this.columns[index];\n const cellSlotName = `${columnProps?.key}-${rowIndex}`;\n const hasIcon = this.isObject(cell) && Object.keys(cell).includes(\"icon\");\n const cellValue = (key: string) => this.getObjectValue(cell, key);\n\n if (rowKeys[index] === \"header\") {\n return (\n <th\n scope=\"row\"\n colSpan={cellValue(\"colspan\")}\n class={{\n [\"row-header\"]: true,\n [`row-header-alignment-${cellValue(\"cellAlignment\")}`]:\n !!cellValue(\"cellAlignment\"),\n [\"row-header-sticky\"]: this.stickyRowHeaders,\n }}\n >\n {cellValue(\"title\")}\n </th>\n );\n }\n\n if (rowKeys[index] !== \"rowOptions\") {\n return (\n <td\n class={{\n [\"table-cell\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n <div\n innerHTML={\n columnProps?.dataType === \"element\" &&\n !isSlotUsed(this.el, cellSlotName)\n ? (cell as string)\n : null\n }\n class={{\n \"cell-container\": columnProps?.dataType !== \"element\",\n [`cell-alignment-${\n columnProps?.columnAlignment?.vertical ||\n rowOptions?.rowAlignment?.vertical ||\n rowAlignment ||\n this.getCellAlignment(cell, \"vertical\")\n }`]:\n !!columnProps?.columnAlignment?.vertical ||\n !!rowOptions?.rowAlignment?.vertical ||\n !!rowAlignment ||\n !!this.getCellAlignment(cell, \"vertical\"),\n [`cell-alignment-${\n columnProps?.columnAlignment?.horizontal ||\n rowOptions?.rowAlignment?.horizontal ||\n this.getCellAlignment(cell, \"horizontal\")\n }`]:\n !!columnProps?.columnAlignment?.horizontal ||\n !!rowOptions?.rowAlignment?.horizontal ||\n !!this.getCellAlignment(cell, \"horizontal\"),\n [`data-type-${columnProps?.dataType}`]: true,\n [this.TEXT_WRAP_STRING]:\n columnProps?.textWrap ||\n rowOptions?.textWrap ||\n !!this.getCellOptions(cell, \"textWrap\"),\n [\"cell-icon\"]: hasIcon || !!columnProps?.icon?.icon,\n ...this.setTruncationClass(),\n }}\n style={{\n height:\n (this.truncationPattern || currentRowHeight) &&\n !columnProps.textWrap &&\n !rowOptions.textWrap &&\n !this.getCellOptions(cell, \"textWrap\") &&\n columnProps?.dataType !== \"element\"\n ? this.setRowHeight(currentRowHeight)\n : null,\n }}\n data-row-height={\n this.truncationPattern || currentRowHeight\n ? this.setRowHeight(currentRowHeight)\n : null\n }\n >\n {isSlotUsed(this.el, cellSlotName) ? (\n <slot name={cellSlotName} />\n ) : (\n <Fragment>\n {isSlotUsed(this.el, `${cellSlotName}-icon`) ? (\n <slot name={`${cellSlotName}-icon`} />\n ) : (\n (hasIcon || columnProps?.icon?.onAllCells) && (\n <span\n class=\"icon\"\n innerHTML={cellValue(\"icon\") || columnProps?.icon.icon}\n ></span>\n )\n )}\n {columnProps?.dataType !== \"element\" &&\n !isSlotUsed(this.el, cellSlotName) && (\n <ic-typography\n variant=\"body\"\n class={{\n [`cell-emphasis-${\n (this.isObject(cell) && cellValue(\"emphasis\")) ||\n columnProps?.emphasis ||\n rowEmphasis\n }`]:\n (this.isObject(cell) && !!cellValue(\"emphasis\")) ||\n !!columnProps?.emphasis ||\n !!rowEmphasis,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {this.isObject(cell) &&\n columnProps?.dataType !== \"date\" ? (\n Object.keys(cell).includes(\"href\") ? (\n <ic-link href={cellValue(\"href\")}>\n {cellValue(\"data\")}\n </ic-link>\n ) : (\n cellValue(\"data\")\n )\n ) : (\n this.getCellContent(cell, columnProps?.dataType)\n )}\n </ic-typography>\n )}\n </Fragment>\n )}\n </div>\n </td>\n );\n }\n });\n };\n\n private createColumnHeaders = () => {\n return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (\n <th\n scope=\"col\"\n class={{\n [\"column-header\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [\"updating-state-headers\"]: this.updating && !this.loading,\n }}\n colSpan={colspan}\n >\n <div\n class={{\n \"column-header-inner-container\": true,\n [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,\n }}\n >\n {isSlotUsed(this.el, `${key}-column-icon`) ? (\n <slot name={`${key}-column-icon`} />\n ) : (\n icon &&\n !icon.hideOnHeader && (\n <span class=\"icon\" innerHTML={icon.icon}></span>\n )\n )}\n <ic-typography\n variant=\"body\"\n class={{\n [\"column-header-text\"]: true,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n {this.sortable && (\n <ic-button\n variant=\"icon\"\n id={`sort-button-${key}`}\n aria-label={this.getSortButtonLabel(key)}\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.sortRows(key)}\n innerHTML={\n this.SORT_ICONS[\n this.sortedColumn === key\n ? this.sortedColumnOrder\n : \"unsorted\"\n ]\n }\n class={{\n [\"sort-button\"]: true,\n [\"sort-button-unsorted\"]:\n this.sortedColumn !== key ||\n this.sortedColumnOrder === \"unsorted\",\n }}\n ></ic-button>\n )}\n </div>\n </th>\n ));\n };\n\n private onRowClick = (row: object) => {\n this.selectedRow =\n this.selectedRow !== row && !this.loading && !this.updating && row;\n };\n\n private createRows = () => {\n const data = this.showPagination\n ? this.data.slice(this.fromRow, this.toRow)\n : this.data.slice();\n\n /**\n * Ensures that createCells has a value in data to map over to actually render the slot.\n * Removes the need for the user to add it multiple times.\n */\n this.columns.forEach(({ key }) => {\n data.forEach((row, rowIndex) => {\n const cellSlotName = `${key}-${rowIndex}`;\n if (isSlotUsed(this.el, cellSlotName)) {\n row[key] = getSlotContent(this.el, cellSlotName);\n }\n });\n });\n\n return data\n .sort(!this.sortable ? undefined : this.getSortFunction())\n .map((row, index) => {\n return (\n <tr\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.onRowClick(row)}\n class={{\n [\"table-row\"]: true,\n [\"table-row-selected\"]: this.selectedRow === row,\n }}\n >\n {this.createCells(row, index)}\n </tr>\n );\n });\n };\n\n private getObjectValue = (cell: object, key: string) => {\n return Object.values(cell)[Object.keys(cell).indexOf(key)];\n };\n\n private getSortButtonLabel = (key: string) => {\n let label = \"\";\n const getNextSortOption = (option: IcDataTableSortOrderOptions) => {\n const sortOrders = this.sortOptions.sortOrders;\n return sortOrders[(sortOrders.indexOf(option) + 1) % sortOrders.length];\n };\n\n if (this.sortedColumn === key) {\n const sortOption = getNextSortOption(this.sortedColumnOrder);\n label = sortOption !== \"unsorted\" ? `Sort ${sortOption}` : \"Remove sort\";\n } else {\n label = `Sort ${getNextSortOption(\"unsorted\")}`;\n }\n\n return label;\n };\n\n private getComparison = (targetRow: any, comparisonRow: any): number => {\n const targetRowValue = targetRow[this.sortedColumn];\n const comparisonRowValue = comparisonRow[this.sortedColumn];\n return this.columns.find((col) => col.key === this.sortedColumn)\n .dataType === \"date\"\n ? new Date(targetRowValue).valueOf() -\n new Date(comparisonRowValue).valueOf()\n : String(\n this.isObject(targetRowValue)\n ? Object.values(targetRowValue)[0]\n : targetRowValue\n ).localeCompare(\n String(\n this.isObject(comparisonRowValue)\n ? Object.values(comparisonRowValue)[0]\n : comparisonRowValue\n ),\n undefined,\n { numeric: true, sensitivity: \"base\" }\n );\n };\n\n private getSortFunction = () => {\n switch (this.sortedColumnOrder) {\n case \"ascending\":\n return (a: any, b: any) => this.getComparison(a, b);\n case \"descending\":\n return (a: any, b: any) => this.getComparison(b, a);\n default:\n return undefined;\n }\n };\n\n private sortRows = (column: string) => {\n const sortButton = this.el.shadowRoot.querySelector(\n `#sort-button-${column}`\n ) as HTMLIcButtonElement;\n\n const sortOrders = this.sortOptions.sortOrders;\n\n if (column !== this.sortedColumn) {\n if (this.sortedColumn) {\n const previousSortedButton = this.el.shadowRoot.querySelector(\n `#sort-button-${this.sortedColumn}`\n ) as HTMLIcButtonElement;\n previousSortedButton.setAttribute(\n \"aria-label\",\n this.getSortButtonLabel(column)\n ); // Passing through unsorted column returns correct label for newly unsorted column\n }\n this.sortedColumn = column;\n this.sortedColumnOrder = \"unsorted\";\n }\n\n let nextSortOrderIndex = sortOrders.indexOf(this.sortedColumnOrder) + 1;\n\n if (nextSortOrderIndex > sortOrders.length - 1) {\n nextSortOrderIndex = 0;\n }\n\n this.sortedColumnOrder = sortOrders[nextSortOrderIndex];\n\n sortButton.setAttribute(\"aria-label\", this.getSortButtonLabel(column));\n\n this.tableSorted = true;\n };\n\n private getTypographyElements = (): HTMLIcTypographyElement[] => {\n return Array.from(\n this.el.shadowRoot.querySelectorAll(\n \"ic-typography:not(.column-header-text)\"\n )\n );\n };\n\n private getTooltip = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLIcTooltipElement => {\n return typographyEl.closest(this.TOOLTIP);\n };\n\n private updateTruncationTooltip = (removeTooltipOnly: boolean = false) => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tooltip = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n return;\n }\n\n this.regenerateTooltip(\n cellContainer,\n typographyEl,\n tooltip,\n removeTooltipOnly\n );\n }\n );\n };\n\n private updateScrollOffset = () => {\n this.scrollOffset = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n ).scrollTop;\n };\n\n private getRowOptions(rowKeys: string[], rowValues: any[]) {\n const rowOptionsIndex = rowKeys.indexOf(\"rowOptions\");\n return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];\n }\n\n private regenerateTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement,\n removeTooltipOnly?: boolean\n ) {\n // When sorting the table, instead of regenerating the tooltip,\n // the tooltip details are updated\n if (tooltip) {\n if (this.tableSorted) {\n tooltip.setAttribute(\"target\", typographyEl.id);\n tooltip.setAttribute(\"label\", typographyEl.textContent);\n } else {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n if (removeTooltipOnly) {\n return;\n }\n }\n\n // This add line clamp to data only when\n // the data object has been updated\n if (!typographyEl.getAttribute(\"style\") && this.dataUpdated) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n // Adding the tableSorted boolean prevents the tooltip\n // being regenerated and flashing\n if (\n typographyEl?.scrollHeight > cellContainer?.clientHeight &&\n !this.tableSorted\n ) {\n if (!typographyEl.getAttribute(\"style\")) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private removeTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement\n ) {\n cellContainer.appendChild(typographyEl);\n if (tooltip) {\n tooltip.remove();\n }\n }\n\n private addLineClampCSS(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.setAttribute(\n \"style\",\n `--ic-line-clamp: ${this.getLines(cellContainer?.clientHeight)}`\n );\n }\n\n private createTruncationTooltip(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n const tooltipEl = document.createElement(\"ic-tooltip\");\n tooltipEl.setAttribute(\"target\", typographyEl.id);\n tooltipEl.setAttribute(\"label\", typographyEl.textContent);\n tooltipEl.classList.add(\"ic-tooltip-overflow\");\n tooltipEl.setExternalPopperProps({\n // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly\n strategy: \"fixed\",\n });\n cellContainer.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n\n render() {\n const {\n caption,\n createColumnHeaders,\n createRows,\n createUpdatingIndicator,\n data,\n hideColumnHeaders,\n loading,\n loadingOptions,\n paginationBarOptions,\n scrollable,\n scrollOffset,\n showPagination,\n sortable,\n sortedColumnOrder,\n sortedColumn,\n stickyColumnHeaders,\n updateScrollOffset,\n updating,\n } = this;\n\n return (\n <div class=\"table-container\">\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <div\n class={{\n [\"table-row-container\"]: true,\n scrollable,\n }}\n tabIndex={scrollable ? 0 : null}\n onScroll={updateScrollOffset}\n >\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <table>\n <caption class=\"table-caption\">{caption}</caption>\n {!hideColumnHeaders && (\n <thead\n class={{\n [\"column-header-sticky\"]: stickyColumnHeaders,\n [\"column-header-overlay\"]:\n stickyColumnHeaders && scrollOffset !== 0,\n }}\n >\n <tr>{createColumnHeaders()}</tr>\n </thead>\n )}\n {updating &&\n !loading &&\n (hideColumnHeaders ? (\n <thead>{createUpdatingIndicator()}</thead>\n ) : (\n createUpdatingIndicator()\n ))}\n {data?.length > 0 && !loading && <tbody>{createRows()}</tbody>}\n </table>\n {!data?.length &&\n !loading &&\n (isSlotUsed(this.el, \"empty-state\") ? (\n <slot name=\"empty-state\" />\n ) : (\n <ic-empty-state\n aligned=\"center\"\n heading=\"No Data\"\n class=\"loading-empty\"\n ></ic-empty-state>\n ))}\n </div>\n {loading && (\n <ic-loading-indicator\n appearance={loadingOptions?.appearance}\n class={{\n \"loading-empty\": loading,\n loading: true,\n \"show-background\": loadingOptions.showBackground,\n }}\n description={loadingOptions.description || \"Loading table data\"}\n label={loadingOptions.label || \"Loading...\"}\n labelDuration={loadingOptions?.labelDuration}\n max={loadingOptions?.max}\n min={loadingOptions?.min}\n progress={loadingOptions?.progress}\n ref={(el: HTMLIcLoadingIndicatorElement) =>\n (this.loadingIndicator = el)\n }\n ></ic-loading-indicator>\n )}\n {(showPagination || isSlotUsed(this.el, \"pagination-bar\")) && (\n <div class=\"pagination-container\">\n {isSlotUsed(this.el, \"pagination-bar\") ? (\n <slot name=\"pagination-bar\" />\n ) : (\n <ic-pagination-bar\n totalItems={data.length}\n type={paginationBarOptions.type}\n rangeLabelType={paginationBarOptions.rangeLabelType}\n showItemsPerPageControl={\n paginationBarOptions.showItemsPerPageControl\n }\n showGoToPageControl={paginationBarOptions.showGoToPageControl}\n itemsPerPageOptions={paginationBarOptions.itemsPerPageOptions}\n alignment={paginationBarOptions.alignment}\n appearance={paginationBarOptions.appearance}\n itemLabel={paginationBarOptions.itemLabel}\n pageLabel={paginationBarOptions.pageLabel}\n hideRangeLabel={paginationBarOptions.hideRangeLabel}\n ></ic-pagination-bar>\n )}\n </div>\n )}\n {sortable && (\n <div class=\"screen-reader-sort-text\" aria-live=\"polite\">\n {sortedColumnOrder !== \"unsorted\" && sortedColumn\n ? `${sortedColumn} sorted ${sortedColumnOrder}`\n : \"table unsorted\"}\n </div>\n )}\n </div>\n );\n }\n}\n"],"mappings":"4oBAAA,MAAMA,EAAiB,quK,MCiDVC,EAAS,M,8EACZC,KAAAC,0BAA4B,CAClCC,MAAO,GACPC,QAAS,EACTC,SAAU,KAGJJ,KAAAK,4BAA8B,CACpCH,MAAO,EACPC,QAAS,GACTC,SAAU,IAGJJ,KAAAM,WAAa,CACnBC,SAAUC,EACVC,UAAWC,EACXC,WAAYC,GAGNZ,KAAAa,sBAAiC,KAGjCb,KAAAc,eAAiC,KACjCd,KAAAe,iBAAmB,YACnBf,KAAAgB,oBAAsB,GAAGhB,KAAKe,wBAC9Bf,KAAAiB,eAAiB,UACjBjB,KAAAkB,QAAU,MAAMlB,KAAKiB,iBACrBjB,KAAAmB,iBAAmB,YACnBnB,KAAAoB,gBAAkB,IAAIpB,KAAKmB,mBAC3BnB,KAAAqB,YAAc,MAEdrB,KAAAsB,aAAe,MACftB,KAAAuB,YAAuB,MACvBvB,KAAAwB,kBAA6B,MAC7BxB,KAAAyB,mBAA8B,MAC9BzB,KAAA0B,uBAAyB,kBAEzB1B,KAAA2B,oBAAsB,GACtB3B,KAAA4B,cAAyB,MA8WzB5B,KAAA6B,mBAAsBC,IAC5B,MAAMC,EAAWC,SACfC,iBAAiBC,SAASC,iBAAiBJ,UAG7C,GAAID,EAAc,CAChB,MAAMM,EAAgBpC,KAAKqC,iBAAiBP,GAE5C,MAAMQ,EACJP,EACAQ,WAAWH,EAAcI,aAAaxC,KAAK0B,yBAE7C,GAAII,EAAaW,aAAeH,EAAW,CACzCF,EAAcM,MAAMC,eAAe,S,MAEhC,CACL3C,KAAK4C,wBAAwBC,SAC1Bf,IACC,MAA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AAKI,MAAM,wBACRmC,EAAWzJ,KAAK0J,GAAI,kBACnBxC,EAAA,QAAMqD,KAAK,mBAEXrD,EAAA,qBACEmM,WAAYtH,EAAK1E,OACjBG,KAAM6H,EAAqB7H,KAC3BiH,eAAgBY,EAAqBZ,eACrCC,wBACEW,EAAqBX,wBAEvBC,oBAAqBU,EAAqBV,oBAC1CH,oBAAqBa,EAAqBb,oBAC1CpI,UAAWiJ,EAAqBjJ,UAChCQ,WAAYyI,EAAqBzI,WACjCgI,UAAWS,EAAqBT,UAChCC,UAAWQ,EAAqBR,UAChCC,eAAgBO,EAAqBP,kBAK5CzD,GACCnE,EAAA,OAAKI,MAAM,0BAAyB,YAAW,UAC5CqE,IAAsB,YAAcD,EACjC,GAAGA,YAAuBC,IAC1B,kB"}
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as i,H as o,g as s}from"./p-8455d1bb.js";import{d as a,j as n,a as r,i as c}from"./p-1440cdd1.js";import{C as l}from"./p-0aa9ce8b.js";import{C as u}from"./p-170ddfc2.js";import"./p-fd186591.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}li{list-style:none;padding:0}:host ::part(button){color:var(--ic-color-primary-text);padding:calc(var(--ic-space-xxxs) / 2);display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:0;min-height:2.5rem;height:auto}.focus-border{display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:var(--ic-border-radius);margin:calc(var(--ic-space-xxxs) / 2);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;--icon-height:auto}:host(.disabled) ::part(button){color:var(--ic-architectural-200) !important;pointer-events:none}:host(.disabled) .menu-item-label,:host(.disabled) .shortcut,:host(.disabled) .menu-item-description{color:var(--ic-architectural-200) !important}:host([variant="destructive"]) ::part(button){color:var(--ic-action-destructive)}:host ::part(button):hover{background-color:var(--ic-action-dark-bg-hover)}:host ::part(button):focus-visible,:host ::part(button):focus{color:var(--ic-color-white-text);background-color:var(--ic-focus-blue);box-shadow:none}:host(.disabled) ::part(button):focus-visible,:host(.disabled) ::part(button):focus{color:var(--ic-theme-lighten-40) !important}:host([variant="destructive"]) ::part(button):focus-visible,:host([variant="destructive"]) ::part(button):focus{background-color:var(--ic-action-destructive)}ic-button:focus-within .menu-item-label,ic-button:focus-within .shortcut,ic-button:focus-within .menu-item-description{color:var(--ic-color-white-text)}:host(.disabled) ic-button:focus-within .focus-border{border-color:var(--ic-architectural-white)}:host(.disabled) ic-button:focus-within .menu-item-label,:host(.disabled) ic-button:focus-within .shortcut,:host(.disabled) ic-button:focus-within .menu-item-description{color:var(--ic-theme-lighten-40) !important}:host ::part(button):active{background-color:var(--ic-action-dark-bg-active);color:var(--ic-color-primary-text) !important}:host([variant="destructive"]) ::part(button):active{background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-destructive) !important}.menu-item-info{display:flex;flex-direction:column;flex:1;align-items:baseline;white-space:pre-line;text-align:left}.menu-labels{display:flex;align-items:baseline;gap:var(--ic-space-xs)}.menu-item-description{color:var(--ic-color-secondary-text)}.shortcut{color:var(--ic-color-tertiary-text);display:flex;flex:min-content}:host([variant="destructive"]) .menu-item-label{text-transform:uppercase;font-weight:600;letter-spacing:0.025em}ic-button:active .menu-item-label{color:var(--ic-color-primary-text)}ic-button:active .menu-item-description{color:var(--ic-color-secondary-text)}ic-button:active .shortcut{color:var(--ic-color-tertiary-text)}:host([variant="destructive"]) ic-button:active .menu-item-label{color:var(--ic-action-destructive) !important}.icon,.check-icon,.submenu-icon,.icon ::slotted(svg),.check-icon svg,.submenu-icon svg{width:var(--ic-space-lg);height:var(--ic-space-lg)}.check-icon.hide{visibility:hidden}@media (forced-colors: active){:host ::part(button){border:canvas}:host ::part(button):focus-visible{outline:var(--ic-space-xxxs) solid transparent}.focus-border{border-color:canvas}:host(.disabled) ic-button:focus-within .focus-border{border-color:GrayText}:host(.disabled) .menu-item-info,:host(.disabled) .menu-item-label,:host(.disabled) .shortcut,:host(.disabled) .menu-item-description,:host(.disabled) ic-button:focus-within .menu-item-info,:host(.disabled) ic-button:focus-within .menu-item-label,:host(.disabled) ic-button:focus-within .shortcut,:host(.disabled) ic-button:focus-within .menu-item-description{color:GrayText !important}:host(.disabled) ::part(button):focus-visible,:host(.disabled) ::part(button):focus{outline-color:GrayText !important}}';const h=class{constructor(i){t(this,i);this.childBlur=e(this,"childBlur",7);this.handleMenuItemClick=e(this,"handleMenuItemClick",7);this.triggerPopoverMenuInstance=e(this,"triggerPopoverMenuInstance",7);this.handleClick=t=>{if(a(this.submenuTriggerFor)){this.triggerPopoverMenuInstance.emit()}else if(this.variant==="toggle"){t.preventDefault();this.toggleChecked=!this.toggleChecked}this.handleMenuItemClick.emit({label:this.label,hasSubMenu:!!this.el.submenuTriggerFor})};this.getMenuItemAriaLabel=()=>{let t=this.label;if(a(this.description)){t=`${t}, ${this.description}`}if(a(this.keyboardShortcut)){t=`${t}, ${this.keyboardShortcut}`}if(this.variant==="destructive"){t=`${t}, destructive`}if(a(this.submenuTriggerFor)){t=`${t}, triggers submenu`}if(this.el.classList.contains("ic-popover-submenu-back-button")){t="Go back to parent menu"}const e=this.el.parentElement;if(e.tagName==="IC-MENU-GROUP"&&e.label){return`${t}, ${e.label} menu group`}else{return t}};this.toggleChecked=false;this.description=undefined;this.disabled=false;this.href=undefined;this.hreflang=undefined;this.keyboardShortcut=undefined;this.label=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.submenuTriggerFor=undefined;this.target=undefined;this.variant="default"}componentWillLoad(){if(a(this.submenuTriggerFor)&&this.variant!=="default"){this.variant="default"}n(this.disabled,this.el)}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Menu Item")}handleHostClick(t){if(this.disabled){t.stopImmediatePropagation()}}render(){const t=()=>i("div",{class:"menu-item-info"},i("div",{class:"menu-labels"},i("ic-typography",{class:"menu-item-label"},this.label),this.keyboardShortcut&&i("ic-typography",{variant:"caption",class:"shortcut"},this.keyboardShortcut)),this.description&&i("ic-typography",{class:"menu-item-description",variant:"caption"},this.description));return i(o,{class:{["disabled"]:this.disabled}},i("li",{role:this.variant==="toggle"?"menuitemcheckbox":"menuitem","aria-disabled":`${this.disabled}`,"aria-checked":this.variant==="toggle"?this.toggleChecked:undefined},i("ic-button",{fullWidth:true,variant:"tertiary",onClick:this.handleClick,href:a(this.href),hreflang:a(this.hreflang),target:a(this.target),rel:a(this.rel),referrerpolicy:this.referrerpolicy!==undefined?this.referrerpolicy:null,"aria-disabled":`${this.disabled}`,"aria-label":this.getMenuItemAriaLabel(),ariaControlsId:a(this.submenuTriggerFor)?`ic-popover-submenu-${this.submenuTriggerFor}`:false,"aria-haspopup":a(this.submenuTriggerFor)||this.el.classList.contains("ic-popover-submenu-back-button")?"menu":false,ariaOwnsId:a(this.submenuTriggerFor)?`ic-popover-submenu-${this.submenuTriggerFor}`:false},i("div",{class:"focus-border"},c(this.el,"icon")&&i("span",{class:"icon"},i("slot",{name:"icon"})),i(t,null),this.variant==="toggle"&&i("span",{class:{["check-icon"]:true,["hide"]:!this.toggleChecked},"aria-hidden":"true",innerHTML:l}),a(this.submenuTriggerFor)&&i("span",{class:{["submenu-icon"]:true},"aria-hidden":"true",innerHTML:u})))))}static get delegatesFocus(){return true}get el(){return s(this)}};h.style=d;export{h as ic_menu_item};
2
- //# sourceMappingURL=p-24f9f6d4.entry.js.map
1
+ import{r as t,c as e,h as i,H as o,g as s}from"./p-8455d1bb.js";import{d as a,k as n,a as r,i as c}from"./p-8128572e.js";import{C as l}from"./p-0aa9ce8b.js";import{C as u}from"./p-170ddfc2.js";import"./p-fd186591.js";const d='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}li{list-style:none;padding:0}:host ::part(button){color:var(--ic-color-primary-text);padding:calc(var(--ic-space-xxxs) / 2);display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:0;min-height:2.5rem;height:auto}.focus-border{display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:var(--ic-border-radius);margin:calc(var(--ic-space-xxxs) / 2);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;--icon-height:auto}:host(.disabled) ::part(button){color:var(--ic-architectural-200) !important;pointer-events:none}:host(.disabled) .menu-item-label,:host(.disabled) .shortcut,:host(.disabled) .menu-item-description{color:var(--ic-architectural-200) !important}:host([variant="destructive"]) ::part(button){color:var(--ic-action-destructive)}:host ::part(button):hover{background-color:var(--ic-action-dark-bg-hover)}:host ::part(button):focus-visible,:host ::part(button):focus{color:var(--ic-color-white-text);background-color:var(--ic-focus-blue);box-shadow:none}:host(.disabled) ::part(button):focus-visible,:host(.disabled) ::part(button):focus{color:var(--ic-theme-lighten-40) !important}:host([variant="destructive"]) ::part(button):focus-visible,:host([variant="destructive"]) ::part(button):focus{background-color:var(--ic-action-destructive)}ic-button:focus-within .menu-item-label,ic-button:focus-within .shortcut,ic-button:focus-within .menu-item-description{color:var(--ic-color-white-text)}:host(.disabled) ic-button:focus-within .focus-border{border-color:var(--ic-architectural-white)}:host(.disabled) ic-button:focus-within .menu-item-label,:host(.disabled) ic-button:focus-within .shortcut,:host(.disabled) ic-button:focus-within .menu-item-description{color:var(--ic-theme-lighten-40) !important}:host ::part(button):active{background-color:var(--ic-action-dark-bg-active);color:var(--ic-color-primary-text) !important}:host([variant="destructive"]) ::part(button):active{background-color:var(--ic-action-dark-bg-active);color:var(--ic-action-destructive) !important}.menu-item-info{display:flex;flex-direction:column;flex:1;align-items:baseline;white-space:pre-line;text-align:left}.menu-labels{display:flex;align-items:baseline;gap:var(--ic-space-xs)}.menu-item-description{color:var(--ic-color-secondary-text)}.shortcut{color:var(--ic-color-tertiary-text);display:flex;flex:min-content}:host([variant="destructive"]) .menu-item-label{text-transform:uppercase;font-weight:600;letter-spacing:0.025em}ic-button:active .menu-item-label{color:var(--ic-color-primary-text)}ic-button:active .menu-item-description{color:var(--ic-color-secondary-text)}ic-button:active .shortcut{color:var(--ic-color-tertiary-text)}:host([variant="destructive"]) ic-button:active .menu-item-label{color:var(--ic-action-destructive) !important}.icon,.check-icon,.submenu-icon,.icon ::slotted(svg),.check-icon svg,.submenu-icon svg{width:var(--ic-space-lg);height:var(--ic-space-lg)}.check-icon.hide{visibility:hidden}@media (forced-colors: active){:host ::part(button){border:canvas}:host ::part(button):focus-visible{outline:var(--ic-space-xxxs) solid transparent}.focus-border{border-color:canvas}:host(.disabled) ic-button:focus-within .focus-border{border-color:GrayText}:host(.disabled) .menu-item-info,:host(.disabled) .menu-item-label,:host(.disabled) .shortcut,:host(.disabled) .menu-item-description,:host(.disabled) ic-button:focus-within .menu-item-info,:host(.disabled) ic-button:focus-within .menu-item-label,:host(.disabled) ic-button:focus-within .shortcut,:host(.disabled) ic-button:focus-within .menu-item-description{color:GrayText !important}:host(.disabled) ::part(button):focus-visible,:host(.disabled) ::part(button):focus{outline-color:GrayText !important}}';const h=class{constructor(i){t(this,i);this.childBlur=e(this,"childBlur",7);this.handleMenuItemClick=e(this,"handleMenuItemClick",7);this.triggerPopoverMenuInstance=e(this,"triggerPopoverMenuInstance",7);this.handleClick=t=>{if(a(this.submenuTriggerFor)){this.triggerPopoverMenuInstance.emit()}else if(this.variant==="toggle"){t.preventDefault();this.toggleChecked=!this.toggleChecked}this.handleMenuItemClick.emit({label:this.label,hasSubMenu:!!this.el.submenuTriggerFor})};this.getMenuItemAriaLabel=()=>{let t=this.label;if(a(this.description)){t=`${t}, ${this.description}`}if(a(this.keyboardShortcut)){t=`${t}, ${this.keyboardShortcut}`}if(this.variant==="destructive"){t=`${t}, destructive`}if(a(this.submenuTriggerFor)){t=`${t}, triggers submenu`}if(this.el.classList.contains("ic-popover-submenu-back-button")){t="Go back to parent menu"}const e=this.el.parentElement;if(e.tagName==="IC-MENU-GROUP"&&e.label){return`${t}, ${e.label} menu group`}else{return t}};this.toggleChecked=false;this.description=undefined;this.disabled=false;this.href=undefined;this.hreflang=undefined;this.keyboardShortcut=undefined;this.label=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.submenuTriggerFor=undefined;this.target=undefined;this.variant="default"}componentWillLoad(){if(a(this.submenuTriggerFor)&&this.variant!=="default"){this.variant="default"}n(this.disabled,this.el)}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Menu Item")}handleHostClick(t){if(this.disabled){t.stopImmediatePropagation()}}render(){const t=()=>i("div",{class:"menu-item-info"},i("div",{class:"menu-labels"},i("ic-typography",{class:"menu-item-label"},this.label),this.keyboardShortcut&&i("ic-typography",{variant:"caption",class:"shortcut"},this.keyboardShortcut)),this.description&&i("ic-typography",{class:"menu-item-description",variant:"caption"},this.description));return i(o,{class:{["disabled"]:this.disabled}},i("li",{role:this.variant==="toggle"?"menuitemcheckbox":"menuitem","aria-disabled":`${this.disabled}`,"aria-checked":this.variant==="toggle"?this.toggleChecked:undefined},i("ic-button",{fullWidth:true,variant:"tertiary",onClick:this.handleClick,href:a(this.href),hreflang:a(this.hreflang),target:a(this.target),rel:a(this.rel),referrerpolicy:this.referrerpolicy!==undefined?this.referrerpolicy:null,"aria-disabled":`${this.disabled}`,"aria-label":this.getMenuItemAriaLabel(),ariaControlsId:a(this.submenuTriggerFor)?`ic-popover-submenu-${this.submenuTriggerFor}`:false,"aria-haspopup":a(this.submenuTriggerFor)||this.el.classList.contains("ic-popover-submenu-back-button")?"menu":false,ariaOwnsId:a(this.submenuTriggerFor)?`ic-popover-submenu-${this.submenuTriggerFor}`:false},i("div",{class:"focus-border"},c(this.el,"icon")&&i("span",{class:"icon"},i("slot",{name:"icon"})),i(t,null),this.variant==="toggle"&&i("span",{class:{["check-icon"]:true,["hide"]:!this.toggleChecked},"aria-hidden":"true",innerHTML:l}),a(this.submenuTriggerFor)&&i("span",{class:{["submenu-icon"]:true},"aria-hidden":"true",innerHTML:u})))))}static get delegatesFocus(){return true}get el(){return s(this)}};h.style=d;export{h as ic_menu_item};
2
+ //# sourceMappingURL=p-89c7ea3e.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as i,H as s,g as h}from"./p-8455d1bb.js";import{E as e,f as l}from"./p-1440cdd1.js";import"./p-fd186591.js";const p=":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.default:not(.aligned-left)) .step-item-list{flex:auto}:host(.compact) ul ::slotted(ic-step){display:none}:host(.compact) ul ::slotted(ic-step.show){display:flex}:host(.compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";const a=class{constructor(i){t(this,i);this.resizeObserver=null;this.visuallyHidden="visually-hidden";this.getChildren=()=>{this.steps=Array.from(this.el.querySelectorAll("ic-step"));this.stepsWithStepTitles=Array.from(this.el.querySelectorAll("ic-step[step-title]"))};this.checkStepTitles=()=>{if(this.stepsWithStepTitles.length<this.steps.length&&this.variantOverride&&this.variant==="compact"){this.noOfResizes=this.noOfResizes+1;if(this.noOfResizes===1){console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`)}}};this.setStepTypes=()=>{this.getChildren();this.stepTypes=[];for(let t=0;t<this.steps.length;t++){this.stepTypes.push("active")}};this.setStepperWidth=()=>{this.alignedFullWidth=this.variant==="default"&&this.aligned==="full-width";const t=this.steps[this.steps.length-1];t.style.maxWidth="none";if(this.alignedFullWidth){this.stepperWidth=this.el.offsetWidth;t.style.maxWidth=e(`${this.stepperWidth/this.steps.length}px`);this.lastStepWidth=t.offsetWidth}};this.initialiseStepStates=()=>{this.steps.forEach(((t,i)=>{t.variant=this.variant;t.stepNum=i+1;t.lastStep=i===this.steps.length-1;t.lastStepNum=this.steps.length;if(t.stepType!=="current"){t.current=false;this.stepTypes[i]=t.stepType}else{t.current=true}const s=t.shadowRoot&&t.shadowRoot.querySelector(".step > .step-title-area");if(this.stepsWithStepTitles.length==0&&this.variantOverride){if(this.variant==="compact"){this.autoSetStepTitles=true;if(this.autoSetStepTitles){t.stepTitle="Step "+t.stepNum;s&&s.querySelector(".step-title").setAttribute("aria-hidden","true")}}if(this.variant==="default"){this.autoSetStepTitles=false;if(!this.autoSetStepTitles){t.stepTitle=undefined;s&&s.querySelector(".step-title").removeAttribute("aria-hidden")}}}if(this.variant==="compact"){if(t.current===true||t.stepType==="current"){t.classList.remove("hide");t.classList.add("show")}else if(t.classList.contains("show")){t.classList.remove("show");t.classList.add("hide")}if(!t.lastStep){t.nextStepTitle=this.steps[i+1].stepTitle;t.progress=t.stepNum/this.steps.length*100}else if(t.lastStep&&this.stepTypes[i]!=="completed"){t.progress=95}else{t.progress=100}if(this.hideStepInfo&&s!==null){s.classList.remove(this.visuallyHidden)}t.compactStepStyling=this.stepTypes[i]}if(this.variant==="default"){if(!t.lastStep){if(this.alignedFullWidth){t.style.width=e(`${(this.stepperWidth-this.lastStepWidth)/(this.steps.length-1)}px`);t.style.minWidth=e("148px")}}else if(t.lastStep){t.classList.add("last-step");if(this.alignedFullWidth){t.style.maxWidth=`${this.lastStepWidth}px`}else{t.style.maxWidth=this.connectorWidth>100?e(`${this.connectorWidth+48}px`):e("148px")}}if(this.aligned==="left"){t.style.width=this.connectorWidth>100?e(`${this.connectorWidth+48}px`):e("148px");const i=t.shadowRoot.querySelector(".step > .step-top > .step-connect");if(i){i.style.width=this.connectorWidth>100?e(`${this.connectorWidth}px`):e("100px")}}if(this.hideStepInfo&&s!==null){s.classList.add(this.visuallyHidden)}}}))};this.setHideStepInfo=()=>{this.steps.forEach((t=>{var i,s;const h=t.shadowRoot.querySelector(".step > .step-title-area");if(h!==null){if(this.hideStepInfo){(i=h.classList)===null||i===void 0?void 0:i.add(this.visuallyHidden)}else{(s=h.classList)===null||s===void 0?void 0:s.remove(this.visuallyHidden)}}}))};this.overrideVariant=()=>{if(this.variantOverride){let t=148*this.steps.length;if(this.aligned==="left"&&this.connectorWidth>100){t=(this.connectorWidth+48)*this.steps.length}if(this.el.clientWidth<t){this.variant="compact"}else{this.variant="default"}}};this.resizeObserverCallback=()=>{this.getChildren();this.checkStepTitles();this.overrideVariant();this.setStepperWidth();this.initialiseStepStates()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.alignedFullWidth=true;this.autoSetStepTitles=true;this.lastStepWidth=0;this.noOfResizes=0;this.stepperWidth=document.querySelector("ic-stepper").getBoundingClientRect().width;this.stepTypes=[];this.variantOverride=this.variant!=="compact";this.aligned="full-width";this.appearance="default";this.connectorWidth=100;this.hideStepInfo=false;this.variant="default"}handlePropChange(){this.setHideStepInfo();this.getChildren()}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.setStepTypes();if(this.variant==="compact"){this.variantOverride=false}}componentWillRender(){this.initialiseStepStates()}componentDidLoad(){l(this.runResizeObserver)}render(){return i(s,{class:{[`${this.variant}`]:true,["aligned-left"]:this.variant==="default"&&this.aligned==="left"}},i("ul",{class:"step-item-list"},i("slot",null)))}get el(){return h(this)}static get watchers(){return{hideStepInfo:["handlePropChange"],variant:["handlePropChange"]}}};a.style=p;export{a as ic_stepper};
2
- //# sourceMappingURL=p-992b6161.entry.js.map
1
+ import{r as t,h as i,H as s,g as e}from"./p-8455d1bb.js";import{G as h,f as l}from"./p-8128572e.js";import"./p-fd186591.js";const p=":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.default:not(.aligned-left)) .step-item-list{flex:auto}:host(.compact) ul ::slotted(ic-step){display:none}:host(.compact) ul ::slotted(ic-step.show){display:flex}:host(.compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";const a=class{constructor(i){t(this,i);this.resizeObserver=null;this.visuallyHidden="visually-hidden";this.getChildren=()=>{this.steps=Array.from(this.el.querySelectorAll("ic-step"));this.stepsWithStepTitles=Array.from(this.el.querySelectorAll("ic-step[step-title]"))};this.checkStepTitles=()=>{if(this.stepsWithStepTitles.length<this.steps.length&&this.variantOverride&&this.variant==="compact"){this.noOfResizes=this.noOfResizes+1;if(this.noOfResizes===1){console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`)}}};this.setStepTypes=()=>{this.getChildren();this.stepTypes=[];for(let t=0;t<this.steps.length;t++){this.stepTypes.push("active")}};this.setStepperWidth=()=>{this.alignedFullWidth=this.variant==="default"&&this.aligned==="full-width";const t=this.steps[this.steps.length-1];t.style.maxWidth="none";if(this.alignedFullWidth){this.stepperWidth=this.el.offsetWidth;t.style.maxWidth=h(`${this.stepperWidth/this.steps.length}px`);this.lastStepWidth=t.offsetWidth}};this.initialiseStepStates=()=>{this.steps.forEach(((t,i)=>{t.variant=this.variant;t.stepNum=i+1;t.lastStep=i===this.steps.length-1;t.lastStepNum=this.steps.length;if(t.stepType!=="current"){t.current=false;this.stepTypes[i]=t.stepType}else{t.current=true}const s=t.shadowRoot&&t.shadowRoot.querySelector(".step > .step-title-area");if(this.stepsWithStepTitles.length==0&&this.variantOverride){if(this.variant==="compact"){this.autoSetStepTitles=true;if(this.autoSetStepTitles){t.stepTitle="Step "+t.stepNum;s&&s.querySelector(".step-title").setAttribute("aria-hidden","true")}}if(this.variant==="default"){this.autoSetStepTitles=false;if(!this.autoSetStepTitles){t.stepTitle=undefined;s&&s.querySelector(".step-title").removeAttribute("aria-hidden")}}}if(this.variant==="compact"){if(t.current===true||t.stepType==="current"){t.classList.remove("hide");t.classList.add("show")}else if(t.classList.contains("show")){t.classList.remove("show");t.classList.add("hide")}if(!t.lastStep){t.nextStepTitle=this.steps[i+1].stepTitle;t.progress=t.stepNum/this.steps.length*100}else if(t.lastStep&&this.stepTypes[i]!=="completed"){t.progress=95}else{t.progress=100}if(this.hideStepInfo&&s!==null){s.classList.remove(this.visuallyHidden)}t.compactStepStyling=this.stepTypes[i]}if(this.variant==="default"){if(!t.lastStep){if(this.alignedFullWidth){t.style.width=h(`${(this.stepperWidth-this.lastStepWidth)/(this.steps.length-1)}px`);t.style.minWidth=h("148px")}}else if(t.lastStep){t.classList.add("last-step");if(this.alignedFullWidth){t.style.maxWidth=`${this.lastStepWidth}px`}else{t.style.maxWidth=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px")}}if(this.aligned==="left"){t.style.width=this.connectorWidth>100?h(`${this.connectorWidth+48}px`):h("148px");const i=t.shadowRoot.querySelector(".step > .step-top > .step-connect");if(i){i.style.width=this.connectorWidth>100?h(`${this.connectorWidth}px`):h("100px")}}if(this.hideStepInfo&&s!==null){s.classList.add(this.visuallyHidden)}}}))};this.setHideStepInfo=()=>{this.steps.forEach((t=>{var i,s;const e=t.shadowRoot.querySelector(".step > .step-title-area");if(e!==null){if(this.hideStepInfo){(i=e.classList)===null||i===void 0?void 0:i.add(this.visuallyHidden)}else{(s=e.classList)===null||s===void 0?void 0:s.remove(this.visuallyHidden)}}}))};this.overrideVariant=()=>{if(this.variantOverride){let t=148*this.steps.length;if(this.aligned==="left"&&this.connectorWidth>100){t=(this.connectorWidth+48)*this.steps.length}if(this.el.clientWidth<t){this.variant="compact"}else{this.variant="default"}}};this.resizeObserverCallback=()=>{this.getChildren();this.checkStepTitles();this.overrideVariant();this.setStepperWidth();this.initialiseStepStates()};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback()}));this.resizeObserver.observe(this.el)};this.alignedFullWidth=true;this.autoSetStepTitles=true;this.lastStepWidth=0;this.noOfResizes=0;this.stepperWidth=document.querySelector("ic-stepper").getBoundingClientRect().width;this.stepTypes=[];this.variantOverride=this.variant!=="compact";this.aligned="full-width";this.appearance="default";this.connectorWidth=100;this.hideStepInfo=false;this.variant="default"}handlePropChange(){this.setHideStepInfo();this.getChildren()}disconnectedCallback(){if(this.resizeObserver!==null){this.resizeObserver.disconnect()}}componentWillLoad(){this.setStepTypes();if(this.variant==="compact"){this.variantOverride=false}}componentWillRender(){this.initialiseStepStates()}componentDidLoad(){l(this.runResizeObserver)}render(){return i(s,{class:{[`${this.variant}`]:true,["aligned-left"]:this.variant==="default"&&this.aligned==="left"}},i("ul",{class:"step-item-list"},i("slot",null)))}get el(){return e(this)}static get watchers(){return{hideStepInfo:["handlePropChange"],variant:["handlePropChange"]}}};a.style=p;export{a as ic_stepper};
2
+ //# sourceMappingURL=p-8d276e8f.entry.js.map