@jskit-ai/workspaces-web 0.1.28 → 0.1.30
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 +71 -8
- package/package.json +8 -7
- package/src/client/components/UsersWorkspaceToolsWidget.vue +4 -4
- package/src/client/providers/WorkspacesWebClientProvider.js +0 -12
- package/src/shared/toolsOutletContracts.js +6 -6
- package/templates/packages/main/src/client/components/AccountSettingsInvitesSection.vue +7 -0
- package/templates/src/pages/admin/workspace/settings/index.vue +2 -1
- package/test/exportsContract.test.js +1 -0
- package/test/settingsPlacementContract.test.js +54 -3
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.30",
|
|
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
|
},
|
|
@@ -69,6 +72,12 @@ export default Object.freeze({
|
|
|
69
72
|
defaultLinkComponentToken: "local.main.ui.surface-aware-menu-link-item",
|
|
70
73
|
surfaces: ["admin"],
|
|
71
74
|
source: "templates/src/pages/admin/workspace/settings.vue"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
target: "admin-cog:primary-menu",
|
|
78
|
+
defaultLinkComponentToken: "local.main.ui.surface-aware-menu-link-item",
|
|
79
|
+
surfaces: ["admin"],
|
|
80
|
+
source: "src/client/components/UsersWorkspaceToolsWidget.vue"
|
|
72
81
|
}
|
|
73
82
|
],
|
|
74
83
|
contributions: [
|
|
@@ -117,6 +126,15 @@ export default Object.freeze({
|
|
|
117
126
|
when: "auth.authenticated === true",
|
|
118
127
|
source: "mutations.text#workspaces-web-placement-block"
|
|
119
128
|
},
|
|
129
|
+
{
|
|
130
|
+
id: "workspaces.account.settings.invites",
|
|
131
|
+
target: "account-settings:sections",
|
|
132
|
+
surfaces: ["account"],
|
|
133
|
+
order: 400,
|
|
134
|
+
componentToken: "local.main.account-settings.section.invites",
|
|
135
|
+
when: "auth.authenticated === true && workspaceInvitesEnabled === true",
|
|
136
|
+
source: "mutations.text#workspaces-web-account-settings-placement"
|
|
137
|
+
},
|
|
120
138
|
{
|
|
121
139
|
id: "workspaces.workspace.tools.widget",
|
|
122
140
|
target: "shell-layout:top-right",
|
|
@@ -127,7 +145,7 @@ export default Object.freeze({
|
|
|
127
145
|
},
|
|
128
146
|
{
|
|
129
147
|
id: "workspaces.workspace.menu.workspace-settings",
|
|
130
|
-
target: "
|
|
148
|
+
target: "admin-cog:primary-menu",
|
|
131
149
|
surfaces: ["admin"],
|
|
132
150
|
order: 100,
|
|
133
151
|
componentToken: "workspaces.web.workspace-settings.menu-item",
|
|
@@ -135,7 +153,7 @@ export default Object.freeze({
|
|
|
135
153
|
},
|
|
136
154
|
{
|
|
137
155
|
id: "workspaces.workspace.menu.members",
|
|
138
|
-
target: "
|
|
156
|
+
target: "admin-cog:primary-menu",
|
|
139
157
|
surfaces: ["admin"],
|
|
140
158
|
order: 200,
|
|
141
159
|
componentToken: "workspaces.web.workspace-members.menu-item",
|
|
@@ -148,8 +166,8 @@ export default Object.freeze({
|
|
|
148
166
|
mutations: {
|
|
149
167
|
dependencies: {
|
|
150
168
|
runtime: {
|
|
151
|
-
"@jskit-ai/workspaces-core": "0.1.
|
|
152
|
-
"@jskit-ai/users-web": "0.1.
|
|
169
|
+
"@jskit-ai/workspaces-core": "0.1.30",
|
|
170
|
+
"@jskit-ai/users-web": "0.1.69",
|
|
153
171
|
"vuetify": "^4.0.0"
|
|
154
172
|
},
|
|
155
173
|
dev: {}
|
|
@@ -171,6 +189,13 @@ export default Object.freeze({
|
|
|
171
189
|
category: "workspaces-web",
|
|
172
190
|
id: "users-web-main-component-account-pending-invites-cue"
|
|
173
191
|
},
|
|
192
|
+
{
|
|
193
|
+
from: "templates/packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
194
|
+
to: "packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
195
|
+
reason: "Install app-owned account invites section scaffold for multihoming account settings.",
|
|
196
|
+
category: "workspaces-web",
|
|
197
|
+
id: "users-web-main-component-account-settings-invites-section"
|
|
198
|
+
},
|
|
174
199
|
{
|
|
175
200
|
from: "templates/src/components/WorkspaceNotFoundCard.vue",
|
|
176
201
|
to: "src/components/WorkspaceNotFoundCard.vue",
|
|
@@ -299,7 +324,7 @@ export default Object.freeze({
|
|
|
299
324
|
file: "src/placement.js",
|
|
300
325
|
position: "bottom",
|
|
301
326
|
skipIfContains: "id: \"workspaces.workspace.selector\"",
|
|
302
|
-
value: "\naddPlacement({\n id: \"workspaces.workspace.menu.app\",\n target: \"shell-layout:primary-menu\",\n surfaces: [\"app\"],\n order: 50,\n componentToken: \"local.main.ui.surface-aware-menu-link-item\",\n props: {\n label: \"Home\",\n surface: \"app\",\n scopedSuffix: \"/\",\n unscopedSuffix: \"/\",\n exact: true\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.workspace.menu.admin\",\n target: \"shell-layout:primary-menu\",\n surfaces: [\"admin\"],\n order: 60,\n componentToken: \"local.main.ui.surface-aware-menu-link-item\",\n props: {\n label: \"Home\",\n surface: \"admin\",\n scopedSuffix: \"/\",\n unscopedSuffix: \"/\",\n exact: true\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.workspace.selector\",\n target: \"shell-layout:top-left\",\n surfaces: [\"*\"],\n order: 200,\n componentToken: \"workspaces.web.workspace.selector\",\n props: {\n allowOnNonWorkspaceSurface: true,\n targetSurfaceId: \"app\"\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.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 }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.workspace.tools.widget\",\n target: \"shell-layout:top-right\",\n surfaces: [\"admin\"],\n order: 900,\n componentToken: \"workspaces.web.workspace.tools.widget\"\n});\n\naddPlacement({\n id: \"workspaces.workspace.menu.workspace-settings\",\n target: \"
|
|
327
|
+
value: "\naddPlacement({\n id: \"workspaces.workspace.menu.app\",\n target: \"shell-layout:primary-menu\",\n surfaces: [\"app\"],\n order: 50,\n componentToken: \"local.main.ui.surface-aware-menu-link-item\",\n props: {\n label: \"Home\",\n surface: \"app\",\n scopedSuffix: \"/\",\n unscopedSuffix: \"/\",\n exact: true\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.workspace.menu.admin\",\n target: \"shell-layout:primary-menu\",\n surfaces: [\"admin\"],\n order: 60,\n componentToken: \"local.main.ui.surface-aware-menu-link-item\",\n props: {\n label: \"Home\",\n surface: \"admin\",\n scopedSuffix: \"/\",\n unscopedSuffix: \"/\",\n exact: true\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.workspace.selector\",\n target: \"shell-layout:top-left\",\n surfaces: [\"*\"],\n order: 200,\n componentToken: \"workspaces.web.workspace.selector\",\n props: {\n allowOnNonWorkspaceSurface: true,\n targetSurfaceId: \"app\"\n },\n when: ({ auth }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.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 }) => auth?.authenticated === true\n});\n\naddPlacement({\n id: \"workspaces.workspace.tools.widget\",\n target: \"shell-layout:top-right\",\n surfaces: [\"admin\"],\n order: 900,\n componentToken: \"workspaces.web.workspace.tools.widget\"\n});\n\naddPlacement({\n id: \"workspaces.workspace.menu.workspace-settings\",\n target: \"admin-cog:primary-menu\",\n surfaces: [\"admin\"],\n order: 100,\n componentToken: \"workspaces.web.workspace-settings.menu-item\"\n});\n\naddPlacement({\n id: \"workspaces.workspace.menu.members\",\n target: \"admin-cog:primary-menu\",\n surfaces: [\"admin\"],\n order: 200,\n componentToken: \"workspaces.web.workspace-members.menu-item\"\n});\n",
|
|
303
328
|
reason: "Append workspace placement entries into app-owned placement registry.",
|
|
304
329
|
category: "workspaces-web",
|
|
305
330
|
id: "workspaces-web-placement-block",
|
|
@@ -308,6 +333,21 @@ export default Object.freeze({
|
|
|
308
333
|
in: ["personal", "workspaces"]
|
|
309
334
|
}
|
|
310
335
|
},
|
|
336
|
+
{
|
|
337
|
+
op: "append-text",
|
|
338
|
+
file: "src/placement.js",
|
|
339
|
+
position: "bottom",
|
|
340
|
+
skipIfContains: "id: \"workspaces.account.settings.invites\"",
|
|
341
|
+
value:
|
|
342
|
+
"\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",
|
|
343
|
+
reason: "Append workspaces-web account settings invites section placement into app-owned placement registry.",
|
|
344
|
+
category: "workspaces-web",
|
|
345
|
+
id: "workspaces-web-account-settings-placement",
|
|
346
|
+
when: {
|
|
347
|
+
config: "tenancyMode",
|
|
348
|
+
in: ["personal", "workspaces"]
|
|
349
|
+
}
|
|
350
|
+
},
|
|
311
351
|
{
|
|
312
352
|
op: "append-text",
|
|
313
353
|
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
@@ -318,6 +358,17 @@ export default Object.freeze({
|
|
|
318
358
|
category: "workspaces-web",
|
|
319
359
|
id: "users-web-main-client-provider-account-invites-import"
|
|
320
360
|
},
|
|
361
|
+
{
|
|
362
|
+
op: "append-text",
|
|
363
|
+
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
364
|
+
position: "top",
|
|
365
|
+
skipIfContains: "import AccountSettingsInvitesSection from \"../components/AccountSettingsInvitesSection.vue\";",
|
|
366
|
+
value:
|
|
367
|
+
"import AccountSettingsInvitesSection from \"../components/AccountSettingsInvitesSection.vue\";\n",
|
|
368
|
+
reason: "Bind app-owned account invites section component into local main client provider imports.",
|
|
369
|
+
category: "workspaces-web",
|
|
370
|
+
id: "users-web-main-client-provider-account-settings-section-import"
|
|
371
|
+
},
|
|
321
372
|
{
|
|
322
373
|
op: "append-text",
|
|
323
374
|
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
@@ -328,6 +379,18 @@ export default Object.freeze({
|
|
|
328
379
|
reason: "Bind app-owned account pending invites cue component token into local main client provider registry.",
|
|
329
380
|
category: "workspaces-web",
|
|
330
381
|
id: "users-web-main-client-provider-account-invites-register"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
op: "append-text",
|
|
385
|
+
file: "packages/main/src/client/providers/MainClientProvider.js",
|
|
386
|
+
position: "bottom",
|
|
387
|
+
skipIfContains:
|
|
388
|
+
"registerMainClientComponent(\"local.main.account-settings.section.invites\", () => AccountSettingsInvitesSection);",
|
|
389
|
+
value:
|
|
390
|
+
"\nregisterMainClientComponent(\"local.main.account-settings.section.invites\", () => AccountSettingsInvitesSection);\n",
|
|
391
|
+
reason: "Bind app-owned account invites section component token into local main client provider registry.",
|
|
392
|
+
category: "workspaces-web",
|
|
393
|
+
id: "users-web-main-client-provider-account-settings-section-register"
|
|
331
394
|
}
|
|
332
395
|
]
|
|
333
396
|
}
|
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.30",
|
|
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.53",
|
|
19
|
+
"@jskit-ai/kernel": "0.1.54",
|
|
20
|
+
"@jskit-ai/shell-web": "0.1.53",
|
|
21
|
+
"@jskit-ai/users-core": "0.1.64",
|
|
22
|
+
"@jskit-ai/users-web": "0.1.69",
|
|
23
|
+
"@jskit-ai/workspaces-core": "0.1.30",
|
|
23
24
|
"vuetify": "^4.0.0"
|
|
24
25
|
}
|
|
25
26
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import ShellOutletMenuWidget from "@jskit-ai/shell-web/client/components/ShellOutletMenuWidget";
|
|
3
|
-
import {
|
|
3
|
+
import { ADMIN_COG_OUTLET } from "../../shared/toolsOutletContracts.js";
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<template>
|
|
7
7
|
<ShellOutletMenuWidget
|
|
8
|
-
:target="
|
|
9
|
-
:default-link-component-token="
|
|
10
|
-
:aria-label="
|
|
8
|
+
:target="ADMIN_COG_OUTLET.target"
|
|
9
|
+
:default-link-component-token="ADMIN_COG_OUTLET.defaultLinkComponentToken"
|
|
10
|
+
:aria-label="ADMIN_COG_OUTLET.ariaLabel"
|
|
11
11
|
/>
|
|
12
12
|
</template>
|
|
@@ -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) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const DEFAULT_COG_LINK_COMPONENT_TOKEN = "local.main.ui.surface-aware-menu-link-item";
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
target: "
|
|
5
|
-
defaultLinkComponentToken:
|
|
6
|
-
ariaLabel: "
|
|
3
|
+
const ADMIN_COG_OUTLET = Object.freeze({
|
|
4
|
+
target: "admin-cog:primary-menu",
|
|
5
|
+
defaultLinkComponentToken: DEFAULT_COG_LINK_COMPONENT_TOKEN,
|
|
6
|
+
ariaLabel: "Admin cog"
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
export {
|
|
9
|
+
export { DEFAULT_COG_LINK_COMPONENT_TOKEN, ADMIN_COG_OUTLET };
|
|
@@ -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
|
+
// import { redirectToChild } from "@jskit-ai/kernel/client/pageRedirects";
|
|
3
4
|
// definePage({
|
|
4
|
-
// redirect: (
|
|
5
|
+
// redirect: redirectToChild("your_child_segment")
|
|
5
6
|
// });
|
|
6
7
|
</script>
|
|
7
8
|
|
|
@@ -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
|
]
|
|
@@ -8,10 +8,11 @@ import descriptor from "../package.descriptor.mjs";
|
|
|
8
8
|
const TEST_DIRECTORY = path.dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const PACKAGE_DIR = path.resolve(TEST_DIRECTORY, "..");
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function readOutlets(target = "") {
|
|
12
12
|
const outlets = descriptor?.metadata?.ui?.placements?.outlets;
|
|
13
|
+
const normalizedTarget = String(target || "").trim();
|
|
13
14
|
return Array.isArray(outlets)
|
|
14
|
-
? outlets.filter((entry) => String(entry?.target || "").trim() ===
|
|
15
|
+
? outlets.filter((entry) => String(entry?.target || "").trim() === normalizedTarget)
|
|
15
16
|
: [];
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -47,6 +48,25 @@ test("workspaces-web admin settings template exposes surface-derived settings ou
|
|
|
47
48
|
assert.match(source, /<RouterView \/>/);
|
|
48
49
|
});
|
|
49
50
|
|
|
51
|
+
test("workspaces-web installs an app-owned account invites section wrapper", async () => {
|
|
52
|
+
const source = await readFile(
|
|
53
|
+
path.join(PACKAGE_DIR, "templates", "packages", "main", "src", "client", "components", "AccountSettingsInvitesSection.vue"),
|
|
54
|
+
"utf8"
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
assert.match(
|
|
58
|
+
source,
|
|
59
|
+
/@jskit-ai\/workspaces-web\/client\/components\/AccountSettingsInvitesSection/
|
|
60
|
+
);
|
|
61
|
+
assert.deepEqual(findFileMutation("users-web-main-component-account-settings-invites-section"), {
|
|
62
|
+
from: "templates/packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
63
|
+
to: "packages/main/src/client/components/AccountSettingsInvitesSection.vue",
|
|
64
|
+
reason: "Install app-owned account invites section scaffold for multihoming account settings.",
|
|
65
|
+
category: "workspaces-web",
|
|
66
|
+
id: "users-web-main-component-account-settings-invites-section"
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
50
70
|
test("workspaces-web admin settings index template is a simple developer-owned stub", async () => {
|
|
51
71
|
const source = await readFile(
|
|
52
72
|
path.join(PACKAGE_DIR, "templates", "src", "pages", "admin", "workspace", "settings", "index.vue"),
|
|
@@ -59,7 +79,7 @@ test("workspaces-web admin settings index template is a simple developer-owned s
|
|
|
59
79
|
|
|
60
80
|
test("workspaces-web descriptor metadata advertises admin settings outlets", () => {
|
|
61
81
|
assert.deepEqual(
|
|
62
|
-
|
|
82
|
+
readOutlets("admin-settings:primary-menu"),
|
|
63
83
|
[
|
|
64
84
|
{
|
|
65
85
|
target: "admin-settings:primary-menu",
|
|
@@ -69,6 +89,17 @@ test("workspaces-web descriptor metadata advertises admin settings outlets", ()
|
|
|
69
89
|
}
|
|
70
90
|
]
|
|
71
91
|
);
|
|
92
|
+
assert.deepEqual(
|
|
93
|
+
readOutlets("admin-cog:primary-menu"),
|
|
94
|
+
[
|
|
95
|
+
{
|
|
96
|
+
target: "admin-cog:primary-menu",
|
|
97
|
+
defaultLinkComponentToken: "local.main.ui.surface-aware-menu-link-item",
|
|
98
|
+
surfaces: ["admin"],
|
|
99
|
+
source: "src/client/components/UsersWorkspaceToolsWidget.vue"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
);
|
|
72
103
|
assert.equal(findContribution("workspaces.workspace.settings.general"), null);
|
|
73
104
|
assert.deepEqual(findContribution("workspaces.workspace.menu.app"), {
|
|
74
105
|
id: "workspaces.workspace.menu.app",
|
|
@@ -108,6 +139,18 @@ test("workspaces-web descriptor metadata advertises admin settings outlets", ()
|
|
|
108
139
|
when: "auth.authenticated === true",
|
|
109
140
|
source: "mutations.text#workspaces-web-placement-block"
|
|
110
141
|
});
|
|
142
|
+
assert.deepEqual(findContribution("workspaces.account.settings.invites"), {
|
|
143
|
+
id: "workspaces.account.settings.invites",
|
|
144
|
+
target: "account-settings:sections",
|
|
145
|
+
surfaces: ["account"],
|
|
146
|
+
order: 400,
|
|
147
|
+
componentToken: "local.main.account-settings.section.invites",
|
|
148
|
+
when: "auth.authenticated === true && workspaceInvitesEnabled === true",
|
|
149
|
+
source: "mutations.text#workspaces-web-account-settings-placement"
|
|
150
|
+
});
|
|
151
|
+
assert.match(findTextMutation("workspaces-web-account-settings-placement")?.value || "", /id: "workspaces\.account\.settings\.invites"/);
|
|
152
|
+
assert.match(findTextMutation("workspaces-web-account-settings-placement")?.value || "", /target: "account-settings:sections"/);
|
|
153
|
+
assert.match(findTextMutation("workspaces-web-account-settings-placement")?.value || "", /componentToken: "local\.main\.account-settings\.section\.invites"/);
|
|
111
154
|
assert.deepEqual(findFileMutation("users-web-page-admin-workspace-settings"), {
|
|
112
155
|
from: "templates/src/pages/admin/workspace/settings/index.vue",
|
|
113
156
|
toSurface: "admin",
|
|
@@ -120,4 +163,12 @@ test("workspaces-web descriptor metadata advertises admin settings outlets", ()
|
|
|
120
163
|
in: ["personal", "workspaces"]
|
|
121
164
|
}
|
|
122
165
|
});
|
|
166
|
+
assert.match(
|
|
167
|
+
findTextMutation("users-web-main-client-provider-account-settings-section-import")?.value || "",
|
|
168
|
+
/import AccountSettingsInvitesSection from "\.\.\/components\/AccountSettingsInvitesSection\.vue";/
|
|
169
|
+
);
|
|
170
|
+
assert.match(
|
|
171
|
+
findTextMutation("users-web-main-client-provider-account-settings-section-register")?.value || "",
|
|
172
|
+
/registerMainClientComponent\("local\.main\.account-settings\.section\.invites", \(\) => AccountSettingsInvitesSection\);/
|
|
173
|
+
);
|
|
123
174
|
});
|