@ukic/canary-web-components 2.0.0-canary.22 → 2.0.0-canary.24
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.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js +5 -2
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +5 -0
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +2 -2
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +7 -0
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +26 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +6 -0
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +15 -0
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/components/ic-button2.js +5 -2
- package/dist/components/ic-button2.js.map +1 -1
- package/dist/components/ic-data-table.js +5 -0
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-pagination2.js +2 -2
- package/dist/components/ic-pagination2.js.map +1 -1
- package/dist/components/ic-radio-group.js +8 -0
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-toast.js +1 -1
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-1f9cb805.entry.js +2 -0
- package/dist/core/p-1f9cb805.entry.js.map +1 -0
- package/dist/core/p-2f7e6e38.entry.js +2 -0
- package/dist/core/p-2f7e6e38.entry.js.map +1 -0
- package/dist/core/p-b2c433e2.entry.js +2 -0
- package/dist/core/p-b2c433e2.entry.js.map +1 -0
- package/dist/core/{p-355c8532.entry.js → p-bee3fdb0.entry.js} +2 -2
- package/dist/core/p-bee3fdb0.entry.js.map +1 -0
- package/dist/core/p-ec9edecf.entry.js +2 -0
- package/dist/core/p-ec9edecf.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-button_3.entry.js +5 -2
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-data-table.entry.js +5 -0
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +2 -2
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +7 -0
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +1 -1
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +6 -2
- package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +4 -0
- package/dist/types/components.d.ts +9 -4
- package/hydrate/index.js +20 -5
- package/package.json +3 -3
- package/dist/core/p-355c8532.entry.js.map +0 -1
- package/dist/core/p-413e68be.entry.js +0 -2
- package/dist/core/p-413e68be.entry.js.map +0 -1
- package/dist/core/p-84eaa486.entry.js +0 -2
- package/dist/core/p-84eaa486.entry.js.map +0 -1
- package/dist/core/p-a787bba7.entry.js +0 -2
- package/dist/core/p-a787bba7.entry.js.map +0 -1
- package/dist/core/p-e9f5ebb3.entry.js +0 -2
- package/dist/core/p-e9f5ebb3.entry.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-data-table.js","sourceRoot":"","sources":["../../../src/components/ic-data-table/ic-data-table.tsx"],"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YAAY;gBAC/C,CAAC,CAAC,GAAG,YAAY,WAAW,iBAAiB,EAAE;gBAC/C,CAAC,CAAC,gBAAgB,CAChB,CACP,CACG,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Element,\n h,\n Prop,\n State,\n Listen,\n Watch,\n Fragment,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport unsortedIcon from \"./assets/unsorted-icon.svg\";\nimport ascendingIcon from \"./assets/ascending-icon.svg\";\nimport descendingIcon from \"./assets/descending-icon.svg\";\nimport {\n IcDataTableColumnDataTypes,\n IcDataTableColumnObject,\n IcDataTableDensityOptions,\n IcDataTableRowHeights,\n IcDataTableSortOrderOptions,\n IcDataTableTruncationTypes,\n IcDensityUpdateEventDetail,\n} from \"./ic-data-table.types\";\nimport { IcThemeForegroundNoDefault } from \"@ukic/web-components/dist/types/utils/types\";\nimport { IcPaginationBarOptions } from \"../../utils/types\";\n// Unable to import helper functions via @ukic/web-components\nimport {\n getSlotContent,\n isEmptyString,\n isSlotUsed,\n pxToRem,\n debounce,\n} from \"../../utils/helpers\";\n\n/**\n * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.\n * @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.\n * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.\n * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.\n * @slot pagination-bar - A custom ic-pagination-bar can be slotted below the data to provide enhanced control over how the data is interacted with when being fetched externally.\n */\n@Component({\n tag: \"ic-data-table\",\n styleUrl: \"ic-data-table.css\",\n shadow: true,\n})\nexport class DataTable {\n private DENSITY_HEIGHT_MULTIPLIER = {\n dense: 0.8,\n default: 1,\n spacious: 1.2,\n };\n\n private DENSITY_PADDING_HEIGHT_DIFF = {\n dense: 8,\n default: 16,\n spacious: 20,\n };\n\n private SORT_ICONS = {\n unsorted: unsortedIcon,\n ascending: ascendingIcon,\n descending: descendingIcon,\n };\n\n private hasLoadedForOneSecond: boolean = true;\n private loadingIndicator: HTMLIcLoadingIndicatorElement;\n private timerStarted: number;\n private resizeObserver: ResizeObserver = null;\n private SHOW_HIDE_STRING = \"show-hide\";\n private SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;\n private TOOLTIP_STRING = \"tooltip\";\n private TOOLTIP = `ic-${this.TOOLTIP_STRING}`;\n private TEXT_WRAP_STRING = \"text-wrap\";\n private TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;\n private dataUpdated = false;\n private tableSorted: boolean;\n private rowHeightSet = false;\n private initialLoad: boolean = false;\n private icPageChangeEvent: boolean = false;\n private itemsPerPageChange: boolean = false;\n private DATA_ROW_HEIGHT_STRING = \"data-row-height\";\n private previousItemsPerPage: number;\n private DEFAULT_LINE_HEIGHT = 24;\n private densityUpdate: boolean = false;\n private previousPaginationPage: number;\n\n @Element() el: HTMLIcDataTableElement;\n\n @State() fromRow: number = 0;\n\n @State() previousRowsPerPage: number;\n\n @State() rowsPerPage: number;\n\n @State() scrollable: boolean = false;\n\n @State() scrollOffset: number = 0;\n\n @State() selectedRow: object;\n\n @State() sortedColumn: string;\n\n @State() sortedColumnOrder: IcDataTableSortOrderOptions;\n\n @State() toRow: number;\n\n @State() currentRowHeight: number;\n\n /**\n * The title for the table only visible to screen readers.\n */\n @Prop() caption!: string;\n\n /**\n * The column headers for the table.\n */\n @Prop() columns!: IcDataTableColumnObject[];\n\n /**\n * The row content for the table.\n */\n @Prop() data: { [key: string]: any }[];\n\n /**\n * Set the density of the table including font and padding.\n */\n @Prop({ mutable: true }) density?: IcDataTableDensityOptions = \"default\";\n\n /**\n * Applies a border to the table container.\n */\n @Prop() embedded?: boolean = false;\n\n /**\n * Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method.\n */\n @Prop({ mutable: true }) globalRowHeight?: IcDataTableRowHeights = \"auto\";\n\n /**\n * If `true`, column headers will not be visible.\n */\n @Prop() hideColumnHeaders?: boolean = false;\n\n /**\n * When set to `true`, the full table will show a loading state, featuring a radial indicator.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n /**\n * Sets the props for the circular loading indicator used in the loading state.\n */\n @Prop() loadingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n };\n\n /**\n * The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component.\n */\n @Prop() minimumLoadingDisplayDuration?: number = 1000;\n\n /**\n * Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored.\n */\n @Prop() paginationBarOptions?: IcPaginationBarOptions = {\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n };\n\n /**\n * If `true`, adds a pagination bar to the bottom of the table.\n */\n @Prop() showPagination?: boolean = false;\n\n /**\n * If `true`, allows table columns to be sorted using applied sort buttons.\n */\n @Prop() sortable?: boolean = false;\n\n /**\n * Sets the order columns will be sorted in and allows for 'default' sorts to be added.\n */\n @Prop() sortOptions?: {\n sortOrders: IcDataTableSortOrderOptions[];\n defaultColumn?: string;\n } = {\n sortOrders: [\"unsorted\", \"ascending\", \"descending\"],\n defaultColumn: \"\",\n };\n\n /**\n * If `true`, column headers will remain at the top of the table when scrolling vertically.\n */\n @Prop() stickyColumnHeaders?: boolean = false;\n\n /**\n * If `true`, row headers will remain to the left when scrolling horizontally.\n */\n @Prop() stickyRowHeaders?: boolean = false;\n\n /**\n * Sets the method used to truncate longer text in cells where textWrap is `false`.\n * The `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\"/\"See less\" buttons.\n */\n @Prop() truncationPattern?: IcDataTableTruncationTypes;\n\n /**\n * If `true`, the table displays a linear loading indicator below the header row to indicate an updating state.\n */\n @Prop() updating?: boolean = false;\n\n /**\n * Sets the props for the linear loading indicator used in the updating state.\n */\n @Prop() updatingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n };\n\n /**\n * Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\n * If the function returns `null`, that row's height will be set to the `globalRowHeight` property.\n */\n @Prop({ mutable: true }) variableRowHeight?: (params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null;\n\n /**\n * Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table.\n */\n @Event() icRowHeightChange: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.rowsPerPage = Number(\n this.paginationBarOptions.itemsPerPageOptions[0].value\n );\n this.previousRowsPerPage = this.rowsPerPage;\n this.toRow = this.rowsPerPage;\n this.sortedColumn = this.sortOptions.defaultColumn;\n this.sortedColumnOrder = this.sortOptions.sortOrders[0];\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: this.data?.length > 0,\n };\n this.initialLoad = true;\n this.previousItemsPerPage = this.rowsPerPage;\n }\n\n componentDidLoad(): void {\n const tableElement = this.el.shadowRoot.querySelector(\"table\");\n const tableContainer = this.el.shadowRoot.querySelector(\".table-container\");\n\n if (this.dataUpdated) {\n this.dataUpdated = false;\n }\n\n if (\n tableElement?.clientHeight > tableContainer?.clientHeight ||\n tableElement?.clientWidth > tableContainer?.clientWidth\n ) {\n this.scrollable = true;\n }\n if (this.loading) {\n this.startLoadingTimer();\n this.showLoadingIndicator();\n }\n\n if (this.truncationPattern) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {\n this.dataTruncation(typographyEl);\n }\n }\n );\n\n this.debounceDataTruncation();\n }\n\n if (this.globalRowHeight !== \"auto\") {\n this.updateSetRowHeight();\n }\n }\n\n componentDidUpdate(): void {\n this.truncateUpdatedData();\n }\n\n private truncateUpdatedData() {\n if (this.dataUpdated) {\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.resetShowHideTruncation();\n }\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.dataUpdated = false;\n }\n\n if (this.tableSorted) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.tableSorted = false;\n }\n\n // This function recalculates the tooltip truncation when the rowHeight has been set.\n // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete\n if (this.rowHeightSet) {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n // If the set row height is bigger than the cell container even\n // with textWrap, set the row height\n if (\n !cellContainer?.style?.height &&\n rowHeight > cellContainer.clientHeight\n ) {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n\n if (this.truncationPattern) {\n // If the set row height is bigger than the typography truncation wrapper\n // scroll height, remove see more / see less button\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const showHideBtn =\n typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n showHideBtn &&\n truncWrapper?.scrollHeight <= cellContainer.clientHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n }\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n } else {\n this.updateSetRowHeight(typographyEl);\n }\n }\n );\n\n this.rowHeightSet = false;\n }\n\n // Only run truncation on the new rows\n // when the number of items per page has increased\n if (this.itemsPerPageChange) {\n const allRows = this.el.shadowRoot.querySelectorAll(\".table-row\");\n\n if (this.rowsPerPage > this.previousItemsPerPage) {\n const newRows = Array.from(allRows).slice(this.previousItemsPerPage);\n\n newRows.forEach((row) => {\n row\n .querySelectorAll(\"ic-typography\")\n .forEach((typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n });\n }\n\n this.previousItemsPerPage = this.rowsPerPage;\n this.itemsPerPageChange = false;\n }\n\n if (!this.initialLoad && this.icPageChangeEvent) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n // set truncation to see more if opened and next/previous page is pressed\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n typographyEl?.scrollHeight > cellContainer.clientHeight &&\n !showHideBtn\n ) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n });\n }\n\n this.icPageChangeEvent = false;\n }\n\n if (this.densityUpdate) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n\n this.densityUpdate = false;\n }\n }\n\n private updateSetRowHeight = (typographyEl?: HTMLIcTypographyElement) => {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n\n if (typographyEl) {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(\"height\");\n }\n } else {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(\"height\");\n }\n }\n );\n }\n };\n\n private createShowHideTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.checkMaxLines(typographyEl.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT)}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.height = null;\n }\n\n private debounceDataTruncation = () => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {\n this.resizeObserver = new ResizeObserver(\n // This gets triggered twice due to updated data and see more/see less button\n debounce(() => {\n // console.log(\"resizeObserver triggered\");\n this.dataTruncation(typographyEl);\n }, 200) as ResizeObserverCallback\n );\n\n this.resizeObserver.observe(typographyEl);\n }\n }\n );\n };\n\n private getLines = (height: number): number =>\n Math.floor(height / this.DEFAULT_LINE_HEIGHT);\n\n private truncate = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) => {\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n //24 is the height of a single line\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.addTooltipTruncation(typographyEl, cellContainer, tooltip);\n }\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }\n } else {\n if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n\n cellContainer.appendChild(typographyEl);\n tooltip.remove();\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\"))\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n };\n\n private addTooltipTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n\n if (!tooltip) {\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private addShowHideTruncation(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement\n ) {\n cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);\n this.createShowHideTruncation(typographyEl, cellContainer);\n }\n\n private dataTruncation = (typographyEl: HTMLIcTypographyElement) => {\n // Tooltip truncation mentioned in AC. Will need revisiting\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n if (\n cellContainer?.classList.contains(\"data-type-element\") ||\n this.dataUpdated\n ) {\n return;\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n typographyEl.shadowRoot.querySelector(\"button\")\n ) {\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n // If the see more/see less is present and the max lines is equal to the cell container\n // remove the see more/see less button\n if (showHideBtn) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n\n if (\n this.getLines(truncWrapper.scrollHeight) ===\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n }\n\n // Deals with setting and resetting row height and re-truncating data\n if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n // cellContainer.clientHeight - 24 removes the extra line by see more/see less\n if (\n truncWrapper &&\n cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n if (typographyEl.scrollHeight > cellContainer.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n return;\n }\n }\n\n if (\n typographyEl?.scrollHeight > 0 &&\n cellContainer?.clientHeight > 0 &&\n typographyEl?.scrollHeight === cellContainer?.clientHeight\n ) {\n if (tooltip) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n return;\n }\n\n this.truncate(typographyEl, cellContainer, tooltip);\n };\n\n private getTruncWrapper(typographyEl: HTMLIcTypographyElement) {\n return typographyEl.shadowRoot.querySelector(\".trunc-wrapper\");\n }\n\n // Set the height to initial if row height is set and the show / hide truncation\n // is clicked\n @Listen(\"typographyTruncationExpandToggle\")\n handleTypographyTruncationExpandToggle({\n detail,\n }: CustomEvent<{\n expanded: boolean;\n typographyEl: HTMLIcTypographyElement;\n }>) {\n const { expanded, typographyEl } = detail;\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (cellContainer.style.height && expanded) {\n cellContainer.style.height = \"inherit\";\n }\n }\n\n @Listen(\"icPageChange\")\n handlePageChange({ detail, target }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.fromRow = (detail.value - 1) * this.rowsPerPage;\n this.toRow = this.fromRow + this.rowsPerPage;\n const tableRowsContainer = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n );\n if (this.previousRowsPerPage === this.rowsPerPage) {\n tableRowsContainer.scrollTop = 0;\n } else if (this.previousRowsPerPage < this.rowsPerPage) {\n tableRowsContainer.scrollTop = this.scrollOffset;\n this.previousRowsPerPage = this.rowsPerPage;\n } else {\n this.previousRowsPerPage = this.rowsPerPage;\n }\n }\n\n if (!this.initialLoad && this.previousPaginationPage !== detail.value) {\n // This is to prevent icPageChange from triggering truncation on first load\n this.icPageChangeEvent = true;\n }\n\n this.previousPaginationPage = detail.value;\n this.initialLoad = false;\n }\n\n @Listen(\"icItemsPerPageChange\")\n handleItemsPerPageChange({\n detail,\n target,\n }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.previousRowsPerPage = this.rowsPerPage;\n this.rowsPerPage = detail.value;\n }\n\n this.itemsPerPageChange = true;\n }\n\n @Listen(\"icTableDensityUpdate\")\n handleDensityChange(ev: CustomEvent<IcDensityUpdateEventDetail>): void {\n this.density = ev.detail.value;\n }\n\n @Listen(\"click\", { target: \"window\" })\n clickListener(ev: MouseEvent): void {\n if (ev.target !== this.el) this.selectedRow = undefined;\n }\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n if (newValue) this.startLoadingTimer();\n\n if (this.loading) {\n setTimeout(() => {\n this.showLoadingIndicator();\n }, 500);\n }\n }\n\n @Watch(\"truncationPattern\")\n truncationPatternHandler(newValue: IcDataTableTruncationTypes): void {\n if (newValue === this.SHOW_HIDE_STRING) {\n this.updateTruncationTooltip(true);\n\n // Not using debounceDataTruncation here due to resizeObserver not being triggered\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltip);\n }\n );\n }\n\n if (newValue === this.TOOLTIP_STRING) {\n // ResizeObserver is trigger here due to the see more/see less links being removed.\n // The resizeObserver will also apply the tooltip where relevant\n this.resetShowHideTruncation();\n }\n }\n\n @Watch(\"data\")\n async dataHandler(newData: { [key: string]: any }[]) {\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: newData?.length > 0,\n };\n if (this.loading) {\n !this.hasLoadedForOneSecond\n ? setTimeout(\n () => (this.loading = false),\n this.minimumLoadingDisplayDuration -\n (Date.now() - this.timerStarted)\n )\n : (this.loading = false);\n }\n if (this.updating) this.updating = false;\n\n this.dataUpdated = true;\n }\n\n @Watch(\"density\")\n async densityHandler() {\n this.densityUpdate = true;\n }\n\n private removeTextWrap = (): void => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tableCell = typographyEl.closest(\"td\");\n if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {\n tableCell.classList.remove(this.TEXT_WRAP_STRING);\n }\n }\n );\n };\n\n private getCellContainer = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLElement => {\n return typographyEl.closest(\".cell-container\");\n };\n\n private deleteTextWrapDataKey = (\n array: IcDataTableColumnObject[] | object[]\n ) =>\n Array.isArray(array) &&\n array.forEach((val) => val.textWrap && delete val.textWrap);\n\n private resetShowHideTruncation(typographyEl?: HTMLIcTypographyElement) {\n if (typographyEl) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n truncWrapper?.scrollHeight > cellContainer?.clientHeight &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\")) &&\n Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT) !==\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n typographyEl.checkMaxLines(truncWrapper.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(\n cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT\n )}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.height = null;\n } else {\n typographyEl.resetTruncation().then(() => {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n });\n }\n } else {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n typographyEl.resetTruncation().then(() => {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n });\n });\n }\n }\n\n @Watch(\"globalRowHeight\")\n @Watch(\"variableRowHeight\")\n rowHeightChangeHandler(newValue: number, oldValue: number): void {\n if (+newValue !== +oldValue) {\n this.deleteTextWrapDataKey(this.data);\n this.deleteTextWrapDataKey(this.columns);\n this.removeTextWrap();\n\n this.icRowHeightChange.emit();\n\n this.rowHeightSet = true;\n }\n }\n\n /**\n * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.\n */\n @Method()\n async resetRowHeights(rowHeight?: number | \"auto\"): Promise<void> {\n this.globalRowHeight = rowHeight || \"auto\";\n this.variableRowHeight = null;\n }\n\n private showLoadingIndicator() {\n this.loadingIndicator.classList.add(\"show\");\n }\n\n private startLoadingTimer = (): void => {\n this.hasLoadedForOneSecond = false;\n this.timerStarted = Date.now();\n setTimeout(() => {\n this.hasLoadedForOneSecond = true;\n this.timerStarted = null;\n }, this.minimumLoadingDisplayDuration);\n };\n\n private isObject = (value: any) => typeof value === \"object\";\n\n private notDefaultDensity = () => this.density !== \"default\";\n\n private getCellContent = (\n cell: any,\n dataType: IcDataTableColumnDataTypes\n ): any => {\n switch (dataType) {\n case \"element\":\n return undefined;\n case \"date\":\n return (\n cell instanceof Date ? cell : new Date(cell)\n ).toLocaleDateString();\n default:\n return cell;\n }\n };\n\n private getCellAlignment = (\n cell: any,\n alignment: \"horizontal\" | \"vertical\"\n ) => {\n if (this.isObject(cell) && Object.keys(cell).includes(\"cellAlignment\")) {\n return this.getObjectValue(\n this.getObjectValue(cell, \"cellAlignment\"),\n alignment\n );\n }\n };\n\n private getCellOptions = (cell: any, key: string) => {\n if (!(this.isObject(cell) && Object.keys(cell).includes(key))) return;\n\n return this.getObjectValue(cell, key);\n };\n\n private createUpdatingIndicator = () => {\n const { appearance, description, max, min, progress } =\n this.updatingOptions || {};\n return (\n <th colSpan={this.columns.length} class=\"updating-state\">\n <ic-loading-indicator\n appearance={appearance}\n description={description || \"Updating table data\"}\n fullWidth={true}\n max={max}\n min={min}\n progress={progress}\n type=\"linear\"\n size=\"small\"\n ></ic-loading-indicator>\n </th>\n );\n };\n\n private setRowHeight = (height: number) => {\n return pxToRem(\n `${\n height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -\n this.DENSITY_PADDING_HEIGHT_DIFF[this.density]\n }px`\n );\n };\n\n private setTruncationClass = () => {\n if (this.truncationPattern) {\n return { [`truncation-${this.truncationPattern}`]: true };\n }\n\n return {};\n };\n\n private createCells = (row: object, rowIndex: number) => {\n const rowValues = Object.values(row);\n const rowKeys = Object.keys(row);\n const index = rowIndex;\n\n const rowOptions = this.getRowOptions(rowKeys, rowValues);\n let rowAlignment: string;\n let rowEmphasis: string;\n\n const headerIndex = rowKeys.indexOf(\"header\");\n if (headerIndex > -1) {\n rowAlignment = this.getObjectValue(\n rowValues[headerIndex],\n \"rowAlignment\"\n );\n rowEmphasis = this.getObjectValue(rowValues[headerIndex], \"emphasis\");\n }\n\n const variableRowHeightVal = this.variableRowHeight?.({\n ...row,\n index,\n });\n const currentRowHeight = variableRowHeightVal\n ? variableRowHeightVal !== \"auto\" && variableRowHeightVal\n : this.globalRowHeight !== \"auto\" && this.globalRowHeight;\n\n return rowValues.map((cell, index) => {\n const columnProps = this.columns[index];\n const cellSlotName = `${columnProps?.key}-${rowIndex}`;\n const hasIcon = this.isObject(cell) && Object.keys(cell).includes(\"icon\");\n const cellValue = (key: string) => this.getObjectValue(cell, key);\n\n if (rowKeys[index] === \"header\") {\n return (\n <th\n scope=\"row\"\n colSpan={cellValue(\"colspan\")}\n class={{\n [\"row-header\"]: true,\n [`row-header-alignment-${cellValue(\"cellAlignment\")}`]:\n !!cellValue(\"cellAlignment\"),\n [\"row-header-sticky\"]: this.stickyRowHeaders,\n }}\n >\n {cellValue(\"title\")}\n </th>\n );\n }\n\n if (rowKeys[index] !== \"rowOptions\") {\n return (\n <td\n class={{\n [\"table-cell\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n <div\n innerHTML={\n columnProps?.dataType === \"element\" &&\n !isSlotUsed(this.el, cellSlotName)\n ? (cell as string)\n : null\n }\n class={{\n \"cell-container\": columnProps?.dataType !== \"element\",\n [`cell-alignment-${\n columnProps?.columnAlignment?.vertical ||\n rowOptions?.rowAlignment?.vertical ||\n rowAlignment ||\n this.getCellAlignment(cell, \"vertical\")\n }`]:\n !!columnProps?.columnAlignment?.vertical ||\n !!rowOptions?.rowAlignment?.vertical ||\n !!rowAlignment ||\n !!this.getCellAlignment(cell, \"vertical\"),\n [`cell-alignment-${\n columnProps?.columnAlignment?.horizontal ||\n rowOptions?.rowAlignment?.horizontal ||\n this.getCellAlignment(cell, \"horizontal\")\n }`]:\n !!columnProps?.columnAlignment?.horizontal ||\n !!rowOptions?.rowAlignment?.horizontal ||\n !!this.getCellAlignment(cell, \"horizontal\"),\n [`data-type-${columnProps?.dataType}`]: true,\n [this.TEXT_WRAP_STRING]:\n columnProps?.textWrap ||\n rowOptions?.textWrap ||\n !!this.getCellOptions(cell, \"textWrap\"),\n [\"cell-icon\"]: hasIcon || !!columnProps?.icon?.icon,\n ...this.setTruncationClass(),\n }}\n style={{\n height:\n (this.truncationPattern || currentRowHeight) &&\n !columnProps.textWrap &&\n !rowOptions.textWrap &&\n !this.getCellOptions(cell, \"textWrap\") &&\n columnProps?.dataType !== \"element\"\n ? this.setRowHeight(currentRowHeight)\n : null,\n }}\n data-row-height={\n this.truncationPattern || currentRowHeight\n ? this.setRowHeight(currentRowHeight)\n : null\n }\n >\n {isSlotUsed(this.el, cellSlotName) ? (\n <slot name={cellSlotName} />\n ) : (\n <Fragment>\n {isSlotUsed(this.el, `${cellSlotName}-icon`) ? (\n <slot name={`${cellSlotName}-icon`} />\n ) : (\n (hasIcon || columnProps?.icon?.onAllCells) && (\n <span\n class=\"icon\"\n innerHTML={cellValue(\"icon\") || columnProps?.icon.icon}\n ></span>\n )\n )}\n {columnProps?.dataType !== \"element\" &&\n !isSlotUsed(this.el, cellSlotName) && (\n <ic-typography\n variant=\"body\"\n class={{\n [`cell-emphasis-${\n (this.isObject(cell) && cellValue(\"emphasis\")) ||\n columnProps?.emphasis ||\n rowEmphasis\n }`]:\n (this.isObject(cell) && !!cellValue(\"emphasis\")) ||\n !!columnProps?.emphasis ||\n !!rowEmphasis,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {this.isObject(cell) &&\n columnProps?.dataType !== \"date\" ? (\n Object.keys(cell).includes(\"href\") ? (\n <ic-link href={cellValue(\"href\")}>\n {cellValue(\"data\")}\n </ic-link>\n ) : (\n cellValue(\"data\")\n )\n ) : (\n this.getCellContent(cell, columnProps?.dataType)\n )}\n </ic-typography>\n )}\n </Fragment>\n )}\n </div>\n </td>\n );\n }\n });\n };\n\n private createColumnHeaders = () => {\n return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (\n <th\n scope=\"col\"\n class={{\n [\"column-header\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [\"updating-state-headers\"]: this.updating && !this.loading,\n }}\n colSpan={colspan}\n >\n <div\n class={{\n \"column-header-inner-container\": true,\n [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,\n }}\n >\n {isSlotUsed(this.el, `${key}-column-icon`) ? (\n <slot name={`${key}-column-icon`} />\n ) : (\n icon &&\n !icon.hideOnHeader && (\n <span class=\"icon\" innerHTML={icon.icon}></span>\n )\n )}\n <ic-typography\n variant=\"body\"\n class={{\n [\"column-header-text\"]: true,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n {this.sortable && (\n <ic-button\n variant=\"icon\"\n id={`sort-button-${key}`}\n aria-label={this.getSortButtonLabel(key)}\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.sortRows(key)}\n innerHTML={\n this.SORT_ICONS[\n this.sortedColumn === key\n ? this.sortedColumnOrder\n : \"unsorted\"\n ]\n }\n class={{\n [\"sort-button\"]: true,\n [\"sort-button-unsorted\"]:\n this.sortedColumn !== key ||\n this.sortedColumnOrder === \"unsorted\",\n }}\n ></ic-button>\n )}\n </div>\n </th>\n ));\n };\n\n private onRowClick = (row: object) => {\n this.selectedRow =\n this.selectedRow !== row && !this.loading && !this.updating && row;\n };\n\n private createRows = () => {\n const data = this.showPagination\n ? this.data.slice(this.fromRow, this.toRow)\n : this.data.slice();\n\n /**\n * Ensures that createCells has a value in data to map over to actually render the slot.\n * Removes the need for the user to add it multiple times.\n */\n this.columns.forEach(({ key }) => {\n data.forEach((row, rowIndex) => {\n const cellSlotName = `${key}-${rowIndex}`;\n if (isSlotUsed(this.el, cellSlotName)) {\n row[key] = getSlotContent(this.el, cellSlotName);\n }\n });\n });\n\n return data\n .sort(!this.sortable ? undefined : this.getSortFunction())\n .map((row, index) => {\n return (\n <tr\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.onRowClick(row)}\n class={{\n [\"table-row\"]: true,\n [\"table-row-selected\"]: this.selectedRow === row,\n }}\n >\n {this.createCells(row, index)}\n </tr>\n );\n });\n };\n\n private getObjectValue = (cell: object, key: string) => {\n return Object.values(cell)[Object.keys(cell).indexOf(key)];\n };\n\n private getSortButtonLabel = (key: string) => {\n let label = \"\";\n const getNextSortOption = (option: IcDataTableSortOrderOptions) => {\n const sortOrders = this.sortOptions.sortOrders;\n return sortOrders[(sortOrders.indexOf(option) + 1) % sortOrders.length];\n };\n\n if (this.sortedColumn === key) {\n const sortOption = getNextSortOption(this.sortedColumnOrder);\n label = sortOption !== \"unsorted\" ? `Sort ${sortOption}` : \"Remove sort\";\n } else {\n label = `Sort ${getNextSortOption(\"unsorted\")}`;\n }\n\n return label;\n };\n\n private getComparison = (targetRow: any, comparisonRow: any): number => {\n const targetRowValue = targetRow[this.sortedColumn];\n const comparisonRowValue = comparisonRow[this.sortedColumn];\n return this.columns.find((col) => col.key === this.sortedColumn)\n .dataType === \"date\"\n ? new Date(targetRowValue).valueOf() -\n new Date(comparisonRowValue).valueOf()\n : String(\n this.isObject(targetRowValue)\n ? Object.values(targetRowValue)[0]\n : targetRowValue\n ).localeCompare(\n String(\n this.isObject(comparisonRowValue)\n ? Object.values(comparisonRowValue)[0]\n : comparisonRowValue\n ),\n undefined,\n { numeric: true, sensitivity: \"base\" }\n );\n };\n\n private getSortFunction = () => {\n switch (this.sortedColumnOrder) {\n case \"ascending\":\n return (a: any, b: any) => this.getComparison(a, b);\n case \"descending\":\n return (a: any, b: any) => this.getComparison(b, a);\n default:\n return undefined;\n }\n };\n\n private sortRows = (column: string) => {\n const sortButton = this.el.shadowRoot.querySelector(\n `#sort-button-${column}`\n ) as HTMLIcButtonElement;\n\n const sortOrders = this.sortOptions.sortOrders;\n\n if (column !== this.sortedColumn) {\n if (this.sortedColumn) {\n const previousSortedButton = this.el.shadowRoot.querySelector(\n `#sort-button-${this.sortedColumn}`\n ) as HTMLIcButtonElement;\n previousSortedButton.setAttribute(\n \"aria-label\",\n this.getSortButtonLabel(column)\n ); // Passing through unsorted column returns correct label for newly unsorted column\n }\n this.sortedColumn = column;\n this.sortedColumnOrder = \"unsorted\";\n }\n\n let nextSortOrderIndex = sortOrders.indexOf(this.sortedColumnOrder) + 1;\n\n if (nextSortOrderIndex > sortOrders.length - 1) {\n nextSortOrderIndex = 0;\n }\n\n this.sortedColumnOrder = sortOrders[nextSortOrderIndex];\n\n sortButton.setAttribute(\"aria-label\", this.getSortButtonLabel(column));\n\n this.tableSorted = true;\n };\n\n private getTypographyElements = (): HTMLIcTypographyElement[] => {\n return Array.from(\n this.el.shadowRoot.querySelectorAll(\n \"ic-typography:not(.column-header-text)\"\n )\n );\n };\n\n private getTooltip = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLIcTooltipElement => {\n return typographyEl.closest(this.TOOLTIP);\n };\n\n private updateTruncationTooltip = (removeTooltipOnly: boolean = false) => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tooltip = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n return;\n }\n\n this.regenerateTooltip(\n cellContainer,\n typographyEl,\n tooltip,\n removeTooltipOnly\n );\n }\n );\n };\n\n private updateScrollOffset = () => {\n this.scrollOffset = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n ).scrollTop;\n };\n\n private getRowOptions(rowKeys: string[], rowValues: any[]) {\n const rowOptionsIndex = rowKeys.indexOf(\"rowOptions\");\n return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];\n }\n\n private regenerateTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement,\n removeTooltipOnly?: boolean\n ) {\n // When sorting the table, instead of regenerating the tooltip,\n // the tooltip details are updated\n if (tooltip) {\n if (this.tableSorted) {\n tooltip.setAttribute(\"target\", typographyEl.id);\n tooltip.setAttribute(\"label\", typographyEl.textContent);\n } else {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n if (removeTooltipOnly) {\n return;\n }\n }\n\n // This add line clamp to data only when\n // the data object has been updated\n if (!typographyEl.getAttribute(\"style\") && this.dataUpdated) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n // Adding the tableSorted boolean prevents the tooltip\n // being regenerated and flashing\n if (\n typographyEl?.scrollHeight > cellContainer?.clientHeight &&\n !this.tableSorted\n ) {\n if (!typographyEl.getAttribute(\"style\")) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private removeTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement\n ) {\n cellContainer.appendChild(typographyEl);\n if (tooltip) {\n tooltip.remove();\n }\n }\n\n private addLineClampCSS(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.setAttribute(\n \"style\",\n `--ic-line-clamp: ${this.getLines(cellContainer?.clientHeight)}`\n );\n }\n\n private createTruncationTooltip(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n const tooltipEl = document.createElement(\"ic-tooltip\");\n tooltipEl.setAttribute(\"target\", typographyEl.id);\n tooltipEl.setAttribute(\"label\", typographyEl.textContent);\n tooltipEl.classList.add(\"ic-tooltip-overflow\");\n tooltipEl.setExternalPopperProps({\n // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly\n strategy: \"fixed\",\n });\n cellContainer.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n\n render() {\n const {\n caption,\n createColumnHeaders,\n createRows,\n createUpdatingIndicator,\n data,\n hideColumnHeaders,\n loading,\n loadingOptions,\n paginationBarOptions,\n scrollable,\n scrollOffset,\n showPagination,\n sortable,\n sortedColumnOrder,\n sortedColumn,\n stickyColumnHeaders,\n updateScrollOffset,\n updating,\n } = this;\n\n return (\n <div class=\"table-container\">\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <div\n class={{\n [\"table-row-container\"]: true,\n scrollable,\n }}\n tabIndex={scrollable ? 0 : null}\n onScroll={updateScrollOffset}\n >\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <table>\n <caption class=\"table-caption\">{caption}</caption>\n {!hideColumnHeaders && (\n <thead\n class={{\n [\"column-header-sticky\"]: stickyColumnHeaders,\n [\"column-header-overlay\"]:\n stickyColumnHeaders && scrollOffset !== 0,\n }}\n >\n <tr>{createColumnHeaders()}</tr>\n </thead>\n )}\n {updating &&\n !loading &&\n (hideColumnHeaders ? (\n <thead>{createUpdatingIndicator()}</thead>\n ) : (\n createUpdatingIndicator()\n ))}\n {data?.length > 0 && !loading && <tbody>{createRows()}</tbody>}\n </table>\n {!data?.length &&\n !loading &&\n (isSlotUsed(this.el, \"empty-state\") ? (\n <slot name=\"empty-state\" />\n ) : (\n <ic-empty-state\n aligned=\"center\"\n heading=\"No Data\"\n class=\"loading-empty\"\n ></ic-empty-state>\n ))}\n </div>\n {loading && (\n <ic-loading-indicator\n appearance={loadingOptions?.appearance}\n class={{\n \"loading-empty\": loading,\n loading: true,\n \"show-background\": loadingOptions.showBackground,\n }}\n description={loadingOptions.description || \"Loading table data\"}\n label={loadingOptions.label || \"Loading...\"}\n labelDuration={loadingOptions?.labelDuration}\n max={loadingOptions?.max}\n min={loadingOptions?.min}\n progress={loadingOptions?.progress}\n ref={(el: HTMLIcLoadingIndicatorElement) =>\n (this.loadingIndicator = el)\n }\n ></ic-loading-indicator>\n )}\n {(showPagination || isSlotUsed(this.el, \"pagination-bar\")) && (\n <div class=\"pagination-container\">\n {isSlotUsed(this.el, \"pagination-bar\") ? (\n <slot name=\"pagination-bar\" />\n ) : (\n <ic-pagination-bar\n totalItems={data.length}\n type={paginationBarOptions.type}\n rangeLabelType={paginationBarOptions.rangeLabelType}\n showItemsPerPageControl={\n paginationBarOptions.showItemsPerPageControl\n }\n showGoToPageControl={paginationBarOptions.showGoToPageControl}\n itemsPerPageOptions={paginationBarOptions.itemsPerPageOptions}\n alignment={paginationBarOptions.alignment}\n appearance={paginationBarOptions.appearance}\n itemLabel={paginationBarOptions.itemLabel}\n pageLabel={paginationBarOptions.pageLabel}\n hideRangeLabel={paginationBarOptions.hideRangeLabel}\n ></ic-pagination-bar>\n )}\n </div>\n )}\n {sortable && (\n <div class=\"screen-reader-sort-text\" aria-live=\"polite\">\n {sortedColumnOrder !== \"unsorted\" && sortedColumn\n ? `${sortedColumn} sorted ${sortedColumnOrder}`\n : \"table unsorted\"}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ic-data-table.js","sourceRoot":"","sources":["../../../src/components/ic-data-table/ic-data-table.tsx"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EACL,SAAS,EACT,OAAO,EACP,CAAC,EACD,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,GAEN,MAAM,eAAe,CAAC;AACvB,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAa1D,6DAA6D;AAC7D,OAAO,EACL,cAAc,EACd,aAAa,EACb,UAAU,EACV,OAAO,EACP,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AAMH,MAAM,OAAO,SAAS;;QACZ,8BAAyB,GAAG;YAClC,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,GAAG;SACd,CAAC;QAEM,gCAA2B,GAAG;YACpC,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;SACb,CAAC;QAEM,eAAU,GAAG;YACnB,QAAQ,EAAE,YAAY;YACtB,SAAS,EAAE,aAAa;YACxB,UAAU,EAAE,cAAc;SAC3B,CAAC;QAEM,0BAAqB,GAAY,IAAI,CAAC;QAGtC,mBAAc,GAAmB,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Element,\n h,\n Prop,\n State,\n Listen,\n Watch,\n Fragment,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport unsortedIcon from \"./assets/unsorted-icon.svg\";\nimport ascendingIcon from \"./assets/ascending-icon.svg\";\nimport descendingIcon from \"./assets/descending-icon.svg\";\nimport {\n IcDataTableColumnDataTypes,\n IcDataTableColumnObject,\n IcDataTableDensityOptions,\n IcDataTableRowHeights,\n IcDataTableSortOrderOptions,\n IcDataTableTruncationTypes,\n IcDensityUpdateEventDetail,\n IcSortEventDetail,\n} from \"./ic-data-table.types\";\nimport { IcThemeForegroundNoDefault } from \"@ukic/web-components/dist/types/utils/types\";\nimport { IcPaginationBarOptions } from \"../../utils/types\";\n// Unable to import helper functions via @ukic/web-components\nimport {\n getSlotContent,\n isEmptyString,\n isSlotUsed,\n pxToRem,\n debounce,\n} from \"../../utils/helpers\";\n\n/**\n * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.\n * @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.\n * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.\n * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.\n * @slot pagination-bar - A custom ic-pagination-bar can be slotted below the data to provide enhanced control over how the data is interacted with when being fetched externally.\n */\n@Component({\n tag: \"ic-data-table\",\n styleUrl: \"ic-data-table.css\",\n shadow: true,\n})\nexport class DataTable {\n private DENSITY_HEIGHT_MULTIPLIER = {\n dense: 0.8,\n default: 1,\n spacious: 1.2,\n };\n\n private DENSITY_PADDING_HEIGHT_DIFF = {\n dense: 8,\n default: 16,\n spacious: 20,\n };\n\n private SORT_ICONS = {\n unsorted: unsortedIcon,\n ascending: ascendingIcon,\n descending: descendingIcon,\n };\n\n private hasLoadedForOneSecond: boolean = true;\n private loadingIndicator: HTMLIcLoadingIndicatorElement;\n private timerStarted: number;\n private resizeObserver: ResizeObserver = null;\n private SHOW_HIDE_STRING = \"show-hide\";\n private SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;\n private TOOLTIP_STRING = \"tooltip\";\n private TOOLTIP = `ic-${this.TOOLTIP_STRING}`;\n private TEXT_WRAP_STRING = \"text-wrap\";\n private TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;\n private dataUpdated = false;\n private tableSorted: boolean;\n private rowHeightSet = false;\n private initialLoad: boolean = false;\n private icPageChangeEvent: boolean = false;\n private itemsPerPageChange: boolean = false;\n private DATA_ROW_HEIGHT_STRING = \"data-row-height\";\n private previousItemsPerPage: number;\n private DEFAULT_LINE_HEIGHT = 24;\n private densityUpdate: boolean = false;\n private previousPaginationPage: number;\n\n @Element() el: HTMLIcDataTableElement;\n\n @State() fromRow: number = 0;\n\n @State() previousRowsPerPage: number;\n\n @State() rowsPerPage: number;\n\n @State() scrollable: boolean = false;\n\n @State() scrollOffset: number = 0;\n\n @State() selectedRow: object;\n\n @State() sortedColumn: string;\n\n @State() sortedColumnOrder: IcDataTableSortOrderOptions;\n\n @State() toRow: number;\n\n @State() currentRowHeight: number;\n\n /**\n * The title for the table only visible to screen readers.\n */\n @Prop() caption!: string;\n\n /**\n * The column headers for the table.\n */\n @Prop() columns!: IcDataTableColumnObject[];\n\n /**\n * The row content for the table.\n */\n @Prop() data: { [key: string]: any }[];\n\n /**\n * Set the density of the table including font and padding.\n */\n @Prop({ mutable: true }) density?: IcDataTableDensityOptions = \"default\";\n\n /**\n * Applies a border to the table container.\n */\n @Prop() embedded?: boolean = false;\n\n /**\n * Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method.\n */\n @Prop({ mutable: true }) globalRowHeight?: IcDataTableRowHeights = \"auto\";\n\n /**\n * If `true`, column headers will not be visible.\n */\n @Prop() hideColumnHeaders?: boolean = false;\n\n /**\n * When set to `true`, the full table will show a loading state, featuring a radial indicator.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n /**\n * Sets the props for the circular loading indicator used in the loading state.\n */\n @Prop() loadingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n };\n\n /**\n * The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component.\n */\n @Prop() minimumLoadingDisplayDuration?: number = 1000;\n\n /**\n * Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored.\n */\n @Prop() paginationBarOptions?: IcPaginationBarOptions = {\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n };\n\n /**\n * If `true`, adds a pagination bar to the bottom of the table.\n */\n @Prop() showPagination?: boolean = false;\n\n /**\n * If `true`, allows table columns to be sorted using applied sort buttons.\n */\n @Prop() sortable?: boolean = false;\n\n /**\n * Sets the order columns will be sorted in and allows for 'default' sorts to be added.\n */\n @Prop() sortOptions?: {\n sortOrders: IcDataTableSortOrderOptions[];\n defaultColumn?: string;\n } = {\n sortOrders: [\"unsorted\", \"ascending\", \"descending\"],\n defaultColumn: \"\",\n };\n\n /**\n * If `true`, column headers will remain at the top of the table when scrolling vertically.\n */\n @Prop() stickyColumnHeaders?: boolean = false;\n\n /**\n * If `true`, row headers will remain to the left when scrolling horizontally.\n */\n @Prop() stickyRowHeaders?: boolean = false;\n\n /**\n * Sets the method used to truncate longer text in cells where textWrap is `false`.\n * The `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\" / \"See less\" buttons.\n */\n @Prop() truncationPattern?: IcDataTableTruncationTypes;\n\n /**\n * If `true`, the table displays a linear loading indicator below the header row to indicate an updating state.\n */\n @Prop() updating?: boolean = false;\n\n /**\n * Sets the props for the linear loading indicator used in the updating state.\n */\n @Prop() updatingOptions?: {\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n };\n\n /**\n * Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\n * If the function returns `null`, that row's height will be set to the `globalRowHeight` property.\n */\n @Prop({ mutable: true }) variableRowHeight?: (params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null;\n\n /**\n * Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table.\n */\n @Event() icRowHeightChange: EventEmitter<void>;\n\n /**\n * Emitted when a column sort button is clicked.\n */\n @Event() icSortChange: EventEmitter<IcSortEventDetail>;\n\n disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.rowsPerPage = Number(\n this.paginationBarOptions.itemsPerPageOptions[0].value\n );\n this.previousRowsPerPage = this.rowsPerPage;\n this.toRow = this.rowsPerPage;\n this.sortedColumn = this.sortOptions.defaultColumn;\n this.sortedColumnOrder = this.sortOptions.sortOrders[0];\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: this.data?.length > 0,\n };\n this.initialLoad = true;\n this.previousItemsPerPage = this.rowsPerPage;\n }\n\n componentDidLoad(): void {\n const tableElement = this.el.shadowRoot.querySelector(\"table\");\n const tableContainer = this.el.shadowRoot.querySelector(\".table-container\");\n\n if (this.dataUpdated) {\n this.dataUpdated = false;\n }\n\n if (\n tableElement?.clientHeight > tableContainer?.clientHeight ||\n tableElement?.clientWidth > tableContainer?.clientWidth\n ) {\n this.scrollable = true;\n }\n if (this.loading) {\n this.startLoadingTimer();\n this.showLoadingIndicator();\n }\n\n if (this.truncationPattern) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {\n this.dataTruncation(typographyEl);\n }\n }\n );\n\n this.debounceDataTruncation();\n }\n\n if (this.globalRowHeight !== \"auto\") {\n this.updateSetRowHeight();\n }\n }\n\n componentDidUpdate(): void {\n this.truncateUpdatedData();\n }\n\n private truncateUpdatedData() {\n if (this.dataUpdated) {\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.resetShowHideTruncation();\n }\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.dataUpdated = false;\n }\n\n if (this.tableSorted) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.tableSorted = false;\n }\n\n // This function recalculates the tooltip truncation when the rowHeight has been set.\n // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete\n if (this.rowHeightSet) {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n // If the set row height is bigger than the cell container even\n // with textWrap, set the row height\n if (\n !cellContainer?.style?.height &&\n rowHeight > cellContainer.clientHeight\n ) {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n\n if (this.truncationPattern) {\n // If the set row height is bigger than the typography truncation wrapper\n // scroll height, remove see more / see less button\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const showHideBtn =\n typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n showHideBtn &&\n truncWrapper?.scrollHeight <= cellContainer.clientHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n }\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n } else {\n this.updateSetRowHeight(typographyEl);\n }\n }\n );\n\n this.rowHeightSet = false;\n }\n\n // Only run truncation on the new rows\n // when the number of items per page has increased\n if (this.itemsPerPageChange) {\n const allRows = this.el.shadowRoot.querySelectorAll(\".table-row\");\n\n if (this.rowsPerPage > this.previousItemsPerPage) {\n const newRows = Array.from(allRows).slice(this.previousItemsPerPage);\n\n newRows.forEach((row) => {\n row\n .querySelectorAll(\"ic-typography\")\n .forEach((typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n });\n }\n\n this.previousItemsPerPage = this.rowsPerPage;\n this.itemsPerPageChange = false;\n }\n\n if (!this.initialLoad && this.icPageChangeEvent) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n // set truncation to see more if opened and next/previous page is pressed\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n\n if (\n typographyEl?.scrollHeight > cellContainer.clientHeight &&\n !showHideBtn\n ) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n });\n }\n\n this.icPageChangeEvent = false;\n }\n\n if (this.densityUpdate) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltipEl);\n });\n\n this.densityUpdate = false;\n }\n }\n\n private updateSetRowHeight = (typographyEl?: HTMLIcTypographyElement) => {\n const fontSize = parseInt(\n getComputedStyle(document.documentElement).fontSize\n );\n\n if (typographyEl) {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(\"height\");\n }\n } else {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n const rowHeight =\n fontSize *\n parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));\n\n if (typographyEl.scrollHeight > rowHeight) {\n cellContainer.style.removeProperty(\"height\");\n }\n }\n );\n }\n };\n\n private createShowHideTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.checkMaxLines(typographyEl.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT)}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.height = null;\n }\n\n private debounceDataTruncation = () => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n if (!typographyEl.classList.contains(this.TEXT_WRAP_STRING)) {\n this.resizeObserver = new ResizeObserver(\n // This gets triggered twice due to updated data and see more/see less button\n debounce(() => {\n // console.log(\"resizeObserver triggered\");\n this.dataTruncation(typographyEl);\n }, 200) as ResizeObserverCallback\n );\n\n this.resizeObserver.observe(typographyEl);\n }\n }\n );\n };\n\n private getLines = (height: number): number =>\n Math.floor(height / this.DEFAULT_LINE_HEIGHT);\n\n private truncate = (\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) => {\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n //24 is the height of a single line\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.addTooltipTruncation(typographyEl, cellContainer, tooltip);\n }\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }\n } else {\n if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n\n cellContainer.appendChild(typographyEl);\n tooltip.remove();\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\"))\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n };\n\n private addTooltipTruncation(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement,\n tooltip: HTMLIcTooltipElement\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n\n if (!tooltip) {\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private addShowHideTruncation(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement\n ) {\n cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);\n this.createShowHideTruncation(typographyEl, cellContainer);\n }\n\n private dataTruncation = (typographyEl: HTMLIcTypographyElement) => {\n // Tooltip truncation mentioned in AC. Will need revisiting\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n if (\n cellContainer?.classList.contains(\"data-type-element\") ||\n this.dataUpdated\n ) {\n return;\n }\n\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING &&\n typographyEl.shadowRoot.querySelector(\"button\")\n ) {\n const showHideBtn = typographyEl.shadowRoot.querySelector(\"button\");\n // If the see more/see less is present and the max lines is equal to the cell container\n // remove the see more/see less button\n if (showHideBtn) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n\n if (\n this.getLines(truncWrapper.scrollHeight) ===\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n this.resetShowHideTruncation(typographyEl);\n }\n }\n }\n\n // Deals with setting and resetting row height and re-truncating data\n if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n // cellContainer.clientHeight - 24 removes the extra line by see more/see less\n if (\n truncWrapper &&\n cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n if (typographyEl.scrollHeight > cellContainer.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n return;\n }\n }\n\n if (\n typographyEl?.scrollHeight > 0 &&\n cellContainer?.clientHeight > 0 &&\n typographyEl?.scrollHeight === cellContainer?.clientHeight\n ) {\n if (tooltip) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n return;\n }\n\n this.truncate(typographyEl, cellContainer, tooltip);\n };\n\n private getTruncWrapper(typographyEl: HTMLIcTypographyElement) {\n return typographyEl.shadowRoot.querySelector(\".trunc-wrapper\");\n }\n\n // Set the height to initial if row height is set and the show / hide truncation\n // is clicked\n @Listen(\"typographyTruncationExpandToggle\")\n handleTypographyTruncationExpandToggle({\n detail,\n }: CustomEvent<{\n expanded: boolean;\n typographyEl: HTMLIcTypographyElement;\n }>) {\n const { expanded, typographyEl } = detail;\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (cellContainer.style.height && expanded) {\n cellContainer.style.height = \"inherit\";\n }\n }\n\n @Listen(\"icPageChange\")\n handlePageChange({ detail, target }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.fromRow = (detail.value - 1) * this.rowsPerPage;\n this.toRow = this.fromRow + this.rowsPerPage;\n const tableRowsContainer = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n );\n if (this.previousRowsPerPage === this.rowsPerPage) {\n tableRowsContainer.scrollTop = 0;\n } else if (this.previousRowsPerPage < this.rowsPerPage) {\n tableRowsContainer.scrollTop = this.scrollOffset;\n this.previousRowsPerPage = this.rowsPerPage;\n } else {\n this.previousRowsPerPage = this.rowsPerPage;\n }\n }\n\n if (!this.initialLoad && this.previousPaginationPage !== detail.value) {\n // This is to prevent icPageChange from triggering truncation on first load\n this.icPageChangeEvent = true;\n }\n\n this.previousPaginationPage = detail.value;\n this.initialLoad = false;\n }\n\n @Listen(\"icItemsPerPageChange\")\n handleItemsPerPageChange({\n detail,\n target,\n }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.previousRowsPerPage = this.rowsPerPage;\n this.rowsPerPage = detail.value;\n }\n\n this.itemsPerPageChange = true;\n }\n\n @Listen(\"icTableDensityUpdate\")\n handleDensityChange(ev: CustomEvent<IcDensityUpdateEventDetail>): void {\n this.density = ev.detail.value;\n }\n\n @Listen(\"click\", { target: \"window\" })\n clickListener(ev: MouseEvent): void {\n if (ev.target !== this.el) this.selectedRow = undefined;\n }\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n if (newValue) this.startLoadingTimer();\n\n if (this.loading) {\n setTimeout(() => {\n this.showLoadingIndicator();\n }, 500);\n }\n }\n\n @Watch(\"truncationPattern\")\n truncationPatternHandler(newValue: IcDataTableTruncationTypes): void {\n if (newValue === this.SHOW_HIDE_STRING) {\n this.updateTruncationTooltip(true);\n\n // Not using debounceDataTruncation here due to resizeObserver not being triggered\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltip: HTMLIcTooltipElement = this.getTooltip(typographyEl);\n\n this.truncate(typographyEl, cellContainer, tooltip);\n }\n );\n }\n\n if (newValue === this.TOOLTIP_STRING) {\n // ResizeObserver is trigger here due to the see more/see less links being removed.\n // The resizeObserver will also apply the tooltip where relevant\n this.resetShowHideTruncation();\n }\n }\n\n @Watch(\"data\")\n async dataHandler(newData: { [key: string]: any }[]) {\n this.loadingOptions = {\n ...this.loadingOptions,\n showBackground: newData?.length > 0,\n };\n if (this.loading) {\n !this.hasLoadedForOneSecond\n ? setTimeout(\n () => (this.loading = false),\n this.minimumLoadingDisplayDuration -\n (Date.now() - this.timerStarted)\n )\n : (this.loading = false);\n }\n if (this.updating) this.updating = false;\n\n this.dataUpdated = true;\n }\n\n @Watch(\"density\")\n async densityHandler() {\n this.densityUpdate = true;\n }\n\n private removeTextWrap = (): void => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tableCell = typographyEl.closest(\"td\");\n if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {\n tableCell.classList.remove(this.TEXT_WRAP_STRING);\n }\n }\n );\n };\n\n private getCellContainer = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLElement => {\n return typographyEl.closest(\".cell-container\");\n };\n\n private deleteTextWrapDataKey = (\n array: IcDataTableColumnObject[] | object[]\n ) =>\n Array.isArray(array) &&\n array.forEach((val) => val.textWrap && delete val.textWrap);\n\n private resetShowHideTruncation(typographyEl?: HTMLIcTypographyElement) {\n if (typographyEl) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n truncWrapper?.scrollHeight > cellContainer?.clientHeight &&\n !isEmptyString(typographyEl.getAttribute(\"max-lines\")) &&\n Math.floor(cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT) !==\n +typographyEl.getAttribute(\"max-lines\")\n ) {\n typographyEl.checkMaxLines(truncWrapper.scrollHeight);\n typographyEl.setAttribute(\n \"max-lines\",\n `${Math.floor(\n cellContainer?.clientHeight / this.DEFAULT_LINE_HEIGHT\n )}`\n );\n typographyEl.setShowHideExpanded(false);\n\n cellContainer.style.height = null;\n } else {\n typographyEl.resetTruncation().then(() => {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n });\n }\n } else {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n typographyEl.resetTruncation().then(() => {\n cellContainer.style.setProperty(\n \"height\",\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n });\n });\n }\n }\n\n @Watch(\"globalRowHeight\")\n @Watch(\"variableRowHeight\")\n rowHeightChangeHandler(newValue: number, oldValue: number): void {\n if (+newValue !== +oldValue) {\n this.deleteTextWrapDataKey(this.data);\n this.deleteTextWrapDataKey(this.columns);\n this.removeTextWrap();\n\n this.icRowHeightChange.emit();\n\n this.rowHeightSet = true;\n }\n }\n\n /**\n * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.\n */\n @Method()\n async resetRowHeights(rowHeight?: number | \"auto\"): Promise<void> {\n this.globalRowHeight = rowHeight || \"auto\";\n this.variableRowHeight = null;\n }\n\n private showLoadingIndicator() {\n this.loadingIndicator.classList.add(\"show\");\n }\n\n private startLoadingTimer = (): void => {\n this.hasLoadedForOneSecond = false;\n this.timerStarted = Date.now();\n setTimeout(() => {\n this.hasLoadedForOneSecond = true;\n this.timerStarted = null;\n }, this.minimumLoadingDisplayDuration);\n };\n\n private isObject = (value: any) => typeof value === \"object\";\n\n private notDefaultDensity = () => this.density !== \"default\";\n\n private getCellContent = (\n cell: any,\n dataType: IcDataTableColumnDataTypes\n ): any => {\n switch (dataType) {\n case \"element\":\n return undefined;\n case \"date\":\n return (\n cell instanceof Date ? cell : new Date(cell)\n ).toLocaleDateString();\n default:\n return cell;\n }\n };\n\n private getCellAlignment = (\n cell: any,\n alignment: \"horizontal\" | \"vertical\"\n ) => {\n if (this.isObject(cell) && Object.keys(cell).includes(\"cellAlignment\")) {\n return this.getObjectValue(\n this.getObjectValue(cell, \"cellAlignment\"),\n alignment\n );\n }\n };\n\n private getCellOptions = (cell: any, key: string) => {\n if (!(this.isObject(cell) && Object.keys(cell).includes(key))) return;\n\n return this.getObjectValue(cell, key);\n };\n\n private createUpdatingIndicator = () => {\n const { appearance, description, max, min, progress } =\n this.updatingOptions || {};\n return (\n <th colSpan={this.columns.length} class=\"updating-state\">\n <ic-loading-indicator\n appearance={appearance}\n description={description || \"Updating table data\"}\n fullWidth={true}\n max={max}\n min={min}\n progress={progress}\n type=\"linear\"\n size=\"small\"\n ></ic-loading-indicator>\n </th>\n );\n };\n\n private setRowHeight = (height: number) => {\n return pxToRem(\n `${\n height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -\n this.DENSITY_PADDING_HEIGHT_DIFF[this.density]\n }px`\n );\n };\n\n private setTruncationClass = () => {\n if (this.truncationPattern) {\n return { [`truncation-${this.truncationPattern}`]: true };\n }\n\n return {};\n };\n\n private createCells = (row: object, rowIndex: number) => {\n const rowValues = Object.values(row);\n const rowKeys = Object.keys(row);\n const index = rowIndex;\n\n const rowOptions = this.getRowOptions(rowKeys, rowValues);\n let rowAlignment: string;\n let rowEmphasis: string;\n\n const headerIndex = rowKeys.indexOf(\"header\");\n if (headerIndex > -1) {\n rowAlignment = this.getObjectValue(\n rowValues[headerIndex],\n \"rowAlignment\"\n );\n rowEmphasis = this.getObjectValue(rowValues[headerIndex], \"emphasis\");\n }\n\n const variableRowHeightVal = this.variableRowHeight?.({\n ...row,\n index,\n });\n const currentRowHeight = variableRowHeightVal\n ? variableRowHeightVal !== \"auto\" && variableRowHeightVal\n : this.globalRowHeight !== \"auto\" && this.globalRowHeight;\n\n return rowValues.map((cell, index) => {\n const columnProps = this.columns[index];\n const cellSlotName = `${columnProps?.key}-${rowIndex}`;\n const hasIcon = this.isObject(cell) && Object.keys(cell).includes(\"icon\");\n const cellValue = (key: string) => this.getObjectValue(cell, key);\n\n if (rowKeys[index] === \"header\") {\n return (\n <th\n scope=\"row\"\n colSpan={cellValue(\"colspan\")}\n class={{\n [\"row-header\"]: true,\n [`row-header-alignment-${cellValue(\"cellAlignment\")}`]:\n !!cellValue(\"cellAlignment\"),\n [\"row-header-sticky\"]: this.stickyRowHeaders,\n }}\n >\n {cellValue(\"title\")}\n </th>\n );\n }\n\n if (rowKeys[index] !== \"rowOptions\") {\n return (\n <td\n class={{\n [\"table-cell\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n <div\n innerHTML={\n columnProps?.dataType === \"element\" &&\n !isSlotUsed(this.el, cellSlotName)\n ? (cell as string)\n : null\n }\n class={{\n \"cell-container\": columnProps?.dataType !== \"element\",\n [`cell-alignment-${\n columnProps?.columnAlignment?.vertical ||\n rowOptions?.rowAlignment?.vertical ||\n rowAlignment ||\n this.getCellAlignment(cell, \"vertical\")\n }`]:\n !!columnProps?.columnAlignment?.vertical ||\n !!rowOptions?.rowAlignment?.vertical ||\n !!rowAlignment ||\n !!this.getCellAlignment(cell, \"vertical\"),\n [`cell-alignment-${\n columnProps?.columnAlignment?.horizontal ||\n rowOptions?.rowAlignment?.horizontal ||\n this.getCellAlignment(cell, \"horizontal\")\n }`]:\n !!columnProps?.columnAlignment?.horizontal ||\n !!rowOptions?.rowAlignment?.horizontal ||\n !!this.getCellAlignment(cell, \"horizontal\"),\n [`data-type-${columnProps?.dataType}`]: true,\n [this.TEXT_WRAP_STRING]:\n columnProps?.textWrap ||\n rowOptions?.textWrap ||\n !!this.getCellOptions(cell, \"textWrap\"),\n [\"cell-icon\"]: hasIcon || !!columnProps?.icon?.icon,\n ...this.setTruncationClass(),\n }}\n style={{\n height:\n (this.truncationPattern || currentRowHeight) &&\n !columnProps.textWrap &&\n !rowOptions.textWrap &&\n !this.getCellOptions(cell, \"textWrap\") &&\n columnProps?.dataType !== \"element\"\n ? this.setRowHeight(currentRowHeight)\n : null,\n }}\n data-row-height={\n this.truncationPattern || currentRowHeight\n ? this.setRowHeight(currentRowHeight)\n : null\n }\n >\n {isSlotUsed(this.el, cellSlotName) ? (\n <slot name={cellSlotName} />\n ) : (\n <Fragment>\n {isSlotUsed(this.el, `${cellSlotName}-icon`) ? (\n <slot name={`${cellSlotName}-icon`} />\n ) : (\n (hasIcon || columnProps?.icon?.onAllCells) && (\n <span\n class=\"icon\"\n innerHTML={cellValue(\"icon\") || columnProps?.icon.icon}\n ></span>\n )\n )}\n {columnProps?.dataType !== \"element\" &&\n !isSlotUsed(this.el, cellSlotName) && (\n <ic-typography\n variant=\"body\"\n class={{\n [`cell-emphasis-${\n (this.isObject(cell) && cellValue(\"emphasis\")) ||\n columnProps?.emphasis ||\n rowEmphasis\n }`]:\n (this.isObject(cell) && !!cellValue(\"emphasis\")) ||\n !!columnProps?.emphasis ||\n !!rowEmphasis,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {this.isObject(cell) &&\n columnProps?.dataType !== \"date\" ? (\n Object.keys(cell).includes(\"href\") ? (\n <ic-link href={cellValue(\"href\")}>\n {cellValue(\"data\")}\n </ic-link>\n ) : (\n cellValue(\"data\")\n )\n ) : (\n this.getCellContent(cell, columnProps?.dataType)\n )}\n </ic-typography>\n )}\n </Fragment>\n )}\n </div>\n </td>\n );\n }\n });\n };\n\n private createColumnHeaders = () => {\n return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (\n <th\n scope=\"col\"\n class={{\n [\"column-header\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [\"updating-state-headers\"]: this.updating && !this.loading,\n }}\n colSpan={colspan}\n >\n <div\n class={{\n \"column-header-inner-container\": true,\n [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,\n }}\n >\n {isSlotUsed(this.el, `${key}-column-icon`) ? (\n <slot name={`${key}-column-icon`} />\n ) : (\n icon &&\n !icon.hideOnHeader && (\n <span class=\"icon\" innerHTML={icon.icon}></span>\n )\n )}\n <ic-typography\n variant=\"body\"\n class={{\n [\"column-header-text\"]: true,\n [`text-${this.density}`]: this.notDefaultDensity(),\n }}\n >\n {title}\n </ic-typography>\n {this.sortable && (\n <ic-button\n variant=\"icon\"\n id={`sort-button-${key}`}\n aria-label={this.getSortButtonLabel(key)}\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.sortRows(key)}\n innerHTML={\n this.SORT_ICONS[\n this.sortedColumn === key\n ? this.sortedColumnOrder\n : \"unsorted\"\n ]\n }\n class={{\n [\"sort-button\"]: true,\n [\"sort-button-unsorted\"]:\n this.sortedColumn !== key ||\n this.sortedColumnOrder === \"unsorted\",\n }}\n ></ic-button>\n )}\n </div>\n </th>\n ));\n };\n\n private onRowClick = (row: object) => {\n this.selectedRow =\n this.selectedRow !== row && !this.loading && !this.updating && row;\n };\n\n private createRows = () => {\n const data = this.showPagination\n ? this.data.slice(this.fromRow, this.toRow)\n : this.data.slice();\n\n /**\n * Ensures that createCells has a value in data to map over to actually render the slot.\n * Removes the need for the user to add it multiple times.\n */\n this.columns.forEach(({ key }) => {\n data.forEach((row, rowIndex) => {\n const cellSlotName = `${key}-${rowIndex}`;\n if (isSlotUsed(this.el, cellSlotName)) {\n row[key] = getSlotContent(this.el, cellSlotName);\n }\n });\n });\n\n return data\n .sort(!this.sortable ? undefined : this.getSortFunction())\n .map((row, index) => {\n return (\n <tr\n // eslint-disable-next-line react/jsx-no-bind\n onClick={() => this.onRowClick(row)}\n class={{\n [\"table-row\"]: true,\n [\"table-row-selected\"]: this.selectedRow === row,\n }}\n >\n {this.createCells(row, index)}\n </tr>\n );\n });\n };\n\n private getObjectValue = (cell: object, key: string) => {\n return Object.values(cell)[Object.keys(cell).indexOf(key)];\n };\n\n private getSortButtonLabel = (key: string) => {\n let label = \"\";\n const getNextSortOption = (option: IcDataTableSortOrderOptions) => {\n const sortOrders = this.sortOptions.sortOrders;\n return sortOrders[(sortOrders.indexOf(option) + 1) % sortOrders.length];\n };\n\n if (this.sortedColumn === key) {\n const sortOption = getNextSortOption(this.sortedColumnOrder);\n label = sortOption !== \"unsorted\" ? `Sort ${sortOption}` : \"Remove sort\";\n } else {\n label = `Sort ${getNextSortOption(\"unsorted\")}`;\n }\n\n return label;\n };\n\n private getComparison = (targetRow: any, comparisonRow: any): number => {\n const targetRowValue = targetRow[this.sortedColumn];\n const comparisonRowValue = comparisonRow[this.sortedColumn];\n return this.columns.find((col) => col.key === this.sortedColumn)\n .dataType === \"date\"\n ? new Date(targetRowValue).valueOf() -\n new Date(comparisonRowValue).valueOf()\n : String(\n this.isObject(targetRowValue)\n ? Object.values(targetRowValue)[0]\n : targetRowValue\n ).localeCompare(\n String(\n this.isObject(comparisonRowValue)\n ? Object.values(comparisonRowValue)[0]\n : comparisonRowValue\n ),\n undefined,\n { numeric: true, sensitivity: \"base\" }\n );\n };\n\n private getSortFunction = () => {\n switch (this.sortedColumnOrder) {\n case \"ascending\":\n return (a: any, b: any) => this.getComparison(a, b);\n case \"descending\":\n return (a: any, b: any) => this.getComparison(b, a);\n default:\n return undefined;\n }\n };\n\n private sortRows = (column: string) => {\n const sortButton = this.el.shadowRoot.querySelector(\n `#sort-button-${column}`\n ) as HTMLIcButtonElement;\n\n const sortOrders = this.sortOptions.sortOrders;\n\n if (column !== this.sortedColumn) {\n if (this.sortedColumn) {\n const previousSortedButton = this.el.shadowRoot.querySelector(\n `#sort-button-${this.sortedColumn}`\n ) as HTMLIcButtonElement;\n previousSortedButton.setAttribute(\n \"aria-label\",\n this.getSortButtonLabel(column)\n ); // Passing through unsorted column returns correct label for newly unsorted column\n }\n this.sortedColumn = column;\n this.sortedColumnOrder = \"unsorted\";\n }\n\n let nextSortOrderIndex = sortOrders.indexOf(this.sortedColumnOrder) + 1;\n\n if (nextSortOrderIndex > sortOrders.length - 1) {\n nextSortOrderIndex = 0;\n }\n\n this.sortedColumnOrder = sortOrders[nextSortOrderIndex];\n\n sortButton.setAttribute(\"aria-label\", this.getSortButtonLabel(column));\n\n this.tableSorted = true;\n\n this.icSortChange.emit({\n columnName: column,\n sorted: this.sortedColumnOrder,\n });\n };\n\n private getTypographyElements = (): HTMLIcTypographyElement[] => {\n return Array.from(\n this.el.shadowRoot.querySelectorAll(\n \"ic-typography:not(.column-header-text)\"\n )\n );\n };\n\n private getTooltip = (\n typographyEl: HTMLIcTypographyElement\n ): HTMLIcTooltipElement => {\n return typographyEl.closest(this.TOOLTIP);\n };\n\n private updateTruncationTooltip = (removeTooltipOnly: boolean = false) => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const tooltip = this.getTooltip(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n return;\n }\n\n this.regenerateTooltip(\n cellContainer,\n typographyEl,\n tooltip,\n removeTooltipOnly\n );\n }\n );\n };\n\n private updateScrollOffset = () => {\n this.scrollOffset = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n ).scrollTop;\n };\n\n private getRowOptions(rowKeys: string[], rowValues: any[]) {\n const rowOptionsIndex = rowKeys.indexOf(\"rowOptions\");\n return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];\n }\n\n private regenerateTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement,\n removeTooltipOnly?: boolean\n ) {\n // When sorting the table, instead of regenerating the tooltip,\n // the tooltip details are updated\n if (tooltip) {\n if (this.tableSorted) {\n tooltip.setAttribute(\"target\", typographyEl.id);\n tooltip.setAttribute(\"label\", typographyEl.textContent);\n } else {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n if (removeTooltipOnly) {\n return;\n }\n }\n\n // This add line clamp to data only when\n // the data object has been updated\n if (!typographyEl.getAttribute(\"style\") && this.dataUpdated) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n // Adding the tableSorted boolean prevents the tooltip\n // being regenerated and flashing\n if (\n typographyEl?.scrollHeight > cellContainer?.clientHeight &&\n !this.tableSorted\n ) {\n if (!typographyEl.getAttribute(\"style\")) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n\n private removeTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement\n ) {\n cellContainer.appendChild(typographyEl);\n if (tooltip) {\n tooltip.remove();\n }\n }\n\n private addLineClampCSS(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n typographyEl.setAttribute(\n \"style\",\n `--ic-line-clamp: ${this.getLines(cellContainer?.clientHeight)}`\n );\n }\n\n private createTruncationTooltip(\n typographyEl: HTMLIcTypographyElement,\n cellContainer: HTMLElement\n ) {\n const tooltipEl = document.createElement(\"ic-tooltip\");\n tooltipEl.setAttribute(\"target\", typographyEl.id);\n tooltipEl.setAttribute(\"label\", typographyEl.textContent);\n tooltipEl.classList.add(\"ic-tooltip-overflow\");\n tooltipEl.setExternalPopperProps({\n // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly\n strategy: \"fixed\",\n });\n cellContainer.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n\n render() {\n const {\n caption,\n createColumnHeaders,\n createRows,\n createUpdatingIndicator,\n data,\n hideColumnHeaders,\n loading,\n loadingOptions,\n paginationBarOptions,\n scrollable,\n scrollOffset,\n showPagination,\n sortable,\n sortedColumnOrder,\n sortedColumn,\n stickyColumnHeaders,\n updateScrollOffset,\n updating,\n } = this;\n\n return (\n <div class=\"table-container\">\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <div\n class={{\n [\"table-row-container\"]: true,\n scrollable,\n }}\n tabIndex={scrollable ? 0 : null}\n onScroll={updateScrollOffset}\n >\n {isSlotUsed(this.el, \"title-bar\") && <slot name=\"title-bar\" />}\n <table>\n <caption class=\"table-caption\">{caption}</caption>\n {!hideColumnHeaders && (\n <thead\n class={{\n [\"column-header-sticky\"]: stickyColumnHeaders,\n [\"column-header-overlay\"]:\n stickyColumnHeaders && scrollOffset !== 0,\n }}\n >\n <tr>{createColumnHeaders()}</tr>\n </thead>\n )}\n {updating &&\n !loading &&\n (hideColumnHeaders ? (\n <thead>{createUpdatingIndicator()}</thead>\n ) : (\n createUpdatingIndicator()\n ))}\n {data?.length > 0 && !loading && <tbody>{createRows()}</tbody>}\n </table>\n {!data?.length &&\n !loading &&\n (isSlotUsed(this.el, \"empty-state\") ? (\n <slot name=\"empty-state\" />\n ) : (\n <ic-empty-state\n aligned=\"center\"\n heading=\"No Data\"\n class=\"loading-empty\"\n ></ic-empty-state>\n ))}\n </div>\n {loading && (\n <ic-loading-indicator\n appearance={loadingOptions?.appearance}\n class={{\n \"loading-empty\": loading,\n loading: true,\n \"show-background\": loadingOptions.showBackground,\n }}\n description={loadingOptions.description || \"Loading table data\"}\n label={loadingOptions.label || \"Loading...\"}\n labelDuration={loadingOptions?.labelDuration}\n max={loadingOptions?.max}\n min={loadingOptions?.min}\n progress={loadingOptions?.progress}\n ref={(el: HTMLIcLoadingIndicatorElement) =>\n (this.loadingIndicator = el)\n }\n ></ic-loading-indicator>\n )}\n {(showPagination || isSlotUsed(this.el, \"pagination-bar\")) && (\n <div class=\"pagination-container\">\n {isSlotUsed(this.el, \"pagination-bar\") ? (\n <slot name=\"pagination-bar\" />\n ) : (\n <ic-pagination-bar\n totalItems={data.length}\n type={paginationBarOptions.type}\n rangeLabelType={paginationBarOptions.rangeLabelType}\n showItemsPerPageControl={\n paginationBarOptions.showItemsPerPageControl\n }\n showGoToPageControl={paginationBarOptions.showGoToPageControl}\n itemsPerPageOptions={paginationBarOptions.itemsPerPageOptions}\n alignment={paginationBarOptions.alignment}\n appearance={paginationBarOptions.appearance}\n itemLabel={paginationBarOptions.itemLabel}\n pageLabel={paginationBarOptions.pageLabel}\n hideRangeLabel={paginationBarOptions.hideRangeLabel}\n ></ic-pagination-bar>\n )}\n </div>\n )}\n {sortable && (\n <div class=\"screen-reader-sort-text\" aria-live=\"polite\">\n {sortedColumnOrder !== \"unsorted\" && sortedColumn\n ? `${sortedColumn} sorted ${sortedColumnOrder}`\n : \"table unsorted\"}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ic-data-table.types.js","sourceRoot":"","sources":["../../../src/components/ic-data-table/ic-data-table.types.tsx"],"names":[],"mappings":"","sourcesContent":["export type IcDataTableSortOrderOptions =\n | \"unsorted\"\n | \"ascending\"\n | \"descending\";\n\nexport type IcDataTableDensityOptions = \"default\" | \"dense\" | \"spacious\";\n\nexport type IcDataTableColumnDataTypes =\n | \"string\"\n | \"number\"\n | \"address\"\n | \"element\"\n | \"date\";\n\nexport type IcDataTableColumnObject = {\n key: string;\n title: string;\n dataType: IcDataTableColumnDataTypes;\n columnAlignment?: {\n horizontal?: string;\n vertical?: string;\n };\n rowOptions?: IcDataTableRowOptions;\n textWrap?: boolean;\n cellAlignment?: string;\n emphasis?: string;\n colspan?: number;\n icon?: {\n icon: string;\n onAllCells?: boolean;\n hideOnHeader?: boolean;\n };\n};\n\nexport type IcDataTableRowOptions = {\n textWrap: boolean;\n};\n\nexport type IcDataTableRowHeights = number | \"auto\";\n\nexport interface IcDensityUpdateEventDetail {\n value: IcDataTableDensityOptions;\n}\nexport type IcDataTableTruncationTypes = \"tooltip\" | \"show-hide\" | undefined;\n\nexport type truncWrapperDetailsTypes = {\n scrollHeight: number | null;\n};\n"]}
|
1
|
+
{"version":3,"file":"ic-data-table.types.js","sourceRoot":"","sources":["../../../src/components/ic-data-table/ic-data-table.types.tsx"],"names":[],"mappings":"","sourcesContent":["export type IcDataTableSortOrderOptions =\n | \"unsorted\"\n | \"ascending\"\n | \"descending\";\n\nexport type IcDataTableDensityOptions = \"default\" | \"dense\" | \"spacious\";\n\nexport type IcDataTableColumnDataTypes =\n | \"string\"\n | \"number\"\n | \"address\"\n | \"element\"\n | \"date\";\n\nexport type IcDataTableColumnObject = {\n key: string;\n title: string;\n dataType: IcDataTableColumnDataTypes;\n columnAlignment?: {\n horizontal?: string;\n vertical?: string;\n };\n rowOptions?: IcDataTableRowOptions;\n textWrap?: boolean;\n cellAlignment?: string;\n emphasis?: string;\n colspan?: number;\n icon?: {\n icon: string;\n onAllCells?: boolean;\n hideOnHeader?: boolean;\n };\n};\n\nexport type IcDataTableRowOptions = {\n textWrap: boolean;\n};\n\nexport type IcDataTableRowHeights = number | \"auto\";\n\nexport interface IcDensityUpdateEventDetail {\n value: IcDataTableDensityOptions;\n}\nexport type IcDataTableTruncationTypes = \"tooltip\" | \"show-hide\" | undefined;\n\nexport interface IcSortEventDetail {\n columnName: string;\n sorted: IcDataTableSortOrderOptions;\n}\n\nexport type truncWrapperDetailsTypes = {\n scrollHeight: number | null;\n};\n"]}
|
@@ -879,6 +879,9 @@ export const RowHeaders = () => createDataTableElement("Row Header Table", ROW_H
|
|
879
879
|
export const Sort = () => {
|
880
880
|
const dataTable = createDataTableElement("Sort", COLS, DATA);
|
881
881
|
dataTable.setAttribute("sortable", "true");
|
882
|
+
dataTable.addEventListener("icSortChange", (event) => {
|
883
|
+
console.log("Sort changed", event.detail);
|
884
|
+
});
|
882
885
|
return dataTable;
|
883
886
|
};
|
884
887
|
export const SortOptions = () => {
|
@@ -888,6 +891,9 @@ export const SortOptions = () => {
|
|
888
891
|
sortOrders: ["descending", "unsorted"],
|
889
892
|
defaultColumn: "firstName",
|
890
893
|
};
|
894
|
+
dataTable.addEventListener("icSortChange", (event) => {
|
895
|
+
console.log("Sort changed", event.detail);
|
896
|
+
});
|
891
897
|
return dataTable;
|
892
898
|
};
|
893
899
|
export const Pagination = () => {
|