@jskit-ai/users-web 0.1.264 → 0.1.266
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.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/users-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.266",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test --test-concurrency=1"
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
"./client/account-settings/sections": "./src/client/account-settings/sections.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@jskit-ai/uploads-image-web": "0.1.
|
|
16
|
-
"@jskit-ai/users-core": "0.1.
|
|
15
|
+
"@jskit-ai/uploads-image-web": "0.1.221",
|
|
16
|
+
"@jskit-ai/users-core": "0.1.259"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@jskit-ai/auth-web": "0.1.
|
|
20
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
21
|
-
"@jskit-ai/http-web": "0.1.
|
|
22
|
-
"@jskit-ai/kernel": "0.1.
|
|
23
|
-
"@jskit-ai/shell-web": "0.1.
|
|
19
|
+
"@jskit-ai/auth-web": "0.1.248",
|
|
20
|
+
"@jskit-ai/http-runtime": "0.1.244",
|
|
21
|
+
"@jskit-ai/http-web": "0.1.93",
|
|
22
|
+
"@jskit-ai/kernel": "0.1.246",
|
|
23
|
+
"@jskit-ai/shell-web": "0.1.252",
|
|
24
24
|
"@tanstack/vue-query": "^5.90.5",
|
|
25
25
|
"vue": "^3.5.13",
|
|
26
26
|
"vue-router": "^5.0.4",
|
|
@@ -5,11 +5,13 @@ import {
|
|
|
5
5
|
onMounted,
|
|
6
6
|
ref
|
|
7
7
|
} from "vue";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
SHELL_WEB_PLACEMENT_RUNTIME_KEY,
|
|
10
|
+
useWebPlacementContext
|
|
11
|
+
} from "@jskit-ai/shell-web/client/placement";
|
|
9
12
|
|
|
10
13
|
const ACCOUNT_SETTINGS_SECTION_TARGET = "account-settings:sections";
|
|
11
14
|
const EMPTY_ACCOUNT_SETTINGS_SECTIONS = Object.freeze([]);
|
|
12
|
-
const WEB_PLACEMENT_RUNTIME_INJECTION_KEY = "jskit.shell-web.runtime.web-placement.client";
|
|
13
15
|
|
|
14
16
|
function normalizeAccountSettingsSectionEntry(entry = null) {
|
|
15
17
|
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
@@ -75,7 +77,7 @@ function resolveAccountSettingsSections(entries = []) {
|
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
function useAccountSettingsSections() {
|
|
78
|
-
const placementRuntime = inject(
|
|
80
|
+
const placementRuntime = inject(SHELL_WEB_PLACEMENT_RUNTIME_KEY, null);
|
|
79
81
|
const { context: placementContext } = useWebPlacementContext();
|
|
80
82
|
const revision = ref(
|
|
81
83
|
placementRuntime && typeof placementRuntime.getRevision === "function"
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { ACCOUNT_SETTINGS_DEFAULTS } from "./accountSettingsRuntimeConstants.js";
|
|
2
|
-
import {
|
|
3
|
-
isRecord,
|
|
4
|
-
normalizeReturnToPath as normalizeSharedReturnToPath,
|
|
5
|
-
resolveAllowedOriginsFromPlacementContext
|
|
6
|
-
} from "@jskit-ai/kernel/shared/support";
|
|
2
|
+
import { isRecord, normalizeReturnToPath as normalizeSharedReturnToPath } from "@jskit-ai/kernel/shared/support";
|
|
7
3
|
|
|
8
4
|
function normalizeReturnToPath(value, { fallback = "/", accountSettingsPath = "/account", allowedOrigins = [] } = {}) {
|
|
9
5
|
return normalizeSharedReturnToPath(value, {
|
|
@@ -14,10 +10,6 @@ function normalizeReturnToPath(value, { fallback = "/", accountSettingsPath = "/
|
|
|
14
10
|
});
|
|
15
11
|
}
|
|
16
12
|
|
|
17
|
-
function resolveAllowedReturnToOrigins(contextValue = null) {
|
|
18
|
-
return resolveAllowedOriginsFromPlacementContext(contextValue);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
13
|
function normalizeSettingsPayload(value) {
|
|
22
14
|
return isRecord(value) ? value : {};
|
|
23
15
|
}
|
|
@@ -33,7 +25,6 @@ function normalizeAvatarSize(value) {
|
|
|
33
25
|
}
|
|
34
26
|
|
|
35
27
|
export {
|
|
36
|
-
resolveAllowedReturnToOrigins,
|
|
37
28
|
normalizeAvatarSize,
|
|
38
29
|
normalizeReturnToPath,
|
|
39
30
|
normalizeSettingsPayload
|
|
@@ -4,7 +4,9 @@ import { useTheme } from "vuetify";
|
|
|
4
4
|
import { useRoute } from "vue-router";
|
|
5
5
|
import {
|
|
6
6
|
useWebPlacementContext,
|
|
7
|
-
|
|
7
|
+
resolveAllowedOriginsFromPlacementContext,
|
|
8
|
+
resolveSurfaceNavigationTargetFromPlacementContext,
|
|
9
|
+
resolveSurfacePathFromPlacementContext
|
|
8
10
|
} from "@jskit-ai/shell-web/client/placement";
|
|
9
11
|
import { useShellWebErrorRuntime } from "@jskit-ai/shell-web/client/error";
|
|
10
12
|
import { ROUTE_VISIBILITY_PUBLIC } from "@jskit-ai/kernel/shared/support/visibility";
|
|
@@ -18,7 +20,6 @@ import {
|
|
|
18
20
|
resolveThemeNameForPreference,
|
|
19
21
|
setVuetifyThemeName
|
|
20
22
|
} from "../lib/theme.js";
|
|
21
|
-
import { resolveSurfacePathFromPlacementContext } from "@jskit-ai/shell-web/client/placement";
|
|
22
23
|
import {
|
|
23
24
|
ACCOUNT_SETTINGS_DEFAULTS,
|
|
24
25
|
AVATAR_DEFAULT_SIZE,
|
|
@@ -33,8 +34,7 @@ import {
|
|
|
33
34
|
import {
|
|
34
35
|
normalizeAvatarSize,
|
|
35
36
|
normalizeReturnToPath,
|
|
36
|
-
normalizeSettingsPayload
|
|
37
|
-
resolveAllowedReturnToOrigins
|
|
37
|
+
normalizeSettingsPayload
|
|
38
38
|
} from "./account-settings/accountSettingsRuntimeHelpers.js";
|
|
39
39
|
import { createAccountSettingsAvatarUploadRuntime } from "./account-settings/accountSettingsAvatarUploadRuntime.js";
|
|
40
40
|
|
|
@@ -73,7 +73,7 @@ function useAccountSettingsRuntime() {
|
|
|
73
73
|
const accountSettingsPath = computed(() =>
|
|
74
74
|
resolveSurfacePathFromPlacementContext(placementContext.value, "account", "/")
|
|
75
75
|
);
|
|
76
|
-
const allowedReturnToOrigins = computed(() =>
|
|
76
|
+
const allowedReturnToOrigins = computed(() => resolveAllowedOriginsFromPlacementContext(placementContext.value));
|
|
77
77
|
const backTarget = computed(() =>
|
|
78
78
|
normalizeReturnToPath(route?.query?.returnTo, {
|
|
79
79
|
fallback: "/",
|