@ukic/canary-web-components 2.0.0-canary.26 → 2.0.0-canary.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/{helpers-6817cfbb.js → helpers-1a85e860.js} +15 -1
- package/dist/{esm/helpers-5bd2012a.js.map → cjs/helpers-1a85e860.js.map} +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js +1 -1
- package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +43 -20
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +28 -5
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +10 -9
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js +3 -1
- package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +23 -16
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js +5 -4
- package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-page-header.cjs.entry.js +4 -4
- package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js +8 -8
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +20 -18
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-search-bar.cjs.entry.js +15 -28
- package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-select-with-multi.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js +1 -1
- package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +68 -145
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-panel.cjs.entry.js +5 -13
- package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab.cjs.entry.js +9 -10
- package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-view.cjs.entry.js +2 -2
- package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-typography.cjs.entry.js +3 -1
- package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +5 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +28 -5
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +46 -5
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js +27 -8
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-date-picker/ic-date-picker.js +20 -0
- package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +72 -21
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +20 -2
- package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +2 -5
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js +1 -1
- package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers2.js +14 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-alert2.js +1 -1
- package/dist/components/ic-alert2.js.map +1 -1
- package/dist/components/ic-breadcrumb-group.js +45 -21
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-checkbox.js +2 -2
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-data-table.js +28 -5
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +11 -9
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-date-picker.js +4 -1
- package/dist/components/ic-date-picker.js.map +1 -1
- package/dist/components/ic-input-label2.js +6 -4
- package/dist/components/ic-input-label2.js.map +1 -1
- package/dist/components/ic-menu3.js +1 -1
- package/dist/components/ic-navigation-group.js +1 -1
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-page-header.js +4 -4
- package/dist/components/ic-page-header.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +27 -17
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-popover-menu.js +22 -19
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-radio-group.js +1 -1
- package/dist/components/ic-radio-group.js.map +1 -1
- package/dist/components/ic-search-bar.js +15 -28
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-select-with-multi.js +1 -1
- package/dist/components/ic-select2.js +6 -6
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-switch.js +1 -1
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/components/ic-tab-context.js +68 -145
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-tab-panel.js +6 -17
- package/dist/components/ic-tab-panel.js.map +1 -1
- package/dist/components/ic-tab.js +9 -10
- package/dist/components/ic-tab.js.map +1 -1
- package/dist/components/ic-text-field2.js +2 -2
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-tree-item.js.map +1 -1
- package/dist/components/ic-tree-view.js +2 -2
- package/dist/components/ic-tree-view.js.map +1 -1
- package/dist/components/ic-typography2.js +3 -1
- package/dist/components/ic-typography2.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-05ae9a59.entry.js +2 -0
- package/dist/core/p-05ae9a59.entry.js.map +1 -0
- package/dist/core/{p-9b34989b.entry.js → p-07e4b89b.entry.js} +2 -2
- package/dist/core/p-0fc36045.entry.js +2 -0
- package/dist/core/p-0fc36045.entry.js.map +1 -0
- package/dist/core/p-21d0dea6.entry.js +2 -0
- package/dist/core/p-21d0dea6.entry.js.map +1 -0
- package/dist/core/p-2ecedbe5.entry.js +2 -0
- package/dist/core/p-2ecedbe5.entry.js.map +1 -0
- package/dist/core/{p-6b1fcf87.entry.js → p-383ba7e8.entry.js} +2 -2
- package/dist/core/p-383ba7e8.entry.js.map +1 -0
- package/dist/core/{p-ee8a3de6.entry.js → p-3ce541df.entry.js} +2 -2
- package/dist/core/p-3ce541df.entry.js.map +1 -0
- package/dist/core/p-3ef5017d.entry.js +2 -0
- package/dist/core/p-3ef5017d.entry.js.map +1 -0
- package/dist/core/{p-bee3fdb0.entry.js → p-438abe40.entry.js} +2 -2
- package/dist/core/p-438abe40.entry.js.map +1 -0
- package/dist/core/{p-f1044e4d.entry.js → p-5334bc96.entry.js} +2 -2
- package/dist/core/p-5334bc96.entry.js.map +1 -0
- package/dist/core/p-5741a8bf.entry.js +2 -0
- package/dist/core/p-5741a8bf.entry.js.map +1 -0
- package/dist/core/p-6ca98c5d.entry.js +2 -0
- package/dist/core/p-6ca98c5d.entry.js.map +1 -0
- package/dist/core/p-7435de65.js +2 -0
- package/dist/core/p-7435de65.js.map +1 -0
- package/dist/core/p-7e5da5eb.entry.js +2 -0
- package/dist/core/p-7e5da5eb.entry.js.map +1 -0
- package/dist/core/p-7ee62798.entry.js +2 -0
- package/dist/core/{p-80d6a6b5.entry.js.map → p-7ee62798.entry.js.map} +1 -1
- package/dist/core/p-8f0660ec.entry.js +2 -0
- package/dist/core/p-8f0660ec.entry.js.map +1 -0
- package/dist/core/p-924548ec.entry.js +2 -0
- package/dist/core/p-924548ec.entry.js.map +1 -0
- package/dist/core/{p-bfc5f3f4.entry.js → p-9e5c8813.entry.js} +2 -2
- package/dist/core/p-9e5c8813.entry.js.map +1 -0
- package/dist/core/{p-0ec04c16.entry.js → p-a7331e7c.entry.js} +2 -2
- package/dist/core/p-a7331e7c.entry.js.map +1 -0
- package/dist/core/{p-20997691.entry.js → p-a7794aa9.entry.js} +2 -2
- package/dist/core/p-a7794aa9.entry.js.map +1 -0
- package/dist/core/{p-d362992d.entry.js → p-ac591209.entry.js} +2 -2
- package/dist/core/{p-92f701e7.entry.js → p-b03d14fc.entry.js} +2 -2
- package/dist/core/p-bdb5addb.entry.js +2 -0
- package/dist/core/p-bdb5addb.entry.js.map +1 -0
- package/dist/core/{p-2ee5d3fb.entry.js → p-d10e81f3.entry.js} +2 -2
- package/dist/core/p-d10e81f3.entry.js.map +1 -0
- package/dist/core/p-e210f51a.entry.js +2 -0
- package/dist/core/p-e210f51a.entry.js.map +1 -0
- package/dist/core/{p-c6bdbe69.entry.js → p-fc76d510.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-5bd2012a.js → helpers-c24d4455.js} +15 -2
- package/dist/esm/helpers-c24d4455.js.map +1 -0
- package/dist/esm/ic-alert.entry.js +1 -1
- package/dist/esm/ic-alert.entry.js.map +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +43 -20
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js +2 -2
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +28 -5
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +10 -9
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +3 -1
- package/dist/esm/ic-date-picker.entry.js.map +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +23 -16
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_4.entry.js +5 -4
- package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js +1 -1
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-page-header.entry.js +4 -4
- package/dist/esm/ic-page-header.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js +8 -8
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +20 -18
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-radio-group.entry.js +1 -1
- package/dist/esm/ic-radio-group.entry.js.map +1 -1
- package/dist/esm/ic-search-bar.entry.js +15 -28
- package/dist/esm/ic-search-bar.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js +1 -1
- package/dist/esm/ic-switch.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +68 -145
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-tab-panel.entry.js +5 -13
- package/dist/esm/ic-tab-panel.entry.js.map +1 -1
- package/dist/esm/ic-tab.entry.js +9 -10
- package/dist/esm/ic-tab.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +1 -1
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +2 -2
- package/dist/esm/ic-tree-view.entry.js.map +1 -1
- package/dist/esm/ic-typography.entry.js +3 -1
- package/dist/esm/ic-typography.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +2 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +15 -0
- package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
- package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +14 -5
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
- package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +1 -1
- package/dist/types/components.d.ts +46 -5
- package/dist/types/utils/types.d.ts +1 -0
- package/hydrate/index.js +275 -296
- package/package.json +3 -3
- package/dist/cjs/helpers-6817cfbb.js.map +0 -1
- package/dist/core/p-046f4de6.entry.js +0 -2
- package/dist/core/p-046f4de6.entry.js.map +0 -1
- package/dist/core/p-0ec04c16.entry.js.map +0 -1
- package/dist/core/p-20997691.entry.js.map +0 -1
- package/dist/core/p-216fbd5e.entry.js +0 -2
- package/dist/core/p-216fbd5e.entry.js.map +0 -1
- package/dist/core/p-297e99cf.js +0 -2
- package/dist/core/p-297e99cf.js.map +0 -1
- package/dist/core/p-2ee5d3fb.entry.js.map +0 -1
- package/dist/core/p-3ba4335c.entry.js +0 -2
- package/dist/core/p-3ba4335c.entry.js.map +0 -1
- package/dist/core/p-40e5fa80.entry.js +0 -2
- package/dist/core/p-40e5fa80.entry.js.map +0 -1
- package/dist/core/p-6af080d3.entry.js +0 -2
- package/dist/core/p-6af080d3.entry.js.map +0 -1
- package/dist/core/p-6b1fcf87.entry.js.map +0 -1
- package/dist/core/p-80d6a6b5.entry.js +0 -2
- package/dist/core/p-989310a8.entry.js +0 -2
- package/dist/core/p-989310a8.entry.js.map +0 -1
- package/dist/core/p-aa72f551.entry.js +0 -2
- package/dist/core/p-aa72f551.entry.js.map +0 -1
- package/dist/core/p-aaaa9261.entry.js +0 -2
- package/dist/core/p-aaaa9261.entry.js.map +0 -1
- package/dist/core/p-bd1f8741.entry.js +0 -2
- package/dist/core/p-bd1f8741.entry.js.map +0 -1
- package/dist/core/p-bee3fdb0.entry.js.map +0 -1
- package/dist/core/p-bfc5f3f4.entry.js.map +0 -1
- package/dist/core/p-c98ce508.entry.js +0 -2
- package/dist/core/p-c98ce508.entry.js.map +0 -1
- package/dist/core/p-da8255b8.entry.js +0 -2
- package/dist/core/p-da8255b8.entry.js.map +0 -1
- package/dist/core/p-ee8a3de6.entry.js.map +0 -1
- package/dist/core/p-f1044e4d.entry.js.map +0 -1
- package/dist/core/p-fa77211d.entry.js +0 -2
- package/dist/core/p-fa77211d.entry.js.map +0 -1
- /package/dist/core/{p-9b34989b.entry.js.map → p-07e4b89b.entry.js.map} +0 -0
- /package/dist/core/{p-d362992d.entry.js.map → p-ac591209.entry.js.map} +0 -0
- /package/dist/core/{p-92f701e7.entry.js.map → p-b03d14fc.entry.js.map} +0 -0
- /package/dist/core/{p-c6bdbe69.entry.js.map → p-fc76d510.entry.js.map} +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icDataTableCss","DataTable","this","DENSITY_HEIGHT_MULTIPLIER","dense","default","spacious","DENSITY_PADDING_HEIGHT_DIFF","SORT_ICONS","unsorted","unsortedIcon","ascending","ascendingIcon","descending","descendingIcon","hasLoadedForOneSecond","resizeObserver","SHOW_HIDE_STRING","SHOW_HIDE_CSS_CLASS","TOOLTIP_STRING","TOOLTIP","TEXT_WRAP_STRING","TEXT_WRAP_CLASS","dataUpdated","rowHeightSet","initialLoad","icPageChangeEvent","itemsPerPageChange","DATA_ROW_HEIGHT_STRING","ROW_HEIGHT_CSS_VARIABLE","DEFAULT_LINE_HEIGHT","densityUpdate","truncationPatternUpdated","isNewDebounceDelaySet","updateSetRowHeight","typographyEl","fontSize","parseInt","getComputedStyle","document","documentElement","cellContainer","getCellContainer","rowHeight","parseFloat","getAttribute","scrollHeight","style","removeProperty","getTypographyElements","forEach","debounceDataTruncation","classList","contains","ResizeObserver","dynamicDebounce","dataTruncation","setNewDebounceDelay","debounceDelay","observe","delay","getLines","height","Math","floor","truncate","tooltip","clientHeight","closest","truncationPattern","addTooltipTruncation","addShowHideTruncation","setAttribute","appendChild","remove","isEmptyString","resetShowHideTruncation","getTooltip","shadowRoot","querySelector","showHideBtn","truncWrapper","getTruncWrapper","removeTooltip","removeTextWrap","tableCell","deleteTextWrapDataKey","array","Array","isArray","val","textWrap","startLoadingTimer","timerStarted","Date","now","setTimeout","minimumLoadingDisplayDuration","isObject","value","notDefaultDensity","density","getCellContent","cell","dataType","undefined","toLocaleDateString","getCellAlignment","alignment","Object","keys","includes","getObjectValue","getCellOptions","key","createUpdatingIndicator","appearance","description","max","min","progress","updatingOptions","h","colSpan","columns","length","class","fullWidth","type","size","setRowHeight","pxToRem","setTruncationClass","getColumnWidth","columnWidth","columnWidthStyling","assign","minWidth","maxWidth","getRowHeight","currentRowHeight","columnProps","rowTextWrap","createCells","row","rowIndex","rowValues","values","rowKeys","rowOptions","getRowOptions","rowAlignment","rowEmphasis","headerIndex","indexOf","variableRowHeightVal","_a","variableRowHeight","call","index","globalRowHeight","map","cellSlotName","hasIcon","cellValue","scope","stickyRowHeaders","innerHTML","isSlotUsed","el","columnAlignment","vertical","_b","_c","_d","_e","horizontal","_f","_g","_h","_j","icon","name","Fragment","_k","onAllCells","variant","emphasis","href","createColumnHeaders","cellAlignment","colspan","title","updating","loading","hideOnHeader","sortable","id","getSortButtonLabel","onClick","sortRows","sortedColumn","sortedColumnOrder","onRowClick","selectedRow","createRows","data","showPagination","slice","fromRow","toRow","organisedData","slottedColumns","filter","col","addDataToPosition","sort","getSortFunction","label","getNextSortOption","option","sortOrders","sortOptions","sortOption","getComparison","targetRow","comparisonRow","targetRowValue","comparisonRowValue","find","valueOf","String","localeCompare","numeric","sensitivity","a","b","column","sortButton","previousSortedButton","nextSortOrderIndex","tableSorted","icSortChange","emit","columnName","sorted","from","querySelectorAll","updateTruncationTooltip","removeTooltipOnly","regenerateTooltip","updateScrollOffset","scrollOffset","scrollTop","setTableDimensions","tableHostDimensions","width","itemsPerPageOptions","rangeLabelType","showItemsPerPageControl","showGoToPageControl","itemLabel","pageLabel","hideRangeLabel","defaultColumn","disconnectedCallback","disconnect","componentWillLoad","rowsPerPage","Number","paginationBarOptions","previousRowsPerPage","loadingOptions","showBackground","previousItemsPerPage","componentDidLoad","tableElement","tableContainer","clientWidth","scrollable","showLoadingIndicator","componentDidUpdate","truncateUpdatedData","createShowHideTruncation","resetTruncation","then","removeAttribute","hasAutoRowHeight","tooltipEl","setProperty","allRows","newRows","checkMaxLines","setShowHideExpanded","addLineClampCSS","createTruncationTooltip","add","handleTypographyTruncationExpandToggle","detail","expanded","getPropertyValue","handlePageChange","target","parentElement","tableRowsContainer","previousPaginationPage","handleItemsPerPageChange","handleDensityChange","ev","clickListener","loadingHandler","newValue","truncationPatternHandler","dataHandler","newData","densityHandler","rowHeightChangeHandler","oldValue","icRowHeightChange","resetRowHeights","loadingIndicator","rowOptionsIndex","textContent","cssText","createElement","setExternalPopperProps","strategy","render","caption","hideColumnHeaders","stickyColumnHeaders","Host","tabIndex","onScroll","tableLayout","aligned","heading","labelDuration","ref","totalItems"],"sources":["src/components/ic-data-table/ic-data-table.css?tag=ic-data-table&encapsulation=shadow","src/components/ic-data-table/ic-data-table.tsx"],"sourcesContent":[":host {\n position: relative;\n display: inline-flex;\n max-height: 100%;\n width: var(--table-width, 100%);\n height: 100%;\n min-width: var(--table-min-width);\n max-width: var(--table-max-width);\n}\n\ntbody {\n vertical-align: top;\n}\n\n.table-container {\n position: relative;\n height: calc(100% - var(--ic-space-xxxs));\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.cell-container {\n display: flex;\n min-height: 1.5rem;\n overflow-y: hidden;\n height: var(--row-height);\n}\n\n.truncation-show-hide {\n overflow: visible;\n display: block;\n}\n\n.cell-icon.truncation-show-hide {\n display: flex;\n}\n\n.cell-container:not(.data-type-element, .truncation-show-hide) {\n overflow-x: hidden;\n}\n\nic-loading-indicator {\n position: sticky;\n top: 20px;\n}\n\n.table-row-container {\n position: relative;\n height: 100%;\n overflow: auto;\n transition: var(--ic-easing-transition-fast);\n overflow-anchor: none;\n}\n\n:host([show-pagination=\"true\"]) .table-row-container {\n height: calc(100% - 3.5625rem);\n}\n\ntable {\n table-layout: var(--table-layout, \"fixed\");\n border-spacing: 0;\n width: 100%;\n height: var(--table-height, auto);\n}\n\n.table-row-container:focus {\n outline: none;\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n z-index: 1;\n}\n\n:host([embedded=\"true\"]) .table-row-container {\n border: var(--ic-border-light);\n}\n\n.column-header-inner-container {\n padding: var(--ic-space-xs);\n box-sizing: border-box;\n}\n\n.column-header-sticky {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.column-header-overlay {\n position: sticky;\n top: 0;\n z-index: 1;\n box-shadow: 0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%);\n}\n\n.row-header-sticky {\n position: sticky;\n left: 0;\n}\n\n.column-header,\n.table-row {\n box-sizing: border-box;\n}\n\n.table-row-selected {\n background-color: var(--ic-table-row-selected) !important;\n}\n\n.sort-button {\n margin-left: auto;\n}\n\n.sort-button:hover {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.sort-button:active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.sort-button svg {\n color: var(--ic-architectural-black);\n}\n\n.sort-button-unsorted svg {\n color: var(--ic-color-tertiary-text);\n}\n\n.table-density-dense .column-header-inner-container,\ntd.table-density-dense {\n padding: var(--ic-space-xxs) var(--ic-space-xs) !important;\n}\n\n.text-dense {\n font-size: var(--ic-font-size-label);\n}\n\n.table-density-spacious .column-header-inner-container,\ntd.table-density-spacious {\n padding: 0.625rem var(--ic-space-xs) !important;\n}\n\n.text-spacious {\n font-size: 1.125rem;\n}\n\n.column-header-text {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.row-header,\n.column-header {\n text-align: left;\n padding: var(--ic-space-xs);\n background-color: var(--ic-architectural-40);\n border-right: var(--ic-border-light);\n border-bottom: var(--ic-border-light);\n}\n\n.column-header {\n padding: 0;\n width: var(--column-width);\n min-width: var(--column-min-width, 4rem);\n max-width: var(--column-max-width);\n}\n\n.column-header:last-child {\n border-right: none;\n}\n\n.scrollable .column-header:last-child {\n border-right: var(--ic-border-light) !important;\n}\n\n:host([embedded=\"true\"]) tr:last-child .table-cell,\n:host([embedded=\"true\"]) tr:last-child .row-header {\n border-bottom: none;\n}\n\n.column-header-alignment-left,\n.row-header-alignment-left,\n.cell-alignment-left {\n text-align: left !important;\n justify-content: start !important;\n}\n\n.column-header-alignment-right,\n.row-header-alignment-right,\n.cell-alignment-right {\n text-align: right !important;\n justify-content: end !important;\n}\n\n.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography {\n padding-right: calc(var(--ic-space-xxs) + var(--ic-space-xs));\n}\n\n.cell-alignment-right.truncation-show-hide ic-typography {\n --ellipsis-padding-right: calc(var(--ic-space-xxs) + var(--ic-space-xs));\n}\n\n.column-header-alignment-center,\n.row-header-alignment-center,\n.cell-alignment-center {\n text-align: center !important;\n justify-content: center !important;\n}\n\n.table-row:nth-child(even) {\n background-color: var(--ic-architectural-20);\n}\n\n.table-cell {\n padding: var(--ic-space-xs);\n border-bottom: solid var(--ic-architectural-100) var(--ic-space-1px);\n overflow: hidden;\n box-sizing: border-box;\n max-width: var(--column-max-width);\n min-width: var(--column-min-width);\n}\n\n.data-type-string,\n.data-type-address {\n text-align: left;\n vertical-align: top;\n}\n\n.data-type-number,\n.data-type-date {\n text-align: right;\n justify-content: end;\n vertical-align: top;\n}\n\n.cell-alignment-top {\n vertical-align: top;\n align-items: flex-start;\n}\n\n.cell-alignment-middle {\n vertical-align: middle;\n align-items: center;\n}\n\n.cell-alignment-bottom {\n vertical-align: bottom;\n align-items: flex-end;\n}\n\n.cell-emphasis-low {\n color: var(--ic-color-secondary-text);\n}\n\n.cell-emphasis-high {\n font-weight: var(--ic-font-weight-bold);\n}\n\n.pagination-container {\n background-color: var(--ic-architectural-40);\n border-top: var(--ic-border-light);\n}\n\n.screen-reader-sort-text,\n.table-caption {\n position: absolute;\n left: -100rem;\n}\n\n.table-cell,\n.column-header,\n.row-header {\n word-wrap: break-word;\n white-space: pre-wrap;\n}\n\n.loading-empty {\n padding: var(--ic-space-xl) var(--ic-space-xxl);\n margin-top: var(--ic-space-xl);\n}\n\n.updating-state {\n padding: 0;\n border-bottom: var(--ic-border-light);\n}\n\n.updating-state-headers {\n border-bottom: none;\n}\n\n.loading {\n position: absolute;\n left: calc(50% - 5.9741rem);\n opacity: 0;\n transition: opacity var(--ic-transition-duration-slow);\n}\n\n.loading.show-background {\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-light);\n}\n\n.loading.show {\n opacity: 1;\n}\n\n.icon,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-right: var(--ic-space-xxs);\n}\n\n.column-header-alignment-right > .icon,\n.row-header-alignment-right > .icon,\n.cell-alignment-right > .icon,\n.column-header-alignment-right > ::slotted(svg),\n.row-header-alignment-right > ::slotted(svg),\n.cell-alignment-right > ::slotted(svg) {\n margin-right: auto;\n}\n\n.column-header-alignment-center > ic-typography,\n.row-header-alignment-right > ic-typography,\n.cell-alignment-center > ic-typography {\n flex: 1;\n}\n\n.icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n.truncation-tooltip ic-typography {\n display: -webkit-box;\n -webkit-line-clamp: var(--ic-line-clamp, 0);\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.truncation-tooltip ic-typography,\n.truncation-show-hide ic-typography {\n white-space: normal;\n}\n\n.ic-tooltip-overflow {\n overflow: hidden;\n width: 100%;\n}\n\n@media screen and (min-width: 576px) {\n .column-header-inner-container {\n display: flex;\n align-items: center;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport {\n Component,\n Element,\n h,\n Prop,\n State,\n Listen,\n Watch,\n Fragment,\n Method,\n Event,\n EventEmitter,\n Host,\n} from \"@stencil/core\";\nimport unsortedIcon from \"./assets/unsorted-icon.svg\";\nimport ascendingIcon from \"./assets/ascending-icon.svg\";\nimport descendingIcon from \"./assets/descending-icon.svg\";\nimport {\n IcDataTableDataType,\n IcDataTableColumnDataTypes,\n IcDataTableColumnObject,\n IcDataTableColumnWidthTypes,\n IcDataTableDensityOptions,\n IcDataTableRowHeights,\n IcDataTableSortOrderOptions,\n IcDataTableTruncationTypes,\n IcDensityUpdateEventDetail,\n IcSortEventDetail,\n} 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 isEmptyString,\n isSlotUsed,\n pxToRem,\n addDataToPosition,\n dynamicDebounce,\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 = 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 = false;\n private icPageChangeEvent = false;\n private itemsPerPageChange = false;\n private DATA_ROW_HEIGHT_STRING = \"data-row-height\";\n private ROW_HEIGHT_CSS_VARIABLE = \"--row-height\";\n private previousItemsPerPage: number;\n private DEFAULT_LINE_HEIGHT = 24;\n private densityUpdate = false;\n private previousPaginationPage: number;\n private truncationPatternUpdated: boolean = false;\n private isNewDebounceDelaySet = false;\n\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 @State() debounceDelay = 0;\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: IcDataTableDataType[];\n\n /**\n * Set the density of the table including font and padding.\n */\n @Prop({ mutable: true }) density?: IcDataTableDensityOptions = \"default\";\n\n /**\n * Applies a border to the table container.\n */\n @Prop() embedded?: boolean = false;\n\n /**\n * Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method.\n */\n @Prop({ mutable: true }) globalRowHeight?: IcDataTableRowHeights = \"auto\";\n\n /**\n * Sets the table height. Can be set to `auto` or a specific value in `px`, `rem`, or `%`.\n */\n @Prop() height?: string;\n\n /**\n * If `true`, column headers will not be visible.\n */\n @Prop() hideColumnHeaders?: boolean = false;\n\n /**\n * When set to `true`, the full table will show a loading state, featuring a radial indicator.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n /**\n * Sets the props for the circular loading indicator used in the loading state.\n */\n @Prop() loadingOptions?: {\n 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 * Sets the maximum width of the data table. Can be set in `px`, `rem`, or `%`.\n */\n @Prop() maxWidth?: string;\n\n /**\n * Sets the minimum width of the data table. Can be set in `px`, `rem`, or `%`.\n */\n @Prop() minWidth?: string;\n\n /**\n * The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component.\n */\n @Prop() minimumLoadingDisplayDuration?: number = 1000;\n\n /**\n * Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored.\n */\n @Prop() paginationBarOptions?: IcPaginationBarOptions = {\n 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 * Sets the layout of the table\n */\n @Prop() tableLayout?: \"fixed\" | \"auto\" = \"fixed\";\n\n /**\n * Sets the method used to truncate long text in cells where textWrap is `false`. The `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\"/\"See less\" buttons.\n */\n @Prop() truncationPattern?: IcDataTableTruncationTypes;\n\n /**\n * If `true`, the table displays a linear loading indicator below the header row to indicate an updating state.\n */\n @Prop() updating?: boolean = false;\n\n /**\n * Sets the props for the linear loading indicator used in the updating state.\n */\n @Prop() updatingOptions?: {\n 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 * Sets the table width. Can be set to `auto` or a specific value in `px`, `rem`, or `%`.\n */\n @Prop() width?: string;\n\n /**\n * Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table.\n */\n @Event() icRowHeightChange: EventEmitter<void>;\n\n /**\n * Emitted when 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 const cellContainer = this.getCellContainer(typographyEl);\n if (!cellContainer.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 // truncation updates invoked here once new/updated data has\n // rendered to take into account updated .cell-container/ic-typography box model updates.\n if (\n this.truncationPattern === this.SHOW_HIDE_STRING ||\n this.truncationPattern === this.TOOLTIP_STRING\n ) {\n this.truncateUpdatedData();\n }\n }\n\n private truncateUpdatedData() {\n if (this.dataUpdated) {\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer?.clientHeight - this.DEFAULT_LINE_HEIGHT >=\n truncWrapper?.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n setTimeout(() => {\n // slight delay due to data rendering\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }, 150);\n }\n );\n }\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n this.dataUpdated = false;\n }\n\n if (this.tableSorted) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.updateTruncationTooltip();\n }\n\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {\n this.createShowHideTruncation(typographyEl, cellContainer);\n } else {\n typographyEl.resetTruncation().then(() => {\n cellContainer.removeAttribute(\"style\");\n });\n }\n }\n );\n }\n\n this.tableSorted = false;\n }\n\n // 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 const hasAutoRowHeight = this.globalRowHeight === \"auto\";\n\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (hasAutoRowHeight) {\n cellContainer.style.height = null;\n\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.removeTooltip(cellContainer, typographyEl, tooltipEl);\n typographyEl.setAttribute(\"style\", `--ic-line-clamp: 0`);\n } else if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.resetShowHideTruncation(typographyEl);\n }\n\n return;\n }\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 !cellContainer.classList.contains(this.TEXT_WRAP_STRING)\n ) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n\n if (this.truncationPattern) {\n // If the set row height is bigger than the typography truncation wrapper\n // scroll height, remove see more / see less button\n if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n 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 if (this.truncationPatternUpdated) {\n if (this.truncationPattern === this.TOOLTIP_STRING) {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n const tooltipEl = this.getTooltip(typographyEl);\n\n if (typographyEl.scrollHeight > cellContainer.clientHeight) {\n this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);\n }\n });\n } else if (this.truncationPattern === this.SHOW_HIDE_STRING) {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\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 }\n }\n );\n }\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(this.ROW_HEIGHT_CSS_VARIABLE);\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(this.ROW_HEIGHT_CSS_VARIABLE);\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.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);\n }\n\n private debounceDataTruncation = () => {\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const cellContainer = this.getCellContainer(typographyEl);\n if (!cellContainer.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 dynamicDebounce(\n () => {\n this.dataTruncation(typographyEl);\n\n if (!this.isNewDebounceDelaySet) {\n this.setNewDebounceDelay(200);\n }\n },\n () => this.debounceDelay\n ) as ResizeObserverCallback\n );\n\n this.resizeObserver.observe(typographyEl);\n }\n }\n );\n };\n\n private setNewDebounceDelay = (delay: number) => {\n this.debounceDelay = delay;\n\n this.isNewDebounceDelaySet = true;\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 }>): void {\n const { expanded, typographyEl } = detail;\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&\n expanded\n ) {\n cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, \"inherit\");\n }\n }\n\n @Listen(\"icPageChange\")\n handlePageChange({ detail, target }: CustomEvent<{ value: number }>): void {\n if ((target as HTMLIcPaginationBarElement).parentElement !== this.el) {\n this.fromRow = (detail.value - 1) * this.rowsPerPage;\n this.toRow = this.fromRow + this.rowsPerPage;\n const tableRowsContainer = this.el.shadowRoot.querySelector(\n \".table-row-container\"\n );\n if (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.TOOLTIP_STRING) {\n this.resetShowHideTruncation();\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.SHOW_HIDE_STRING) {\n // ResizeObserver is trigger here due to the see more/see less links being removed.\n // The resizeObserver will also apply the tooltip where relevant\n this.updateTruncationTooltip(true);\n this.getTypographyElements().forEach(\n (typographyEl: HTMLIcTypographyElement) => {\n const truncWrapper = this.getTruncWrapper(typographyEl);\n const cellContainer = this.getCellContainer(typographyEl);\n\n if (\n cellContainer?.clientHeight - this.DEFAULT_LINE_HEIGHT >\n truncWrapper?.scrollHeight\n ) {\n this.resetShowHideTruncation(typographyEl);\n return;\n }\n\n setTimeout(() => {\n // slight delay due to data rendering\n if (typographyEl?.scrollHeight > cellContainer?.clientHeight) {\n this.addShowHideTruncation(cellContainer, typographyEl);\n }\n }, 150);\n }\n );\n }\n\n this.truncationPatternUpdated = true;\n }\n\n @Watch(\"data\")\n async dataHandler(newData: IcDataTableDataType[]): Promise<void> {\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(): Promise<void> {\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.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);\n } else {\n typographyEl.resetTruncation().then(() => {\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n });\n }\n } else {\n this.getTypographyElements().forEach((typographyEl) => {\n const cellContainer = this.getCellContainer(typographyEl);\n\n typographyEl.resetTruncation().then(() => {\n if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {\n cellContainer.style.setProperty(\n this.ROW_HEIGHT_CSS_VARIABLE,\n cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING)\n );\n }\n });\n });\n }\n }\n\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 getColumnWidth = (\n columnWidth?: string | IcDataTableColumnWidthTypes\n ) => {\n // TODO: Setting max width on columns\n let columnWidthStyling = {};\n\n if (columnWidth) {\n if (typeof columnWidth === \"string\") {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-width\"]: columnWidth,\n };\n }\n\n if (typeof columnWidth === \"object\" && !!Object.keys(columnWidth)) {\n if (columnWidth?.minWidth) {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-min-width\"]: columnWidth?.minWidth,\n };\n }\n\n if (columnWidth?.maxWidth) {\n columnWidthStyling = {\n ...columnWidthStyling,\n [\"--column-max-width\"]: columnWidth?.maxWidth,\n };\n }\n }\n }\n\n return columnWidthStyling;\n };\n\n private getRowHeight = (\n currentRowHeight: number,\n columnProps: IcDataTableColumnObject,\n rowTextWrap: boolean,\n cell: any\n ) => {\n if (\n (this.truncationPattern || currentRowHeight) &&\n !columnProps?.textWrap &&\n !rowTextWrap &&\n !this.getCellOptions(cell, \"textWrap\") &&\n columnProps?.dataType !== \"element\"\n ) {\n return {\n [this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight),\n };\n }\n\n return {};\n };\n\n private createCells = (row: IcDataTableDataType, rowIndex: number) => {\n const rowValues = Object.values(row);\n const rowKeys = Object.keys(row);\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: rowIndex,\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 style={{ ...this.getColumnWidth(columnProps.columnWidth) }}\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 ...this.getRowHeight(\n currentRowHeight,\n columnProps,\n rowOptions?.textWrap,\n cell\n ),\n ...this.getColumnWidth(columnProps?.columnWidth),\n }}\n data-row-height={\n this.truncationPattern || currentRowHeight\n ? this.setRowHeight(currentRowHeight)\n : null\n }\n >\n {isSlotUsed(this.el, cellSlotName) ? (\n <slot name={cellSlotName} />\n ) : (\n <Fragment>\n {isSlotUsed(this.el, `${cellSlotName}-icon`) ? (\n <slot name={`${cellSlotName}-icon`} />\n ) : (\n (hasIcon || columnProps?.icon?.onAllCells) && (\n <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(\n ({ cellAlignment, colspan, icon, key, title, columnWidth }) => (\n <th\n scope=\"col\"\n class={{\n [\"column-header\"]: true,\n [`table-density-${this.density}`]: this.notDefaultDensity(),\n [\"updating-state-headers\"]: this.updating && !this.loading,\n }}\n style={{ ...this.getColumnWidth(columnWidth) }}\n colSpan={colspan}\n >\n <div\n class={{\n \"column-header-inner-container\": true,\n [`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\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 * `addDataToPosition` used to add the element in the correct column order.\n * Adding empty string value in to give `createCells` something to loop over.\n */\n const organisedData = data.map((row, rowIndex) => {\n const slottedColumns = this.columns\n .map(\n ({ key }, index) =>\n isSlotUsed(this.el, `${key}-${rowIndex}`) && { key, index }\n )\n .filter((col) => !!col);\n return slottedColumns.length > 0\n ? addDataToPosition(row, slottedColumns, \"\")\n : row;\n });\n\n return organisedData\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 = 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\n if (tooltip) {\n if (this.tableSorted) {\n tooltip.setAttribute(\"target\", typographyEl.id);\n tooltip.setAttribute(\"label\", typographyEl.textContent);\n } else {\n this.removeTooltip(cellContainer, typographyEl, tooltip);\n }\n if (removeTooltipOnly) {\n return;\n }\n }\n\n // This add line clamp to data only when\n // the data object has been updated\n if (!typographyEl.getAttribute(\"style\") && this.dataUpdated) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n\n if (\n typographyEl?.scrollHeight > cellContainer?.clientHeight &&\n this.truncationPattern === this.TOOLTIP_STRING\n ) {\n if (\n !typographyEl.getAttribute(\"style\") ||\n typographyEl.style.cssText.includes(\"--ic-line-clamp: 0;\")\n ) {\n this.addLineClampCSS(typographyEl, cellContainer);\n }\n this.createTruncationTooltip(typographyEl, cellContainer);\n }\n }\n private setTableDimensions = () => {\n let tableHostDimensions = {};\n\n if (this.width) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-width\"]: this.width,\n };\n }\n\n if (this.height) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-height\"]: this.height,\n };\n }\n\n if (this.maxWidth) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-max-width\"]: this.maxWidth,\n };\n }\n\n if (this.minWidth) {\n tableHostDimensions = {\n ...tableHostDimensions,\n [\"--table-min-width\"]: this.minWidth,\n };\n }\n\n return tableHostDimensions;\n };\n\n private removeTooltip(\n cellContainer: HTMLElement,\n typographyEl: HTMLIcTypographyElement,\n tooltip: HTMLIcTooltipElement\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 <Host style={{ ...this.setTableDimensions() }}>\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 style={{\n [\"--table-layout\"]: this.tableLayout,\n }}\n >\n <caption class=\"table-caption\">{caption}</caption>\n {!hideColumnHeaders && (\n <thead\n class={{\n [\"column-header-sticky\"]: stickyColumnHeaders,\n [\"column-header-overlay\"]:\n stickyColumnHeaders && scrollOffset !== 0,\n }}\n >\n <tr>{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 </Host>\n );\n }\n}\n"],"mappings":"mpBAAA,MAAMA,EAAiB,y0L,MCqDVC,EAAS,M,yHACZC,KAAAC,0BAA4B,CAClCC,MAAO,GACPC,QAAS,EACTC,SAAU,KAGJJ,KAAAK,4BAA8B,CACpCH,MAAO,EACPC,QAAS,GACTC,SAAU,IAGJJ,KAAAM,WAAa,CACnBC,SAAUC,EACVC,UAAWC,EACXC,WAAYC,GAGNZ,KAAAa,sBAAwB,KAGxBb,KAAAc,eAAiC,KACjCd,KAAAe,iBAAmB,YACnBf,KAAAgB,oBAAsB,GAAGhB,KAAKe,wBAC9Bf,KAAAiB,eAAiB,UACjBjB,KAAAkB,QAAU,MAAMlB,KAAKiB,iBACrBjB,KAAAmB,iBAAmB,YACnBnB,KAAAoB,gBAAkB,IAAIpB,KAAKmB,mBA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QAAS,KACT,kBAAmB8E,EAAeC,gBAEpC5J,YAAa2J,EAAe3J,aAAe,qBAC3CqG,MAAOsD,EAAetD,OAAS,aAC/BuH,cAAejE,IAAc,MAAdA,SAAc,SAAdA,EAAgBiE,cAC/B3N,IAAK0J,IAAc,MAAdA,SAAc,SAAdA,EAAgB1J,IACrBC,IAAKyJ,IAAc,MAAdA,SAAc,SAAdA,EAAgBzJ,IACrBC,SAAUwJ,IAAc,MAAdA,SAAc,SAAdA,EAAgBxJ,SAC1B0N,IAAMzK,GACHvK,KAAK8T,iBAAmBvJ,KAI7BsC,GAAkBvC,EAAWtK,KAAKuK,GAAI,oBACtC/C,EAAA,OAAKI,MAAM,wBACR0C,EAAWtK,KAAKuK,GAAI,kBACnB/C,EAAA,QAAM4D,KAAK,mBAEX5D,EAAA,qBACEyN,WAAYrI,EAAKjF,OACjBG,KAAM8I,EAAqB9I,KAC3BkI,eAAgBY,EAAqBZ,eACrCC,wBACEW,EAAqBX,wBAEvBC,oBAAqBU,EAAqBV,oBAC1CH,oBAAqBa,EAAqBb,oBAC1CrJ,UAAWkK,EAAqBlK,UAChCQ,WAAY0J,EAAqB1J,WACjCiJ,UAAWS,EAAqBT,UAChCC,UAAWQ,EAAqBR,UAChCC,eAAgBO,EAAqBP,kBAK5CnE,GACC1E,EAAA,OAAKI,MAAM,0BAAyB,YAAW,UAC5C4E,IAAsB,YAAcD,EACjC,GAAGA,YAAuBC,IAC1B,mB"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["icTabCss","Tab","constructor","hostRef","this","focusFromClick","isInitialRender","handleClick","tabClick","emit","tabId","contextId","position","tabPosition","tabFocus","handleFocus","focusTabId","handleMouseDown","appearance","disabled","selected","undefined","disabledWatchHandler","tabEnabled","connectedCallback","tabCreated","el","disconnectedCallback","tabContext","document","querySelector","tabRemovedHandler","componentWillLoad","removeDisabledFalse","componentDidUpdate","setFocus","focus","render","h","Host","class","IcThemeForegroundEnum","Light","role","onClick","onFocus","onMouseDown","tabindex","name","variant","isSlotUsed"],"sources":["../web-components/dist/collection/components/ic-tab/ic-tab.css?tag=ic-tab&encapsulation=shadow","../web-components/dist/collection/components/ic-tab/ic-tab.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n --indicator-initial-color: rgba(23 89 188 / 0%);\n --indicator-color: var(--ic-action-default);\n --focus-indicator: var(--ic-border-focus);\n --label-color: var(--ic-color-primary-text);\n --background-color-hover: var(--ic-action-default-bg-hover);\n --background-color-active: var(--ic-action-default-bg-active);\n\n display: flex;\n align-items: center;\n border-radius: 0;\n color: var(--label-color);\n height: 2.5rem;\n padding: 0 var(--ic-space-md);\n cursor: pointer;\n position: relative;\n border-bottom: var(--ic-space-xxs) solid var(--indicator-initial-color);\n gap: var(--ic-space-xs);\n transition: all var(--ic-easing-transition-fast);\n}\n\n:host(:focus) {\n box-shadow: var(--focus-indicator);\n border-radius: var(--ic-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:hover) {\n background-color: var(--background-color-hover);\n}\n\n:host(:active) {\n background-color: var(--background-color-active);\n}\n\n:host(.ic-tab-light) {\n --indicator-initial-color: rgb(255 255 255 / 0%);\n --indicator-color: rgb(255 255 255 / 100%);\n --focus-indicator: var(--ic-border-focus);\n --label-color: white;\n --background-color-hover: var(--ic-action-dark-bg-hover);\n --background-color-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.selected) {\n border-bottom: var(--ic-space-xxs) solid var(--indicator-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--ic-architectural-300);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.selected.with-transition) {\n transition: all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow);\n }\n}\n\n.ic-tab-label {\n pointer-events: none;\n text-wrap: nowrap;\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n :host {\n border-bottom: var(--ic-space-xxs) solid canvas;\n }\n\n :host(.disabled) {\n color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host(ic-tab) .ic-tab-label {\n color: var(--ic-architectural-white);\n }\n :host(ic-tab.disabled) .ic-tab-label {\n color: inherit;\n }\n} */\n","import { Host, h, } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered next to the tab label.\n * @slot badge - Badge component displayed inline with the tab.\n */\nexport class Tab {\n constructor() {\n this.focusFromClick = false;\n this.isInitialRender = true;\n this.handleClick = () => {\n this.tabClick.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n if (this.focusFromClick) {\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n this.focusFromClick = false;\n }\n };\n this.handleFocus = () => {\n if (!this.focusFromClick) {\n this.focusTabId = this.tabId;\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n }\n };\n this.handleMouseDown = () => {\n //set flag so that focus gets handled after click\n //there is a timing issue where a long click only causes focus to happen & not the click\n //the focus does need to be a separate event though to handle focus from keyboard\n this.focusFromClick = true;\n };\n this.appearance = \"dark\";\n this.contextId = \"default\";\n this.disabled = false;\n this.selected = false;\n this.tabId = undefined;\n this.tabPosition = undefined;\n }\n disabledWatchHandler() {\n this.tabEnabled.emit();\n }\n connectedCallback() {\n this.tabCreated.emit(this.el);\n }\n disconnectedCallback() {\n const tabContext = document.querySelector(`ic-tab-context[context-id=${this.contextId}]`);\n if (tabContext) {\n tabContext.tabRemovedHandler(!!this.focusTabId);\n }\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidUpdate() {\n this.isInitialRender = false;\n }\n /**\n * Sets focus on the tab.\n */\n async setFocus() {\n if (this.el) {\n this.el.focus();\n }\n }\n render() {\n const { disabled, selected, appearance } = this;\n return (h(Host, { class: {\n [\"with-transition\"]: !this.isInitialRender,\n [\"ic-tab-light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"selected\"]: selected,\n [\"disabled\"]: disabled,\n }, role: \"tab\", \"aria-selected\": selected ? \"true\" : \"false\", onClick: this.handleClick, onFocus: this.handleFocus, onMouseDown: this.handleMouseDown, \"aria-disabled\": disabled ? \"true\" : \"false\", tabindex: this.selected ? 0 : -1 }, this.el.querySelector('[slot=\"icon\"]') && h(\"slot\", { name: \"icon\" }), h(\"ic-typography\", { class: \"ic-tab-label\", variant: \"label\" }, h(\"span\", null, h(\"slot\", null))), isSlotUsed(this.el, \"badge\") && h(\"slot\", { name: \"badge\" })));\n }\n static get is() { return \"ic-tab\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-tab.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-tab.css\"]\n };\n }\n static get properties() {\n return {\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForegroundNoDefault\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForegroundNoDefault\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForegroundNoDefault\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Determines whether the light or dark variant of the tabs should be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dark\\\"\"\n },\n \"contextId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The unique context needed if using multiple tabs inside one another i.e. rendering another tabs inside a tab panel.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"context-id\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the disabled state will be set.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"selected\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, the tab will display with a selected indicator and tabIndex will be set.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"selected\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"tabId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The shared ID between panel and tab.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"tab-id\",\n \"reflect\": true\n },\n \"tabPosition\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The position of the tab inside the tabs array in context.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"tab-position\",\n \"reflect\": false\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"tabClick\",\n \"name\": \"tabClick\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is selected.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabClickEventDetail\",\n \"resolved\": \"IcTabClickEventDetail\",\n \"references\": {\n \"IcTabClickEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabClickEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabCreated\",\n \"name\": \"tabCreated\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is dynamically created.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"HTMLIcTabElement\",\n \"resolved\": \"HTMLIcTabElement\",\n \"references\": {\n \"HTMLIcTabElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcTabElement\"\n }\n }\n }\n }, {\n \"method\": \"tabEnabled\",\n \"name\": \"tabEnabled\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab's disabled prop changes\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"tabFocus\",\n \"name\": \"tabFocus\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is focussed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabClickEventDetail\",\n \"resolved\": \"IcTabClickEventDetail\",\n \"references\": {\n \"IcTabClickEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabClickEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabRemoved\",\n \"name\": \"tabRemoved\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is unmounted.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the tab.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"disabledWatchHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-tab.js.map\n"],"mappings":"+IAAA,MAAMA,EAAW,q/H,MCOJC,EAAG,MACZ,WAAAC,CAAAC,G,qMACIC,KAAKC,eAAiB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,GACfwB,KAAM,MAAO,gBAAiBvB,EAAW,OAAS,QAASwB,QAASxC,KAAKG,YAAasC,QAASzC,KAAKW,YAAa+B,YAAa1C,KAAKa,gBAAiB,gBAAiBE,EAAW,OAAS,QAAS4B,SAAU3C,KAAKgB,SAAW,GAAK,GAAKhB,KAAKsB,GAAGI,cAAc,kBAAoBQ,EAAE,OAAQ,CAAEU,KAAM,SAAWV,EAAE,gBAAiB,CAAEE,MAAO,eAAgBS,QAAS,SAAWX,EAAE,OAAQ,KAAMA,EAAE,OAAQ,QAASY,EAAW9C,KAAKsB,GAAI,UAAYY,EAAE,OAAQ,CAAEU,KAAM,U"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as i,f as t,h as e,H as s,g as a}from"./p-8455d1bb.js";import{c as h,A as r,i as c}from"./p-297e99cf.js";const o=':host{display:block;width:var(--tree-view-width, 100%)}:host .heading-area-container{border-bottom:var(--ic-border-default);display:flex;align-items:center;height:calc(var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px));padding:0 var(--ic-space-xs)}:host(.ic-tree-view-small) .heading-area-container{height:calc(var(--ic-space-xl) - var(--ic-space-1px))}:host(.ic-tree-view-large) .heading-area-container{height:calc(var(--ic-space-xxl) - var(--ic-space-1px))}:host(.ic-tree-view-light) .heading-area-container{color:var(--ic-architectural-white);fill:var(--ic-architectural-white)}.icon-container{width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}:host(.ic-tree-view-small) .icon-container{margin:0 var(--ic-space-xxs) 0 0}.ic-text-overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ic-tooltip-overflow{overflow:hidden}@media (forced-colors: active){::slotted([slot="icon"]){fill:currentcolor}}';let n=0;const l=class{constructor(e){i(this,e);this.treeViewId=`ic-tree-view-${n++}`;this.treeItemTag="IC-TREE-ITEM";this.hostMutationObserver=null;this.handleKeyDown=i=>{var t;const e=this.treeItems.indexOf(this.treeItems.filter((i=>i===document.activeElement))[0]);const s=(t=this.treeItems[e])===null||t===void 0?void 0:t.expanded;switch(i.key){case"ArrowDown":this.treeItems[this.getNextItemToSelect(e,true)].setFocus();if(e!==this.treeItems.length-1){i.preventDefault()}break;case"ArrowUp":this.treeItems[this.getNextItemToSelect(e,false)].setFocus();if(e!==0){i.preventDefault()}break;case"ArrowRight":if(this.treeItems[e].isParent&&!s){this.treeItems[e].expanded=true;this.treeItems[e].hasParentExpanded=true;this.treeItems[e].updateAriaLabel()}else if(this.treeItems[e].isParent&&s){this.treeItems[e].children[0].setFocus()}i.preventDefault();break;case"ArrowLeft":if(this.treeItems[e].isParent&&s){this.treeItems[e].expanded=false;this.treeItems[e].hasParentExpanded=false;this.treeItems[e].updateAriaLabel()}else if(this.treeItems[e].parentElement.tagName===this.treeItemTag){this.treeItems[e].parentElement.setFocus()}i.preventDefault();break}};this.getNextItemToSelect=(i,t)=>{const e=this.treeItems.length-1;if(i<1){i=0}let s=t?i+1:i-1;if(s<0){s=0}else if(s>e){s=e}const a=e+1;let h=0;while(h<a){if(s<0||s>e){return i}if(!this.treeItems[s].disabled&&(this.treeItems[s].parentElement.tagName!==this.treeItemTag||this.treeItems[s].parentElement.expanded)){return s}if(s===e&&this.treeItems[s].disabled){return i}s=t?s+1:s-1;h++}return i};this.linkTreeItems=()=>{this.treeItems.forEach((i=>{i.setAttribute("context-id",this.treeViewId)}))};this.setTreeItems=()=>{this.treeItems=this.getAllTreeItems(this.el);this.linkTreeItems()};this.addSlotChangeListener=()=>{this.el.addEventListener("slotchange",this.setTreeItems)};this.truncateTreeViewHeading=()=>{const i=this.el.shadowRoot.querySelector(".tree-view-header");const t=i.closest("ic-tooltip");const e=this.el.shadowRoot.querySelector(".heading-area-container");if((i===null||i===void 0?void 0:i.scrollHeight)>(e===null||e===void 0?void 0:e.clientHeight)){i.classList.add("ic-text-overflow");if(!t){const t=document.createElement("ic-tooltip");t.setAttribute("target",this.el.id);t.setAttribute("label",i.textContent);t.classList.add("ic-tooltip-overflow");t.setAttribute("placement","right");e.appendChild(t);t.appendChild(i)}}};this.hostMutationCallback=i=>{if(i.some((({type:i,addedNodes:t,removedNodes:e})=>i==="childList"?h(t,e,"icon"):false))){t(this)}};this.isHeadingDefined=()=>r(this.heading)&&this.heading!==null;this.hasHeadingAreaContent=()=>c(this.el,"heading")||this.isHeadingDefined()||c(this.el,"icon");this.treeItems=undefined;this.appearance="dark";this.heading="";this.size="default"}watchAppearanceHandler(){this.treeItems.forEach((i=>{i.appearance=this.appearance}))}watchSizeHandler(){this.treeItems.forEach((i=>{i.size=this.size}))}disconnectedCallback(){var i,t;(i=this.el)===null||i===void 0?void 0:i.removeEventListener("slotchange",this.setTreeItems);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentDidLoad(){this.setTreeItems();this.watchAppearanceHandler();this.watchSizeHandler();setTimeout((()=>{this.truncateTreeViewHeading()}),100);this.addSlotChangeListener();this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}handleTreeItemSelected(i){this.treeItems.forEach((t=>{if(t.selected&&t.id!==i.detail.id){t.selected=false}}))}getAllTreeItems(i){const t=[];const e=i=>{Array.from(i.children).forEach((i=>{if(i.tagName===this.treeItemTag){t.push(i)}e(i)}))};e(i);return t}render(){const{appearance:i,heading:t,size:a}=this;return e(s,{"context-id":this.treeViewId,class:{[`ic-tree-view-${i}`]:true,[`ic-tree-view-${a}`]:a!=="default"},onKeyDown:this.handleKeyDown,"aria-label":this.isHeadingDefined()?t:null},this.hasHeadingAreaContent()&&e("div",{class:"heading-area-container"},c(this.el,"icon")&&e("div",{class:"icon-container"},e("slot",{name:"icon"})),e("ic-typography",{variant:"subtitle-large",class:"tree-view-header"},c(this.el,"heading")?e("slot",{name:"heading"}):t)),e("slot",null))}get el(){return a(this)}static get watchers(){return{appearance:["watchAppearanceHandler"],size:["watchSizeHandler"]}}};l.style=o;export{l as ic_tree_view};
|
2
|
-
//# sourceMappingURL=p-80d6a6b5.entry.js.map
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a,f as n}from"./p-8455d1bb.js";import{k as o,a as r,M as l,j as h,E as c,B as d,n as u,x as p,m as b,p as f,s as m,t as g,N as v,y,O as x,i as w,F as k}from"./p-8128572e.js";import{I as z,a as L}from"./p-fd186591.js";const C=`<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M2.08748 0L0.912476 1.175L4.72914 5L0.912476 8.825L2.08748 10L7.08748 5L2.08748 0Z" fill="currentColor"/>\n</svg>\n`;const H=`<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.1709 8.825L7.34589 5L11.1709 1.175L9.99589 0L4.99589 5L9.99589 10L11.1709 8.825ZM0.829224 0H2.49589V10H0.829224V0Z" fill="currentColour"/>\n</svg>`;const M='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{box-sizing:border-box;width:100%;display:flex;justify-content:center}nav{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}ic-button{cursor:pointer}ic-button.next-previous{--icon-width:var(--ic-space-xs);--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs));padding:0 var(--ic-space-xxs) 0 var(--ic-space-xxxs)}ic-button.first-last{--icon-width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs))}.disabled{color:var(--ic-architectural-200);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-current-page{display:none}.sr-only{position:absolute;left:-9999px}';const T=class{constructor(s){t(this,s);this.icPageChange=i(this,"icPageChange",7);this.handleClickFirst=()=>{this.currentPage=1;this.icPageChange.emit({value:this.currentPage})};this.handleClickPrevious=()=>{this.currentPage--;this.icPageChange.emit({value:this.currentPage})};this.handleClickNext=()=>{this.currentPage++;this.icPageChange.emit({value:this.currentPage})};this.handleClickLast=()=>{this.currentPage=this.pages;this.icPageChange.emit({value:this.currentPage})};this.firstButton=()=>e("ic-button",{id:"first-page-button","aria-label":"Go to first page",appearance:this.appearance,onClick:this.handleClickFirst,class:"page-button first-last",disabled:this.currentPage===1||this.disabled,variant:"icon",innerHTML:H});this.previousButton=()=>e("ic-button",{id:"previous-page-button","aria-label":"Go to previous page",appearance:this.appearance,onClick:this.handleClickPrevious,class:"page-button next-previous flip",disabled:this.currentPage===1||this.disabled,variant:"icon",innerHTML:C});this.nextButton=()=>e("ic-button",{id:"next-page-button","aria-label":"Go to next page",appearance:this.appearance,onClick:this.handleClickNext,class:"page-button next-previous",disabled:this.currentPage===this.pages||this.disabled,variant:"icon",innerHTML:C});this.lastButton=()=>e("ic-button",{id:"last-page-button","aria-label":"Go to last page",appearance:this.appearance,onClick:this.handleClickLast,class:"page-button first-last flip",disabled:this.currentPage===this.pages||this.disabled,variant:"icon",innerHTML:H});this.renderStartEllipsis=()=>e("ic-pagination-item",{appearance:this.appearance,type:"ellipsis",id:"start-ellipsis",disabled:this.disabled});this.renderEndEllipsis=()=>e("ic-pagination-item",{appearance:this.appearance,type:"ellipsis",id:"end-ellipsis",disabled:this.disabled});this.renderStartItems=()=>this.startItems.map((t=>e("ic-pagination-item",{appearance:this.appearance,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderEndItems=()=>this.endItems.map((t=>e("ic-pagination-item",{appearance:this.appearance,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.renderMiddleItems=()=>this.midItems.map((t=>e("ic-pagination-item",{appearance:this.appearance,selected:t===this.currentPage,id:`pagination-item-${t}`,type:"page",page:t,disabled:this.disabled})));this.endEllipsis=false;this.endItems=[];this.midItems=[];this.startEllipsis=false;this.startItems=[];this.adjacentCount=1;this.appearance="default";this.boundaryCount=1;this.defaultPage=1;this.disabled=false;this.hideCurrentPage=false;this.hideFirstAndLastPageButton=false;this.label="Page";this.pages=undefined;this.type="simple";this.currentPage=this.defaultPage}watchAdjacentCountHandler(){if(this.adjacentCount>2){this.adjacentCount=2}}watchBoundaryCountHandler(){if(this.boundaryCount>2){this.boundaryCount=2}}watchNumberPagesHandler(){this.watchPageChangeHandler()}watchTypeHandler(){this.watchPageChangeHandler()}watchPageChangeHandler(){if(this.type==="simple"){return}this.startEllipsis=false;this.endEllipsis=false;this.startItems=[];this.endItems=[];this.midItems=[];const t=[];let i=0;const e=[];let s=this.pages;const a=[];let n;let o;let r=false;let l=false;if(this.pages<=this.boundaryCount*2+this.adjacentCount*2+3){this.startEllipsis=false;this.endEllipsis=false;for(let i=1;i<=this.pages;i++){t.push(i)}this.startItems=t;return}i=this.boundaryCount===0?1:this.boundaryCount;s=this.boundaryCount===0?this.pages:this.pages-this.boundaryCount+1;if(this.currentPage<=this.adjacentCount+this.boundaryCount+2){r=false;l=true;let t=2*this.adjacentCount+1;if(this.boundaryCount===0){t--}n=i+1;o=n+t}else{r=true;if(this.currentPage>this.pages-(this.adjacentCount+this.boundaryCount+2)){let t=2*this.adjacentCount+1;if(this.boundaryCount===0){t--}o=this.boundaryCount===0?this.pages-1:this.pages-this.boundaryCount;n=o-t}else{l=true;n=this.currentPage-this.adjacentCount;o=this.currentPage+this.adjacentCount}}if(this.boundaryCount>0||this.boundaryCount===0&&r===false){for(let e=1;e<=i;e++){t.push(e)}}if(this.boundaryCount>0||this.boundaryCount===0&&l===false){for(let t=s;t<=this.pages;t++){e.push(t)}}for(let t=n;t<=o;t++){a.push(t)}this.startEllipsis=r;this.endEllipsis=l;this.startItems=t;this.endItems=e;this.midItems=a}componentWillLoad(){this.watchPageChangeHandler();this.watchBoundaryCountHandler();this.watchAdjacentCountHandler();o(this.disabled,this.el)}componentDidLoad(){r([{prop:this.pages,propName:"pages"}],"Pagination")}paginationItemClickHandler(t){const i=t.detail.page;this.currentPage=i;this.icPageChange.emit({value:this.currentPage})}async setCurrentPage(t){if(typeof t==="number"&&t>0&&t<=this.pages){this.currentPage=t}else{console.error("Current page must be a number greater than zero but less than or equal to the total number of pages")}}render(){const{type:t,currentPage:i,hideCurrentPage:a,disabled:n,hideFirstAndLastPageButton:o,label:r}=this;return e(s,null,t==="simple"&&e("nav",{class:{["disabled"]:n},role:"navigation","aria-label":"Pagination Navigation"},o?null:this.firstButton(),this.previousButton(),e("ic-pagination-item",{appearance:this.appearance,type:"simple-current",page:i,label:r,class:{["hide-current-page"]:a},disabled:n}),this.nextButton(),o?null:this.lastButton()),t==="complex"&&e("nav",{class:{["disabled"]:n},role:"navigation","aria-label":"Pagination Navigation"},o?null:this.firstButton(),this.previousButton(),this.renderStartItems(),this.startEllipsis&&this.renderStartEllipsis(),this.renderMiddleItems(),this.endEllipsis&&this.renderEndEllipsis(),this.renderEndItems(),this.nextButton(),o?null:this.lastButton()),t==="complex"&&e("span",{class:"sr-only","aria-live":"polite"},"Page ",this.currentPage))}get el(){return a(this)}static get watchers(){return{adjacentCount:["watchAdjacentCountHandler"],boundaryCount:["watchBoundaryCountHandler"],pages:["watchNumberPagesHandler"],type:["watchTypeHandler"],currentPage:["watchPageChangeHandler"]}}};T.style=M;const $='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}a{text-align:center}.item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--ic-space-xl) + var(--ic-space-sm));height:var(--ic-space-xl);margin:var(--ic-space-xxs) var(--ic-space-xxxs);cursor:pointer;text-decoration:none}button{background:none;border:none;outline:inherit;position:relative}.ellipsis{pointer-events:none;color:var(--ic-color-secondary-text)}.item-container:focus{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.page{color:var(--ic-action-default)}.simple-current{min-width:calc(var(--ic-space-xxl) + var(--ic-space-md));height:var(--ic-space-lg);cursor:default}.item-container.page:hover:not(.selected):not(:focus){border-radius:var(--ic-border-radius);background-color:var(--ic-action-default-bg-hover)}.item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-action-default-bg-active)}.selected{pointer-events:none;outline:none}.selected::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-default)}.page-selected{color:var(--ic-color-primary-text)}.item-container.page.light:hover:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-hover)}.item-container.page.light:active:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-active)}ic-typography.light{color:var(--ic-color-white-text)}.selected.light::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-light)}.item-container.page.dark:hover:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-hover)}.item-container.page.dark:active:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-active)}ic-typography.dark{color:var(--ic-color-primary-text)}.selected.dark::after{content:"";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-dark)}.disabled{color:var(--ic-architectural-200);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (forced-colors: active){.selected::after{background-color:Highlight}.selected.light::after{background-color:Highlight}.selected.dark::after{background-color:Highlight}.disabled{color:GrayText}}';const B=class{constructor(e){t(this,e);this.paginationItemClick=i(this,"paginationItemClick",7);this.handleClick=()=>{this.paginationItemClick.emit({page:this.page})};this.capitalizedLabel=undefined;this.appearance="default";this.disabled=false;this.label="Page";this.page=undefined;this.selected=false;this.type=undefined}watchLabelHandler(){this.capitalizedLabel=l(this.label)}componentWillLoad(){this.watchLabelHandler();o(this.disabled,this.el)}render(){const{page:t,selected:i,type:s,disabled:a,appearance:n,label:o,capitalizedLabel:r}=this;return e("a",null,s==="ellipsis"?e("div",{class:{["item-container"]:true,["ellipsis"]:true,["disabled"]:a}},e("ic-typography",{class:{[`${n}`]:true},variant:"label"},"...")):s==="page"?e("button",{disabled:a,onClick:this.handleClick,tabindex:i?"-1":"0",role:"button","aria-current":i&&"page","aria-label":i?`${o}: ${t}`:`Go to ${o} ${t}`,class:{["selected"]:!a&&i,["disabled"]:a,["item-container"]:true,[`${n}`]:true,["page"]:s==="page"}},e("ic-typography",{variant:"label",class:{["page-selected"]:i,["disabled"]:a,[`${n}`]:true}},t)):e("ic-typography",{"aria-live":"polite",class:{[`simple-current ${n}`]:true,["disabled"]:a},variant:"label"},r," ",t))}get el(){return a(this)}static get watchers(){return{label:["watchLabelHandler"]}}};B.style=$;const j=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />\n</svg>\n`;const I=`<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n<path d="M12.6666 4.27334L11.7266 3.33334L7.99998 7.06001L4.27331 3.33334L3.33331 4.27334L7.05998 8.00001L3.33331 11.7267L4.27331 12.6667L7.99998 8.94001L11.7266 12.6667L12.6666 11.7267L8.93998 8.00001L12.6666 4.27334Z" fill="currentColor" />\n</svg>\n`;const N='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative}:host(.full-width){width:100%}ic-input-component-container:hover{--border-color:var(--ic-action-dark-hover)}ic-input-component-container:active{--border-color:var(--ic-action-dark-active);color:var(--ic-action-dark-active)}ic-input-component-container.menu-open{--border-color:var(--ic-architectural-400);color:var(--ic-action-dark)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:0.375rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 0.375rem center;background-image:url("data:image/svg+xml;utf8,<svg fill=\'black\' height=\'24\' viewBox=\'0 0 24 24\' width=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M7 10l5 5 5-5z\'/><path d=\'M0 0h24v24H0z\' fill=\'none\'/></svg>")}select option,.select-option-selected{color:var(--ic-color-primary-text)}select:disabled{color:var(--ic-architectural-200);background-image:url("data:image/svg+xml;utf8,<svg fill=\'grey\' height=\'24\' viewBox=\'0 0 24 24\' width=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M7 10l5 5 5-5z\'/><path d=\'M0 0h24v24H0z\' fill=\'none\'/></svg>")}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center;position:relative}.select-input{width:100%;height:100%;padding:0 0.375rem;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none}.select-input:focus{outline:var(--ic-hc-focus-outline)}:host(:not(.disabled)) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}.select-input[disabled]{pointer-events:none}:host(.searchable) .select-input{cursor:auto}.searchable-select-container{align-items:center;display:flex;width:100%;position:relative}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xs);color:var(--ic-action-dark)}.expand-icon>svg{display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.disabled) .expand-icon,:host(.disabled) .expand-icon>svg>path{color:var(--ic-architectural-200)}:host(.searchable) .expand-icon{padding-left:var(--ic-space-xxs);height:2.25rem}:host(.searchable) .expand-icon>svg{height:2.25rem;padding:0 0.375rem}:host(.searchable:not(.disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-action-dark)}.expand-icon-filled{color:var(--ic-action-dark)}.expand-icon-open,:host(.searchable) .expand-icon-open{transform:rotateX(180deg)}:host(.disabled) .value-text,.placeholder{color:var(--ic-color-tertiary-text)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;gap:var(--ic-space-xxs);padding-left:2.375rem;align-items:center}:host(.small) .clear-button-container{padding-left:1.875rem}.divider{width:var(--ic-border-width);background-color:var(--ic-architectural-400);margin:var(--ic-space-xxs) 0;border-radius:var(--ic-space-1px);height:var(--ic-space-lg)}:host(.small) .divider{height:var(--ic-space-md)}.clear-button{position:absolute;right:2.75rem;border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus{background-color:var(--ic-focus-blue);box-shadow:inset 0 0 0 0.125rem var(--ic-focus-glow);border-radius:0.25rem}.clear-button:focus *{fill:white}.searchable-select-results-status{border:0;clip:rect(0, 0, 0, 0, 0);height:var(--ic-space-1px);overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:var(--ic-space-1px)}::slotted([slot="icon"]){fill:var(--ic-color-tertiary-text)}.has-value ::slotted([slot="icon"]){fill:var(--ic-color-primary-text)}.readonly ::slotted([slot="icon"]){padding:0.375rem;margin-bottom:0.75rem}@media (forced-colors: active){.has-value ::slotted([slot="icon"]){fill:currentcolor}}';let q=0;const F=[...y,"tabindex","title"];const O=class{constructor(e){t(this,e);this.icBlur=i(this,"icBlur",7);this.icChange=i(this,"icChange",7);this.icClear=i(this,"icClear",7);this.icClose=i(this,"icClose",7);this.icFocus=i(this,"icFocus",7);this.icInput=i(this,"icInput",7);this.icOpen=i(this,"icOpen",7);this.icOptionSelect=i(this,"icOptionSelect",7);this.icRetryLoad=i(this,"icRetryLoad",7);this.hasSetDefaultValue=false;this.inheritedAttributes={};this.initialOptionsEmpty=false;this.inputId=`ic-select-input-${q++}`;this.menuId=`${this.inputId}-menu`;this.searchableMenuItemSelected=false;this.ungroupedOptions=[];this.hostMutationObserver=null;this.hostMutationCallback=t=>{let i=false;t.forEach((({attributeName:t,type:e,addedNodes:s,removedNodes:a})=>{if(F.includes(t)){this.inheritedAttributes[t]=this.el.getAttribute(t);i=true}else if(e==="childList"){i=h(s,a,"icon")}}));if(i){n(this)}};this.handleRetry=t=>{var i;if(t.detail.keyPressed)(i=this.searchableSelectElement)===null||i===void 0?void 0:i.focus();this.blurredBecauseButtonPressed=true;this.retryButtonClick=true;this.hasSetDefaultValue=true;this.icRetryLoad.emit({value:this.hiddenInputValue})};this.emitIcChange=t=>{if(!this.searchable){this.value=t}clearTimeout(this.debounceIcChange);this.debounceIcChange=window.setTimeout((()=>{this.icChange.emit({value:t})}),this.currDebounce)};this.emitImmediateIcChange=t=>{this.value=t;clearTimeout(this.debounceIcChange);this.icChange.emit({value:t})};this.deduplicateOptions=t=>{const i=[];const e=[];let s;t.forEach((t=>{if(t.children){s=[];t.children.forEach((t=>{if(i.includes(t.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${t.value}) which has been removed.`)}else{i.push(t.value);s.push(t)}}));const a=Object.assign(Object.assign({},t),{children:s});e.push(a)}else{if(i.includes(t.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${t.value}) which has been removed.`)}else{i.push(t.value);e.push(t)}}}));return e};this.setOptionsValuesFromLabels=()=>{var t;if(((t=this.options)===null||t===void 0?void 0:t.length)>0&&this.options.map){this.options.map((t=>{if(!t.value){t.value=t.label}}))}};this.setUngroupedOptions=t=>{this.ungroupedOptions=t.detail.options};this.setTextColor=()=>{if(this.nativeSelectElement.selectedIndex===0){this.nativeSelectElement.className="placeholder"}else{this.nativeSelectElement.className="select-option-selected"}};this.setMenuChange=t=>{if(this.open!==t){this.open=t}};this.getLabelFromValue=t=>c(t,this.uniqueOptions);this.getFilteredChildMenuOptions=t=>{let i=t.children;if(this.searchable){i=d(t.children,this.includeDescriptionsInSearch,this.searchableSelectInputValue,this.searchMatchPosition)}else{i=d(t.children,false,this.pressedCharacters,"start")}const e=Object.assign({},t);e.children=i;return e};this.handleNativeSelectChange=()=>{this.icOptionSelect.emit({value:this.nativeSelectElement.value});this.emitImmediateIcChange(this.nativeSelectElement.value);this.setTextColor()};this.handleCustomSelectChange=t=>{if(this.searchable&&t.detail.label===this.emptyOptionListText){this.searchableSelectElement.focus();return}if(this.searchable){this.value=t.detail.value;this.searchableMenuItemSelected=true;if(this.value===this.currValue){this.searchableSelectInputValue=this.getLabelFromValue(this.value)}this.inputValueToFilter=null;this.hiddenInputValue=this.getValueFromLabel(this.searchableSelectInputValue)}this.ariaActiveDescendant=t.detail.optionId;this.icOptionSelect.emit({value:t.detail.value});this.emitIcChange(t.detail.value)};this.handleMenuChange=t=>{this.open=t.detail.open;this.pressedCharacters="";this.searchable&&this.handleFocusIndicatorDisplay()};this.handleMenuKeyPress=t=>{t.cancelBubble=true;this.handleCharacterKeyDown(t.detail.key)};this.handleMenuValueChange=t=>{this.value=t.detail.value};this.handleFocusIndicatorDisplay=()=>{const t=this.el.shadowRoot.querySelector(".focus-indicator");if(this.open){t.classList.add("focus-indicator-enabled")}else{t.classList.remove("focus-indicator-enabled")}};this.handleMouseDown=t=>{if(!this.open){t.preventDefault()}};this.isExternalFiltering=()=>this.searchable&&this.disableFilter;this.handleClick=t=>{var i;if(!this.open){if(this.isExternalFiltering()){this.menu.options=this.filteredOptions}else if(!this.hasTimedOut&&!this.loading&&!((i=this.noOptions)===null||i===void 0?void 0:i.length)&&(!this.searchable||this.searchableMenuItemSelected)){this.noOptions=null;this.menu.options=this.uniqueOptions}}if(t.detail!==0){this.menu.handleClickOpen()}};this.handleExpandIconMouseDown=t=>{if(!this.disabled){t.preventDefault();this.searchableSelectElement.focus();this.handleClick(t)}};this.handleClear=t=>{t.stopPropagation();this.hasTimedOut=false;clearTimeout(this.timeoutTimer);this.noOptions=null;this.emitImmediateIcChange(null);this.icClear.emit();if(this.searchable){this.searchableSelectElement.value=null;this.searchableSelectInputValue=null;this.filteredOptions=this.uniqueOptions;this.hiddenInputValue=null;this.searchableSelectElement.focus()}else{this.customSelectElement.focus()}};this.handleCharacterKeyDown=t=>{if(this.open&&t===" "&&this.pressedCharacters.length===0&&!this.hasTimedOut&&!this.loading){this.setMenuChange(false)}if(t.length===1&&!this.searchable){window.clearTimeout(this.characterKeyPressTimer);this.characterKeyPressTimer=window.setTimeout((()=>this.pressedCharacters=""),1e3);this.pressedCharacters+=t;this.handleFilter();if(!this.noOptions){this.emitImmediateIcChange(this.filteredOptions[0].value)}}else{this.pressedCharacters=""}};this.handleNativeSelectKeyDown=t=>{if(t.key!=="Escape"&&t.key!=="Tab"||this.open){t.cancelBubble=true}this.handleCharacterKeyDown(t.key)};this.handleKeyDown=t=>{if(t.key!=="Escape"&&t.key!=="Tab"||this.open){t.cancelBubble=true}const i=t.key==="ArrowDown"||t.key==="ArrowUp";if(!this.open){if(this.isExternalFiltering()&&(t.key==="Enter"||i)){this.menu.options=this.filteredOptions}else{if(!this.hasTimedOut){this.noOptions=null;this.menu.options=this.uniqueOptions}}}if(this.open&&t.key==="Enter"){this.setMenuChange(false)}else{if(!(i&&this.noOptions!==null)){if(!(t.key===" "&&this.pressedCharacters.length>0)){this.menu.handleKeyboardOpen(t)}this.handleCharacterKeyDown(t.key)}}};this.handleClearButtonFocus=()=>{this.clearButtonFocused=true};this.handleClearButtonBlur=t=>{var i;const e=(i=this.menu)===null||i===void 0?void 0:i.querySelector("#retry-button");if(!(this.searchableSelectElement&&t.relatedTarget===this.searchableSelectElement)&&!(e&&t.relatedTarget===e)){this.setMenuChange(false);this.handleFocusIndicatorDisplay()}this.clearButtonFocused=false};this.handleFilter=()=>{var t;const i=this.deduplicateOptions(this.searchable?[...this.uniqueOptions]:this.ungroupedOptions);let e=false;let s=[];i.map((t=>{if(t.children)e=true}));let a;if(this.searchable){a=d(i,this.includeDescriptionsInSearch,this.inputValueToFilter,this.searchMatchPosition);this.searchableMenuItemSelected=false}else{a=d(i,false,this.pressedCharacters,"start")}if(!e&&((t=a[0])===null||t===void 0?void 0:t.label)!==this.emptyOptionListText){s=a}else if(e){i.map((t=>{if(this.includeGroupTitlesInSearch){if(a.indexOf(t)!==-1){s.push(t)}else{s.push(this.getFilteredChildMenuOptions(t))}}else{s.push(this.getFilteredChildMenuOptions(t))}}))}let n=false;if(e){n=true;s.map((t=>{if(t.children.length>0){n=false}}))}if(s.length>0&&!n){this.noOptions=null;this.filteredOptions=s}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.filteredOptions=this.noOptions}};this.triggerLoading=()=>{this.hasTimedOut=false;this.noOptions=[{label:this.loadingLabel,value:"",loading:true}];if(this.filteredOptions!==this.noOptions&&this.searchable){this.filteredOptions=this.noOptions}else if(this.uniqueOptions!==this.noOptions&&!this.searchable){this.uniqueOptions=this.noOptions}if(this.timeout){this.timeoutTimer=window.setTimeout((()=>{this.loading=false;this.hasTimedOut=true;this.noOptions=[{label:this.loadingErrorLabel,value:"",timedOut:true}];this.filteredOptions=this.noOptions;if(!this.searchable)this.uniqueOptions=this.noOptions}),this.timeout)}};this.getValueFromLabel=t=>{var i;return(i=this.uniqueOptions.find((i=>i.label===t)))===null||i===void 0?void 0:i.value};this.handleSearchableSelectInput=t=>{this.searchableSelectInputValue=t.target.value;this.icInput.emit({value:this.searchableSelectInputValue});this.emitIcChange(this.searchableSelectInputValue);this.hiddenInputValue=this.searchableSelectInputValue;this.inputValueToFilter=this.searchableSelectInputValue;this.setMenuChange(true);if(!this.disableFilter){this.handleFilter();this.debounceAriaLiveUpdate()}};this.updateSearchableSelectResultAriaLive=()=>{const t=this.el.shadowRoot.querySelector(".searchable-select-results-status");if(t){if(this.noOptions!==null){t.innerText=this.emptyOptionListText}else{t.innerText=""}}};this.getDefaultValue=t=>this.getLabelFromValue(t)||t||null;this.onFocus=()=>{this.icFocus.emit()};this.onBlur=({relatedTarget:t})=>{var i;const e=t;if(e!==null&&(e.tagName==="UL"&&e.className.includes("menu")||e.tagName==="LI"&&e.className.includes("option"))){return}const s=(i=this.menu)===null||i===void 0?void 0:i.querySelector("#retry-button");const a=this.searchable&&!!this.menu&&e!==this.menu&&!Array.from(this.menu.querySelectorAll("[role='option']")).includes(e)&&!(this.clearButton&&e===this.clearButton)&&!(s&&e===s);if(a){if(!this.retryButtonClick){this.setMenuChange(false)}this.handleFocusIndicatorDisplay()}this.retryButtonClick=false;this.icBlur.emit()};this.onTimeoutBlur=t=>{if(t.detail.ev.relatedTarget!==this.searchableSelectElement&&!this.blurredBecauseButtonPressed){this.setMenuChange(false);this.handleFocusIndicatorDisplay();this.icBlur.emit()}this.blurredBecauseButtonPressed=false};this.handleFormReset=()=>{this.value=this.initialValue;if(this.searchable){this.searchableSelectInputValue=this.getDefaultValue(this.value);this.hiddenInputValue=this.value}};this.ariaActiveDescendant=undefined;this.clearButtonFocused=false;this.debounceIcChange=undefined;this.hiddenInputValue=undefined;this.noOptions=null;this.open=false;this.pressedCharacters="";this.searchableSelectInputValue=null;this.charactersUntilSuggestions=0;this.disabled=false;this.disableFilter=false;this.emptyOptionListText="No results found";this.form=undefined;this.formaction=undefined;this.formenctype=undefined;this.formmethod=undefined;this.formnovalidate=undefined;this.formtarget=undefined;this.fullWidth=false;this.helperText="";this.hideLabel=false;this.includeDescriptionsInSearch=false;this.includeGroupTitlesInSearch=false;this.label=undefined;this.loadingErrorLabel="Loading Error";this.loadingLabel="Loading...";this.name=this.inputId;this.placeholder="Select an option";this.readonly=false;this.required=false;this.searchable=false;this.searchMatchPosition="anywhere";this.selectOnEnter=false;this.showClearButton=false;this.size="default";this.small=false;this.timeout=undefined;this.validationStatus="";this.validationText="";this.loading=false;this.options=[];this.filteredOptions=this.options;this.uniqueOptions=this.options;this.debounce=0;this.currDebounce=this.debounce;this.value=undefined;this.initialValue=this.value;this.inputValueToFilter=this.value;this.currValue=this.value}loadingHandler(t){t&&this.triggerLoading()}watchOptionsHandler(){var t;if(!this.hasTimedOut){this.loading=false;clearTimeout(this.timeoutTimer);if(this.isExternalFiltering()){if(((t=this.options)===null||t===void 0?void 0:t.length)>0){this.setOptionsValuesFromLabels();this.noOptions=null;this.uniqueOptions=this.deduplicateOptions(this.options);this.filteredOptions=this.uniqueOptions}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}this.updateSearchableSelectResultAriaLive();this.setDefaultValue()}else{this.setOptionsValuesFromLabels();this.uniqueOptions=this.deduplicateOptions(this.options);this.filteredOptions=this.uniqueOptions;if(this.initialOptionsEmpty){this.setDefaultValue();this.initialOptionsEmpty=false}}}else{if(!this.searchable){this.options=this.noOptions}}}debounceChangedHandler(t){this.updateOnChangeDebounce(t)}valueChangedHandler(){if(this.value!==this.currValue){this.currValue=this.value}if(this.searchable){this.searchableSelectInputValue=this.getLabelFromValue(this.currValue)||this.currValue}}openChangedHandler(){this.open?this.icOpen.emit():this.icClose.emit()}disconnectedCallback(){var t;u(this.el,this.handleFormReset);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){var t;this.inheritedAttributes=p(this.el,F);o(this.disabled,this.el);this.setOptionsValuesFromLabels();b(this.el,this.handleFormReset);if(!((t=this.options)===null||t===void 0?void 0:t.length)){this.initialOptionsEmpty=true;this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}else{this.setDefaultValue();this.uniqueOptions=this.deduplicateOptions(this.options)}}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Select");if(this.loading){this.triggerLoading()}this.hiddenInputValue=this.searchable&&this.currValue;this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true})}componentDidRender(){if(this.nativeSelectElement&&!this.disabled){this.setTextColor()}}async setFocus(){if(this.nativeSelectElement){this.nativeSelectElement.focus()}else if(this.customSelectElement){this.customSelectElement.focus()}else if(this.searchableSelectElement){this.searchableSelectElement.focus()}}updateOnChangeDebounce(t){if(this.currDebounce!==t){this.currDebounce=t}}debounceAriaLiveUpdate(){clearTimeout(this.debounceAria);window.setTimeout((()=>{this.updateSearchableSelectResultAriaLive()}),800)}setDefaultValue(){if(!this.hasSetDefaultValue&&this.currValue){this.searchableSelectInputValue=this.getDefaultValue(this.currValue);this.initialValue=this.currValue;this.hasSetDefaultValue=true}}render(){const{small:t,size:i,disabled:a,fullWidth:n,helperText:o,hideLabel:r,label:l,menuId:h,name:c,options:d,placeholder:u,readonly:p,required:b,searchable:y,showClearButton:x,validationStatus:w,validationText:k,currValue:C}=this;f(true,this.el,c,this.searchable?this.hiddenInputValue:C,a);const H=w===L.Error?"true":"false";const M=m(this.inputId,o!=="",g(this.validationStatus,this.disabled)).trim();let T=!!this.el.querySelector(`[slot="icon"]`);if(T&&(a||p&&!this.value)){T=false}return e(s,{class:{disabled:a,searchable:y,small:t,[i]:i!=="default","full-width":n},onBlur:this.onBlur},e("ic-input-container",{readonly:p},!r&&e("ic-input-label",{for:this.inputId,label:l,helperText:o,required:b,disabled:a,readonly:p}),e("ic-input-component-container",{ref:t=>this.anchorEl=t,class:{"menu-open":this.open},small:t,size:i,fullWidth:n,disabled:a,readonly:p,validationStatus:w},T&&e("span",{slot:"left-icon",class:{["readonly"]:p,["has-value"]:!!this.value}},e("slot",{name:"icon"})),p?e("ic-typography",null,e("p",null,this.getLabelFromValue(C))):v()?e("select",Object.assign({ref:t=>this.nativeSelectElement=t,disabled:a,onChange:this.handleNativeSelectChange,required:b,id:this.inputId,"aria-label":l,"aria-describedby":M,"aria-invalid":H,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.handleNativeSelectKeyDown,form:this.form},this.inheritedAttributes),e("option",{value:"",selected:true,disabled:!x},u),d.map((t=>{if(t.children){return e("optgroup",{label:t.label},t.children.map((t=>e("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label))))}else{return e("option",{value:t.value,disabled:t.disabled,selected:t.value===C},t.label)}}))):y?e("div",{class:"searchable-select-container"},e("input",{class:"select-input",role:"combobox",autocomplete:"off","aria-label":l,"aria-describedby":M,"aria-activedescendant":this.ariaActiveDescendant,"aria-autocomplete":"list","aria-expanded":this.open?"true":"false","aria-invalid":H,"aria-required":b?"true":"false","aria-controls":h,ref:t=>this.searchableSelectElement=t,id:this.inputId,value:this.searchableSelectInputValue,placeholder:u,disabled:a,onInput:this.handleSearchableSelectInput,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,form:this.form,formaction:this.formaction,formenctype:this.formenctype,formmethod:this.formmethod,formnovalidate:this.formnovalidate,formtarget:this.formtarget}),this.searchableSelectInputValue&&(x||y)&&e("div",{class:"clear-button-container"},e("ic-button",{id:"clear-button",ref:t=>this.clearButton=t,"aria-label":this.searchableSelectInputValue&&C===null?"Clear input":"Clear selection",class:"clear-button",innerHTML:I,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:i,variant:"icon",appearance:this.clearButtonFocused?z.Light:z.Dark}),e("div",{class:"divider"})),e("span",{onMouseDown:this.handleExpandIconMouseDown,class:{"expand-icon":true,"expand-icon-open":this.open,"expand-icon-filled":!(C==null||C==="")},innerHTML:j,"aria-hidden":"true"}),e("div",{"aria-live":"polite",role:"status",class:"searchable-select-results-status"})):e("div",{class:"select-container"},e("button",{class:"select-input",ref:t=>this.customSelectElement=t,id:this.inputId,"aria-label":`${l}, ${this.getLabelFromValue(C)||u}${b?", required":""}`,"aria-describedby":M,"aria-invalid":H,"aria-haspopup":"listbox","aria-expanded":this.open?"true":"false","aria-owns":h,"aria-controls":h,disabled:a,onBlur:this.onBlur,onFocus:this.onFocus,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown},e("ic-typography",{variant:"body",class:{"value-text":true,placeholder:this.getLabelFromValue(C)===undefined}},this.getLabelFromValue(C)||u),e("div",{class:"select-input-end"},C&&x&&e("div",{class:"divider"}),e("span",{class:{"expand-icon":true,"expand-icon-open":this.open,"expand-icon-filled":!(C==null||C==="")},innerHTML:j,"aria-hidden":"true"}))),C&&x&&e("ic-button",{id:"clear-button","aria-label":"Clear selection",class:"clear-button",innerHTML:I,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:i,variant:"icon",appearance:this.clearButtonFocused?z.Light:z.Dark}))),!v()&&e("ic-menu",{class:{"no-results":this.loading||this.hasTimedOut||this.noOptions!==null&&this.noOptions[0]&&this.noOptions[0].label===this.emptyOptionListText},ref:t=>this.menu=t,inputEl:y?this.searchableSelectElement:this.customSelectElement,inputLabel:l,anchorEl:this.anchorEl,small:t,size:i,menuId:h,open:this.open,options:y?this.filteredOptions:this.uniqueOptions,value:C,fullWidth:n,selectOnEnter:this.selectOnEnter,onMenuStateChange:this.handleMenuChange,onMenuOptionSelect:this.handleCustomSelectChange,onMenuKeyPress:this.handleMenuKeyPress,onMenuValueChange:this.handleMenuValueChange,onUngroupedOptionsSet:this.setUngroupedOptions,onRetryButtonClicked:this.handleRetry,parentEl:this.el,onTimeoutBlur:this.onTimeoutBlur,activationType:this.searchable||this.selectOnEnter?"manual":"automatic"}),g(this.validationStatus,this.disabled)&&e("ic-input-validation",{class:{"menu-open":this.open},ariaLiveMode:"polite",status:w,message:k,for:this.inputId})))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{loading:["loadingHandler"],options:["watchOptionsHandler"],debounce:["debounceChangedHandler"],value:["valueChangedHandler"],open:["openChangedHandler"]}}};O.style=N;const P='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host(.fullwidth){width:100%}::-moz-placeholder{color:var(--ic-color-tertiary-text);opacity:1}::placeholder{color:var(--ic-color-tertiary-text);opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs)}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(--ic-architectural-200)}input.readonly,textarea.readonly{color:var(--ic-color-primary-text)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.maxlengthtext{color:var(--ic-color-secondary-text);padding-right:var(--ic-space-xxxs)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-color-tertiary-text)}.has-value ::slotted([slot="icon"]){fill:var(--ic-color-primary-text)}.charcount{margin-right:calc(-1 * var(--ic-space-xxxs))}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';let D=0;const E=[...y,"title"];const V=class{constructor(e){t(this,e);this.getValidationText=i(this,"getValidationText",7);this.icBlur=i(this,"icBlur",7);this.icChange=i(this,"icChange",7);this.icFocus=i(this,"icFocus",7);this.icInput=i(this,"icInput",7);this.icKeydown=i(this,"icKeydown",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.getMaxLengthExceeded=t=>{this.numChars=t.length;if(this.type==="number"){this.minValueUnattained=t&&Number(t)<Number(this.min);this.maxValueExceeded=Number(t)>Number(this.max)}if(this.maxLength>0){this.maxLengthExceeded=this.numChars>this.maxLength}};this.getMaxCharactersReached=t=>{this.numChars=t.length;this.maxCharactersReached=this.maxCharacters>0?this.numChars>=this.maxCharacters:false;if(this.maxCharactersError&&!this.maxCharactersReached){this.maxCharactersError=false}};this.onInput=t=>{this.value=t.target.value;this.icInput.emit({value:this.value})};this.onBlur=t=>{const i=t.target.value;this.numChars=i.length;this.minCharactersUnattained=this.minCharacters>0?this.numChars<this.minCharacters:false;this.icBlur.emit({value:i})};this.onFocus=t=>{this.icFocus.emit({value:t.target.value})};this.hasStatus=t=>t!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.hostMutationCallback=t=>{let i=false;t.forEach((({attributeName:t,type:e,addedNodes:s,removedNodes:a})=>{if(E.includes(t)){this.inheritedAttributes[t]=this.el.getAttribute(t);i=true}else if(e==="childList"){i=h(s,a,"icon")}}));if(i){n(this)}};this.numChars=0;this.maxCharactersReached=false;this.maxCharactersError=false;this.minCharactersUnattained=false;this.maxLengthExceeded=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.ariaActiveDescendant=undefined;this.ariaAutocomplete=undefined;this.ariaExpanded=undefined;this.ariaOwns=undefined;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autoFocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${D++}`;this.inputmode="text";this.label=undefined;this.max=undefined;this.maxCharacters=0;this.maxLength=0;this.maxLengthMessage="Maximum length exceeded";this.min=undefined;this.minCharacters=0;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.role=undefined;this.rows=1;this.size="default";this.small=false;this.spellcheck=false;this.truncateValue=undefined;this.type="text";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value}debounceChanged(){this.icChange=x(this.icChange,this.debounce)}watchValueHandler(t){if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}this.getMaxLengthExceeded(t);this.getMaxCharactersReached(t);this.icChange.emit({value:t})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var t;u(this.el,this.handleFormReset);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}this.getMaxLengthExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=p(this.el,E);if(this.readonly){this.maxLengthExceeded=false;this.maxValueExceeded=false;this.minValueUnattained=false}b(this.el,this.handleFormReset);o(this.disabled,this.el)}componentDidLoad(){r([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true})}handleKeyDown(t){this.icKeydown.emit({event:t});this.maxCharactersError=this.maxCharactersReached}async setFocus(){var t;(t=this.inputEl)===null||t===void 0?void 0:t.focus()}render(){const{inputId:t,name:i,label:a,required:n,size:o,small:r,placeholder:l,helperText:h,rows:c,resize:d,disabled:u,value:p,min:b,max:g,maxLength:v,numChars:y,readonly:x,maxLengthExceeded:z,maxCharacters:C,maxCharactersError:H,maxCharactersReached:M,minCharacters:T,minCharactersUnattained:$,minValueUnattained:B,maxValueExceeded:j,validationStatus:I,validationText:N,validationInline:q,validationInlineInternal:F,spellcheck:O,inputmode:P,fullWidth:D,truncateValue:E,hiddenInput:V}=this;const S=x?true:u;const W=z||j||B||$||H?H?L.Warning:L.Error:I;const A=z?this.maxLengthMessage:H?`Maximum input is ${C} characters`:j?`Maximum value of ${g} exceeded`:B?`Minimum value of ${b} not met`:$?`Minimum input is ${T} characters`:N;const G=x?0:v;const K=z||H||j||B||v===0&&W===L.Error?"assertive":"polite";const U=this.hasStatus(W)&&!(W==L.Success&&q)&&!F;const _=c>1;const Z=v>0?`${t}-charcount-desc`:"";const R=`${Z} ${m(t,h!=="",U)}`.trim();const X=S&&!x;const J=!!this.el.querySelector(`[slot="icon"]`)&&!X;const Q=`${W===L.Error}`;if(V){f(true,this.el,i,p,S)}return e(s,{class:{["fullwidth"]:D}},e("ic-input-container",{readonly:x,disabled:S},!this.hideLabel&&e("ic-input-label",{for:t,label:a,helperText:h,required:n,disabled:X,readonly:x}),e("ic-input-component-container",{size:r?"small":o,validationStatus:W,multiLine:_,disabled:S,readonly:x,validationInline:q,fullWidth:D},J&&e("span",{class:{["readonly"]:x,["has-value"]:p.length>0},slot:"left-icon"},e("slot",{name:"icon"})),!_?e("input",Object.assign({id:t,name:i,ref:t=>this.inputEl=t,type:this.type,min:b,max:g,value:p,class:{["no-left-pad"]:!J&&x,["readonly"]:x,["truncate-value"]:E},placeholder:l?l:"",required:n,disabled:S,readonly:x,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":a,"aria-describedby":R,"aria-invalid":Q,"aria-activedescendant":this.ariaActiveDescendant,"aria-expanded":this.ariaExpanded,"aria-owns":this.ariaOwns,autocomplete:this.autocomplete,autocapitalize:this.autocapitalize,autoFocus:this.autoFocus,spellcheck:O,inputmode:P,role:this.role,maxlength:M?C:null,minlength:$?T:null},this.inheritedAttributes)):e("textarea",Object.assign({id:t,class:{["no-resize"]:d===false||x,["no-left-pad"]:!J&&x,["readonly"]:x},name:i,ref:t=>this.inputEl=t,value:p,rows:c,required:n,disabled:S,placeholder:l?l:"",readonly:x,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":a,"aria-describedby":R,"aria-invalid":Q,autocapitalize:this.autocapitalize,autoFocus:this.autoFocus,spellcheck:O,inputmode:P,maxlength:M?C:null,minlength:$?T:null},this.inheritedAttributes)),w(this.el,"clear-button")&&e("slot",{name:"clear-button"}),w(this.el,"search-submit-button")&&e("slot",{name:"search-submit-button"})),w(this.el,"menu")&&e("slot",{name:"menu"}),(!k(I)||!k(N)||G>0||j||H||$||B)&&!F&&e("ic-input-validation",{status:this.hasStatus(W)===false||W===L.Success&&q||F?"":W,message:U?A:"",ariaLiveMode:K,for:t,fullWidth:D},!x&&G>0&&e("div",{slot:"validation-message-adornment"},e("ic-typography",{variant:"caption",class:{["maxlengthtext"]:true,["error"]:z,["disabled"]:X}},e("span",{"aria-live":"polite",id:`${t}-charcount`,class:"charcount"},y,"/",G),e("span",{hidden:true,id:Z},"Field can contain a maximum of ",G," characters."))))))}get el(){return a(this)}static get watchers(){return{debounce:["debounceChanged"],value:["watchValueHandler"]}}};V.style=P;export{T as ic_pagination,B as ic_pagination_item,O as ic_select,V as ic_text_field};
|
2
|
-
//# sourceMappingURL=p-989310a8.entry.js.map
|