@ukic/canary-web-components 2.0.0-canary.34 → 2.0.0-canary.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/helpers-951fb33a.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +17 -23
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-empty-state_2.cjs.entry.js +31 -5
- package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.js +18 -24
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +50 -5
- package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
- package/dist/collection/utils/types.js.map +1 -1
- package/dist/components/helpers2.js.map +1 -1
- package/dist/components/ic-data-table.js +17 -23
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +33 -5
- package/dist/components/ic-pagination-bar2.js.map +1 -1
- package/dist/components/ic-toast.js +2 -2
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-20241d58.entry.js +2 -0
- package/dist/core/p-20241d58.entry.js.map +1 -0
- package/dist/core/p-8ab58daa.js.map +1 -1
- package/dist/core/p-a3d66dc2.entry.js +2 -0
- package/dist/core/p-a3d66dc2.entry.js.map +1 -0
- package/dist/core/p-b68d6867.entry.js +2 -0
- package/dist/core/p-b68d6867.entry.js.map +1 -0
- package/dist/core/{p-2b61d283.entry.js → p-f2bb3c93.entry.js} +2 -2
- package/dist/core/{p-2b61d283.entry.js.map → p-f2bb3c93.entry.js.map} +1 -1
- package/dist/esm/core.js +1 -1
- package/dist/esm/helpers-948df101.js.map +1 -1
- package/dist/esm/ic-data-table.entry.js +17 -23
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +31 -5
- package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +2 -2
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +5 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/utils/types.d.ts +10 -9
- package/hydrate/index.js +52 -31
- package/package.json +3 -3
- package/dist/core/p-3156304b.entry.js +0 -2
- package/dist/core/p-3156304b.entry.js.map +0 -1
- package/dist/core/p-d9f8f96d.entry.js +0 -2
- package/dist/core/p-d9f8f96d.entry.js.map +0 -1
- package/dist/core/p-e7439c1e.entry.js +0 -2
- package/dist/core/p-e7439c1e.entry.js.map +0 -1
@@ -219,6 +219,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
219
219
|
}
|
220
220
|
this.truncate(typographyEl, cellContainer, tooltip);
|
221
221
|
};
|
222
|
+
this.getTruncWrapper = (typographyEl) => typographyEl.shadowRoot.querySelector(".trunc-wrapper");
|
222
223
|
this.removeTextWrap = () => {
|
223
224
|
this.getTypographyElements().forEach((typographyEl) => {
|
224
225
|
const tableCell = typographyEl.closest("td");
|
@@ -270,12 +271,9 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
270
271
|
return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
|
271
272
|
this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
|
272
273
|
};
|
273
|
-
this.setTruncationClass = () =>
|
274
|
-
|
275
|
-
|
276
|
-
}
|
277
|
-
return {};
|
278
|
-
};
|
274
|
+
this.setTruncationClass = () => this.truncationPattern
|
275
|
+
? { [`truncation-${this.truncationPattern}`]: true }
|
276
|
+
: {};
|
279
277
|
this.getColumnWidth = (columnWidth) => {
|
280
278
|
// TODO: Setting max width on columns
|
281
279
|
let columnWidthStyling = {};
|
@@ -461,9 +459,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
461
459
|
}, this.createCells(row, index)));
|
462
460
|
});
|
463
461
|
};
|
464
|
-
this.getObjectValue = (cell, key) =>
|
465
|
-
return Object.values(cell)[Object.keys(cell).indexOf(key)];
|
466
|
-
};
|
462
|
+
this.getObjectValue = (cell, key) => Object.values(cell)[Object.keys(cell).indexOf(key)];
|
467
463
|
this.getSortButtonLabel = (key) => {
|
468
464
|
let label = "";
|
469
465
|
const getNextSortOption = (option) => {
|
@@ -714,22 +710,23 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
714
710
|
this.minWidth = undefined;
|
715
711
|
this.minimumLoadingDisplayDuration = 1000;
|
716
712
|
this.paginationBarOptions = {
|
713
|
+
alignment: "right",
|
714
|
+
appearance: "default",
|
715
|
+
hideAllFromItemsPerPage: false,
|
716
|
+
hideRangeLabel: false,
|
717
|
+
itemLabel: "Item",
|
717
718
|
itemsPerPageOptions: [
|
718
719
|
{ label: "10", value: "10" },
|
719
720
|
{ label: "25", value: "25" },
|
720
721
|
{ label: "50", value: "50" },
|
721
722
|
],
|
722
|
-
rangeLabelType: "page",
|
723
|
-
type: "simple",
|
724
|
-
showItemsPerPageControl: true,
|
725
|
-
showGoToPageControl: true,
|
726
|
-
alignment: "right",
|
727
|
-
appearance: "default",
|
728
|
-
itemLabel: "Item",
|
729
723
|
pageLabel: "Page",
|
730
|
-
|
731
|
-
|
724
|
+
rangeLabelType: "page",
|
725
|
+
selectedItemsPerPage: 10,
|
732
726
|
setToFirstPageOnPaginationChange: false,
|
727
|
+
showGoToPageControl: true,
|
728
|
+
showItemsPerPageControl: true,
|
729
|
+
type: "simple",
|
733
730
|
};
|
734
731
|
this.showPagination = false;
|
735
732
|
this.sortable = false;
|
@@ -1005,9 +1002,6 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1005
1002
|
cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
|
1006
1003
|
this.createShowHideTruncation(typographyEl, cellContainer);
|
1007
1004
|
}
|
1008
|
-
getTruncWrapper(typographyEl) {
|
1009
|
-
return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
|
1010
|
-
}
|
1011
1005
|
// Set the height to initial if row height is set and the show / hide truncation
|
1012
1006
|
// is clicked
|
1013
1007
|
handleTypographyTruncationExpandToggle({ detail, }) {
|
@@ -1246,7 +1240,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1246
1240
|
}
|
1247
1241
|
render() {
|
1248
1242
|
var _a;
|
1249
|
-
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable,
|
1243
|
+
const { caption, createColumnHeaders, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumn, sortedColumnOrder, stickyColumnHeaders, updateScrollOffset, updating, } = this;
|
1250
1244
|
return (h(Host, { style: Object.assign({}, this.setTableDimensions()) }, h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
|
1251
1245
|
["table-row-container"]: true,
|
1252
1246
|
scrollable,
|
@@ -1257,7 +1251,7 @@ const DataTable = /*@__PURE__*/ proxyCustomElement(class DataTable extends HTMLE
|
|
1257
1251
|
["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
|
1258
1252
|
} }, h("tr", null, createColumnHeaders()))), updating &&
|
1259
1253
|
!loading &&
|
1260
|
-
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), this.renderTableBody(data, loading, loadingOptions.overlay)), this.renderEmptyState(data, loading, loadingOptions.overlay)), h("div", { "aria-live": "assertive", class: "sr-only" }, this.renderAriaLiveLoading()), this.renderLoadingIndicator(loading, loadingOptions), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", {
|
1254
|
+
(hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), this.renderTableBody(data, loading, loadingOptions.overlay)), this.renderEmptyState(data, loading, loadingOptions.overlay)), h("div", { "aria-live": "assertive", class: "sr-only" }, this.renderAriaLiveLoading()), this.renderLoadingIndicator(loading, loadingOptions), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { alignment: paginationBarOptions.alignment, appearance: paginationBarOptions.appearance, hideAllFromItemsPerPage: paginationBarOptions.hideAllFromItemsPerPage, hideRangeLabel: paginationBarOptions.hideRangeLabel, itemLabel: paginationBarOptions.itemLabel, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, pageLabel: paginationBarOptions.pageLabel, rangeLabelType: paginationBarOptions.rangeLabelType, selectedItemsPerPage: paginationBarOptions.selectedItemsPerPage, setToFirstPageOnPaginationChange: paginationBarOptions.setToFirstPageOnPaginationChange, showGoToPageControl: paginationBarOptions.showGoToPageControl, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, totalItems: (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0, type: paginationBarOptions.type })))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
|
1261
1255
|
? `${sortedColumn} sorted ${sortedColumnOrder}`
|
1262
1256
|
: "table unsorted")))));
|
1263
1257
|
}
|