@genesislcap/foundation-workspace 15.46.2-FUI-2628.2 → 15.46.2-FUI-2625.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.
- package/dist/custom-elements.json +55 -405
- package/dist/dts/workspace/filter-registry.d.ts +0 -12
- package/dist/dts/workspace/filter-registry.d.ts.map +1 -1
- package/dist/dts/workspace/grid-register/grid-register.d.ts +10 -3
- package/dist/dts/workspace/grid-register/grid-register.d.ts.map +1 -1
- package/dist/dts/workspace/grid-registry.d.ts +4 -76
- package/dist/dts/workspace/grid-registry.d.ts.map +1 -1
- package/dist/dts/workspace/layout-registry.d.ts +0 -18
- package/dist/dts/workspace/layout-registry.d.ts.map +1 -1
- package/dist/dts/workspace/workspace.types.d.ts +0 -6
- package/dist/dts/workspace/workspace.types.d.ts.map +1 -1
- package/dist/dts/workspace-manager/workspace-manager.d.ts +0 -6
- package/dist/dts/workspace-manager/workspace-manager.d.ts.map +1 -1
- package/dist/esm/workspace/filter-registry.js +21 -32
- package/dist/esm/workspace/grid-register/grid-register.js +54 -7
- package/dist/esm/workspace/grid-registry.js +32 -329
- package/dist/esm/workspace/layout-registry.js +8 -60
- package/dist/esm/workspace-manager/workspace-manager.js +9 -10
- package/dist/foundation-workspace.api.json +39 -244
- package/dist/foundation-workspace.d.ts +13 -122
- package/package.json +14 -14
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
{
|
|
176
176
|
"kind": "Class",
|
|
177
177
|
"canonicalReference": "@genesislcap/foundation-workspace!DefaultFilterRegistry:class",
|
|
178
|
-
"docComment": "/**\n *
|
|
178
|
+
"docComment": "/**\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 *
|
|
210
|
+
"docComment": "/**\n * @alpha\n */\n",
|
|
211
211
|
"excerptTokens": [
|
|
212
212
|
{
|
|
213
213
|
"kind": "Content",
|
|
@@ -228,98 +228,7 @@
|
|
|
228
228
|
"isAbstract": false,
|
|
229
229
|
"name": "DefaultGridRegistry",
|
|
230
230
|
"preserveMemberOrder": false,
|
|
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
|
-
],
|
|
231
|
+
"members": [],
|
|
323
232
|
"implementsTokenRanges": [
|
|
324
233
|
{
|
|
325
234
|
"startIndex": 1,
|
|
@@ -330,7 +239,7 @@
|
|
|
330
239
|
{
|
|
331
240
|
"kind": "Class",
|
|
332
241
|
"canonicalReference": "@genesislcap/foundation-workspace!DefaultLayoutRegistry:class",
|
|
333
|
-
"docComment": "/**\n * Default layout registry implementation.\n *\n * @
|
|
242
|
+
"docComment": "/**\n * Default layout registry implementation.\n *\n * @alpha\n */\n",
|
|
334
243
|
"excerptTokens": [
|
|
335
244
|
{
|
|
336
245
|
"kind": "Content",
|
|
@@ -885,78 +794,10 @@
|
|
|
885
794
|
"endIndex": 6
|
|
886
795
|
}
|
|
887
796
|
},
|
|
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
|
-
},
|
|
956
797
|
{
|
|
957
798
|
"kind": "Class",
|
|
958
799
|
"canonicalReference": "@genesislcap/foundation-workspace!GridRegister:class",
|
|
959
|
-
"docComment": "/**\n * Registers an AG Grid instance so workspace state can apply/load it
|
|
800
|
+
"docComment": "/**\n * Registers an AG Grid instance so workspace state can apply/load it.\n *\n * @alpha\n */\n",
|
|
960
801
|
"excerptTokens": [
|
|
961
802
|
{
|
|
962
803
|
"kind": "Content",
|
|
@@ -1068,6 +909,37 @@
|
|
|
1068
909
|
"isStatic": false,
|
|
1069
910
|
"isProtected": false,
|
|
1070
911
|
"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
|
|
1071
943
|
}
|
|
1072
944
|
],
|
|
1073
945
|
"extendsTokenRange": {
|
|
@@ -1119,34 +991,6 @@
|
|
|
1119
991
|
"endIndex": 2
|
|
1120
992
|
}
|
|
1121
993
|
},
|
|
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
|
-
},
|
|
1150
994
|
{
|
|
1151
995
|
"kind": "PropertySignature",
|
|
1152
996
|
"canonicalReference": "@genesislcap/foundation-workspace!GridRegistration#gridApi:member",
|
|
@@ -1454,15 +1298,6 @@
|
|
|
1454
1298
|
"kind": "Content",
|
|
1455
1299
|
"text": "unknown"
|
|
1456
1300
|
},
|
|
1457
|
-
{
|
|
1458
|
-
"kind": "Content",
|
|
1459
|
-
"text": ", filterPersistence?: "
|
|
1460
|
-
},
|
|
1461
|
-
{
|
|
1462
|
-
"kind": "Reference",
|
|
1463
|
-
"text": "GridFilterPersistence",
|
|
1464
|
-
"canonicalReference": "@genesislcap/foundation-workspace!GridFilterPersistence:interface"
|
|
1465
|
-
},
|
|
1466
1301
|
{
|
|
1467
1302
|
"kind": "Content",
|
|
1468
1303
|
"text": "): "
|
|
@@ -1478,8 +1313,8 @@
|
|
|
1478
1313
|
],
|
|
1479
1314
|
"isOptional": false,
|
|
1480
1315
|
"returnTypeTokenRange": {
|
|
1481
|
-
"startIndex":
|
|
1482
|
-
"endIndex":
|
|
1316
|
+
"startIndex": 7,
|
|
1317
|
+
"endIndex": 8
|
|
1483
1318
|
},
|
|
1484
1319
|
"releaseTag": "Alpha",
|
|
1485
1320
|
"overloadIndex": 1,
|
|
@@ -1507,14 +1342,6 @@
|
|
|
1507
1342
|
"endIndex": 6
|
|
1508
1343
|
},
|
|
1509
1344
|
"isOptional": false
|
|
1510
|
-
},
|
|
1511
|
-
{
|
|
1512
|
-
"parameterName": "filterPersistence",
|
|
1513
|
-
"parameterTypeTokenRange": {
|
|
1514
|
-
"startIndex": 7,
|
|
1515
|
-
"endIndex": 8
|
|
1516
|
-
},
|
|
1517
|
-
"isOptional": true
|
|
1518
1345
|
}
|
|
1519
1346
|
],
|
|
1520
1347
|
"name": "registerGrid"
|
|
@@ -2100,7 +1927,7 @@
|
|
|
2100
1927
|
{
|
|
2101
1928
|
"kind": "PropertySignature",
|
|
2102
1929
|
"canonicalReference": "@genesislcap/foundation-workspace!SavedGridSettings#columnState:member",
|
|
2103
|
-
"docComment": "
|
|
1930
|
+
"docComment": "",
|
|
2104
1931
|
"excerptTokens": [
|
|
2105
1932
|
{
|
|
2106
1933
|
"kind": "Content",
|
|
@@ -2124,38 +1951,6 @@
|
|
|
2124
1951
|
"endIndex": 2
|
|
2125
1952
|
}
|
|
2126
1953
|
},
|
|
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
|
-
},
|
|
2159
1954
|
{
|
|
2160
1955
|
"kind": "PropertySignature",
|
|
2161
1956
|
"canonicalReference": "@genesislcap/foundation-workspace!SavedGridSettings#gridKey:member",
|
|
@@ -11,73 +11,23 @@ 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.
|
|
24
14
|
* @alpha
|
|
25
15
|
*/
|
|
26
16
|
export declare class DefaultFilterRegistry implements FilterRegistry {
|
|
27
17
|
private filters;
|
|
28
|
-
private stored;
|
|
29
18
|
registerFilter(filterKey: string, getFilterValue: () => SavedFilterValue | null, setFilterValue: (value: string) => void): void;
|
|
30
19
|
unregisterFilter(filterKey: string): void;
|
|
31
20
|
getAllFiltersValues(): SavedFilterValue[];
|
|
32
21
|
applyFiltersValues(filtersValues: SavedFilterValue[]): void;
|
|
33
|
-
private readValue;
|
|
34
22
|
}
|
|
35
23
|
|
|
36
24
|
/**
|
|
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.
|
|
65
25
|
* @alpha
|
|
66
26
|
*/
|
|
67
27
|
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;
|
|
74
28
|
private grids;
|
|
75
|
-
private
|
|
76
|
-
|
|
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;
|
|
29
|
+
private cachedSettings;
|
|
30
|
+
registerGrid(gridKey: string, gridApi: unknown, columnApi: unknown): void;
|
|
81
31
|
getGrid(gridKey: string): GridRegistration | null;
|
|
82
32
|
unregisterGrid(gridKey: string): void;
|
|
83
33
|
getAllGridsSettings(): SavedGridSettings[];
|
|
@@ -85,62 +35,20 @@ export declare class DefaultGridRegistry implements GridRegistry {
|
|
|
85
35
|
applyColumns?: boolean;
|
|
86
36
|
applyFilters?: boolean;
|
|
87
37
|
}): Promise<boolean>;
|
|
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;
|
|
38
|
+
applyAllGridsSettings(gridsSettings: SavedGridSettings[], maxRetries?: number): Promise<void>;
|
|
113
39
|
private getGridSettings;
|
|
114
40
|
}
|
|
115
41
|
|
|
116
42
|
/**
|
|
117
43
|
* 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.
|
|
129
44
|
* @alpha
|
|
130
45
|
*/
|
|
131
46
|
export declare class DefaultLayoutRegistry implements LayoutRegistry {
|
|
132
47
|
private layouts;
|
|
133
|
-
private stored;
|
|
134
48
|
registerLayout(layoutKey: string, layout: FoundationLayout): void;
|
|
135
49
|
unregisterLayout(layoutKey: string): void;
|
|
136
50
|
getLayoutsConfigs(): SavedLayout[];
|
|
137
51
|
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;
|
|
144
52
|
}
|
|
145
53
|
|
|
146
54
|
/**
|
|
@@ -195,24 +103,14 @@ export declare interface FilterRegistry {
|
|
|
195
103
|
export declare const FilterRegistry: InterfaceSymbol<FilterRegistry>;
|
|
196
104
|
|
|
197
105
|
/**
|
|
198
|
-
*
|
|
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`.
|
|
106
|
+
* Registers an AG Grid instance so workspace state can apply/load it.
|
|
210
107
|
* @alpha
|
|
211
108
|
*/
|
|
212
109
|
export declare class GridRegister extends FoundationElement {
|
|
213
110
|
gridKey: string;
|
|
214
111
|
designSystemPrefix: string;
|
|
215
112
|
gridRegistry: GridRegistry;
|
|
113
|
+
workspaceState: WorkspaceState;
|
|
216
114
|
/** `<prefix>-grid-pro` is the AG Grid v36 `GridPro` by default; `GridProLegacy` is the v29 grid. */
|
|
217
115
|
private gridElement;
|
|
218
116
|
private gridApi;
|
|
@@ -224,6 +122,13 @@ export declare class GridRegister extends FoundationElement {
|
|
|
224
122
|
private readonly handleGridReady;
|
|
225
123
|
private attachToGridApis;
|
|
226
124
|
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;
|
|
227
132
|
}
|
|
228
133
|
|
|
229
134
|
/**
|
|
@@ -233,15 +138,13 @@ export declare interface GridRegistration {
|
|
|
233
138
|
gridKey: string;
|
|
234
139
|
gridApi: GridApi;
|
|
235
140
|
columnApi: ColumnApi;
|
|
236
|
-
/** The grid element's own filter persistence, when the grid has one (grid-pro does). */
|
|
237
|
-
filterPersistence?: GridFilterPersistence;
|
|
238
141
|
}
|
|
239
142
|
|
|
240
143
|
/**
|
|
241
144
|
* @alpha
|
|
242
145
|
*/
|
|
243
146
|
export declare interface GridRegistry {
|
|
244
|
-
registerGrid(gridKey: string, gridApi: unknown, columnApi: unknown
|
|
147
|
+
registerGrid(gridKey: string, gridApi: unknown, columnApi: unknown): void;
|
|
245
148
|
getGrid(gridKey: string): GridRegistration | null;
|
|
246
149
|
unregisterGrid(gridKey: string): void;
|
|
247
150
|
getAllGridsSettings(): SavedGridSettings[];
|
|
@@ -309,13 +212,7 @@ export declare interface SavedFilterValue {
|
|
|
309
212
|
*/
|
|
310
213
|
export declare interface SavedGridSettings {
|
|
311
214
|
gridKey: string;
|
|
312
|
-
/** AG Grid column state; includes sort (`sort`/`sortIndex`) as well as order, width, visibility. */
|
|
313
215
|
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>;
|
|
319
216
|
savedAt: string;
|
|
320
217
|
}
|
|
321
218
|
|
|
@@ -409,12 +306,6 @@ export declare class WorkspaceManager extends FoundationElement {
|
|
|
409
306
|
refreshSharedWorkspaces(): Promise<void>;
|
|
410
307
|
private notifyError;
|
|
411
308
|
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
|
-
*/
|
|
418
309
|
private applyWorkspace;
|
|
419
310
|
loadWorkspace(workspaceName: string): Promise<void>;
|
|
420
311
|
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.2-FUI-
|
|
4
|
+
"version": "15.46.2-FUI-2625.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.2-FUI-
|
|
52
|
-
"@genesislcap/genx": "15.46.2-FUI-
|
|
53
|
-
"@genesislcap/ts-builder": "15.46.2-FUI-
|
|
54
|
-
"@genesislcap/uvu-playwright-builder": "15.46.2-FUI-
|
|
55
|
-
"@genesislcap/vite-builder": "15.46.2-FUI-
|
|
56
|
-
"@genesislcap/webpack-builder": "15.46.2-FUI-
|
|
51
|
+
"@genesislcap/foundation-testing": "15.46.2-FUI-2625.2",
|
|
52
|
+
"@genesislcap/genx": "15.46.2-FUI-2625.2",
|
|
53
|
+
"@genesislcap/ts-builder": "15.46.2-FUI-2625.2",
|
|
54
|
+
"@genesislcap/uvu-playwright-builder": "15.46.2-FUI-2625.2",
|
|
55
|
+
"@genesislcap/vite-builder": "15.46.2-FUI-2625.2",
|
|
56
|
+
"@genesislcap/webpack-builder": "15.46.2-FUI-2625.2"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@ag-grid-community/core": "29.2.0",
|
|
60
|
-
"@genesislcap/foundation-comms": "15.46.2-FUI-
|
|
61
|
-
"@genesislcap/foundation-layout": "15.46.2-FUI-
|
|
62
|
-
"@genesislcap/foundation-notifications": "15.46.2-FUI-
|
|
63
|
-
"@genesislcap/foundation-ui": "15.46.2-FUI-
|
|
64
|
-
"@genesislcap/foundation-utils": "15.46.2-FUI-
|
|
65
|
-
"@genesislcap/grid-pro": "15.46.2-FUI-
|
|
66
|
-
"@genesislcap/web-core": "15.46.2-FUI-
|
|
60
|
+
"@genesislcap/foundation-comms": "15.46.2-FUI-2625.2",
|
|
61
|
+
"@genesislcap/foundation-layout": "15.46.2-FUI-2625.2",
|
|
62
|
+
"@genesislcap/foundation-notifications": "15.46.2-FUI-2625.2",
|
|
63
|
+
"@genesislcap/foundation-ui": "15.46.2-FUI-2625.2",
|
|
64
|
+
"@genesislcap/foundation-utils": "15.46.2-FUI-2625.2",
|
|
65
|
+
"@genesislcap/grid-pro": "15.46.2-FUI-2625.2",
|
|
66
|
+
"@genesislcap/web-core": "15.46.2-FUI-2625.2"
|
|
67
67
|
},
|
|
68
68
|
"repository": {
|
|
69
69
|
"type": "git",
|