@jskit-ai/workspaces-web 0.1.8 → 0.1.10
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/package.descriptor.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default Object.freeze({
|
|
2
2
|
packageVersion: 1,
|
|
3
3
|
packageId: "@jskit-ai/workspaces-web",
|
|
4
|
-
version: "0.1.
|
|
4
|
+
version: "0.1.10",
|
|
5
5
|
kind: "runtime",
|
|
6
6
|
description: "Workspace web module: workspace selector, tools widget, workspace surfaces, and members/settings UI.",
|
|
7
7
|
dependsOn: [
|
|
@@ -45,8 +45,7 @@ export default Object.freeze({
|
|
|
45
45
|
"users.web.workspace.tools.widget",
|
|
46
46
|
"users.web.workspace-settings.menu-item",
|
|
47
47
|
"users.web.workspace-members.menu-item",
|
|
48
|
-
"users.web.members-admin.element"
|
|
49
|
-
"users.web.workspace-settings.element"
|
|
48
|
+
"users.web.members-admin.element"
|
|
50
49
|
]
|
|
51
50
|
}
|
|
52
51
|
},
|
|
@@ -54,8 +53,8 @@ export default Object.freeze({
|
|
|
54
53
|
placements: {
|
|
55
54
|
outlets: [
|
|
56
55
|
{
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
target: "admin-settings:primary-menu",
|
|
57
|
+
defaultLinkComponentToken: "local.main.ui.surface-aware-menu-link-item",
|
|
59
58
|
surfaces: ["admin"],
|
|
60
59
|
source: "templates/src/pages/admin/workspace/settings.vue"
|
|
61
60
|
}
|
|
@@ -63,8 +62,7 @@ export default Object.freeze({
|
|
|
63
62
|
contributions: [
|
|
64
63
|
{
|
|
65
64
|
id: "users.workspace.selector",
|
|
66
|
-
|
|
67
|
-
position: "top-left",
|
|
65
|
+
target: "shell-layout:top-left",
|
|
68
66
|
surfaces: ["*"],
|
|
69
67
|
order: 200,
|
|
70
68
|
componentToken: "users.web.workspace.selector",
|
|
@@ -73,8 +71,7 @@ export default Object.freeze({
|
|
|
73
71
|
},
|
|
74
72
|
{
|
|
75
73
|
id: "users.account.invites.cue",
|
|
76
|
-
|
|
77
|
-
position: "top-right",
|
|
74
|
+
target: "shell-layout:top-right",
|
|
78
75
|
surfaces: ["*"],
|
|
79
76
|
order: 850,
|
|
80
77
|
componentToken: "local.main.account.pending-invites.cue",
|
|
@@ -83,8 +80,7 @@ export default Object.freeze({
|
|
|
83
80
|
},
|
|
84
81
|
{
|
|
85
82
|
id: "users.workspace.tools.widget",
|
|
86
|
-
|
|
87
|
-
position: "top-right",
|
|
83
|
+
target: "shell-layout:top-right",
|
|
88
84
|
surfaces: ["admin"],
|
|
89
85
|
order: 900,
|
|
90
86
|
componentToken: "users.web.workspace.tools.widget",
|
|
@@ -92,8 +88,7 @@ export default Object.freeze({
|
|
|
92
88
|
},
|
|
93
89
|
{
|
|
94
90
|
id: "users.workspace.menu.workspace-settings",
|
|
95
|
-
|
|
96
|
-
position: "primary-menu",
|
|
91
|
+
target: "workspace-tools:primary-menu",
|
|
97
92
|
surfaces: ["admin"],
|
|
98
93
|
order: 100,
|
|
99
94
|
componentToken: "users.web.workspace-settings.menu-item",
|
|
@@ -101,22 +96,12 @@ export default Object.freeze({
|
|
|
101
96
|
},
|
|
102
97
|
{
|
|
103
98
|
id: "users.workspace.menu.members",
|
|
104
|
-
|
|
105
|
-
position: "primary-menu",
|
|
99
|
+
target: "workspace-tools:primary-menu",
|
|
106
100
|
surfaces: ["admin"],
|
|
107
101
|
order: 200,
|
|
108
102
|
componentToken: "users.web.workspace-members.menu-item",
|
|
109
103
|
source: "mutations.text#users-web-placement-block"
|
|
110
104
|
},
|
|
111
|
-
{
|
|
112
|
-
id: "users.workspace.settings.general",
|
|
113
|
-
host: "admin-settings",
|
|
114
|
-
position: "primary-menu",
|
|
115
|
-
surfaces: ["admin"],
|
|
116
|
-
order: 100,
|
|
117
|
-
componentToken: "users.web.shell.surface-aware-menu-link-item",
|
|
118
|
-
source: "mutations.text#users-web-workspace-settings-general-placement"
|
|
119
|
-
}
|
|
120
105
|
]
|
|
121
106
|
}
|
|
122
107
|
}
|
|
@@ -124,8 +109,8 @@ export default Object.freeze({
|
|
|
124
109
|
mutations: {
|
|
125
110
|
dependencies: {
|
|
126
111
|
runtime: {
|
|
127
|
-
"@jskit-ai/workspaces-core": "0.1.
|
|
128
|
-
"@jskit-ai/users-web": "0.1.
|
|
112
|
+
"@jskit-ai/workspaces-core": "0.1.10",
|
|
113
|
+
"@jskit-ai/users-web": "0.1.49"
|
|
129
114
|
},
|
|
130
115
|
dev: {}
|
|
131
116
|
},
|
|
@@ -244,7 +229,7 @@ export default Object.freeze({
|
|
|
244
229
|
from: "templates/src/pages/admin/workspace/settings/index.vue",
|
|
245
230
|
toSurface: "admin",
|
|
246
231
|
toSurfacePath: "workspace/settings/index.vue",
|
|
247
|
-
reason: "Install workspace settings
|
|
232
|
+
reason: "Install workspace settings index stub scaffold for app-owned landing or redirect behavior.",
|
|
248
233
|
category: "workspaces-web",
|
|
249
234
|
id: "users-web-page-admin-workspace-settings",
|
|
250
235
|
when: {
|
|
@@ -259,7 +244,7 @@ export default Object.freeze({
|
|
|
259
244
|
file: "src/placement.js",
|
|
260
245
|
position: "bottom",
|
|
261
246
|
skipIfContains: "id: \"users.workspace.selector\"",
|
|
262
|
-
value: "\naddPlacement({\n id: \"users.workspace.selector\",\n
|
|
247
|
+
value: "\naddPlacement({\n id: \"users.workspace.selector\",\n target: \"shell-layout:top-left\",\n surfaces: [\"*\"],\n order: 200,\n componentToken: \"users.web.workspace.selector\",\n props: {\n allowOnNonWorkspaceSurface: true,\n targetSurfaceId: \"app\"\n },\n when: ({ auth }) => {\n return Boolean(auth?.authenticated);\n }\n});\n\naddPlacement({\n id: \"users.account.invites.cue\",\n target: \"shell-layout:top-right\",\n surfaces: [\"*\"],\n order: 850,\n componentToken: \"local.main.account.pending-invites.cue\",\n when: ({ auth }) => Boolean(auth?.authenticated)\n});\n\naddPlacement({\n id: \"users.workspace.tools.widget\",\n target: \"shell-layout:top-right\",\n surfaces: [\"admin\"],\n order: 900,\n componentToken: \"users.web.workspace.tools.widget\"\n});\n\naddPlacement({\n id: \"users.workspace.menu.workspace-settings\",\n target: \"workspace-tools:primary-menu\",\n surfaces: [\"admin\"],\n order: 100,\n componentToken: \"users.web.workspace-settings.menu-item\"\n});\n\naddPlacement({\n id: \"users.workspace.menu.members\",\n target: \"workspace-tools:primary-menu\",\n surfaces: [\"admin\"],\n order: 200,\n componentToken: \"users.web.workspace-members.menu-item\"\n});\n",
|
|
263
248
|
reason: "Append workspace placement entries into app-owned placement registry.",
|
|
264
249
|
category: "workspaces-web",
|
|
265
250
|
id: "users-web-placement-block",
|
|
@@ -288,21 +273,6 @@ export default Object.freeze({
|
|
|
288
273
|
reason: "Bind app-owned account pending invites cue component token into local main client provider registry.",
|
|
289
274
|
category: "workspaces-web",
|
|
290
275
|
id: "users-web-main-client-provider-account-invites-register"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
op: "append-text",
|
|
294
|
-
file: "src/placement.js",
|
|
295
|
-
position: "bottom",
|
|
296
|
-
skipIfContains: "id: \"users.workspace.settings.general\"",
|
|
297
|
-
value:
|
|
298
|
-
"\naddPlacement({\n id: \"users.workspace.settings.general\",\n host: \"admin-settings\",\n position: \"primary-menu\",\n surfaces: [\"admin\"],\n order: 100,\n componentToken: \"users.web.shell.surface-aware-menu-link-item\",\n props: {\n label: \"General\",\n surface: \"admin\",\n workspaceSuffix: \"/workspace/settings\",\n nonWorkspaceSuffix: \"/workspace/settings\"\n },\n when: ({ auth }) => Boolean(auth?.authenticated)\n});\n",
|
|
299
|
-
reason: "Append workspace settings general-page placement into app-owned placement registry.",
|
|
300
|
-
category: "workspaces-web",
|
|
301
|
-
id: "users-web-workspace-settings-general-placement",
|
|
302
|
-
when: {
|
|
303
|
-
config: "tenancyMode",
|
|
304
|
-
in: ["personal", "workspaces"]
|
|
305
|
-
}
|
|
306
276
|
}
|
|
307
277
|
]
|
|
308
278
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/workspaces-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"./client/providers/WorkspacesWebClientProvider": "./src/client/providers/WorkspacesWebClientProvider.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/users-web": "0.1.
|
|
13
|
+
"@jskit-ai/users-web": "0.1.49"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
2
|
+
// To redirect this settings shell to a child page, uncomment and edit the example below.
|
|
3
|
+
// definePage({
|
|
4
|
+
// redirect: (to) => `${to.path}/your_child_segment`
|
|
5
|
+
// });
|
|
3
6
|
</script>
|
|
4
7
|
|
|
5
|
-
<template
|
|
6
|
-
<WorkspaceSettingsClientElement />
|
|
7
|
-
</template>
|
|
8
|
+
<template />
|
|
@@ -15,7 +15,10 @@ import { RouterView } from "vue-router";
|
|
|
15
15
|
<v-row no-gutters>
|
|
16
16
|
<v-col cols="12" md="3" lg="2" class="pr-md-4 mb-4 mb-md-0">
|
|
17
17
|
<v-list nav density="comfortable" rounded="lg" border>
|
|
18
|
-
<ShellOutlet
|
|
18
|
+
<ShellOutlet
|
|
19
|
+
target="admin-settings:primary-menu"
|
|
20
|
+
default-link-component-token="local.main.ui.surface-aware-menu-link-item"
|
|
21
|
+
/>
|
|
19
22
|
</v-list>
|
|
20
23
|
</v-col>
|
|
21
24
|
|
|
@@ -11,7 +11,7 @@ const PACKAGE_DIR = path.resolve(TEST_DIRECTORY, "..");
|
|
|
11
11
|
function readSettingsOutlets() {
|
|
12
12
|
const outlets = descriptor?.metadata?.ui?.placements?.outlets;
|
|
13
13
|
return Array.isArray(outlets)
|
|
14
|
-
? outlets.filter((entry) => String(entry?.
|
|
14
|
+
? outlets.filter((entry) => String(entry?.target || "").trim() === "admin-settings:primary-menu")
|
|
15
15
|
: [];
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -22,35 +22,57 @@ function findContribution(id) {
|
|
|
22
22
|
: null;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
function findFileMutation(id) {
|
|
26
|
+
const fileMutations = descriptor?.mutations?.files;
|
|
27
|
+
return Array.isArray(fileMutations)
|
|
28
|
+
? fileMutations.find((entry) => String(entry?.id || "").trim() === id) || null
|
|
29
|
+
: null;
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
test("workspaces-web admin settings template exposes surface-derived settings outlets", async () => {
|
|
26
33
|
const source = await readFile(
|
|
27
34
|
path.join(PACKAGE_DIR, "templates", "src", "pages", "admin", "workspace", "settings.vue"),
|
|
28
35
|
"utf8"
|
|
29
36
|
);
|
|
30
37
|
|
|
31
|
-
assert.match(source,
|
|
38
|
+
assert.match(source, /target="admin-settings:primary-menu"/);
|
|
39
|
+
assert.match(source, /default-link-component-token="local\.main\.ui\.surface-aware-menu-link-item"/);
|
|
40
|
+
assert.match(source, /<RouterView \/>/);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test("workspaces-web admin settings index template is a simple developer-owned stub", async () => {
|
|
44
|
+
const source = await readFile(
|
|
45
|
+
path.join(PACKAGE_DIR, "templates", "src", "pages", "admin", "workspace", "settings", "index.vue"),
|
|
46
|
+
"utf8"
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
assert.match(source, /definePage/);
|
|
50
|
+
assert.match(source, /your_child_segment/);
|
|
32
51
|
});
|
|
33
52
|
|
|
34
|
-
test("workspaces-web descriptor metadata advertises admin settings outlets
|
|
53
|
+
test("workspaces-web descriptor metadata advertises admin settings outlets", () => {
|
|
35
54
|
assert.deepEqual(
|
|
36
55
|
readSettingsOutlets(),
|
|
37
56
|
[
|
|
38
57
|
{
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
target: "admin-settings:primary-menu",
|
|
59
|
+
defaultLinkComponentToken: "local.main.ui.surface-aware-menu-link-item",
|
|
41
60
|
surfaces: ["admin"],
|
|
42
61
|
source: "templates/src/pages/admin/workspace/settings.vue"
|
|
43
62
|
}
|
|
44
63
|
]
|
|
45
64
|
);
|
|
46
|
-
|
|
47
|
-
assert.deepEqual(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
assert.equal(findContribution("users.workspace.settings.general"), null);
|
|
66
|
+
assert.deepEqual(findFileMutation("users-web-page-admin-workspace-settings"), {
|
|
67
|
+
from: "templates/src/pages/admin/workspace/settings/index.vue",
|
|
68
|
+
toSurface: "admin",
|
|
69
|
+
toSurfacePath: "workspace/settings/index.vue",
|
|
70
|
+
reason: "Install workspace settings index stub scaffold for app-owned landing or redirect behavior.",
|
|
71
|
+
category: "workspaces-web",
|
|
72
|
+
id: "users-web-page-admin-workspace-settings",
|
|
73
|
+
when: {
|
|
74
|
+
config: "tenancyMode",
|
|
75
|
+
in: ["personal", "workspaces"]
|
|
76
|
+
}
|
|
55
77
|
});
|
|
56
78
|
});
|