@sumaris-net/ngx-components 18.24.20 → 18.24.21
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/doc/changelog.md +3 -0
- package/esm2022/src/app/core/table/async-table.class.mjs +14 -8
- package/fesm2022/sumaris-net.ngx-components.mjs +13 -7
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/table/async-table.class.d.ts +2 -0
- package/src/app/shared/inputs.d.ts +1 -1
- package/src/assets/manifest.json +1 -1
|
@@ -42388,11 +42388,17 @@ class AppAsyncTable {
|
|
|
42388
42388
|
defaultPageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS;
|
|
42389
42389
|
// Focus manager
|
|
42390
42390
|
focusColumn;
|
|
42391
|
+
get reservedStartColumns() {
|
|
42392
|
+
return RESERVED_START_COLUMNS;
|
|
42393
|
+
}
|
|
42394
|
+
get reservedEndColumns() {
|
|
42395
|
+
return RESERVED_END_COLUMNS;
|
|
42396
|
+
}
|
|
42391
42397
|
get firstUserColumn() {
|
|
42392
|
-
return this.displayedColumns[
|
|
42398
|
+
return this.displayedColumns[this.reservedStartColumns.length];
|
|
42393
42399
|
}
|
|
42394
42400
|
get lastUserColumn() {
|
|
42395
|
-
return this.displayedColumns[this.displayedColumns.length -
|
|
42401
|
+
return this.displayedColumns[this.displayedColumns.length - this.reservedEndColumns.length - 1];
|
|
42396
42402
|
}
|
|
42397
42403
|
set dataSource(value) {
|
|
42398
42404
|
this.setDatasource(value);
|
|
@@ -43318,7 +43324,7 @@ class AppAsyncTable {
|
|
|
43318
43324
|
return; // CANCELLED
|
|
43319
43325
|
// Apply columns
|
|
43320
43326
|
const userColumns = (data || []).filter((c) => c.canHide === false || c.visible).map((c) => c.name) || [];
|
|
43321
|
-
this.displayedColumns =
|
|
43327
|
+
this.displayedColumns = this.reservedStartColumns.concat(userColumns).concat(this.reservedEndColumns);
|
|
43322
43328
|
this.markForCheck();
|
|
43323
43329
|
// Update user settings
|
|
43324
43330
|
await this.savePageSettings(userColumns, SETTINGS_DISPLAY_COLUMNS);
|
|
@@ -43337,10 +43343,10 @@ class AppAsyncTable {
|
|
|
43337
43343
|
}
|
|
43338
43344
|
}
|
|
43339
43345
|
getCurrentColumns() {
|
|
43340
|
-
const hiddenColumns = this.columns.slice(
|
|
43346
|
+
const hiddenColumns = this.columns.slice(this.reservedStartColumns.length).filter((name) => this.displayedColumns.indexOf(name) === -1);
|
|
43341
43347
|
return this.displayedColumns
|
|
43342
43348
|
.concat(hiddenColumns)
|
|
43343
|
-
.filter((name) => !
|
|
43349
|
+
.filter((name) => !this.reservedStartColumns.includes(name) && !this.reservedEndColumns.includes(name) && !this.excludesColumns.includes(name))
|
|
43344
43350
|
.map((name) => ({
|
|
43345
43351
|
name,
|
|
43346
43352
|
label: this.getI18nColumnName(name),
|
|
@@ -43624,9 +43630,9 @@ class AppAsyncTable {
|
|
|
43624
43630
|
return this.columns.filter((column) => !this.excludesColumns.includes(column));
|
|
43625
43631
|
}
|
|
43626
43632
|
// Get fixed start columns
|
|
43627
|
-
const fixedStartColumns = this.columns.filter((c) =>
|
|
43633
|
+
const fixedStartColumns = this.columns.filter((c) => this.reservedStartColumns.includes(c));
|
|
43628
43634
|
// Remove end columns
|
|
43629
|
-
const fixedEndColumns = this.columns.filter((c) =>
|
|
43635
|
+
const fixedEndColumns = this.columns.filter((c) => this.reservedEndColumns.includes(c));
|
|
43630
43636
|
// Remove fixed columns from user columns
|
|
43631
43637
|
userColumns = userColumns.filter((c) => !fixedStartColumns.includes(c) && !fixedEndColumns.includes(c) && this.columns.includes(c));
|
|
43632
43638
|
// Add required columns if missing
|