@genesislcap/foundation-workspace 14.406.0-workspaces.8 → 14.412.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts/workspace/grid-register/grid-register.d.ts +5 -3
- package/dist/dts/workspace/grid-register/grid-register.d.ts.map +1 -1
- package/dist/dts/workspace/grid-register/grid-register.template.d.ts +1 -1
- package/dist/dts/workspace/grid-register/grid-register.template.d.ts.map +1 -1
- package/dist/dts/workspace/grid-registry.d.ts +1 -9
- package/dist/dts/workspace/grid-registry.d.ts.map +1 -1
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.d.ts +4 -2
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.d.ts.map +1 -1
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.template.d.ts +1 -1
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.template.d.ts.map +1 -1
- package/dist/dts/workspace-components.d.ts +1 -1
- package/dist/dts/workspace-components.d.ts.map +1 -1
- package/dist/dts/workspace-manager/workspace-manager.d.ts +1 -1
- package/dist/dts/workspace-manager/workspace-manager.d.ts.map +1 -1
- package/dist/dts/workspace-manager/workspace-manager.styles.d.ts.map +1 -1
- package/dist/dts/workspace-manager/workspace-manager.template.d.ts +5 -1
- package/dist/dts/workspace-manager/workspace-manager.template.d.ts.map +1 -1
- package/dist/esm/workspace/filter-registry.js +1 -1
- package/dist/esm/workspace/grid-register/grid-register.js +20 -16
- package/dist/esm/workspace/grid-register/grid-register.template.js +1 -1
- package/dist/esm/workspace/grid-registry.js +21 -10
- package/dist/esm/workspace/layout-registry.js +1 -1
- package/dist/esm/workspace/layout-wrapper/layout-wrapper.js +13 -6
- package/dist/esm/workspace/layout-wrapper/layout-wrapper.template.js +1 -1
- package/dist/esm/workspace/workspace-state.js +1 -1
- package/dist/esm/workspace-manager/workspace-manager.js +2 -2
- package/dist/esm/workspace-manager/workspace-manager.styles.js +2 -25
- package/dist/esm/workspace-manager/workspace-manager.template.js +22 -12
- package/dist/foundation-workspace.api.json +64 -4
- package/dist/foundation-workspace.d.ts +7 -15
- package/package.json +16 -19
- package/src/workspace/filter-registry.ts +1 -1
- package/src/workspace/grid-register/grid-register.template.ts +1 -2
- package/src/workspace/grid-register/grid-register.ts +17 -16
- package/src/workspace/grid-registry.ts +23 -18
- package/src/workspace/layout-registry.ts +1 -1
- package/src/workspace/layout-wrapper/layout-wrapper.template.ts +1 -2
- package/src/workspace/layout-wrapper/layout-wrapper.ts +10 -6
- package/src/workspace/workspace-state.ts +1 -1
- package/src/workspace-components.ts +1 -1
- package/src/workspace-manager/workspace-manager.styles.ts +2 -25
- package/src/workspace-manager/workspace-manager.template.ts +28 -15
- package/src/workspace-manager/workspace-manager.ts +2 -2
- package/docs/.gitkeep +0 -1
- package/docs/api/foundation-workspace.defaultfilterregistry.md +0 -17
- package/docs/api/foundation-workspace.defaultgridregistry.md +0 -17
- package/docs/api/foundation-workspace.defaultlayoutregistry.md +0 -18
- package/docs/api/foundation-workspace.defaultworkspacestate._constructor_.md +0 -65
- package/docs/api/foundation-workspace.defaultworkspacestate.auth.md +0 -14
- package/docs/api/foundation-workspace.defaultworkspacestate.kvstorage.md +0 -14
- package/docs/api/foundation-workspace.defaultworkspacestate.md +0 -115
- package/docs/api/foundation-workspace.filterregistration.filterkey.md +0 -14
- package/docs/api/foundation-workspace.filterregistration.getfiltervalue.md +0 -14
- package/docs/api/foundation-workspace.filterregistration.md +0 -98
- package/docs/api/foundation-workspace.filterregistration.setfiltervalue.md +0 -14
- package/docs/api/foundation-workspace.filterregistry.applyfiltersvalues.md +0 -53
- package/docs/api/foundation-workspace.filterregistry.getallfiltersvalues.md +0 -18
- package/docs/api/foundation-workspace.filterregistry.md +0 -16
- package/docs/api/foundation-workspace.filterregistry.registerfilter.md +0 -81
- package/docs/api/foundation-workspace.filterregistry.unregisterfilter.md +0 -53
- package/docs/api/foundation-workspace.gridregister.gridkey.md +0 -14
- package/docs/api/foundation-workspace.gridregister.gridregistry.md +0 -14
- package/docs/api/foundation-workspace.gridregister.md +0 -100
- package/docs/api/foundation-workspace.gridregister.workspacestate.md +0 -14
- package/docs/api/foundation-workspace.gridregistration.columnapi.md +0 -14
- package/docs/api/foundation-workspace.gridregistration.gridapi.md +0 -14
- package/docs/api/foundation-workspace.gridregistration.gridkey.md +0 -14
- package/docs/api/foundation-workspace.gridregistration.md +0 -98
- package/docs/api/foundation-workspace.gridregistry.applyallgridssettings.md +0 -53
- package/docs/api/foundation-workspace.gridregistry.applygridsettings.md +0 -72
- package/docs/api/foundation-workspace.gridregistry.getallgridssettings.md +0 -18
- package/docs/api/foundation-workspace.gridregistry.getgrid.md +0 -53
- package/docs/api/foundation-workspace.gridregistry.md +0 -16
- package/docs/api/foundation-workspace.gridregistry.registergrid.md +0 -81
- package/docs/api/foundation-workspace.gridregistry.unregistergrid.md +0 -53
- package/docs/api/foundation-workspace.layoutregistry.applysavedlayouts.md +0 -53
- package/docs/api/foundation-workspace.layoutregistry.getlayoutsconfigs.md +0 -18
- package/docs/api/foundation-workspace.layoutregistry.md +0 -16
- package/docs/api/foundation-workspace.layoutregistry.registerlayout.md +0 -67
- package/docs/api/foundation-workspace.layoutregistry.unregisterlayout.md +0 -53
- package/docs/api/foundation-workspace.layoutwrapper.layoutkey.md +0 -14
- package/docs/api/foundation-workspace.layoutwrapper.layoutregistry.md +0 -14
- package/docs/api/foundation-workspace.layoutwrapper.md +0 -81
- package/docs/api/foundation-workspace.loadmode.md +0 -16
- package/docs/api/foundation-workspace.md +0 -332
- package/docs/api/foundation-workspace.savedfiltervalue.filterkey.md +0 -14
- package/docs/api/foundation-workspace.savedfiltervalue.md +0 -79
- package/docs/api/foundation-workspace.savedfiltervalue.value.md +0 -14
- package/docs/api/foundation-workspace.savedgridsettings.columnstate.md +0 -14
- package/docs/api/foundation-workspace.savedgridsettings.gridkey.md +0 -14
- package/docs/api/foundation-workspace.savedgridsettings.md +0 -99
- package/docs/api/foundation-workspace.savedgridsettings.savedat.md +0 -14
- package/docs/api/foundation-workspace.savedlayout.layout.md +0 -14
- package/docs/api/foundation-workspace.savedlayout.layoutkey.md +0 -14
- package/docs/api/foundation-workspace.savedlayout.md +0 -79
- package/docs/api/foundation-workspace.savedworkspace.description.md +0 -14
- package/docs/api/foundation-workspace.savedworkspace.filters.md +0 -14
- package/docs/api/foundation-workspace.savedworkspace.grids.md +0 -14
- package/docs/api/foundation-workspace.savedworkspace.layouts.md +0 -14
- package/docs/api/foundation-workspace.savedworkspace.md +0 -174
- package/docs/api/foundation-workspace.savedworkspace.name.md +0 -14
- package/docs/api/foundation-workspace.savedworkspace.savedat.md +0 -14
- package/docs/api/foundation-workspace.savedworkspace.username.md +0 -14
- package/docs/api/foundation-workspace.sharedworkspace.createdon.md +0 -14
- package/docs/api/foundation-workspace.sharedworkspace.data.md +0 -14
- package/docs/api/foundation-workspace.sharedworkspace.description.md +0 -14
- package/docs/api/foundation-workspace.sharedworkspace.id.md +0 -14
- package/docs/api/foundation-workspace.sharedworkspace.md +0 -174
- package/docs/api/foundation-workspace.sharedworkspace.modifiedon.md +0 -14
- package/docs/api/foundation-workspace.sharedworkspace.name.md +0 -14
- package/docs/api/foundation-workspace.sharedworkspace.username.md +0 -14
- package/docs/api/foundation-workspace.workspacecomponents.md +0 -29
- package/docs/api/foundation-workspace.workspacemanager.applyingworkspace.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.auth.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.canshareworkspace.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.connect.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.dialogboundary.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.filterregistry.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.gridregistry.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.isloading.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.layoutregistry.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.loadmodal.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.loadmode.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.md +0 -442
- package/docs/api/foundation-workspace.workspacemanager.savedworkspaces.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.savemodal.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.savemode.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.selectedworkspacetooverwrite.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.sharedworkspacedialogboundary.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.sharedworkspaces.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.workspacedescription.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.workspacename.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.workspacestate.md +0 -14
- package/docs/api/foundation-workspace.workspacemanager.workspacetoshare.md +0 -14
- package/docs/api/foundation-workspace.workspacestate.deleteworkspace.md +0 -53
- package/docs/api/foundation-workspace.workspacestate.getcurrentworkspace.md +0 -18
- package/docs/api/foundation-workspace.workspacestate.getsavedworkspaces.md +0 -18
- package/docs/api/foundation-workspace.workspacestate.loadworkspace.md +0 -53
- package/docs/api/foundation-workspace.workspacestate.md +0 -16
- package/docs/api/foundation-workspace.workspacestate.saveworkspace.md +0 -111
- package/docs/api/foundation-workspace.workspacestate.setcurrentworkspace.md +0 -53
- package/docs/api/index.md +0 -30
- package/docs/api-report.md.api.md +0 -384
- package/temp/api-report.md.api.md +0 -384
|
@@ -805,8 +805,8 @@
|
|
|
805
805
|
},
|
|
806
806
|
{
|
|
807
807
|
"kind": "Reference",
|
|
808
|
-
"text": "
|
|
809
|
-
"canonicalReference": "!
|
|
808
|
+
"text": "FoundationElement",
|
|
809
|
+
"canonicalReference": "@microsoft/fast-foundation!FoundationElement:class"
|
|
810
810
|
},
|
|
811
811
|
{
|
|
812
812
|
"kind": "Content",
|
|
@@ -819,6 +819,36 @@
|
|
|
819
819
|
"name": "GridRegister",
|
|
820
820
|
"preserveMemberOrder": false,
|
|
821
821
|
"members": [
|
|
822
|
+
{
|
|
823
|
+
"kind": "Property",
|
|
824
|
+
"canonicalReference": "@genesislcap/foundation-workspace!GridRegister#designSystemPrefix:member",
|
|
825
|
+
"docComment": "",
|
|
826
|
+
"excerptTokens": [
|
|
827
|
+
{
|
|
828
|
+
"kind": "Content",
|
|
829
|
+
"text": "designSystemPrefix: "
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"kind": "Content",
|
|
833
|
+
"text": "string"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"kind": "Content",
|
|
837
|
+
"text": ";"
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
"isReadonly": false,
|
|
841
|
+
"isOptional": false,
|
|
842
|
+
"releaseTag": "Alpha",
|
|
843
|
+
"name": "designSystemPrefix",
|
|
844
|
+
"propertyTypeTokenRange": {
|
|
845
|
+
"startIndex": 1,
|
|
846
|
+
"endIndex": 2
|
|
847
|
+
},
|
|
848
|
+
"isStatic": false,
|
|
849
|
+
"isProtected": false,
|
|
850
|
+
"isAbstract": false
|
|
851
|
+
},
|
|
822
852
|
{
|
|
823
853
|
"kind": "Property",
|
|
824
854
|
"canonicalReference": "@genesislcap/foundation-workspace!GridRegister#gridKey:member",
|
|
@@ -1669,8 +1699,8 @@
|
|
|
1669
1699
|
},
|
|
1670
1700
|
{
|
|
1671
1701
|
"kind": "Reference",
|
|
1672
|
-
"text": "
|
|
1673
|
-
"canonicalReference": "!
|
|
1702
|
+
"text": "FoundationElement",
|
|
1703
|
+
"canonicalReference": "@microsoft/fast-foundation!FoundationElement:class"
|
|
1674
1704
|
},
|
|
1675
1705
|
{
|
|
1676
1706
|
"kind": "Content",
|
|
@@ -1683,6 +1713,36 @@
|
|
|
1683
1713
|
"name": "LayoutWrapper",
|
|
1684
1714
|
"preserveMemberOrder": false,
|
|
1685
1715
|
"members": [
|
|
1716
|
+
{
|
|
1717
|
+
"kind": "Property",
|
|
1718
|
+
"canonicalReference": "@genesislcap/foundation-workspace!LayoutWrapper#designSystemPrefix:member",
|
|
1719
|
+
"docComment": "",
|
|
1720
|
+
"excerptTokens": [
|
|
1721
|
+
{
|
|
1722
|
+
"kind": "Content",
|
|
1723
|
+
"text": "designSystemPrefix: "
|
|
1724
|
+
},
|
|
1725
|
+
{
|
|
1726
|
+
"kind": "Content",
|
|
1727
|
+
"text": "string"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"kind": "Content",
|
|
1731
|
+
"text": ";"
|
|
1732
|
+
}
|
|
1733
|
+
],
|
|
1734
|
+
"isReadonly": false,
|
|
1735
|
+
"isOptional": false,
|
|
1736
|
+
"releaseTag": "Alpha",
|
|
1737
|
+
"name": "designSystemPrefix",
|
|
1738
|
+
"propertyTypeTokenRange": {
|
|
1739
|
+
"startIndex": 1,
|
|
1740
|
+
"endIndex": 2
|
|
1741
|
+
},
|
|
1742
|
+
"isStatic": false,
|
|
1743
|
+
"isProtected": false,
|
|
1744
|
+
"isAbstract": false
|
|
1745
|
+
},
|
|
1686
1746
|
{
|
|
1687
1747
|
"kind": "Property",
|
|
1688
1748
|
"canonicalReference": "@genesislcap/foundation-workspace!LayoutWrapper#layoutKey:member",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Auth } from '@genesislcap/foundation-comms';
|
|
2
2
|
import type { ColumnApi } from '@ag-grid-community/core';
|
|
3
3
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
|
-
import type { Container } from '@
|
|
5
|
-
import { FoundationElement } from '@
|
|
4
|
+
import type { Container } from '@genesislcap/web-core';
|
|
5
|
+
import { FoundationElement } from '@genesislcap/web-core';
|
|
6
6
|
import type { FoundationLayout } from '@genesislcap/foundation-layout';
|
|
7
7
|
import type { GridApi } from '@ag-grid-community/core';
|
|
8
8
|
import { InterfaceSymbol } from '@microsoft/fast-foundation';
|
|
@@ -35,7 +35,7 @@ export declare class DefaultGridRegistry implements GridRegistry {
|
|
|
35
35
|
applyColumns?: boolean;
|
|
36
36
|
applyFilters?: boolean;
|
|
37
37
|
}): Promise<boolean>;
|
|
38
|
-
applyAllGridsSettings(gridsSettings: SavedGridSettings[], maxRetries?: number
|
|
38
|
+
applyAllGridsSettings(gridsSettings: SavedGridSettings[], maxRetries?: number): Promise<void>;
|
|
39
39
|
private getGridSettings;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -106,14 +106,14 @@ export declare const FilterRegistry: InterfaceSymbol<FilterRegistry>;
|
|
|
106
106
|
* Registers an AG Grid instance so workspace state can apply/load it.
|
|
107
107
|
* @alpha
|
|
108
108
|
*/
|
|
109
|
-
export declare class GridRegister extends
|
|
109
|
+
export declare class GridRegister extends FoundationElement {
|
|
110
110
|
gridKey: string;
|
|
111
|
+
designSystemPrefix: string;
|
|
111
112
|
gridRegistry: GridRegistry;
|
|
112
113
|
workspaceState: WorkspaceState;
|
|
113
114
|
private gridElement;
|
|
114
115
|
private gridApi;
|
|
115
116
|
private columnApi;
|
|
116
|
-
private workspaceSettingsApplied;
|
|
117
117
|
connectedCallback(): void;
|
|
118
118
|
disconnectedCallback(): void;
|
|
119
119
|
private findAndRegisterGrid;
|
|
@@ -133,15 +133,6 @@ export declare interface GridRegistration {
|
|
|
133
133
|
columnApi: ColumnApi;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
/**
|
|
137
|
-
* @alpha
|
|
138
|
-
*/
|
|
139
|
-
export declare interface GridRegistration {
|
|
140
|
-
gridKey: string;
|
|
141
|
-
gridApi: GridApi;
|
|
142
|
-
columnApi: ColumnApi;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
136
|
/**
|
|
146
137
|
* @alpha
|
|
147
138
|
*/
|
|
@@ -183,8 +174,9 @@ export declare const LayoutRegistry: InterfaceSymbol<LayoutRegistry>;
|
|
|
183
174
|
* Registers a layout instance so workspace state can apply/load it.
|
|
184
175
|
* @alpha
|
|
185
176
|
*/
|
|
186
|
-
export declare class LayoutWrapper extends
|
|
177
|
+
export declare class LayoutWrapper extends FoundationElement {
|
|
187
178
|
layoutKey: string;
|
|
179
|
+
designSystemPrefix: string;
|
|
188
180
|
layoutRegistry: LayoutRegistry;
|
|
189
181
|
private layoutElement;
|
|
190
182
|
connectedCallback(): void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-workspace",
|
|
3
3
|
"description": "Genesis Foundation Workspace Components and State",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.412.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -37,26 +37,23 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@genesislcap/foundation-testing": "14.
|
|
41
|
-
"@genesislcap/genx": "14.
|
|
42
|
-
"@genesislcap/rollup-builder": "14.
|
|
43
|
-
"@genesislcap/ts-builder": "14.
|
|
44
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
45
|
-
"@genesislcap/vite-builder": "14.
|
|
46
|
-
"@genesislcap/webpack-builder": "14.
|
|
40
|
+
"@genesislcap/foundation-testing": "14.412.0",
|
|
41
|
+
"@genesislcap/genx": "14.412.0",
|
|
42
|
+
"@genesislcap/rollup-builder": "14.412.0",
|
|
43
|
+
"@genesislcap/ts-builder": "14.412.0",
|
|
44
|
+
"@genesislcap/uvu-playwright-builder": "14.412.0",
|
|
45
|
+
"@genesislcap/vite-builder": "14.412.0",
|
|
46
|
+
"@genesislcap/webpack-builder": "14.412.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@ag-grid-community/core": "29.2.0",
|
|
50
|
-
"@genesislcap/foundation-comms": "14.
|
|
51
|
-
"@genesislcap/foundation-layout": "14.
|
|
52
|
-
"@genesislcap/foundation-notifications": "14.
|
|
53
|
-
"@genesislcap/foundation-ui": "14.
|
|
54
|
-
"@genesislcap/foundation-utils": "14.
|
|
55
|
-
"@genesislcap/grid-pro": "14.
|
|
56
|
-
"@genesislcap/web-core": "14.
|
|
57
|
-
"@microsoft/fast-components": "2.30.6",
|
|
58
|
-
"@microsoft/fast-element": "1.14.0",
|
|
59
|
-
"@microsoft/fast-foundation": "2.50.0"
|
|
50
|
+
"@genesislcap/foundation-comms": "14.412.0",
|
|
51
|
+
"@genesislcap/foundation-layout": "14.412.0",
|
|
52
|
+
"@genesislcap/foundation-notifications": "14.412.0",
|
|
53
|
+
"@genesislcap/foundation-ui": "14.412.0",
|
|
54
|
+
"@genesislcap/foundation-utils": "14.412.0",
|
|
55
|
+
"@genesislcap/grid-pro": "14.412.0",
|
|
56
|
+
"@genesislcap/web-core": "14.412.0"
|
|
60
57
|
},
|
|
61
58
|
"repository": {
|
|
62
59
|
"type": "git",
|
|
@@ -67,5 +64,5 @@
|
|
|
67
64
|
"access": "public"
|
|
68
65
|
},
|
|
69
66
|
"customElements": "dist/custom-elements.json",
|
|
70
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "b759370097c295bea2a87d6f3a132ec6dba807ca"
|
|
71
68
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { html } from '@
|
|
2
|
-
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
1
|
+
import { html, ViewTemplate } from '@genesislcap/web-core';
|
|
3
2
|
import type { GridRegister } from './grid-register';
|
|
4
3
|
|
|
5
4
|
export const GridRegisterTemplate: ViewTemplate<GridRegister> = html`
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ColumnApi, GridApi } from '@ag-grid-community/core';
|
|
2
2
|
import type { GridPro } from '@genesislcap/grid-pro';
|
|
3
|
-
import { attr, customElement } from '@
|
|
4
|
-
import { GridRegistry
|
|
3
|
+
import { FoundationElement, attr, customElement } from '@genesislcap/web-core';
|
|
4
|
+
import { GridRegistry } from '../grid-registry';
|
|
5
|
+
import { WorkspaceState } from '../workspace-state';
|
|
5
6
|
import { GridRegisterTemplate as template } from './grid-register.template';
|
|
6
7
|
|
|
7
8
|
const name = 'grid-register';
|
|
@@ -14,8 +15,9 @@ const name = 'grid-register';
|
|
|
14
15
|
name,
|
|
15
16
|
template,
|
|
16
17
|
})
|
|
17
|
-
export class GridRegister extends
|
|
18
|
+
export class GridRegister extends FoundationElement {
|
|
18
19
|
@attr({ attribute: 'grid-key' }) gridKey: string;
|
|
20
|
+
@attr({ attribute: 'design-system-prefix' }) designSystemPrefix: string = 'rapid';
|
|
19
21
|
|
|
20
22
|
@GridRegistry gridRegistry: GridRegistry;
|
|
21
23
|
@WorkspaceState workspaceState: WorkspaceState;
|
|
@@ -23,13 +25,14 @@ export class GridRegister extends HTMLElement {
|
|
|
23
25
|
private gridElement: GridPro | null = null;
|
|
24
26
|
private gridApi: GridApi | null = null;
|
|
25
27
|
private columnApi: ColumnApi | null = null;
|
|
26
|
-
private workspaceSettingsApplied: boolean = false;
|
|
27
28
|
|
|
28
29
|
connectedCallback(): void {
|
|
30
|
+
super.connectedCallback();
|
|
29
31
|
this.findAndRegisterGrid();
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
disconnectedCallback(): void {
|
|
35
|
+
super.disconnectedCallback();
|
|
33
36
|
if (this.gridKey) {
|
|
34
37
|
this.gridRegistry.unregisterGrid(this.gridKey);
|
|
35
38
|
}
|
|
@@ -38,20 +41,21 @@ export class GridRegister extends HTMLElement {
|
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
private findAndRegisterGrid(): void {
|
|
41
|
-
|
|
44
|
+
const gridTag = `${this.designSystemPrefix}-grid-pro`;
|
|
45
|
+
this.gridElement = this.querySelector(gridTag) as GridPro;
|
|
42
46
|
|
|
43
47
|
if (this.gridElement) {
|
|
44
48
|
this.gridElement.addEventListener('gridReady', this.handleGridReady as EventListener);
|
|
45
49
|
this.attachToGridApis();
|
|
46
50
|
} else {
|
|
47
51
|
setTimeout(() => {
|
|
48
|
-
this.gridElement = this.querySelector(
|
|
52
|
+
this.gridElement = this.querySelector(gridTag) as GridPro;
|
|
49
53
|
|
|
50
54
|
if (this.gridElement) {
|
|
51
55
|
this.gridElement.addEventListener('gridReady', this.handleGridReady as EventListener);
|
|
52
56
|
this.attachToGridApis();
|
|
53
57
|
} else {
|
|
54
|
-
console.warn(`grid-register:
|
|
58
|
+
console.warn(`grid-register: ${gridTag} element not found`);
|
|
55
59
|
}
|
|
56
60
|
}, 100);
|
|
57
61
|
}
|
|
@@ -77,19 +81,16 @@ export class GridRegister extends HTMLElement {
|
|
|
77
81
|
this.gridApi = gridApi;
|
|
78
82
|
this.columnApi = columnApi;
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
if (!effectiveGridKey) {
|
|
84
|
+
if (!persistKey) {
|
|
82
85
|
console.warn('grid-register: missing persist-column-state-key; grid state will not be saved');
|
|
83
86
|
} else {
|
|
84
|
-
this.gridRegistry.registerGrid(
|
|
85
|
-
this.gridKey =
|
|
87
|
+
this.gridRegistry.registerGrid(persistKey, gridApi, columnApi);
|
|
88
|
+
this.gridKey = persistKey;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
}
|
|
91
|
+
this.loadWorkspaceColumnState().catch((error) => {
|
|
92
|
+
console.warn(`Failed to apply column state for ${this.gridKey} on gridReady:`, error);
|
|
93
|
+
});
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
private detachFromGridApis(): void {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ColumnApi, GridApi } from '@ag-grid-community/core';
|
|
2
|
-
import { DI } from '@
|
|
2
|
+
import { DI } from '@genesislcap/web-core';
|
|
3
3
|
import type { SavedGridSettings } from './workspace.types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -26,15 +26,6 @@ export interface GridRegistry {
|
|
|
26
26
|
applyAllGridsSettings(gridsSettings: SavedGridSettings[]): Promise<void>;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* @alpha
|
|
31
|
-
*/
|
|
32
|
-
export interface GridRegistration {
|
|
33
|
-
gridKey: string;
|
|
34
|
-
gridApi: GridApi;
|
|
35
|
-
columnApi: ColumnApi;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
29
|
/**
|
|
39
30
|
* @alpha
|
|
40
31
|
*/
|
|
@@ -84,7 +75,7 @@ export class DefaultGridRegistry implements GridRegistry {
|
|
|
84
75
|
): Promise<boolean> {
|
|
85
76
|
const gridRegistration = this.grids.get(gridSetting.gridKey);
|
|
86
77
|
|
|
87
|
-
if (!gridRegistration || !gridRegistration.columnApi
|
|
78
|
+
if (!gridRegistration || (!gridRegistration.columnApi && !gridRegistration.gridApi)) {
|
|
88
79
|
return false;
|
|
89
80
|
}
|
|
90
81
|
|
|
@@ -99,10 +90,23 @@ export class DefaultGridRegistry implements GridRegistry {
|
|
|
99
90
|
|
|
100
91
|
try {
|
|
101
92
|
if (shouldApplyColumns) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
// Prefer Grid API if available, otherwise fall back to Column API.
|
|
94
|
+
// (AG Grid's Column API definitely supports applyColumnState; this is defensive.)
|
|
95
|
+
const applyColumnStateFn =
|
|
96
|
+
(gridRegistration.gridApi as any)?.applyColumnState?.bind(gridRegistration.gridApi) ??
|
|
97
|
+
(gridRegistration.columnApi as any)?.applyColumnState?.bind(gridRegistration.columnApi);
|
|
98
|
+
|
|
99
|
+
if (applyColumnStateFn) {
|
|
100
|
+
applyColumnStateFn({
|
|
101
|
+
state: gridSetting.columnState,
|
|
102
|
+
applyOrder: true,
|
|
103
|
+
});
|
|
104
|
+
} else {
|
|
105
|
+
console.warn(
|
|
106
|
+
`GridRegistry: applyColumnState not found for ${gridSetting.gridKey} (gridApi/columnApi)`,
|
|
107
|
+
);
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
return true;
|
|
@@ -115,7 +119,6 @@ export class DefaultGridRegistry implements GridRegistry {
|
|
|
115
119
|
async applyAllGridsSettings(
|
|
116
120
|
gridsSettings: SavedGridSettings[],
|
|
117
121
|
maxRetries: number = 3,
|
|
118
|
-
delayMs: number = 200,
|
|
119
122
|
): Promise<void> {
|
|
120
123
|
// eslint-disable-next-line no-plusplus
|
|
121
124
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
@@ -134,14 +137,16 @@ export class DefaultGridRegistry implements GridRegistry {
|
|
|
134
137
|
break;
|
|
135
138
|
}
|
|
136
139
|
|
|
137
|
-
// await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
138
140
|
gridsSettings = remainingSettings;
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
private getGridSettings(gridKey: string, grid: GridRegistration): SavedGridSettings | null {
|
|
143
145
|
if (grid) {
|
|
144
|
-
|
|
146
|
+
// Prefer Grid API if available, otherwise fall back to Column API.
|
|
147
|
+
// (AG Grid's Column state is typically on ColumnApi; this is defensive.)
|
|
148
|
+
const columnState =
|
|
149
|
+
(grid.gridApi as any)?.getColumnState?.() ?? grid.columnApi?.getColumnState();
|
|
145
150
|
const columnCount = columnState?.length || 0;
|
|
146
151
|
|
|
147
152
|
console.log(`Saved grid settings for ${gridKey}: ${columnCount} columns`);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { html } from '@
|
|
2
|
-
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
1
|
+
import { html, ViewTemplate } from '@genesislcap/web-core';
|
|
3
2
|
import type { LayoutWrapper } from './layout-wrapper';
|
|
4
3
|
|
|
5
4
|
export const LayoutWrapperTemplate: ViewTemplate<LayoutWrapper> = html`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FoundationLayout } from '@genesislcap/foundation-layout';
|
|
2
|
-
import { attr, customElement } from '@
|
|
3
|
-
import { LayoutRegistry } from '
|
|
2
|
+
import { FoundationElement, attr, customElement } from '@genesislcap/web-core';
|
|
3
|
+
import { LayoutRegistry } from '../layout-registry';
|
|
4
4
|
import { LayoutWrapperTemplate as template } from './layout-wrapper.template';
|
|
5
5
|
|
|
6
6
|
const name = 'layout-register';
|
|
@@ -13,18 +13,21 @@ const name = 'layout-register';
|
|
|
13
13
|
name,
|
|
14
14
|
template,
|
|
15
15
|
})
|
|
16
|
-
export class LayoutWrapper extends
|
|
16
|
+
export class LayoutWrapper extends FoundationElement {
|
|
17
17
|
@attr({ attribute: 'layout-key' }) layoutKey: string;
|
|
18
|
+
@attr({ attribute: 'design-system-prefix' }) designSystemPrefix: string = 'rapid';
|
|
18
19
|
|
|
19
20
|
@LayoutRegistry layoutRegistry: LayoutRegistry;
|
|
20
21
|
|
|
21
22
|
private layoutElement: FoundationLayout | null = null;
|
|
22
23
|
|
|
23
24
|
connectedCallback(): void {
|
|
25
|
+
super.connectedCallback();
|
|
24
26
|
this.findAndRegisterLayout();
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
disconnectedCallback(): void {
|
|
30
|
+
super.disconnectedCallback();
|
|
28
31
|
const layoutKey =
|
|
29
32
|
this.layoutElement?.autoSaveKey ??
|
|
30
33
|
this.layoutElement?.getAttribute?.('auto-save-key') ??
|
|
@@ -36,11 +39,12 @@ export class LayoutWrapper extends HTMLElement {
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
private findAndRegisterLayout(): void {
|
|
39
|
-
|
|
42
|
+
const layoutTag = `${this.designSystemPrefix}-layout`;
|
|
43
|
+
let layoutElement = this.querySelector(layoutTag) as FoundationLayout;
|
|
40
44
|
|
|
41
45
|
const registerLayout = (layout: FoundationLayout | null) => {
|
|
42
46
|
if (!layout) {
|
|
43
|
-
console.warn(`layout-register:
|
|
47
|
+
console.warn(`layout-register: ${layoutTag} element not found`);
|
|
44
48
|
return;
|
|
45
49
|
}
|
|
46
50
|
this.layoutElement = layout;
|
|
@@ -59,7 +63,7 @@ export class LayoutWrapper extends HTMLElement {
|
|
|
59
63
|
registerLayout(layoutElement);
|
|
60
64
|
} else {
|
|
61
65
|
setTimeout(() => {
|
|
62
|
-
layoutElement = this.querySelector(
|
|
66
|
+
layoutElement = this.querySelector(layoutTag) as FoundationLayout;
|
|
63
67
|
registerLayout(layoutElement);
|
|
64
68
|
}, 100);
|
|
65
69
|
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
type KVStorage as KVStorageType,
|
|
5
5
|
type Auth as AuthType,
|
|
6
6
|
} from '@genesislcap/foundation-comms';
|
|
7
|
-
import { DI } from '@
|
|
7
|
+
import { DI } from '@genesislcap/web-core';
|
|
8
8
|
import type { SavedWorkspace } from './workspace-state.types';
|
|
9
9
|
import type { SavedFilterValue, SavedGridSettings, SavedLayout } from './workspace.types';
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from '@
|
|
1
|
+
import { css } from '@genesislcap/web-core';
|
|
2
2
|
|
|
3
3
|
export const WorkspaceManagerStyles = css`
|
|
4
4
|
.workspace-manager {
|
|
@@ -64,6 +64,7 @@ export const WorkspaceManagerStyles = css`
|
|
|
64
64
|
cursor: pointer;
|
|
65
65
|
display: flex;
|
|
66
66
|
align-items: center;
|
|
67
|
+
gap: 5px;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
.workspace-item:hover {
|
|
@@ -101,30 +102,6 @@ export const WorkspaceManagerStyles = css`
|
|
|
101
102
|
line-height: 1.4;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
.workspace-description-input {
|
|
105
|
-
width: 100%;
|
|
106
|
-
min-height: 60px;
|
|
107
|
-
padding: 8px 12px;
|
|
108
|
-
margin-bottom: 16px;
|
|
109
|
-
font-family: inherit;
|
|
110
|
-
font-size: 14px;
|
|
111
|
-
border: 1px solid var(--neutral-stroke-rest);
|
|
112
|
-
border-radius: 4px;
|
|
113
|
-
background: var(--neutral-fill-rest);
|
|
114
|
-
color: var(--neutral-foreground-rest);
|
|
115
|
-
resize: vertical;
|
|
116
|
-
box-sizing: border-box;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.workspace-description-input::placeholder {
|
|
120
|
-
color: var(--neutral-foreground-hint);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.workspace-description-input:focus {
|
|
124
|
-
outline: none;
|
|
125
|
-
border-color: var(--accent-fill-rest);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
105
|
.loading-container {
|
|
129
106
|
display: flex;
|
|
130
107
|
flex-direction: column;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { sync, whenElse } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { ExecutionContext, html, ref, repeat, when } from '@
|
|
2
|
+
import { ExecutionContext, html, ref, repeat, ViewTemplate, when } from '@genesislcap/web-core';
|
|
3
3
|
import { SavedWorkspace, SharedWorkspace } from '../workspace/workspace-state.types';
|
|
4
4
|
import type { WorkspaceManager } from './workspace-manager';
|
|
5
5
|
|
|
6
6
|
export const WORKSPACE_DESCRIPTION_MAX = 200;
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const workspaceHeaderPartial: ViewTemplate<WorkspaceManager> = html`
|
|
9
9
|
<div class="workspace-manager">
|
|
10
10
|
<rapid-button @click=${(x) => x.openSaveDialog()}>
|
|
11
11
|
<rapid-icon name="download"></rapid-icon>
|
|
@@ -16,6 +16,9 @@ export const WorkspaceManagerTemplate = html<WorkspaceManager>`
|
|
|
16
16
|
Load Workspace
|
|
17
17
|
</rapid-button>
|
|
18
18
|
</div>
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const workspaceSaveModalPartial: ViewTemplate<WorkspaceManager> = html`
|
|
19
22
|
<rapid-modal ${ref('saveModal')}>
|
|
20
23
|
<h2 slot="top">Save Workspace</h2>
|
|
21
24
|
<div class="dialog-content">
|
|
@@ -44,14 +47,15 @@ export const WorkspaceManagerTemplate = html<WorkspaceManager>`
|
|
|
44
47
|
<rapid-label>
|
|
45
48
|
Description (optional, max ${WORKSPACE_DESCRIPTION_MAX} characters):
|
|
46
49
|
</rapid-label>
|
|
47
|
-
<
|
|
50
|
+
<rapid-text-area
|
|
48
51
|
class="save-field workspace-description-input"
|
|
52
|
+
maxlength="${WORKSPACE_DESCRIPTION_MAX}"
|
|
49
53
|
:value=${(x) => x.workspaceDescription}
|
|
50
54
|
@input=${(x, c) =>
|
|
51
55
|
x.updateWorkspaceDescription((c.event.target as HTMLTextAreaElement).value)}
|
|
52
56
|
placeholder="Add a description for this workspace"
|
|
53
57
|
rows="3"
|
|
54
|
-
></
|
|
58
|
+
></rapid-text-area>
|
|
55
59
|
${when(
|
|
56
60
|
(x) => x.workspaceName && x.isWorkspaceExisting(x.workspaceName),
|
|
57
61
|
html`
|
|
@@ -100,14 +104,15 @@ export const WorkspaceManagerTemplate = html<WorkspaceManager>`
|
|
|
100
104
|
)}
|
|
101
105
|
</rapid-radio-group>
|
|
102
106
|
<rapid-label>Description (optional):</rapid-label>
|
|
103
|
-
<
|
|
104
|
-
class="save-field
|
|
107
|
+
<rapid-text-area
|
|
108
|
+
class="save-field"
|
|
105
109
|
:value=${(x) => x.workspaceDescription}
|
|
110
|
+
maxlength="${WORKSPACE_DESCRIPTION_MAX}"
|
|
106
111
|
@input=${(x, c) =>
|
|
107
112
|
x.updateWorkspaceDescription((c.event.target as HTMLTextAreaElement).value)}
|
|
108
113
|
placeholder="Add a description for this workspace"
|
|
109
114
|
rows="3"
|
|
110
|
-
></
|
|
115
|
+
></rapid-text-area>
|
|
111
116
|
<div class="warning-message">
|
|
112
117
|
<rapid-icon name="triangle-exclamation"></rapid-icon>
|
|
113
118
|
This will permanently replace the selected workspace. This action cannot be undone.
|
|
@@ -230,6 +235,9 @@ export const WorkspaceManagerTemplate = html<WorkspaceManager>`
|
|
|
230
235
|
<div class="workspace-dialog-boundary" ${ref('sharedWorkspaceDialogBoundary')}></div>
|
|
231
236
|
</div>
|
|
232
237
|
</rapid-modal>
|
|
238
|
+
`;
|
|
239
|
+
|
|
240
|
+
export const workspaceLoadModalPartial: ViewTemplate<WorkspaceManager> = html`
|
|
233
241
|
<rapid-modal ${ref('loadModal')}>
|
|
234
242
|
<h2 slot="top">Load Workspace</h2>
|
|
235
243
|
<div class="dialog-content">
|
|
@@ -244,15 +252,16 @@ export const WorkspaceManagerTemplate = html<WorkspaceManager>`
|
|
|
244
252
|
${when(
|
|
245
253
|
(x) => !x.applyingWorkspace,
|
|
246
254
|
html<WorkspaceManager>`
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
() =>
|
|
251
|
-
|
|
255
|
+
${when(
|
|
256
|
+
() => false,
|
|
257
|
+
html<WorkspaceManager>`
|
|
258
|
+
<rapid-segmented-control value="${sync((x) => x.loadMode)}">
|
|
259
|
+
<rapid-segmented-item value="MY">My Workspaces</rapid-segmented-item>
|
|
260
|
+
|
|
252
261
|
<rapid-segmented-item value="SHARED">Shared Workspaces</rapid-segmented-item>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
262
|
+
</rapid-segmented-control>
|
|
263
|
+
`,
|
|
264
|
+
)}
|
|
256
265
|
${when(
|
|
257
266
|
(x) => x.loadMode === 'MY',
|
|
258
267
|
html`
|
|
@@ -355,3 +364,7 @@ export const WorkspaceManagerTemplate = html<WorkspaceManager>`
|
|
|
355
364
|
<div class="workspace-dialog-boundary" ${ref('dialogBoundary')}></div>
|
|
356
365
|
</rapid-modal>
|
|
357
366
|
`;
|
|
367
|
+
|
|
368
|
+
export const WorkspaceManagerTemplate = html<WorkspaceManager>`
|
|
369
|
+
${workspaceHeaderPartial} ${workspaceSaveModalPartial} ${workspaceLoadModalPartial}
|
|
370
|
+
`;
|
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
showNotificationToast,
|
|
5
5
|
} from '@genesislcap/foundation-notifications';
|
|
6
6
|
import { Modal } from '@genesislcap/foundation-ui';
|
|
7
|
-
import { customElement, observable } from '@
|
|
8
|
-
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
7
|
+
import { FoundationElement, customElement, observable } from '@genesislcap/web-core';
|
|
9
8
|
import {
|
|
10
9
|
LayoutRegistry,
|
|
11
10
|
GridRegistry,
|
|
@@ -239,6 +238,7 @@ export class WorkspaceManager extends FoundationElement {
|
|
|
239
238
|
const sharedData = await this.requestSharedWorkspace(shared.id);
|
|
240
239
|
if (!sharedData?.length) {
|
|
241
240
|
console.warn('workspace has no data');
|
|
241
|
+
this.applyingWorkspace = false;
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
const dataJoined = sharedData.map((d) => d.WORKSPACE_DATA).join('');
|
package/docs/.gitkeep
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|