@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
|
@@ -8775,21 +8775,39 @@ const Table = class {
|
|
|
8775
8775
|
const newSelectedRows = new Set(this.selectedRows);
|
|
8776
8776
|
const newSelectedRowsData = new Map(this.selectedRowsData);
|
|
8777
8777
|
if (checked) {
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8778
|
+
if (this.serverSidePagination) {
|
|
8779
|
+
// Server-side: select only current page rows
|
|
8780
|
+
this.rowData.forEach(row => {
|
|
8781
|
+
const rowId = row.__rowId;
|
|
8782
|
+
newSelectedRows.add(rowId);
|
|
8783
|
+
const cleanRow = __rest(row, ["__checkbox", "__rowId"]);
|
|
8784
|
+
newSelectedRowsData.set(rowId, cleanRow);
|
|
8785
|
+
});
|
|
8786
|
+
}
|
|
8787
|
+
else {
|
|
8788
|
+
// Client-side: select ALL rows across ALL pages
|
|
8789
|
+
this.allRowData.forEach(row => {
|
|
8790
|
+
const rowId = row.__rowId;
|
|
8791
|
+
newSelectedRows.add(rowId);
|
|
8792
|
+
const cleanRow = __rest(row, ["__checkbox", "__rowId"]);
|
|
8793
|
+
newSelectedRowsData.set(rowId, cleanRow);
|
|
8794
|
+
});
|
|
8795
|
+
}
|
|
8785
8796
|
}
|
|
8786
8797
|
else {
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8798
|
+
if (this.serverSidePagination) {
|
|
8799
|
+
// Server-side: remove only current page rows
|
|
8800
|
+
this.rowData.forEach(row => {
|
|
8801
|
+
const rowId = row.__rowId;
|
|
8802
|
+
newSelectedRows.delete(rowId);
|
|
8803
|
+
newSelectedRowsData.delete(rowId);
|
|
8804
|
+
});
|
|
8805
|
+
}
|
|
8806
|
+
else {
|
|
8807
|
+
// Client-side: remove ALL rows (clear entire selection)
|
|
8808
|
+
newSelectedRows.clear();
|
|
8809
|
+
newSelectedRowsData.clear();
|
|
8810
|
+
}
|
|
8793
8811
|
}
|
|
8794
8812
|
this.selectedRows = newSelectedRows;
|
|
8795
8813
|
this.selectedRowsData = newSelectedRowsData;
|
|
@@ -8808,7 +8826,6 @@ const Table = class {
|
|
|
8808
8826
|
}
|
|
8809
8827
|
else {
|
|
8810
8828
|
newSelectedRows.add(rowId);
|
|
8811
|
-
// Store the clean row data (without internal props)
|
|
8812
8829
|
const cleanRow = __rest(clickedRowData, ["__checkbox", "__rowId"]);
|
|
8813
8830
|
newSelectedRowsData.set(rowId, cleanRow);
|
|
8814
8831
|
}
|
|
@@ -8945,7 +8962,7 @@ const Table = class {
|
|
|
8945
8962
|
headerCheckbox.indeterminate = someOnPageSelected;
|
|
8946
8963
|
}
|
|
8947
8964
|
else {
|
|
8948
|
-
// For client-side:
|
|
8965
|
+
// For client-side: reflect entire dataset selection
|
|
8949
8966
|
const allSelected = this.selectedRows.size === this.allRowData.length && this.allRowData.length > 0;
|
|
8950
8967
|
const someSelected = this.selectedRows.size > 0 && this.selectedRows.size < this.allRowData.length;
|
|
8951
8968
|
headerCheckbox.checked = allSelected;
|
|
@@ -9110,6 +9127,8 @@ const Table = class {
|
|
|
9110
9127
|
if (this.gridApi) {
|
|
9111
9128
|
this.gridApi.setGridOption('rowData', this.rowData);
|
|
9112
9129
|
}
|
|
9130
|
+
// Update header checkbox state for client-side
|
|
9131
|
+
this.updateHeaderCheckboxState();
|
|
9113
9132
|
}
|
|
9114
9133
|
}
|
|
9115
9134
|
clearAllFilters() {
|
|
@@ -9305,8 +9324,29 @@ const Table = class {
|
|
|
9305
9324
|
const startIndex = (this.currentPage - 1) * this.paginationPageSize;
|
|
9306
9325
|
const endIndex = startIndex + this.paginationPageSize;
|
|
9307
9326
|
const visibleRowData = this.allRowData.slice(startIndex, endIndex);
|
|
9327
|
+
// Update checkbox state for visible rows
|
|
9328
|
+
if (this.enableSelection) {
|
|
9329
|
+
visibleRowData.forEach(row => {
|
|
9330
|
+
var _a, _b;
|
|
9331
|
+
if (!row.__checkbox) {
|
|
9332
|
+
row.__checkbox = {
|
|
9333
|
+
disabled: false,
|
|
9334
|
+
checked: ((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.has(row.__rowId)) || false,
|
|
9335
|
+
size: 's',
|
|
9336
|
+
indeterminate: false,
|
|
9337
|
+
error: false,
|
|
9338
|
+
};
|
|
9339
|
+
}
|
|
9340
|
+
else {
|
|
9341
|
+
row.__checkbox.checked = ((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.has(row.__rowId)) || false;
|
|
9342
|
+
}
|
|
9343
|
+
});
|
|
9344
|
+
}
|
|
9345
|
+
this.rowData = visibleRowData;
|
|
9308
9346
|
if (this.gridApi) {
|
|
9309
9347
|
this.gridApi.setGridOption('rowData', visibleRowData);
|
|
9348
|
+
// Update header checkbox state for client-side too
|
|
9349
|
+
this.updateHeaderCheckboxState();
|
|
9310
9350
|
}
|
|
9311
9351
|
}
|
|
9312
9352
|
}
|
|
@@ -9356,8 +9396,9 @@ const Table = class {
|
|
|
9356
9396
|
return rows.slice(0, this.paginationPageSize);
|
|
9357
9397
|
}
|
|
9358
9398
|
updateCheckboxStates() {
|
|
9359
|
-
|
|
9360
|
-
|
|
9399
|
+
// Update checkboxes in the current view
|
|
9400
|
+
const dataToUpdate = this.rowData; // Always update current page
|
|
9401
|
+
dataToUpdate.forEach(row => {
|
|
9361
9402
|
if (row.__checkbox) {
|
|
9362
9403
|
row.__checkbox.checked = this.selectedRows.has(row.__rowId);
|
|
9363
9404
|
}
|
|
@@ -9371,11 +9412,20 @@ const Table = class {
|
|
|
9371
9412
|
}
|
|
9372
9413
|
emitSelectionChange() {
|
|
9373
9414
|
const selectedRowsArray = Array.from(this.selectedRowsData.values());
|
|
9415
|
+
let isSelectAll;
|
|
9416
|
+
if (this.serverSidePagination) {
|
|
9417
|
+
// Server-side: select-all only applies to current page
|
|
9418
|
+
isSelectAll = this.selectedRows.size === this.rowData.length && this.rowData.length > 0;
|
|
9419
|
+
}
|
|
9420
|
+
else {
|
|
9421
|
+
// Client-side: select-all applies to ALL data across all pages
|
|
9422
|
+
isSelectAll = this.selectedRows.size === this.allRowData.length && this.allRowData.length > 0;
|
|
9423
|
+
}
|
|
9374
9424
|
this.host.dispatchEvent(new CustomEvent('ifxSelectionChange', {
|
|
9375
9425
|
detail: {
|
|
9376
9426
|
selectedRows: selectedRowsArray,
|
|
9377
9427
|
selectedCount: selectedRowsArray.length,
|
|
9378
|
-
isSelectAll:
|
|
9428
|
+
isSelectAll: isSelectAll,
|
|
9379
9429
|
},
|
|
9380
9430
|
bubbles: true,
|
|
9381
9431
|
}));
|
|
@@ -9499,12 +9549,12 @@ const Table = class {
|
|
|
9499
9549
|
};
|
|
9500
9550
|
}
|
|
9501
9551
|
const filterClass = this.filterOrientation === 'topbar' ? 'topbar-layout' : this.filterOrientation === 'none' ? '' : 'sidebar-layout';
|
|
9502
|
-
return (index.h(index.Host, { key: '
|
|
9552
|
+
return (index.h(index.Host, { key: 'c1489506902cdb79a3ba86f9253601c1ba5ce495' }, index.h("div", { key: '4f5439475ea09640a4cbd0224d30c4d8ede316e2', class: "table-container" }, this.filterOrientation === 'sidebar' && (index.h("div", { key: '0bddd913070ac4bf564620fc5f1a2254c6428f46', class: "sidebar-btn" }, index.h("ifx-button", { key: '9a9395c870d35290b8b89f9ec8137819c19b3397', type: "button", disabled: false, variant: "secondary", size: "m", target: "_blank", theme: "default", "full-width": "false", onClick: () => this.toggleSidebarFilters() }, index.h("ifx-icon", { key: '87a92e599608e4927b5b29fda70acb8268aca7a1', icon: "cross-16" }), this.showSidebarFilters ? 'Hide Filters' : 'Show Filters'))), index.h("div", { key: '33d925bf3bc281bc67af9f76b837b9216f1f0dc0', class: filterClass }, this.filterOrientation === 'sidebar' && this.showSidebarFilters && (index.h("div", { key: '4002c1a03d92dea9b4beffd3d7bfe57d7f667add', class: "sidebar-container" }, index.h("div", { key: 'a443ffddc716cefbaf89c33f5cc5f6278f332442', class: "filters-title-container" }, index.h("span", { key: '8eb9160571bf1a54927aeab52b9900ca6c3bab44', class: "filters-title" }, "Filters")), index.h("div", { key: '0d084ba8d7ede405c4015cb52020871c7046417b', class: "set-filter-wrapper-sidebar" }, (this.filterOrientation !== 'sidebar' || this.showSidebarFilters) && index.h("slot", { key: '67912ff1dd15e0b2ea691a8a376863204ceefad2', name: "sidebar-filter" })))), this.filterOrientation !== 'none' && this.filterOrientation !== 'sidebar' && (index.h("div", { key: 'd50eae526270c682cb15f15fffa173d8c1898b34', class: "set-filter-wrapper-topbar" }, (this.filterOrientation !== 'sidebar' || this.showSidebarFilters) && index.h("slot", { key: 'fdfa7a32a95c0b4c01995ff95ab8c166647482a2', name: "topbar-filter" }))), index.h("div", { key: 'e165963816e9c7412024c10314cb7aa09730e8e7', class: "table-pagination-wrapper" }, this.filterOrientation !== 'none' && this.filterOrientation !== 'topbar' && this.showSidebarFilters && (index.h("div", { key: 'c97d793d611e819c0a244bda14dfd1805794e199', class: "filter-chips" }, Object.keys(this.currentFilters).map(name => {
|
|
9503
9553
|
const filter = this.currentFilters[name];
|
|
9504
9554
|
const filterValues = filter.filterValues;
|
|
9505
9555
|
const isMultiSelect = filter.type !== 'text';
|
|
9506
9556
|
return filterValues.length > 0 ? (index.h("ifx-chip", { placeholder: name, size: "large", variant: isMultiSelect ? 'multi' : 'single', readOnly: true, value: filterValues, key: name }, filterValues.map(filterValue => (index.h("ifx-chip-item", { value: filterValue, selected: true, key: filterValue }, filterValue))))) : null;
|
|
9507
|
-
}))), index.h("div", { key: '
|
|
9557
|
+
}))), index.h("div", { key: '3e9accd07cdb2f084062331ad51bb09e05b37ad9', class: "headline-wrapper" }, this.filterOrientation !== 'none' && this.headline && (index.h("div", { key: '7b62e23de92579c87dd31223cc462e5896f26fcd', class: "matching-results-container" }, index.h("span", { key: 'fb9c0f9d176143756c1d9bd5a212bfa94f81cd5e', class: "matching-results-count" }, "(", this.matchingResultsCount, ")"), index.h("span", { key: 'fd0d1dd3db1903b518244ce9ec9d7c9fb5f06381', class: "matching-results-text" }, this.headline))), index.h("div", { key: '55abe9fd4fb5b31b6ba3faa05d6bdbfce23a4c0c', class: "inner-buttons-wrapper" }, index.h("slot", { key: '64e5f8b60a7459acb2025abf50dd3f12e96ecb4d', name: "inner-button" }))), index.h("div", { key: 'cbf11cb3a5c83b2510523a866d9c3e3039acb0cb', id: "table-wrapper", class: this.getTableClassNames() }, index.h("div", { key: 'aa309053f78bc3c20497480ca1a36633a52982b6', id: `ifxTable-${this.uniqueKey}`, class: `ifx-ag-grid ${this.variant === 'zebra' ? 'zebra' : ''}`, style: style, ref: el => (this.container = el) })), index.h("div", { key: '00801e7da0e53ae3076c1f9d36158193fed1d242', class: "pagination-wrapper" }, this.pagination ? (index.h("ifx-pagination", { total: this.serverSidePagination ? this.matchingResultsCount : this.allRowData.length, "current-page": this.currentPage, "items-per-page": this.internalItemsPerPage })) : null))))));
|
|
9508
9558
|
}
|
|
9509
9559
|
hasButtonCol() {
|
|
9510
9560
|
return this.getColData().some(column => column.field === 'button');
|