@fundamental-ngx/platform 0.64.2-rc.2 → 0.64.2-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fundamental-ngx/platform",
3
- "version": "0.64.2-rc.2",
3
+ "version": "0.64.2-rc.21",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "description": "Fundamental Library for Angular - platform",
6
6
  "license": "Apache-2.0",
@@ -13,9 +13,9 @@
13
13
  "node": ">= 10"
14
14
  },
15
15
  "peerDependencies": {
16
- "@fundamental-ngx/cdk": "0.64.2-rc.2",
17
- "@fundamental-ngx/core": "0.64.2-rc.2",
18
- "@fundamental-ngx/i18n": "0.64.2-rc.2"
16
+ "@fundamental-ngx/cdk": "0.64.2-rc.21",
17
+ "@fundamental-ngx/core": "0.64.2-rc.21",
18
+ "@fundamental-ngx/i18n": "0.64.2-rc.21"
19
19
  },
20
20
  "dependencies": {
21
21
  "fast-equals": "^6.0.0",
@@ -31,7 +31,7 @@ function callCoreSchematic(options) {
31
31
  (0, dependencies_1.addPackageJsonDependency)(tree, {
32
32
  type: dependencies_1.NodeDependencyType.Default,
33
33
  // Will be replaced with the real version during sync-version script run
34
- version: `0.64.2-rc.2`,
34
+ version: `0.64.2-rc.21`,
35
35
  name: '@fundamental-ngx/core'
36
36
  });
37
37
  const installTaskId = context.addTask(new tasks_1.NodePackageInstallTask({
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-schematics",
3
- "version": "0.64.2-rc.2",
3
+ "version": "0.64.2-rc.21",
4
4
  "types": "./ng-add/index.d.ts",
5
5
  "main": "./ng-add/index.js",
6
6
  "type": "commonjs"
@@ -551,6 +551,20 @@ declare abstract class TableInitialState {
551
551
  abstract state: TableState;
552
552
  abstract setTable(table: Table): void;
553
553
  abstract setInitialState(): void;
554
+ /**
555
+ * Returns the initial sort state snapshot captured when setInitialState() was first called.
556
+ * This value does not change even if the initialSortBy input is dynamically updated.
557
+ * Used by the settings dialog to determine the true "reset" target.
558
+ */
559
+ abstract getInitialSortBySnapshot(): CollectionSort[];
560
+ /**
561
+ * Returns the initial filter state snapshot captured when setInitialState() was first called.
562
+ */
563
+ abstract getInitialFilterBySnapshot(): CollectionFilter[];
564
+ /**
565
+ * Returns the initial group state snapshot captured when setInitialState() was first called.
566
+ */
567
+ abstract getInitialGroupBySnapshot(): CollectionGroup[];
554
568
  }
555
569
  declare abstract class TableVirtualScroll {
556
570
  abstract rowHeight: number;
@@ -1627,6 +1641,14 @@ declare class TableInitialStateDirective extends TableInitialState {
1627
1641
  private _table;
1628
1642
  /** @hidden */
1629
1643
  private readonly _tableService;
1644
+ /** @hidden Snapshot of initialSortBy captured on first setInitialState() call */
1645
+ private _initialSortBySnapshot;
1646
+ /** @hidden Snapshot of initialFilterBy captured on first setInitialState() call */
1647
+ private _initialFilterBySnapshot;
1648
+ /** @hidden Snapshot of initialGroupBy captured on first setInitialState() call */
1649
+ private _initialGroupBySnapshot;
1650
+ /** @hidden */
1651
+ private _initialStateApplied;
1630
1652
  /** @hidden */
1631
1653
  setTable(table: Table): void;
1632
1654
  /** @hidden */
@@ -1635,6 +1657,12 @@ declare class TableInitialStateDirective extends TableInitialState {
1635
1657
  getTableState(): TableState;
1636
1658
  /** Set current state/settings of the Table. */
1637
1659
  setTableState(state: TableState): void;
1660
+ /** Returns the initial sort state snapshot captured when setInitialState() was first called. */
1661
+ getInitialSortBySnapshot(): CollectionSort[];
1662
+ /** Returns the initial filter state snapshot captured when setInitialState() was first called. */
1663
+ getInitialFilterBySnapshot(): CollectionFilter[];
1664
+ /** Returns the initial group state snapshot captured when setInitialState() was first called. */
1665
+ getInitialGroupBySnapshot(): CollectionGroup[];
1638
1666
  static ɵfac: i0.ɵɵFactoryDeclaration<TableInitialStateDirective, never>;
1639
1667
  static ɵdir: i0.ɵɵDirectiveDeclaration<TableInitialStateDirective, "[fdpTableInitialState], fdp-table", never, { "initialVisibleColumns": { "alias": "initialVisibleColumns"; "required": false; }; "initialSortBy": { "alias": "initialSortBy"; "required": false; }; "initialFilterBy": { "alias": "initialFilterBy"; "required": false; }; "initialGroupBy": { "alias": "initialGroupBy"; "required": false; }; "initialPage": { "alias": "initialPage"; "required": false; }; "state": { "alias": "state"; "required": false; }; }, {}, never, never, true, never>;
1640
1668
  }
@@ -1158,14 +1158,20 @@ interface SettingsSortDialogColumn {
1158
1158
  key: string;
1159
1159
  }
1160
1160
  interface SettingsSortDialogData extends TableDialogCommonData {
1161
- direction: SortDirection;
1162
- field: string | null;
1163
1161
  columns: SettingsSortDialogColumn[];
1164
1162
  allowDisablingSorting: boolean;
1163
+ /** Array of current sort criteria in priority order (only includes criteria with non-null fields) */
1164
+ sortBy?: Array<{
1165
+ field: string;
1166
+ direction: SortDirection;
1167
+ }>;
1165
1168
  }
1166
1169
  interface SettingsSortDialogResultData {
1167
- field: string | null;
1168
- direction: SortDirection;
1170
+ /** Array of sort criteria in priority order (first has highest priority) */
1171
+ sortBy: Array<{
1172
+ field: string;
1173
+ direction: SortDirection;
1174
+ }>;
1169
1175
  }
1170
1176
  interface SettingsGroupDialogColumn {
1171
1177
  label: string;
@@ -1309,6 +1315,11 @@ declare class GroupingComponent {
1309
1315
  static ɵcmp: i0.ɵɵComponentDeclaration<GroupingComponent, "fdp-grouping", never, { "groupingData": { "alias": "groupingData"; "required": false; "isSignal": true; }; "initialGrouping": { "alias": "initialGrouping"; "required": false; "isSignal": true; }; }, { "groupChange": "groupChange"; "resetAvailabilityChange": "resetAvailabilityChange"; }, never, never, true, never>;
1310
1316
  }
1311
1317
 
1318
+ /** Represents a single sort criteria row */
1319
+ interface SortCriteria {
1320
+ field: string | null;
1321
+ direction: SortDirection;
1322
+ }
1312
1323
  declare class SortingComponent {
1313
1324
  /** Input data for sorting */
1314
1325
  sortingData: i0.InputSignal<SettingsSortDialogData | undefined>;
@@ -1316,10 +1327,10 @@ declare class SortingComponent {
1316
1327
  initialSorting: i0.InputSignal<Nullable<CollectionSort>>;
1317
1328
  /** Event emitter for sort changes */
1318
1329
  sortChange: i0.OutputEmitterRef<SettingsSortDialogResultData>;
1319
- /** Current selected sorting direction - resets when sortingData changes */
1320
- direction: i0.WritableSignal<SortDirection>;
1321
- /** Current selected sorting field - resets when sortingData changes */
1322
- field: i0.WritableSignal<string | null>;
1330
+ /** Event emitter for reset availability changes */
1331
+ resetAvailabilityChange: i0.OutputRef<boolean>;
1332
+ /** Event emitter for validity changes */
1333
+ validityChange: i0.OutputRef<boolean>;
1323
1334
  /** @hidden */
1324
1335
  sortOrderHeaderId: string;
1325
1336
  /** @hidden */
@@ -1332,25 +1343,192 @@ declare class SortingComponent {
1332
1343
  allowDisablingSorting: i0.Signal<boolean>;
1333
1344
  /** Available table columns for sorting */
1334
1345
  columns: i0.Signal<SettingsSortDialogColumn[]>;
1335
- /** Event emitter for reset availability changes */
1336
- resetAvailabilityChange: i0.OutputRef<boolean>;
1346
+ /** @hidden Computed signal that checks if any row has invalid input */
1347
+ isValid: i0.Signal<boolean>;
1348
+ /** @hidden Computed signal that returns the currently selected column object */
1349
+ selectedColumn: i0.Signal<SettingsSortDialogColumn | null>;
1350
+ /**
1351
+ * @hidden
1352
+ * Computed signal that returns available columns for each row.
1353
+ * Columns selected in other rows are filtered out.
1354
+ */
1355
+ availableColumnsPerRow: i0.Signal<SettingsSortDialogColumn[][]>;
1356
+ /**
1357
+ * @hidden
1358
+ * Computed signal that returns the selected column object for each row.
1359
+ */
1360
+ selectedColumnsPerRow: i0.Signal<(SettingsSortDialogColumn | null)[]>;
1361
+ /**
1362
+ * @hidden
1363
+ * Computed signal that returns the direction for each row.
1364
+ */
1365
+ directionsPerRow: i0.Signal<SortDirection[]>;
1366
+ /**
1367
+ * @hidden
1368
+ * Computed signal that returns the form state ('error' or undefined) for each row.
1369
+ */
1370
+ rowStates: i0.Signal<("error" | undefined)[]>;
1371
+ /**
1372
+ * @hidden
1373
+ * Computed signal that returns visibility for each row.
1374
+ * First row is always visible, subsequent rows visible only if previous has selection.
1375
+ */
1376
+ rowVisibility: i0.Signal<boolean[]>;
1377
+ /**
1378
+ * @hidden
1379
+ * Computed signal that returns whether each row can be moved up.
1380
+ */
1381
+ canMoveUpPerRow: i0.Signal<boolean[]>;
1382
+ /**
1383
+ * @hidden
1384
+ * Computed signal that returns whether each row can be moved down.
1385
+ */
1386
+ canMoveDownPerRow: i0.Signal<boolean[]>;
1387
+ /**
1388
+ * @hidden
1389
+ * Computed signal that returns whether each row can be deleted.
1390
+ */
1391
+ canDeletePerRow: i0.Signal<boolean[]>;
1392
+ /** Current selected sorting direction - derived from first sortBy entry */
1393
+ direction: i0.WritableSignal<SortDirection>;
1394
+ /** Current selected sorting field - derived from first sortBy entry */
1395
+ firstSortingField: i0.WritableSignal<string | null>;
1396
+ /**
1397
+ * @hidden
1398
+ * Array of sort criteria rows. Each row has a field and direction.
1399
+ * linkedSignal resets when sortBy reference changes (e.g., on reset),
1400
+ * but allows local modifications via .set()/.update().
1401
+ */
1402
+ sortCriteriaList: i0.WritableSignal<SortCriteria[]>;
1403
+ /**
1404
+ * @hidden
1405
+ * Extracts the sortBy array reference from sortingData.
1406
+ * Used as the source for linkedSignal to track only sortBy reference changes.
1407
+ */
1408
+ private _sortByRef;
1337
1409
  /**
1338
- * Handle sort direction changes.
1410
+ * @hidden
1411
+ * Tracks invalid input text per row (non-empty text that doesn't match any column).
1412
+ * Resets to empty Map when sortBy reference changes.
1413
+ */
1414
+ private _invalidInputPerRow;
1415
+ /**
1416
+ * @hidden
1417
+ * Computed signal that checks if any row has invalid combobox text.
1418
+ * Used by resetAvailabilityChange to determine if reset should be available.
1419
+ */
1420
+ private _hasInvalidComboboxText;
1421
+ /** @hidden Reference to the comboboxes for programmatic reset */
1422
+ private _comboboxes;
1423
+ /** @hidden Track previous sortBy reference for combobox sync */
1424
+ private _previousSortByRef;
1425
+ /** @hidden */
1426
+ constructor();
1427
+ /**
1428
+ * Get available columns for a specific sort criteria row.
1429
+ * Excludes columns that are already selected in other rows.
1430
+ * @param rowIndex Index of the current row.
1431
+ * @returns Array of columns available for selection.
1432
+ */
1433
+ getAvailableColumns(rowIndex: number): SettingsSortDialogColumn[];
1434
+ /**
1435
+ * Get the selected column object for a specific row.
1436
+ * @param rowIndex Index of the row.
1437
+ * @returns The selected column object or null.
1438
+ */
1439
+ getSelectedColumnForRow(rowIndex: number): SettingsSortDialogColumn | null;
1440
+ /**
1441
+ * Get the direction for a specific row.
1442
+ * @param rowIndex Index of the row.
1443
+ * @returns The sort direction.
1444
+ */
1445
+ getDirectionForRow(rowIndex: number): SortDirection;
1446
+ /**
1447
+ * Get the form state for a specific row's combobox.
1448
+ * Returns 'error' if the row has invalid input, undefined otherwise.
1449
+ * @param rowIndex Index of the row.
1450
+ * @returns The form state or undefined.
1451
+ */
1452
+ getRowState(rowIndex: number): 'error' | undefined;
1453
+ /**
1454
+ * Determine if a row should be visible.
1455
+ * The first row is always visible. Subsequent rows are only visible
1456
+ * if the previous row has a column selected.
1457
+ * @param rowIndex Index of the row.
1458
+ * @returns True if the row should be visible.
1459
+ */
1460
+ isRowVisible(rowIndex: number): boolean;
1461
+ /**
1462
+ * Check if a row can be moved up.
1463
+ * A row can move up if it's not the first row and has a field selected.
1464
+ * @param rowIndex Index of the row.
1465
+ * @returns True if the row can be moved up.
1466
+ */
1467
+ canMoveUp(rowIndex: number): boolean;
1468
+ /**
1469
+ * Check if a row can be moved down.
1470
+ * A row can move down if there's a visible row below it with a field selected.
1471
+ * @param rowIndex Index of the row.
1472
+ * @returns True if the row can be moved down.
1473
+ */
1474
+ canMoveDown(rowIndex: number): boolean;
1475
+ /**
1476
+ * Check if a row can be deleted (cleared).
1477
+ * A row can be deleted if it has a field selected.
1478
+ * @param rowIndex Index of the row.
1479
+ * @returns True if the row can be deleted.
1480
+ */
1481
+ canDelete(rowIndex: number): boolean;
1482
+ /**
1483
+ * Move a sort criteria row up (swap with the row above).
1484
+ * @param rowIndex Index of the row to move up.
1485
+ */
1486
+ moveUp(rowIndex: number): void;
1487
+ /**
1488
+ * Move a sort criteria row down (swap with the row below).
1489
+ * @param rowIndex Index of the row to move down.
1490
+ */
1491
+ moveDown(rowIndex: number): void;
1492
+ /**
1493
+ * Delete (clear) a sort criteria row.
1494
+ * This removes the field selection and shifts remaining criteria up.
1495
+ * @param rowIndex Index of the row to delete.
1496
+ */
1497
+ deleteRow(rowIndex: number): void;
1498
+ /**
1499
+ * Handle sort direction changes for a specific row.
1500
+ * @param rowIndex Index of the row.
1339
1501
  * @param direction New sorting direction.
1340
1502
  */
1341
- _sortDirectionChange(direction: SortDirection): void;
1503
+ _sortDirectionChangeForRow(rowIndex: number, direction: SortDirection): void;
1342
1504
  /**
1343
- * Handle sort field changes.
1344
- * @param field New sorting field.
1505
+ * Handle sort field changes for a specific row.
1506
+ * @param rowIndex Index of the row.
1507
+ * @param column Selected column object or string.
1345
1508
  */
1346
- _sortFieldChange(field: string): void;
1509
+ _sortFieldChangeForRow(rowIndex: number, column: SettingsSortDialogColumn | string | null): void;
1510
+ /** @hidden */
1511
+ protected displayColumn(column: SettingsSortDialogColumn | null): string;
1512
+ /**
1513
+ * Sync the main field and direction signals with the first row's values.
1514
+ * Used after move/delete operations to keep backward compatibility.
1515
+ * @hidden
1516
+ */
1517
+ private _syncMainFieldAndDirection;
1347
1518
  /**
1348
1519
  * Emit changes to the model.
1349
1520
  * @hidden
1350
1521
  */
1351
1522
  private _onModelChange;
1523
+ /**
1524
+ * Sync combobox display text with the current selected column.
1525
+ * This is a DOM side effect needed when reset happens and the combobox has invalid text,
1526
+ * because ngModel won't call writeValue if the underlying model value hasn't changed.
1527
+ * @hidden
1528
+ */
1529
+ private _syncComboboxDisplayText;
1352
1530
  static ɵfac: i0.ɵɵFactoryDeclaration<SortingComponent, never>;
1353
- static ɵcmp: i0.ɵɵComponentDeclaration<SortingComponent, "fdp-sorting", never, { "sortingData": { "alias": "sortingData"; "required": false; "isSignal": true; }; "initialSorting": { "alias": "initialSorting"; "required": false; "isSignal": true; }; }, { "sortChange": "sortChange"; "resetAvailabilityChange": "resetAvailabilityChange"; }, never, never, true, never>;
1531
+ static ɵcmp: i0.ɵɵComponentDeclaration<SortingComponent, "fdp-sorting", never, { "sortingData": { "alias": "sortingData"; "required": false; "isSignal": true; }; "initialSorting": { "alias": "initialSorting"; "required": false; "isSignal": true; }; }, { "sortChange": "sortChange"; "resetAvailabilityChange": "resetAvailabilityChange"; "validityChange": "validityChange"; }, never, never, true, never>;
1354
1532
  }
1355
1533
 
1356
1534
  declare const dialogConfig: DialogConfig;
@@ -2543,4 +2721,4 @@ declare class PlatformTableModule {
2543
2721
  }
2544
2722
 
2545
2723
  export { FILTERS_VIEW_STEP_TOKEN, FilterCustomComponent, FilterMultiSelectComponent, FilterRule, FilterRuleComponent, FilterSingleSelectComponent, FilterStepComponent, FiltersComponent, FiltersListStepComponent, GetAvailableSortColumnsPipe, GroupingComponent, IsColumnHasHeaderMenuPipe, NOT_FILTERED_OPTION_VALUE, NoDataWrapperComponent, P13ColumnsDialogComponent, P13FilteringDialogComponent, P13GroupingDialogComponent, P13SortingDialogComponent, PlatformTableColumnResizerComponent, PlatformTableModule, RESETTABLE_TOKEN, ResetButtonComponent, SortingComponent, TABLE_TOOLBAR, TableCellHeaderPopoverComponent, TableColumnComponent, TableComponent, TableEditableCellComponent, TableFooterRowComponent, TableGroupRowComponent, TableGrowingButtonComponent, TableHeaderCellContentComponent, TableHeaderRowComponent, TableP13ColumnsComponent, TableP13DialogComponent, TableP13FilterComponent, TableP13GroupComponent, TableP13SortComponent, TablePoppingRowComponent, TableRowComponent, TableToolbarActionsComponent, TableToolbarComponent, TableToolbarLeftActionsComponent, TableToolbarTemplateDirective, TableViewSettingsDialogComponent, TableViewSettingsFilterComponent, dialogConfig };
2546
- export type { ColumnsDialogData, ColumnsDialogResultData, CombinedTableDialogData, DialogTableColumn, EditMode, FilterDialogData, FilterDialogResultData, FilterableColumn, FiltersViewStep, GroupDialogColumn, GroupDialogData, GroupDialogResultData, Resettable, SelectableFilter, SortDialogColumn, SortDialogData, SortDialogResultData, SortRule, TableAppliedFilter, TableToolbarInterface, TableToolbarTitleTemplateContext, TableToolbarWithTemplate, ToolbarContext, VisibleColumnType };
2724
+ export type { ColumnsDialogData, ColumnsDialogResultData, CombinedTableDialogData, DialogTableColumn, EditMode, FilterDialogData, FilterDialogResultData, FilterableColumn, FiltersViewStep, GroupDialogColumn, GroupDialogData, GroupDialogResultData, Resettable, SelectableFilter, SortCriteria, SortDialogColumn, SortDialogData, SortDialogResultData, SortRule, TableAppliedFilter, TableToolbarInterface, TableToolbarTitleTemplateContext, TableToolbarWithTemplate, ToolbarContext, VisibleColumnType };