@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
|
@@ -8773,21 +8773,39 @@ const Table = class {
|
|
|
8773
8773
|
const newSelectedRows = new Set(this.selectedRows);
|
|
8774
8774
|
const newSelectedRowsData = new Map(this.selectedRowsData);
|
|
8775
8775
|
if (checked) {
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8776
|
+
if (this.serverSidePagination) {
|
|
8777
|
+
// Server-side: select only current page rows
|
|
8778
|
+
this.rowData.forEach(row => {
|
|
8779
|
+
const rowId = row.__rowId;
|
|
8780
|
+
newSelectedRows.add(rowId);
|
|
8781
|
+
const cleanRow = __rest(row, ["__checkbox", "__rowId"]);
|
|
8782
|
+
newSelectedRowsData.set(rowId, cleanRow);
|
|
8783
|
+
});
|
|
8784
|
+
}
|
|
8785
|
+
else {
|
|
8786
|
+
// Client-side: select ALL rows across ALL pages
|
|
8787
|
+
this.allRowData.forEach(row => {
|
|
8788
|
+
const rowId = row.__rowId;
|
|
8789
|
+
newSelectedRows.add(rowId);
|
|
8790
|
+
const cleanRow = __rest(row, ["__checkbox", "__rowId"]);
|
|
8791
|
+
newSelectedRowsData.set(rowId, cleanRow);
|
|
8792
|
+
});
|
|
8793
|
+
}
|
|
8783
8794
|
}
|
|
8784
8795
|
else {
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8796
|
+
if (this.serverSidePagination) {
|
|
8797
|
+
// Server-side: remove only current page rows
|
|
8798
|
+
this.rowData.forEach(row => {
|
|
8799
|
+
const rowId = row.__rowId;
|
|
8800
|
+
newSelectedRows.delete(rowId);
|
|
8801
|
+
newSelectedRowsData.delete(rowId);
|
|
8802
|
+
});
|
|
8803
|
+
}
|
|
8804
|
+
else {
|
|
8805
|
+
// Client-side: remove ALL rows (clear entire selection)
|
|
8806
|
+
newSelectedRows.clear();
|
|
8807
|
+
newSelectedRowsData.clear();
|
|
8808
|
+
}
|
|
8791
8809
|
}
|
|
8792
8810
|
this.selectedRows = newSelectedRows;
|
|
8793
8811
|
this.selectedRowsData = newSelectedRowsData;
|
|
@@ -8806,7 +8824,6 @@ const Table = class {
|
|
|
8806
8824
|
}
|
|
8807
8825
|
else {
|
|
8808
8826
|
newSelectedRows.add(rowId);
|
|
8809
|
-
// Store the clean row data (without internal props)
|
|
8810
8827
|
const cleanRow = __rest(clickedRowData, ["__checkbox", "__rowId"]);
|
|
8811
8828
|
newSelectedRowsData.set(rowId, cleanRow);
|
|
8812
8829
|
}
|
|
@@ -8943,7 +8960,7 @@ const Table = class {
|
|
|
8943
8960
|
headerCheckbox.indeterminate = someOnPageSelected;
|
|
8944
8961
|
}
|
|
8945
8962
|
else {
|
|
8946
|
-
// For client-side:
|
|
8963
|
+
// For client-side: reflect entire dataset selection
|
|
8947
8964
|
const allSelected = this.selectedRows.size === this.allRowData.length && this.allRowData.length > 0;
|
|
8948
8965
|
const someSelected = this.selectedRows.size > 0 && this.selectedRows.size < this.allRowData.length;
|
|
8949
8966
|
headerCheckbox.checked = allSelected;
|
|
@@ -9108,6 +9125,8 @@ const Table = class {
|
|
|
9108
9125
|
if (this.gridApi) {
|
|
9109
9126
|
this.gridApi.setGridOption('rowData', this.rowData);
|
|
9110
9127
|
}
|
|
9128
|
+
// Update header checkbox state for client-side
|
|
9129
|
+
this.updateHeaderCheckboxState();
|
|
9111
9130
|
}
|
|
9112
9131
|
}
|
|
9113
9132
|
clearAllFilters() {
|
|
@@ -9303,8 +9322,29 @@ const Table = class {
|
|
|
9303
9322
|
const startIndex = (this.currentPage - 1) * this.paginationPageSize;
|
|
9304
9323
|
const endIndex = startIndex + this.paginationPageSize;
|
|
9305
9324
|
const visibleRowData = this.allRowData.slice(startIndex, endIndex);
|
|
9325
|
+
// Update checkbox state for visible rows
|
|
9326
|
+
if (this.enableSelection) {
|
|
9327
|
+
visibleRowData.forEach(row => {
|
|
9328
|
+
var _a, _b;
|
|
9329
|
+
if (!row.__checkbox) {
|
|
9330
|
+
row.__checkbox = {
|
|
9331
|
+
disabled: false,
|
|
9332
|
+
checked: ((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.has(row.__rowId)) || false,
|
|
9333
|
+
size: 's',
|
|
9334
|
+
indeterminate: false,
|
|
9335
|
+
error: false,
|
|
9336
|
+
};
|
|
9337
|
+
}
|
|
9338
|
+
else {
|
|
9339
|
+
row.__checkbox.checked = ((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.has(row.__rowId)) || false;
|
|
9340
|
+
}
|
|
9341
|
+
});
|
|
9342
|
+
}
|
|
9343
|
+
this.rowData = visibleRowData;
|
|
9306
9344
|
if (this.gridApi) {
|
|
9307
9345
|
this.gridApi.setGridOption('rowData', visibleRowData);
|
|
9346
|
+
// Update header checkbox state for client-side too
|
|
9347
|
+
this.updateHeaderCheckboxState();
|
|
9308
9348
|
}
|
|
9309
9349
|
}
|
|
9310
9350
|
}
|
|
@@ -9354,8 +9394,9 @@ const Table = class {
|
|
|
9354
9394
|
return rows.slice(0, this.paginationPageSize);
|
|
9355
9395
|
}
|
|
9356
9396
|
updateCheckboxStates() {
|
|
9357
|
-
|
|
9358
|
-
|
|
9397
|
+
// Update checkboxes in the current view
|
|
9398
|
+
const dataToUpdate = this.rowData; // Always update current page
|
|
9399
|
+
dataToUpdate.forEach(row => {
|
|
9359
9400
|
if (row.__checkbox) {
|
|
9360
9401
|
row.__checkbox.checked = this.selectedRows.has(row.__rowId);
|
|
9361
9402
|
}
|
|
@@ -9369,11 +9410,20 @@ const Table = class {
|
|
|
9369
9410
|
}
|
|
9370
9411
|
emitSelectionChange() {
|
|
9371
9412
|
const selectedRowsArray = Array.from(this.selectedRowsData.values());
|
|
9413
|
+
let isSelectAll;
|
|
9414
|
+
if (this.serverSidePagination) {
|
|
9415
|
+
// Server-side: select-all only applies to current page
|
|
9416
|
+
isSelectAll = this.selectedRows.size === this.rowData.length && this.rowData.length > 0;
|
|
9417
|
+
}
|
|
9418
|
+
else {
|
|
9419
|
+
// Client-side: select-all applies to ALL data across all pages
|
|
9420
|
+
isSelectAll = this.selectedRows.size === this.allRowData.length && this.allRowData.length > 0;
|
|
9421
|
+
}
|
|
9372
9422
|
this.host.dispatchEvent(new CustomEvent('ifxSelectionChange', {
|
|
9373
9423
|
detail: {
|
|
9374
9424
|
selectedRows: selectedRowsArray,
|
|
9375
9425
|
selectedCount: selectedRowsArray.length,
|
|
9376
|
-
isSelectAll:
|
|
9426
|
+
isSelectAll: isSelectAll,
|
|
9377
9427
|
},
|
|
9378
9428
|
bubbles: true,
|
|
9379
9429
|
}));
|
|
@@ -9497,12 +9547,12 @@ const Table = class {
|
|
|
9497
9547
|
};
|
|
9498
9548
|
}
|
|
9499
9549
|
const filterClass = this.filterOrientation === 'topbar' ? 'topbar-layout' : this.filterOrientation === 'none' ? '' : 'sidebar-layout';
|
|
9500
|
-
return (h(Host, { key: '
|
|
9550
|
+
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 => {
|
|
9501
9551
|
const filter = this.currentFilters[name];
|
|
9502
9552
|
const filterValues = filter.filterValues;
|
|
9503
9553
|
const isMultiSelect = filter.type !== 'text';
|
|
9504
9554
|
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;
|
|
9505
|
-
}))), h("div", { key: '
|
|
9555
|
+
}))), 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))))));
|
|
9506
9556
|
}
|
|
9507
9557
|
hasButtonCol() {
|
|
9508
9558
|
return this.getColData().some(column => column.field === 'button');
|