@genesislcap/foundation-workspace 15.46.1 → 15.46.2-FUI-2628.2

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.
@@ -175,7 +175,7 @@
175
175
  {
176
176
  "kind": "Class",
177
177
  "canonicalReference": "@genesislcap/foundation-workspace!DefaultFilterRegistry:class",
178
- "docComment": "/**\n * @alpha\n */\n",
178
+ "docComment": "/**\n * Default filter registry implementation.\n *\n * @remarks\n *\n * Keeps a store of every filter's last known value by key, so a workspace covers filters that aren't currently mounted (e.g. on another route): - `unregisterFilter` stores the filter's last value; `registerFilter` applies any stored value. - `applyFiltersValues` (workspace load) replaces the store with the loaded values and applies them to mounted filters; unmounted ones pick theirs up when they register. - `getAllFiltersValues` (workspace save) returns the store with mounted filters' live values on top, so a filter the user never visited keeps its loaded value rather than being dropped.\n *\n * @alpha\n */\n",
179
179
  "excerptTokens": [
180
180
  {
181
181
  "kind": "Content",
@@ -207,7 +207,7 @@
207
207
  {
208
208
  "kind": "Class",
209
209
  "canonicalReference": "@genesislcap/foundation-workspace!DefaultGridRegistry:class",
210
- "docComment": "/**\n * @alpha\n */\n",
210
+ "docComment": "/**\n * Default grid registry implementation.\n *\n * @remarks\n *\n * Keeps a store of every grid's last known column state and filter model by key, so a workspace covers grids that aren't currently mounted (e.g. on another route): - `unregisterGrid` stores the grid's last state; `registerGrid` applies any stored state. - `applyAllGridsSettings` (workspace load) replaces the store with the loaded settings and applies them to mounted grids; unmounted ones pick theirs up when they register. - `getAllGridsSettings` (workspace save) returns the store with mounted grids' live state on top, so a grid the user never visited keeps its loaded state rather than being dropped.\n *\n * Filters race with the grid's own start-up. grid-pro restores its persisted filter model (`persist-filter-model-key`) asynchronously, up to three times — at grid ready, once datasource-driven columns exist, and on the datasource's `filtersRestored` — and a restore with nothing stored applies `{}`, clearing every filter. A filter for a column that doesn't exist yet is dropped. So when the registry applies a filter model it: 1. writes it into the grid's own filter persistence first (`filterPersistence`), so grid-pro's later restores, including a datasource re-init long after start-up, return the workspace's model rather than an older one; 2. arms a guard that re-applies it if a programmatic filter change (e.g. a restore that read storage before step 1 landed, as KV storage can) replaces it, and when the grid's columns change (so filters on columns that arrive late apply). The guard ends as soon as the user changes a filter, once the grid has been quiet for `filterSettleMs` after its last start-up event, and in any case after `filterGuardMaxMs`, so it never fights app code for long. It re-applies at most `maxFilterReapplies` times per arming, so it cannot loop.\n *\n * A saved entry without `filterModel` (a workspace saved before filters were captured) leaves the grid's filters alone.\n *\n * @alpha\n */\n",
211
211
  "excerptTokens": [
212
212
  {
213
213
  "kind": "Content",
@@ -228,7 +228,98 @@
228
228
  "isAbstract": false,
229
229
  "name": "DefaultGridRegistry",
230
230
  "preserveMemberOrder": false,
231
- "members": [],
231
+ "members": [
232
+ {
233
+ "kind": "Property",
234
+ "canonicalReference": "@genesislcap/foundation-workspace!DefaultGridRegistry#filterGuardMaxMs:member",
235
+ "docComment": "/**\n * Longest the filter guard runs after it is armed, however often it is re-armed.\n */\n",
236
+ "excerptTokens": [
237
+ {
238
+ "kind": "Content",
239
+ "text": "filterGuardMaxMs: "
240
+ },
241
+ {
242
+ "kind": "Content",
243
+ "text": "number"
244
+ },
245
+ {
246
+ "kind": "Content",
247
+ "text": ";"
248
+ }
249
+ ],
250
+ "isReadonly": false,
251
+ "isOptional": false,
252
+ "releaseTag": "Alpha",
253
+ "name": "filterGuardMaxMs",
254
+ "propertyTypeTokenRange": {
255
+ "startIndex": 1,
256
+ "endIndex": 2
257
+ },
258
+ "isStatic": false,
259
+ "isProtected": false,
260
+ "isAbstract": false
261
+ },
262
+ {
263
+ "kind": "Property",
264
+ "canonicalReference": "@genesislcap/foundation-workspace!DefaultGridRegistry#filterSettleMs:member",
265
+ "docComment": "/**\n * Quiet period after the last start-up event before the filter guard ends.\n */\n",
266
+ "excerptTokens": [
267
+ {
268
+ "kind": "Content",
269
+ "text": "filterSettleMs: "
270
+ },
271
+ {
272
+ "kind": "Content",
273
+ "text": "number"
274
+ },
275
+ {
276
+ "kind": "Content",
277
+ "text": ";"
278
+ }
279
+ ],
280
+ "isReadonly": false,
281
+ "isOptional": false,
282
+ "releaseTag": "Alpha",
283
+ "name": "filterSettleMs",
284
+ "propertyTypeTokenRange": {
285
+ "startIndex": 1,
286
+ "endIndex": 2
287
+ },
288
+ "isStatic": false,
289
+ "isProtected": false,
290
+ "isAbstract": false
291
+ },
292
+ {
293
+ "kind": "Property",
294
+ "canonicalReference": "@genesislcap/foundation-workspace!DefaultGridRegistry#maxFilterReapplies:member",
295
+ "docComment": "/**\n * Most re-applies the filter guard makes per arming.\n */\n",
296
+ "excerptTokens": [
297
+ {
298
+ "kind": "Content",
299
+ "text": "maxFilterReapplies: "
300
+ },
301
+ {
302
+ "kind": "Content",
303
+ "text": "number"
304
+ },
305
+ {
306
+ "kind": "Content",
307
+ "text": ";"
308
+ }
309
+ ],
310
+ "isReadonly": false,
311
+ "isOptional": false,
312
+ "releaseTag": "Alpha",
313
+ "name": "maxFilterReapplies",
314
+ "propertyTypeTokenRange": {
315
+ "startIndex": 1,
316
+ "endIndex": 2
317
+ },
318
+ "isStatic": false,
319
+ "isProtected": false,
320
+ "isAbstract": false
321
+ }
322
+ ],
232
323
  "implementsTokenRanges": [
233
324
  {
234
325
  "startIndex": 1,
@@ -239,7 +330,7 @@
239
330
  {
240
331
  "kind": "Class",
241
332
  "canonicalReference": "@genesislcap/foundation-workspace!DefaultLayoutRegistry:class",
242
- "docComment": "/**\n * Default layout registry implementation.\n *\n * @alpha\n */\n",
333
+ "docComment": "/**\n * Default layout registry implementation.\n *\n * @remarks\n *\n * Keeps a store of every layout's last known config by key, so a workspace covers layouts that aren't currently mounted (e.g. on another route): - `unregisterLayout` stores the layout's last config; `registerLayout` loads any stored config once the layout has finished its first load (so its declared or autosaved layout doesn't overwrite it). - `applySavedLayouts` (workspace load) replaces the store with the loaded configs and loads them into mounted layouts; unmounted ones pick theirs up when they register. - `getLayoutsConfigs` (workspace save) returns the store with mounted layouts' live configs on top, so a layout the user never visited keeps its loaded config rather than being dropped.\n *\n * @alpha\n */\n",
243
334
  "excerptTokens": [
244
335
  {
245
336
  "kind": "Content",
@@ -794,10 +885,78 @@
794
885
  "endIndex": 6
795
886
  }
796
887
  },
888
+ {
889
+ "kind": "Interface",
890
+ "canonicalReference": "@genesislcap/foundation-workspace!GridFilterPersistence:interface",
891
+ "docComment": "/**\n * The part of a grid element that persists its own filter model, e.g. grid-pro's `setFilterModel` (backed by `persist-filter-model-key`, or an in-memory cache without one).\n *\n * @alpha\n */\n",
892
+ "excerptTokens": [
893
+ {
894
+ "kind": "Content",
895
+ "text": "export interface GridFilterPersistence "
896
+ }
897
+ ],
898
+ "fileUrlPath": "src/workspace/grid-registry.ts",
899
+ "releaseTag": "Alpha",
900
+ "name": "GridFilterPersistence",
901
+ "preserveMemberOrder": false,
902
+ "members": [
903
+ {
904
+ "kind": "MethodSignature",
905
+ "canonicalReference": "@genesislcap/foundation-workspace!GridFilterPersistence#setFilterModel:member(1)",
906
+ "docComment": "",
907
+ "excerptTokens": [
908
+ {
909
+ "kind": "Content",
910
+ "text": "setFilterModel(filterModel: "
911
+ },
912
+ {
913
+ "kind": "Reference",
914
+ "text": "Record",
915
+ "canonicalReference": "!Record:type"
916
+ },
917
+ {
918
+ "kind": "Content",
919
+ "text": "<string, unknown>"
920
+ },
921
+ {
922
+ "kind": "Content",
923
+ "text": "): "
924
+ },
925
+ {
926
+ "kind": "Content",
927
+ "text": "unknown"
928
+ },
929
+ {
930
+ "kind": "Content",
931
+ "text": ";"
932
+ }
933
+ ],
934
+ "isOptional": false,
935
+ "returnTypeTokenRange": {
936
+ "startIndex": 4,
937
+ "endIndex": 5
938
+ },
939
+ "releaseTag": "Alpha",
940
+ "overloadIndex": 1,
941
+ "parameters": [
942
+ {
943
+ "parameterName": "filterModel",
944
+ "parameterTypeTokenRange": {
945
+ "startIndex": 1,
946
+ "endIndex": 3
947
+ },
948
+ "isOptional": false
949
+ }
950
+ ],
951
+ "name": "setFilterModel"
952
+ }
953
+ ],
954
+ "extendsTokenRanges": []
955
+ },
797
956
  {
798
957
  "kind": "Class",
799
958
  "canonicalReference": "@genesislcap/foundation-workspace!GridRegister:class",
800
- "docComment": "/**\n * Registers an AG Grid instance so workspace state can apply/load it.\n *\n * @alpha\n */\n",
959
+ "docComment": "/**\n * Registers an AG Grid instance so workspace state can apply/load it. Registering applies the grid's stored column state (from the loaded workspace, or its last state this session) — see `DefaultGridRegistry`.\n *\n * @alpha\n */\n",
801
960
  "excerptTokens": [
802
961
  {
803
962
  "kind": "Content",
@@ -909,37 +1068,6 @@
909
1068
  "isStatic": false,
910
1069
  "isProtected": false,
911
1070
  "isAbstract": false
912
- },
913
- {
914
- "kind": "Property",
915
- "canonicalReference": "@genesislcap/foundation-workspace!GridRegister#workspaceState:member",
916
- "docComment": "",
917
- "excerptTokens": [
918
- {
919
- "kind": "Content",
920
- "text": "workspaceState: "
921
- },
922
- {
923
- "kind": "Reference",
924
- "text": "WorkspaceState",
925
- "canonicalReference": "@genesislcap/foundation-workspace!WorkspaceState:interface"
926
- },
927
- {
928
- "kind": "Content",
929
- "text": ";"
930
- }
931
- ],
932
- "isReadonly": false,
933
- "isOptional": false,
934
- "releaseTag": "Alpha",
935
- "name": "workspaceState",
936
- "propertyTypeTokenRange": {
937
- "startIndex": 1,
938
- "endIndex": 2
939
- },
940
- "isStatic": false,
941
- "isProtected": false,
942
- "isAbstract": false
943
1071
  }
944
1072
  ],
945
1073
  "extendsTokenRange": {
@@ -991,6 +1119,34 @@
991
1119
  "endIndex": 2
992
1120
  }
993
1121
  },
1122
+ {
1123
+ "kind": "PropertySignature",
1124
+ "canonicalReference": "@genesislcap/foundation-workspace!GridRegistration#filterPersistence:member",
1125
+ "docComment": "/**\n * The grid element's own filter persistence, when the grid has one (grid-pro does).\n */\n",
1126
+ "excerptTokens": [
1127
+ {
1128
+ "kind": "Content",
1129
+ "text": "filterPersistence?: "
1130
+ },
1131
+ {
1132
+ "kind": "Reference",
1133
+ "text": "GridFilterPersistence",
1134
+ "canonicalReference": "@genesislcap/foundation-workspace!GridFilterPersistence:interface"
1135
+ },
1136
+ {
1137
+ "kind": "Content",
1138
+ "text": ";"
1139
+ }
1140
+ ],
1141
+ "isReadonly": false,
1142
+ "isOptional": true,
1143
+ "releaseTag": "Alpha",
1144
+ "name": "filterPersistence",
1145
+ "propertyTypeTokenRange": {
1146
+ "startIndex": 1,
1147
+ "endIndex": 2
1148
+ }
1149
+ },
994
1150
  {
995
1151
  "kind": "PropertySignature",
996
1152
  "canonicalReference": "@genesislcap/foundation-workspace!GridRegistration#gridApi:member",
@@ -1298,6 +1454,15 @@
1298
1454
  "kind": "Content",
1299
1455
  "text": "unknown"
1300
1456
  },
1457
+ {
1458
+ "kind": "Content",
1459
+ "text": ", filterPersistence?: "
1460
+ },
1461
+ {
1462
+ "kind": "Reference",
1463
+ "text": "GridFilterPersistence",
1464
+ "canonicalReference": "@genesislcap/foundation-workspace!GridFilterPersistence:interface"
1465
+ },
1301
1466
  {
1302
1467
  "kind": "Content",
1303
1468
  "text": "): "
@@ -1313,8 +1478,8 @@
1313
1478
  ],
1314
1479
  "isOptional": false,
1315
1480
  "returnTypeTokenRange": {
1316
- "startIndex": 7,
1317
- "endIndex": 8
1481
+ "startIndex": 9,
1482
+ "endIndex": 10
1318
1483
  },
1319
1484
  "releaseTag": "Alpha",
1320
1485
  "overloadIndex": 1,
@@ -1342,6 +1507,14 @@
1342
1507
  "endIndex": 6
1343
1508
  },
1344
1509
  "isOptional": false
1510
+ },
1511
+ {
1512
+ "parameterName": "filterPersistence",
1513
+ "parameterTypeTokenRange": {
1514
+ "startIndex": 7,
1515
+ "endIndex": 8
1516
+ },
1517
+ "isOptional": true
1345
1518
  }
1346
1519
  ],
1347
1520
  "name": "registerGrid"
@@ -1927,7 +2100,7 @@
1927
2100
  {
1928
2101
  "kind": "PropertySignature",
1929
2102
  "canonicalReference": "@genesislcap/foundation-workspace!SavedGridSettings#columnState:member",
1930
- "docComment": "",
2103
+ "docComment": "/**\n * AG Grid column state; includes sort (`sort`/`sortIndex`) as well as order, width, visibility.\n */\n",
1931
2104
  "excerptTokens": [
1932
2105
  {
1933
2106
  "kind": "Content",
@@ -1951,6 +2124,38 @@
1951
2124
  "endIndex": 2
1952
2125
  }
1953
2126
  },
2127
+ {
2128
+ "kind": "PropertySignature",
2129
+ "canonicalReference": "@genesislcap/foundation-workspace!SavedGridSettings#filterModel:member",
2130
+ "docComment": "/**\n * AG Grid filter model (`gridApi.getFilterModel()`); `{}` when no filters are set. Absent on workspaces saved before filters were captured, which then leave the grid's filters alone.\n */\n",
2131
+ "excerptTokens": [
2132
+ {
2133
+ "kind": "Content",
2134
+ "text": "filterModel?: "
2135
+ },
2136
+ {
2137
+ "kind": "Reference",
2138
+ "text": "Record",
2139
+ "canonicalReference": "!Record:type"
2140
+ },
2141
+ {
2142
+ "kind": "Content",
2143
+ "text": "<string, unknown>"
2144
+ },
2145
+ {
2146
+ "kind": "Content",
2147
+ "text": ";"
2148
+ }
2149
+ ],
2150
+ "isReadonly": false,
2151
+ "isOptional": true,
2152
+ "releaseTag": "Alpha",
2153
+ "name": "filterModel",
2154
+ "propertyTypeTokenRange": {
2155
+ "startIndex": 1,
2156
+ "endIndex": 3
2157
+ }
2158
+ },
1954
2159
  {
1955
2160
  "kind": "PropertySignature",
1956
2161
  "canonicalReference": "@genesislcap/foundation-workspace!SavedGridSettings#gridKey:member",
@@ -11,23 +11,73 @@ import { Modal } from '@genesislcap/foundation-ui';
11
11
  import type { SerialisedLayout } from '@genesislcap/foundation-layout';
12
12
 
13
13
  /**
14
+ * Default filter registry implementation.
15
+ *
16
+ * @remarks
17
+ * Keeps a store of every filter's last known value by key, so a workspace covers filters that
18
+ * aren't currently mounted (e.g. on another route):
19
+ * - `unregisterFilter` stores the filter's last value; `registerFilter` applies any stored value.
20
+ * - `applyFiltersValues` (workspace load) replaces the store with the loaded values and applies
21
+ * them to mounted filters; unmounted ones pick theirs up when they register.
22
+ * - `getAllFiltersValues` (workspace save) returns the store with mounted filters' live values on
23
+ * top, so a filter the user never visited keeps its loaded value rather than being dropped.
14
24
  * @alpha
15
25
  */
16
26
  export declare class DefaultFilterRegistry implements FilterRegistry {
17
27
  private filters;
28
+ private stored;
18
29
  registerFilter(filterKey: string, getFilterValue: () => SavedFilterValue | null, setFilterValue: (value: string) => void): void;
19
30
  unregisterFilter(filterKey: string): void;
20
31
  getAllFiltersValues(): SavedFilterValue[];
21
32
  applyFiltersValues(filtersValues: SavedFilterValue[]): void;
33
+ private readValue;
22
34
  }
23
35
 
24
36
  /**
37
+ * Default grid registry implementation.
38
+ *
39
+ * @remarks
40
+ * Keeps a store of every grid's last known column state and filter model by key, so a workspace
41
+ * covers grids that aren't currently mounted (e.g. on another route):
42
+ * - `unregisterGrid` stores the grid's last state; `registerGrid` applies any stored state.
43
+ * - `applyAllGridsSettings` (workspace load) replaces the store with the loaded settings and
44
+ * applies them to mounted grids; unmounted ones pick theirs up when they register.
45
+ * - `getAllGridsSettings` (workspace save) returns the store with mounted grids' live state on
46
+ * top, so a grid the user never visited keeps its loaded state rather than being dropped.
47
+ *
48
+ * Filters race with the grid's own start-up. grid-pro restores its persisted filter model
49
+ * (`persist-filter-model-key`) asynchronously, up to three times — at grid ready, once
50
+ * datasource-driven columns exist, and on the datasource's `filtersRestored` — and a restore with
51
+ * nothing stored applies `{}`, clearing every filter. A filter for a column that doesn't exist yet
52
+ * is dropped. So when the registry applies a filter model it:
53
+ * 1. writes it into the grid's own filter persistence first (`filterPersistence`), so grid-pro's
54
+ * later restores, including a datasource re-init long after start-up, return the workspace's
55
+ * model rather than an older one;
56
+ * 2. arms a guard that re-applies it if a programmatic filter change (e.g. a restore that read
57
+ * storage before step 1 landed, as KV storage can) replaces it, and when the grid's columns
58
+ * change (so filters on columns that arrive late apply). The guard ends as soon as the user
59
+ * changes a filter, once the grid has been quiet for `filterSettleMs` after its last start-up
60
+ * event, and in any case after `filterGuardMaxMs`, so it never fights app code for long. It
61
+ * re-applies at most `maxFilterReapplies` times per arming, so it cannot loop.
62
+ *
63
+ * A saved entry without `filterModel` (a workspace saved before filters were captured) leaves the
64
+ * grid's filters alone.
25
65
  * @alpha
26
66
  */
27
67
  export declare class DefaultGridRegistry implements GridRegistry {
68
+ /** Quiet period after the last start-up event before the filter guard ends. */
69
+ filterSettleMs: number;
70
+ /** Longest the filter guard runs after it is armed, however often it is re-armed. */
71
+ filterGuardMaxMs: number;
72
+ /** Most re-applies the filter guard makes per arming. */
73
+ maxFilterReapplies: number;
28
74
  private grids;
29
- private cachedSettings;
30
- registerGrid(gridKey: string, gridApi: unknown, columnApi: unknown): void;
75
+ private stored;
76
+ private listeners;
77
+ private guards;
78
+ registerGrid(gridKey: string, gridApi: unknown, columnApi: unknown, filterPersistence?: GridFilterPersistence): void;
79
+ /** Applies the stored settings for a grid, unless it already has exactly that state. */
80
+ private applyStoredSettings;
31
81
  getGrid(gridKey: string): GridRegistration | null;
32
82
  unregisterGrid(gridKey: string): void;
33
83
  getAllGridsSettings(): SavedGridSettings[];
@@ -35,20 +85,62 @@ export declare class DefaultGridRegistry implements GridRegistry {
35
85
  applyColumns?: boolean;
36
86
  applyFilters?: boolean;
37
87
  }): Promise<boolean>;
38
- applyAllGridsSettings(gridsSettings: SavedGridSettings[], maxRetries?: number): Promise<void>;
88
+ applyAllGridsSettings(gridsSettings: SavedGridSettings[]): Promise<void>;
89
+ /**
90
+ * Writes a filter model into the grid's own persistence, then onto the grid, and records what
91
+ * the grid reports back so the guard can tell a later replacement from AG Grid's normalisation.
92
+ */
93
+ private applyFilterModel;
94
+ private reapplyStoredFilter;
95
+ /**
96
+ * Whether the grid's filter model moved away from what the registry last applied — a stale
97
+ * restore or other programmatic change, rather than AG Grid normalising the applied model (which
98
+ * reads back the same each time).
99
+ */
100
+ private filterWasReplaced;
101
+ private armFilterGuard;
102
+ /** Restarts the settle timer: the grid just did something that can precede a stale restore. */
103
+ private touchFilterGuard;
104
+ private guardActive;
105
+ private endFilterGuard;
106
+ private addListener;
107
+ private removeListener;
108
+ /** Removes a registration's grid listeners and stops its filter guard. */
109
+ private detach;
110
+ /** Whether the grid already has exactly these settings, so re-applying them is a no-op. */
111
+ private hasSettings;
112
+ private readFilterModel;
39
113
  private getGridSettings;
40
114
  }
41
115
 
42
116
  /**
43
117
  * Default layout registry implementation.
118
+ *
119
+ * @remarks
120
+ * Keeps a store of every layout's last known config by key, so a workspace covers layouts that
121
+ * aren't currently mounted (e.g. on another route):
122
+ * - `unregisterLayout` stores the layout's last config; `registerLayout` loads any stored config
123
+ * once the layout has finished its first load (so its declared or autosaved layout doesn't
124
+ * overwrite it).
125
+ * - `applySavedLayouts` (workspace load) replaces the store with the loaded configs and loads them
126
+ * into mounted layouts; unmounted ones pick theirs up when they register.
127
+ * - `getLayoutsConfigs` (workspace save) returns the store with mounted layouts' live configs on
128
+ * top, so a layout the user never visited keeps its loaded config rather than being dropped.
44
129
  * @alpha
45
130
  */
46
131
  export declare class DefaultLayoutRegistry implements LayoutRegistry {
47
132
  private layouts;
133
+ private stored;
48
134
  registerLayout(layoutKey: string, layout: FoundationLayout): void;
49
135
  unregisterLayout(layoutKey: string): void;
50
136
  getLayoutsConfigs(): SavedLayout[];
51
137
  applySavedLayouts(savedLayouts: SavedLayout[]): Promise<void>;
138
+ /**
139
+ * A layout's config is only meaningful once it has finished its first load; before that it has
140
+ * no panes yet, and storing that would wipe the saved config.
141
+ */
142
+ private readLayout;
143
+ private whenFirstLoaded;
52
144
  }
53
145
 
54
146
  /**
@@ -103,14 +195,24 @@ export declare interface FilterRegistry {
103
195
  export declare const FilterRegistry: InterfaceSymbol<FilterRegistry>;
104
196
 
105
197
  /**
106
- * Registers an AG Grid instance so workspace state can apply/load it.
198
+ * The part of a grid element that persists its own filter model, e.g. grid-pro's
199
+ * `setFilterModel` (backed by `persist-filter-model-key`, or an in-memory cache without one).
200
+ * @alpha
201
+ */
202
+ export declare interface GridFilterPersistence {
203
+ setFilterModel(filterModel: Record<string, unknown>): unknown;
204
+ }
205
+
206
+ /**
207
+ * Registers an AG Grid instance so workspace state can apply/load it. Registering applies the
208
+ * grid's stored column state (from the loaded workspace, or its last state this session) — see
209
+ * `DefaultGridRegistry`.
107
210
  * @alpha
108
211
  */
109
212
  export declare class GridRegister extends FoundationElement {
110
213
  gridKey: string;
111
214
  designSystemPrefix: string;
112
215
  gridRegistry: GridRegistry;
113
- workspaceState: WorkspaceState;
114
216
  /** `<prefix>-grid-pro` is the AG Grid v36 `GridPro` by default; `GridProLegacy` is the v29 grid. */
115
217
  private gridElement;
116
218
  private gridApi;
@@ -122,13 +224,6 @@ export declare class GridRegister extends FoundationElement {
122
224
  private readonly handleGridReady;
123
225
  private attachToGridApis;
124
226
  private detachFromGridApis;
125
- private loadWorkspaceSettings;
126
- /**
127
- * Column state comes from `gridApi` on AG Grid v36 and from `columnApi` on v29; mirrors the
128
- * fallback `GridRegistry` uses when saving.
129
- */
130
- private readColumnState;
131
- private loadWorkspaceColumnState;
132
227
  }
133
228
 
134
229
  /**
@@ -138,13 +233,15 @@ export declare interface GridRegistration {
138
233
  gridKey: string;
139
234
  gridApi: GridApi;
140
235
  columnApi: ColumnApi;
236
+ /** The grid element's own filter persistence, when the grid has one (grid-pro does). */
237
+ filterPersistence?: GridFilterPersistence;
141
238
  }
142
239
 
143
240
  /**
144
241
  * @alpha
145
242
  */
146
243
  export declare interface GridRegistry {
147
- registerGrid(gridKey: string, gridApi: unknown, columnApi: unknown): void;
244
+ registerGrid(gridKey: string, gridApi: unknown, columnApi: unknown, filterPersistence?: GridFilterPersistence): void;
148
245
  getGrid(gridKey: string): GridRegistration | null;
149
246
  unregisterGrid(gridKey: string): void;
150
247
  getAllGridsSettings(): SavedGridSettings[];
@@ -212,7 +309,13 @@ export declare interface SavedFilterValue {
212
309
  */
213
310
  export declare interface SavedGridSettings {
214
311
  gridKey: string;
312
+ /** AG Grid column state; includes sort (`sort`/`sortIndex`) as well as order, width, visibility. */
215
313
  columnState: any[];
314
+ /**
315
+ * AG Grid filter model (`gridApi.getFilterModel()`); `{}` when no filters are set. Absent on
316
+ * workspaces saved before filters were captured, which then leave the grid's filters alone.
317
+ */
318
+ filterModel?: Record<string, unknown>;
216
319
  savedAt: string;
217
320
  }
218
321
 
@@ -306,6 +409,12 @@ export declare class WorkspaceManager extends FoundationElement {
306
409
  refreshSharedWorkspaces(): Promise<void>;
307
410
  private notifyError;
308
411
  saveWorkspace(): Promise<void>;
412
+ /**
413
+ * Seeds every registry's store with the workspace's entries (replacing whatever was stored,
414
+ * even when a list is empty) and applies them to what's mounted; unmounted grids, layouts and
415
+ * filters pick theirs up when they register. Grids and filters are seeded before layouts:
416
+ * loading a layout rebuilds its panes, and the grids/filters inside re-register straight away.
417
+ */
309
418
  private applyWorkspace;
310
419
  loadWorkspace(workspaceName: string): Promise<void>;
311
420
  private requestSharedWorkspace;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-workspace",
3
3
  "description": "Genesis Foundation Workspace Components and State",
4
- "version": "15.46.1",
4
+ "version": "15.46.2-FUI-2628.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -48,22 +48,22 @@
48
48
  }
49
49
  },
50
50
  "devDependencies": {
51
- "@genesislcap/foundation-testing": "15.46.1",
52
- "@genesislcap/genx": "15.46.1",
53
- "@genesislcap/ts-builder": "15.46.1",
54
- "@genesislcap/uvu-playwright-builder": "15.46.1",
55
- "@genesislcap/vite-builder": "15.46.1",
56
- "@genesislcap/webpack-builder": "15.46.1"
51
+ "@genesislcap/foundation-testing": "15.46.2-FUI-2628.2",
52
+ "@genesislcap/genx": "15.46.2-FUI-2628.2",
53
+ "@genesislcap/ts-builder": "15.46.2-FUI-2628.2",
54
+ "@genesislcap/uvu-playwright-builder": "15.46.2-FUI-2628.2",
55
+ "@genesislcap/vite-builder": "15.46.2-FUI-2628.2",
56
+ "@genesislcap/webpack-builder": "15.46.2-FUI-2628.2"
57
57
  },
58
58
  "dependencies": {
59
59
  "@ag-grid-community/core": "29.2.0",
60
- "@genesislcap/foundation-comms": "15.46.1",
61
- "@genesislcap/foundation-layout": "15.46.1",
62
- "@genesislcap/foundation-notifications": "15.46.1",
63
- "@genesislcap/foundation-ui": "15.46.1",
64
- "@genesislcap/foundation-utils": "15.46.1",
65
- "@genesislcap/grid-pro": "15.46.1",
66
- "@genesislcap/web-core": "15.46.1"
60
+ "@genesislcap/foundation-comms": "15.46.2-FUI-2628.2",
61
+ "@genesislcap/foundation-layout": "15.46.2-FUI-2628.2",
62
+ "@genesislcap/foundation-notifications": "15.46.2-FUI-2628.2",
63
+ "@genesislcap/foundation-ui": "15.46.2-FUI-2628.2",
64
+ "@genesislcap/foundation-utils": "15.46.2-FUI-2628.2",
65
+ "@genesislcap/grid-pro": "15.46.2-FUI-2628.2",
66
+ "@genesislcap/web-core": "15.46.2-FUI-2628.2"
67
67
  },
68
68
  "repository": {
69
69
  "type": "git",