@genesislcap/foundation-workspace 15.95.1 → 15.95.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.
Files changed (2) hide show
  1. package/dist/custom-elements.json +1149 -1149
  2. package/package.json +14 -14
@@ -60,322 +60,63 @@
60
60
  },
61
61
  {
62
62
  "kind": "javascript-module",
63
- "path": "src/workspace-manager/index.ts",
64
- "declarations": [],
65
- "exports": [
66
- {
67
- "kind": "js",
68
- "name": "*",
69
- "declaration": {
70
- "name": "*",
71
- "package": "./workspace-manager"
72
- }
73
- }
74
- ]
75
- },
76
- {
77
- "kind": "javascript-module",
78
- "path": "src/workspace-manager/workspace-manager.styles.ts",
79
- "declarations": [
80
- {
81
- "kind": "variable",
82
- "name": "WorkspaceManagerStyles",
83
- "default": "css`\n .workspace-manager {\n display: flex;\n gap: 10px;\n align-items: center;\n }\n\n .dialog-content {\n padding: 16px;\n min-width: 400px;\n max-width: 400px;\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n }\n\n .button-group {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n }\n\n .workspace-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n max-height: 400px;\n overflow-y: auto;\n margin: 10px 0;\n align-items: unset;\n }\n\n rapid-label {\n margin-bottom: 10px;\n display: block;\n }\n\n .empty-state {\n padding: 24px;\n text-align: center;\n color: var(--neutral-foreground-hint);\n }\n\n .save-mode-selector {\n margin-bottom: 16px;\n }\n\n .warning-message {\n margin: 12px 0;\n padding: 12px;\n border: 1px solid var(--warning-color);\n border-radius: 4px;\n font-size: 14px;\n }\n\n .workspace-item {\n padding: 12px;\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: 4px;\n background: var(--neutral-fill-rest);\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 5px;\n }\n\n .workspace-item:hover {\n background: var(--neutral-fill-hover);\n }\n\n .workspace-item::part(control) {\n margin-top: 2px;\n }\n\n .workspace-info {\n flex: 1;\n margin-left: 8px;\n }\n\n .workspace-name {\n font-weight: 600;\n margin-bottom: 4px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .workspace-date {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n }\n\n .workspace-description {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n margin-top: 4px;\n white-space: pre-wrap;\n word-break: break-word;\n line-height: 1.4;\n }\n\n .loading-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n }\n\n .save-field {\n margin-bottom: 20px;\n }\n`"
84
- }
85
- ],
86
- "exports": [
87
- {
88
- "kind": "js",
89
- "name": "WorkspaceManagerStyles",
90
- "declaration": {
91
- "name": "WorkspaceManagerStyles",
92
- "module": "src/workspace-manager/workspace-manager.styles.ts"
93
- }
94
- }
95
- ]
96
- },
97
- {
98
- "kind": "javascript-module",
99
- "path": "src/workspace-manager/workspace-manager.template.ts",
100
- "declarations": [
101
- {
102
- "kind": "variable",
103
- "name": "WORKSPACE_DESCRIPTION_MAX",
104
- "type": {
105
- "text": "number"
106
- },
107
- "default": "200"
108
- },
109
- {
110
- "kind": "variable",
111
- "name": "workspaceHeaderPartial",
112
- "type": {
113
- "text": "ViewTemplate<WorkspaceManager>"
114
- },
115
- "default": "html`\n <div class=\"workspace-manager\">\n <rapid-button @click=${(x) => x.openSaveDialog()}>\n <rapid-icon name=\"download\"></rapid-icon>\n Save Workspace\n </rapid-button>\n <rapid-button @click=${(x) => x.openLoadDialog()}>\n <rapid-icon name=\"upload\"></rapid-icon>\n Load Workspace\n </rapid-button>\n </div>\n`"
116
- },
117
- {
118
- "kind": "variable",
119
- "name": "workspaceSaveModalPartial",
120
- "type": {
121
- "text": "ViewTemplate<WorkspaceManager>"
122
- },
123
- "default": "html`\n <rapid-modal ${ref('saveModal')}>\n <h2 slot=\"top\">Save Workspace</h2>\n <div class=\"dialog-content\">\n <div class=\"save-mode-selector\">\n <rapid-segmented-control value=\"${sync((x) => x.saveMode)}\">\n <rapid-segmented-item value=\"create\">Create</rapid-segmented-item>\n <rapid-segmented-item value=\"overwrite\">Overwrite</rapid-segmented-item>\n ${when(\n () => false,\n html<WorkspaceManager>`\n <rapid-segmented-item value=\"shared\">Share</rapid-segmented-item>\n `,\n )}\n </rapid-segmented-control>\n </div>\n ${when(\n (x) => x.saveMode === 'create',\n html<WorkspaceManager>`\n <rapid-label>Workspace Name:</rapid-label>\n <rapid-text-field\n class=\"save-field\"\n :value=${(x) => x.workspaceName}\n @input=${(x, c) => (x.workspaceName = (c.event.target as HTMLInputElement).value)}\n placeholder=\"Enter workspace name\"\n ></rapid-text-field>\n <rapid-label>\n Description (optional, max ${WORKSPACE_DESCRIPTION_MAX} characters):\n </rapid-label>\n <rapid-text-area\n class=\"save-field workspace-description-input\"\n maxlength=\"${WORKSPACE_DESCRIPTION_MAX}\"\n :value=${(x) => x.workspaceDescription}\n @input=${(x, c) =>\n x.updateWorkspaceDescription((c.event.target as HTMLTextAreaElement).value)}\n placeholder=\"Add a description for this workspace\"\n rows=\"3\"\n ></rapid-text-area>\n ${when(\n (x) => x.workspaceName && x.isWorkspaceExisting(x.workspaceName),\n html`\n <div class=\"warning-message\">\n <rapid-icon name=\"triangle-exclamation\"></rapid-icon>\n A workspace with this name already exists. Use \"Overwrite Existing Workspace\" to\n replace it.\n </div>\n `,\n )}\n `,\n )}\n ${when(\n (x) => x.saveMode === 'overwrite',\n html<WorkspaceManager>`\n ${when(\n (x) => x.savedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No saved workspaces to overwrite</div>\n `,\n )}\n <rapid-label>Select Workspace to Overwrite:</rapid-label>\n <rapid-radio-group\n class=\"workspace-list\"\n value=${sync((x) => x.selectedWorkspaceToOverwrite)}\n orientation=\"vertical\"\n >\n ${repeat(\n (x) => x.savedWorkspaces,\n html<SavedWorkspace>`\n <rapid-radio value=${(x) => x.name} class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(x) => x.name}</div>\n <div class=\"workspace-date\">\n Saved: ${(x) => new Date(x.savedAt).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SavedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n </rapid-radio>\n `,\n )}\n </rapid-radio-group>\n <rapid-label>Description (optional):</rapid-label>\n <rapid-text-area\n class=\"save-field\"\n :value=${(x) => x.workspaceDescription}\n maxlength=\"${WORKSPACE_DESCRIPTION_MAX}\"\n @input=${(x, c) =>\n x.updateWorkspaceDescription((c.event.target as HTMLTextAreaElement).value)}\n placeholder=\"Add a description for this workspace\"\n rows=\"3\"\n ></rapid-text-area>\n <div class=\"warning-message\">\n <rapid-icon name=\"triangle-exclamation\"></rapid-icon>\n This will permanently replace the selected workspace. This action cannot be undone.\n </div>\n `,\n )}\n ${when(\n () => false,\n html<WorkspaceManager>`\n <h3>Share existing workspace:</h3>\n ${whenElse(\n (x) => x.savedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No saved workspaces to share</div>\n `,\n html<WorkspaceManager>`\n <div class=\"workspace-list\">\n ${repeat(\n (x) => x.savedWorkspaces,\n html<SavedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Saved: ${(w) => new Date(w.savedAt).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SavedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.shareExistingWorkspace(w.name)}\n >\n Share\n </rapid-button>\n </div>\n </div>\n `,\n )}\n </div>\n `,\n )}\n <h3>My Shared Workspaces</h3>\n ${whenElse(\n (x) =>\n x.sharedWorkspaces.filter((w) => w.userName === x.auth?.loggedUserResult?.username)\n .length === 0,\n html`\n <div class=\"empty-state\">You have not shared any workspaces</div>\n `,\n html<WorkspaceManager>`\n <div class=\"workspace-list\">\n ${repeat(\n (x) =>\n x.sharedWorkspaces.filter(\n (w) => w.userName === x.auth?.loggedUserResult?.username,\n ),\n html<SharedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Shared on\n ${(w) => new Date((w.modifiedOn || w.createdOn) as any).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SharedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.modifySharedWorkspace(w)}\n >\n Save\n </rapid-button>\n <rapid-button\n appearance=\"danger\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.confirmDeleteSharedWorkspace(w)}\n >\n Delete\n </rapid-button>\n </div>\n </div>\n `,\n )}\n </div>\n `,\n )}\n `,\n )}\n <div class=\"button-group\">\n <rapid-button\n @click=${(x) => x.saveWorkspace()}\n appearance=\"primary\"\n ?disabled=${(x) =>\n (x.saveMode === 'create' && !x.workspaceName.trim()) ||\n (x.saveMode === 'overwrite' && !x.selectedWorkspaceToOverwrite) ||\n x.saveMode === 'shared' ||\n (x.workspaceName && x.isWorkspaceExisting(x.workspaceName))}\n >\n ${(x) =>\n x.saveMode === 'create' ? 'Create' : x.saveMode === 'overwrite' ? 'Overwrite' : 'Save'}\n </rapid-button>\n <rapid-button appearance=\"outline\" @click=${(x) => x.closeSaveDialog()}>\n Cancel\n </rapid-button>\n </div>\n <div class=\"workspace-dialog-boundary\" ${ref('sharedWorkspaceDialogBoundary')}></div>\n </div>\n </rapid-modal>\n`"
124
- },
125
- {
126
- "kind": "variable",
127
- "name": "workspaceLoadModalPartial",
128
- "type": {
129
- "text": "ViewTemplate<WorkspaceManager>"
130
- },
131
- "default": "html`\n <rapid-modal ${ref('loadModal')}>\n <h2 slot=\"top\">Load Workspace</h2>\n <div class=\"dialog-content\">\n ${when(\n (x) => x.applyingWorkspace || x.isLoading,\n html`\n <div class=\"loading-container\">\n <div>Loading...</div>\n </div>\n `,\n )}\n ${when(\n (x) => !x.applyingWorkspace,\n html<WorkspaceManager>`\n ${when(\n () => false,\n html<WorkspaceManager>`\n <rapid-segmented-control value=\"${sync((x) => x.loadMode)}\">\n <rapid-segmented-item value=\"MY\">My Workspaces</rapid-segmented-item>\n\n <rapid-segmented-item value=\"SHARED\">Shared Workspaces</rapid-segmented-item>\n </rapid-segmented-control>\n `,\n )}\n ${when(\n (x) => x.loadMode === 'MY',\n html`\n <div class=\"workspace-list\">\n ${repeat(\n (x) => x.savedWorkspaces,\n html<SavedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Saved: ${(w) => new Date(w.savedAt).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SavedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.loadWorkspace(w.name)}\n >\n Load\n </rapid-button>\n <rapid-button\n appearance=\"danger\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.confirmDeleteWorkspace(w.name)}\n >\n Delete\n </rapid-button>\n </div>\n </div>\n `,\n )}\n ${when(\n (x) => x.savedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No saved workspaces found</div>\n `,\n )}\n </div>\n `,\n )}\n ${when(\n () => false,\n html`\n <div class=\"workspace-section\">\n <div class=\"workspace-list\">\n ${repeat(\n (x) => x.sharedWorkspaces,\n html<SharedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Shared by ${(w) => w.userName} ·\n ${(w) =>\n new Date((w.modifiedOn || w.createdOn) as any).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SharedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.loadSharedWorkspace(w)}\n >\n Load\n </rapid-button>\n </div>\n </div>\n `,\n )}\n </div>\n ${when(\n (x) => x.sharedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No shared workspaces available</div>\n `,\n )}\n </div>\n `,\n )}\n `,\n )}\n <div class=\"button-group\">\n <rapid-button appearance=\"outline\" @click=${(x) => x.closeLoadDialog()}>Close</rapid-button>\n </div>\n </div>\n <div class=\"workspace-dialog-boundary\" ${ref('dialogBoundary')}></div>\n </rapid-modal>\n`"
132
- },
133
- {
134
- "kind": "variable",
135
- "name": "WorkspaceManagerTemplate",
136
- "default": "html<WorkspaceManager>`\n ${workspaceHeaderPartial} ${workspaceSaveModalPartial} ${workspaceLoadModalPartial}\n`"
137
- }
138
- ],
139
- "exports": [
140
- {
141
- "kind": "js",
142
- "name": "WORKSPACE_DESCRIPTION_MAX",
143
- "declaration": {
144
- "name": "WORKSPACE_DESCRIPTION_MAX",
145
- "module": "src/workspace-manager/workspace-manager.template.ts"
146
- }
147
- },
148
- {
149
- "kind": "js",
150
- "name": "workspaceHeaderPartial",
151
- "declaration": {
152
- "name": "workspaceHeaderPartial",
153
- "module": "src/workspace-manager/workspace-manager.template.ts"
154
- }
155
- },
156
- {
157
- "kind": "js",
158
- "name": "workspaceSaveModalPartial",
159
- "declaration": {
160
- "name": "workspaceSaveModalPartial",
161
- "module": "src/workspace-manager/workspace-manager.template.ts"
162
- }
163
- },
164
- {
165
- "kind": "js",
166
- "name": "workspaceLoadModalPartial",
167
- "declaration": {
168
- "name": "workspaceLoadModalPartial",
169
- "module": "src/workspace-manager/workspace-manager.template.ts"
170
- }
171
- },
172
- {
173
- "kind": "js",
174
- "name": "WorkspaceManagerTemplate",
175
- "declaration": {
176
- "name": "WorkspaceManagerTemplate",
177
- "module": "src/workspace-manager/workspace-manager.template.ts"
178
- }
179
- }
180
- ]
181
- },
182
- {
183
- "kind": "javascript-module",
184
- "path": "src/workspace-manager/workspace-manager.ts",
63
+ "path": "src/workspace/filter-registry.ts",
185
64
  "declarations": [
186
65
  {
187
66
  "kind": "class",
188
- "description": "Workspace persistence UI (save/load + share/delete shared workspaces).",
189
- "name": "WorkspaceManager",
67
+ "description": "Default filter registry implementation.",
68
+ "name": "DefaultFilterRegistry",
190
69
  "members": [
191
70
  {
192
71
  "kind": "field",
193
- "name": "workspaceName",
194
- "type": {
195
- "text": "string"
196
- },
197
- "default": "''"
198
- },
199
- {
200
- "kind": "field",
201
- "name": "workspaceDescription",
202
- "type": {
203
- "text": "string"
204
- },
205
- "default": "''"
206
- },
207
- {
208
- "kind": "field",
209
- "name": "savedWorkspaces",
210
- "type": {
211
- "text": "SavedWorkspace[]"
212
- },
213
- "default": "[]"
214
- },
215
- {
216
- "kind": "field",
217
- "name": "sharedWorkspaces",
218
- "type": {
219
- "text": "SharedWorkspace[]"
220
- },
221
- "default": "[]"
222
- },
223
- {
224
- "kind": "field",
225
- "name": "isLoading",
226
- "type": {
227
- "text": "boolean"
228
- },
229
- "default": "false"
230
- },
231
- {
232
- "kind": "field",
233
- "name": "applyingWorkspace",
234
- "type": {
235
- "text": "boolean"
236
- },
237
- "default": "false"
238
- },
239
- {
240
- "kind": "field",
241
- "name": "loadMode",
242
- "type": {
243
- "text": "LoadMode"
244
- },
245
- "default": "'MY'"
246
- },
247
- {
248
- "kind": "field",
249
- "name": "saveModal",
250
- "type": {
251
- "text": "Modal"
252
- }
253
- },
254
- {
255
- "kind": "field",
256
- "name": "loadModal",
257
- "type": {
258
- "text": "Modal"
259
- }
260
- },
261
- {
262
- "kind": "field",
263
- "name": "saveMode",
264
- "type": {
265
- "text": "'create' | 'overwrite' | 'shared'"
266
- },
267
- "default": "'create'"
268
- },
269
- {
270
- "kind": "field",
271
- "name": "selectedWorkspaceToOverwrite",
272
- "type": {
273
- "text": "string"
274
- },
275
- "default": "''"
276
- },
277
- {
278
- "kind": "field",
279
- "name": "workspaceToShare",
72
+ "name": "filters",
280
73
  "type": {
281
- "text": "string"
74
+ "text": "Map<string, FilterRegistration>"
282
75
  },
283
- "default": "''"
284
- },
285
- {
286
- "kind": "field",
287
- "name": "dialogBoundary",
288
- "type": {
289
- "text": "HTMLElement"
290
- }
291
- },
292
- {
293
- "kind": "field",
294
- "name": "sharedWorkspaceDialogBoundary",
295
- "type": {
296
- "text": "HTMLElement"
297
- }
298
- },
299
- {
300
- "kind": "field",
301
- "name": "layoutRegistry",
302
- "type": {
303
- "text": "LayoutRegistry"
304
- }
305
- },
306
- {
307
- "kind": "field",
308
- "name": "gridRegistry",
309
- "type": {
310
- "text": "GridRegistry"
311
- }
312
- },
313
- {
314
- "kind": "field",
315
- "name": "filterRegistry",
316
- "type": {
317
- "text": "FilterRegistry"
318
- }
319
- },
320
- {
321
- "kind": "field",
322
- "name": "workspaceState",
323
- "type": {
324
- "text": "WorkspaceState"
325
- }
326
- },
327
- {
328
- "kind": "field",
329
- "name": "connect",
330
- "type": {
331
- "text": "Connect"
332
- }
333
- },
334
- {
335
- "kind": "field",
336
- "name": "auth",
337
- "type": {
338
- "text": "Auth"
339
- }
340
- },
341
- {
342
- "kind": "field",
343
- "name": "canShareWorkspace",
344
- "type": {
345
- "text": "boolean"
346
- }
76
+ "privacy": "private",
77
+ "default": "new Map()"
347
78
  },
348
79
  {
349
80
  "kind": "field",
350
- "name": "sharedWorkspacesEnabled",
81
+ "name": "stored",
351
82
  "type": {
352
- "text": "boolean"
83
+ "text": "Map<string, SavedFilterValue>"
353
84
  },
354
85
  "privacy": "private",
355
- "readonly": true,
356
- "default": "false"
86
+ "default": "new Map()"
357
87
  },
358
88
  {
359
89
  "kind": "method",
360
- "name": "sanitizeDescription",
361
- "privacy": "private",
90
+ "name": "registerFilter",
362
91
  "return": {
363
92
  "type": {
364
- "text": "string"
93
+ "text": "void"
365
94
  }
366
95
  },
367
96
  "parameters": [
368
97
  {
369
- "name": "input",
98
+ "name": "filterKey",
370
99
  "type": {
371
100
  "text": "string"
372
101
  }
102
+ },
103
+ {
104
+ "name": "getFilterValue",
105
+ "type": {
106
+ "text": "() => SavedFilterValue | null"
107
+ }
108
+ },
109
+ {
110
+ "name": "setFilterValue",
111
+ "type": {
112
+ "text": "(value: string) => void"
113
+ }
373
114
  }
374
115
  ]
375
116
  },
376
117
  {
377
118
  "kind": "method",
378
- "name": "updateWorkspaceDescription",
119
+ "name": "unregisterFilter",
379
120
  "return": {
380
121
  "type": {
381
122
  "text": "void"
@@ -383,7 +124,7 @@
383
124
  },
384
125
  "parameters": [
385
126
  {
386
- "name": "raw",
127
+ "name": "filterKey",
387
128
  "type": {
388
129
  "text": "string"
389
130
  }
@@ -392,36 +133,16 @@
392
133
  },
393
134
  {
394
135
  "kind": "method",
395
- "name": "setDescriptionFromSelectedWorkspace",
396
- "privacy": "private",
397
- "return": {
398
- "type": {
399
- "text": "void"
400
- }
401
- }
402
- },
403
- {
404
- "kind": "method",
405
- "name": "refreshSavedWorkspaces",
406
- "return": {
407
- "type": {
408
- "text": "Promise<void>"
409
- }
410
- }
411
- },
412
- {
413
- "kind": "method",
414
- "name": "refreshSharedWorkspaces",
136
+ "name": "getAllFiltersValues",
415
137
  "return": {
416
138
  "type": {
417
- "text": "Promise<void>"
139
+ "text": "SavedFilterValue[]"
418
140
  }
419
141
  }
420
142
  },
421
143
  {
422
144
  "kind": "method",
423
- "name": "notifyError",
424
- "privacy": "private",
145
+ "name": "applyFiltersValues",
425
146
  "return": {
426
147
  "type": {
427
148
  "text": "void"
@@ -429,112 +150,134 @@
429
150
  },
430
151
  "parameters": [
431
152
  {
432
- "name": "body",
433
- "default": "'Error'"
153
+ "name": "filtersValues",
154
+ "type": {
155
+ "text": "SavedFilterValue[]"
156
+ }
434
157
  }
435
158
  ]
436
159
  },
437
160
  {
438
161
  "kind": "method",
439
- "name": "saveWorkspace",
440
- "return": {
441
- "type": {
442
- "text": "Promise<void>"
443
- }
444
- }
445
- },
446
- {
447
- "kind": "method",
448
- "name": "applyWorkspace",
162
+ "name": "readValue",
449
163
  "privacy": "private",
450
164
  "return": {
451
165
  "type": {
452
- "text": "Promise<void>"
166
+ "text": "SavedFilterValue"
453
167
  }
454
168
  },
455
169
  "parameters": [
456
170
  {
457
- "name": "workspace",
171
+ "name": "registration",
458
172
  "type": {
459
- "text": "SavedWorkspace"
173
+ "text": "FilterRegistration"
460
174
  }
461
175
  }
462
- ],
463
- "description": "Seeds every registry's store with the workspace's entries (replacing whatever was stored,\neven when a list is empty) and applies them to what's mounted; unmounted grids, layouts and\nfilters pick theirs up when they register. Grids and filters are seeded before layouts:\nloading a layout rebuilds its panes, and the grids/filters inside re-register straight away."
176
+ ]
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "kind": "variable",
182
+ "name": "FilterRegistry",
183
+ "description": "DI token for filter registry."
184
+ }
185
+ ],
186
+ "exports": [
187
+ {
188
+ "kind": "js",
189
+ "name": "DefaultFilterRegistry",
190
+ "declaration": {
191
+ "name": "DefaultFilterRegistry",
192
+ "module": "src/workspace/filter-registry.ts"
193
+ }
194
+ },
195
+ {
196
+ "kind": "js",
197
+ "name": "FilterRegistry",
198
+ "declaration": {
199
+ "name": "FilterRegistry",
200
+ "module": "src/workspace/filter-registry.ts"
201
+ }
202
+ }
203
+ ]
204
+ },
205
+ {
206
+ "kind": "javascript-module",
207
+ "path": "src/workspace/grid-registry.ts",
208
+ "declarations": [
209
+ {
210
+ "kind": "class",
211
+ "description": "Default grid registry implementation.",
212
+ "name": "DefaultGridRegistry",
213
+ "members": [
214
+ {
215
+ "kind": "field",
216
+ "name": "filterSettleMs",
217
+ "default": "1500",
218
+ "description": "Quiet period after the last start-up event before the filter guard ends.",
219
+ "type": {
220
+ "text": "number"
221
+ }
464
222
  },
465
223
  {
466
- "kind": "method",
467
- "name": "loadWorkspace",
468
- "return": {
469
- "type": {
470
- "text": "Promise<void>"
471
- }
472
- },
473
- "parameters": [
474
- {
475
- "name": "workspaceName",
476
- "type": {
477
- "text": "string"
478
- }
479
- }
480
- ]
224
+ "kind": "field",
225
+ "name": "filterGuardMaxMs",
226
+ "default": "10000",
227
+ "description": "Longest the filter guard runs after it is armed, however often it is re-armed.",
228
+ "type": {
229
+ "text": "number"
230
+ }
481
231
  },
482
232
  {
483
- "kind": "method",
484
- "name": "requestSharedWorkspace",
485
- "privacy": "private",
486
- "return": {
487
- "type": {
488
- "text": "Promise<any[]>"
489
- }
490
- },
491
- "parameters": [
492
- {
493
- "name": "SHARED_WORKSPACE_ID",
494
- "type": {
495
- "text": "string"
496
- }
497
- }
498
- ]
233
+ "kind": "field",
234
+ "name": "maxFilterReapplies",
235
+ "default": "3",
236
+ "description": "Most re-applies the filter guard makes per arming.",
237
+ "type": {
238
+ "text": "number"
239
+ }
499
240
  },
500
241
  {
501
- "kind": "method",
502
- "name": "loadSharedWorkspace",
503
- "return": {
504
- "type": {
505
- "text": "Promise<void>"
506
- }
242
+ "kind": "field",
243
+ "name": "grids",
244
+ "type": {
245
+ "text": "Map<string, GridRegistration>"
507
246
  },
508
- "parameters": [
509
- {
510
- "name": "shared",
511
- "type": {
512
- "text": "{\n id: string;\n name: string;\n userName: string;\n createdOn?: string | number;\n modifiedOn?: string | number;\n data: string;\n }"
513
- }
514
- }
515
- ]
247
+ "privacy": "private",
248
+ "default": "new Map()"
516
249
  },
517
250
  {
518
- "kind": "method",
519
- "name": "deleteWorkspace",
520
- "return": {
521
- "type": {
522
- "text": "Promise<void>"
523
- }
251
+ "kind": "field",
252
+ "name": "stored",
253
+ "type": {
254
+ "text": "Map<string, SavedGridSettings>"
524
255
  },
525
- "parameters": [
526
- {
527
- "name": "workspaceName",
528
- "type": {
529
- "text": "string"
530
- }
531
- }
532
- ]
256
+ "privacy": "private",
257
+ "default": "new Map()"
258
+ },
259
+ {
260
+ "kind": "field",
261
+ "name": "listeners",
262
+ "privacy": "private",
263
+ "default": "new Map<GridRegistration, [string, GridEventListener][]>()"
264
+ },
265
+ {
266
+ "kind": "field",
267
+ "name": "guards",
268
+ "privacy": "private",
269
+ "default": "new Map<GridRegistration, FilterGuard>()"
533
270
  },
534
271
  {
535
- "kind": "method",
536
- "name": "showDeleteConfirmation",
272
+ "kind": "field",
273
+ "name": "settled",
537
274
  "privacy": "private",
275
+ "default": "new Set<GridRegistration>()",
276
+ "description": "Registrations whose first data has rendered or whose filters the user has changed."
277
+ },
278
+ {
279
+ "kind": "method",
280
+ "name": "registerGrid",
538
281
  "return": {
539
282
  "type": {
540
283
  "text": "void"
@@ -542,34 +285,36 @@
542
285
  },
543
286
  "parameters": [
544
287
  {
545
- "name": "title",
288
+ "name": "gridKey",
546
289
  "type": {
547
290
  "text": "string"
548
291
  }
549
292
  },
550
293
  {
551
- "name": "body",
294
+ "name": "gridApi",
552
295
  "type": {
553
- "text": "string"
296
+ "text": "unknown"
554
297
  }
555
298
  },
556
299
  {
557
- "name": "actionFunction",
300
+ "name": "columnApi",
558
301
  "type": {
559
- "text": "() => void"
302
+ "text": "unknown"
560
303
  }
561
304
  },
562
305
  {
563
- "name": "dialogBoundary",
306
+ "name": "filterPersistence",
307
+ "optional": true,
564
308
  "type": {
565
- "text": "HTMLElement"
309
+ "text": "GridFilterPersistence"
566
310
  }
567
311
  }
568
312
  ]
569
313
  },
570
314
  {
571
315
  "kind": "method",
572
- "name": "confirmDeleteWorkspace",
316
+ "name": "applyStoredSettings",
317
+ "privacy": "private",
573
318
  "return": {
574
319
  "type": {
575
320
  "text": "void"
@@ -577,110 +322,109 @@
577
322
  },
578
323
  "parameters": [
579
324
  {
580
- "name": "workspaceName",
325
+ "name": "registration",
581
326
  "type": {
582
- "text": "string"
327
+ "text": "GridRegistration"
328
+ }
329
+ },
330
+ {
331
+ "name": "options",
332
+ "optional": true,
333
+ "type": {
334
+ "text": "{ applyFilters?: boolean }"
583
335
  }
584
336
  }
585
- ]
337
+ ],
338
+ "description": "Applies the stored settings for a grid, unless it already has exactly that state."
586
339
  },
587
340
  {
588
341
  "kind": "method",
589
- "name": "modifySharedWorkspace",
342
+ "name": "getGrid",
590
343
  "return": {
591
344
  "type": {
592
- "text": "Promise<void>"
345
+ "text": "GridRegistration | null"
593
346
  }
594
347
  },
595
348
  "parameters": [
596
349
  {
597
- "name": "sharedWorkspace",
350
+ "name": "gridKey",
598
351
  "type": {
599
- "text": "SharedWorkspace"
352
+ "text": "string"
600
353
  }
601
354
  }
602
355
  ]
603
356
  },
604
357
  {
605
358
  "kind": "method",
606
- "name": "deleteSharedWorkspace",
359
+ "name": "unregisterGrid",
607
360
  "return": {
608
361
  "type": {
609
- "text": "Promise<void>"
362
+ "text": "void"
610
363
  }
611
364
  },
612
365
  "parameters": [
613
366
  {
614
- "name": "sharedWorkspace",
367
+ "name": "gridKey",
615
368
  "type": {
616
- "text": "SharedWorkspace"
369
+ "text": "string"
617
370
  }
618
371
  }
619
372
  ]
620
373
  },
621
374
  {
622
375
  "kind": "method",
623
- "name": "confirmDeleteSharedWorkspace",
376
+ "name": "getAllGridsSettings",
624
377
  "return": {
625
378
  "type": {
626
- "text": "void"
627
- }
628
- },
629
- "parameters": [
630
- {
631
- "name": "sharedWorkspace",
632
- "type": {
633
- "text": "SharedWorkspace"
634
- }
379
+ "text": "SavedGridSettings[]"
635
380
  }
636
- ]
381
+ }
637
382
  },
638
383
  {
639
384
  "kind": "method",
640
- "name": "shareExistingWorkspace",
385
+ "name": "applyGridSettings",
641
386
  "return": {
642
387
  "type": {
643
- "text": "Promise<void>"
388
+ "text": "Promise<boolean>"
644
389
  }
645
390
  },
646
391
  "parameters": [
647
392
  {
648
- "name": "workspaceName",
393
+ "name": "gridSetting",
649
394
  "type": {
650
- "text": "string"
395
+ "text": "SavedGridSettings"
396
+ }
397
+ },
398
+ {
399
+ "name": "options",
400
+ "optional": true,
401
+ "type": {
402
+ "text": "{ applyColumns?: boolean; applyFilters?: boolean }"
651
403
  }
652
404
  }
653
405
  ]
654
406
  },
655
407
  {
656
408
  "kind": "method",
657
- "name": "openSaveDialog",
409
+ "name": "applyAllGridsSettings",
658
410
  "return": {
659
411
  "type": {
660
412
  "text": "Promise<void>"
661
413
  }
662
- }
663
- },
664
- {
665
- "kind": "method",
666
- "name": "isWorkspaceExisting",
667
- "return": {
668
- "type": {
669
- "text": "boolean"
670
- }
671
414
  },
672
415
  "parameters": [
673
416
  {
674
- "name": "workspaceName",
417
+ "name": "gridsSettings",
675
418
  "type": {
676
- "text": "string"
419
+ "text": "SavedGridSettings[]"
677
420
  }
678
421
  }
679
422
  ]
680
423
  },
681
424
  {
682
425
  "kind": "method",
683
- "name": "saveModeChanged",
426
+ "name": "applyFilterModel",
427
+ "privacy": "private",
684
428
  "return": {
685
429
  "type": {
686
430
  "text": "void"
@@ -688,22 +432,24 @@
688
432
  },
689
433
  "parameters": [
690
434
  {
691
- "name": "oldValue",
435
+ "name": "registration",
692
436
  "type": {
693
- "text": "string"
437
+ "text": "GridRegistration"
694
438
  }
695
439
  },
696
440
  {
697
- "name": "newValue",
441
+ "name": "filterModel",
698
442
  "type": {
699
- "text": "string"
443
+ "text": "Record<string, unknown>"
700
444
  }
701
445
  }
702
- ]
446
+ ],
447
+ "description": "Writes a filter model into the grid's own persistence, then onto the grid, and records what\nthe grid reports back so the guard can tell a later replacement from AG Grid's normalisation."
703
448
  },
704
449
  {
705
450
  "kind": "method",
706
- "name": "selectedWorkspaceToOverwriteChanged",
451
+ "name": "reapplyStoredFilter",
452
+ "privacy": "private",
707
453
  "return": {
708
454
  "type": {
709
455
  "text": "void"
@@ -711,215 +457,134 @@
711
457
  },
712
458
  "parameters": [
713
459
  {
714
- "name": "oldValue",
715
- "type": {
716
- "text": "string"
717
- }
718
- },
719
- {
720
- "name": "newValue",
460
+ "name": "registration",
721
461
  "type": {
722
- "text": "string"
462
+ "text": "GridRegistration"
723
463
  }
724
464
  }
725
465
  ]
726
466
  },
727
467
  {
728
468
  "kind": "method",
729
- "name": "openLoadDialog",
469
+ "name": "filterWasReplaced",
470
+ "privacy": "private",
730
471
  "return": {
731
472
  "type": {
732
- "text": "void"
473
+ "text": "boolean"
733
474
  }
734
- }
735
- },
736
- {
737
- "kind": "method",
738
- "name": "closeSaveDialog",
739
- "return": {
740
- "type": {
741
- "text": "void"
475
+ },
476
+ "parameters": [
477
+ {
478
+ "name": "registration",
479
+ "type": {
480
+ "text": "GridRegistration"
481
+ }
742
482
  }
743
- }
483
+ ],
484
+ "description": "Whether the grid's filter model moved away from what the registry last applied — a stale\nrestore or other programmatic change, rather than AG Grid normalising the applied model (which\nreads back the same each time)."
744
485
  },
745
486
  {
746
487
  "kind": "method",
747
- "name": "closeLoadDialog",
488
+ "name": "armFilterGuard",
489
+ "privacy": "private",
748
490
  "return": {
749
491
  "type": {
750
492
  "text": "void"
751
493
  }
752
- }
753
- },
754
- {
755
- "kind": "field",
756
- "name": "_presentation",
757
- "type": {
758
- "text": "ComponentPresentation | null | undefined"
759
- },
760
- "privacy": "private",
761
- "default": "void 0",
762
- "inheritedFrom": {
763
- "name": "FoundationElement",
764
- "module": "src/foundation-element/foundation-element.ts"
765
- }
766
- },
767
- {
768
- "kind": "field",
769
- "name": "$presentation",
770
- "type": {
771
- "text": "ComponentPresentation | null"
772
494
  },
773
- "privacy": "public",
774
- "description": "A property which resolves the ComponentPresentation instance\nfor the current component.",
775
- "inheritedFrom": {
776
- "name": "FoundationElement",
777
- "module": "src/foundation-element/foundation-element.ts"
778
- }
779
- },
780
- {
781
- "kind": "field",
782
- "name": "template",
783
- "type": {
784
- "text": "ElementViewTemplate | void | null"
785
- },
786
- "privacy": "public",
787
- "description": "Sets the template of the element instance. When undefined,\nthe element will attempt to resolve the template from\nthe associated presentation or custom element definition.",
788
- "inheritedFrom": {
789
- "name": "FoundationElement",
790
- "module": "src/foundation-element/foundation-element.ts"
791
- }
495
+ "parameters": [
496
+ {
497
+ "name": "registration",
498
+ "type": {
499
+ "text": "GridRegistration"
500
+ }
501
+ }
502
+ ]
792
503
  },
793
504
  {
794
505
  "kind": "method",
795
- "name": "templateChanged",
796
- "privacy": "protected",
506
+ "name": "touchFilterGuard",
507
+ "privacy": "private",
797
508
  "return": {
798
509
  "type": {
799
510
  "text": "void"
800
511
  }
801
512
  },
802
- "inheritedFrom": {
803
- "name": "FoundationElement",
804
- "module": "src/foundation-element/foundation-element.ts"
805
- }
806
- },
807
- {
808
- "kind": "field",
809
- "name": "styles",
810
- "type": {
811
- "text": "ElementStyles | void | null"
812
- },
813
- "privacy": "public",
814
- "description": "Sets the default styles for the element instance. When undefined,\nthe element will attempt to resolve default styles from\nthe associated presentation or custom element definition.",
815
- "inheritedFrom": {
816
- "name": "FoundationElement",
817
- "module": "src/foundation-element/foundation-element.ts"
818
- }
513
+ "parameters": [
514
+ {
515
+ "name": "registration",
516
+ "type": {
517
+ "text": "GridRegistration"
518
+ }
519
+ }
520
+ ],
521
+ "description": "Restarts the settle timer: the grid just did something that can precede a stale restore."
819
522
  },
820
523
  {
821
524
  "kind": "method",
822
- "name": "stylesChanged",
823
- "privacy": "protected",
525
+ "name": "guardActive",
526
+ "privacy": "private",
824
527
  "return": {
825
528
  "type": {
826
- "text": "void"
529
+ "text": "boolean"
827
530
  }
828
531
  },
829
- "inheritedFrom": {
830
- "name": "FoundationElement",
831
- "module": "src/foundation-element/foundation-element.ts"
832
- }
532
+ "parameters": [
533
+ {
534
+ "name": "registration",
535
+ "type": {
536
+ "text": "GridRegistration"
537
+ }
538
+ }
539
+ ]
833
540
  },
834
- {
835
- "kind": "method",
836
- "name": "compose",
837
- "privacy": "public",
838
- "static": true,
541
+ {
542
+ "kind": "method",
543
+ "name": "endFilterGuard",
544
+ "privacy": "private",
839
545
  "return": {
840
546
  "type": {
841
- "text": "(\n overrideDefinition?: OverrideFoundationElementDefinition<T>\n ) => FoundationElementRegistry<T, K>"
547
+ "text": "void"
842
548
  }
843
549
  },
844
550
  "parameters": [
845
551
  {
846
- "name": "this",
552
+ "name": "registration",
847
553
  "type": {
848
- "text": "K"
554
+ "text": "GridRegistration"
849
555
  }
850
- },
851
- {
852
- "name": "elementDefinition",
853
- "type": {
854
- "text": "T"
855
- },
856
- "description": "The definition of the element to create the registry\nfunction for."
857
556
  }
858
- ],
859
- "description": "Defines an element registry function with a set of element definition defaults.",
860
- "inheritedFrom": {
861
- "name": "FoundationElement",
862
- "module": "src/foundation-element/foundation-element.ts"
863
- }
864
- }
865
- ],
866
- "superclass": {
867
- "name": "FoundationElement",
868
- "package": "@genesislcap/web-core"
869
- },
870
- "tagName": "workspace-manager",
871
- "customElement": true
872
- }
873
- ],
874
- "exports": [
875
- {
876
- "kind": "js",
877
- "name": "WorkspaceManager",
878
- "declaration": {
879
- "name": "WorkspaceManager",
880
- "module": "src/workspace-manager/workspace-manager.ts"
881
- }
882
- },
883
- {
884
- "kind": "custom-element-definition",
885
- "name": "workspace-manager",
886
- "declaration": {
887
- "name": "WorkspaceManager",
888
- "module": "src/workspace-manager/workspace-manager.ts"
889
- }
890
- }
891
- ]
892
- },
893
- {
894
- "kind": "javascript-module",
895
- "path": "src/workspace/filter-registry.ts",
896
- "declarations": [
897
- {
898
- "kind": "class",
899
- "description": "Default filter registry implementation.",
900
- "name": "DefaultFilterRegistry",
901
- "members": [
902
- {
903
- "kind": "field",
904
- "name": "filters",
905
- "type": {
906
- "text": "Map<string, FilterRegistration>"
907
- },
908
- "privacy": "private",
909
- "default": "new Map()"
557
+ ]
910
558
  },
911
559
  {
912
- "kind": "field",
913
- "name": "stored",
914
- "type": {
915
- "text": "Map<string, SavedFilterValue>"
916
- },
560
+ "kind": "method",
561
+ "name": "addListener",
917
562
  "privacy": "private",
918
- "default": "new Map()"
563
+ "parameters": [
564
+ {
565
+ "name": "registration",
566
+ "type": {
567
+ "text": "GridRegistration"
568
+ }
569
+ },
570
+ {
571
+ "name": "type",
572
+ "type": {
573
+ "text": "string"
574
+ }
575
+ },
576
+ {
577
+ "name": "listener",
578
+ "type": {
579
+ "text": "GridEventListener"
580
+ }
581
+ }
582
+ ]
919
583
  },
920
584
  {
921
585
  "kind": "method",
922
- "name": "registerFilter",
586
+ "name": "removeListener",
587
+ "privacy": "private",
923
588
  "return": {
924
589
  "type": {
925
590
  "text": "void"
@@ -927,28 +592,29 @@
927
592
  },
928
593
  "parameters": [
929
594
  {
930
- "name": "filterKey",
595
+ "name": "registration",
931
596
  "type": {
932
- "text": "string"
597
+ "text": "GridRegistration"
933
598
  }
934
599
  },
935
600
  {
936
- "name": "getFilterValue",
601
+ "name": "type",
937
602
  "type": {
938
- "text": "() => SavedFilterValue | null"
603
+ "text": "string"
939
604
  }
940
605
  },
941
606
  {
942
- "name": "setFilterValue",
607
+ "name": "listener",
943
608
  "type": {
944
- "text": "(value: string) => void"
609
+ "text": "GridEventListener"
945
610
  }
946
611
  }
947
612
  ]
948
613
  },
949
614
  {
950
615
  "kind": "method",
951
- "name": "unregisterFilter",
616
+ "name": "storeSnapshot",
617
+ "privacy": "private",
952
618
  "return": {
953
619
  "type": {
954
620
  "text": "void"
@@ -956,53 +622,96 @@
956
622
  },
957
623
  "parameters": [
958
624
  {
959
- "name": "filterKey",
625
+ "name": "registration",
960
626
  "type": {
961
- "text": "string"
627
+ "text": "GridRegistration"
962
628
  }
963
629
  }
964
- ]
630
+ ],
631
+ "description": "Stores a grid's live state over its stored entry, except what the grid can't report yet:\n- nothing, once its API is destroyed (grid-pro destroys the outgoing grid before the new one\n re-registers, and a destroyed v36 API returns `undefined` rather than throwing);\n- the stored column state and filter model while the grid has no columns: before datasource\n columns exist, and after a datasource restart clears them (AG Grid then drops every filter,\n before grid-pro rebuilds the grid). With nothing stored, the filter model is left out, so the\n next registration leaves grid-pro to restore its own persisted filters;\n- the stored filter model until the first data renders or the user filters, since before that\n the grid may not have applied it yet (its columns or grid-pro's restore still pending)."
965
632
  },
966
633
  {
967
634
  "kind": "method",
968
- "name": "getAllFiltersValues",
635
+ "name": "detach",
636
+ "privacy": "private",
969
637
  "return": {
970
638
  "type": {
971
- "text": "SavedFilterValue[]"
639
+ "text": "void"
972
640
  }
973
- }
641
+ },
642
+ "parameters": [
643
+ {
644
+ "name": "registration",
645
+ "type": {
646
+ "text": "GridRegistration"
647
+ }
648
+ }
649
+ ],
650
+ "description": "Removes a registration's grid listeners and stops its filter guard."
974
651
  },
975
652
  {
976
653
  "kind": "method",
977
- "name": "applyFiltersValues",
654
+ "name": "hasSettings",
655
+ "privacy": "private",
978
656
  "return": {
979
657
  "type": {
980
- "text": "void"
658
+ "text": "boolean"
981
659
  }
982
660
  },
983
661
  "parameters": [
984
662
  {
985
- "name": "filtersValues",
663
+ "name": "grid",
986
664
  "type": {
987
- "text": "SavedFilterValue[]"
665
+ "text": "GridRegistration"
666
+ }
667
+ },
668
+ {
669
+ "name": "settings",
670
+ "type": {
671
+ "text": "SavedGridSettings"
672
+ }
673
+ }
674
+ ],
675
+ "description": "Whether the grid already has exactly these settings, so re-applying them is a no-op."
676
+ },
677
+ {
678
+ "kind": "method",
679
+ "name": "readFilterModel",
680
+ "privacy": "private",
681
+ "return": {
682
+ "type": {
683
+ "text": "string"
684
+ }
685
+ },
686
+ "parameters": [
687
+ {
688
+ "name": "grid",
689
+ "type": {
690
+ "text": "GridRegistration"
988
691
  }
989
692
  }
990
693
  ]
991
694
  },
992
695
  {
993
696
  "kind": "method",
994
- "name": "readValue",
697
+ "name": "getGridSettings",
995
698
  "privacy": "private",
996
699
  "return": {
997
700
  "type": {
998
- "text": "SavedFilterValue"
701
+ "text": "SavedGridSettings | null"
999
702
  }
1000
703
  },
1001
704
  "parameters": [
1002
705
  {
1003
- "name": "registration",
706
+ "name": "gridKey",
1004
707
  "type": {
1005
- "text": "FilterRegistration"
708
+ "text": "string"
709
+ }
710
+ },
711
+ {
712
+ "name": "grid",
713
+ "type": {
714
+ "text": "GridRegistration"
1006
715
  }
1007
716
  }
1008
717
  ]
@@ -1010,71 +719,115 @@
1010
719
  ]
1011
720
  },
1012
721
  {
1013
- "kind": "variable",
1014
- "name": "FilterRegistry",
1015
- "description": "DI token for filter registry."
1016
- }
1017
- ],
1018
- "exports": [
722
+ "kind": "variable",
723
+ "name": "GridRegistry",
724
+ "description": "DI token for grid registry."
725
+ }
726
+ ],
727
+ "exports": [
728
+ {
729
+ "kind": "js",
730
+ "name": "DefaultGridRegistry",
731
+ "declaration": {
732
+ "name": "DefaultGridRegistry",
733
+ "module": "src/workspace/grid-registry.ts"
734
+ }
735
+ },
736
+ {
737
+ "kind": "js",
738
+ "name": "GridRegistry",
739
+ "declaration": {
740
+ "name": "GridRegistry",
741
+ "module": "src/workspace/grid-registry.ts"
742
+ }
743
+ }
744
+ ]
745
+ },
746
+ {
747
+ "kind": "javascript-module",
748
+ "path": "src/workspace/index.ts",
749
+ "declarations": [],
750
+ "exports": [
751
+ {
752
+ "kind": "js",
753
+ "name": "*",
754
+ "declaration": {
755
+ "name": "*",
756
+ "package": "./workspace.types"
757
+ }
758
+ },
759
+ {
760
+ "kind": "js",
761
+ "name": "*",
762
+ "declaration": {
763
+ "name": "*",
764
+ "package": "./workspace-state.types"
765
+ }
766
+ },
767
+ {
768
+ "kind": "js",
769
+ "name": "*",
770
+ "declaration": {
771
+ "name": "*",
772
+ "package": "./workspace-state"
773
+ }
774
+ },
775
+ {
776
+ "kind": "js",
777
+ "name": "*",
778
+ "declaration": {
779
+ "name": "*",
780
+ "package": "./layout-registry"
781
+ }
782
+ },
783
+ {
784
+ "kind": "js",
785
+ "name": "*",
786
+ "declaration": {
787
+ "name": "*",
788
+ "package": "./grid-registry"
789
+ }
790
+ },
791
+ {
792
+ "kind": "js",
793
+ "name": "*",
794
+ "declaration": {
795
+ "name": "*",
796
+ "package": "./filter-registry"
797
+ }
798
+ },
1019
799
  {
1020
800
  "kind": "js",
1021
- "name": "DefaultFilterRegistry",
801
+ "name": "*",
1022
802
  "declaration": {
1023
- "name": "DefaultFilterRegistry",
1024
- "module": "src/workspace/filter-registry.ts"
803
+ "name": "*",
804
+ "package": "./grid-register"
1025
805
  }
1026
806
  },
1027
807
  {
1028
808
  "kind": "js",
1029
- "name": "FilterRegistry",
809
+ "name": "*",
1030
810
  "declaration": {
1031
- "name": "FilterRegistry",
1032
- "module": "src/workspace/filter-registry.ts"
811
+ "name": "*",
812
+ "package": "./layout-wrapper"
1033
813
  }
1034
814
  }
1035
815
  ]
1036
816
  },
1037
817
  {
1038
818
  "kind": "javascript-module",
1039
- "path": "src/workspace/grid-registry.ts",
819
+ "path": "src/workspace/layout-registry.ts",
1040
820
  "declarations": [
1041
821
  {
1042
822
  "kind": "class",
1043
- "description": "Default grid registry implementation.",
1044
- "name": "DefaultGridRegistry",
823
+ "description": "Default layout registry implementation.",
824
+ "name": "DefaultLayoutRegistry",
1045
825
  "members": [
1046
826
  {
1047
827
  "kind": "field",
1048
- "name": "filterSettleMs",
1049
- "default": "1500",
1050
- "description": "Quiet period after the last start-up event before the filter guard ends.",
1051
- "type": {
1052
- "text": "number"
1053
- }
1054
- },
1055
- {
1056
- "kind": "field",
1057
- "name": "filterGuardMaxMs",
1058
- "default": "10000",
1059
- "description": "Longest the filter guard runs after it is armed, however often it is re-armed.",
1060
- "type": {
1061
- "text": "number"
1062
- }
1063
- },
1064
- {
1065
- "kind": "field",
1066
- "name": "maxFilterReapplies",
1067
- "default": "3",
1068
- "description": "Most re-applies the filter guard makes per arming.",
1069
- "type": {
1070
- "text": "number"
1071
- }
1072
- },
1073
- {
1074
- "kind": "field",
1075
- "name": "grids",
828
+ "name": "layouts",
1076
829
  "type": {
1077
- "text": "Map<string, GridRegistration>"
830
+ "text": "Map<string, WorkspaceLayout>"
1078
831
  },
1079
832
  "privacy": "private",
1080
833
  "default": "new Map()"
@@ -1083,33 +836,21 @@
1083
836
  "kind": "field",
1084
837
  "name": "stored",
1085
838
  "type": {
1086
- "text": "Map<string, SavedGridSettings>"
839
+ "text": "Map<string, SerialisedLayout>"
1087
840
  },
1088
841
  "privacy": "private",
1089
842
  "default": "new Map()"
1090
843
  },
1091
844
  {
1092
845
  "kind": "field",
1093
- "name": "listeners",
1094
- "privacy": "private",
1095
- "default": "new Map<GridRegistration, [string, GridEventListener][]>()"
1096
- },
1097
- {
1098
- "kind": "field",
1099
- "name": "guards",
1100
- "privacy": "private",
1101
- "default": "new Map<GridRegistration, FilterGuard>()"
1102
- },
1103
- {
1104
- "kind": "field",
1105
- "name": "settled",
846
+ "name": "waiting",
1106
847
  "privacy": "private",
1107
- "default": "new Set<GridRegistration>()",
1108
- "description": "Registrations whose first data has rendered or whose filters the user has changed."
848
+ "default": "new WeakSet<WorkspaceLayout>()",
849
+ "description": "Layouts with a stored-config load queued for their first load."
1109
850
  },
1110
851
  {
1111
852
  "kind": "method",
1112
- "name": "registerGrid",
853
+ "name": "registerLayout",
1113
854
  "return": {
1114
855
  "type": {
1115
856
  "text": "void"
@@ -1117,78 +858,22 @@
1117
858
  },
1118
859
  "parameters": [
1119
860
  {
1120
- "name": "gridKey",
861
+ "name": "layoutKey",
1121
862
  "type": {
1122
863
  "text": "string"
1123
864
  }
1124
865
  },
1125
866
  {
1126
- "name": "gridApi",
1127
- "type": {
1128
- "text": "unknown"
1129
- }
1130
- },
1131
- {
1132
- "name": "columnApi",
1133
- "type": {
1134
- "text": "unknown"
1135
- }
1136
- },
1137
- {
1138
- "name": "filterPersistence",
1139
- "optional": true,
1140
- "type": {
1141
- "text": "GridFilterPersistence"
1142
- }
1143
- }
1144
- ]
1145
- },
1146
- {
1147
- "kind": "method",
1148
- "name": "applyStoredSettings",
1149
- "privacy": "private",
1150
- "return": {
1151
- "type": {
1152
- "text": "void"
1153
- }
1154
- },
1155
- "parameters": [
1156
- {
1157
- "name": "registration",
1158
- "type": {
1159
- "text": "GridRegistration"
1160
- }
1161
- },
1162
- {
1163
- "name": "options",
1164
- "optional": true,
1165
- "type": {
1166
- "text": "{ applyFilters?: boolean }"
1167
- }
1168
- }
1169
- ],
1170
- "description": "Applies the stored settings for a grid, unless it already has exactly that state."
1171
- },
1172
- {
1173
- "kind": "method",
1174
- "name": "getGrid",
1175
- "return": {
1176
- "type": {
1177
- "text": "GridRegistration | null"
1178
- }
1179
- },
1180
- "parameters": [
1181
- {
1182
- "name": "gridKey",
867
+ "name": "layout",
1183
868
  "type": {
1184
- "text": "string"
869
+ "text": "WorkspaceLayout"
1185
870
  }
1186
871
  }
1187
872
  ]
1188
873
  },
1189
874
  {
1190
875
  "kind": "method",
1191
- "name": "unregisterGrid",
876
+ "name": "unregisterLayout",
1192
877
  "return": {
1193
878
  "type": {
1194
879
  "text": "void"
@@ -1196,7 +881,7 @@
1196
881
  },
1197
882
  "parameters": [
1198
883
  {
1199
- "name": "gridKey",
884
+ "name": "layoutKey",
1200
885
  "type": {
1201
886
  "text": "string"
1202
887
  }
@@ -1205,57 +890,52 @@
1205
890
  },
1206
891
  {
1207
892
  "kind": "method",
1208
- "name": "getAllGridsSettings",
893
+ "name": "getLayoutsConfigs",
1209
894
  "return": {
1210
895
  "type": {
1211
- "text": "SavedGridSettings[]"
896
+ "text": "SavedLayout[]"
1212
897
  }
1213
898
  }
1214
899
  },
1215
900
  {
1216
901
  "kind": "method",
1217
- "name": "applyGridSettings",
902
+ "name": "applySavedLayouts",
1218
903
  "return": {
1219
904
  "type": {
1220
- "text": "Promise<boolean>"
905
+ "text": "Promise<void>"
1221
906
  }
1222
907
  },
1223
908
  "parameters": [
1224
909
  {
1225
- "name": "gridSetting",
1226
- "type": {
1227
- "text": "SavedGridSettings"
1228
- }
1229
- },
1230
- {
1231
- "name": "options",
1232
- "optional": true,
910
+ "name": "savedLayouts",
1233
911
  "type": {
1234
- "text": "{ applyColumns?: boolean; applyFilters?: boolean }"
912
+ "text": "SavedLayout[]"
1235
913
  }
1236
914
  }
1237
915
  ]
1238
916
  },
1239
917
  {
1240
918
  "kind": "method",
1241
- "name": "applyAllGridsSettings",
919
+ "name": "readLayout",
920
+ "privacy": "private",
1242
921
  "return": {
1243
922
  "type": {
1244
- "text": "Promise<void>"
923
+ "text": "SerialisedLayout | null"
1245
924
  }
1246
925
  },
1247
926
  "parameters": [
1248
927
  {
1249
- "name": "gridsSettings",
928
+ "name": "layout",
1250
929
  "type": {
1251
- "text": "SavedGridSettings[]"
930
+ "text": "WorkspaceLayout"
1252
931
  }
1253
932
  }
1254
- ]
933
+ ],
934
+ "description": "A layout's config is only meaningful once it has finished its first load; before that it has\nno panes yet, and storing that would wipe the saved config."
1255
935
  },
1256
936
  {
1257
937
  "kind": "method",
1258
- "name": "applyFilterModel",
938
+ "name": "loadStored",
1259
939
  "privacy": "private",
1260
940
  "return": {
1261
941
  "type": {
@@ -1264,208 +944,212 @@
1264
944
  },
1265
945
  "parameters": [
1266
946
  {
1267
- "name": "registration",
947
+ "name": "layoutKey",
1268
948
  "type": {
1269
- "text": "GridRegistration"
949
+ "text": "string"
1270
950
  }
1271
951
  },
1272
952
  {
1273
- "name": "filterModel",
953
+ "name": "layout",
1274
954
  "type": {
1275
- "text": "Record<string, unknown>"
955
+ "text": "WorkspaceLayout"
1276
956
  }
1277
957
  }
1278
958
  ],
1279
- "description": "Writes a filter model into the grid's own persistence, then onto the grid, and records what\nthe grid reports back so the guard can tell a later replacement from AG Grid's normalisation."
959
+ "description": "Loads a layout's stored config once it has finished its first load. The config is read at load\ntime, so a workspace loaded while waiting wins, and a layout waiting already isn't queued twice;\nnothing loads into a layout that has since unregistered or been replaced under its key."
960
+ }
961
+ ]
962
+ },
963
+ {
964
+ "kind": "variable",
965
+ "name": "LayoutRegistry",
966
+ "description": "DI token for layout registry."
967
+ }
968
+ ],
969
+ "exports": [
970
+ {
971
+ "kind": "js",
972
+ "name": "DefaultLayoutRegistry",
973
+ "declaration": {
974
+ "name": "DefaultLayoutRegistry",
975
+ "module": "src/workspace/layout-registry.ts"
976
+ }
977
+ },
978
+ {
979
+ "kind": "js",
980
+ "name": "LayoutRegistry",
981
+ "declaration": {
982
+ "name": "LayoutRegistry",
983
+ "module": "src/workspace/layout-registry.ts"
984
+ }
985
+ }
986
+ ]
987
+ },
988
+ {
989
+ "kind": "javascript-module",
990
+ "path": "src/workspace/workspace-state.ts",
991
+ "declarations": [
992
+ {
993
+ "kind": "class",
994
+ "description": "Default workspace persistence implementation backed by KVStorage.",
995
+ "name": "DefaultWorkspaceState",
996
+ "members": [
997
+ {
998
+ "kind": "field",
999
+ "name": "STORAGE_PREFIX",
1000
+ "type": {
1001
+ "text": "string"
1002
+ },
1003
+ "privacy": "private",
1004
+ "readonly": true,
1005
+ "default": "'workspace_'"
1280
1006
  },
1281
1007
  {
1282
- "kind": "method",
1283
- "name": "reapplyStoredFilter",
1008
+ "kind": "field",
1009
+ "name": "WORKSPACES_LIST_KEY",
1010
+ "type": {
1011
+ "text": "string"
1012
+ },
1284
1013
  "privacy": "private",
1285
- "return": {
1286
- "type": {
1287
- "text": "void"
1288
- }
1014
+ "readonly": true,
1015
+ "default": "'workspaces_list'"
1016
+ },
1017
+ {
1018
+ "kind": "field",
1019
+ "name": "currentWorkspace",
1020
+ "type": {
1021
+ "text": "SavedWorkspace | null"
1289
1022
  },
1290
- "parameters": [
1291
- {
1292
- "name": "registration",
1293
- "type": {
1294
- "text": "GridRegistration"
1295
- }
1296
- }
1297
- ]
1023
+ "privacy": "private",
1024
+ "default": "null"
1298
1025
  },
1299
1026
  {
1300
1027
  "kind": "method",
1301
- "name": "filterWasReplaced",
1028
+ "name": "getCurrentUsername",
1302
1029
  "privacy": "private",
1303
1030
  "return": {
1304
1031
  "type": {
1305
- "text": "boolean"
1306
- }
1307
- },
1308
- "parameters": [
1309
- {
1310
- "name": "registration",
1311
- "type": {
1312
- "text": "GridRegistration"
1313
- }
1032
+ "text": "string"
1314
1033
  }
1315
- ],
1316
- "description": "Whether the grid's filter model moved away from what the registry last applied — a stale\nrestore or other programmatic change, rather than AG Grid normalising the applied model (which\nreads back the same each time)."
1034
+ }
1317
1035
  },
1318
1036
  {
1319
1037
  "kind": "method",
1320
- "name": "armFilterGuard",
1038
+ "name": "getWorkspaceStorageKey",
1321
1039
  "privacy": "private",
1322
1040
  "return": {
1323
1041
  "type": {
1324
- "text": "void"
1042
+ "text": "string"
1325
1043
  }
1326
1044
  },
1327
1045
  "parameters": [
1328
1046
  {
1329
- "name": "registration",
1047
+ "name": "workspaceName",
1330
1048
  "type": {
1331
- "text": "GridRegistration"
1049
+ "text": "string"
1332
1050
  }
1333
1051
  }
1334
1052
  ]
1335
1053
  },
1336
1054
  {
1337
1055
  "kind": "method",
1338
- "name": "touchFilterGuard",
1056
+ "name": "getWorkspacesListKey",
1339
1057
  "privacy": "private",
1340
1058
  "return": {
1341
1059
  "type": {
1342
- "text": "void"
1343
- }
1344
- },
1345
- "parameters": [
1346
- {
1347
- "name": "registration",
1348
- "type": {
1349
- "text": "GridRegistration"
1350
- }
1060
+ "text": "string"
1351
1061
  }
1352
- ],
1353
- "description": "Restarts the settle timer: the grid just did something that can precede a stale restore."
1062
+ }
1354
1063
  },
1355
1064
  {
1356
1065
  "kind": "method",
1357
- "name": "guardActive",
1358
- "privacy": "private",
1066
+ "name": "saveWorkspace",
1359
1067
  "return": {
1360
1068
  "type": {
1361
- "text": "boolean"
1069
+ "text": "Promise<void>"
1362
1070
  }
1363
1071
  },
1364
1072
  "parameters": [
1365
1073
  {
1366
- "name": "registration",
1074
+ "name": "workspaceName",
1367
1075
  "type": {
1368
- "text": "GridRegistration"
1076
+ "text": "string"
1369
1077
  }
1370
- }
1371
- ]
1372
- },
1373
- {
1374
- "kind": "method",
1375
- "name": "endFilterGuard",
1376
- "privacy": "private",
1377
- "return": {
1378
- "type": {
1379
- "text": "void"
1380
- }
1381
- },
1382
- "parameters": [
1078
+ },
1383
1079
  {
1384
- "name": "registration",
1080
+ "name": "layouts",
1385
1081
  "type": {
1386
- "text": "GridRegistration"
1082
+ "text": "SavedLayout[]"
1387
1083
  }
1388
- }
1389
- ]
1390
- },
1391
- {
1392
- "kind": "method",
1393
- "name": "addListener",
1394
- "privacy": "private",
1395
- "parameters": [
1084
+ },
1396
1085
  {
1397
- "name": "registration",
1086
+ "name": "grids",
1398
1087
  "type": {
1399
- "text": "GridRegistration"
1088
+ "text": "SavedGridSettings[]"
1400
1089
  }
1401
1090
  },
1402
1091
  {
1403
- "name": "type",
1092
+ "name": "filters",
1404
1093
  "type": {
1405
- "text": "string"
1094
+ "text": "SavedFilterValue[]"
1406
1095
  }
1407
1096
  },
1408
1097
  {
1409
- "name": "listener",
1098
+ "name": "description",
1099
+ "optional": true,
1410
1100
  "type": {
1411
- "text": "GridEventListener"
1101
+ "text": "string"
1412
1102
  }
1413
1103
  }
1414
1104
  ]
1415
1105
  },
1416
1106
  {
1417
1107
  "kind": "method",
1418
- "name": "removeListener",
1419
- "privacy": "private",
1108
+ "name": "loadWorkspace",
1420
1109
  "return": {
1421
1110
  "type": {
1422
- "text": "void"
1111
+ "text": "Promise<SavedWorkspace | null>"
1423
1112
  }
1424
1113
  },
1425
1114
  "parameters": [
1426
1115
  {
1427
- "name": "registration",
1428
- "type": {
1429
- "text": "GridRegistration"
1430
- }
1431
- },
1432
- {
1433
- "name": "type",
1116
+ "name": "workspaceName",
1434
1117
  "type": {
1435
1118
  "text": "string"
1436
1119
  }
1437
- },
1438
- {
1439
- "name": "listener",
1440
- "type": {
1441
- "text": "GridEventListener"
1442
- }
1443
1120
  }
1444
1121
  ]
1445
1122
  },
1446
1123
  {
1447
1124
  "kind": "method",
1448
- "name": "storeSnapshot",
1125
+ "name": "getWorkspace",
1449
1126
  "privacy": "private",
1450
1127
  "return": {
1451
1128
  "type": {
1452
- "text": "void"
1129
+ "text": "Promise<SavedWorkspace | null>"
1453
1130
  }
1454
1131
  },
1455
1132
  "parameters": [
1456
1133
  {
1457
- "name": "registration",
1134
+ "name": "workspaceName",
1458
1135
  "type": {
1459
- "text": "GridRegistration"
1136
+ "text": "string"
1460
1137
  }
1461
1138
  }
1462
- ],
1463
- "description": "Stores a grid's live state over its stored entry, except what the grid can't report yet:\n- nothing, once its API is destroyed (grid-pro destroys the outgoing grid before the new one\n re-registers, and a destroyed v36 API returns `undefined` rather than throwing);\n- the stored column state and filter model while the grid has no columns: before datasource\n columns exist, and after a datasource restart clears them (AG Grid then drops every filter,\n before grid-pro rebuilds the grid). With nothing stored, the filter model is left out, so the\n next registration leaves grid-pro to restore its own persisted filters;\n- the stored filter model until the first data renders or the user filters, since before that\n the grid may not have applied it yet (its columns or grid-pro's restore still pending)."
1139
+ ]
1464
1140
  },
1465
1141
  {
1466
1142
  "kind": "method",
1467
- "name": "detach",
1468
- "privacy": "private",
1143
+ "name": "getCurrentWorkspace",
1144
+ "return": {
1145
+ "type": {
1146
+ "text": "SavedWorkspace | null"
1147
+ }
1148
+ }
1149
+ },
1150
+ {
1151
+ "kind": "method",
1152
+ "name": "setCurrentWorkspace",
1469
1153
  "return": {
1470
1154
  "type": {
1471
1155
  "text": "void"
@@ -1473,78 +1157,72 @@
1473
1157
  },
1474
1158
  "parameters": [
1475
1159
  {
1476
- "name": "registration",
1160
+ "name": "workspace",
1477
1161
  "type": {
1478
- "text": "GridRegistration"
1162
+ "text": "SavedWorkspace | null"
1479
1163
  }
1480
1164
  }
1481
- ],
1482
- "description": "Removes a registration's grid listeners and stops its filter guard."
1165
+ ]
1483
1166
  },
1484
1167
  {
1485
1168
  "kind": "method",
1486
- "name": "hasSettings",
1487
- "privacy": "private",
1169
+ "name": "getSavedWorkspaces",
1488
1170
  "return": {
1489
1171
  "type": {
1490
- "text": "boolean"
1172
+ "text": "Promise<SavedWorkspace[]>"
1173
+ }
1174
+ }
1175
+ },
1176
+ {
1177
+ "kind": "method",
1178
+ "name": "deleteWorkspace",
1179
+ "return": {
1180
+ "type": {
1181
+ "text": "Promise<void>"
1491
1182
  }
1492
1183
  },
1493
1184
  "parameters": [
1494
1185
  {
1495
- "name": "grid",
1496
- "type": {
1497
- "text": "GridRegistration"
1498
- }
1499
- },
1500
- {
1501
- "name": "settings",
1186
+ "name": "workspaceName",
1502
1187
  "type": {
1503
- "text": "SavedGridSettings"
1188
+ "text": "string"
1504
1189
  }
1505
1190
  }
1506
- ],
1507
- "description": "Whether the grid already has exactly these settings, so re-applying them is a no-op."
1191
+ ]
1508
1192
  },
1509
1193
  {
1510
1194
  "kind": "method",
1511
- "name": "readFilterModel",
1195
+ "name": "updateWorkspacesList",
1512
1196
  "privacy": "private",
1513
1197
  "return": {
1514
1198
  "type": {
1515
- "text": "string"
1199
+ "text": "Promise<void>"
1516
1200
  }
1517
1201
  },
1518
1202
  "parameters": [
1519
1203
  {
1520
- "name": "grid",
1204
+ "name": "workspaceName",
1521
1205
  "type": {
1522
- "text": "GridRegistration"
1206
+ "text": "string"
1523
1207
  }
1524
1208
  }
1525
1209
  ]
1526
1210
  },
1527
1211
  {
1528
1212
  "kind": "method",
1529
- "name": "getGridSettings",
1213
+ "name": "removeFromWorkspacesList",
1530
1214
  "privacy": "private",
1531
1215
  "return": {
1532
1216
  "type": {
1533
- "text": "SavedGridSettings | null"
1217
+ "text": "Promise<void>"
1534
1218
  }
1535
1219
  },
1536
1220
  "parameters": [
1537
1221
  {
1538
- "name": "gridKey",
1222
+ "name": "workspaceName",
1539
1223
  "type": {
1540
1224
  "text": "string"
1541
1225
  }
1542
- },
1543
- {
1544
- "name": "grid",
1545
- "type": {
1546
- "text": "GridRegistration"
1547
- }
1548
1226
  }
1549
1227
  ]
1550
1228
  }
@@ -1552,137 +1230,359 @@
1552
1230
  },
1553
1231
  {
1554
1232
  "kind": "variable",
1555
- "name": "GridRegistry",
1556
- "description": "DI token for grid registry."
1233
+ "name": "WorkspaceState",
1234
+ "description": "DI token for workspace state."
1557
1235
  }
1558
1236
  ],
1559
1237
  "exports": [
1560
1238
  {
1561
1239
  "kind": "js",
1562
- "name": "DefaultGridRegistry",
1240
+ "name": "DefaultWorkspaceState",
1563
1241
  "declaration": {
1564
- "name": "DefaultGridRegistry",
1565
- "module": "src/workspace/grid-registry.ts"
1242
+ "name": "DefaultWorkspaceState",
1243
+ "module": "src/workspace/workspace-state.ts"
1566
1244
  }
1567
1245
  },
1568
1246
  {
1569
1247
  "kind": "js",
1570
- "name": "GridRegistry",
1248
+ "name": "WorkspaceState",
1249
+ "declaration": {
1250
+ "name": "WorkspaceState",
1251
+ "module": "src/workspace/workspace-state.ts"
1252
+ }
1253
+ }
1254
+ ]
1255
+ },
1256
+ {
1257
+ "kind": "javascript-module",
1258
+ "path": "src/workspace/workspace-state.types.ts",
1259
+ "declarations": [],
1260
+ "exports": []
1261
+ },
1262
+ {
1263
+ "kind": "javascript-module",
1264
+ "path": "src/workspace/workspace.types.ts",
1265
+ "declarations": [],
1266
+ "exports": []
1267
+ },
1268
+ {
1269
+ "kind": "javascript-module",
1270
+ "path": "src/workspace-manager/index.ts",
1271
+ "declarations": [],
1272
+ "exports": [
1273
+ {
1274
+ "kind": "js",
1275
+ "name": "*",
1276
+ "declaration": {
1277
+ "name": "*",
1278
+ "package": "./workspace-manager"
1279
+ }
1280
+ }
1281
+ ]
1282
+ },
1283
+ {
1284
+ "kind": "javascript-module",
1285
+ "path": "src/workspace-manager/workspace-manager.styles.ts",
1286
+ "declarations": [
1287
+ {
1288
+ "kind": "variable",
1289
+ "name": "WorkspaceManagerStyles",
1290
+ "default": "css`\n .workspace-manager {\n display: flex;\n gap: 10px;\n align-items: center;\n }\n\n .dialog-content {\n padding: 16px;\n min-width: 400px;\n max-width: 400px;\n display: flex;\n flex-direction: column;\n max-height: 90vh;\n overflow: hidden;\n }\n\n .button-group {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n }\n\n .workspace-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n max-height: 400px;\n overflow-y: auto;\n margin: 10px 0;\n align-items: unset;\n }\n\n rapid-label {\n margin-bottom: 10px;\n display: block;\n }\n\n .empty-state {\n padding: 24px;\n text-align: center;\n color: var(--neutral-foreground-hint);\n }\n\n .save-mode-selector {\n margin-bottom: 16px;\n }\n\n .warning-message {\n margin: 12px 0;\n padding: 12px;\n border: 1px solid var(--warning-color);\n border-radius: 4px;\n font-size: 14px;\n }\n\n .workspace-item {\n padding: 12px;\n border: 1px solid var(--neutral-stroke-rest);\n border-radius: 4px;\n background: var(--neutral-fill-rest);\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 5px;\n }\n\n .workspace-item:hover {\n background: var(--neutral-fill-hover);\n }\n\n .workspace-item::part(control) {\n margin-top: 2px;\n }\n\n .workspace-info {\n flex: 1;\n margin-left: 8px;\n }\n\n .workspace-name {\n font-weight: 600;\n margin-bottom: 4px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .workspace-date {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n }\n\n .workspace-description {\n font-size: 12px;\n color: var(--neutral-foreground-hint);\n margin-top: 4px;\n white-space: pre-wrap;\n word-break: break-word;\n line-height: 1.4;\n }\n\n .loading-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n }\n\n .save-field {\n margin-bottom: 20px;\n }\n`"
1291
+ }
1292
+ ],
1293
+ "exports": [
1294
+ {
1295
+ "kind": "js",
1296
+ "name": "WorkspaceManagerStyles",
1571
1297
  "declaration": {
1572
- "name": "GridRegistry",
1573
- "module": "src/workspace/grid-registry.ts"
1298
+ "name": "WorkspaceManagerStyles",
1299
+ "module": "src/workspace-manager/workspace-manager.styles.ts"
1574
1300
  }
1575
1301
  }
1576
1302
  ]
1577
1303
  },
1578
1304
  {
1579
1305
  "kind": "javascript-module",
1580
- "path": "src/workspace/index.ts",
1581
- "declarations": [],
1582
- "exports": [
1306
+ "path": "src/workspace-manager/workspace-manager.template.ts",
1307
+ "declarations": [
1583
1308
  {
1584
- "kind": "js",
1585
- "name": "*",
1586
- "declaration": {
1587
- "name": "*",
1588
- "package": "./workspace.types"
1589
- }
1309
+ "kind": "variable",
1310
+ "name": "WORKSPACE_DESCRIPTION_MAX",
1311
+ "type": {
1312
+ "text": "number"
1313
+ },
1314
+ "default": "200"
1590
1315
  },
1591
1316
  {
1592
- "kind": "js",
1593
- "name": "*",
1594
- "declaration": {
1595
- "name": "*",
1596
- "package": "./workspace-state.types"
1597
- }
1317
+ "kind": "variable",
1318
+ "name": "workspaceHeaderPartial",
1319
+ "type": {
1320
+ "text": "ViewTemplate<WorkspaceManager>"
1321
+ },
1322
+ "default": "html`\n <div class=\"workspace-manager\">\n <rapid-button @click=${(x) => x.openSaveDialog()}>\n <rapid-icon name=\"download\"></rapid-icon>\n Save Workspace\n </rapid-button>\n <rapid-button @click=${(x) => x.openLoadDialog()}>\n <rapid-icon name=\"upload\"></rapid-icon>\n Load Workspace\n </rapid-button>\n </div>\n`"
1598
1323
  },
1599
1324
  {
1600
- "kind": "js",
1601
- "name": "*",
1602
- "declaration": {
1603
- "name": "*",
1604
- "package": "./workspace-state"
1605
- }
1325
+ "kind": "variable",
1326
+ "name": "workspaceSaveModalPartial",
1327
+ "type": {
1328
+ "text": "ViewTemplate<WorkspaceManager>"
1329
+ },
1330
+ "default": "html`\n <rapid-modal ${ref('saveModal')}>\n <h2 slot=\"top\">Save Workspace</h2>\n <div class=\"dialog-content\">\n <div class=\"save-mode-selector\">\n <rapid-segmented-control value=\"${sync((x) => x.saveMode)}\">\n <rapid-segmented-item value=\"create\">Create</rapid-segmented-item>\n <rapid-segmented-item value=\"overwrite\">Overwrite</rapid-segmented-item>\n ${when(\n () => false,\n html<WorkspaceManager>`\n <rapid-segmented-item value=\"shared\">Share</rapid-segmented-item>\n `,\n )}\n </rapid-segmented-control>\n </div>\n ${when(\n (x) => x.saveMode === 'create',\n html<WorkspaceManager>`\n <rapid-label>Workspace Name:</rapid-label>\n <rapid-text-field\n class=\"save-field\"\n :value=${(x) => x.workspaceName}\n @input=${(x, c) => (x.workspaceName = (c.event.target as HTMLInputElement).value)}\n placeholder=\"Enter workspace name\"\n ></rapid-text-field>\n <rapid-label>\n Description (optional, max ${WORKSPACE_DESCRIPTION_MAX} characters):\n </rapid-label>\n <rapid-text-area\n class=\"save-field workspace-description-input\"\n maxlength=\"${WORKSPACE_DESCRIPTION_MAX}\"\n :value=${(x) => x.workspaceDescription}\n @input=${(x, c) =>\n x.updateWorkspaceDescription((c.event.target as HTMLTextAreaElement).value)}\n placeholder=\"Add a description for this workspace\"\n rows=\"3\"\n ></rapid-text-area>\n ${when(\n (x) => x.workspaceName && x.isWorkspaceExisting(x.workspaceName),\n html`\n <div class=\"warning-message\">\n <rapid-icon name=\"triangle-exclamation\"></rapid-icon>\n A workspace with this name already exists. Use \"Overwrite Existing Workspace\" to\n replace it.\n </div>\n `,\n )}\n `,\n )}\n ${when(\n (x) => x.saveMode === 'overwrite',\n html<WorkspaceManager>`\n ${when(\n (x) => x.savedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No saved workspaces to overwrite</div>\n `,\n )}\n <rapid-label>Select Workspace to Overwrite:</rapid-label>\n <rapid-radio-group\n class=\"workspace-list\"\n value=${sync((x) => x.selectedWorkspaceToOverwrite)}\n orientation=\"vertical\"\n >\n ${repeat(\n (x) => x.savedWorkspaces,\n html<SavedWorkspace>`\n <rapid-radio value=${(x) => x.name} class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(x) => x.name}</div>\n <div class=\"workspace-date\">\n Saved: ${(x) => new Date(x.savedAt).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SavedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n </rapid-radio>\n `,\n )}\n </rapid-radio-group>\n <rapid-label>Description (optional):</rapid-label>\n <rapid-text-area\n class=\"save-field\"\n :value=${(x) => x.workspaceDescription}\n maxlength=\"${WORKSPACE_DESCRIPTION_MAX}\"\n @input=${(x, c) =>\n x.updateWorkspaceDescription((c.event.target as HTMLTextAreaElement).value)}\n placeholder=\"Add a description for this workspace\"\n rows=\"3\"\n ></rapid-text-area>\n <div class=\"warning-message\">\n <rapid-icon name=\"triangle-exclamation\"></rapid-icon>\n This will permanently replace the selected workspace. This action cannot be undone.\n </div>\n `,\n )}\n ${when(\n () => false,\n html<WorkspaceManager>`\n <h3>Share existing workspace:</h3>\n ${whenElse(\n (x) => x.savedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No saved workspaces to share</div>\n `,\n html<WorkspaceManager>`\n <div class=\"workspace-list\">\n ${repeat(\n (x) => x.savedWorkspaces,\n html<SavedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Saved: ${(w) => new Date(w.savedAt).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SavedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.shareExistingWorkspace(w.name)}\n >\n Share\n </rapid-button>\n </div>\n </div>\n `,\n )}\n </div>\n `,\n )}\n <h3>My Shared Workspaces</h3>\n ${whenElse(\n (x) =>\n x.sharedWorkspaces.filter((w) => w.userName === x.auth?.loggedUserResult?.username)\n .length === 0,\n html`\n <div class=\"empty-state\">You have not shared any workspaces</div>\n `,\n html<WorkspaceManager>`\n <div class=\"workspace-list\">\n ${repeat(\n (x) =>\n x.sharedWorkspaces.filter(\n (w) => w.userName === x.auth?.loggedUserResult?.username,\n ),\n html<SharedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Shared on\n ${(w) => new Date((w.modifiedOn || w.createdOn) as any).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SharedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.modifySharedWorkspace(w)}\n >\n Save\n </rapid-button>\n <rapid-button\n appearance=\"danger\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.confirmDeleteSharedWorkspace(w)}\n >\n Delete\n </rapid-button>\n </div>\n </div>\n `,\n )}\n </div>\n `,\n )}\n `,\n )}\n <div class=\"button-group\">\n <rapid-button\n @click=${(x) => x.saveWorkspace()}\n appearance=\"primary\"\n ?disabled=${(x) =>\n (x.saveMode === 'create' && !x.workspaceName.trim()) ||\n (x.saveMode === 'overwrite' && !x.selectedWorkspaceToOverwrite) ||\n x.saveMode === 'shared' ||\n (x.workspaceName && x.isWorkspaceExisting(x.workspaceName))}\n >\n ${(x) =>\n x.saveMode === 'create' ? 'Create' : x.saveMode === 'overwrite' ? 'Overwrite' : 'Save'}\n </rapid-button>\n <rapid-button appearance=\"outline\" @click=${(x) => x.closeSaveDialog()}>\n Cancel\n </rapid-button>\n </div>\n <div class=\"workspace-dialog-boundary\" ${ref('sharedWorkspaceDialogBoundary')}></div>\n </div>\n </rapid-modal>\n`"
1331
+ },
1332
+ {
1333
+ "kind": "variable",
1334
+ "name": "workspaceLoadModalPartial",
1335
+ "type": {
1336
+ "text": "ViewTemplate<WorkspaceManager>"
1337
+ },
1338
+ "default": "html`\n <rapid-modal ${ref('loadModal')}>\n <h2 slot=\"top\">Load Workspace</h2>\n <div class=\"dialog-content\">\n ${when(\n (x) => x.applyingWorkspace || x.isLoading,\n html`\n <div class=\"loading-container\">\n <div>Loading...</div>\n </div>\n `,\n )}\n ${when(\n (x) => !x.applyingWorkspace,\n html<WorkspaceManager>`\n ${when(\n () => false,\n html<WorkspaceManager>`\n <rapid-segmented-control value=\"${sync((x) => x.loadMode)}\">\n <rapid-segmented-item value=\"MY\">My Workspaces</rapid-segmented-item>\n\n <rapid-segmented-item value=\"SHARED\">Shared Workspaces</rapid-segmented-item>\n </rapid-segmented-control>\n `,\n )}\n ${when(\n (x) => x.loadMode === 'MY',\n html`\n <div class=\"workspace-list\">\n ${repeat(\n (x) => x.savedWorkspaces,\n html<SavedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Saved: ${(w) => new Date(w.savedAt).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SavedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.loadWorkspace(w.name)}\n >\n Load\n </rapid-button>\n <rapid-button\n appearance=\"danger\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.confirmDeleteWorkspace(w.name)}\n >\n Delete\n </rapid-button>\n </div>\n </div>\n `,\n )}\n ${when(\n (x) => x.savedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No saved workspaces found</div>\n `,\n )}\n </div>\n `,\n )}\n ${when(\n () => false,\n html`\n <div class=\"workspace-section\">\n <div class=\"workspace-list\">\n ${repeat(\n (x) => x.sharedWorkspaces,\n html<SharedWorkspace>`\n <div class=\"workspace-item\">\n <div class=\"workspace-info\">\n <div class=\"workspace-name\">${(w) => w.name}</div>\n <div class=\"workspace-date\">\n Shared by ${(w) => w.userName} ·\n ${(w) =>\n new Date((w.modifiedOn || w.createdOn) as any).toLocaleString()}\n </div>\n ${when(\n (w) => w.description,\n html<SharedWorkspace>`\n <div class=\"workspace-description\">${(w) => w.description}</div>\n `,\n )}\n </div>\n <div class=\"button-group\">\n <rapid-button\n appearance=\"primary\"\n @click=${(w, c: ExecutionContext<WorkspaceManager>) =>\n c.parent.loadSharedWorkspace(w)}\n >\n Load\n </rapid-button>\n </div>\n </div>\n `,\n )}\n </div>\n ${when(\n (x) => x.sharedWorkspaces.length === 0,\n html`\n <div class=\"empty-state\">No shared workspaces available</div>\n `,\n )}\n </div>\n `,\n )}\n `,\n )}\n <div class=\"button-group\">\n <rapid-button appearance=\"outline\" @click=${(x) => x.closeLoadDialog()}>Close</rapid-button>\n </div>\n </div>\n <div class=\"workspace-dialog-boundary\" ${ref('dialogBoundary')}></div>\n </rapid-modal>\n`"
1606
1339
  },
1340
+ {
1341
+ "kind": "variable",
1342
+ "name": "WorkspaceManagerTemplate",
1343
+ "default": "html<WorkspaceManager>`\n ${workspaceHeaderPartial} ${workspaceSaveModalPartial} ${workspaceLoadModalPartial}\n`"
1344
+ }
1345
+ ],
1346
+ "exports": [
1607
1347
  {
1608
1348
  "kind": "js",
1609
- "name": "*",
1349
+ "name": "WORKSPACE_DESCRIPTION_MAX",
1610
1350
  "declaration": {
1611
- "name": "*",
1612
- "package": "./layout-registry"
1351
+ "name": "WORKSPACE_DESCRIPTION_MAX",
1352
+ "module": "src/workspace-manager/workspace-manager.template.ts"
1613
1353
  }
1614
1354
  },
1615
1355
  {
1616
1356
  "kind": "js",
1617
- "name": "*",
1357
+ "name": "workspaceHeaderPartial",
1618
1358
  "declaration": {
1619
- "name": "*",
1620
- "package": "./grid-registry"
1359
+ "name": "workspaceHeaderPartial",
1360
+ "module": "src/workspace-manager/workspace-manager.template.ts"
1621
1361
  }
1622
1362
  },
1623
1363
  {
1624
1364
  "kind": "js",
1625
- "name": "*",
1365
+ "name": "workspaceSaveModalPartial",
1626
1366
  "declaration": {
1627
- "name": "*",
1628
- "package": "./filter-registry"
1367
+ "name": "workspaceSaveModalPartial",
1368
+ "module": "src/workspace-manager/workspace-manager.template.ts"
1629
1369
  }
1630
1370
  },
1631
1371
  {
1632
1372
  "kind": "js",
1633
- "name": "*",
1373
+ "name": "workspaceLoadModalPartial",
1634
1374
  "declaration": {
1635
- "name": "*",
1636
- "package": "./grid-register"
1375
+ "name": "workspaceLoadModalPartial",
1376
+ "module": "src/workspace-manager/workspace-manager.template.ts"
1637
1377
  }
1638
1378
  },
1639
1379
  {
1640
1380
  "kind": "js",
1641
- "name": "*",
1381
+ "name": "WorkspaceManagerTemplate",
1642
1382
  "declaration": {
1643
- "name": "*",
1644
- "package": "./layout-wrapper"
1383
+ "name": "WorkspaceManagerTemplate",
1384
+ "module": "src/workspace-manager/workspace-manager.template.ts"
1645
1385
  }
1646
1386
  }
1647
1387
  ]
1648
1388
  },
1649
1389
  {
1650
1390
  "kind": "javascript-module",
1651
- "path": "src/workspace/layout-registry.ts",
1391
+ "path": "src/workspace-manager/workspace-manager.ts",
1652
1392
  "declarations": [
1653
1393
  {
1654
1394
  "kind": "class",
1655
- "description": "Default layout registry implementation.",
1656
- "name": "DefaultLayoutRegistry",
1395
+ "description": "Workspace persistence UI (save/load + share/delete shared workspaces).",
1396
+ "name": "WorkspaceManager",
1657
1397
  "members": [
1658
1398
  {
1659
1399
  "kind": "field",
1660
- "name": "layouts",
1400
+ "name": "workspaceName",
1661
1401
  "type": {
1662
- "text": "Map<string, WorkspaceLayout>"
1402
+ "text": "string"
1663
1403
  },
1664
- "privacy": "private",
1665
- "default": "new Map()"
1404
+ "default": "''"
1666
1405
  },
1667
1406
  {
1668
1407
  "kind": "field",
1669
- "name": "stored",
1408
+ "name": "workspaceDescription",
1670
1409
  "type": {
1671
- "text": "Map<string, SerialisedLayout>"
1410
+ "text": "string"
1411
+ },
1412
+ "default": "''"
1413
+ },
1414
+ {
1415
+ "kind": "field",
1416
+ "name": "savedWorkspaces",
1417
+ "type": {
1418
+ "text": "SavedWorkspace[]"
1419
+ },
1420
+ "default": "[]"
1421
+ },
1422
+ {
1423
+ "kind": "field",
1424
+ "name": "sharedWorkspaces",
1425
+ "type": {
1426
+ "text": "SharedWorkspace[]"
1427
+ },
1428
+ "default": "[]"
1429
+ },
1430
+ {
1431
+ "kind": "field",
1432
+ "name": "isLoading",
1433
+ "type": {
1434
+ "text": "boolean"
1435
+ },
1436
+ "default": "false"
1437
+ },
1438
+ {
1439
+ "kind": "field",
1440
+ "name": "applyingWorkspace",
1441
+ "type": {
1442
+ "text": "boolean"
1443
+ },
1444
+ "default": "false"
1445
+ },
1446
+ {
1447
+ "kind": "field",
1448
+ "name": "loadMode",
1449
+ "type": {
1450
+ "text": "LoadMode"
1451
+ },
1452
+ "default": "'MY'"
1453
+ },
1454
+ {
1455
+ "kind": "field",
1456
+ "name": "saveModal",
1457
+ "type": {
1458
+ "text": "Modal"
1459
+ }
1460
+ },
1461
+ {
1462
+ "kind": "field",
1463
+ "name": "loadModal",
1464
+ "type": {
1465
+ "text": "Modal"
1466
+ }
1467
+ },
1468
+ {
1469
+ "kind": "field",
1470
+ "name": "saveMode",
1471
+ "type": {
1472
+ "text": "'create' | 'overwrite' | 'shared'"
1473
+ },
1474
+ "default": "'create'"
1475
+ },
1476
+ {
1477
+ "kind": "field",
1478
+ "name": "selectedWorkspaceToOverwrite",
1479
+ "type": {
1480
+ "text": "string"
1481
+ },
1482
+ "default": "''"
1483
+ },
1484
+ {
1485
+ "kind": "field",
1486
+ "name": "workspaceToShare",
1487
+ "type": {
1488
+ "text": "string"
1489
+ },
1490
+ "default": "''"
1491
+ },
1492
+ {
1493
+ "kind": "field",
1494
+ "name": "dialogBoundary",
1495
+ "type": {
1496
+ "text": "HTMLElement"
1497
+ }
1498
+ },
1499
+ {
1500
+ "kind": "field",
1501
+ "name": "sharedWorkspaceDialogBoundary",
1502
+ "type": {
1503
+ "text": "HTMLElement"
1504
+ }
1505
+ },
1506
+ {
1507
+ "kind": "field",
1508
+ "name": "layoutRegistry",
1509
+ "type": {
1510
+ "text": "LayoutRegistry"
1511
+ }
1512
+ },
1513
+ {
1514
+ "kind": "field",
1515
+ "name": "gridRegistry",
1516
+ "type": {
1517
+ "text": "GridRegistry"
1518
+ }
1519
+ },
1520
+ {
1521
+ "kind": "field",
1522
+ "name": "filterRegistry",
1523
+ "type": {
1524
+ "text": "FilterRegistry"
1525
+ }
1526
+ },
1527
+ {
1528
+ "kind": "field",
1529
+ "name": "workspaceState",
1530
+ "type": {
1531
+ "text": "WorkspaceState"
1532
+ }
1533
+ },
1534
+ {
1535
+ "kind": "field",
1536
+ "name": "connect",
1537
+ "type": {
1538
+ "text": "Connect"
1539
+ }
1540
+ },
1541
+ {
1542
+ "kind": "field",
1543
+ "name": "auth",
1544
+ "type": {
1545
+ "text": "Auth"
1546
+ }
1547
+ },
1548
+ {
1549
+ "kind": "field",
1550
+ "name": "canShareWorkspace",
1551
+ "type": {
1552
+ "text": "boolean"
1553
+ }
1554
+ },
1555
+ {
1556
+ "kind": "field",
1557
+ "name": "sharedWorkspacesEnabled",
1558
+ "type": {
1559
+ "text": "boolean"
1672
1560
  },
1673
1561
  "privacy": "private",
1674
- "default": "new Map()"
1562
+ "readonly": true,
1563
+ "default": "false"
1675
1564
  },
1676
1565
  {
1677
- "kind": "field",
1678
- "name": "waiting",
1566
+ "kind": "method",
1567
+ "name": "sanitizeDescription",
1679
1568
  "privacy": "private",
1680
- "default": "new WeakSet<WorkspaceLayout>()",
1681
- "description": "Layouts with a stored-config load queued for their first load."
1569
+ "return": {
1570
+ "type": {
1571
+ "text": "string"
1572
+ }
1573
+ },
1574
+ "parameters": [
1575
+ {
1576
+ "name": "input",
1577
+ "type": {
1578
+ "text": "string"
1579
+ }
1580
+ }
1581
+ ]
1682
1582
  },
1683
1583
  {
1684
1584
  "kind": "method",
1685
- "name": "registerLayout",
1585
+ "name": "updateWorkspaceDescription",
1686
1586
  "return": {
1687
1587
  "type": {
1688
1588
  "text": "void"
@@ -1690,30 +1590,96 @@
1690
1590
  },
1691
1591
  "parameters": [
1692
1592
  {
1693
- "name": "layoutKey",
1593
+ "name": "raw",
1694
1594
  "type": {
1695
1595
  "text": "string"
1696
1596
  }
1697
- },
1597
+ }
1598
+ ]
1599
+ },
1600
+ {
1601
+ "kind": "method",
1602
+ "name": "setDescriptionFromSelectedWorkspace",
1603
+ "privacy": "private",
1604
+ "return": {
1605
+ "type": {
1606
+ "text": "void"
1607
+ }
1608
+ }
1609
+ },
1610
+ {
1611
+ "kind": "method",
1612
+ "name": "refreshSavedWorkspaces",
1613
+ "return": {
1614
+ "type": {
1615
+ "text": "Promise<void>"
1616
+ }
1617
+ }
1618
+ },
1619
+ {
1620
+ "kind": "method",
1621
+ "name": "refreshSharedWorkspaces",
1622
+ "return": {
1623
+ "type": {
1624
+ "text": "Promise<void>"
1625
+ }
1626
+ }
1627
+ },
1628
+ {
1629
+ "kind": "method",
1630
+ "name": "notifyError",
1631
+ "privacy": "private",
1632
+ "return": {
1633
+ "type": {
1634
+ "text": "void"
1635
+ }
1636
+ },
1637
+ "parameters": [
1698
1638
  {
1699
- "name": "layout",
1639
+ "name": "body",
1640
+ "default": "'Error'"
1641
+ }
1642
+ ]
1643
+ },
1644
+ {
1645
+ "kind": "method",
1646
+ "name": "saveWorkspace",
1647
+ "return": {
1648
+ "type": {
1649
+ "text": "Promise<void>"
1650
+ }
1651
+ }
1652
+ },
1653
+ {
1654
+ "kind": "method",
1655
+ "name": "applyWorkspace",
1656
+ "privacy": "private",
1657
+ "return": {
1658
+ "type": {
1659
+ "text": "Promise<void>"
1660
+ }
1661
+ },
1662
+ "parameters": [
1663
+ {
1664
+ "name": "workspace",
1700
1665
  "type": {
1701
- "text": "WorkspaceLayout"
1666
+ "text": "SavedWorkspace"
1702
1667
  }
1703
1668
  }
1704
- ]
1669
+ ],
1670
+ "description": "Seeds every registry's store with the workspace's entries (replacing whatever was stored,\neven when a list is empty) and applies them to what's mounted; unmounted grids, layouts and\nfilters pick theirs up when they register. Grids and filters are seeded before layouts:\nloading a layout rebuilds its panes, and the grids/filters inside re-register straight away."
1705
1671
  },
1706
1672
  {
1707
1673
  "kind": "method",
1708
- "name": "unregisterLayout",
1674
+ "name": "loadWorkspace",
1709
1675
  "return": {
1710
1676
  "type": {
1711
- "text": "void"
1677
+ "text": "Promise<void>"
1712
1678
  }
1713
1679
  },
1714
1680
  "parameters": [
1715
1681
  {
1716
- "name": "layoutKey",
1682
+ "name": "workspaceName",
1717
1683
  "type": {
1718
1684
  "text": "string"
1719
1685
  }
@@ -1722,16 +1688,25 @@
1722
1688
  },
1723
1689
  {
1724
1690
  "kind": "method",
1725
- "name": "getLayoutsConfigs",
1691
+ "name": "requestSharedWorkspace",
1692
+ "privacy": "private",
1726
1693
  "return": {
1727
1694
  "type": {
1728
- "text": "SavedLayout[]"
1695
+ "text": "Promise<any[]>"
1729
1696
  }
1730
- }
1697
+ },
1698
+ "parameters": [
1699
+ {
1700
+ "name": "SHARED_WORKSPACE_ID",
1701
+ "type": {
1702
+ "text": "string"
1703
+ }
1704
+ }
1705
+ ]
1731
1706
  },
1732
1707
  {
1733
1708
  "kind": "method",
1734
- "name": "applySavedLayouts",
1709
+ "name": "loadSharedWorkspace",
1735
1710
  "return": {
1736
1711
  "type": {
1737
1712
  "text": "Promise<void>"
@@ -1739,35 +1714,33 @@
1739
1714
  },
1740
1715
  "parameters": [
1741
1716
  {
1742
- "name": "savedLayouts",
1717
+ "name": "shared",
1743
1718
  "type": {
1744
- "text": "SavedLayout[]"
1719
+ "text": "{\n id: string;\n name: string;\n userName: string;\n createdOn?: string | number;\n modifiedOn?: string | number;\n data: string;\n }"
1745
1720
  }
1746
1721
  }
1747
1722
  ]
1748
1723
  },
1749
1724
  {
1750
1725
  "kind": "method",
1751
- "name": "readLayout",
1752
- "privacy": "private",
1726
+ "name": "deleteWorkspace",
1753
1727
  "return": {
1754
1728
  "type": {
1755
- "text": "SerialisedLayout | null"
1729
+ "text": "Promise<void>"
1756
1730
  }
1757
1731
  },
1758
1732
  "parameters": [
1759
1733
  {
1760
- "name": "layout",
1734
+ "name": "workspaceName",
1761
1735
  "type": {
1762
- "text": "WorkspaceLayout"
1736
+ "text": "string"
1763
1737
  }
1764
1738
  }
1765
- ],
1766
- "description": "A layout's config is only meaningful once it has finished its first load; before that it has\nno panes yet, and storing that would wipe the saved config."
1739
+ ]
1767
1740
  },
1768
1741
  {
1769
1742
  "kind": "method",
1770
- "name": "loadStored",
1743
+ "name": "showDeleteConfirmation",
1771
1744
  "privacy": "private",
1772
1745
  "return": {
1773
1746
  "type": {
@@ -1776,102 +1749,105 @@
1776
1749
  },
1777
1750
  "parameters": [
1778
1751
  {
1779
- "name": "layoutKey",
1752
+ "name": "title",
1780
1753
  "type": {
1781
1754
  "text": "string"
1782
1755
  }
1783
1756
  },
1784
1757
  {
1785
- "name": "layout",
1758
+ "name": "body",
1786
1759
  "type": {
1787
- "text": "WorkspaceLayout"
1760
+ "text": "string"
1761
+ }
1762
+ },
1763
+ {
1764
+ "name": "actionFunction",
1765
+ "type": {
1766
+ "text": "() => void"
1767
+ }
1768
+ },
1769
+ {
1770
+ "name": "dialogBoundary",
1771
+ "type": {
1772
+ "text": "HTMLElement"
1788
1773
  }
1789
1774
  }
1790
- ],
1791
- "description": "Loads a layout's stored config once it has finished its first load. The config is read at load\ntime, so a workspace loaded while waiting wins, and a layout waiting already isn't queued twice;\nnothing loads into a layout that has since unregistered or been replaced under its key."
1792
- }
1793
- ]
1794
- },
1795
- {
1796
- "kind": "variable",
1797
- "name": "LayoutRegistry",
1798
- "description": "DI token for layout registry."
1799
- }
1800
- ],
1801
- "exports": [
1802
- {
1803
- "kind": "js",
1804
- "name": "DefaultLayoutRegistry",
1805
- "declaration": {
1806
- "name": "DefaultLayoutRegistry",
1807
- "module": "src/workspace/layout-registry.ts"
1808
- }
1809
- },
1810
- {
1811
- "kind": "js",
1812
- "name": "LayoutRegistry",
1813
- "declaration": {
1814
- "name": "LayoutRegistry",
1815
- "module": "src/workspace/layout-registry.ts"
1816
- }
1817
- }
1818
- ]
1819
- },
1820
- {
1821
- "kind": "javascript-module",
1822
- "path": "src/workspace/workspace-state.ts",
1823
- "declarations": [
1824
- {
1825
- "kind": "class",
1826
- "description": "Default workspace persistence implementation backed by KVStorage.",
1827
- "name": "DefaultWorkspaceState",
1828
- "members": [
1775
+ ]
1776
+ },
1829
1777
  {
1830
- "kind": "field",
1831
- "name": "STORAGE_PREFIX",
1832
- "type": {
1833
- "text": "string"
1778
+ "kind": "method",
1779
+ "name": "confirmDeleteWorkspace",
1780
+ "return": {
1781
+ "type": {
1782
+ "text": "void"
1783
+ }
1834
1784
  },
1835
- "privacy": "private",
1836
- "readonly": true,
1837
- "default": "'workspace_'"
1785
+ "parameters": [
1786
+ {
1787
+ "name": "workspaceName",
1788
+ "type": {
1789
+ "text": "string"
1790
+ }
1791
+ }
1792
+ ]
1838
1793
  },
1839
1794
  {
1840
- "kind": "field",
1841
- "name": "WORKSPACES_LIST_KEY",
1842
- "type": {
1843
- "text": "string"
1795
+ "kind": "method",
1796
+ "name": "modifySharedWorkspace",
1797
+ "return": {
1798
+ "type": {
1799
+ "text": "Promise<void>"
1800
+ }
1844
1801
  },
1845
- "privacy": "private",
1846
- "readonly": true,
1847
- "default": "'workspaces_list'"
1802
+ "parameters": [
1803
+ {
1804
+ "name": "sharedWorkspace",
1805
+ "type": {
1806
+ "text": "SharedWorkspace"
1807
+ }
1808
+ }
1809
+ ]
1848
1810
  },
1849
1811
  {
1850
- "kind": "field",
1851
- "name": "currentWorkspace",
1852
- "type": {
1853
- "text": "SavedWorkspace | null"
1812
+ "kind": "method",
1813
+ "name": "deleteSharedWorkspace",
1814
+ "return": {
1815
+ "type": {
1816
+ "text": "Promise<void>"
1817
+ }
1854
1818
  },
1855
- "privacy": "private",
1856
- "default": "null"
1819
+ "parameters": [
1820
+ {
1821
+ "name": "sharedWorkspace",
1822
+ "type": {
1823
+ "text": "SharedWorkspace"
1824
+ }
1825
+ }
1826
+ ]
1857
1827
  },
1858
1828
  {
1859
1829
  "kind": "method",
1860
- "name": "getCurrentUsername",
1861
- "privacy": "private",
1830
+ "name": "confirmDeleteSharedWorkspace",
1862
1831
  "return": {
1863
1832
  "type": {
1864
- "text": "string"
1833
+ "text": "void"
1865
1834
  }
1866
- }
1835
+ },
1836
+ "parameters": [
1837
+ {
1838
+ "name": "sharedWorkspace",
1839
+ "type": {
1840
+ "text": "SharedWorkspace"
1841
+ }
1842
+ }
1843
+ ]
1867
1844
  },
1868
1845
  {
1869
1846
  "kind": "method",
1870
- "name": "getWorkspaceStorageKey",
1871
- "privacy": "private",
1847
+ "name": "shareExistingWorkspace",
1872
1848
  "return": {
1873
1849
  "type": {
1874
- "text": "string"
1850
+ "text": "Promise<void>"
1875
1851
  }
1876
1852
  },
1877
1853
  "parameters": [
@@ -1885,20 +1861,19 @@
1885
1861
  },
1886
1862
  {
1887
1863
  "kind": "method",
1888
- "name": "getWorkspacesListKey",
1889
- "privacy": "private",
1864
+ "name": "openSaveDialog",
1890
1865
  "return": {
1891
1866
  "type": {
1892
- "text": "string"
1867
+ "text": "Promise<void>"
1893
1868
  }
1894
1869
  }
1895
1870
  },
1896
1871
  {
1897
1872
  "kind": "method",
1898
- "name": "saveWorkspace",
1873
+ "name": "isWorkspaceExisting",
1899
1874
  "return": {
1900
1875
  "type": {
1901
- "text": "Promise<void>"
1876
+ "text": "boolean"
1902
1877
  }
1903
1878
  },
1904
1879
  "parameters": [
@@ -1907,45 +1882,26 @@
1907
1882
  "type": {
1908
1883
  "text": "string"
1909
1884
  }
1910
- },
1911
- {
1912
- "name": "layouts",
1913
- "type": {
1914
- "text": "SavedLayout[]"
1915
- }
1916
- },
1917
- {
1918
- "name": "grids",
1919
- "type": {
1920
- "text": "SavedGridSettings[]"
1921
- }
1922
- },
1923
- {
1924
- "name": "filters",
1925
- "type": {
1926
- "text": "SavedFilterValue[]"
1927
- }
1928
- },
1929
- {
1930
- "name": "description",
1931
- "optional": true,
1932
- "type": {
1933
- "text": "string"
1934
- }
1935
1885
  }
1936
1886
  ]
1937
1887
  },
1938
1888
  {
1939
1889
  "kind": "method",
1940
- "name": "loadWorkspace",
1890
+ "name": "saveModeChanged",
1941
1891
  "return": {
1942
1892
  "type": {
1943
- "text": "Promise<SavedWorkspace | null>"
1893
+ "text": "void"
1944
1894
  }
1945
1895
  },
1946
1896
  "parameters": [
1947
1897
  {
1948
- "name": "workspaceName",
1898
+ "name": "oldValue",
1899
+ "type": {
1900
+ "text": "string"
1901
+ }
1902
+ },
1903
+ {
1904
+ "name": "newValue",
1949
1905
  "type": {
1950
1906
  "text": "string"
1951
1907
  }
@@ -1954,16 +1910,21 @@
1954
1910
  },
1955
1911
  {
1956
1912
  "kind": "method",
1957
- "name": "getWorkspace",
1958
- "privacy": "private",
1913
+ "name": "selectedWorkspaceToOverwriteChanged",
1959
1914
  "return": {
1960
1915
  "type": {
1961
- "text": "Promise<SavedWorkspace | null>"
1916
+ "text": "void"
1962
1917
  }
1963
1918
  },
1964
1919
  "parameters": [
1965
1920
  {
1966
- "name": "workspaceName",
1921
+ "name": "oldValue",
1922
+ "type": {
1923
+ "text": "string"
1924
+ }
1925
+ },
1926
+ {
1927
+ "name": "newValue",
1967
1928
  "type": {
1968
1929
  "text": "string"
1969
1930
  }
@@ -1972,131 +1933,170 @@
1972
1933
  },
1973
1934
  {
1974
1935
  "kind": "method",
1975
- "name": "getCurrentWorkspace",
1936
+ "name": "openLoadDialog",
1976
1937
  "return": {
1977
1938
  "type": {
1978
- "text": "SavedWorkspace | null"
1939
+ "text": "void"
1979
1940
  }
1980
1941
  }
1981
1942
  },
1982
1943
  {
1983
1944
  "kind": "method",
1984
- "name": "setCurrentWorkspace",
1945
+ "name": "closeSaveDialog",
1985
1946
  "return": {
1986
1947
  "type": {
1987
1948
  "text": "void"
1988
1949
  }
1989
- },
1990
- "parameters": [
1991
- {
1992
- "name": "workspace",
1993
- "type": {
1994
- "text": "SavedWorkspace | null"
1995
- }
1996
- }
1997
- ]
1950
+ }
1998
1951
  },
1999
1952
  {
2000
1953
  "kind": "method",
2001
- "name": "getSavedWorkspaces",
1954
+ "name": "closeLoadDialog",
2002
1955
  "return": {
2003
1956
  "type": {
2004
- "text": "Promise<SavedWorkspace[]>"
1957
+ "text": "void"
2005
1958
  }
2006
1959
  }
2007
1960
  },
1961
+ {
1962
+ "kind": "field",
1963
+ "name": "_presentation",
1964
+ "type": {
1965
+ "text": "ComponentPresentation | null | undefined"
1966
+ },
1967
+ "privacy": "private",
1968
+ "default": "void 0",
1969
+ "inheritedFrom": {
1970
+ "name": "FoundationElement",
1971
+ "module": "src/foundation-element/foundation-element.ts"
1972
+ }
1973
+ },
1974
+ {
1975
+ "kind": "field",
1976
+ "name": "$presentation",
1977
+ "type": {
1978
+ "text": "ComponentPresentation | null"
1979
+ },
1980
+ "privacy": "public",
1981
+ "description": "A property which resolves the ComponentPresentation instance\nfor the current component.",
1982
+ "inheritedFrom": {
1983
+ "name": "FoundationElement",
1984
+ "module": "src/foundation-element/foundation-element.ts"
1985
+ }
1986
+ },
1987
+ {
1988
+ "kind": "field",
1989
+ "name": "template",
1990
+ "type": {
1991
+ "text": "ElementViewTemplate | void | null"
1992
+ },
1993
+ "privacy": "public",
1994
+ "description": "Sets the template of the element instance. When undefined,\nthe element will attempt to resolve the template from\nthe associated presentation or custom element definition.",
1995
+ "inheritedFrom": {
1996
+ "name": "FoundationElement",
1997
+ "module": "src/foundation-element/foundation-element.ts"
1998
+ }
1999
+ },
2008
2000
  {
2009
2001
  "kind": "method",
2010
- "name": "deleteWorkspace",
2002
+ "name": "templateChanged",
2003
+ "privacy": "protected",
2011
2004
  "return": {
2012
2005
  "type": {
2013
- "text": "Promise<void>"
2006
+ "text": "void"
2014
2007
  }
2015
2008
  },
2016
- "parameters": [
2017
- {
2018
- "name": "workspaceName",
2019
- "type": {
2020
- "text": "string"
2021
- }
2022
- }
2023
- ]
2009
+ "inheritedFrom": {
2010
+ "name": "FoundationElement",
2011
+ "module": "src/foundation-element/foundation-element.ts"
2012
+ }
2013
+ },
2014
+ {
2015
+ "kind": "field",
2016
+ "name": "styles",
2017
+ "type": {
2018
+ "text": "ElementStyles | void | null"
2019
+ },
2020
+ "privacy": "public",
2021
+ "description": "Sets the default styles for the element instance. When undefined,\nthe element will attempt to resolve default styles from\nthe associated presentation or custom element definition.",
2022
+ "inheritedFrom": {
2023
+ "name": "FoundationElement",
2024
+ "module": "src/foundation-element/foundation-element.ts"
2025
+ }
2024
2026
  },
2025
2027
  {
2026
2028
  "kind": "method",
2027
- "name": "updateWorkspacesList",
2028
- "privacy": "private",
2029
+ "name": "stylesChanged",
2030
+ "privacy": "protected",
2029
2031
  "return": {
2030
2032
  "type": {
2031
- "text": "Promise<void>"
2033
+ "text": "void"
2032
2034
  }
2033
2035
  },
2034
- "parameters": [
2035
- {
2036
- "name": "workspaceName",
2037
- "type": {
2038
- "text": "string"
2039
- }
2040
- }
2041
- ]
2036
+ "inheritedFrom": {
2037
+ "name": "FoundationElement",
2038
+ "module": "src/foundation-element/foundation-element.ts"
2039
+ }
2042
2040
  },
2043
2041
  {
2044
2042
  "kind": "method",
2045
- "name": "removeFromWorkspacesList",
2046
- "privacy": "private",
2043
+ "name": "compose",
2044
+ "privacy": "public",
2045
+ "static": true,
2047
2046
  "return": {
2048
2047
  "type": {
2049
- "text": "Promise<void>"
2048
+ "text": "(\n overrideDefinition?: OverrideFoundationElementDefinition<T>\n ) => FoundationElementRegistry<T, K>"
2050
2049
  }
2051
2050
  },
2052
2051
  "parameters": [
2053
2052
  {
2054
- "name": "workspaceName",
2053
+ "name": "this",
2055
2054
  "type": {
2056
- "text": "string"
2055
+ "text": "K"
2057
2056
  }
2057
+ },
2058
+ {
2059
+ "name": "elementDefinition",
2060
+ "type": {
2061
+ "text": "T"
2062
+ },
2063
+ "description": "The definition of the element to create the registry\nfunction for."
2058
2064
  }
2059
- ]
2065
+ ],
2066
+ "description": "Defines an element registry function with a set of element definition defaults.",
2067
+ "inheritedFrom": {
2068
+ "name": "FoundationElement",
2069
+ "module": "src/foundation-element/foundation-element.ts"
2070
+ }
2060
2071
  }
2061
- ]
2062
- },
2063
- {
2064
- "kind": "variable",
2065
- "name": "WorkspaceState",
2066
- "description": "DI token for workspace state."
2072
+ ],
2073
+ "superclass": {
2074
+ "name": "FoundationElement",
2075
+ "package": "@genesislcap/web-core"
2076
+ },
2077
+ "tagName": "workspace-manager",
2078
+ "customElement": true
2067
2079
  }
2068
2080
  ],
2069
2081
  "exports": [
2070
2082
  {
2071
2083
  "kind": "js",
2072
- "name": "DefaultWorkspaceState",
2084
+ "name": "WorkspaceManager",
2073
2085
  "declaration": {
2074
- "name": "DefaultWorkspaceState",
2075
- "module": "src/workspace/workspace-state.ts"
2086
+ "name": "WorkspaceManager",
2087
+ "module": "src/workspace-manager/workspace-manager.ts"
2076
2088
  }
2077
2089
  },
2078
2090
  {
2079
- "kind": "js",
2080
- "name": "WorkspaceState",
2091
+ "kind": "custom-element-definition",
2092
+ "name": "workspace-manager",
2081
2093
  "declaration": {
2082
- "name": "WorkspaceState",
2083
- "module": "src/workspace/workspace-state.ts"
2094
+ "name": "WorkspaceManager",
2095
+ "module": "src/workspace-manager/workspace-manager.ts"
2084
2096
  }
2085
2097
  }
2086
2098
  ]
2087
2099
  },
2088
- {
2089
- "kind": "javascript-module",
2090
- "path": "src/workspace/workspace-state.types.ts",
2091
- "declarations": [],
2092
- "exports": []
2093
- },
2094
- {
2095
- "kind": "javascript-module",
2096
- "path": "src/workspace/workspace.types.ts",
2097
- "declarations": [],
2098
- "exports": []
2099
- },
2100
2100
  {
2101
2101
  "kind": "javascript-module",
2102
2102
  "path": "src/workspace/grid-register/grid-register.template.ts",