@genesislcap/foundation-workspace 14.406.0-workspaces.7
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/api-extractor.json +5 -0
- package/dist/dts/index.d.ts +4 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/tsdoc-metadata.json +11 -0
- package/dist/dts/workspace/filter-registry.d.ts +34 -0
- package/dist/dts/workspace/filter-registry.d.ts.map +1 -0
- package/dist/dts/workspace/grid-register/grid-register.d.ts +23 -0
- package/dist/dts/workspace/grid-register/grid-register.d.ts.map +1 -0
- package/dist/dts/workspace/grid-register/grid-register.template.d.ts +4 -0
- package/dist/dts/workspace/grid-register/grid-register.template.d.ts.map +1 -0
- package/dist/dts/workspace/grid-register/index.d.ts +2 -0
- package/dist/dts/workspace/grid-register/index.d.ts.map +1 -0
- package/dist/dts/workspace/grid-registry.d.ts +47 -0
- package/dist/dts/workspace/grid-registry.d.ts.map +1 -0
- package/dist/dts/workspace/index.d.ts +9 -0
- package/dist/dts/workspace/index.d.ts.map +1 -0
- package/dist/dts/workspace/layout-registry.d.ts +27 -0
- package/dist/dts/workspace/layout-registry.d.ts.map +1 -0
- package/dist/dts/workspace/layout-wrapper/index.d.ts +2 -0
- package/dist/dts/workspace/layout-wrapper/index.d.ts.map +1 -0
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.d.ts +14 -0
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.d.ts.map +1 -0
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.template.d.ts +4 -0
- package/dist/dts/workspace/layout-wrapper/layout-wrapper.template.d.ts.map +1 -0
- package/dist/dts/workspace/workspace-state.d.ts +45 -0
- package/dist/dts/workspace/workspace-state.d.ts.map +1 -0
- package/dist/dts/workspace/workspace-state.types.d.ts +26 -0
- package/dist/dts/workspace/workspace-state.types.d.ts.map +1 -0
- package/dist/dts/workspace/workspace.types.d.ts +25 -0
- package/dist/dts/workspace/workspace.types.d.ts.map +1 -0
- package/dist/dts/workspace-components.d.ts +22 -0
- package/dist/dts/workspace-components.d.ts.map +1 -0
- package/dist/dts/workspace-manager/index.d.ts +2 -0
- package/dist/dts/workspace-manager/index.d.ts.map +1 -0
- package/dist/dts/workspace-manager/workspace-manager.d.ts +70 -0
- package/dist/dts/workspace-manager/workspace-manager.d.ts.map +1 -0
- package/dist/dts/workspace-manager/workspace-manager.styles.d.ts +2 -0
- package/dist/dts/workspace-manager/workspace-manager.styles.d.ts.map +1 -0
- package/dist/dts/workspace-manager/workspace-manager.template.d.ts +4 -0
- package/dist/dts/workspace-manager/workspace-manager.template.d.ts.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/workspace/filter-registry.js +47 -0
- package/dist/esm/workspace/grid-register/grid-register.js +136 -0
- package/dist/esm/workspace/grid-register/grid-register.template.js +4 -0
- package/dist/esm/workspace/grid-register/index.js +1 -0
- package/dist/esm/workspace/grid-registry.js +109 -0
- package/dist/esm/workspace/index.js +8 -0
- package/dist/esm/workspace/layout-registry.js +45 -0
- package/dist/esm/workspace/layout-wrapper/index.js +1 -0
- package/dist/esm/workspace/layout-wrapper/layout-wrapper.js +64 -0
- package/dist/esm/workspace/layout-wrapper/layout-wrapper.template.js +4 -0
- package/dist/esm/workspace/workspace-state.js +193 -0
- package/dist/esm/workspace/workspace-state.types.js +1 -0
- package/dist/esm/workspace/workspace.types.js +1 -0
- package/dist/esm/workspace-components.js +43 -0
- package/dist/esm/workspace-manager/index.js +1 -0
- package/dist/esm/workspace-manager/workspace-manager.js +436 -0
- package/dist/esm/workspace-manager/workspace-manager.styles.js +138 -0
- package/dist/esm/workspace-manager/workspace-manager.template.js +259 -0
- package/dist/foundation-workspace.api.json +3614 -0
- package/dist/foundation-workspace.d.ts +343 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/.gitkeep +1 -0
- package/docs/api/foundation-workspace.defaultfilterregistry.md +17 -0
- package/docs/api/foundation-workspace.defaultgridregistry.md +17 -0
- package/docs/api/foundation-workspace.defaultlayoutregistry.md +18 -0
- package/docs/api/foundation-workspace.defaultworkspacestate._constructor_.md +65 -0
- package/docs/api/foundation-workspace.defaultworkspacestate.auth.md +14 -0
- package/docs/api/foundation-workspace.defaultworkspacestate.kvstorage.md +14 -0
- package/docs/api/foundation-workspace.defaultworkspacestate.md +115 -0
- package/docs/api/foundation-workspace.filterregistration.filterkey.md +14 -0
- package/docs/api/foundation-workspace.filterregistration.getfiltervalue.md +14 -0
- package/docs/api/foundation-workspace.filterregistration.md +98 -0
- package/docs/api/foundation-workspace.filterregistration.setfiltervalue.md +14 -0
- package/docs/api/foundation-workspace.filterregistry.applyfiltersvalues.md +53 -0
- package/docs/api/foundation-workspace.filterregistry.getallfiltersvalues.md +18 -0
- package/docs/api/foundation-workspace.filterregistry.md +16 -0
- package/docs/api/foundation-workspace.filterregistry.registerfilter.md +81 -0
- package/docs/api/foundation-workspace.filterregistry.unregisterfilter.md +53 -0
- package/docs/api/foundation-workspace.gridregister.gridkey.md +14 -0
- package/docs/api/foundation-workspace.gridregister.gridregistry.md +14 -0
- package/docs/api/foundation-workspace.gridregister.md +100 -0
- package/docs/api/foundation-workspace.gridregister.workspacestate.md +14 -0
- package/docs/api/foundation-workspace.gridregistration.columnapi.md +14 -0
- package/docs/api/foundation-workspace.gridregistration.gridapi.md +14 -0
- package/docs/api/foundation-workspace.gridregistration.gridkey.md +14 -0
- package/docs/api/foundation-workspace.gridregistration.md +98 -0
- package/docs/api/foundation-workspace.gridregistry.applyallgridssettings.md +53 -0
- package/docs/api/foundation-workspace.gridregistry.applygridsettings.md +72 -0
- package/docs/api/foundation-workspace.gridregistry.getallgridssettings.md +18 -0
- package/docs/api/foundation-workspace.gridregistry.getgrid.md +53 -0
- package/docs/api/foundation-workspace.gridregistry.md +16 -0
- package/docs/api/foundation-workspace.gridregistry.registergrid.md +81 -0
- package/docs/api/foundation-workspace.gridregistry.unregistergrid.md +53 -0
- package/docs/api/foundation-workspace.layoutregistry.applysavedlayouts.md +53 -0
- package/docs/api/foundation-workspace.layoutregistry.getlayoutsconfigs.md +18 -0
- package/docs/api/foundation-workspace.layoutregistry.md +16 -0
- package/docs/api/foundation-workspace.layoutregistry.registerlayout.md +67 -0
- package/docs/api/foundation-workspace.layoutregistry.unregisterlayout.md +53 -0
- package/docs/api/foundation-workspace.layoutwrapper.layoutkey.md +14 -0
- package/docs/api/foundation-workspace.layoutwrapper.layoutregistry.md +14 -0
- package/docs/api/foundation-workspace.layoutwrapper.md +81 -0
- package/docs/api/foundation-workspace.loadmode.md +16 -0
- package/docs/api/foundation-workspace.md +332 -0
- package/docs/api/foundation-workspace.savedfiltervalue.filterkey.md +14 -0
- package/docs/api/foundation-workspace.savedfiltervalue.md +79 -0
- package/docs/api/foundation-workspace.savedfiltervalue.value.md +14 -0
- package/docs/api/foundation-workspace.savedgridsettings.columnstate.md +14 -0
- package/docs/api/foundation-workspace.savedgridsettings.gridkey.md +14 -0
- package/docs/api/foundation-workspace.savedgridsettings.md +99 -0
- package/docs/api/foundation-workspace.savedgridsettings.savedat.md +14 -0
- package/docs/api/foundation-workspace.savedlayout.layout.md +14 -0
- package/docs/api/foundation-workspace.savedlayout.layoutkey.md +14 -0
- package/docs/api/foundation-workspace.savedlayout.md +79 -0
- package/docs/api/foundation-workspace.savedworkspace.description.md +14 -0
- package/docs/api/foundation-workspace.savedworkspace.filters.md +14 -0
- package/docs/api/foundation-workspace.savedworkspace.grids.md +14 -0
- package/docs/api/foundation-workspace.savedworkspace.layouts.md +14 -0
- package/docs/api/foundation-workspace.savedworkspace.md +174 -0
- package/docs/api/foundation-workspace.savedworkspace.name.md +14 -0
- package/docs/api/foundation-workspace.savedworkspace.savedat.md +14 -0
- package/docs/api/foundation-workspace.savedworkspace.username.md +14 -0
- package/docs/api/foundation-workspace.sharedworkspace.createdon.md +14 -0
- package/docs/api/foundation-workspace.sharedworkspace.data.md +14 -0
- package/docs/api/foundation-workspace.sharedworkspace.description.md +14 -0
- package/docs/api/foundation-workspace.sharedworkspace.id.md +14 -0
- package/docs/api/foundation-workspace.sharedworkspace.md +174 -0
- package/docs/api/foundation-workspace.sharedworkspace.modifiedon.md +14 -0
- package/docs/api/foundation-workspace.sharedworkspace.name.md +14 -0
- package/docs/api/foundation-workspace.sharedworkspace.username.md +14 -0
- package/docs/api/foundation-workspace.workspacecomponents.md +29 -0
- package/docs/api/foundation-workspace.workspacemanager.applyingworkspace.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.auth.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.canshareworkspace.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.connect.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.dialogboundary.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.filterregistry.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.gridregistry.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.isloading.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.layoutregistry.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.loadmodal.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.loadmode.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.md +442 -0
- package/docs/api/foundation-workspace.workspacemanager.savedworkspaces.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.savemodal.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.savemode.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.selectedworkspacetooverwrite.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.sharedworkspacedialogboundary.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.sharedworkspaces.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.workspacedescription.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.workspacename.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.workspacestate.md +14 -0
- package/docs/api/foundation-workspace.workspacemanager.workspacetoshare.md +14 -0
- package/docs/api/foundation-workspace.workspacestate.deleteworkspace.md +53 -0
- package/docs/api/foundation-workspace.workspacestate.getcurrentworkspace.md +18 -0
- package/docs/api/foundation-workspace.workspacestate.getsavedworkspaces.md +18 -0
- package/docs/api/foundation-workspace.workspacestate.loadworkspace.md +53 -0
- package/docs/api/foundation-workspace.workspacestate.md +16 -0
- package/docs/api/foundation-workspace.workspacestate.saveworkspace.md +111 -0
- package/docs/api/foundation-workspace.workspacestate.setcurrentworkspace.md +53 -0
- package/docs/api/index.md +30 -0
- package/docs/api-report.md.api.md +372 -0
- package/license.txt +46 -0
- package/package.json +69 -0
- package/src/index.ts +3 -0
- package/src/workspace/filter-registry.ts +80 -0
- package/src/workspace/grid-register/grid-register.template.ts +7 -0
- package/src/workspace/grid-register/grid-register.ts +142 -0
- package/src/workspace/grid-register/index.ts +1 -0
- package/src/workspace/grid-registry.ts +157 -0
- package/src/workspace/index.ts +8 -0
- package/src/workspace/layout-registry.ts +58 -0
- package/src/workspace/layout-wrapper/index.ts +1 -0
- package/src/workspace/layout-wrapper/layout-wrapper.template.ts +7 -0
- package/src/workspace/layout-wrapper/layout-wrapper.ts +66 -0
- package/src/workspace/workspace-state.ts +234 -0
- package/src/workspace/workspace-state.types.ts +27 -0
- package/src/workspace/workspace.types.ts +26 -0
- package/src/workspace-components.ts +51 -0
- package/src/workspace-manager/index.ts +1 -0
- package/src/workspace-manager/workspace-manager.styles.ts +139 -0
- package/src/workspace-manager/workspace-manager.template.ts +352 -0
- package/src/workspace-manager/workspace-manager.ts +420 -0
- package/temp/api-report.md.api.md +372 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { sync, whenElse } from '@genesislcap/foundation-utils';
|
|
2
|
+
import { html, ref, repeat, when } from '@microsoft/fast-element';
|
|
3
|
+
export const WORKSPACE_DESCRIPTION_MAX = 200;
|
|
4
|
+
export const WorkspaceManagerTemplate = html `
|
|
5
|
+
<div class="workspace-manager">
|
|
6
|
+
<rapid-button @click=${(x) => x.openSaveDialog()}>
|
|
7
|
+
<rapid-icon name="download"></rapid-icon>
|
|
8
|
+
Save Workspace
|
|
9
|
+
</rapid-button>
|
|
10
|
+
<rapid-button @click=${(x) => x.openLoadDialog()}>
|
|
11
|
+
<rapid-icon name="upload"></rapid-icon>
|
|
12
|
+
Load Workspace
|
|
13
|
+
</rapid-button>
|
|
14
|
+
</div>
|
|
15
|
+
<rapid-modal ${ref('saveModal')}>
|
|
16
|
+
<h2 slot="top">Save Workspace</h2>
|
|
17
|
+
<div class="dialog-content">
|
|
18
|
+
<div class="save-mode-selector">
|
|
19
|
+
<rapid-segmented-control value="${sync((x) => x.saveMode)}">
|
|
20
|
+
<rapid-segmented-item value="create">Create</rapid-segmented-item>
|
|
21
|
+
<rapid-segmented-item value="overwrite">Overwrite</rapid-segmented-item>
|
|
22
|
+
${when((x) => x.canShareWorkspace, html `
|
|
23
|
+
<rapid-segmented-item value="shared">Share</rapid-segmented-item>
|
|
24
|
+
`)}
|
|
25
|
+
</rapid-segmented-control>
|
|
26
|
+
</div>
|
|
27
|
+
${when((x) => x.saveMode === 'create', html `
|
|
28
|
+
<rapid-label>Workspace Name:</rapid-label>
|
|
29
|
+
<rapid-text-field
|
|
30
|
+
class="save-field"
|
|
31
|
+
:value=${(x) => x.workspaceName}
|
|
32
|
+
@input=${(x, c) => (x.workspaceName = c.event.target.value)}
|
|
33
|
+
placeholder="Enter workspace name"
|
|
34
|
+
></rapid-text-field>
|
|
35
|
+
<rapid-label>
|
|
36
|
+
Description (optional, max ${WORKSPACE_DESCRIPTION_MAX} characters):
|
|
37
|
+
</rapid-label>
|
|
38
|
+
<textarea
|
|
39
|
+
class="save-field workspace-description-input"
|
|
40
|
+
:value=${(x) => x.workspaceDescription}
|
|
41
|
+
@input=${(x, c) => x.updateWorkspaceDescription(c.event.target.value)}
|
|
42
|
+
placeholder="Add a description for this workspace"
|
|
43
|
+
rows="3"
|
|
44
|
+
></textarea>
|
|
45
|
+
${when((x) => x.workspaceName && x.isWorkspaceExisting(x.workspaceName), html `
|
|
46
|
+
<div class="warning-message">
|
|
47
|
+
<rapid-icon name="triangle-exclamation"></rapid-icon>
|
|
48
|
+
A workspace with this name already exists. Use "Overwrite Existing Workspace" to
|
|
49
|
+
replace it.
|
|
50
|
+
</div>
|
|
51
|
+
`)}
|
|
52
|
+
`)}
|
|
53
|
+
${when((x) => x.saveMode === 'overwrite', html `
|
|
54
|
+
${when((x) => x.savedWorkspaces.length === 0, html `
|
|
55
|
+
<div class="empty-state">No saved workspaces to overwrite</div>
|
|
56
|
+
`)}
|
|
57
|
+
<rapid-label>Select Workspace to Overwrite:</rapid-label>
|
|
58
|
+
<rapid-radio-group
|
|
59
|
+
class="workspace-list"
|
|
60
|
+
value=${sync((x) => x.selectedWorkspaceToOverwrite)}
|
|
61
|
+
orientation="vertical"
|
|
62
|
+
>
|
|
63
|
+
${repeat((x) => x.savedWorkspaces, html `
|
|
64
|
+
<rapid-radio value=${(x) => x.name} class="workspace-item">
|
|
65
|
+
<div class="workspace-info">
|
|
66
|
+
<div class="workspace-name">${(x) => x.name}</div>
|
|
67
|
+
<div class="workspace-date">
|
|
68
|
+
Saved: ${(x) => new Date(x.savedAt).toLocaleString()}
|
|
69
|
+
</div>
|
|
70
|
+
${when((w) => w.description, html `
|
|
71
|
+
<div class="workspace-description">${(w) => w.description}</div>
|
|
72
|
+
`)}
|
|
73
|
+
</div>
|
|
74
|
+
</rapid-radio>
|
|
75
|
+
`)}
|
|
76
|
+
</rapid-radio-group>
|
|
77
|
+
<rapid-label>Description (optional):</rapid-label>
|
|
78
|
+
<textarea
|
|
79
|
+
class="save-field workspace-description-input"
|
|
80
|
+
:value=${(x) => x.workspaceDescription}
|
|
81
|
+
@input=${(x, c) => x.updateWorkspaceDescription(c.event.target.value)}
|
|
82
|
+
placeholder="Add a description for this workspace"
|
|
83
|
+
rows="3"
|
|
84
|
+
></textarea>
|
|
85
|
+
<div class="warning-message">
|
|
86
|
+
<rapid-icon name="triangle-exclamation"></rapid-icon>
|
|
87
|
+
This will permanently replace the selected workspace. This action cannot be undone.
|
|
88
|
+
</div>
|
|
89
|
+
`)}
|
|
90
|
+
${when((x) => x.saveMode === 'shared', html `
|
|
91
|
+
<h3>Share existing workspace:</h3>
|
|
92
|
+
${whenElse((x) => x.savedWorkspaces.length === 0, html `
|
|
93
|
+
<div class="empty-state">No saved workspaces to share</div>
|
|
94
|
+
`, html `
|
|
95
|
+
<div class="workspace-list">
|
|
96
|
+
${repeat((x) => x.savedWorkspaces, html `
|
|
97
|
+
<div class="workspace-item">
|
|
98
|
+
<div class="workspace-info">
|
|
99
|
+
<div class="workspace-name">${(w) => w.name}</div>
|
|
100
|
+
<div class="workspace-date">
|
|
101
|
+
Saved: ${(w) => new Date(w.savedAt).toLocaleString()}
|
|
102
|
+
</div>
|
|
103
|
+
${when((w) => w.description, html `
|
|
104
|
+
<div class="workspace-description">${(w) => w.description}</div>
|
|
105
|
+
`)}
|
|
106
|
+
</div>
|
|
107
|
+
<div class="button-group">
|
|
108
|
+
<rapid-button
|
|
109
|
+
appearance="primary"
|
|
110
|
+
@click=${(w, c) => c.parent.shareExistingWorkspace(w.name)}
|
|
111
|
+
>
|
|
112
|
+
Share
|
|
113
|
+
</rapid-button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
`)}
|
|
117
|
+
</div>
|
|
118
|
+
`)}
|
|
119
|
+
<h3>My Shared Workspaces</h3>
|
|
120
|
+
${whenElse((x) => x.sharedWorkspaces.filter((w) => { var _a, _b; return w.userName === ((_b = (_a = x.auth) === null || _a === void 0 ? void 0 : _a.loggedUserResult) === null || _b === void 0 ? void 0 : _b.username); })
|
|
121
|
+
.length === 0, html `
|
|
122
|
+
<div class="empty-state">You have not shared any workspaces</div>
|
|
123
|
+
`, html `
|
|
124
|
+
<div class="workspace-list">
|
|
125
|
+
${repeat((x) => x.sharedWorkspaces.filter((w) => { var _a, _b; return w.userName === ((_b = (_a = x.auth) === null || _a === void 0 ? void 0 : _a.loggedUserResult) === null || _b === void 0 ? void 0 : _b.username); }), html `
|
|
126
|
+
<div class="workspace-item">
|
|
127
|
+
<div class="workspace-info">
|
|
128
|
+
<div class="workspace-name">${(w) => w.name}</div>
|
|
129
|
+
<div class="workspace-date">
|
|
130
|
+
Shared on
|
|
131
|
+
${(w) => new Date((w.modifiedOn || w.createdOn)).toLocaleString()}
|
|
132
|
+
</div>
|
|
133
|
+
${when((w) => w.description, html `
|
|
134
|
+
<div class="workspace-description">${(w) => w.description}</div>
|
|
135
|
+
`)}
|
|
136
|
+
</div>
|
|
137
|
+
<div class="button-group">
|
|
138
|
+
<rapid-button
|
|
139
|
+
appearance="primary"
|
|
140
|
+
@click=${(w, c) => c.parent.modifySharedWorkspace(w)}
|
|
141
|
+
>
|
|
142
|
+
Save
|
|
143
|
+
</rapid-button>
|
|
144
|
+
<rapid-button
|
|
145
|
+
appearance="danger"
|
|
146
|
+
@click=${(w, c) => c.parent.confirmDeleteSharedWorkspace(w)}
|
|
147
|
+
>
|
|
148
|
+
Delete
|
|
149
|
+
</rapid-button>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
`)}
|
|
153
|
+
</div>
|
|
154
|
+
`)}
|
|
155
|
+
`)}
|
|
156
|
+
<div class="button-group">
|
|
157
|
+
<rapid-button
|
|
158
|
+
@click=${(x) => x.saveWorkspace()}
|
|
159
|
+
appearance="primary"
|
|
160
|
+
?disabled=${(x) => (x.saveMode === 'create' && !x.workspaceName.trim()) ||
|
|
161
|
+
(x.saveMode === 'overwrite' && !x.selectedWorkspaceToOverwrite) ||
|
|
162
|
+
x.saveMode === 'shared' ||
|
|
163
|
+
(x.workspaceName && x.isWorkspaceExisting(x.workspaceName))}
|
|
164
|
+
>
|
|
165
|
+
${(x) => x.saveMode === 'create' ? 'Create' : x.saveMode === 'overwrite' ? 'Overwrite' : 'Save'}
|
|
166
|
+
</rapid-button>
|
|
167
|
+
<rapid-button appearance="outline" @click=${(x) => x.closeSaveDialog()}>
|
|
168
|
+
Cancel
|
|
169
|
+
</rapid-button>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="workspace-dialog-boundary" ${ref('sharedWorkspaceDialogBoundary')}></div>
|
|
172
|
+
</div>
|
|
173
|
+
</rapid-modal>
|
|
174
|
+
<rapid-modal ${ref('loadModal')}>
|
|
175
|
+
<h2 slot="top">Load Workspace</h2>
|
|
176
|
+
<div class="dialog-content">
|
|
177
|
+
${when((x) => x.applyingWorkspace || x.isLoading, html `
|
|
178
|
+
<div class="loading-container">
|
|
179
|
+
<div>Loading...</div>
|
|
180
|
+
</div>
|
|
181
|
+
`)}
|
|
182
|
+
${when((x) => !x.applyingWorkspace, html `
|
|
183
|
+
<rapid-segmented-control value="${sync((x) => x.loadMode)}">
|
|
184
|
+
<rapid-segmented-item value="MY">My Workspaces</rapid-segmented-item>
|
|
185
|
+
<rapid-segmented-item value="SHARED">Shared Workspaces</rapid-segmented-item>
|
|
186
|
+
</rapid-segmented-control>
|
|
187
|
+
${when((x) => x.loadMode === 'MY', html `
|
|
188
|
+
<div class="workspace-list">
|
|
189
|
+
${repeat((x) => x.savedWorkspaces, html `
|
|
190
|
+
<div class="workspace-item">
|
|
191
|
+
<div class="workspace-info">
|
|
192
|
+
<div class="workspace-name">${(w) => w.name}</div>
|
|
193
|
+
<div class="workspace-date">
|
|
194
|
+
Saved: ${(w) => new Date(w.savedAt).toLocaleString()}
|
|
195
|
+
</div>
|
|
196
|
+
${when((w) => w.description, html `
|
|
197
|
+
<div class="workspace-description">${(w) => w.description}</div>
|
|
198
|
+
`)}
|
|
199
|
+
</div>
|
|
200
|
+
<div class="button-group">
|
|
201
|
+
<rapid-button
|
|
202
|
+
appearance="primary"
|
|
203
|
+
@click=${(w, c) => c.parent.loadWorkspace(w.name)}
|
|
204
|
+
>
|
|
205
|
+
Load
|
|
206
|
+
</rapid-button>
|
|
207
|
+
<rapid-button
|
|
208
|
+
appearance="danger"
|
|
209
|
+
@click=${(w, c) => c.parent.confirmDeleteWorkspace(w.name)}
|
|
210
|
+
>
|
|
211
|
+
Delete
|
|
212
|
+
</rapid-button>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
`)}
|
|
216
|
+
${when((x) => x.savedWorkspaces.length === 0, html `
|
|
217
|
+
<div class="empty-state">No saved workspaces found</div>
|
|
218
|
+
`)}
|
|
219
|
+
</div>
|
|
220
|
+
`)}
|
|
221
|
+
${when((x) => x.loadMode === 'SHARED', html `
|
|
222
|
+
<div class="workspace-section">
|
|
223
|
+
<div class="workspace-list">
|
|
224
|
+
${repeat((x) => x.sharedWorkspaces, html `
|
|
225
|
+
<div class="workspace-item">
|
|
226
|
+
<div class="workspace-info">
|
|
227
|
+
<div class="workspace-name">${(w) => w.name}</div>
|
|
228
|
+
<div class="workspace-date">
|
|
229
|
+
Shared by ${(w) => w.userName} ·
|
|
230
|
+
${(w) => new Date((w.modifiedOn || w.createdOn)).toLocaleString()}
|
|
231
|
+
</div>
|
|
232
|
+
${when((w) => w.description, html `
|
|
233
|
+
<div class="workspace-description">${(w) => w.description}</div>
|
|
234
|
+
`)}
|
|
235
|
+
</div>
|
|
236
|
+
<div class="button-group">
|
|
237
|
+
<rapid-button
|
|
238
|
+
appearance="primary"
|
|
239
|
+
@click=${(w, c) => c.parent.loadSharedWorkspace(w)}
|
|
240
|
+
>
|
|
241
|
+
Load
|
|
242
|
+
</rapid-button>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
`)}
|
|
246
|
+
</div>
|
|
247
|
+
${when((x) => x.sharedWorkspaces.length === 0, html `
|
|
248
|
+
<div class="empty-state">No shared workspaces available</div>
|
|
249
|
+
`)}
|
|
250
|
+
</div>
|
|
251
|
+
`)}
|
|
252
|
+
`)}
|
|
253
|
+
<div class="button-group">
|
|
254
|
+
<rapid-button appearance="outline" @click=${(x) => x.closeLoadDialog()}>Close</rapid-button>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
<div class="workspace-dialog-boundary" ${ref('dialogBoundary')}></div>
|
|
258
|
+
</rapid-modal>
|
|
259
|
+
`;
|