@jskit-ai/workspaces-web 0.1.27 → 0.1.29
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 +62 -5
- package/package.json +8 -7
- package/src/client/providers/WorkspacesWebClientProvider.js +0 -12
- package/templates/packages/main/src/client/components/AccountSettingsInvitesSection.vue +7 -0
- package/test/exportsContract.test.js +1 -0
- package/test/settingsPlacementContract.test.js +39 -0
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.29",
|
|
5
5
|
kind: "runtime",
|
|
6
6
|
description: "Workspace web module: workspace selector, tools widget, workspace surfaces, and members/settings UI.",
|
|
7
7
|
dependsOn: [
|
|
@@ -37,6 +37,10 @@ export default Object.freeze({
|
|
|
37
37
|
subpath: "./client",
|
|
38
38
|
summary: "Exports workspaces-web client provider registration surface."
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
subpath: "./client/components/AccountSettingsInvitesSection",
|
|
42
|
+
summary: "Exports the default account invites section component used by multihoming installs."
|
|
43
|
+
},
|
|
40
44
|
{
|
|
41
45
|
subpath: "./client/providers/WorkspacesWebClientProvider",
|
|
42
46
|
summary: "Exports workspaces-web client provider class."
|
|
@@ -56,8 +60,7 @@ export default Object.freeze({
|
|
|
56
60
|
"workspaces.web.workspace-members.menu-item",
|
|
57
61
|
"workspaces.web.members-admin.element",
|
|
58
62
|
"workspaces.web.bootstrap-placement.runtime",
|
|
59
|
-
"workspaces.web.scope-support"
|
|
60
|
-
"workspaces.web.account-settings.section.invites"
|
|
63
|
+
"workspaces.web.scope-support"
|
|
61
64
|
]
|
|
62
65
|
}
|
|
63
66
|
},
|
|
@@ -117,6 +120,15 @@ export default Object.freeze({
|
|
|
117
120
|
when: "auth.authenticated === true",
|
|
118
121
|
source: "mutations.text#workspaces-web-placement-block"
|
|
119
122
|
},
|
|
123
|
+
{
|
|
124
|
+
id: "workspaces.account.settings.invites",
|
|
125
|
+
target: "account-settings:sections",
|
|
126
|
+
surfaces: ["account"],
|
|
127
|
+
order: 400,
|
|
128
|
+
componentToken: "local.main.account-settings.section.invites",
|
|
129
|
+
when: "auth.authenticated === true && workspaceInvitesEnabled === true",
|
|
130
|
+
source: "mutations.text#workspaces-web-account-settings-placement"
|
|
131
|
+
},
|
|
120
132
|
{
|
|
121
133
|
id: "workspaces.workspace.tools.widget",
|
|
122
134
|
target: "shell-layout:top-right",
|
|
@@ -148,8 +160,8 @@ export default Object.freeze({
|
|
|
148
160
|
mutations: {
|
|
149
161
|
dependencies: {
|
|
150
162
|
runtime: {
|
|
151
|
-
"@jskit-ai/workspaces-core": "0.1.
|
|
152
|
-
"@jskit-ai/users-web": "0.1.
|
|
163
|
+
"@jskit-ai/workspaces-core": "0.1.29",
|
|
164
|
+
"@jskit-ai/users-web": "0.1.68",
|
|
153
165
|
"vuetify": "^4.0.0"
|
|
154
166
|
},
|
|
155
167
|
dev: {}
|
|
@@ -171,6 +183,13 @@ export default Object.freeze({
|
|
|
171
183
|
category: "workspaces-web",
|
|
172
184
|
id: "users-web-main-component-account-pending-invites-cue"
|
|
173
185
|
},
|
|
186
|
+
{
|
|
187
|
+
from: "templates/packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
188
|
+
to: "packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
189
|
+
reason: "Install app-owned account invites section scaffold for multihoming account settings.",
|
|
190
|
+
category: "workspaces-web",
|
|
191
|
+
id: "users-web-main-component-account-settings-invites-section"
|
|
192
|
+
},
|
|
174
193
|
{
|
|
175
194
|
from: "templates/src/components/WorkspaceNotFoundCard.vue",
|
|
176
195
|
to: "src/components/WorkspaceNotFoundCard.vue",
|
|
@@ -308,6 +327,21 @@ export default Object.freeze({
|
|
|
308
327
|
in: ["personal", "workspaces"]
|
|
309
328
|
}
|
|
310
329
|
},
|
|
330
|
+
{
|
|
331
|
+
op: "append-text",
|
|
332
|
+
file: "src/placement.js",
|
|
333
|
+
position: "bottom",
|
|
334
|
+
skipIfContains: "id: \"workspaces.account.settings.invites\"",
|
|
335
|
+
value:
|
|
336
|
+
"\naddPlacement({\n id: \"workspaces.account.settings.invites\",\n target: \"account-settings:sections\",\n surfaces: [\"account\"],\n order: 400,\n componentToken: \"local.main.account-settings.section.invites\",\n props: {\n title: \"Invites\",\n value: \"invites\",\n usesSharedRuntime: false\n },\n when: ({ auth, workspaceInvitesEnabled }) => auth?.authenticated === true && workspaceInvitesEnabled === true\n});\n",
|
|
337
|
+
reason: "Append workspaces-web account settings invites section placement into app-owned placement registry.",
|
|
338
|
+
category: "workspaces-web",
|
|
339
|
+
id: "workspaces-web-account-settings-placement",
|
|
340
|
+
when: {
|
|
341
|
+
config: "tenancyMode",
|
|
342
|
+
in: ["personal", "workspaces"]
|
|
343
|
+
}
|
|
344
|
+
},
|
|
311
345
|
{
|
|
312
346
|
op: "append-text",
|
|
313
347
|
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
@@ -318,6 +352,17 @@ export default Object.freeze({
|
|
|
318
352
|
category: "workspaces-web",
|
|
319
353
|
id: "users-web-main-client-provider-account-invites-import"
|
|
320
354
|
},
|
|
355
|
+
{
|
|
356
|
+
op: "append-text",
|
|
357
|
+
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
358
|
+
position: "top",
|
|
359
|
+
skipIfContains: "import AccountSettingsInvitesSection from \"../components/AccountSettingsInvitesSection.vue\";",
|
|
360
|
+
value:
|
|
361
|
+
"import AccountSettingsInvitesSection from \"../components/AccountSettingsInvitesSection.vue\";\n",
|
|
362
|
+
reason: "Bind app-owned account invites section component into local main client provider imports.",
|
|
363
|
+
category: "workspaces-web",
|
|
364
|
+
id: "users-web-main-client-provider-account-settings-section-import"
|
|
365
|
+
},
|
|
321
366
|
{
|
|
322
367
|
op: "append-text",
|
|
323
368
|
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
@@ -328,6 +373,18 @@ export default Object.freeze({
|
|
|
328
373
|
reason: "Bind app-owned account pending invites cue component token into local main client provider registry.",
|
|
329
374
|
category: "workspaces-web",
|
|
330
375
|
id: "users-web-main-client-provider-account-invites-register"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
op: "append-text",
|
|
379
|
+
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
380
|
+
position: "bottom",
|
|
381
|
+
skipIfContains:
|
|
382
|
+
"registerMainClientComponent(\"local.main.account-settings.section.invites\", () => AccountSettingsInvitesSection);",
|
|
383
|
+
value:
|
|
384
|
+
"\nregisterMainClientComponent(\"local.main.account-settings.section.invites\", () => AccountSettingsInvitesSection);\n",
|
|
385
|
+
reason: "Bind app-owned account invites section component token into local main client provider registry.",
|
|
386
|
+
category: "workspaces-web",
|
|
387
|
+
id: "users-web-main-client-provider-account-settings-section-register"
|
|
331
388
|
}
|
|
332
389
|
]
|
|
333
390
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/workspaces-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
7
7
|
},
|
|
8
8
|
"exports": {
|
|
9
9
|
"./client": "./src/client/index.js",
|
|
10
|
+
"./client/components/AccountSettingsInvitesSection": "./src/client/components/AccountSettingsInvitesSection.vue",
|
|
10
11
|
"./client/providers/WorkspacesWebClientProvider": "./src/client/providers/WorkspacesWebClientProvider.js",
|
|
11
12
|
"./client/components/WorkspaceMembersClientElement": "./src/client/components/WorkspaceMembersClientElement.vue",
|
|
12
13
|
"./client/composables/useWorkspaceRouteContext": "./src/client/composables/useWorkspaceRouteContext.js"
|
|
@@ -14,12 +15,12 @@
|
|
|
14
15
|
"dependencies": {
|
|
15
16
|
"@tanstack/vue-query": "5.92.12",
|
|
16
17
|
"@mdi/js": "^7.4.47",
|
|
17
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
18
|
-
"@jskit-ai/kernel": "0.1.
|
|
19
|
-
"@jskit-ai/shell-web": "0.1.
|
|
20
|
-
"@jskit-ai/users-core": "0.1.
|
|
21
|
-
"@jskit-ai/users-web": "0.1.
|
|
22
|
-
"@jskit-ai/workspaces-core": "0.1.
|
|
18
|
+
"@jskit-ai/http-runtime": "0.1.52",
|
|
19
|
+
"@jskit-ai/kernel": "0.1.53",
|
|
20
|
+
"@jskit-ai/shell-web": "0.1.52",
|
|
21
|
+
"@jskit-ai/users-core": "0.1.63",
|
|
22
|
+
"@jskit-ai/users-web": "0.1.68",
|
|
23
|
+
"@jskit-ai/workspaces-core": "0.1.29",
|
|
23
24
|
"vuetify": "^4.0.0"
|
|
24
25
|
}
|
|
25
26
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ACCOUNT_SETTINGS_SECTION_REGISTRY_TAG } from "@jskit-ai/users-web/client/account-settings/sections";
|
|
2
|
-
import AccountSettingsInvitesSection from "../components/AccountSettingsInvitesSection.vue";
|
|
3
1
|
import UsersProfileSurfaceSwitchMenuItem from "../components/UsersProfileSurfaceSwitchMenuItem.vue";
|
|
4
2
|
import UsersWorkspaceSelector from "../components/UsersWorkspaceSelector.vue";
|
|
5
3
|
import UsersWorkspaceToolsWidget from "../components/UsersWorkspaceToolsWidget.vue";
|
|
@@ -29,16 +27,6 @@ class WorkspacesWebClientProvider {
|
|
|
29
27
|
app.singleton("workspaces.web.members-admin.element", () => MembersAdminClientElement);
|
|
30
28
|
app.singleton("workspaces.web.bootstrap-placement.runtime", (scope) => createBootstrapPlacementRuntime({ app: scope }));
|
|
31
29
|
app.singleton("workspaces.web.scope-support", () => createWorkspaceScopeSupport());
|
|
32
|
-
app.singleton("workspaces.web.account-settings.section.invites", () =>
|
|
33
|
-
Object.freeze({
|
|
34
|
-
title: "Invites",
|
|
35
|
-
value: "invites",
|
|
36
|
-
order: 400,
|
|
37
|
-
component: AccountSettingsInvitesSection,
|
|
38
|
-
usesSharedRuntime: false
|
|
39
|
-
})
|
|
40
|
-
);
|
|
41
|
-
app.tag("workspaces.web.account-settings.section.invites", ACCOUNT_SETTINGS_SECTION_REGISTRY_TAG);
|
|
42
30
|
}
|
|
43
31
|
|
|
44
32
|
async boot(app) {
|
|
@@ -15,6 +15,7 @@ test("workspaces-web exports are explicit and aligned with production usage", ()
|
|
|
15
15
|
packageId: "@jskit-ai/workspaces-web",
|
|
16
16
|
requiredExports: [
|
|
17
17
|
"./client",
|
|
18
|
+
"./client/components/AccountSettingsInvitesSection",
|
|
18
19
|
"./client/providers/WorkspacesWebClientProvider",
|
|
19
20
|
"./client/composables/useWorkspaceRouteContext"
|
|
20
21
|
]
|
|
@@ -47,6 +47,25 @@ test("workspaces-web admin settings template exposes surface-derived settings ou
|
|
|
47
47
|
assert.match(source, /<RouterView \/>/);
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
+
test("workspaces-web installs an app-owned account invites section wrapper", async () => {
|
|
51
|
+
const source = await readFile(
|
|
52
|
+
path.join(PACKAGE_DIR, "templates", "packages", "main", "src", "client", "components", "AccountSettingsInvitesSection.vue"),
|
|
53
|
+
"utf8"
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
assert.match(
|
|
57
|
+
source,
|
|
58
|
+
/@jskit-ai\/workspaces-web\/client\/components\/AccountSettingsInvitesSection/
|
|
59
|
+
);
|
|
60
|
+
assert.deepEqual(findFileMutation("users-web-main-component-account-settings-invites-section"), {
|
|
61
|
+
from: "templates/packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
62
|
+
to: "packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
63
|
+
reason: "Install app-owned account invites section scaffold for multihoming account settings.",
|
|
64
|
+
category: "workspaces-web",
|
|
65
|
+
id: "users-web-main-component-account-settings-invites-section"
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
50
69
|
test("workspaces-web admin settings index template is a simple developer-owned stub", async () => {
|
|
51
70
|
const source = await readFile(
|
|
52
71
|
path.join(PACKAGE_DIR, "templates", "src", "pages", "admin", "workspace", "settings", "index.vue"),
|
|
@@ -108,6 +127,18 @@ test("workspaces-web descriptor metadata advertises admin settings outlets", ()
|
|
|
108
127
|
when: "auth.authenticated === true",
|
|
109
128
|
source: "mutations.text#workspaces-web-placement-block"
|
|
110
129
|
});
|
|
130
|
+
assert.deepEqual(findContribution("workspaces.account.settings.invites"), {
|
|
131
|
+
id: "workspaces.account.settings.invites",
|
|
132
|
+
target: "account-settings:sections",
|
|
133
|
+
surfaces: ["account"],
|
|
134
|
+
order: 400,
|
|
135
|
+
componentToken: "local.main.account-settings.section.invites",
|
|
136
|
+
when: "auth.authenticated === true && workspaceInvitesEnabled === true",
|
|
137
|
+
source: "mutations.text#workspaces-web-account-settings-placement"
|
|
138
|
+
});
|
|
139
|
+
assert.match(findTextMutation("workspaces-web-account-settings-placement")?.value || "", /id: "workspaces\.account\.settings\.invites"/);
|
|
140
|
+
assert.match(findTextMutation("workspaces-web-account-settings-placement")?.value || "", /target: "account-settings:sections"/);
|
|
141
|
+
assert.match(findTextMutation("workspaces-web-account-settings-placement")?.value || "", /componentToken: "local\.main\.account-settings\.section\.invites"/);
|
|
111
142
|
assert.deepEqual(findFileMutation("users-web-page-admin-workspace-settings"), {
|
|
112
143
|
from: "templates/src/pages/admin/workspace/settings/index.vue",
|
|
113
144
|
toSurface: "admin",
|
|
@@ -120,4 +151,12 @@ test("workspaces-web descriptor metadata advertises admin settings outlets", ()
|
|
|
120
151
|
in: ["personal", "workspaces"]
|
|
121
152
|
}
|
|
122
153
|
});
|
|
154
|
+
assert.match(
|
|
155
|
+
findTextMutation("users-web-main-client-provider-account-settings-section-import")?.value || "",
|
|
156
|
+
/import AccountSettingsInvitesSection from "\.\.\/components\/AccountSettingsInvitesSection\.vue";/
|
|
157
|
+
);
|
|
158
|
+
assert.match(
|
|
159
|
+
findTextMutation("users-web-main-client-provider-account-settings-section-register")?.value || "",
|
|
160
|
+
/registerMainClientComponent\("local\.main\.account-settings\.section\.invites", \(\) => AccountSettingsInvitesSection\);/
|
|
161
|
+
);
|
|
123
162
|
});
|