@one-paragon/angular-utilities 2.3.17 → 2.4.1

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/index.d.ts CHANGED
@@ -7,7 +7,8 @@ import * as _one_paragon_angular_utilities from '@one-paragon/angular-utilities'
7
7
  import { QueryParamsHandling } from '@angular/router';
8
8
  import * as _ngrx_entity from '@ngrx/entity';
9
9
  import { Dictionary as Dictionary$1, Predicate as Predicate$1, EntityState } from '@ngrx/entity';
10
- import { Sort, MatSort, SortDirection as SortDirection$1 } from '@angular/material/sort';
10
+ import * as _angular_material_sort from '@angular/material/sort';
11
+ import { Sort, SortDirection as SortDirection$1, MatSort } from '@angular/material/sort';
11
12
  import { MatTableDataSource, MatColumnDef, MatHeaderRowDef, MatFooterRowDef, MatTable, MatRowDef } from '@angular/material/table';
12
13
  import { CdkColumnDef } from '@angular/cdk/table';
13
14
  import { ComponentStore } from '@ngrx/component-store';
@@ -840,6 +841,7 @@ type Group<T extends NoneGroupHeader = any> = GroupGroup<T> | DataGroup<T>;
840
841
  interface GroupedData {
841
842
  key: string;
842
843
  expandedHeaders: string[];
844
+ sort: SortDirection$1;
843
845
  }
844
846
  interface PersistedTableState {
845
847
  hiddenKeys?: string[];
@@ -978,11 +980,12 @@ declare class TableStore extends ComponentStore<TableState> {
978
980
  $footerCollapsed: Signal<boolean>;
979
981
  $headerCollapsed: Signal<boolean>;
980
982
  $groupBy: Signal<GroupedData[]>;
981
- $groupByKeys: Signal<string[]>;
983
+ $groupByData: Signal<GroupedData[]>;
982
984
  groupByKeys$: Observable<string[]>;
983
985
  expandedGroups$: Observable<GroupedData[]>;
984
986
  $expandGroups: Signal<GroupedData[]>;
985
987
  $getIsExpanded: (columnKey: string, groupUniqueName: string) => Signal<boolean>;
988
+ $sortedGroupsUpdates: Signal<GroupedData[]>;
986
989
  $currentPage: Signal<number>;
987
990
  $pageSize: Signal<number>;
988
991
  $showAll: Signal<boolean>;
@@ -1077,6 +1080,15 @@ declare class TableStore extends ComponentStore<TableState> {
1077
1080
  } | Observable<{
1078
1081
  keys: string[];
1079
1082
  }>) => rxjs.Subscription;
1083
+ updateGroupBySort: (observableOrValue: {
1084
+ key: string;
1085
+ sort: SortDirection$1;
1086
+ } | Observable<{
1087
+ key: string;
1088
+ sort: SortDirection$1;
1089
+ }>) => rxjs.Subscription;
1090
+ getGroupBySortDirection: (key: string) => Signal<SortDirection$1>;
1091
+ cycleGroupBySortDirection: (observableOrValue: string | Observable<string>) => rxjs.Subscription;
1080
1092
  readonly setLinkMaps: (() => void) | ((observableOrValue: any) => rxjs.Subscription);
1081
1093
  updateRowProps: (observableOrValue: Pick<NotPersistedTableSettings, "rowClasses" | "rowStyles" | "rowClick"> | Observable<Pick<NotPersistedTableSettings, "rowClasses" | "rowStyles" | "rowClick">>) => rxjs.Subscription;
1082
1094
  on: <V>(srcObservable: Observable<V>, func: (obj: V) => void) => this;
@@ -1235,7 +1247,7 @@ declare class MatButtonToggleFilterDirective extends TbSelectedFilterDirective i
1235
1247
  }
1236
1248
 
1237
1249
  declare class TableWrapperDirective {
1238
- $registrations: _angular_core.WritableSignal<(TableFilterDirective | TableCustomFilterDirective)[]>;
1250
+ $registrations: _angular_core.WritableSignal<(TableCustomFilterDirective | TableFilterDirective)[]>;
1239
1251
  register(filter: TableCustomFilterDirective | TableFilterDirective): void;
1240
1252
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableWrapperDirective, never>;
1241
1253
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TableWrapperDirective, "[tbWrapper]", never, {}, {}, never, never, true, never>;
@@ -1304,16 +1316,17 @@ interface GlobalStorageState {
1304
1316
  localProfiles: Dictionary<Profile>;
1305
1317
  }
1306
1318
 
1307
- declare function setCustomGroupBy(customGroupBy: <T extends NoneGroupHeader = any>(data: T[], groupByKeys: string[], level?: number, metaData?: Dictionary$1<MetaData<T>>, parentGroupName?: string) => DataGroup<T>[] | GroupGroup<T>[]): void;
1308
- declare function updateGroupByState<T extends NoneGroupHeader = any>(groupedData: any[], { data, groups, expanded }: {
1319
+ declare function setCustomGroupBy(customGroupBy: <T extends NoneGroupHeader = any>(data: T[], groupByDatas: GroupedData[], level?: number, metaData?: Dictionary$1<MetaData<T>>, parentGroupName?: string) => DataGroup<T>[] | GroupGroup<T>[]): void;
1320
+ declare function updateGroupByState<T extends NoneGroupHeader = any>(groupedData: any[], { data, groups, expanded, sorts }: {
1309
1321
  data: Timestamp<T[]>;
1310
- groups: Timestamp<string[]>;
1322
+ groups: Timestamp<GroupedData[]>;
1311
1323
  expanded: Timestamp<GroupedData[]>;
1324
+ sorts: Timestamp<GroupedData[]>;
1312
1325
  }, firstRun: boolean, metaData: Dictionary$1<MetaData<T>>): GroupByState;
1313
1326
  declare function mapGroupHeader(obj: DataGroup | GroupGroup, expandedHeaders: string[] | true): any[];
1314
1327
  interface GroupByState {
1315
1328
  displayData: any[];
1316
- groupedData: DataGroup[];
1329
+ groupedData: Group[];
1317
1330
  }
1318
1331
  declare const initialGroupByState: {
1319
1332
  displayData: never[];
@@ -1561,13 +1574,17 @@ declare class TableContainerComponent<T = any> {
1561
1574
  private $allTimeStamped;
1562
1575
  private $sortedAndFilteredData;
1563
1576
  $timestampedGroups: _angular_core.Signal<{
1564
- value: string[];
1577
+ value: GroupedData[];
1565
1578
  timestamp: number;
1566
1579
  }>;
1567
1580
  $timestampedExpanded: _angular_core.Signal<{
1568
1581
  value: GroupedData[];
1569
1582
  timestamp: number;
1570
1583
  }>;
1584
+ $timestampedGroupSortUpdated: _angular_core.Signal<{
1585
+ value: GroupedData[];
1586
+ timestamp: number;
1587
+ }>;
1571
1588
  private $dataAndGroupsTimestamped;
1572
1589
  protected $filteredSortedAndGrouped: _angular_core.WritableSignal<GroupByState | undefined>;
1573
1590
  private $isInitializationState;
@@ -1883,6 +1900,7 @@ declare class GroupByListComponent {
1883
1900
  $groups: _angular_core.Signal<{
1884
1901
  key: string;
1885
1902
  name: string;
1903
+ sort: _angular_material_sort.SortDirection;
1886
1904
  }[]>;
1887
1905
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<GroupByListComponent, never>;
1888
1906
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<GroupByListComponent, "group-by-list", never, {}, {}, never, never, true, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@one-paragon/angular-utilities",
3
- "version": "2.3.17",
3
+ "version": "2.4.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "20.0.",
6
6
  "@angular/core": "20.0.3",