@ukic/canary-web-components 3.0.0-canary.21 → 3.0.0-canary.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  4. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ic-data-table.cjs.entry.js +29 -21
  6. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-date-picker.cjs.entry.js +17 -10
  8. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +39 -47
  10. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -10
  12. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-pagination_4.cjs.entry.js +2 -2
  14. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
  16. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
  18. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +15 -4
  20. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-toggle-button.cjs.entry.js +13 -4
  22. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-tree-item.cjs.entry.js +14 -8
  24. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-tree-view.cjs.entry.js +23 -15
  26. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  27. package/dist/cjs/loader.cjs.js +1 -1
  28. package/dist/collection/components/ic-data-table/ic-data-table.css +3 -2
  29. package/dist/collection/components/ic-data-table/ic-data-table.js +28 -20
  30. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  31. package/dist/collection/components/ic-data-table/ic-data-table.stories.js +2 -2
  32. package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -1
  33. package/dist/collection/components/ic-data-table/story-data.js +32 -73
  34. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  35. package/dist/collection/components/ic-date-picker/ic-date-picker.js +37 -10
  36. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  37. package/dist/collection/components/ic-tree-item/ic-tree-item.js +14 -8
  38. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  39. package/dist/collection/components/ic-tree-view/ic-tree-view.js +23 -15
  40. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  41. package/dist/components/ic-data-table.js +29 -21
  42. package/dist/components/ic-data-table.js.map +1 -1
  43. package/dist/components/ic-date-picker.js +18 -10
  44. package/dist/components/ic-date-picker.js.map +1 -1
  45. package/dist/components/ic-loading-indicator2.js +1 -1
  46. package/dist/components/ic-loading-indicator2.js.map +1 -1
  47. package/dist/components/ic-menu2.js +42 -47
  48. package/dist/components/ic-menu2.js.map +1 -1
  49. package/dist/components/ic-navigation-item.js +3 -10
  50. package/dist/components/ic-navigation-item.js.map +1 -1
  51. package/dist/components/ic-search-bar.js +2 -2
  52. package/dist/components/ic-search-bar.js.map +1 -1
  53. package/dist/components/ic-select2.js +2 -2
  54. package/dist/components/ic-select2.js.map +1 -1
  55. package/dist/components/ic-side-navigation.js +2 -2
  56. package/dist/components/ic-side-navigation.js.map +1 -1
  57. package/dist/components/ic-toggle-button-group.js +17 -4
  58. package/dist/components/ic-toggle-button-group.js.map +1 -1
  59. package/dist/components/ic-toggle-button.js +14 -4
  60. package/dist/components/ic-toggle-button.js.map +1 -1
  61. package/dist/components/ic-tree-item.js +15 -9
  62. package/dist/components/ic-tree-item.js.map +1 -1
  63. package/dist/components/ic-tree-view.js +24 -16
  64. package/dist/components/ic-tree-view.js.map +1 -1
  65. package/dist/core/core.esm.js +1 -1
  66. package/dist/core/core.esm.js.map +1 -1
  67. package/dist/core/p-156fc5f1.entry.js +2 -0
  68. package/dist/core/p-156fc5f1.entry.js.map +1 -0
  69. package/dist/core/{p-b6c3cc1c.entry.js → p-15ec796a.entry.js} +2 -2
  70. package/dist/core/p-15ec796a.entry.js.map +1 -0
  71. package/dist/core/{p-145238fe.entry.js → p-1ffac8ae.entry.js} +2 -2
  72. package/dist/core/{p-145238fe.entry.js.map → p-1ffac8ae.entry.js.map} +1 -1
  73. package/dist/core/{p-b6d1988d.entry.js → p-6e7aaca5.entry.js} +2 -2
  74. package/dist/core/{p-b6d1988d.entry.js.map → p-6e7aaca5.entry.js.map} +1 -1
  75. package/dist/core/p-755bdc43.entry.js +2 -0
  76. package/dist/core/p-755bdc43.entry.js.map +1 -0
  77. package/dist/core/p-78635447.entry.js +2 -0
  78. package/dist/core/p-78635447.entry.js.map +1 -0
  79. package/dist/core/{p-1bcf49fa.entry.js → p-a220535c.entry.js} +2 -2
  80. package/dist/core/p-a220535c.entry.js.map +1 -0
  81. package/dist/core/{p-9fafa5fa.entry.js → p-b88585bf.entry.js} +2 -2
  82. package/dist/core/p-b88585bf.entry.js.map +1 -0
  83. package/dist/core/{p-b6b7c15c.entry.js → p-bc974a3e.entry.js} +2 -2
  84. package/dist/core/p-bc974a3e.entry.js.map +1 -0
  85. package/dist/core/p-c67381b1.entry.js +2 -0
  86. package/dist/core/p-c67381b1.entry.js.map +1 -0
  87. package/dist/core/p-d04b75cb.entry.js +2 -0
  88. package/dist/core/p-d04b75cb.entry.js.map +1 -0
  89. package/dist/core/p-e2103bcc.entry.js +2 -0
  90. package/dist/core/p-e2103bcc.entry.js.map +1 -0
  91. package/dist/esm/core.js +1 -1
  92. package/dist/esm/ic-button_3.entry.js +1 -1
  93. package/dist/esm/ic-button_3.entry.js.map +1 -1
  94. package/dist/esm/ic-data-table.entry.js +29 -21
  95. package/dist/esm/ic-data-table.entry.js.map +1 -1
  96. package/dist/esm/ic-date-picker.entry.js +17 -10
  97. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  98. package/dist/esm/ic-input-component-container_3.entry.js +39 -47
  99. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  100. package/dist/esm/ic-navigation-item.entry.js +3 -10
  101. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  102. package/dist/esm/ic-pagination_4.entry.js +2 -2
  103. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  104. package/dist/esm/ic-search-bar.entry.js +2 -2
  105. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  106. package/dist/esm/ic-side-navigation.entry.js +2 -2
  107. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  108. package/dist/esm/ic-toggle-button-group.entry.js +15 -4
  109. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  110. package/dist/esm/ic-toggle-button.entry.js +13 -4
  111. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  112. package/dist/esm/ic-tree-item.entry.js +15 -9
  113. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  114. package/dist/esm/ic-tree-view.entry.js +24 -16
  115. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  116. package/dist/esm/loader.js +1 -1
  117. package/dist/types/components/ic-data-table/ic-data-table.d.ts +1 -1
  118. package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +1 -1
  119. package/dist/types/components/ic-data-table/story-data.d.ts +0 -64
  120. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  121. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -0
  122. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +2 -1
  123. package/dist/types/components.d.ts +8 -0
  124. package/hydrate/index.js +166 -126
  125. package/hydrate/index.mjs +166 -126
  126. package/package.json +3 -3
  127. package/dist/core/p-1b20ab19.entry.js +0 -2
  128. package/dist/core/p-1b20ab19.entry.js.map +0 -1
  129. package/dist/core/p-1bcf49fa.entry.js.map +0 -1
  130. package/dist/core/p-5f8b09e4.entry.js +0 -2
  131. package/dist/core/p-5f8b09e4.entry.js.map +0 -1
  132. package/dist/core/p-7001f1c1.entry.js +0 -2
  133. package/dist/core/p-7001f1c1.entry.js.map +0 -1
  134. package/dist/core/p-9fafa5fa.entry.js.map +0 -1
  135. package/dist/core/p-b6b7c15c.entry.js.map +0 -1
  136. package/dist/core/p-b6c3cc1c.entry.js.map +0 -1
  137. package/dist/core/p-b9369ce5.entry.js +0 -2
  138. package/dist/core/p-b9369ce5.entry.js.map +0 -1
  139. package/dist/core/p-cbbba154.entry.js +0 -2
  140. package/dist/core/p-cbbba154.entry.js.map +0 -1
  141. package/dist/core/p-dc3aba7c.entry.js +0 -2
  142. package/dist/core/p-dc3aba7c.entry.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,F as s,H as a,g as l}from"./p-8e4e97b4.js";import{b as o,p as n,i as h,c as r,d,e as c,f as u,h as v,j as p}from"./p-e253a857.js";const g=`<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 b=`<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 f=`<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 m=':host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height);--ic-typography-color:var(--ic-data-table-text-default-emphasis)}.truncation-show-hide{display:block}.cell-icon.truncation-show-hide{display:flex}.cell-container:not(.data-type-element,.truncation-show-hide){overflow-x:hidden}ic-loading-indicator{position:sticky;top:20px}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination="true"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:var(--table-layout, "fixed");border-spacing:0;width:100%;height:var(--table-height, auto)}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded="true"]) .table-row-container{border:var(--ic-space-1px) solid var(--ic-data-table-border)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.column-header-inner-container ic-tooltip{pointer-events:none}.column-header-inner-container ic-tooltip.show-trunc-tooltip{pointer-events:auto}.column-header-inner-container ic-tooltip .column-header-text{--ic-line-clamp:1}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-image:linear-gradient(\n var(--ic-data-table-cell-background-selected) 0 0\n );background-color:var(--ic-data-table-cell-background) !important}.table-row:hover{background-image:linear-gradient(\n var(--ic-data-table-cell-background-hover) 0 0\n );background-color:var(--ic-data-table-cell-background) !important}.table-row-selected:hover{background-image:linear-gradient(\n var(--ic-data-table-cell-background-selected-hover) 0 0\n )}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-data-table-icon-button-background-hover)}.sort-button:active{background-color:var(--ic-data-table-icon-button-background-pressed)}.sort-button svg{color:var(--ic-data-table-sort-toggle-icon)}.sort-button-unsorted svg{color:var(--ic-data-table-sort-toggle-icon-default)}.table-density-dense .column-header-inner-container,td.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious .column-header-inner-container,td.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.dummy-column-header-text{white-space:nowrap;overflow:hidden;height:0;width:-moz-fit-content;width:fit-content}.row-header,.column-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-data-table-header-background);border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline);color:var(--ic-data-table-header-text)}.column-header{padding:0;width:var(--column-width);min-width:var(--column-min-width, 4rem);max-width:var(--column-max-width)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-space-1px) solid var(--ic-data-table-header-keyline) !important}:host([embedded="true"]) tr:last-child .table-cell,:host([embedded="true"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.cell-alignment-right.truncation-show-hide ic-typography{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content:center !important}.table-row{background-color:var(--ic-data-table-cell-background)}.table-row:nth-child(even){background-color:var(--ic-data-table-cell-background-stripe)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-data-table-cell-keyline) var(--ic-space-1px);overflow:hidden;box-sizing:border-box;max-width:var(--column-max-width);min-width:var(--column-min-width)}.table-cell.with-overflow{overflow:visible}.data-type-string,.data-type-address{text-align:left}.data-type-number,.data-type-date{text-align:right;justify-content:end}.cell-vertical-align-top{vertical-align:top;align-items:flex-start}.cell-vertical-align-middle{vertical-align:middle;align-items:center}.cell-vertical-align-bottom{vertical-align:bottom;align-items:flex-end}.cell-emphasis-low ic-typography{--ic-typography-color:var(--ic-data-table-text-low-emphasis)}.cell-emphasis-high ic-typography{--ic-typography-color:var(--ic-data-table-text-high-emphasis);font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-data-table-pagination-bar-background-color);border-top:var(--ic-space-1px) solid\n var(--ic-data-table-pagination-bar-keyline)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-space-1px) solid var(--ic-data-table-header-keyline)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow);z-index:calc(var(--ic-z-index-popover) - 1);background-color:var(--ic-data-table-overlay-background);border:var(--ic-space-1px) solid var(--ic-data-table-overlay-border)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header .icon>svg,.column-header ::slotted(svg){fill:var(--ic-data-table-icon)}.table-cell .icon>svg,.table-cell ::slotted(svg),.cell-description-icon>svg{fill:var(--ic-data-table-icon-default-emphasis)}.cell-emphasis-high .icon>svg,.cell-emphasis-high ::slotted(svg){fill:var(--ic-data-table-icon-high-emphasis)}.cell-emphasis-low .icon>svg,.cell-emphasis-low ::slotted(svg){fill:var(--ic-data-table-icon-low-emphasis)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.column-header-alignment-center>.cell-text-wrapper,.row-header-alignment-right>ic-typography,.row-header-alignment-right>.cell-text-wrapper,.cell-alignment-center>ic-typography,.cell-alignment-center>.cell-text-wrapper{flex:1}.checkbox-cell{--column-width:var(--ic-space-xxl);align-content:center;border-right:none}.table-density-dense.checkbox-cell{--column-width:2.5rem}.checkbox-wrapper{display:flex;justify-content:center}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.truncation-tooltip ic-typography{display:-webkit-box;line-clamp:var(--ic-line-clamp, 0);-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}.truncation-tooltip ic-typography,.truncation-show-hide ic-typography{white-space:normal}.ic-tooltip-overflow{overflow:hidden;width:100%}.action-element{display:flex;justify-content:right}.cell-grid-wrapper{display:grid;grid-template-columns:auto auto}.loading-overlay{visibility:hidden;position:absolute;top:0;left:0;width:100%;height:100%;background:var(--ic-data-table-loading-indicator-overlay-background);z-index:calc(var(--ic-z-index-popover) - 2);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading-overlay.show{visibility:visible;opacity:0.6}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){.loading-overlay{transition:none}}.cell-text-wrapper{overflow:hidden}.cell-text-wrapper>ic-typography{margin-left:2px}.cell-text-no-wrap{word-wrap:initial}.cell-container-with-description{display:flex;flex-direction:row}.cell-description{display:flex;flex-direction:row;margin-top:var(--ic-space-xxs);word-break:break-all}.cell-description-text{color:var(--ic-data-table-cell-data-description)}.cell-description-icon{padding-right:var(--ic-space-xs)}.cell-description-icon>svg{height:calc(var(--ic-space-lg) - var(--ic-space-xxs));width:calc(var(--ic-space-lg) - var(--ic-space-xxs));display:flex}@media (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}@media (max-width: 577px){.cell-icon{flex-wrap:wrap}.cell-description-icon{padding-right:0}}@media (forced-colors: active){.icon,::slotted(svg),.cell-description-icon>svg{fill:currentcolor}.sort-button svg{color:currentcolor}.table-row-selected{background-color:Highlight !important}}';const y=m;const w=class{constructor(a){t(this,a);this.icRowHeightChange=i(this,"icRowHeightChange",7);this.icSelectAllRows=i(this,"icSelectAllRows",7);this.icSelectedRowChange=i(this,"icSelectedRowChange",7);this.icColumnsLoaded=i(this,"icColumnsLoaded",7);this.icDataLoaded=i(this,"icDataLoaded",7);this.icSortChange=i(this,"icSortChange",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:g,ascending:b,descending:f};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.columnsUpdated=false;this.rowHeightSet=false;this.initialLoad=false;this.icPageChangeEvent=false;this.itemsPerPageChange=false;this.DATA_ROW_HEIGHT_STRING="data-row-height";this.ROW_HEIGHT_CSS_VARIABLE="--row-height";this.LINE_CLAMP_CSS_VARIABLE="--ic-line-clamp";this.DEFAULT_LINE_HEIGHT=24;this.densityUpdate=false;this.truncationPatternUpdated=false;this.isNewDebounceDelaySet=false;this.headerResizeObserver=null;this.IC_TOOLTIP_STRING="ic-tooltip";this.SHOW_TRUNC_TOOLTIP_STRING="show-trunc-tooltip";this.CELL_DESCRIPTION_STRING=".cell-description";this.CELL_CONTAINER_WITH_DESCRIPTION_STRING="cell-container-with-description";this.CELL_TEXT_WRAPPER_STRING=".cell-text-wrapper";this.IC_TYPOGRAPHY_STRING="ic-typography";this.fromRow=0;this.scrollable=false;this.scrollOffset=0;this.selectedRows=[];this.debounceDelay=0;this.columnHeaderTruncation=false;this.disableAutoSort=false;this.density="default";this.embedded=false;this.globalRowHeight="auto";this.hideColumnHeaders=false;this.loading=false;this.minimumLoadingDisplayDuration=1e3;this.paginationBarOptions={alignment:"right",hideAllFromItemsPerPage:false,hideRangeLabel:false,itemLabel:"Item",itemsPerPageOptions:[{label:"10",value:"10"},{label:"25",value:"25"},{label:"50",value:"50"}],monochrome:false,pageLabel:"Page",rangeLabelType:"page",selectedItemsPerPage:10,selectItemsPerPageOnEnter:true,setToFirstPageOnPaginationChange:false,showGoToPageControl:true,showItemsPerPageControl:true,type:"simple"};this.rowSelection=false;this.showPagination=false;this.sortable=false;this.sortOptions={sortOrders:["unsorted","ascending","descending"],defaultColumn:""};this.stickyColumnHeaders=false;this.stickyRowHeaders=false;this.tableLayout="fixed";this.theme="inherit";this.updating=false;this.runHeaderResizeObserver=()=>{this.headerResizeObserver=new ResizeObserver((()=>{this.headerResizeCallback()}));this.headerResizeObserver.observe(this.el)};this.headerResizeCallback=()=>{var t,i,e;if(!this.hideColumnHeaders&&this.columnHeaderTruncation){const s=(i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".table-container"))===null||i===void 0?void 0:i.clientWidth;if(s&&s!==this.prevTableContainerWidth){(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("th.column-header").forEach((t=>{const i=t.querySelector(this.IC_TOOLTIP_STRING);const e=t.querySelectorAll(this.IC_TYPOGRAPHY_STRING);if(i&&e&&e.length===2){i.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);if(e[1].clientWidth>e[0].clientWidth){i.classList.add(this.SHOW_TRUNC_TOOLTIP_STRING)}}}));this.prevTableContainerWidth=s}}};this.handleResize=()=>{this.updateCellHeightsWithDescriptions();this.fixCellOverflow()};this.getRowHeight=t=>parseInt(getComputedStyle(document.documentElement).fontSize)*parseFloat(t.getAttribute(this.DATA_ROW_HEIGHT_STRING)||"");this.truncateUpdatedData=()=>{if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(i){const e=this.getTruncWrapper(t);if(e&&i.clientHeight-this.DEFAULT_LINE_HEIGHT>=e.scrollHeight){this.resetSingleShowHideTruncation(t,i);return}setTimeout((()=>{this.addShowHideTruncationIfNeeded(t,i)}),150)}}))}if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}this.dataUpdated=false};this.truncateTableSorted=()=>{if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(i){if(!i.classList.contains(this.TEXT_WRAP_STRING)){this.createShowHideTruncation(t,i)}else{t.resetTruncation().then((()=>{i.removeAttribute("style")}))}}}))}this.tableSorted=false};this.truncateRowHeightSet=()=>{this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);if(i){if(this.globalRowHeight==="auto"){i.style.height="";i.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,null);i.removeAttribute(this.DATA_ROW_HEIGHT_STRING);if(this.truncationPattern===this.TOOLTIP_STRING){this.removeTooltip(i,t,e);t.setAttribute("style",`${this.LINE_CLAMP_CSS_VARIABLE}: 0`)}else if(this.truncationPattern===this.SHOW_HIDE_STRING){this.resetSingleShowHideTruncation(t,i)}return}if(!i.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)&&!i.style.height&&this.getRowHeight(i)>i.clientHeight&&!i.classList.contains(this.TEXT_WRAP_STRING)){i.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,i.getAttribute(this.DATA_ROW_HEIGHT_STRING))}if(this.truncationPattern){if(this.truncationPattern===this.SHOW_HIDE_STRING){const e=this.getTruncWrapper(t);if(this.getShowHideButton(t)&&e&&e.scrollHeight<=i.clientHeight){this.resetSingleShowHideTruncation(t,i);return}}this.truncate(t,i,e)}else{this.updateSetRowHeight(t)}}}));this.rowHeightSet=false};this.truncateItemsPerPageChange=()=>{var t;const i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll(".table-row");if(i&&this.rowsPerPage>this.previousItemsPerPage){const t=Array.from(i).slice(this.previousItemsPerPage);t.forEach((t=>{t.querySelectorAll("ic-typography").forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);if(i)this.truncate(t,i,e)}))}))}this.previousItemsPerPage=this.rowsPerPage;this.itemsPerPageChange=false};this.truncatePageChange=()=>{if(this.truncationPattern===this.TOOLTIP_STRING){this.updateTruncationTooltip()}if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(i&&this.typographyScrollHeightExceedsContainerHeight(t,i)&&!this.getShowHideButton(t)){this.addShowHideTruncation(i,t)}}))}this.icPageChangeEvent=false};this.truncateDensityUpdate=()=>{this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);if(i)this.truncate(t,i,e)}));this.densityUpdate=false};this.typographyScrollHeightExceedsContainerHeight=(t,i)=>i&&t.scrollHeight>i.clientHeight;this.cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight=(t,i)=>{const e=this.getTruncWrapper(t);return e&&i.clientHeight-this.DEFAULT_LINE_HEIGHT>e.scrollHeight};this.truncatePatternUpdated=()=>{if(this.truncationPattern===this.TOOLTIP_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);if(i&&this.typographyScrollHeightExceedsContainerHeight(t,i)){this.addTooltipTruncation(t,i,e)}}))}else if(this.truncationPattern===this.SHOW_HIDE_STRING){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(i){if(this.cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight(t,i)){this.resetSingleShowHideTruncation(t,i);return}this.addShowHideTruncationIfNeeded(t,i)}}))}};this.updateSetRowHeight=t=>{const i=t=>{const i=this.getCellContainer(t);if(i&&t.scrollHeight>this.getRowHeight(i)){i.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE)}};if(t){i(t)}else{this.getTypographyElements().forEach((t=>{i(t)}))}};this.getLines=t=>Math.floor(t/this.DEFAULT_LINE_HEIGHT);this.truncate=(t,i,e)=>{var s;if(this.typographyScrollHeightExceedsContainerHeight(t,i)){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",`${this.LINE_CLAMP_CSS_VARIABLE}: 0`);(s=i.querySelector(this.CELL_TEXT_WRAPPER_STRING))===null||s===void 0?void 0:s.prepend(t);e.remove()}if(this.truncationPattern===this.SHOW_HIDE_STRING&&!o(t===null||t===void 0?void 0:t.getAttribute("max-lines"))){this.resetSingleShowHideTruncation(t,i)}}};this.addShowHideTruncationIfNeeded=(t,i)=>{if(this.typographyScrollHeightExceedsContainerHeight(t,i)){this.addShowHideTruncation(i,t);return true}return false};this.dataTruncation=(t,i)=>{const e=this.getTooltip(t);if(i.classList.contains("data-type-element")||this.dataUpdated){return}if(this.truncationPattern===this.SHOW_HIDE_STRING&&this.getShowHideButton(t)){const e=this.getTruncWrapper(t);if(e&&this.getLines(e.scrollHeight)===Number(t.getAttribute("max-lines"))){this.resetSingleShowHideTruncation(t,i)}}if(this.rowHeightSet&&this.truncationPattern===this.SHOW_HIDE_STRING){if(this.cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight(t,i)){this.resetSingleShowHideTruncation(t,i);return}if(this.addShowHideTruncationIfNeeded(t,i)){return}}if(t.scrollHeight>0&&i.clientHeight>0&&t.scrollHeight===i.clientHeight){if(e){this.removeTooltip(i,t,e)}return}this.truncate(t,i,e)};this.getTruncWrapper=t=>{var i;return(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".trunc-wrapper")};this.getShowHideButton=t=>{var i;return(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector("button")};this.removeTextWrap=()=>{this.getTypographyElements().forEach((t=>{const i=t.closest("td");if(i===null||i===void 0?void 0: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.resetSingleShowHideTruncation=(t,i)=>{const e=this.getTruncWrapper(t);if(!(i&&e))return;if(e.scrollHeight>i.clientHeight&&!o(t.getAttribute("max-lines"))&&Math.floor((i===null||i===void 0?void 0:i.clientHeight)/this.DEFAULT_LINE_HEIGHT)!==Number(t.getAttribute("max-lines"))){t.checkMaxLines(e.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.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,null)}else if(!i.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)){t.resetTruncation().then((()=>{if(!t.closest(this.TEXT_WRAP_CLASS)){i.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,i.getAttribute(this.DATA_ROW_HEIGHT_STRING))}}))}};this.resetAllShowHideTruncation=()=>{this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);t.resetTruncation().then((()=>{if(i&&!t.closest(this.TEXT_WRAP_CLASS)){i.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,i.getAttribute(this.DATA_ROW_HEIGHT_STRING))}}))}))};this.startLoadingTimer=()=>{this.hasLoadedForOneSecond=false;this.timerStarted=Date.now();setTimeout((()=>{this.hasLoadedForOneSecond=true;this.timerStarted=0}),this.minimumLoadingDisplayDuration)};this.isObject=t=>t!==undefined&&t!==null&&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{description:t,max:i,min:s,progress:a,monochrome:l}=this.updatingOptions||{};const o=this.columns.filter((t=>t.hidden!==true)).length;return e("th",{colSpan:o+(this.rowSelection&&this.data?1:0),class:"updating-state"},e("ic-loading-indicator",{theme:this.theme,monochrome:l,description:t||"Updating table data",fullWidth:true,max:i,min:s,progress:a,type:"linear",size:"small"}))};this.setRowHeight=t=>n(`${t*this.DENSITY_HEIGHT_MULTIPLIER[this.density]-this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);this.setTruncationClass=()=>this.truncationPattern?{[`truncation-${this.truncationPattern}`]:true}:{};this.getColumnWidth=t=>{let i={};if(typeof t==="string"){i=Object.assign(Object.assign({},i),{["--column-width"]:t})}else if(t&&Object.keys(t).length>0){if(t.minWidth){i=Object.assign(Object.assign({},i),{["--column-min-width"]:t.minWidth})}if(t.maxWidth){i=Object.assign(Object.assign({},i),{["--column-max-width"]:t.maxWidth})}}return i};this.getCalculatedRowHeight=(t,i,e,s)=>{if((this.truncationPattern||s)&&!(t===null||t===void 0?void 0:t.textWrap)&&!i&&!this.getCellOptions(e,"textWrap")&&(t===null||t===void 0?void 0:t.dataType)!=="element"){return{[this.ROW_HEIGHT_CSS_VARIABLE]:this.setRowHeight(s)}}return{}};this.getSlottedActionElement=t=>{const i=t.getAttribute("name");return this.el.querySelector(`[slot="${i}"]`)};this.adjustWidthForActionElement=()=>{var t;const i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll(".action-element");i===null||i===void 0?void 0:i.forEach((t=>{var i;const e=t.firstChild;const s=this.getSlottedActionElement(e);const a=(i=s===null||s===void 0?void 0:s.getBoundingClientRect().width)!==null&&i!==void 0?i:0;const l=t.closest(".cell-grid-wrapper");if(l){l.style.gridTemplateColumns=`auto calc(${a}px + var(--ic-space-xs))`}}))};this.createCellContent=(t,i,a,l,o,n,r,d)=>{var c,u,v,p,g,b,f,m,y,w,x;return e("div",{innerHTML:(t===null||t===void 0?void 0:t.dataType)==="element"&&!h(this.el,a)?i:undefined,class:Object.assign(Object.assign({"cell-container":(t===null||t===void 0?void 0:t.dataType)!=="element",[`cell-alignment-${((c=t===null||t===void 0?void 0:t.columnAlignment)===null||c===void 0?void 0:c.horizontal)||((u=l===null||l===void 0?void 0:l.rowAlignment)===null||u===void 0?void 0:u.horizontal)||this.getCellAlignment(i,"horizontal")}`]:!!((v=t===null||t===void 0?void 0:t.columnAlignment)===null||v===void 0?void 0:v.horizontal)||!!((p=l===null||l===void 0?void 0:l.rowAlignment)===null||p===void 0?void 0:p.horizontal)||!!this.getCellAlignment(i,"horizontal"),[`data-type-${t===null||t===void 0?void 0:t.dataType}`]:true,[this.TEXT_WRAP_STRING]:(t===null||t===void 0?void 0:t.textWrap)||(l===null||l===void 0?void 0:l.textWrap)||!!this.getCellOptions(i,"textWrap"),["cell-icon"]:o||!!((g=t===null||t===void 0?void 0:t.icon)===null||g===void 0?void 0:g.icon),[`cell-emphasis-${this.isObject(i)&&n("emphasis")||(t===null||t===void 0?void 0:t.emphasis)||r}`]:this.isObject(i)&&!!n("emphasis")||!!(t===null||t===void 0?void 0:t.emphasis)||!!r},this.setTruncationClass()),{[this.CELL_CONTAINER_WITH_DESCRIPTION_STRING]:this.isObject(i)&&Object.keys(i).includes("description")}),style:Object.assign(Object.assign({},this.getCalculatedRowHeight(t,l===null||l===void 0?void 0:l.textWrap,i,d)),this.getColumnWidth(t===null||t===void 0?void 0:t.columnWidth)),"data-row-height":this.truncationPattern||d?this.setRowHeight(d):null},h(this.el,a)?e("slot",{name:a}):e(s,null,h(this.el,`${a}-icon`)?e("slot",{name:`${a}-icon`}):(o||((b=t===null||t===void 0?void 0:t.icon)===null||b===void 0?void 0:b.onAllCells))&&(n("icon")||((f=t===null||t===void 0?void 0:t.icon)===null||f===void 0?void 0:f.icon))&&e("span",{class:"icon",innerHTML:n("icon")||((m=t===null||t===void 0?void 0:t.icon)===null||m===void 0?void 0:m.icon)}),(t===null||t===void 0?void 0:t.dataType)!=="element"&&!h(this.el,a)&&e("div",{class:{"cell-text-wrapper":true,"cell-text-no-wrap":!this.truncationPattern}},e("ic-typography",{variant:"body",class:{[`cell-emphasis-${this.isObject(i)&&n("emphasis")||(t===null||t===void 0?void 0:t.emphasis)||r}`]:this.isObject(i)&&!!n("emphasis")||!!(t===null||t===void 0?void 0:t.emphasis)||!!r,[`text-${this.density}`]:this.notDefaultDensity()}},this.isObject(i)&&(t===null||t===void 0?void 0:t.dataType)!=="date"?Object.keys(i).includes("href")?e("ic-link",{href:n("href"),theme:this.theme,target:n("target")||undefined,rel:n("rel")||undefined},n("data")):n("data"):this.getCellContent(i,t===null||t===void 0?void 0:t.dataType)),this.isObject(i)&&Object.keys(i).includes("description")&&e("div",{class:{["cell-description"]:true,[`data-type-${t===null||t===void 0?void 0:t.dataType}`]:true}},((y=n("description"))===null||y===void 0?void 0:y.icon)&&e("span",{class:"cell-description-icon",innerHTML:n("description").icon}),e("ic-typography",{variant:"caption",class:"cell-description-text"},(x=(w=n("description"))===null||w===void 0?void 0:w.data)!==null&&x!==void 0?x:n("description"))))))};this.createCells=(t,i)=>{var s;const a=Object.keys(t);const l=this.getObjectValue(t,"rowOptions");let o;let n;const r=this.getObjectValue(t,"header");if(r){o=this.getObjectValue(r,"rowAlignment");n=this.getObjectValue(r,"emphasis")}const d=(s=this.variableRowHeight)===null||s===void 0?void 0:s.call(this,Object.assign(Object.assign({},t),{index:i}));const c=d?d!=="auto"&&d:this.globalRowHeight!=="auto"&&this.globalRowHeight;return this.columns.map(((s,r)=>{var d,u,v,p;if(s.hidden!==true){const g=this.getObjectValue(t,s["key"]);const b=t=>this.getObjectValue(g,t);if(a[r]==="header"){return e("th",{scope:"row",colSpan:b("colspan"),class:{["row-header"]:true,[`row-header-alignment-${b("cellAlignment")}`]:!!b("cellAlignment"),["row-header-sticky"]:this.stickyRowHeaders}},b("title"))}const f=`${s===null||s===void 0?void 0:s.key}-${i}`;const m=this.createCellContent(s,g,f,l,this.isObject(g)&&Object.keys(g).includes("icon"),b,n,c||undefined);if(a[r]!=="rowOptions"){return e("td",{class:{["table-cell"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),["with-overflow"]:(s===null||s===void 0?void 0:s.dataType)==="element",[`cell-vertical-align-${((d=s===null||s===void 0?void 0:s.columnAlignment)===null||d===void 0?void 0:d.vertical)||((u=l===null||l===void 0?void 0:l.rowAlignment)===null||u===void 0?void 0:u.vertical)||o||this.getCellAlignment(g,"vertical")}`]:!!((v=s===null||s===void 0?void 0:s.columnAlignment)===null||v===void 0?void 0:v.vertical)||!!((p=l===null||l===void 0?void 0:l.rowAlignment)===null||p===void 0?void 0:p.vertical)||!!o||!!this.getCellAlignment(g,"vertical")},style:Object.assign({},this.getColumnWidth(s.columnWidth))},h(this.el,`${f}-action-element`)?e("div",{class:"cell-grid-wrapper"},m,e("span",{class:"action-element"},e("slot",{name:`${f}-action-element`}))):m)}}}))};this.createColumnHeaders=()=>(this.columns||[]).map((({cellAlignment:t,colspan:i,icon:s,key:a,title:l,columnWidth:o,excludeColumnFromSort:n,hidden:r},d)=>r!==true&&e("th",{scope:"col",class:{["column-header"]:true,[`table-density-${this.density}`]:this.notDefaultDensity(),["updating-state-headers"]:this.updating&&!this.loading},style:Object.assign({},this.getColumnWidth(o)),colSpan:i},e("div",{class:{"column-header-inner-container":true,"truncation-tooltip":this.columnHeaderTruncation,[`column-header-alignment-${t}`]:!!t}},h(this.el,`${a}-column-icon`)?e("slot",{name:`${a}-column-icon`}):s&&!s.hideOnHeader&&e("span",{class:"icon",innerHTML:s.icon}),this.columnHeaderTruncation?e("ic-tooltip",{label:l,target:`column-header-${d}`},e("ic-typography",{id:`column-header-${d}`,variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},l)):e("ic-typography",{variant:"body",class:{["column-header-text"]:true,[`text-${this.density}`]:this.notDefaultDensity()}},l),this.sortable&&!n&&e("ic-button",{variant:"icon-tertiary",id:`sort-button-${a}`,"aria-label":this.getSortButtonLabel(a),onClick:()=>this.sortRows(a),innerHTML:this.SORT_ICONS[this.sortedColumn===a?this.sortedColumnOrder:"unsorted"],class:{["sort-button"]:true,["sort-button-unsorted"]:this.sortedColumn!==a||this.sortedColumnOrder==="unsorted"}})),this.columnHeaderTruncation&&e("ic-typography",{variant:"body","aria-hidden":"true",class:{["column-header-text"]:true,["dummy-column-header-text"]:this.columnHeaderTruncation,[`text-${this.density}`]:this.notDefaultDensity()}},l))));this.onRowClick=t=>{const i=!this.selectedRows.includes(t);this.selectedRows=i?[...this.selectedRows,t]:this.selectedRows.filter((i=>i!==t));this.icSelectedRowChange.emit({row:i?t:null,selectedRows:this.selectedRows})};this.selectAllRows=()=>{this.selectedRows=this.organisedData&&this.selectedRows.length!==this.organisedData.length?[...this.organisedData]:[];this.icSelectAllRows.emit(this.selectedRows)};this.createRows=()=>{var t,i,s,a;const l=this.showPagination?(t=this.data)===null||t===void 0?void 0:t.slice(this.fromRow,this.toRow):(i=this.data)===null||i===void 0?void 0:i.slice();const o=this.showPagination?this.fromRow:0;this.organisedData=l===null||l===void 0?void 0:l.map(((t,i)=>{const e=this.columns.map((({key:t},e)=>h(this.el,`${t}-${i+o}`)&&{key:t,index:e})).filter((i=>!!i&&!Object.prototype.hasOwnProperty.call(t,i.key)));return e.length>0?r(t,e,""):t}));return(s=this.organisedData)===null||s===void 0?void 0:s.sort(this.sortable&&!this.disableAutoSort&&this.sortedColumn&&!((a=this.columns.find((t=>t.key===this.sortedColumn)))===null||a===void 0?void 0:a.disableAutoSort)?this.getSortFunction():undefined).map(((t,i)=>{const s=this.rowSelection&&this.selectedRows.includes(t);const a=i+o;return e("tr",{class:{"table-row":true,"table-row-selected":s}},this.rowSelection&&e("td",{class:{"table-cell":true,"checkbox-cell":true,[`table-density-${this.density}`]:this.notDefaultDensity()}},e("div",{class:"checkbox-wrapper"},e("ic-checkbox",{class:"ic-data-table-checkbox",checked:s,disabled:this.updating||this.loading,hideLabel:true,label:`${s?"Deselect":"Select"} row ${a}`,onIcCheck:()=>this.onRowClick(t),size:this.density==="dense"?"small":"medium",value:a}))),this.createCells(t,a))}))};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=>{var i,e,s,a;const l=this.sortOptions.sortOrders;if(t!==this.sortedColumn){if(this.sortedColumn){(e=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector(`#sort-button-${this.sortedColumn}`))===null||e===void 0?void 0:e.setAttribute("aria-label",this.getSortButtonLabel(t))}this.sortedColumn=t;this.sortedColumnOrder="unsorted"}let o=l.indexOf(this.sortedColumnOrder)+1;if(o>l.length-1){o=0}this.sortedColumnOrder=l[o];(a=(s=this.el.shadowRoot)===null||s===void 0?void 0:s.querySelector(`#sort-button-${t}`))===null||a===void 0?void 0:a.setAttribute("aria-label",this.getSortButtonLabel(t));this.tableSorted=true;this.icSortChange.emit({columnName:t,sorted:this.sortedColumnOrder})};this.getTypographyElements=()=>{var t;return Array.from(((t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("ic-typography:not(.column-header-text,.cell-description-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(s){if(i.closest(this.TEXT_WRAP_CLASS)){this.removeTooltip(s,i,e);i.setAttribute("style",`${this.LINE_CLAMP_CSS_VARIABLE}: 0`);return}this.regenerateTooltip(s,i,e,t)}}))};this.updateScrollOffset=()=>{var t;const i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".table-row-container");if(i)this.scrollOffset=i.scrollTop};this.updateRowHeightForDescriptions=(t,i)=>{i.setAttribute(this.DATA_ROW_HEIGHT_STRING,t.toString());i.setAttribute("style",`${this.ROW_HEIGHT_CSS_VARIABLE}: ${t}px`)};this.getDescriptionHeight=t=>{const i=window.getComputedStyle(t).getPropertyValue("margin-top");return t.clientHeight+parseInt(i,10)};this.updateCellHeightsWithDescriptions=()=>{var t,i;const e=d(p.XS);(i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll(this.CELL_DESCRIPTION_STRING))===null||i===void 0?void 0:i.forEach((t=>{const i=t.closest(`.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`);const s=i===null||i===void 0?void 0:i.querySelector(this.IC_TYPOGRAPHY_STRING);if(s&&i&&this.globalRowHeight&&this.globalRowHeight!=="auto"){const a=this.getDescriptionHeight(t);const l=a+this.DEFAULT_LINE_HEIGHT;if(!s.textContent&&l>this.globalRowHeight){this.updateRowHeightForDescriptions(a,i)}else if(this.truncationPattern===this.TOOLTIP_STRING){if(l>this.globalRowHeight){const t=i.querySelector(".icon");let s=l;if(t&&e){s+=t.clientHeight}this.updateRowHeightForDescriptions(s,i)}this.addLineClampCSS(s,i)}else if(this.truncationPattern===this.SHOW_HIDE_STRING&&l>this.globalRowHeight&&s.style.getPropertyValue("--truncation-max-lines")!=="initial"){this.updateRowHeightForDescriptions(l,i);this.createShowHideTruncation(s,i,a)}}}))};this.setTableDimensions=()=>{let t={};if(this.width){t=Object.assign(Object.assign({},t),{["--table-width"]:this.width})}if(this.height){t=Object.assign(Object.assign({},t),{["--table-height"]:this.height})}if(this.maxWidth){t=Object.assign(Object.assign({},t),{["--table-max-width"]:this.maxWidth})}if(this.minWidth){t=Object.assign(Object.assign({},t),{["--table-min-width"]:this.minWidth})}return t};this.fixCellTooltip=t=>{var i,e;let s=null;const a=(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(this.IC_TOOLTIP_STRING);if(t.tagName==="IC-TOOLTIP"){s=t}else if(a){s=a}else if(((e=t.children)===null||e===void 0?void 0:e.length)>0){Array.from(t.children).forEach((t=>{this.fixCellTooltip(t)}))}else{return}s===null||s===void 0?void 0:s.setExternalPopperProps({strategy:"fixed"})};this.fixCellOverflow=()=>{var t,i;(i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll(".data-type-element"))===null||i===void 0?void 0:i.forEach((t=>{let i=Array.from(t.children);if(i.length===1&&i[0].tagName==="SLOT"){i=c(t)}i===null||i===void 0?void 0:i.forEach((i=>{var e;if(i.tagName==="IC-SELECT"){const s=(e=i.shadowRoot)===null||e===void 0?void 0:e.querySelector("ic-menu");s===null||s===void 0?void 0:s.setExternalPopperProps({strategy:"fixed"});i.style.setProperty("--input-width",`${t.clientWidth}px`)}else{const t=i.querySelector("ic-popover-menu");t===null||t===void 0?void 0:t.setExternalPopperProps({strategy:"fixed"})}}))}))};this.fixCellTooltips=()=>{var t,i,e,s;(i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll(".data-type-element"))===null||i===void 0?void 0:i.forEach((t=>{const i=c(t);i===null||i===void 0?void 0:i.forEach((t=>{this.fixCellTooltip(t)}))}));(s=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll(".action-element"))===null||s===void 0?void 0:s.forEach((t=>{const i=t.firstChild;const e=this.getSlottedActionElement(i);if(e){this.fixCellTooltip(e)}}))};this.renderTableBody=(t,i,s)=>{if(!(i===null||i===void 0?void 0:i.length))return;if(s&&t){return e("tbody",null,this.createRows())}else if(t&&!s){return null}else{return e("tbody",null,this.createRows())}};this.renderLoadingIndicator=(t,i)=>{if(!t)return null;return e(s,null,e("div",{class:"loading-overlay",ref:t=>this.loadingOverlay=t}),e("ic-loading-indicator",{theme:this.theme,monochrome:i===null||i===void 0?void 0:i.monochrome,class:{"loading-empty":t,loading:true},description:(i===null||i===void 0?void 0:i.description)||"Loading table data",label:(i===null||i===void 0?void 0:i.label)||"Loading...",labelDuration:i===null||i===void 0?void 0:i.labelDuration,max:i===null||i===void 0?void 0:i.max,min:i===null||i===void 0?void 0:i.min,progress:i===null||i===void 0?void 0:i.progress,ref:t=>this.loadingIndicator=t}))};this.renderAriaLiveLoading=()=>{var t,i;if(this.loading){return((t=this.loadingOptions)===null||t===void 0?void 0:t.label)||"Loading..."}else if(this.updating){return((i=this.updatingOptions)===null||i===void 0?void 0:i.description)||"Updating table data"}else{return""}};this.renderEmptyState=(t,i,s)=>{const a=h(this.el,"empty-state")?e("slot",{name:"empty-state"}):e("ic-empty-state",{aligned:"center",heading:"No Data",class:"loading-empty"});if(t&&!(i===null||i===void 0?void 0:i.length)&&s){return a}else if(!t&&!(i===null||i===void 0?void 0:i.length)){return a}else{return null}}}headerTruncationChangeHandler(){var t,i;if(this.columnHeaderTruncation){this.prevTableContainerWidth=0}else{(i=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("th.column-header"))===null||i===void 0?void 0:i.forEach((t=>{var i;(i=t.querySelector(this.IC_TOOLTIP_STRING))===null||i===void 0?void 0:i.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING)}))}}columnsChangeHandler(){this.columnsUpdated=true}disconnectedCallback(){var t,i;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect();(i=this.headerResizeObserver)===null||i===void 0?void 0:i.disconnect();window.removeEventListener("resize",this.handleResize)}componentWillLoad(){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({},this.loadingOptions);this.initialLoad=true;this.previousItemsPerPage=this.rowsPerPage}componentDidLoad(){var t,i;const e=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector("table");const s=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector(".table-container");u(this.runHeaderResizeObserver);if(this.dataUpdated){this.dataUpdated=false}if(e&&s&&(e.clientHeight>s.clientHeight||e.clientWidth>s.clientWidth)){this.scrollable=true}if(this.loading){this.startLoadingTimer();this.showLoadingIndicator()}if(this.truncationPattern){this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(i&&!i.classList.contains(this.TEXT_WRAP_STRING)){this.dataTruncation(t,i);this.resizeObserver=new ResizeObserver(v((()=>{this.dataTruncation(t,i);if(!this.isNewDebounceDelaySet){this.debounceDelay=200;this.isNewDebounceDelaySet=true}}),(()=>this.debounceDelay)));this.resizeObserver.observe(t)}}))}if(this.globalRowHeight!=="auto"){this.updateSetRowHeight()}window.addEventListener("resize",this.handleResize);this.icColumnsLoaded.emit();if(this.data&&!this.loading&&!this.updating)this.icDataLoaded.emit()}componentDidUpdate(){if(this.truncationPattern===this.SHOW_HIDE_STRING||this.truncationPattern===this.TOOLTIP_STRING){if(this.dataUpdated){this.truncateUpdatedData()}if(this.tableSorted){this.truncateTableSorted()}if(this.rowHeightSet){this.truncateRowHeightSet()}if(this.itemsPerPageChange){this.truncateItemsPerPageChange()}if(!this.initialLoad&&this.icPageChangeEvent){this.truncatePageChange()}if(this.densityUpdate){this.truncateDensityUpdate()}if(this.truncationPatternUpdated){this.truncatePatternUpdated()}}if(this.columnsUpdated){this.icColumnsLoaded.emit();this.columnsUpdated=false}if(this.dataUpdated&&!this.loading&&!this.updating){this.icDataLoaded.emit();this.dataUpdated=false}}componentDidRender(){this.fixCellTooltips();this.fixCellOverflow();this.updateCellHeightsWithDescriptions();this.adjustWidthForActionElement()}createShowHideTruncation(t,i,e=0){t.checkMaxLines(t.scrollHeight);t.setAttribute("max-lines",`${this.getLines(i.clientHeight-e)}`);t.setShowHideExpanded(false);i.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,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)}handleTypographyTruncationExpandToggle({detail:t}){const{expanded:i,typographyEl:e}=t;const s=this.getCellContainer(e);if((s===null||s===void 0?void 0:s.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE))&&i){s.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE,"inherit")}}handlePageChange({detail:t,target:i}){var e;if(i.parentElement!==this.el){this.fromRow=(t.value-1)*this.rowsPerPage;this.toRow=this.fromRow+this.rowsPerPage;const i=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".table-row-container");if(i){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}}this.selectedRows=[]}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}loadingHandler(){if(this.loading){this.startLoadingTimer();setTimeout((()=>{this.showLoadingIndicator()}),500)}}truncationPatternHandler(){if(this.truncationPattern===this.TOOLTIP_STRING){this.resetAllShowHideTruncation();this.updateTruncationTooltip(true);this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);const e=this.getTooltip(t);if(i)this.truncate(t,i,e)}))}else if(this.truncationPattern===this.SHOW_HIDE_STRING){this.updateTruncationTooltip(true);this.getTypographyElements().forEach((t=>{const i=this.getCellContainer(t);if(i){if(this.cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight(t,i)){this.resetSingleShowHideTruncation(t,i);return}setTimeout((()=>{this.addShowHideTruncationIfNeeded(t,i)}),150)}}))}this.truncationPatternUpdated=true}async dataHandler(){this.loadingOptions=Object.assign({},this.loadingOptions);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}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=undefined}showLoadingIndicator(){var t,i,e;if((t=this.loadingOptions)===null||t===void 0?void 0:t.overlay){(i=this.loadingOverlay)===null||i===void 0?void 0:i.classList.add("show")}(e=this.loadingIndicator)===null||e===void 0?void 0:e.classList.add("show")}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.truncationPattern===this.TOOLTIP_STRING){if(!i.getAttribute("style")||i.style.cssText.includes(`${this.LINE_CLAMP_CSS_VARIABLE}: 0;`)){this.addLineClampCSS(i,t)}if(!t.querySelector(this.IC_TOOLTIP_STRING))this.createTruncationTooltip(i,t)}}removeTooltip(t,i,e){var s;(s=t.querySelector(this.CELL_TEXT_WRAPPER_STRING))===null||s===void 0?void 0:s.prepend(i);e===null||e===void 0?void 0:e.remove()}addLineClampCSS(t,i){var e,s;const a=(e=i.querySelector(this.CELL_DESCRIPTION_STRING))===null||e===void 0?void 0:e.clientHeight;const l=i.clientHeight;let o=l;if(i.classList.contains(this.CELL_CONTAINER_WITH_DESCRIPTION_STRING)&&a&&l>a){const t=d(p.XS)&&((s=i===null||i===void 0?void 0:i.querySelector(".icon"))===null||s===void 0?void 0:s.clientHeight)||0;o=o-a-t}t.setAttribute("style",`${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(o||0)}`)}createTruncationTooltip(t,i){var e;const s=document.createElement(this.IC_TOOLTIP_STRING);s.setAttribute("target",t.id);s.setAttribute("label",t.textContent);s.classList.add("ic-tooltip-overflow");s.setExternalPopperProps({strategy:"fixed"});(e=i.querySelector(this.CELL_TEXT_WRAPPER_STRING))===null||e===void 0?void 0:e.prepend(s);s.prepend(t)}render(){var t,i;const{caption:s,columns:l,createColumnHeaders:o,createUpdatingIndicator:n,data:r,density:d,hideColumnHeaders:c,rowSelection:u,loading:v,loadingOptions:p,paginationBarOptions:g,rowsPerPage:b,scrollable:f,scrollOffset:m,selectAllRows:y,selectedRows:w,showPagination:x,sortable:k,sortedColumn:$,sortedColumnOrder:O,stickyColumnHeaders:j,updateScrollOffset:C,updating:H,tableLayout:P,theme:T}=this;const L=w.length>0;const z=w.length===(x?b:r===null||r===void 0?void 0:r.length);const I=L?z?"deselect all":"select all remaining":"select all";return e(a,{key:"84f4f415f8a80939c2b7dc2f6272a01fc43b5aab",style:Object.assign({},this.setTableDimensions()),class:{[`ic-theme-${T}`]:T!=="inherit"}},e("div",{key:"9b81dce430b774d76b458157946d8bcdcd8163d1",class:"table-container"},h(this.el,"title-bar")&&e("slot",{key:"41f557715b7dd1835f4760d711dd14a90fc9e6a5",name:"title-bar"}),e("div",{key:"2b668ed233252e678ec6e35cb94b3cfc1a99a277",class:{["table-row-container"]:true,scrollable:f},tabIndex:f?0:undefined,onScroll:C},e("table",{key:"56bef9d91412d8b2240680a85a2b6eb23dd5dc46",style:{"--table-layout":P}},e("caption",{key:"412993cdb9d8cdbb7fe44700a0a503b6c019274a",class:"table-caption"},s),!c&&e("thead",{key:"b8d4ffb763d44d06727608adfbd58c9d2a8a0e3d",class:{["column-header-sticky"]:j,["column-header-overlay"]:j&&m!==0}},e("tr",{key:"63c8fc7587eb5e5912eec2f18efaae0c37a33630"},u&&r&&e("th",{key:"cef5b67389222dd6be1ab940c66df75519017d1e",class:{"column-header":true,"checkbox-cell":true,"updating-state-headers":H&&!v,[`table-density-${d}`]:this.notDefaultDensity()}},e("div",{key:"095be9ca1da7f4b977264b41b9f206061ae484c8",class:"checkbox-wrapper"},e("ic-checkbox",{key:"b2ada1483434907c07daf7c1854c14f499cafba5",class:"ic-data-table-checkbox",checked:L&&z,disabled:H||v,hideLabel:true,indeterminate:L&&!z,label:`${s} ${I} rows`,nativeIndeterminateBehaviour:true,onIcCheck:()=>y(),size:d==="dense"?"small":"medium",value:s}))),o())),H&&!v&&(c?e("thead",null,n()):n()),this.renderTableBody(v,r,p===null||p===void 0?void 0:p.overlay)),this.renderEmptyState(v,r,p===null||p===void 0?void 0:p.overlay)),e("div",{key:"0b4279d5c29aa8a74dfbfc60a5d6104990bfea66","aria-live":"assertive",class:"sr-only"},this.renderAriaLiveLoading()),this.renderLoadingIndicator(v,p),(x||h(this.el,"pagination-bar"))&&e("div",{key:"ee2c9811630b1c64071e8071ba15c0265a78ee00",class:"pagination-container"},h(this.el,"pagination-bar")?e("slot",{name:"pagination-bar"}):e("ic-pagination-bar",{alignment:g.alignment,hideAllFromItemsPerPage:g.hideAllFromItemsPerPage,hideRangeLabel:g.hideRangeLabel,itemLabel:g.itemLabel,itemsPerPageOptions:g.itemsPerPageOptions,monochrome:g.monochrome,pageLabel:g.pageLabel,rangeLabelType:g.rangeLabelType,selectedItemsPerPage:g.selectedItemsPerPage,selectItemsPerPageOnEnter:g.selectItemsPerPageOnEnter,setToFirstPageOnPaginationChange:g.setToFirstPageOnPaginationChange,showGoToPageControl:g.showGoToPageControl,showItemsPerPageControl:g.showItemsPerPageControl,theme:T,totalItems:(t=r===null||r===void 0?void 0:r.length)!==null&&t!==void 0?t:0,type:g.type})),k&&e("div",{key:"dbe84358bdf8715360f2fd5e810e24878e877a7a",class:"screen-reader-sort-text","aria-live":"polite"},O!=="unsorted"&&$?`${((i=l.find((t=>t.key===$)))===null||i===void 0?void 0:i.title)||$} sorted ${O}`:"table unsorted")))}get el(){return l(this)}static get watchers(){return{columnHeaderTruncation:["headerTruncationChangeHandler"],columns:["columnsChangeHandler"],loading:["loadingHandler"],truncationPattern:["truncationPatternHandler"],data:["dataHandler"],density:["densityHandler"],globalRowHeight:["rowHeightChangeHandler"],variableRowHeight:["rowHeightChangeHandler"]}}};w.style=y;export{w as ic_data_table};
2
+ //# sourceMappingURL=p-c67381b1.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icDataTableCss","IcDataTableStyle0","DataTable","constructor","hostRef","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","columnsUpdated","rowHeightSet","initialLoad","icPageChangeEvent","itemsPerPageChange","DATA_ROW_HEIGHT_STRING","ROW_HEIGHT_CSS_VARIABLE","LINE_CLAMP_CSS_VARIABLE","DEFAULT_LINE_HEIGHT","densityUpdate","truncationPatternUpdated","isNewDebounceDelaySet","headerResizeObserver","IC_TOOLTIP_STRING","SHOW_TRUNC_TOOLTIP_STRING","CELL_DESCRIPTION_STRING","CELL_CONTAINER_WITH_DESCRIPTION_STRING","CELL_TEXT_WRAPPER_STRING","IC_TYPOGRAPHY_STRING","fromRow","scrollable","scrollOffset","selectedRows","debounceDelay","columnHeaderTruncation","disableAutoSort","density","embedded","globalRowHeight","hideColumnHeaders","loading","minimumLoadingDisplayDuration","paginationBarOptions","alignment","hideAllFromItemsPerPage","hideRangeLabel","itemLabel","itemsPerPageOptions","label","value","monochrome","pageLabel","rangeLabelType","selectedItemsPerPage","selectItemsPerPageOnEnter","setToFirstPageOnPaginationChange","showGoToPageControl","showItemsPerPageControl","type","rowSelection","showPagination","sortable","sortOptions","sortOrders","defaultColumn","stickyColumnHeaders","stickyRowHeaders","tableLayout","theme","updating","runHeaderResizeObserver","ResizeObserver","headerResizeCallback","observe","el","tableContainerWidth","_b","_a","shadowRoot","querySelector","clientWidth","prevTableContainerWidth","_c","querySelectorAll","forEach","header","tooltip","typographyEls","length","classList","remove","add","handleResize","updateCellHeightsWithDescriptions","fixCellOverflow","getRowHeight","cellContainer","parseInt","getComputedStyle","document","documentElement","fontSize","parseFloat","getAttribute","truncateUpdatedData","truncationPattern","getTypographyElements","typographyEl","getCellContainer","truncWrapper","getTruncWrapper","clientHeight","scrollHeight","resetSingleShowHideTruncation","setTimeout","addShowHideTruncationIfNeeded","updateTruncationTooltip","truncateTableSorted","contains","createShowHideTruncation","resetTruncation","then","removeAttribute","tableSorted","truncateRowHeightSet","tooltipEl","getTooltip","style","height","setProperty","removeTooltip","setAttribute","getShowHideButton","truncate","updateSetRowHeight","truncateItemsPerPageChange","allRows","rowsPerPage","previousItemsPerPage","newRows","Array","from","slice","row","truncatePageChange","typographyScrollHeightExceedsContainerHeight","addShowHideTruncation","truncateDensityUpdate","cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight","truncatePatternUpdated","addTooltipTruncation","removeRowHeightVariable","element","removeProperty","getLines","Math","floor","closest","prepend","isEmptyString","dataTruncation","Number","removeTextWrap","tableCell","deleteTextWrapDataKey","array","isArray","val","textWrap","checkMaxLines","setShowHideExpanded","resetAllShowHideTruncation","startLoadingTimer","timerStarted","Date","now","isObject","undefined","notDefaultDensity","getCellContent","cell","dataType","toLocaleDateString","getCellAlignment","Object","keys","includes","getObjectValue","getCellOptions","key","createUpdatingIndicator","description","max","min","progress","updatingOptions","visibleColumnCount","columns","filter","col","hidden","h","colSpan","data","class","fullWidth","size","setRowHeight","pxToRem","setTruncationClass","getColumnWidth","columnWidth","columnWidthStyling","assign","minWidth","maxWidth","getCalculatedRowHeight","columnProps","rowTextWrap","currentRowHeight","getSlottedActionElement","actionElement","slotName","adjustWidthForActionElement","elements","actionElementSpan","firstChild","slottedActionElement","width","getBoundingClientRect","gridWrapper","gridTemplateColumns","createCellContent","cellSlotName","rowOptions","hasIcon","cellValue","rowEmphasis","innerHTML","isSlotUsed","columnAlignment","horizontal","rowAlignment","_d","_e","icon","emphasis","name","Fragment","_f","onAllCells","_g","_h","variant","href","target","rel","_j","_l","_k","createCells","rowIndex","rowKeys","rowHeader","variableRowHeightVal","variableRowHeight","call","index","map","column","scope","CellContent","vertical","createColumnHeaders","cellAlignment","colspan","title","excludeColumnFromSort","hideOnHeader","id","getSortButtonLabel","onClick","sortRows","sortedColumn","sortedColumnOrder","onRowClick","notCurrentlySelected","selectedRow","icSelectedRowChange","emit","selectAllRows","organisedData","icSelectAllRows","createRows","toRow","paginationOffset","slottedColumns","prototype","hasOwnProperty","addDataToPosition","sort","find","getSortFunction","isRowSelected","cellIndex","checked","disabled","hideLabel","onIcCheck","values","indexOf","getNextSortOption","option","sortOption","getComparison","targetRow","comparisonRow","targetRowValue","comparisonRowValue","valueOf","String","localeCompare","numeric","sensitivity","a","b","nextSortOrderIndex","icSortChange","columnName","sorted","removeTooltipOnly","regenerateTooltip","updateScrollOffset","tableRowContainer","scrollTop","updateRowHeightForDescriptions","rowHeight","toString","getDescriptionHeight","descriptionMarginTop","window","getPropertyValue","isXSDevice","deviceSizeMatches","IC_DEVICE_SIZES","XS","typography","descriptionHeight","descriptionHeightPlusLineHeight","textContent","cellIcon","addLineClampCSS","setTableDimensions","tableHostDimensions","fixCellTooltip","tooltipChildElement","tagName","children","setExternalPopperProps","strategy","getSlotElements","menu","popover","fixCellTooltips","slotElements","slottedEl","renderTableBody","overlay","renderLoadingIndicator","isLoading","loadingOptions","ref","loadingOverlay","labelDuration","loadingIndicator","renderAriaLiveLoading","renderEmptyState","emptyStateEl","aligned","heading","headerTruncationChangeHandler","columnsChangeHandler","disconnectedCallback","disconnect","removeEventListener","componentWillLoad","previousRowsPerPage","componentDidLoad","tableElement","tableContainer","checkResizeObserver","showLoadingIndicator","dynamicDebounce","addEventListener","icColumnsLoaded","icDataLoaded","componentDidUpdate","componentDidRender","createTruncationTooltip","handleTypographyTruncationExpandToggle","detail","expanded","handlePageChange","parentElement","tableRowsContainer","previousPaginationPage","handleItemsPerPageChange","handleDensityChange","ev","loadingHandler","truncationPatternHandler","dataHandler","densityHandler","rowHeightChangeHandler","newValue","oldValue","icRowHeightChange","resetRowHeights","cssText","descriptionCellHeight","cellContainerHeight","totalHeight","iconHeight","createElement","render","caption","rowsSelected","allRowsSelected","headerCheckboxLabelState","Host","tabIndex","onScroll","indeterminate","nativeIndeterminateBehaviour","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: inline-flex;\n max-height: 100%;\n width: var(--table-width, 100%);\n height: 100%;\n min-width: var(--table-min-width);\n max-width: var(--table-max-width);\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 width: 100%;\n}\n\n.cell-container {\n display: flex;\n min-height: 1.5rem;\n overflow-y: hidden;\n height: var(--row-height);\n\n --ic-typography-color: var(--ic-data-table-text-default-emphasis);\n}\n\n.truncation-show-hide {\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: var(--table-layout, \"fixed\");\n border-spacing: 0;\n width: 100%;\n height: var(--table-height, auto);\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-space-1px) solid var(--ic-data-table-border);\n}\n\n.column-header-inner-container {\n padding: var(--ic-space-xs);\n box-sizing: border-box;\n}\n\n.column-header-inner-container ic-tooltip {\n pointer-events: none;\n}\n\n.column-header-inner-container ic-tooltip.show-trunc-tooltip {\n pointer-events: auto;\n}\n\n.column-header-inner-container ic-tooltip .column-header-text {\n --ic-line-clamp: 1;\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-image: linear-gradient(\n var(--ic-data-table-cell-background-selected) 0 0\n );\n background-color: var(--ic-data-table-cell-background) !important;\n}\n\n.table-row:hover {\n background-image: linear-gradient(\n var(--ic-data-table-cell-background-hover) 0 0\n );\n background-color: var(--ic-data-table-cell-background) !important;\n}\n\n.table-row-selected:hover {\n background-image: linear-gradient(\n var(--ic-data-table-cell-background-selected-hover) 0 0\n );\n}\n\n.sort-button {\n margin-left: auto;\n}\n\n.sort-button:hover {\n background-color: var(--ic-data-table-icon-button-background-hover);\n}\n\n.sort-button:active {\n background-color: var(--ic-data-table-icon-button-background-pressed);\n}\n\n.sort-button svg {\n color: var(--ic-data-table-sort-toggle-icon);\n}\n\n.sort-button-unsorted svg {\n color: var(--ic-data-table-sort-toggle-icon-default);\n}\n\n.table-density-dense .column-header-inner-container,\ntd.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 .column-header-inner-container,\ntd.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.dummy-column-header-text {\n white-space: nowrap;\n overflow: hidden;\n height: 0;\n width: fit-content;\n}\n\n.row-header,\n.column-header {\n text-align: left;\n padding: var(--ic-space-xs);\n background-color: var(--ic-data-table-header-background);\n border-right: var(--ic-space-1px) solid var(--ic-data-table-header-keyline);\n border-bottom: var(--ic-space-1px) solid var(--ic-data-table-header-keyline);\n color: var(--ic-data-table-header-text);\n}\n\n.column-header {\n padding: 0;\n width: var(--column-width);\n min-width: var(--column-min-width, 4rem);\n max-width: var(--column-max-width);\n}\n\n.column-header:last-child {\n border-right: none;\n}\n\n.scrollable .column-header:last-child {\n border-right: var(--ic-space-1px) solid var(--ic-data-table-header-keyline) !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 {\n background-color: var(--ic-data-table-cell-background);\n}\n\n.table-row:nth-child(even) {\n background-color: var(--ic-data-table-cell-background-stripe);\n}\n\n.table-cell {\n padding: var(--ic-space-xs);\n border-bottom: solid var(--ic-data-table-cell-keyline) var(--ic-space-1px);\n overflow: hidden;\n box-sizing: border-box;\n max-width: var(--column-max-width);\n min-width: var(--column-min-width);\n}\n\n.table-cell.with-overflow {\n overflow: visible;\n}\n\n.data-type-string,\n.data-type-address {\n text-align: left;\n}\n\n.data-type-number,\n.data-type-date {\n text-align: right;\n justify-content: end;\n}\n\n.cell-vertical-align-top {\n vertical-align: top;\n align-items: flex-start;\n}\n\n.cell-vertical-align-middle {\n vertical-align: middle;\n align-items: center;\n}\n\n.cell-vertical-align-bottom {\n vertical-align: bottom;\n align-items: flex-end;\n}\n\n.cell-emphasis-low ic-typography {\n --ic-typography-color: var(--ic-data-table-text-low-emphasis);\n}\n\n.cell-emphasis-high ic-typography {\n --ic-typography-color: var(--ic-data-table-text-high-emphasis);\n\n font-weight: var(--ic-font-weight-bold);\n}\n\n.pagination-container {\n background-color: var(--ic-data-table-pagination-bar-background-color);\n border-top: var(--ic-space-1px) solid\n var(--ic-data-table-pagination-bar-keyline);\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-space-1px) solid var(--ic-data-table-header-keyline);\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 z-index: calc(var(--ic-z-index-popover) - 1);\n background-color: var(--ic-data-table-overlay-background);\n border: var(--ic-space-1px) solid var(--ic-data-table-overlay-border);\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 .icon > svg,\n.column-header ::slotted(svg) {\n fill: var(--ic-data-table-icon);\n}\n\n.table-cell .icon > svg,\n.table-cell ::slotted(svg),\n.cell-description-icon > svg {\n fill: var(--ic-data-table-icon-default-emphasis);\n}\n\n.cell-emphasis-high .icon > svg,\n.cell-emphasis-high ::slotted(svg) {\n fill: var(--ic-data-table-icon-high-emphasis);\n}\n\n.cell-emphasis-low .icon > svg,\n.cell-emphasis-low ::slotted(svg) {\n fill: var(--ic-data-table-icon-low-emphasis);\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.column-header-alignment-center > .cell-text-wrapper,\n.row-header-alignment-right > ic-typography,\n.row-header-alignment-right > .cell-text-wrapper,\n.cell-alignment-center > ic-typography,\n.cell-alignment-center > .cell-text-wrapper {\n flex: 1;\n}\n\n.checkbox-cell {\n --column-width: var(--ic-space-xxl);\n\n align-content: center;\n border-right: none;\n}\n\n.table-density-dense.checkbox-cell {\n --column-width: 2.5rem;\n}\n\n.checkbox-wrapper {\n display: flex;\n justify-content: center;\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 line-clamp: var(--ic-line-clamp, 0);\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 width: 100%;\n}\n\n.action-element {\n display: flex;\n justify-content: right;\n}\n\n.cell-grid-wrapper {\n display: grid;\n grid-template-columns: auto auto;\n}\n\n.loading-overlay {\n visibility: hidden;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: var(--ic-data-table-loading-indicator-overlay-background);\n z-index: calc(var(--ic-z-index-popover) - 2);\n opacity: 0;\n transition: opacity var(--ic-transition-duration-slow);\n}\n\n.loading-overlay.show {\n visibility: visible;\n opacity: 0.6;\n}\n\n.sr-only {\n position: absolute;\n left: -9999px;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .loading-overlay {\n transition: none;\n }\n}\n\n.cell-text-wrapper {\n overflow: hidden;\n}\n\n.cell-text-wrapper > ic-typography {\n margin-left: 2px;\n}\n\n.cell-text-no-wrap {\n word-wrap: initial;\n}\n\n.cell-container-with-description {\n display: flex;\n flex-direction: row;\n}\n\n.cell-description {\n display: flex;\n flex-direction: row;\n margin-top: var(--ic-space-xxs);\n word-break: break-all;\n}\n\n.cell-description-text {\n color: var(--ic-data-table-cell-data-description);\n}\n\n.cell-description-icon {\n padding-right: var(--ic-space-xs);\n}\n\n.cell-description-icon > svg {\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n display: flex;\n}\n\n@media (min-width: 577px) {\n .column-header-inner-container {\n display: flex;\n align-items: center;\n }\n}\n\n@media (max-width: 577px) {\n .cell-icon {\n flex-wrap: wrap;\n }\n\n .cell-description-icon {\n padding-right: 0;\n }\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .icon,\n ::slotted(svg),\n .cell-description-icon > svg {\n fill: currentcolor;\n }\n\n .sort-button svg {\n color: currentcolor;\n }\n\n .table-row-selected {\n background-color: Highlight !important;\n }\n}\n","/* eslint-disable react/jsx-no-bind */\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 Host,\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 IcDataTableDataType,\n IcDataTableColumnDataTypes,\n IcDataTableColumnObject,\n IcDataTableColumnWidthTypes,\n IcDataTableDensityOptions,\n IcDataTableRowHeights,\n IcDataTableSortOrderOptions,\n IcDataTableTruncationTypes,\n IcDensityUpdateEventDetail,\n IcSortEventDetail,\n IcLoadingOptions,\n} from \"./ic-data-table.types\";\nimport { IcPaginationBarOptions, IcThemeMode } from \"../../utils/types\";\n// Unable to import helper functions via @ukic/web-components\nimport {\n isEmptyString,\n isSlotUsed,\n pxToRem,\n addDataToPosition,\n dynamicDebounce,\n getSlotElements,\n checkResizeObserver,\n deviceSizeMatches,\n} from \"../../utils/helpers\";\nimport { IC_DEVICE_SIZES } from \"../../utils/constants\";\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 = true;\n private loadingIndicator?: HTMLIcLoadingIndicatorElement;\n private loadingOverlay?: HTMLDivElement;\n private timerStarted: number;\n private resizeObserver: ResizeObserver | null = 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 columnsUpdated = false;\n private tableSorted: boolean;\n private rowHeightSet = false;\n private initialLoad = false;\n private icPageChangeEvent = false;\n private itemsPerPageChange = false;\n private DATA_ROW_HEIGHT_STRING = \"data-row-height\";\n private ROW_HEIGHT_CSS_VARIABLE = \"--row-height\";\n private LINE_CLAMP_CSS_VARIABLE = \"--ic-line-clamp\";\n private previousItemsPerPage: number;\n private DEFAULT_LINE_HEIGHT = 24;\n private densityUpdate = false;\n private previousPaginationPage: number;\n private truncationPatternUpdated: boolean = false;\n private isNewDebounceDelaySet = false;\n private headerResizeObserver: ResizeObserver | null = null;\n private prevTableContainerWidth: number;\n private IC_TOOLTIP_STRING = \"ic-tooltip\";\n private SHOW_TRUNC_TOOLTIP_STRING = \"show-trunc-tooltip\";\n private CELL_DESCRIPTION_STRING = \".cell-description\";\n private CELL_CONTAINER_WITH_DESCRIPTION_STRING =\n \"cell-container-with-description\";\n private CELL_TEXT_WRAPPER_STRING = \".cell-text-wrapper\";\n private IC_TYPOGRAPHY_STRING = \"ic-typography\";\n private organisedData?: IcDataTableDataType[];\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() selectedRows: IcDataTableDataType[] = [];\n\n @State() sortedColumn: string;\n\n @State() sortedColumnOrder: IcDataTableSortOrderOptions;\n\n @State() toRow: number;\n\n @State() currentRowHeight: number;\n\n @State() debounceDelay = 0;\n\n /**\n * The title for the table only visible to screen readers.\n */\n @Prop() caption!: string;\n\n /**\n * Determines whether the column header should be truncated and display a tooltip. Default is `false`.\n */\n @Prop() columnHeaderTruncation: boolean = false;\n\n @Watch(\"columnHeaderTruncation\")\n headerTruncationChangeHandler(): void {\n if (this.columnHeaderTruncation) {\n this.prevTableContainerWidth = 0;\n } else {\n this.el.shadowRoot\n ?.querySelectorAll(\"th.column-header\")\n ?.forEach((header) => {\n header\n .querySelector(this.IC_TOOLTIP_STRING)\n ?.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);\n });\n }\n }\n\n /**\n * The column headers for the table.\n */\n @Prop() columns!: IcDataTableColumnObject[];\n @Watch(\"columns\")\n columnsChangeHandler(): void {\n this.columnsUpdated = true;\n }\n\n /**\n * The row content for the table.\n */\n @Prop() data?: IcDataTableDataType[];\n\n /**\n * If `true`, the built in sort functionality will be disabled. For example, if rows will already be sorted from an external source.\n */\n @Prop() disableAutoSort?: boolean = false;\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 * Sets the table height. Can be set to `auto` or a specific value in `px`, `rem`, or `%`.\n */\n @Prop() height?: string;\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 description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n monochrome?: boolean;\n overlay?: boolean;\n };\n\n /**\n * Sets the maximum width of the data table. Can be set in `px`, `rem`, or `%`.\n */\n @Prop() maxWidth?: string;\n\n /**\n * Sets the minimum width of the data table. Can be set in `px`, `rem`, or `%`.\n */\n @Prop() minWidth?: string;\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 alignment: \"right\",\n hideAllFromItemsPerPage: false,\n hideRangeLabel: false,\n itemLabel: \"Item\",\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n monochrome: false,\n pageLabel: \"Page\",\n rangeLabelType: \"page\",\n selectedItemsPerPage: 10,\n selectItemsPerPageOnEnter: true,\n setToFirstPageOnPaginationChange: false,\n showGoToPageControl: true,\n showItemsPerPageControl: true,\n type: \"simple\",\n };\n\n /**\n * If `true`, a checkbox column will be displayed to the left of the table which allows multiple rows to be selected.\n */\n @Prop() rowSelection: boolean = false;\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 layout of the table\n */\n @Prop() tableLayout?: \"fixed\" | \"auto\" = \"fixed\";\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * Sets the method used to truncate long text in cells where textWrap is `false`. 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 description?: string;\n max?: number;\n min?: number;\n progress?: number;\n monochrome?: boolean;\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 * Sets the table width. Can be set to `auto` or a specific value in `px`, `rem`, or `%`.\n */\n @Prop() width?: string;\n\n /**\n * Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table.\n */\n @Event() icRowHeightChange: EventEmitter<void>;\n\n /**\n * Emitted when all rows are selected or deselected in the data table via the \"select all\" checkbox.\n */\n @Event() icSelectAllRows: EventEmitter<IcDataTableDataType[]>;\n\n /**\n * Emitted when the selected row changes in the data table.\n */\n @Event() icSelectedRowChange: EventEmitter<{\n row: IcDataTableDataType | null;\n selectedRows: IcDataTableDataType[];\n }>;\n\n /**\n * Emitted when the columns have finished loading after being updated or initially rendered.\n */\n @Event() icColumnsLoaded: EventEmitter<void>;\n\n /**\n * Emitted when the data has finished loading after being updated or initially rendered.\n */\n @Event() icDataLoaded: EventEmitter<void>;\n\n /**\n * Emitted when a column sort button is clicked.\n */\n @Event() icSortChange: EventEmitter<IcSortEventDetail>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n this.headerResizeObserver?.disconnect();\n window.removeEventListener(\"resize\", this.handleResize);\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 };\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 =\n this.el.shadowRoot?.querySelector(\".table-container\");\n\n checkResizeObserver(this.runHeaderResizeObserver);\n\n if (this.dataUpdated) {\n this.dataUpdated = false;\n }\n\n if (\n tableElement &&\n tableContainer &&\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 const cellContainer = this.getCellContainer(typographyEl);\n if (\n cellContainer &&\n !cellContainer.classList.contains(this.TEXT_WRAP_STRING)\n ) {\n this.dataTruncation(typographyEl, cellContainer);\n this.resizeObserver = new ResizeObserver(\n // This gets triggered twice due to updated data and see more/see less button\n dynamicDebounce(\n () => {\n this.dataTruncation(typographyEl, cellContainer);\n\n if (!this.isNewDebounceDelaySet) {\n this.debounceDelay = 200;\n this.isNewDebounceDelaySet = true;\n }\n },\n () => this.debounceDelay\n ) as ResizeObserverCallback\n );\n\n this.resizeObserver.observe(typographyEl);\n }\n }\n );\n }\n\n if (this.globalRowHeight !== \"auto\") {\n this.updateSetRowHeight();\n }\n window.addEventListener(\"resize\", this.handleResize);\n\n this.icColumnsLoaded.emit();\n if (this.data && !this.loading && !this.updating) this.icDataLoaded.emit();\n }\n\n componentDidUpdate(): void {\n // truncation updates invoked here once new/updated data has\n // rendered to take into account updated .cell-container/ic-typography box model updates.\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING ||\n this.truncationPattern === this.TOOLTIP_STRING\n ) {\n if (this.dataUpdated) {\n this.truncateUpdatedData();\n }\n if (this.tableSorted) {\n this.truncateTableSorted();\n }\n if (this.rowHeightSet) {\n this.truncateRowHeightSet();\n }\n if (this.itemsPerPageChange) {\n this.truncateItemsPerPageChange();\n }\n if (!this.initialLoad && this.icPageChangeEvent) {\n this.truncatePageChange();\n }\n if (this.densityUpdate) {\n this.truncateDensityUpdate();\n }\n if (this.truncationPatternUpdated) {\n this.truncatePatternUpdated();\n }\n }\n\n if (this.columnsUpdated) {\n this.icColumnsLoaded.emit();\n this.columnsUpdated = false;\n }\n\n if (this.dataUpdated && !this.loading && !this.updating) {\n this.icDataLoaded.emit();\n this.dataUpdated = false;\n }\n }\n\n componentDidRender(): void {\n this.fixCellTooltips();\n this.fixCellOverflow();\n this.updateCellHeightsWithDescriptions();\n this.adjustWidthForActionElement();\n }\n\n private runHeaderResizeObserver = () => {\n this.headerResizeObserver = new ResizeObserver(() => {\n this.headerResizeCallback();\n });\n this.headerResizeObserver.observe(this.el);\n };\n\n private headerResizeCallback = () => {\n if (!this.hideColumnHeaders && this.columnHeaderTruncation) {\n const tableContainerWidth =\n this.el.shadowRoot?.querySelector(\".table-container\")?.clientWidth;\n if (\n tableContainerWidth &&\n tableContainerWidth !== this.prevTableContainerWidth\n ) {\n this.el.shadowRoot\n ?.querySelectorAll(\"th.column-header\")\n .forEach((header) => {\n const tooltip = header.querySelector(this.IC_TOOLTIP_STRING);\n const typographyEls = header.querySelectorAll(\n this.IC_TYPOGRAPHY_STRING\n );\n if (tooltip && typographyEls && typographyEls.length === 2) {\n tooltip.classList.remove(this.SHOW_TRUNC_TOOLTIP_STRING);\n if (typographyEls[1].clientWidth > typographyEls[0].clientWidth) {\n tooltip.classList.add(this.SHOW_TRUNC_TOOLTIP_STRING);\n }\n }\n });\n this.prevTableContainerWidth = tableContainerWidth;\n }\n }\n };\n\n private handleResize = () => {\n this.updateCellHeightsWithDescriptions();\n this.fixCellOverflow();\n };\n\n private getRowHeight = (cellContainer: HTMLElement) =>\n parseInt(getComputedStyle(document.documentElement).fontSize) *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING) || \"\");\n\n private truncateUpdatedData = () => {\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n if (cellContainer) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n if (\n truncWrapper &&\n cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >=\n truncWrapper.scrollHeight\n ) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\n return;\n }\n setTimeout(() => {\n // slight delay due to data rendering\n this.addShowHideTruncationIfNeeded(typographyEl, cellContainer);\n }, 150);\n }\n });\n }\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.dataUpdated = false;\n };\n\n private truncateTableSorted = () => {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (cellContainer) {\n if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {\n this.createShowHideTruncation(typographyEl, cellContainer);\n } else {\n typographyEl.resetTruncation().then(() => {\n cellContainer.removeAttribute(\"style\");\n });\n }\n }\n });\n }\n\n this.tableSorted = false;\n };\n\n private truncateRowHeightSet = () => {\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\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (cellContainer) {\n if (this.globalRowHeight === \"auto\") {\n cellContainer.style.height = \"\";\n cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);\n cellContainer.removeAttribute(this.DATA_ROW_HEIGHT_STRING);\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.removeTooltip(cellContainer, typographyEl, tooltipEl);\n typographyEl.setAttribute(\n \"style\",\n `${this.LINE_CLAMP_CSS_VARIABLE}: 0`\n );\n } else if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\n }\n\n return;\n }\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.classList.contains(\n this.CELL_CONTAINER_WITH_DESCRIPTION_STRING\n ) &&\n !cellContainer.style.height &&\n this.getRowHeight(cellContainer) > cellContainer.clientHeight &&\n !cellContainer.classList.contains(this.TEXT_WRAP_STRING)\n ) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\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\n if (\n this.getShowHideButton(typographyEl) &&\n truncWrapper &&\n truncWrapper.scrollHeight <= cellContainer.clientHeight\n ) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\n return;\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 private truncateItemsPerPageChange = () => {\n // Only run truncation on the new rows\n // when the number of items per page has increased\n const allRows = this.el.shadowRoot?.querySelectorAll(\".table-row\");\n\n if (allRows && this.rowsPerPage > this.previousItemsPerPage) {\n const newRows = Array.from(allRows).slice(this.previousItemsPerPage);\n\n newRows.forEach((row) => {\n row.querySelectorAll(\"ic-typography\").forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (cellContainer)\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n });\n }\n\n this.previousItemsPerPage = this.rowsPerPage;\n this.itemsPerPageChange = false;\n };\n\n private truncatePageChange = () => {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n // set truncation to see more if opened and next/previous page is pressed\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer &&\n this.typographyScrollHeightExceedsContainerHeight(\n typographyEl,\n cellContainer\n ) &&\n !this.getShowHideButton(typographyEl)\n ) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n });\n }\n\n this.icPageChangeEvent = false;\n };\n\n private truncateDensityUpdate = () => {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (cellContainer) this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n\n this.densityUpdate = false;\n };\n\n private typographyScrollHeightExceedsContainerHeight = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) => cellContainer && typographyEl.scrollHeight > cellContainer.clientHeight;\n\n private cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n return (\n truncWrapper &&\n cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper.scrollHeight\n );\n };\n\n private truncatePatternUpdated = () => {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (\n cellContainer &&\n this.typographyScrollHeightExceedsContainerHeight(\n typographyEl,\n cellContainer\n )\n ) {\n this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);\n }\n });\n } else if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (cellContainer) {\n if (\n this.cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight(\n typographyEl,\n cellContainer\n )\n ) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\n return;\n }\n this.addShowHideTruncationIfNeeded(typographyEl, cellContainer);\n }\n });\n }\n };\n\n private updateSetRowHeight = (typographyEl?: HTMLIcTypographyElement) => {\n const removeRowHeightVariable = (element: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(element);\n\n if (\n cellContainer &&\n element.scrollHeight > this.getRowHeight(cellContainer)\n ) {\n cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);\n }\n };\n\n if (typographyEl) {\n removeRowHeightVariable(typographyEl);\n } else {\n this.getTypographyElements().forEach((typographyEl) => {\n removeRowHeightVariable(typographyEl);\n });\n }\n };\n\n private createShowHideTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n descriptionHeight = 0\n ) {\n typographyEl.checkMaxLines(typographyEl.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${this.getLines(cellContainer.clientHeight - descriptionHeight)}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);\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 | null\n ) => {\n if (\n this.typographyScrollHeightExceedsContainerHeight(\n typographyEl,\n cellContainer\n )\n ) {\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(\n \"style\",\n `${this.LINE_CLAMP_CSS_VARIABLE}: 0`\n );\n\n cellContainer\n .querySelector(this.CELL_TEXT_WRAPPER_STRING)\n ?.prepend(typographyEl);\n tooltip.remove();\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n !isEmptyString(typographyEl?.getAttribute(\"max-lines\"))\n ) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\n }\n }\n };\n\n private addTooltipTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement | null\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n\n if (!tooltip) {\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private addShowHideTruncationIfNeeded = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ): boolean => {\n if (\n this.typographyScrollHeightExceedsContainerHeight(\n typographyEl,\n cellContainer\n )\n ) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n return true;\n }\n return false;\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 = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) => {\n // Tooltip truncation mentioned in AC. Will need revisiting\n const tooltip = this.getTooltip(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 this.getShowHideButton(typographyEl)\n ) {\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 const truncWrapper = this.getTruncWrapper(typographyEl);\n if (\n truncWrapper &&\n this.getLines(truncWrapper.scrollHeight) ===\n Number(typographyEl.getAttribute(\"max-lines\"))\n ) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\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 // cellContainer.clientHeight - 24 removes the extra line by see more/see less\n if (\n this.cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight(\n typographyEl,\n cellContainer\n )\n ) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\n return;\n }\n\n if (this.addShowHideTruncationIfNeeded(typographyEl, cellContainer)) {\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 typographyEl.shadowRoot?.querySelector(\".trunc-wrapper\");\n\n private getShowHideButton = (typographyEl: HTMLIcTypographyElement) =>\n typographyEl.shadowRoot?.querySelector(\"button\");\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 }>): void {\n const { expanded, typographyEl } = detail;\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer?.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&\n expanded\n ) {\n cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, \"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 (tableRowsContainer) {\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 this.selectedRows = [];\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 @Watch(\"loading\")\n loadingHandler(): void {\n if (this.loading) {\n this.startLoadingTimer();\n setTimeout(() => {\n this.showLoadingIndicator();\n }, 500);\n }\n }\n\n @Watch(\"truncationPattern\")\n truncationPatternHandler(): void {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.resetAllShowHideTruncation();\n this.updateTruncationTooltip(true);\n\n // Not using debounceDataTruncation here due to resizeObserver not being triggered\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltip = this.getTooltip(typographyEl);\n\n if (cellContainer) this.truncate(typographyEl, cellContainer, tooltip);\n });\n } else if (this.truncationPattern === this.SHOW_HIDE_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.updateTruncationTooltip(true);\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (cellContainer) {\n if (\n this.cellContainerMinusLineHeightIsGreaterThanTruncWrapperScrollHeight(\n typographyEl,\n cellContainer\n )\n ) {\n this.resetSingleShowHideTruncation(typographyEl, cellContainer);\n return;\n }\n setTimeout(() => {\n // slight delay due to data rendering\n this.addShowHideTruncationIfNeeded(typographyEl, cellContainer);\n }, 150);\n }\n });\n }\n\n this.truncationPatternUpdated = true;\n }\n\n @Watch(\"data\")\n async dataHandler(): Promise<void> {\n this.loadingOptions = {\n ...this.loadingOptions,\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(): Promise<void> {\n this.densityUpdate = true;\n }\n\n private removeTextWrap = (): void => {\n this.getTypographyElements().forEach((typographyEl) => {\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 private getCellContainer = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLElement | null => typographyEl.closest(\".cell-container\");\n\n private deleteTextWrapDataKey = (\n array?: IcDataTableColumnObject[] | IcDataTableDataType[]\n ) =>\n Array.isArray(array) &&\n array.forEach((val) => val.textWrap && delete val.textWrap);\n\n private resetSingleShowHideTruncation = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n\n if (!(cellContainer && truncWrapper)) return;\n\n if (\n truncWrapper.scrollHeight > cellContainer.clientHeight &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\")) &&\n Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT) !==\n Number(typographyEl.getAttribute(\"max-lines\"))\n ) {\n typographyEl.checkMaxLines(truncWrapper.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.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);\n } else if (\n !cellContainer.classList.contains(\n this.CELL_CONTAINER_WITH_DESCRIPTION_STRING\n )\n ) {\n typographyEl.resetTruncation().then(() => {\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n });\n }\n };\n\n private resetAllShowHideTruncation = () => {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n typographyEl.resetTruncation().then(() => {\n if (cellContainer && !typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\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 = undefined;\n }\n\n private showLoadingIndicator() {\n if (this.loadingOptions?.overlay) {\n this.loadingOverlay?.classList.add(\"show\");\n }\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 = 0;\n }, this.minimumLoadingDisplayDuration);\n };\n\n private isObject = (value: any) =>\n value !== undefined && value !== null && 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 { description, max, min, progress, monochrome } =\n this.updatingOptions || {};\n const visibleColumnCount = this.columns.filter(\n (col) => col.hidden !== true\n ).length;\n return (\n <th\n colSpan={visibleColumnCount + (this.rowSelection && this.data ? 1 : 0)}\n class=\"updating-state\"\n >\n <ic-loading-indicator\n theme={this.theme}\n monochrome={monochrome}\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 pxToRem(\n `${\n height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -\n this.DENSITY_PADDING_HEIGHT_DIFF[this.density]\n }px`\n );\n\n private setTruncationClass = () =>\n this.truncationPattern\n ? { [`truncation-${this.truncationPattern}`]: true }\n : {};\n\n private getColumnWidth = (\n columnWidth?: string | IcDataTableColumnWidthTypes\n ) => {\n // TODO: Setting max width on columns\n let columnWidthStyling = {};\n\n if (typeof columnWidth === \"string\") {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-width\"]: columnWidth,\n };\n } else if (columnWidth && Object.keys(columnWidth).length > 0) {\n if (columnWidth.minWidth) {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-min-width\"]: columnWidth.minWidth,\n };\n }\n\n if (columnWidth.maxWidth) {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-max-width\"]: columnWidth.maxWidth,\n };\n }\n }\n\n return columnWidthStyling;\n };\n\n private getCalculatedRowHeight = (\n columnProps: IcDataTableColumnObject,\n rowTextWrap: boolean,\n cell: any,\n currentRowHeight?: number\n ) => {\n if (\n (this.truncationPattern || currentRowHeight) &&\n !columnProps?.textWrap &&\n !rowTextWrap &&\n !this.getCellOptions(cell, \"textWrap\") &&\n columnProps?.dataType !== \"element\"\n ) {\n return {\n [this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight!),\n };\n }\n\n return {};\n };\n\n private getSlottedActionElement = (\n actionElement: HTMLElement\n ): Element | null => {\n const slotName = actionElement.getAttribute(\"name\");\n return this.el.querySelector(`[slot=\"${slotName}\"]`);\n };\n\n private adjustWidthForActionElement = () => {\n const elements = this.el.shadowRoot?.querySelectorAll(\".action-element\");\n elements?.forEach((actionElementSpan) => {\n const actionElement = actionElementSpan.firstChild as HTMLElement;\n const slottedActionElement = this.getSlottedActionElement(actionElement);\n const width = slottedActionElement?.getBoundingClientRect().width ?? 0;\n const gridWrapper =\n actionElementSpan.closest<HTMLElement>(\".cell-grid-wrapper\");\n if (gridWrapper) {\n gridWrapper.style.gridTemplateColumns = `auto calc(${width}px + var(--ic-space-xs))`;\n }\n });\n };\n\n private createCellContent = (\n columnProps: IcDataTableColumnObject,\n cell: any,\n cellSlotName: string,\n rowOptions: any,\n hasIcon: boolean,\n cellValue: (key: string) => any,\n rowEmphasis: string,\n currentRowHeight?: number\n ): HTMLElement => (\n <div\n innerHTML={\n columnProps?.dataType === \"element\" &&\n !isSlotUsed(this.el, cellSlotName)\n ? (cell as string)\n : undefined\n }\n class={{\n \"cell-container\": columnProps?.dataType !== \"element\",\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 [`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 ...this.setTruncationClass(),\n [this.CELL_CONTAINER_WITH_DESCRIPTION_STRING]:\n this.isObject(cell) && Object.keys(cell).includes(\"description\"),\n }}\n style={{\n ...this.getCalculatedRowHeight(\n columnProps,\n rowOptions?.textWrap,\n cell,\n currentRowHeight\n ),\n ...this.getColumnWidth(columnProps?.columnWidth),\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 (cellValue(\"icon\") || columnProps?.icon?.icon) && (\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 <div\n class={{\n \"cell-text-wrapper\": true,\n \"cell-text-no-wrap\": !this.truncationPattern,\n }}\n >\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) && columnProps?.dataType !== \"date\" ? (\n Object.keys(cell).includes(\"href\") ? (\n <ic-link\n href={cellValue(\"href\")}\n theme={this.theme}\n target={cellValue(\"target\") || undefined}\n rel={cellValue(\"rel\") || undefined}\n >\n {cellValue(\"data\")}\n </ic-link>\n ) : (\n cellValue(\"data\")\n )\n ) : (\n this.getCellContent(cell, columnProps?.dataType)\n )}\n </ic-typography>\n {this.isObject(cell) &&\n Object.keys(cell).includes(\"description\") && (\n <div\n class={{\n [\"cell-description\"]: true,\n [`data-type-${columnProps?.dataType}`]: true,\n }}\n >\n {cellValue(\"description\")?.icon && (\n <span\n class=\"cell-description-icon\"\n innerHTML={cellValue(\"description\").icon}\n ></span>\n )}\n <ic-typography\n variant=\"caption\"\n class=\"cell-description-text\"\n >\n {cellValue(\"description\")?.data ??\n cellValue(\"description\")}\n </ic-typography>\n </div>\n )}\n </div>\n )}\n </Fragment>\n )}\n </div>\n );\n\n private createCells = (row: IcDataTableDataType, rowIndex: number) => {\n const rowKeys = Object.keys(row);\n const rowOptions = this.getObjectValue(row, \"rowOptions\");\n let rowAlignment: string;\n let rowEmphasis: string;\n\n const rowHeader = this.getObjectValue(row, \"header\");\n if (rowHeader) {\n rowAlignment = this.getObjectValue(rowHeader, \"rowAlignment\");\n rowEmphasis = this.getObjectValue(rowHeader, \"emphasis\");\n }\n\n const variableRowHeightVal = this.variableRowHeight?.({\n ...row,\n index: rowIndex,\n });\n\n const currentRowHeight = variableRowHeightVal\n ? variableRowHeightVal !== \"auto\" && variableRowHeightVal\n : this.globalRowHeight !== \"auto\" && this.globalRowHeight;\n\n return this.columns.map((column, index) => {\n if (column.hidden !== true) {\n const cell = this.getObjectValue(row, column[\"key\"]);\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 const cellSlotName = `${column?.key}-${rowIndex}`;\n\n const CellContent = this.createCellContent(\n column,\n cell,\n cellSlotName,\n rowOptions,\n this.isObject(cell) && Object.keys(cell).includes(\"icon\"),\n cellValue,\n rowEmphasis,\n currentRowHeight || undefined\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 [\"with-overflow\"]: column?.dataType === \"element\",\n [`cell-vertical-align-${\n column?.columnAlignment?.vertical ||\n rowOptions?.rowAlignment?.vertical ||\n rowAlignment ||\n this.getCellAlignment(cell, \"vertical\")\n }`]:\n !!column?.columnAlignment?.vertical ||\n !!rowOptions?.rowAlignment?.vertical ||\n !!rowAlignment ||\n !!this.getCellAlignment(cell, \"vertical\"),\n }}\n style={{ ...this.getColumnWidth(column.columnWidth) }}\n >\n {isSlotUsed(this.el, `${cellSlotName}-action-element`) ? (\n <div class=\"cell-grid-wrapper\">\n {CellContent}\n <span class=\"action-element\">\n <slot name={`${cellSlotName}-action-element`} />\n </span>\n </div>\n ) : (\n CellContent\n )}\n </td>\n );\n }\n }\n });\n };\n\n private createColumnHeaders = () =>\n (this.columns || []).map(\n (\n {\n cellAlignment,\n colspan,\n icon,\n key,\n title,\n columnWidth,\n excludeColumnFromSort,\n hidden,\n },\n index\n ) =>\n hidden !== true && (\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 style={{ ...this.getColumnWidth(columnWidth) }}\n colSpan={colspan}\n >\n <div\n class={{\n \"column-header-inner-container\": true,\n \"truncation-tooltip\": this.columnHeaderTruncation,\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 {this.columnHeaderTruncation ? (\n <ic-tooltip label={title} target={`column-header-${index}`}>\n <ic-typography\n id={`column-header-${index}`}\n variant=\"body\"\n class={{\n [\"column-header-text\"]: true,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n </ic-tooltip>\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 )}\n {this.sortable && !excludeColumnFromSort && (\n <ic-button\n variant=\"icon-tertiary\"\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 {this.columnHeaderTruncation && (\n <ic-typography\n variant=\"body\"\n aria-hidden=\"true\"\n class={{\n [\"column-header-text\"]: true,\n [\"dummy-column-header-text\"]: this.columnHeaderTruncation,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n )}\n </th>\n )\n );\n\n private onRowClick = (row: IcDataTableDataType) => {\n const notCurrentlySelected = !this.selectedRows.includes(row);\n\n this.selectedRows = notCurrentlySelected\n ? [...this.selectedRows, row]\n : this.selectedRows.filter((selectedRow) => selectedRow !== row);\n\n this.icSelectedRowChange.emit({\n row: notCurrentlySelected ? row : null,\n selectedRows: this.selectedRows,\n });\n };\n\n private selectAllRows = () => {\n this.selectedRows =\n this.organisedData &&\n this.selectedRows.length !== this.organisedData.length\n ? [...this.organisedData]\n : [];\n this.icSelectAllRows.emit(this.selectedRows);\n };\n\n private createRows = () => {\n const data = this.showPagination\n ? this.data?.slice(this.fromRow, this.toRow)\n : this.data?.slice();\n\n const paginationOffset = this.showPagination ? this.fromRow : 0;\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 * `addDataToPosition` used to add the element in the correct column order.\n * Adding empty string value in to give `createCells` something to loop over.\n */\n this.organisedData = data?.map((row, rowIndex) => {\n const slottedColumns = this.columns\n .map(\n ({ key }, index) =>\n isSlotUsed(this.el, `${key}-${rowIndex + paginationOffset}`) && {\n key,\n index,\n }\n )\n .filter(\n (col) =>\n !!col &&\n // skip the column if its already in the row\n !Object.prototype.hasOwnProperty.call(row, col.key)\n ) as { key: string; index: number }[];\n return slottedColumns.length > 0\n ? addDataToPosition(row, slottedColumns, \"\")\n : row;\n });\n\n return this.organisedData\n ?.sort(\n this.sortable &&\n !this.disableAutoSort &&\n this.sortedColumn &&\n !this.columns.find((col) => col.key === this.sortedColumn)\n ?.disableAutoSort\n ? this.getSortFunction()\n : undefined\n )\n .map((row, index) => {\n const isRowSelected =\n this.rowSelection && this.selectedRows.includes(row);\n const cellIndex = index + paginationOffset;\n\n return (\n <tr\n class={{\n \"table-row\": true,\n \"table-row-selected\": isRowSelected,\n }}\n >\n {this.rowSelection && (\n <td\n class={{\n \"table-cell\": true,\n \"checkbox-cell\": true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n <div class=\"checkbox-wrapper\">\n <ic-checkbox\n class=\"ic-data-table-checkbox\"\n checked={isRowSelected}\n disabled={this.updating || this.loading}\n hideLabel\n label={`${\n isRowSelected ? \"Deselect\" : \"Select\"\n } row ${cellIndex}`}\n onIcCheck={() => this.onRowClick(row)}\n size={this.density === \"dense\" ? \"small\" : \"medium\"}\n value={cellIndex}\n ></ic-checkbox>\n </div>\n </td>\n )}\n {this.createCells(row, cellIndex)}\n </tr>\n );\n });\n };\n\n private getObjectValue = (cell: object, key: string) =>\n Object.values(cell)[Object.keys(cell).indexOf(key)];\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 sortOrders = this.sortOptions.sortOrders;\n\n if (column !== this.sortedColumn) {\n if (this.sortedColumn) {\n this.el.shadowRoot\n ?.querySelector(`#sort-button-${this.sortedColumn}`)\n ?.setAttribute(\"aria-label\", this.getSortButtonLabel(column)); // 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 this.el.shadowRoot\n ?.querySelector(`#sort-button-${column}`)\n ?.setAttribute(\"aria-label\", this.getSortButtonLabel(column));\n\n this.tableSorted = true;\n\n this.icSortChange.emit({\n columnName: column,\n sorted: this.sortedColumnOrder,\n });\n };\n\n /** Gets all `ic-typography`elements within the data table, excluding column headers and cell descriptions */\n private getTypographyElements = (): HTMLIcTypographyElement[] =>\n Array.from(\n this.el.shadowRoot?.querySelectorAll(\n \"ic-typography:not(.column-header-text,.cell-description-text)\"\n ) || []\n );\n\n private getTooltip = (typographyEl: HTMLIcTypographyElement) =>\n typographyEl.closest<HTMLIcTooltipElement>(this.TOOLTIP);\n\n private updateTruncationTooltip = (removeTooltipOnly = false) => {\n this.getTypographyElements().forEach((typographyEl) => {\n const tooltip = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (cellContainer) {\n if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n typographyEl.setAttribute(\n \"style\",\n `${this.LINE_CLAMP_CSS_VARIABLE}: 0`\n );\n return;\n }\n\n this.regenerateTooltip(\n cellContainer,\n typographyEl,\n tooltip,\n removeTooltipOnly\n );\n }\n });\n };\n\n private updateScrollOffset = () => {\n const tableRowContainer = this.el.shadowRoot?.querySelector(\n \".table-row-container\"\n );\n if (tableRowContainer) this.scrollOffset = tableRowContainer.scrollTop;\n };\n\n private updateRowHeightForDescriptions = (\n rowHeight: number,\n cellContainer: Element\n ) => {\n cellContainer.setAttribute(\n this.DATA_ROW_HEIGHT_STRING,\n rowHeight.toString()\n );\n cellContainer.setAttribute(\n \"style\",\n `${this.ROW_HEIGHT_CSS_VARIABLE}: ${rowHeight}px`\n );\n };\n\n private getDescriptionHeight = (description: Element) => {\n const descriptionMarginTop = window\n .getComputedStyle(description)\n .getPropertyValue(\"margin-top\");\n return description.clientHeight + parseInt(descriptionMarginTop, 10);\n };\n\n /** Method to update the row heights on cells with descriptions and tooltip truncation */\n private updateCellHeightsWithDescriptions = () => {\n const isXSDevice = deviceSizeMatches(IC_DEVICE_SIZES.XS);\n this.el.shadowRoot\n ?.querySelectorAll(this.CELL_DESCRIPTION_STRING)\n ?.forEach((description) => {\n const cellContainer = description.closest<HTMLElement>(\n `.${this.CELL_CONTAINER_WITH_DESCRIPTION_STRING}`\n );\n const typography =\n cellContainer?.querySelector<HTMLIcTypographyElement>(\n this.IC_TYPOGRAPHY_STRING\n );\n\n if (\n typography &&\n cellContainer &&\n this.globalRowHeight &&\n this.globalRowHeight !== \"auto\"\n ) {\n const descriptionHeight = this.getDescriptionHeight(description);\n const descriptionHeightPlusLineHeight =\n descriptionHeight + this.DEFAULT_LINE_HEIGHT;\n if (\n !typography.textContent &&\n descriptionHeightPlusLineHeight > this.globalRowHeight\n ) {\n this.updateRowHeightForDescriptions(\n descriptionHeight,\n cellContainer\n );\n } else if (this.truncationPattern === this.TOOLTIP_STRING) {\n if (descriptionHeightPlusLineHeight > this.globalRowHeight) {\n const cellIcon = cellContainer.querySelector(\".icon\");\n let rowHeight = descriptionHeightPlusLineHeight;\n if (cellIcon && isXSDevice) {\n // recalculate descriptionHeight as when a word break occurs this value changes\n // Additional spacing given for 300-400% zoom\n rowHeight += cellIcon.clientHeight;\n }\n this.updateRowHeightForDescriptions(rowHeight, cellContainer);\n }\n this.addLineClampCSS(typography, cellContainer);\n // Additional case for show/hide truncation for when a description is present, but the text\n // isn't overflowing the cell to trigger the show more button to appear.\n } else if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n descriptionHeightPlusLineHeight > this.globalRowHeight &&\n typography.style.getPropertyValue(\"--truncation-max-lines\") !==\n \"initial\"\n ) {\n this.updateRowHeightForDescriptions(\n descriptionHeightPlusLineHeight,\n cellContainer\n );\n this.createShowHideTruncation(\n typography,\n cellContainer,\n descriptionHeight\n );\n }\n }\n });\n };\n\n private regenerateTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement | null,\n removeTooltipOnly?: boolean\n ) {\n // When sorting the table, instead of regenerating the tooltip,\n // the tooltip details are updated\n\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 if (\n typographyEl?.scrollHeight > cellContainer?.clientHeight &&\n this.truncationPattern === this.TOOLTIP_STRING\n ) {\n if (\n !typographyEl.getAttribute(\"style\") ||\n typographyEl.style.cssText.includes(\n `${this.LINE_CLAMP_CSS_VARIABLE}: 0;`\n )\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n if (!cellContainer.querySelector(this.IC_TOOLTIP_STRING))\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n private setTableDimensions = () => {\n let tableHostDimensions = {};\n\n if (this.width) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-width\"]: this.width,\n };\n }\n\n if (this.height) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-height\"]: this.height,\n };\n }\n\n if (this.maxWidth) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-max-width\"]: this.maxWidth,\n };\n }\n\n if (this.minWidth) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-min-width\"]: this.minWidth,\n };\n }\n\n return tableHostDimensions;\n };\n\n private removeTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement | null\n ) {\n cellContainer\n .querySelector(this.CELL_TEXT_WRAPPER_STRING)\n ?.prepend(typographyEl);\n tooltip?.remove();\n }\n\n private addLineClampCSS(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n const descriptionCellHeight = cellContainer.querySelector(\n this.CELL_DESCRIPTION_STRING\n )?.clientHeight;\n const cellContainerHeight = cellContainer.clientHeight;\n\n let totalHeight = cellContainerHeight;\n if (\n cellContainer.classList.contains(\n this.CELL_CONTAINER_WITH_DESCRIPTION_STRING\n ) &&\n descriptionCellHeight &&\n cellContainerHeight > descriptionCellHeight\n ) {\n const iconHeight =\n (deviceSizeMatches(IC_DEVICE_SIZES.XS) &&\n cellContainer?.querySelector(\".icon\")?.clientHeight) ||\n 0;\n totalHeight = totalHeight - descriptionCellHeight - iconHeight;\n }\n\n typographyEl.setAttribute(\n \"style\",\n `${this.LINE_CLAMP_CSS_VARIABLE}: ${this.getLines(totalHeight || 0)}`\n );\n }\n\n private createTruncationTooltip(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n const tooltipEl = document.createElement(\n this.IC_TOOLTIP_STRING\n ) as HTMLIcTooltipElement;\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\n .querySelector(this.CELL_TEXT_WRAPPER_STRING)\n ?.prepend(tooltipEl);\n tooltipEl.prepend(typographyEl);\n }\n\n private fixCellTooltip = (element: Element) => {\n let tooltip: HTMLIcTooltipElement | null = null;\n const tooltipChildElement =\n element.shadowRoot?.querySelector<HTMLIcTooltipElement>(\n this.IC_TOOLTIP_STRING\n );\n\n if (element.tagName === \"IC-TOOLTIP\") {\n tooltip = element as HTMLIcTooltipElement;\n } else if (tooltipChildElement) {\n tooltip = tooltipChildElement;\n } else if (element.children?.length > 0) {\n Array.from(element.children).forEach((el) => {\n this.fixCellTooltip(el);\n });\n } else {\n return;\n }\n\n tooltip?.setExternalPopperProps({\n strategy: \"fixed\",\n });\n };\n\n private fixCellOverflow = () => {\n this.el.shadowRoot\n ?.querySelectorAll(\".data-type-element\")\n ?.forEach((element) => {\n let children: any = Array.from(element.children);\n if (children.length === 1 && children[0].tagName === \"SLOT\") {\n children = getSlotElements(element);\n }\n children?.forEach((el: any) => {\n if (el.tagName === \"IC-SELECT\") {\n const menu = el.shadowRoot?.querySelector(\"ic-menu\");\n menu?.setExternalPopperProps({\n strategy: \"fixed\",\n });\n (el as HTMLIcSelectElement).style.setProperty(\n \"--input-width\",\n `${element.clientWidth}px`\n );\n } else {\n const popover = el.querySelector(\"ic-popover-menu\");\n popover?.setExternalPopperProps({\n strategy: \"fixed\",\n });\n }\n });\n });\n };\n\n private fixCellTooltips = () => {\n this.el.shadowRoot\n ?.querySelectorAll(\".data-type-element\")\n ?.forEach((element) => {\n const slotElements = getSlotElements(element);\n slotElements?.forEach((slottedEl) => {\n this.fixCellTooltip(slottedEl as Element);\n });\n });\n\n this.el.shadowRoot\n ?.querySelectorAll(\".action-element\")\n ?.forEach((actionElementSpan) => {\n const actionElement = actionElementSpan.firstChild as HTMLElement;\n const slottedActionElement =\n this.getSlottedActionElement(actionElement);\n if (slottedActionElement) {\n this.fixCellTooltip(slottedActionElement as HTMLElement);\n }\n });\n };\n\n private renderTableBody = (\n loading: boolean,\n data?: IcDataTableDataType[],\n overlay?: boolean\n ) => {\n if (!data?.length) return;\n\n if (overlay && loading) {\n return <tbody>{this.createRows()}</tbody>;\n } else if (loading && !overlay) {\n return null;\n } else {\n return <tbody>{this.createRows()}</tbody>;\n }\n };\n\n private renderLoadingIndicator = (\n isLoading: boolean,\n loadingOptions?: IcLoadingOptions\n ) => {\n if (!isLoading) return null;\n\n return (\n <Fragment>\n <div\n class=\"loading-overlay\"\n ref={(el) => (this.loadingOverlay = el)}\n ></div>\n <ic-loading-indicator\n theme={this.theme}\n monochrome={loadingOptions?.monochrome}\n class={{\n \"loading-empty\": isLoading,\n loading: true,\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 </Fragment>\n );\n };\n\n private renderAriaLiveLoading = () => {\n if (this.loading) {\n return this.loadingOptions?.label || \"Loading...\";\n } else if (this.updating) {\n return this.updatingOptions?.description || \"Updating table data\";\n } else {\n return \"\";\n }\n };\n\n private renderEmptyState = (\n loading: boolean,\n data?: IcDataTableDataType[],\n overlay?: boolean\n ) => {\n const emptyStateEl = 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\n if (loading && !data?.length && overlay) {\n return emptyStateEl;\n } else if (!loading && !data?.length) {\n return emptyStateEl;\n } else {\n return null;\n }\n };\n\n render() {\n const {\n caption,\n columns,\n createColumnHeaders,\n createUpdatingIndicator,\n data,\n density,\n hideColumnHeaders,\n rowSelection,\n loading,\n loadingOptions,\n paginationBarOptions,\n rowsPerPage,\n scrollable,\n scrollOffset,\n selectAllRows,\n selectedRows,\n showPagination,\n sortable,\n sortedColumn,\n sortedColumnOrder,\n stickyColumnHeaders,\n updateScrollOffset,\n updating,\n tableLayout,\n theme,\n } = this;\n\n const rowsSelected = selectedRows.length > 0;\n const allRowsSelected =\n selectedRows.length === (showPagination ? rowsPerPage : data?.length);\n\n const headerCheckboxLabelState = rowsSelected\n ? allRowsSelected\n ? \"deselect all\"\n : \"select all remaining\"\n : \"select all\";\n\n return (\n <Host\n style={{ ...this.setTableDimensions() }}\n class={{ [`ic-theme-${theme}`]: theme !== \"inherit\" }}\n >\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 : undefined}\n onScroll={updateScrollOffset}\n >\n <table\n style={{\n \"--table-layout\": tableLayout,\n }}\n >\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>\n {rowSelection && data && (\n <th\n class={{\n \"column-header\": true,\n \"checkbox-cell\": true,\n \"updating-state-headers\": updating && !loading,\n [`table-density-${density}`]:\n this.notDefaultDensity(),\n }}\n >\n <div class=\"checkbox-wrapper\">\n <ic-checkbox\n class=\"ic-data-table-checkbox\"\n checked={rowsSelected && allRowsSelected}\n disabled={updating || loading}\n hideLabel\n indeterminate={rowsSelected && !allRowsSelected}\n label={`${caption} ${headerCheckboxLabelState} rows`}\n nativeIndeterminateBehaviour\n onIcCheck={() => selectAllRows()}\n size={density === \"dense\" ? \"small\" : \"medium\"}\n value={caption}\n ></ic-checkbox>\n </div>\n </th>\n )}\n {createColumnHeaders()}\n </tr>\n </thead>\n )}\n {updating &&\n !loading &&\n (hideColumnHeaders ? (\n <thead>{createUpdatingIndicator()}</thead>\n ) : (\n createUpdatingIndicator()\n ))}\n {this.renderTableBody(loading, data, loadingOptions?.overlay)}\n </table>\n {this.renderEmptyState(loading, data, loadingOptions?.overlay)}\n </div>\n <div aria-live=\"assertive\" class=\"sr-only\">\n {this.renderAriaLiveLoading()}\n </div>\n {this.renderLoadingIndicator(loading, loadingOptions)}\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 alignment={paginationBarOptions.alignment}\n hideAllFromItemsPerPage={\n paginationBarOptions.hideAllFromItemsPerPage\n }\n hideRangeLabel={paginationBarOptions.hideRangeLabel}\n itemLabel={paginationBarOptions.itemLabel}\n itemsPerPageOptions={paginationBarOptions.itemsPerPageOptions}\n monochrome={paginationBarOptions.monochrome}\n pageLabel={paginationBarOptions.pageLabel}\n rangeLabelType={paginationBarOptions.rangeLabelType}\n selectedItemsPerPage={\n paginationBarOptions.selectedItemsPerPage\n }\n selectItemsPerPageOnEnter={\n paginationBarOptions.selectItemsPerPageOnEnter\n }\n setToFirstPageOnPaginationChange={\n paginationBarOptions.setToFirstPageOnPaginationChange\n }\n showGoToPageControl={paginationBarOptions.showGoToPageControl}\n showItemsPerPageControl={\n paginationBarOptions.showItemsPerPageControl\n }\n theme={theme}\n totalItems={data?.length ?? 0}\n type={paginationBarOptions.type}\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 ? `${\n columns.find((col) => col.key === sortedColum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]}
@@ -0,0 +1,2 @@
1
+ import{h as t,r as e,c as i,H as s,g as a}from"./p-8e4e97b4.js";import{d as n,g as h,a as r,y as o,b as c,c as d,e as l,f as u,h as f}from"./p-c86ca475.js";import{s as b,k as p,l as m,m as y,r as w,o as k,n as g}from"./p-e253a857.js";const v=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.70687 6L8.29688 7.41L12.8769 12L8.29688 16.59L9.70687 18L15.7069 12L9.70687 6Z" fill="currentColor"/>\n</svg>\n`;const x=({focussed:e,today:i,day:s,monthInView:a,onFocusDay:n,onBlurDay:h,onSelectDay:r,selected:o,focussedDayRef:c,inRange:d,showDaysOutsideMonth:l,disableDay:u})=>{const f=()=>{r(s)};const y=()=>{n()};const w=()=>{h()};const k=b(p);const g=b(m);const v=!d||u;const x=a!==s.getMonth();const D=v||x&&!l;return t("div",{class:"day-button-container"},t("button",{class:{"day-button":true,"outside-month":x,"outside-range":!!v,hidden:x&&!l,disabled:D,today:i,selected:o,focussed:e},tabIndex:e?0:-1,"aria-hidden":x?"true":"false","aria-disabled":D?"true":"false","aria-current":i?"date":undefined,"aria-label":D||x||v?undefined:`Choose ${k[s.getDay()]}, ${s.getDate()} ${g[s.getMonth()]} ${s.getFullYear()}`,disabled:D,onClick:f,onBlur:w,onFocus:y,ref:t=>{if(e&&t&&c){c(t)}}},(!x||x&&l)&&t("ic-typography",{variant:"subtitle-small",italic:x},s.getDate())))};const D=({size:e,focussedMonth:i,monthInView:s,onSelectMonth:a,onKeyDown:o,focussedMonthRef:c,minDate:d,maxDate:l,yearInView:u})=>{const f=t=>{const e=t.target;a(Number(e.getAttribute("data-month")))};const p=b(m);return t("div",{class:{"month-picker":true},role:"list"},p.map(((a,b)=>{const p=s===b;const m=i===b;const y=!n(new Date(u,b,1),d?r(d):null,l?h(l):null);return t("ic-button",{role:"listitem",class:{"month-button":true,selected:p,focussed:m,disabled:y},"full-width":true,disabled:y,variant:p?"primary":"tertiary","data-month":b,size:e,tabIndex:m?0:-1,"aria-current":p?"true":"false","aria-label":p?"":`select ${a}`,onClick:f,onKeyDown:o,ref:t=>{if(m&&t){c(t)}}},a)})))};const z=({decadeView:e,size:i,focussedYear:s,yearInView:a,onSelectYear:n,onFocusYear:h,onBlurYear:r,onKeyDown:c,minDate:d,maxDate:l,focussedYearRef:u})=>{const f=t=>{const e=t.target;n(Number(e.getAttribute("data-year")))};const b=()=>{h()};const p=()=>{r()};const m=t=>{t.preventDefault()};const y=e[0];const w=e[11];const k=e.slice(1,11);return t("div",{class:"year-picker",role:"list"},t("div",{class:"prev-decade","aria-hidden":"true"},t("ic-button",{id:"prev-decade-button",class:{"year-button":true},disabled:!o(y,d,l),"data-year":y,tabIndex:-1,variant:"tertiary",onClick:f,onMouseDown:m,"aria-hidden":"true",size:i},`${y-9}s`,t("svg",{slot:"left-icon",width:"12",height:"12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z",fill:"currentColor"})))),k.map((e=>{const n=a===e;const h=s===e;return t("ic-button",{class:{"year-button":true,selected:n,focussed:h},disabled:!o(e,d,l),"data-year":e,tabIndex:h?0:-1,variant:n?"primary":"tertiary",onClick:f,"aria-label":n?"":`select ${e}`,role:"listitem","aria-current":n?"true":"false",onKeyDown:c,onFocus:b,onBlur:p,size:i,ref:t=>{if(h&&t){u(t)}}},e)})),t("div",{class:"next-decade","aria-hidden":"true"},t("ic-button",{id:"next-decade-button",class:{"year-button":true,flip:true},disabled:!o(w,d,l),"data-year":w,tabIndex:-1,variant:"tertiary",onClick:f,onMouseDown:m,"aria-hidden":"true",size:i},`${w}s`,t("svg",{slot:"right-icon",width:"12",height:"12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M11.3333 5.33341H3.21996L6.94663 1.60675L5.99996 0.666748L0.666626 6.00008L5.99996 11.3334L6.93996 10.3934L3.21996 6.66675H11.3333V5.33341Z",fill:"currentColor"})))))};const H='/*! 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}:host{display:block;position:relative;--month-year-picker-button-width:5rem;--month-button-width:5.5rem;--input-field-width:var(--input-width, 19.125rem);--ic-input-label-helpertext-padding:var(--ic-space-xxs)}:host(.ic-date-picker-large){--month-button-width:6.3125rem;--input-field-width:var(--input-width, 21.125rem)}:host(.ic-date-picker-small){--month-button-width:6.25rem;--input-field-width:var(--input-width, 17.125rem)}:host .date-input-container{position:relative}ic-date-input{--input-width:var(--input-field-width)}:host .calendar-container{min-width:19rem;max-width:23.5rem;width:var(--input-width);display:flex;flex-direction:column;gap:var(--ic-space-xs);position:absolute;border:var(--ic-border-default);border-color:var(--ic-date-picker-calendar-border);border-radius:var(--ic-border-radius);align-items:center;background-color:var(--ic-date-picker-calendar-bg);z-index:var(--ic-z-index-date-picker);box-sizing:border-box;box-shadow:var(--ic-date-picker-calendar-elevation);margin-top:var(--ic-space-xxxs);padding:var(--ic-space-xs);animation:fade-in-calendar var(--ic-transition-duration-slow)}:host(.ic-date-picker-small) .calendar-container{min-width:17rem;max-width:21.5rem}:host(.ic-date-picker-large) .calendar-container{min-width:21rem;max-width:25.5rem}:host .calendar-container.above{bottom:calc(var(--ic-space-xxl) - var(--ic-space-xxs))}:host .month-year-nav-container{display:flex;justify-content:space-between;align-items:center;align-self:stretch}:host .month-year-nav-container.hidden{display:none}:host .month-year-nav{display:flex;justify-content:space-between;align-items:center;flex:1 0 0}:host .month-picker,:host .year-picker{flex-wrap:wrap;display:inline-flex;align-items:center;width:17.5rem;-moz-column-gap:var(--ic-space-xs);column-gap:var(--ic-space-xs);row-gap:var(--ic-space-xxs)}:host(.ic-date-picker-small) .month-picker,:host(.ic-date-picker-small) .year-picker{width:13.125rem}:host(.ic-date-picker-large) .month-picker,:host(.ic-date-picker-large) .year-picker{width:20rem}:host .month-picker-button,:host .year-picker-button{width:5rem;--min-width:5rem}:host .month-button,:host .year-button{width:var(--month-button-width)}:host .month-button.focussed,:host .year-button.focussed{z-index:1}:host .month-button::part(button),:host .year-button::part(button){min-width:var(--month-button-width)}:host .prev-decade .year-button svg{margin-right:calc(-1 * var(--ic-space-xl));padding-top:var(--ic-space-sm)}:host .prev-decade .year-button::part(button){padding-left:0;padding-right:var(--ic-space-lg)}:host(.ic-date-picker-small) .prev-decade .year-button::part(button){padding-left:0;padding-right:calc(var(--ic-space-lg) + var(--ic-space-xxs))}:host .next-decade .year-button svg{margin-left:calc(-1 * var(--ic-space-xl));padding-top:var(--ic-space-sm)}:host .next-decade .year-button::part(button){padding-right:0;padding-left:var(--ic-space-lg)}:host(.ic-date-picker-small) .next-decade .year-button::part(button),:host(.ic-date-picker-large) .next-decade .year-button::part(button){padding-left:var(--ic-space-xl)}:host .bottom-buttons{padding-top:var(--ic-space-xs);display:flex;justify-content:space-between;align-items:center;align-self:stretch;animation:fade-in-buttons var(--ic-transition-duration-slow)}:host(.ic-date-picker-small) .bottom-buttons{padding-top:var(--ic-space-xxs)}:host .bottom-buttons.no-today{align-items:flex-end;flex-direction:column}:host .bottom-buttons.hidden{display:none}:host .calendar{display:flex;flex-direction:column;align-items:flex-start;width:15.75rem;animation:fade-in-buttons var(--ic-transition-duration-slow)}:host(.ic-date-picker-large) .calendar{width:19.25rem}:host(.ic-date-picker-small) .calendar{padding-bottom:var(--ic-space-xxs);width:14rem}:host .hidden{display:none}:host .weekdays{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:var(--ic-space-xs);align-self:stretch}:host .calendar-days-container{display:flex;flex-wrap:wrap;justify-content:space-between;row-gap:var(--ic-space-xs);padding:var(--ic-space-xxs) 0}:host(.ic-date-picker-small) .calendar-days-container{padding:var(--ic-space-xxxs) 0}:host(.ic-date-picker-large) .calendar-days-container{padding:var(--ic-space-xs) 0}:host .calendar-day-header{display:flex;width:2rem;padding:var(--ic-space-xxs) 0;justify-content:center;align-items:center}:host(.ic-date-picker-small) .calendar-day-header,:host(.ic-date-picker-large) .calendar-day-header{padding:var(--ic-space-xxs)}:host .calendar-day-header ic-typography{--ic-typography-color:var(--ic-date-picker-calendar-label);text-align:center}:host .day-button-container{display:flex;justify-content:center;align-items:center;width:2.25rem;height:2.25rem}:host(.ic-date-picker-small) .day-button-container{width:2rem;height:2rem}:host(.ic-date-picker-large) .day-button-container{width:2.5rem;height:2.5rem}:host .day-button{display:flex;position:relative;justify-content:center;align-items:center;border:0;border-radius:2rem;background-color:var(--ic-date-picker-calendar-bg);width:2rem;height:2rem;cursor:pointer;transition:var(--ic-easing-transition-fast);z-index:0}:host .day-button.disabled{cursor:default}:host(.ic-date-picker-large) .day-button{width:2.25rem;height:2.25rem}:host(.ic-date-picker-small) .day-button{width:1.75rem;height:1.75rem}:host .day-button ic-typography{width:1.75rem;--ic-typography-color:var(--ic-date-picker-date-label-default)}:host .day-button.outside-range ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-disabled)}:host .day-button.outside-month ic-typography{font-weight:var(--ic-font-weight-regular) !important}:host .day-button.outside-month:not(.outside-range):not(.selected) ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-default)}:host .day-button:hover:not(.disabled){background-color:var(--ic-date-picker-date-default-bg-hover)}:host .day-button:active:not(.disabled){background-color:var(--ic-date-picker-date-default-bg-pressed)}@media (prefers-reduced-motion: no-preference){:host .day-button:hover:not(.disabled):not(.focussed),:host .day-button:active:not(.disabled):not(.focussed){transition:background-color var(--ic-transition-duration-slow) ease-in-out}}:host .day-button.selected:not(.hidden){background-color:var(--ic-date-picker-date-active-bg-default)}:host .day-button.selected ic-typography{--ic-typography-color:var(--ic-date-picker-date-label-selected)}:host .day-button.selected:not(.hidden):hover{background-color:var(--ic-date-picker-date-active-bg-hover)}:host .day-button.selected:not(.hidden):active{background-color:var(--ic-date-picker-date-active-bg-pressed)}:host .day-button.focussed{z-index:1}:host .day-button:focus{outline:none}:host .day-button.focussed:focus{box-shadow:var(--ic-border-focus)}:host .day-button.today:not(.hidden)::after{content:"";position:absolute;width:0.875rem;height:0.125rem;bottom:0.4rem;border-radius:var(--ic-border-radius);background-color:var(--ic-date-picker-default-underline)}:host(.ic-date-picker-small) .day-button.today::after{bottom:0.35rem}:host(.ic-date-picker-large) .day-button.today::after{width:1rem}:host .day-button.today.selected::after{background-color:var(--ic-date-picker-selected-underline)}:host #select-month-hint,:host #select-year-hint{display:none}.sr-only{position:absolute;left:-9999px}@media (prefers-reduced-motion: reduce){:host .calendar-container,:host .calendar,:host .bottom-buttons{animation:none}}@keyframes fade-in-buttons{0%{opacity:0}50%{opacity:0}100%{opacity:1}}@keyframes fade-in-calendar{0%{display:flex;max-height:0}100%{display:flex;max-height:600px}}@media (forced-colors: active){:host .day-button.today:not(.hidden)::after{background-color:highlight}:host .day-button.selected:not(.hidden){background-color:highlight}:host .day-button.focussed:focus{border:var(--ic-border-hc)}:host .month-button.selected::part(button),:host .year-button.selected::part(button){background-color:highlight}}';const M=H;const P="DD/MM/YYYY";const V="Dates in the future are not allowed. Please select a date in the past.";const L="Dates in the past are not allowed. Please select a date in the future.";const T="The date you have selected is on a day of the week that is not allowed. Please select another date.";const C=100;const I=360;const Y=400;const $=440;const A=class{constructor(s){e(this,s);this.icChange=i(this,"icChange",7);this.clearButtonEl=null;this.daysOfWeek=[];this.dayButtonFocussed=false;this.dayPickerKeyboardNav=false;this.dialogDescription="";this.focusDay=true;this.liveRegionEl=undefined;this.monthNames=[];this.monthInViewUpdateHandled=false;this.myCalendarButtonClicked=false;this.showPickerAbove=false;this.today=new Date;this.todayButtonEl=null;this.yearButtonFocussed=false;this.calendarOpen=false;this.currMonthView=[];this.currYearPickerView=[];this.decadeView=[];this.focussedDate=null;this.maxDate=null;this.minDate=null;this.monthPickerVisible=false;this.orderedDaysOfWeek=[];this.selectedDate=null;this.yearPickerVisible=false;this.dateFormat="DD/MM/YYYY";this.disabled=false;this.emitDatePartChange=false;this.disableDays=[];this.disableDaysMessage="The date you have selected is on a day of the week that is not allowed. Please select another date.";this.disableFuture=false;this.disableFutureMessage="Dates in the future are not allowed. Please select a date in the past.";this.disablePast=false;this.disablePastMessage="Dates in the past are not allowed. Please select a date in the future.";this.hideHelperText=false;this.hideLabel=false;this.invalidDateMessage="Please enter a valid date.";this.max="";this.min="";this.openAtDate="";this.required=false;this.showDaysOutsideMonth=true;this.showClearButton=true;this.showPickerClearButton=true;this.showPickerTodayButton=true;this.size="medium";this.startOfWeek=y.Monday;this.theme="inherit";this.validationStatus="";this.validationText="";this.value="";this.setDecadeView=t=>{let e=t-1;const i=[];while(e<=t+10){i.push(e);e++}this.decadeView=i;this.decadeStart=i[1];this.decadeEnd=i[10]};this.setSelectedDate=(t,e=true)=>{var i;if(t===null||!c(t,this.selectedDate)){this.selectedDate=t;this.value=t;if(e){(i=this.inputEl)===null||i===void 0?void 0:i.triggerIcChange(t)}}};this.handleCalendarMouseDown=t=>{const e=t.target;if(e.tagName!=="IC-BUTTON"){t.preventDefault()}};this.handleCalendarClick=t=>{this.clearDialogDescription();t.stopImmediatePropagation()};this.handleDocumentClick=()=>{this.calendarOpen=false};this.keyDownHandler=t=>{var e;if(t.key==="Escape"){if(this.calendarOpen){this.closeButtonClickHandler();(e=this.inputEl)===null||e===void 0?void 0:e.setCalendarFocus();t.stopImmediatePropagation()}}else{this.clearDialogDescription();t.stopImmediatePropagation()}};this.closeButtonClickHandler=()=>{this.calendarOpen=false};this.focusFirstElement=()=>{this.monthButtonEl.setFocus()};this.focusLastElement=()=>{if(this.showPickerClearButton&&this.clearButtonEl&&!this.clearButtonEl.disabled){this.clearButtonEl.setFocus()}else if(this.showPickerTodayButton&&this.todayButtonEl&&!this.todayButtonEl.disabled){this.todayButtonEl.setFocus()}else if(this.monthPickerVisible){this.focussedMonthEl.setFocus()}else if(this.yearPickerVisible){this.focussedYearEl.setFocus()}else{this.focussedDayEl.focus()}};this.focusFocussedDay=()=>{this.focussedDayEl.focus()};this.monthButtonClickHandler=()=>{this.yearPickerVisible=false;this.focusDay=false;this.monthPickerVisible=!this.monthPickerVisible;if(this.monthPickerVisible){this.setAriaLiveRegionText("Month picker view open")}else{this.setMonthSelectedLiveRegionText()}};this.yearButtonClickHandler=()=>{this.monthPickerVisible=false;this.focusDay=false;this.yearPickerVisible=!this.yearPickerVisible;if(this.yearPickerVisible){this.setAriaLiveRegionText(`Year picker view open. ${this.getDecadeInViewText()}`)}else{this.setYearSelectedLiveRegionText()}};this.todayButtonClickHandler=()=>{this.yearPickerVisible=false;this.monthPickerVisible=false;this.setFocussedDate(new Date);this.setAriaLiveRegionText(this.getMonthInViewText());setTimeout((()=>this.focusFocussedDay()),C)};this.todayButtonKeyDownHandler=t=>{var e;if(t.key==="Tab"&&!t.shiftKey&&((e=this.clearButtonEl)===null||e===void 0?void 0:e.disabled)){this.focusFirstElement();t.preventDefault()}};this.clearButtonClickHandler=()=>{this.setSelectedDate(null);let t="Selected date cleared.";if(!this.monthPickerVisible&&!this.yearPickerVisible){t+=` ${this.getMonthInViewText()}`}if(this.monthPickerVisible){this.focussedMonthEl.setFocus()}else if(this.yearPickerVisible){this.focussedYearEl.setFocus()}else{this.focusFocussedDay()}this.setAriaLiveRegionText(t)};this.setMonthSelectedLiveRegionText=()=>{this.setAriaLiveRegionText(`${this.monthNames[this.monthInView]} selected. ${this.getMonthInViewText()}`)};this.setYearSelectedLiveRegionText=()=>{this.setAriaLiveRegionText(`${this.yearInView} selected. ${this.getMonthInViewText()}`)};this.getMonthInViewText=()=>`${this.monthNames[this.monthInView]} ${this.yearInView} currently in view.`;this.getDecadeInViewText=()=>`${this.decadeStart} to ${this.decadeEnd} currently in view.`;this.setAriaLiveRegionText=t=>{this.liveRegionEl&&(this.liveRegionEl.innerText=t)};this.clearDialogDescription=()=>{this.dialogDescription=""};this.clearButtonKeyDownHandler=t=>{if(t.key==="Tab"&&!t.shiftKey){this.focusFirstElement();t.preventDefault()}};this.goToPreviousMonth=(t=false)=>{this.focusDay=t;this.moveMonths(-1)};this.goToNextMonth=(t=false)=>{this.focusDay=t;this.moveMonths(1)};this.goToPreviousYear=(t=false)=>{if(this.isPrevYearAllowed()){this.focusDay=t;this.moveYears(-1)}};this.goToNextYear=(t=false)=>{if(this.isNextYearAllowed()){this.focusDay=t;this.moveYears(1)}};this.navButtonMouseDownHandler=t=>{t.preventDefault()};this.renderMonthYearNavButton=(e,i,s)=>{const a=this.size;return t("div",{"aria-hidden":"true"},t("ic-button",{id:e,disableTooltip:true,disabled:s,onClick:this.monthYearNavClickHandler,class:{flip:i},variant:"icon-tertiary",innerHTML:v,size:a,tabIndex:-1,"aria-hidden":"true",onMouseDown:this.navButtonMouseDownHandler}))};this.monthYearNavClickHandler=t=>{const e=t.target;switch(e.id){case"previous-month-button":this.goToPreviousMonth(this.dayButtonFocussed);break;case"next-month-button":this.goToNextMonth(this.dayButtonFocussed);break;case"previous-year-button":this.goToPreviousYear(this.dayButtonFocussed);break;case"next-year-button":this.goToNextYear(this.dayButtonFocussed);break}};this.previousMonthButton=()=>{let t=false;if(this.focussedDate!==null&&this.minDate!==null){const e=this.focussedDate.getFullYear()===this.minDate.getFullYear();if(e){t=this.monthInView-1<this.minDate.getMonth()}}return this.renderMonthYearNavButton("previous-month-button",true,t)};this.nextMonthButton=()=>{let t=false;if(this.focussedDate!==null&&this.maxDate!==null){const e=this.focussedDate.getFullYear()===this.maxDate.getFullYear();if(e){t=this.monthInView+1>this.maxDate.getMonth()}}return this.renderMonthYearNavButton("next-month-button",false,t)};this.previousYearButton=()=>this.renderMonthYearNavButton("previous-year-button",true,!this.isPrevYearAllowed());this.nextYearButton=()=>this.renderMonthYearNavButton("next-year-button",false,!this.isNextYearAllowed());this.isPrevYearAllowed=()=>this.isYearAllowed(this.yearInView-1);this.isNextYearAllowed=()=>this.isYearAllowed(this.yearInView+1);this.isYearAllowed=t=>o(t,this.minDate,this.maxDate);this.getMonthView=t=>{const e=d(r(t),this.startOfWeek);const i=l(h(t),this.startOfWeek);const s=[];let a=e;while(!c(a,i)){s.push(a);a=new Date(a);a.setDate(a.getDate()+1)}s.push(a);return s};this.isCurrentMonth=()=>{const t=new Date;return t.getFullYear()===this.yearInView&&t.getMonth()===this.monthInView};this.updateMonthInView=()=>{if(this.focussedDate){this.currMonthView=this.getMonthView(this.focussedDate);this.focussedDay=this.focussedDate.getDate();this.monthInView=this.focussedDate.getMonth();this.yearInView=this.focussedDate.getFullYear();if(this.dayPickerKeyboardNav){this.monthInViewUpdateHandled=true;this.setAriaLiveRegionText(this.getMonthInViewText());this.dayPickerKeyboardNav=false}}};this.handleSelectDay=t=>{var e;this.setSelectedDate(t);this.calendarOpen=false;(e=this.inputEl)===null||e===void 0?void 0:e.setCalendarFocus()};this.handleSelectMonth=t=>{this.moveMonths(t-this.monthInView);setTimeout((()=>{this.monthButtonEl.setFocus();this.monthPickerVisible=false;this.setMonthSelectedLiveRegionText()}),C)};this.handleSelectYear=t=>{const e=this.decadeView.indexOf(t);if(e>0&&e<this.decadeView.length-1){this.moveYears(t-this.yearInView);this.focusDay=false;const e=this.monthNames[this.monthInView];this.setAriaLiveRegionText(`${t} selected. ${e} ${t} currently in view.`);setTimeout((()=>{this.yearButtonEl.setFocus();this.yearPickerVisible=false}),C)}else{const e=t-this.focussedYear>0?10:-10;this.updateFocussedYear(e,this.yearButtonFocussed);this.setAriaLiveRegionText(this.getDecadeInViewText())}};this.monthPickerKeyDownHandler=t=>{let e=true;switch(t.key){case"ArrowUp":case"ArrowLeft":this.updateFocussedMonth(-1);break;case"ArrowDown":case"ArrowRight":this.updateFocussedMonth(1);break;case"Home":this.updateFocussedMonth(-this.focussedMonth);break;case"End":this.updateFocussedMonth(11-this.focussedMonth);break;case"Tab":e=this.calendarTabHandler(t);break;case"Escape":t.stopImmediatePropagation();this.monthPickerVisible=false;setTimeout((()=>this.focusFocussedDay()),C);break;default:e=false}if(e){t.preventDefault()}};this.yearPickerKeyDownHandler=t=>{let e=true;switch(t.key){case"ArrowUp":case"ArrowLeft":this.updateFocussedYear(-1);break;case"ArrowDown":case"ArrowRight":this.updateFocussedYear(1);break;case"Home":if(this.focussedYear>this.decadeStart){this.updateFocussedYear(this.decadeStart-this.focussedYear)}break;case"End":if(this.focussedYear<this.decadeEnd){this.updateFocussedYear(this.decadeEnd-this.focussedYear)}break;case"PageUp":this.updateFocussedYear(-10);break;case"PageDown":this.updateFocussedYear(10);break;case"Tab":e=this.calendarTabHandler(t);break;case"Escape":t.stopImmediatePropagation();this.yearPickerVisible=false;setTimeout((()=>this.focusFocussedDay()),C);break;default:e=false}if(e){t.preventDefault()}};this.onYearButtonFocusHandler=()=>{this.yearButtonFocussed=true};this.onYearButtonBlurHandler=()=>{this.yearButtonFocussed=false};this.monthButtonKeyDownHandler=t=>{let e=false;switch(t.key){case"ArrowLeft":case"ArrowUp":e=true;this.goToPreviousMonth();break;case"ArrowRight":case"ArrowDown":e=true;this.goToNextMonth();break;case"Home":e=true;this.focusDay=false;this.moveMonths(-this.monthInView);break;case"End":e=true;this.focusDay=false;this.moveMonths(11-this.monthInView);break;case"Tab":if(t.shiftKey){e=true;this.focusLastElement()}break;case"Escape":if(this.monthPickerVisible){this.monthPickerVisible=false;t.stopImmediatePropagation()}break}if(e){t.preventDefault()}};this.yearButtonKeyDownHandler=t=>{let e=false;switch(t.key){case"ArrowLeft":case"ArrowUp":e=true;this.goToPreviousYear();break;case"ArrowRight":case"ArrowDown":e=true;this.goToNextYear();break;case"Home":if(this.yearPickerVisible&&this.yearInView>this.decadeStart){e=true;this.moveYears(this.decadeStart-this.yearInView)}break;case"End":if(this.yearPickerVisible&&this.yearInView<this.decadeEnd){e=true;this.moveYears(this.decadeEnd-this.focussedYear)}break;case"PageUp":e=true;this.focusDay=false;this.moveYears(-10);break;case"PageDown":e=true;this.focusDay=false;this.moveYears(10);break;case"Escape":if(this.yearPickerVisible){this.yearPickerVisible=false;t.stopImmediatePropagation()}break}if(e){t.preventDefault()}};this.handleCalendarKeyDown=t=>{let e=true;switch(t.key){case"ArrowDown":this.dayPickerKeyboardNav=true;this.moveDays(7);break;case"ArrowUp":this.dayPickerKeyboardNav=true;this.moveDays(-7);break;case"ArrowLeft":this.dayPickerKeyboardNav=true;if(this.focussedDate)this.moveDays(-1*this.getNextDayToFocus(this.focussedDate,false));break;case"ArrowRight":this.dayPickerKeyboardNav=true;if(this.focussedDate)this.moveDays(this.getNextDayToFocus(this.focussedDate,true));break;case"PageUp":this.dayPickerKeyboardNav=true;t.shiftKey?this.moveYears(-1):this.moveMonths(-1);break;case"PageDown":this.dayPickerKeyboardNav=true;t.shiftKey?this.moveYears(1):this.moveMonths(1);break;case"Home":this.dayPickerKeyboardNav=true;this.setFocussedDate(new Date(this.focussedYear,this.focussedMonth,1));break;case"End":this.dayPickerKeyboardNav=true;this.setFocussedDate(new Date(this.focussedYear,this.focussedMonth+1,0));break;case"Tab":e=this.calendarTabHandler(t);break;default:e=false;break}if(e){t.preventDefault()}};this.calendarTabHandler=t=>{var e;let i=false;if(!t.shiftKey&&(!this.showPickerTodayButton||this.isCurrentMonth())&&(!this.showPickerClearButton||((e=this.clearButtonEl)===null||e===void 0?void 0:e.disabled))){this.focusFirstElement();i=true}else if(t.shiftKey){this.yearButtonEl.setFocus();i=true}return i};this.onDayButtonFocusHandler=()=>{this.dayButtonFocussed=true};this.onDayButtonBlurHandler=()=>{this.dayButtonFocussed=false};this.getNextDayToFocus=(t,e,i=1)=>{var s;const a=e?1:-1;const n=new Date(t);n.setDate(n.getDate()+a);return((s=this.disableDays)===null||s===void 0?void 0:s.includes(Number(n.getDay())))?this.getNextDayToFocus(n,e,i+1):i};this.moveDays=t=>{if(this.focussedDate){const e=new Date(this.focussedDate);e.setDate(e.getDate()+t);this.setFocussedDate(e)}};this.moveMonths=t=>{if(this.focussedDate){const e=this.focussedDate.getMonth()+t;const i=new Date(new Date(r(this.focussedDate)).setMonth(e));const s=h(i);const a=new Date(new Date(this.focussedDate).setMonth(e));this.setFocussedDate(u(a,i,s));if(this.monthPickerVisible===false&&this.yearPickerVisible===false&&this.monthInViewUpdateHandled===false){this.setAriaLiveRegionText(this.getMonthInViewText())}this.monthInViewUpdateHandled=false}};this.moveYears=t=>{if(this.focussedDate){const e=this.focussedDate.getFullYear()+t;const i=new Date(new Date(r(this.focussedDate)).setFullYear(e));const s=h(i);const a=new Date(new Date(this.focussedDate).setFullYear(e));this.setFocussedDate(u(a,i,s));if(this.monthPickerVisible===false&&this.yearPickerVisible===false&&this.monthInViewUpdateHandled===false){this.setAriaLiveRegionText(this.getMonthInViewText())}this.monthInViewUpdateHandled=false}};this.updateFocussedMonth=t=>{const e=new Date(this.focussedYear,this.focussedMonth,1);e.setMonth(this.focussedMonth+t);const i=u(e,this.minDate,this.maxDate);this.focussedMonth=i.getMonth();setTimeout((()=>this.focussedMonthEl.setFocus()),C)};this.updateFocussedYear=(t,e=true)=>{const i=new Date((new Date).setFullYear(this.focussedYear+t));const s=u(i,this.minDate,this.maxDate);this.setFocussedYear(s.getFullYear(),e)};this.setFocussedDate=t=>{this.focussedDate=u(t,this.minDate,this.maxDate)};this.setFocussedDayEl=t=>{this.focussedDayEl=t};this.setFocussedMonthEl=t=>{this.focussedMonthEl=t};this.setFocussedYearEl=t=>{this.focussedYearEl=t};this.setFocussedYear=(t,e=true)=>{const i=this.focussedYear;this.focussedYear=t;if(this.yearPickerVisible){const s=Math.floor(t/10)*10;const a=Math.floor(i/10)*10;if(s!==a){this.setDecadeView(s);this.setAriaLiveRegionText(this.getDecadeInViewText())}if(e){setTimeout((()=>{if(this.focussedYearEl!==null)this.focussedYearEl.setFocus()}),C)}}else{this.setDecadeView(Math.floor(t/10)*10)}};this.setDateInputProps=()=>{const t={hideLabel:this.hideLabel,invalidDateMessage:this.invalidDateMessage,label:this.label,showClearButton:true,showCalendarButton:true,value:this.value,emitDatePartChange:this.emitDatePartChange};if(this.dateFormat!==P){t.dateFormat=this.dateFormat}if(this.disableFuture){t.disableFuture=this.disableFuture;if(this.disableFutureMessage!==V){t.disableFutureMessage=this.disableFutureMessage}}if(this.disablePast){t.disablePast=this.disablePast;if(this.disablePastMessage!==L){t.disablePastMessage=this.disablePastMessage}}if(this.disableDays&&this.disableDays.length>0){t.disableDays=this.disableDays;if(this.disableDaysMessage!==T){t.disableDaysMessage=this.disableDaysMessage}}if(this.max!==null&&this.max!==""&&this.maxDate){t.max=this.maxDate}if(this.min!==null&&this.min!==""&&this.minDate){t.min=this.minDate}if(this.helperText!==undefined){t.helperText=this.helperText}if(this.hideHelperText!==false){t.hideHelperText=this.hideHelperText}if(this.inputId!==undefined){t.inputId=this.inputId}if(this.name!==undefined){t.name=this.name}if(this.disabled){t.disabled=this.disabled}if(this.required){t.required=this.required}if(this.showClearButton!==null){t.showClearButton=this.showClearButton}if(this.size!=="medium"){t.size=this.size}if(this.validationStatus!==""){t.validationStatus=this.validationStatus}if(this.validationText!==""){t.validationText=this.validationText}return t}}watchDisabledHandler(){w(this.disabled,this.el)}watchDisableFutureHandler(){this.watchMaxHandler()}watchDisablePastHandler(){this.watchMinHandler()}watchMaxHandler(){if(this.disableFuture){this.maxDate=new Date}else{this.maxDate=f(this.max,this.dateFormat)}}watchMinHandler(){if(this.disablePast){this.minDate=new Date}else{this.minDate=f(this.min,this.dateFormat)}}watchStartOfWeekHandler(){this.orderedDaysOfWeek=this.daysOfWeek.slice(this.startOfWeek).concat(this.daysOfWeek.slice(0,this.startOfWeek));if(this.calendarOpen){this.updateMonthInView()}}watchOpenHandler(){if(this.calendarOpen){if(this.inputEl){let t=Y;if(this.size==="small"){t=I}else if(this.size==="large"){t=$}if(this.el.offsetTop+this.inputEl.offsetHeight+t>window.innerHeight&&this.el.offsetTop>t){this.showPickerAbove=true}else{this.showPickerAbove=false}}if(this.selectedDate===null||!n(this.selectedDate,this.minDate,this.maxDate)){let t=new Date;if(this.openAtDate!==""){t=f(this.openAtDate,this.dateFormat)}this.setFocussedDate(t)}else{this.setFocussedDate(this.selectedDate)}let t=this.getMonthInViewText();if(this.selectedDate===null){t+=" No date selected."}t+=" Use arrow keys to change day. Press enter or space to select a date or press escape to close the picker";this.dialogDescription=t;setTimeout((()=>this.focusFocussedDay()),C);document.addEventListener("click",this.handleDocumentClick)}else{document.removeEventListener("click",this.handleDocumentClick);this.monthPickerVisible=false;this.yearPickerVisible=false}}watchFocussedDateHandler(t,e){if(e===null||!(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())){this.updateMonthInView()}}watchMonthInViewHandler(){this.focussedMonth=this.monthInView}watchYearInViewHandler(){this.setFocussedYear(this.yearInView,false)}watchYearPickerVisibleHandler(){if(!this.yearPickerVisible){this.setFocussedYear(this.yearInView)}}watchMonthPickerVisibleHandler(){if(!this.monthPickerVisible){this.focussedMonth=this.monthInView}}watchFocussedDayEl(){if(this.focusDay){setTimeout((()=>this.focusFocussedDay()),C)}this.focusDay=true}componentWillLoad(){k([{prop:this.label,propName:"label"}],"Date Picker");this.monthNames=b(m);this.daysOfWeek=b(g);this.watchStartOfWeekHandler();this.watchMaxHandler();this.watchMinHandler();w(this.disabled,this.el)}componentWillRender(){this.dateInputProps=this.setDateInputProps()}componentWillUpdate(){this.dateInputProps=this.setDateInputProps()}localCalendarButtonClickHandler(t){this.myCalendarButtonClicked=true;if(!this.calendarOpen){this.setSelectedDate(t.detail.value,false)}this.calendarOpen=!this.calendarOpen}calendarButtonClickHandler(){if(!this.myCalendarButtonClicked){this.calendarOpen=false}this.myCalendarButtonClicked=false}render(){const{calendarOpen:e,dateInputProps:i,monthNames:a,size:h,focussedMonth:r,focussedYear:o,monthInView:d,yearInView:l,monthPickerVisible:u,yearPickerVisible:f,orderedDaysOfWeek:b,decadeView:p,minDate:m,maxDate:y,showPickerClearButton:w,showPickerTodayButton:k,dialogDescription:g,theme:v}=this;let H="";if(u){H=`Use the arrow keys to change the selected month. To return to day picker view, press Enter or Space to select a month, or press Escape.`}else{H=`Press Enter or Space to open month picker view or use the arrow keys to change month.`}let M="";if(f){M=`Use the arrow keys to change the selected year. To return to day picker view, press Enter or Space to select a year, or press Escape.`}else{M=`Press Enter or Space to open year picker view or use the arrow keys to change the selected year.`}const P="choose date";const V=a&&a[d]?a[d]:"Open month picker";const L=this.yearInView?this.yearInView:"Open year picker";let T=m;if(m&&this.disablePast){const t=new Date(m);t.setDate(m.getDate()-1);T=t}return t(s,{key:"531d49da81ba4f0d37c6a3644200e2b4354ef362",onKeyDown:this.keyDownHandler,class:{[`ic-date-picker-${h}`]:true,[`ic-theme-${v}`]:v!=="inherit"}},t("div",{key:"4481290ae95d3ae086e0d50662c200b292c082ac",class:"date-input-container"},t("ic-date-input",Object.assign({key:"56558836ac8b41e61149b007ac1cf16b506f8998",ref:t=>this.inputEl=t},i),t("slot",{key:"de8165f61fa5333e8ca05ed0a18efbcb22578e1f",name:"helper-text",slot:"helper-text"}))),e&&t("div",{key:"b5e7f219cc50107b5360779534094826ee4efeb5"},t("span",{key:"cebf92d9beea25c39fd0bf64ff376015ea416698",id:"dialog-description",class:"sr-only"},g),t("div",{key:"6ab22c6b303a6b91744584607fc6ad1fb349d035",role:"dialog","aria-modal":"true","aria-label":P,"aria-describedBy":"dialog-description",class:{"calendar-container":true,above:this.showPickerAbove},onMouseDown:this.handleCalendarMouseDown,onClick:this.handleCalendarClick},t("span",{key:"1d3e11ab36f7fff14524586a982ddd457e4509a1",ref:t=>this.liveRegionEl=t,id:"live-region","aria-live":"assertive",class:"sr-only"}),t("div",{key:"499133f3a2f1cf5a79c7f7b9d695959d5ee76f0d",class:{"month-year-nav-container":true}},t("div",{key:"519bf58003c5ca9f5bccc59e7c31a25c096e340d",class:"month-year-nav"},this.previousMonthButton(),t("span",{key:"a4e70c8464318199e86df119481d5f7519e8c8ee",id:"select-month-hint","aria-hidden":"true"},H),t("ic-button",{key:"3c91455809a1630355b0f9f1e757da9e15ac04b6",ref:t=>this.monthButtonEl=t,size:h,class:"month-picker-button","aria-haspopup":"menu","aria-expanded":u?"true":"false","full-width":"true",variant:"tertiary","aria-label":V,"aria-describedby":"select-month-hint",onKeyDown:this.monthButtonKeyDownHandler,onClick:this.monthButtonClickHandler},a[d]),this.nextMonthButton()),t("div",{key:"8a9ba32ac36960d01070cab55953ff1bee71fa89",class:"month-year-nav"},this.previousYearButton(),t("span",{key:"038dfdff3ab2164d6eb2a18803f96a293ee26503",id:"select-year-hint","aria-hidden":"true"},M),t("ic-button",{key:"3a6fd2d52d8d3f52229aa08fc193ea5094825e26",ref:t=>this.yearButtonEl=t,size:h,class:"year-picker-button","aria-haspopup":"menu","aria-expanded":f?"true":"false","full-width":"true",variant:"tertiary","aria-label":L,"aria-describedby":"select-year-hint",onKeyDown:this.yearButtonKeyDownHandler,onClick:this.yearButtonClickHandler},this.yearInView),this.nextYearButton())),!(u||f)&&t("div",{key:"78ca07c7e9b5b4737f6bef0fa40c9fb6fdeeb71c",class:{calendar:true,hidden:u||f},onKeyDown:this.handleCalendarKeyDown},t("div",{key:"f740560dfc757dce70213118d6a0faacd415e188",class:"weekdays","aria-hidden":"true"},b.map((e=>{const i=h==="small"?e.charAt(0):e;return t("div",{class:"calendar-day-header"},t("ic-typography",{variant:"caption"},i))}))),t("div",{key:"c77c16fd12c3deeb1891a712ba709e6f29c970b5",class:"calendar-days-container"},this.currMonthView.map((e=>{var i;return t(x,{day:e,disableDay:(i=this.disableDays)===null||i===void 0?void 0:i.includes(Number(e.getDay())),today:c(e,this.today),selected:c(e,this.selectedDate),focussed:c(e,this.focussedDate),inRange:n(e,T,y),monthInView:d,onSelectDay:this.handleSelectDay,focussedDayRef:this.setFocussedDayEl,onFocusDay:this.onDayButtonFocusHandler,onBlurDay:this.onDayButtonBlurHandler,showDaysOutsideMonth:this.showDaysOutsideMonth})})))),t("div",{key:"3e2853724e6401a48c7307940d00a43f64cd941a",class:{"month-picker-container":true,hidden:!u}},u&&t(D,{key:"f3434bb526e456e46d219e7204f8e92a9c91c4b6",size:h,onSelectMonth:this.handleSelectMonth,monthInView:d,focussedMonth:r,onKeyDown:this.monthPickerKeyDownHandler,focussedMonthRef:this.setFocussedMonthEl,minDate:m,maxDate:y,yearInView:l})),t("div",{key:"540673c1426c75f0b7b2d96a07f8437fca64457a",class:{"year-picker-container":true,hidden:!f}},f&&t(z,{key:"d41bc6ef23d9112681165fcd423cd6fa290bce63",decadeView:p,size:h,focussedYear:o,onSelectYear:this.handleSelectYear,onKeyDown:this.yearPickerKeyDownHandler,onFocusYear:this.onYearButtonFocusHandler,onBlurYear:this.onYearButtonBlurHandler,yearInView:l,minDate:m,maxDate:y,focussedYearRef:this.setFocussedYearEl})),t("div",{key:"2cbd003e0f17165e1a9ce1c2b84eb4cff4399a72",class:{"bottom-buttons":true,"no-today":!k}},k&&t("ic-button",{key:"524161f633a38ed896c1416ca2b21f4f7cb09939",id:"today-button",variant:"tertiary",ref:t=>this.todayButtonEl=t,size:h,"aria-label":"Navigate to current date",onClick:this.todayButtonClickHandler,onKeyDown:this.todayButtonKeyDownHandler,disabled:this.isCurrentMonth()},"Go to today"),w&&t("ic-button",{key:"a4525f0a27fe97bfd2ae01ef0d9205e596a09b29",id:"clear-button","aria-label":"clear selected date",ref:t=>this.clearButtonEl=t,variant:"tertiary",size:h,onClick:this.clearButtonClickHandler,onKeyDown:this.clearButtonKeyDownHandler,disabled:this.value===""||this.value===null||this.value===undefined},"Clear")))))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],disableFuture:["watchDisableFutureHandler"],disablePast:["watchDisablePastHandler"],max:["watchMaxHandler"],min:["watchMinHandler"],startOfWeek:["watchStartOfWeekHandler"],calendarOpen:["watchOpenHandler"],focussedDate:["watchFocussedDateHandler"],monthInView:["watchMonthInViewHandler"],yearInView:["watchYearInViewHandler"],yearPickerVisible:["watchYearPickerVisibleHandler"],monthPickerVisible:["watchMonthPickerVisibleHandler"],focussedDayEl:["watchFocussedDayEl"]}}};A.style=M;export{A as ic_date_picker};
2
+ //# sourceMappingURL=p-d04b75cb.entry.js.map