@infineon/infineon-design-system-stencil 39.4.4--canary.2134.cd83647d2771e1e22b8c6c80a0df75f24ca168b6.0 → 39.4.4--canary.2134.84be7b9e85db8400d052b6d3b5addde807790384.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ifx-button.ifx-checkbox.ifx-chip.ifx-chip-item.ifx-icon.ifx-icon-button.ifx-indicator.ifx-pagination.ifx-select.ifx-table.entry.cjs.js.map +1 -1
- package/dist/cjs/ifx-button_10.cjs.entry.js +70 -20
- package/dist/cjs/ifx-button_10.cjs.entry.js.map +1 -1
- package/dist/collection/components/table-advanced-version/table.js +70 -20
- package/dist/collection/components/table-advanced-version/table.js.map +1 -1
- package/dist/components/ifx-table.js +70 -20
- package/dist/components/ifx-table.js.map +1 -1
- package/dist/esm/ifx-button.ifx-checkbox.ifx-chip.ifx-chip-item.ifx-icon.ifx-icon-button.ifx-indicator.ifx-pagination.ifx-select.ifx-table.entry.js.map +1 -1
- package/dist/esm/ifx-button_10.entry.js +70 -20
- package/dist/esm/ifx-button_10.entry.js.map +1 -1
- package/dist/infineon-design-system-stencil/ifx-button.ifx-checkbox.ifx-chip.ifx-chip-item.ifx-icon.ifx-icon-button.ifx-indicator.ifx-pagination.ifx-select.ifx-table.entry.esm.js.map +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/{p-3f6242bc.entry.js → p-330f97aa.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-330f97aa.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/infineon-design-system-stencil/p-3f6242bc.entry.js.map +0 -1
|
@@ -406,21 +406,39 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
406
406
|
const newSelectedRows = new Set(this.selectedRows);
|
|
407
407
|
const newSelectedRowsData = new Map(this.selectedRowsData);
|
|
408
408
|
if (checked) {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
409
|
+
if (this.serverSidePagination) {
|
|
410
|
+
// Server-side: select only current page rows
|
|
411
|
+
this.rowData.forEach(row => {
|
|
412
|
+
const rowId = row.__rowId;
|
|
413
|
+
newSelectedRows.add(rowId);
|
|
414
|
+
const cleanRow = __rest(row, ["__checkbox", "__rowId"]);
|
|
415
|
+
newSelectedRowsData.set(rowId, cleanRow);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
// Client-side: select ALL rows across ALL pages
|
|
420
|
+
this.allRowData.forEach(row => {
|
|
421
|
+
const rowId = row.__rowId;
|
|
422
|
+
newSelectedRows.add(rowId);
|
|
423
|
+
const cleanRow = __rest(row, ["__checkbox", "__rowId"]);
|
|
424
|
+
newSelectedRowsData.set(rowId, cleanRow);
|
|
425
|
+
});
|
|
426
|
+
}
|
|
416
427
|
}
|
|
417
428
|
else {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
429
|
+
if (this.serverSidePagination) {
|
|
430
|
+
// Server-side: remove only current page rows
|
|
431
|
+
this.rowData.forEach(row => {
|
|
432
|
+
const rowId = row.__rowId;
|
|
433
|
+
newSelectedRows.delete(rowId);
|
|
434
|
+
newSelectedRowsData.delete(rowId);
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
// Client-side: remove ALL rows (clear entire selection)
|
|
439
|
+
newSelectedRows.clear();
|
|
440
|
+
newSelectedRowsData.clear();
|
|
441
|
+
}
|
|
424
442
|
}
|
|
425
443
|
this.selectedRows = newSelectedRows;
|
|
426
444
|
this.selectedRowsData = newSelectedRowsData;
|
|
@@ -439,7 +457,6 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
439
457
|
}
|
|
440
458
|
else {
|
|
441
459
|
newSelectedRows.add(rowId);
|
|
442
|
-
// Store the clean row data (without internal props)
|
|
443
460
|
const cleanRow = __rest(clickedRowData, ["__checkbox", "__rowId"]);
|
|
444
461
|
newSelectedRowsData.set(rowId, cleanRow);
|
|
445
462
|
}
|
|
@@ -576,7 +593,7 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
576
593
|
headerCheckbox.indeterminate = someOnPageSelected;
|
|
577
594
|
}
|
|
578
595
|
else {
|
|
579
|
-
// For client-side:
|
|
596
|
+
// For client-side: reflect entire dataset selection
|
|
580
597
|
const allSelected = this.selectedRows.size === this.allRowData.length && this.allRowData.length > 0;
|
|
581
598
|
const someSelected = this.selectedRows.size > 0 && this.selectedRows.size < this.allRowData.length;
|
|
582
599
|
headerCheckbox.checked = allSelected;
|
|
@@ -741,6 +758,8 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
741
758
|
if (this.gridApi) {
|
|
742
759
|
this.gridApi.setGridOption('rowData', this.rowData);
|
|
743
760
|
}
|
|
761
|
+
// Update header checkbox state for client-side
|
|
762
|
+
this.updateHeaderCheckboxState();
|
|
744
763
|
}
|
|
745
764
|
}
|
|
746
765
|
clearAllFilters() {
|
|
@@ -936,8 +955,29 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
936
955
|
const startIndex = (this.currentPage - 1) * this.paginationPageSize;
|
|
937
956
|
const endIndex = startIndex + this.paginationPageSize;
|
|
938
957
|
const visibleRowData = this.allRowData.slice(startIndex, endIndex);
|
|
958
|
+
// Update checkbox state for visible rows
|
|
959
|
+
if (this.enableSelection) {
|
|
960
|
+
visibleRowData.forEach(row => {
|
|
961
|
+
var _a, _b;
|
|
962
|
+
if (!row.__checkbox) {
|
|
963
|
+
row.__checkbox = {
|
|
964
|
+
disabled: false,
|
|
965
|
+
checked: ((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.has(row.__rowId)) || false,
|
|
966
|
+
size: 's',
|
|
967
|
+
indeterminate: false,
|
|
968
|
+
error: false,
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
else {
|
|
972
|
+
row.__checkbox.checked = ((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.has(row.__rowId)) || false;
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
this.rowData = visibleRowData;
|
|
939
977
|
if (this.gridApi) {
|
|
940
978
|
this.gridApi.setGridOption('rowData', visibleRowData);
|
|
979
|
+
// Update header checkbox state for client-side too
|
|
980
|
+
this.updateHeaderCheckboxState();
|
|
941
981
|
}
|
|
942
982
|
}
|
|
943
983
|
}
|
|
@@ -987,8 +1027,9 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
987
1027
|
return rows.slice(0, this.paginationPageSize);
|
|
988
1028
|
}
|
|
989
1029
|
updateCheckboxStates() {
|
|
990
|
-
|
|
991
|
-
|
|
1030
|
+
// Update checkboxes in the current view
|
|
1031
|
+
const dataToUpdate = this.rowData; // Always update current page
|
|
1032
|
+
dataToUpdate.forEach(row => {
|
|
992
1033
|
if (row.__checkbox) {
|
|
993
1034
|
row.__checkbox.checked = this.selectedRows.has(row.__rowId);
|
|
994
1035
|
}
|
|
@@ -1002,11 +1043,20 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
1002
1043
|
}
|
|
1003
1044
|
emitSelectionChange() {
|
|
1004
1045
|
const selectedRowsArray = Array.from(this.selectedRowsData.values());
|
|
1046
|
+
let isSelectAll;
|
|
1047
|
+
if (this.serverSidePagination) {
|
|
1048
|
+
// Server-side: select-all only applies to current page
|
|
1049
|
+
isSelectAll = this.selectedRows.size === this.rowData.length && this.rowData.length > 0;
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
// Client-side: select-all applies to ALL data across all pages
|
|
1053
|
+
isSelectAll = this.selectedRows.size === this.allRowData.length && this.allRowData.length > 0;
|
|
1054
|
+
}
|
|
1005
1055
|
this.host.dispatchEvent(new CustomEvent('ifxSelectionChange', {
|
|
1006
1056
|
detail: {
|
|
1007
1057
|
selectedRows: selectedRowsArray,
|
|
1008
1058
|
selectedCount: selectedRowsArray.length,
|
|
1009
|
-
isSelectAll:
|
|
1059
|
+
isSelectAll: isSelectAll,
|
|
1010
1060
|
},
|
|
1011
1061
|
bubbles: true,
|
|
1012
1062
|
}));
|
|
@@ -1130,12 +1180,12 @@ const Table = /*@__PURE__*/ proxyCustomElement(class Table extends H {
|
|
|
1130
1180
|
};
|
|
1131
1181
|
}
|
|
1132
1182
|
const filterClass = this.filterOrientation === 'topbar' ? 'topbar-layout' : this.filterOrientation === 'none' ? '' : 'sidebar-layout';
|
|
1133
|
-
return (h(Host, { key: '
|
|
1183
|
+
return (h(Host, { key: 'c1489506902cdb79a3ba86f9253601c1ba5ce495' }, h("div", { key: '4f5439475ea09640a4cbd0224d30c4d8ede316e2', class: "table-container" }, this.filterOrientation === 'sidebar' && (h("div", { key: '0bddd913070ac4bf564620fc5f1a2254c6428f46', class: "sidebar-btn" }, h("ifx-button", { key: '9a9395c870d35290b8b89f9ec8137819c19b3397', type: "button", disabled: false, variant: "secondary", size: "m", target: "_blank", theme: "default", "full-width": "false", onClick: () => this.toggleSidebarFilters() }, h("ifx-icon", { key: '87a92e599608e4927b5b29fda70acb8268aca7a1', icon: "cross-16" }), this.showSidebarFilters ? 'Hide Filters' : 'Show Filters'))), h("div", { key: '33d925bf3bc281bc67af9f76b837b9216f1f0dc0', class: filterClass }, this.filterOrientation === 'sidebar' && this.showSidebarFilters && (h("div", { key: '4002c1a03d92dea9b4beffd3d7bfe57d7f667add', class: "sidebar-container" }, h("div", { key: 'a443ffddc716cefbaf89c33f5cc5f6278f332442', class: "filters-title-container" }, h("span", { key: '8eb9160571bf1a54927aeab52b9900ca6c3bab44', class: "filters-title" }, "Filters")), h("div", { key: '0d084ba8d7ede405c4015cb52020871c7046417b', class: "set-filter-wrapper-sidebar" }, (this.filterOrientation !== 'sidebar' || this.showSidebarFilters) && h("slot", { key: '67912ff1dd15e0b2ea691a8a376863204ceefad2', name: "sidebar-filter" })))), this.filterOrientation !== 'none' && this.filterOrientation !== 'sidebar' && (h("div", { key: 'd50eae526270c682cb15f15fffa173d8c1898b34', class: "set-filter-wrapper-topbar" }, (this.filterOrientation !== 'sidebar' || this.showSidebarFilters) && h("slot", { key: 'fdfa7a32a95c0b4c01995ff95ab8c166647482a2', name: "topbar-filter" }))), h("div", { key: 'e165963816e9c7412024c10314cb7aa09730e8e7', class: "table-pagination-wrapper" }, this.filterOrientation !== 'none' && this.filterOrientation !== 'topbar' && this.showSidebarFilters && (h("div", { key: 'c97d793d611e819c0a244bda14dfd1805794e199', class: "filter-chips" }, Object.keys(this.currentFilters).map(name => {
|
|
1134
1184
|
const filter = this.currentFilters[name];
|
|
1135
1185
|
const filterValues = filter.filterValues;
|
|
1136
1186
|
const isMultiSelect = filter.type !== 'text';
|
|
1137
1187
|
return filterValues.length > 0 ? (h("ifx-chip", { placeholder: name, size: "large", variant: isMultiSelect ? 'multi' : 'single', readOnly: true, value: filterValues, key: name }, filterValues.map(filterValue => (h("ifx-chip-item", { value: filterValue, selected: true, key: filterValue }, filterValue))))) : null;
|
|
1138
|
-
}))), h("div", { key: '
|
|
1188
|
+
}))), h("div", { key: '3e9accd07cdb2f084062331ad51bb09e05b37ad9', class: "headline-wrapper" }, this.filterOrientation !== 'none' && this.headline && (h("div", { key: '7b62e23de92579c87dd31223cc462e5896f26fcd', class: "matching-results-container" }, h("span", { key: 'fb9c0f9d176143756c1d9bd5a212bfa94f81cd5e', class: "matching-results-count" }, "(", this.matchingResultsCount, ")"), h("span", { key: 'fd0d1dd3db1903b518244ce9ec9d7c9fb5f06381', class: "matching-results-text" }, this.headline))), h("div", { key: '55abe9fd4fb5b31b6ba3faa05d6bdbfce23a4c0c', class: "inner-buttons-wrapper" }, h("slot", { key: '64e5f8b60a7459acb2025abf50dd3f12e96ecb4d', name: "inner-button" }))), h("div", { key: 'cbf11cb3a5c83b2510523a866d9c3e3039acb0cb', id: "table-wrapper", class: this.getTableClassNames() }, h("div", { key: 'aa309053f78bc3c20497480ca1a36633a52982b6', id: `ifxTable-${this.uniqueKey}`, class: `ifx-ag-grid ${this.variant === 'zebra' ? 'zebra' : ''}`, style: style, ref: el => (this.container = el) })), h("div", { key: '00801e7da0e53ae3076c1f9d36158193fed1d242', class: "pagination-wrapper" }, this.pagination ? (h("ifx-pagination", { total: this.serverSidePagination ? this.matchingResultsCount : this.allRowData.length, "current-page": this.currentPage, "items-per-page": this.internalItemsPerPage })) : null))))));
|
|
1139
1189
|
}
|
|
1140
1190
|
hasButtonCol() {
|
|
1141
1191
|
return this.getColData().some(column => column.field === 'button');
|