@wix/himalaya-cli 0.1277.0 → 0.1279.0
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/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +14 -0
- package/dist/cli.mjs +25 -4
- package/guides/component-reference.json +36 -3
- package/guides/component-reference.md +20 -2
- package/package.json +4 -3
- package/templates/beauty-salon/config.ts +2 -1
- package/templates/beauty-salon/dev/index.ts +2 -1
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/branded-lite/config.ts +13 -2
- package/templates/branded-lite/dev/index.ts +520 -170
- package/templates/branded-lite/tier5-src/_shared/vod.ts +71 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +98 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-videos/index.ts +11 -20
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/community-club/config.ts +2 -1
- package/templates/community-club/dev/index.ts +2 -1
- package/templates/community-club/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/events-meetups/config.ts +2 -1
- package/templates/events-meetups/dev/index.ts +2 -1
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/gym-fitness/config.ts +2 -1
- package/templates/gym-fitness/dev/index.ts +2 -1
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/nonprofit-cause/config.ts +2 -1
- package/templates/nonprofit-cause/dev/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/podcast-creator/config.ts +2 -1
- package/templates/podcast-creator/dev/index.ts +2 -1
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/portfolio-creative/config.ts +2 -1
- package/templates/portfolio-creative/dev/index.ts +2 -1
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/restaurant/config.ts +2 -1
- package/templates/restaurant/dev/index.ts +2 -1
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/retail-store/config.ts +2 -1
- package/templates/retail-store/dev/index.ts +2 -1
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +12 -4
- package/templates/yoga-studio/config.ts +2 -1
- package/templates/yoga-studio/dev/index.ts +2 -1
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +12 -4
|
@@ -19,6 +19,7 @@ interface AuthRouteInput {
|
|
|
19
19
|
contextName?: string;
|
|
20
20
|
returnScreenId?: string;
|
|
21
21
|
returnId?: string;
|
|
22
|
+
returnChannelId?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// The screen's boot input survives refresh; consuming it must survive too.
|
|
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
|
|
40
|
-
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
|
|
41
|
+
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
|
|
41
42
|
const route = routeInputConsumed ? {} : routeInput();
|
|
42
43
|
return {
|
|
43
44
|
authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
|
|
44
45
|
authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
|
|
45
46
|
returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
|
|
46
47
|
returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
|
|
48
|
+
returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/** Where a successful sign-in returns to, or null. Never Account itself — that would
|
|
51
53
|
* only push a second copy of the screen the member is already on. */
|
|
52
|
-
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
|
|
54
|
+
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
|
|
53
55
|
if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
|
|
54
|
-
return s.returnId
|
|
56
|
+
return s.returnId || s.returnChannelId ? {
|
|
57
|
+
screenId: s.returnScreenId,
|
|
58
|
+
args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
|
|
59
|
+
} : { screenId: s.returnScreenId };
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
/** Resume the member-only screen that sent the visitor here, once. The return path is
|
|
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
|
|
|
61
66
|
const target = resumeTarget(next);
|
|
62
67
|
if (!next.isMember || !target) return next;
|
|
63
68
|
routeInputConsumed = true;
|
|
64
|
-
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
|
|
69
|
+
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
// Actions are not serialized: two quick Sign in taps both run against the pre-tap
|
|
@@ -165,6 +170,7 @@ interface S {
|
|
|
165
170
|
authContextName: string;
|
|
166
171
|
returnScreenId: string;
|
|
167
172
|
returnId: string;
|
|
173
|
+
returnChannelId: string;
|
|
168
174
|
/** Show Continue when an already-signed-in member opens Account with a return path.
|
|
169
175
|
* A sign-in made here resumes on its own (resumeAfterAuth). */
|
|
170
176
|
hasReturnPath: boolean;
|
|
@@ -364,6 +370,7 @@ const svc = defineService<S, {
|
|
|
364
370
|
authContextName: "",
|
|
365
371
|
returnScreenId: "",
|
|
366
372
|
returnId: "",
|
|
373
|
+
returnChannelId: "",
|
|
367
374
|
hasReturnPath: false,
|
|
368
375
|
noReturnPath: true,
|
|
369
376
|
returnCta: "Continue",
|
|
@@ -475,6 +482,7 @@ const svc = defineService<S, {
|
|
|
475
482
|
authContextName: "",
|
|
476
483
|
returnScreenId: "",
|
|
477
484
|
returnId: "",
|
|
485
|
+
returnChannelId: "",
|
|
478
486
|
};
|
|
479
487
|
return derive(cleared);
|
|
480
488
|
},
|
|
@@ -2903,7 +2903,8 @@ const SCREENS = runtimeSetting({
|
|
|
2903
2903
|
"actionId": "himi.open",
|
|
2904
2904
|
"params": {
|
|
2905
2905
|
"screenId": "$service:himiStoreAccount.returnScreenId",
|
|
2906
|
-
"id": "$service:himiStoreAccount.returnId"
|
|
2906
|
+
"id": "$service:himiStoreAccount.returnId",
|
|
2907
|
+
"channelId": "$service:himiStoreAccount.returnChannelId"
|
|
2907
2908
|
}
|
|
2908
2909
|
}
|
|
2909
2910
|
}
|
|
@@ -19,6 +19,7 @@ interface AuthRouteInput {
|
|
|
19
19
|
contextName?: string;
|
|
20
20
|
returnScreenId?: string;
|
|
21
21
|
returnId?: string;
|
|
22
|
+
returnChannelId?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// The screen's boot input survives refresh; consuming it must survive too.
|
|
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
|
|
40
|
-
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
|
|
41
|
+
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
|
|
41
42
|
const route = routeInputConsumed ? {} : routeInput();
|
|
42
43
|
return {
|
|
43
44
|
authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
|
|
44
45
|
authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
|
|
45
46
|
returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
|
|
46
47
|
returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
|
|
48
|
+
returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/** Where a successful sign-in returns to, or null. Never Account itself — that would
|
|
51
53
|
* only push a second copy of the screen the member is already on. */
|
|
52
|
-
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
|
|
54
|
+
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
|
|
53
55
|
if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
|
|
54
|
-
return s.returnId
|
|
56
|
+
return s.returnId || s.returnChannelId ? {
|
|
57
|
+
screenId: s.returnScreenId,
|
|
58
|
+
args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
|
|
59
|
+
} : { screenId: s.returnScreenId };
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
/** Resume the member-only screen that sent the visitor here, once. The return path is
|
|
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
|
|
|
61
66
|
const target = resumeTarget(next);
|
|
62
67
|
if (!next.isMember || !target) return next;
|
|
63
68
|
routeInputConsumed = true;
|
|
64
|
-
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
|
|
69
|
+
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
// Actions are not serialized: two quick Sign in taps both run against the pre-tap
|
|
@@ -165,6 +170,7 @@ interface S {
|
|
|
165
170
|
authContextName: string;
|
|
166
171
|
returnScreenId: string;
|
|
167
172
|
returnId: string;
|
|
173
|
+
returnChannelId: string;
|
|
168
174
|
/** Show Continue when an already-signed-in member opens Account with a return path.
|
|
169
175
|
* A sign-in made here resumes on its own (resumeAfterAuth). */
|
|
170
176
|
hasReturnPath: boolean;
|
|
@@ -364,6 +370,7 @@ const svc = defineService<S, {
|
|
|
364
370
|
authContextName: "",
|
|
365
371
|
returnScreenId: "",
|
|
366
372
|
returnId: "",
|
|
373
|
+
returnChannelId: "",
|
|
367
374
|
hasReturnPath: false,
|
|
368
375
|
noReturnPath: true,
|
|
369
376
|
returnCta: "Continue",
|
|
@@ -475,6 +482,7 @@ const svc = defineService<S, {
|
|
|
475
482
|
authContextName: "",
|
|
476
483
|
returnScreenId: "",
|
|
477
484
|
returnId: "",
|
|
485
|
+
returnChannelId: "",
|
|
478
486
|
};
|
|
479
487
|
return derive(cleared);
|
|
480
488
|
},
|
|
@@ -2861,7 +2861,8 @@ const SCREENS = runtimeSetting({
|
|
|
2861
2861
|
"actionId": "himi.open",
|
|
2862
2862
|
"params": {
|
|
2863
2863
|
"screenId": "$service:himiStoreAccount.returnScreenId",
|
|
2864
|
-
"id": "$service:himiStoreAccount.returnId"
|
|
2864
|
+
"id": "$service:himiStoreAccount.returnId",
|
|
2865
|
+
"channelId": "$service:himiStoreAccount.returnChannelId"
|
|
2865
2866
|
}
|
|
2866
2867
|
}
|
|
2867
2868
|
}
|
|
@@ -19,6 +19,7 @@ interface AuthRouteInput {
|
|
|
19
19
|
contextName?: string;
|
|
20
20
|
returnScreenId?: string;
|
|
21
21
|
returnId?: string;
|
|
22
|
+
returnChannelId?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// The screen's boot input survives refresh; consuming it must survive too.
|
|
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
|
|
40
|
-
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
|
|
41
|
+
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
|
|
41
42
|
const route = routeInputConsumed ? {} : routeInput();
|
|
42
43
|
return {
|
|
43
44
|
authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
|
|
44
45
|
authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
|
|
45
46
|
returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
|
|
46
47
|
returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
|
|
48
|
+
returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/** Where a successful sign-in returns to, or null. Never Account itself — that would
|
|
51
53
|
* only push a second copy of the screen the member is already on. */
|
|
52
|
-
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
|
|
54
|
+
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
|
|
53
55
|
if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
|
|
54
|
-
return s.returnId
|
|
56
|
+
return s.returnId || s.returnChannelId ? {
|
|
57
|
+
screenId: s.returnScreenId,
|
|
58
|
+
args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
|
|
59
|
+
} : { screenId: s.returnScreenId };
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
/** Resume the member-only screen that sent the visitor here, once. The return path is
|
|
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
|
|
|
61
66
|
const target = resumeTarget(next);
|
|
62
67
|
if (!next.isMember || !target) return next;
|
|
63
68
|
routeInputConsumed = true;
|
|
64
|
-
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
|
|
69
|
+
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
// Actions are not serialized: two quick Sign in taps both run against the pre-tap
|
|
@@ -165,6 +170,7 @@ interface S {
|
|
|
165
170
|
authContextName: string;
|
|
166
171
|
returnScreenId: string;
|
|
167
172
|
returnId: string;
|
|
173
|
+
returnChannelId: string;
|
|
168
174
|
/** Show Continue when an already-signed-in member opens Account with a return path.
|
|
169
175
|
* A sign-in made here resumes on its own (resumeAfterAuth). */
|
|
170
176
|
hasReturnPath: boolean;
|
|
@@ -364,6 +370,7 @@ const svc = defineService<S, {
|
|
|
364
370
|
authContextName: "",
|
|
365
371
|
returnScreenId: "",
|
|
366
372
|
returnId: "",
|
|
373
|
+
returnChannelId: "",
|
|
367
374
|
hasReturnPath: false,
|
|
368
375
|
noReturnPath: true,
|
|
369
376
|
returnCta: "Continue",
|
|
@@ -475,6 +482,7 @@ const svc = defineService<S, {
|
|
|
475
482
|
authContextName: "",
|
|
476
483
|
returnScreenId: "",
|
|
477
484
|
returnId: "",
|
|
485
|
+
returnChannelId: "",
|
|
478
486
|
};
|
|
479
487
|
return derive(cleared);
|
|
480
488
|
},
|
|
@@ -2829,7 +2829,8 @@ const SCREENS = runtimeSetting({
|
|
|
2829
2829
|
"actionId": "himi.open",
|
|
2830
2830
|
"params": {
|
|
2831
2831
|
"screenId": "$service:himiStoreAccount.returnScreenId",
|
|
2832
|
-
"id": "$service:himiStoreAccount.returnId"
|
|
2832
|
+
"id": "$service:himiStoreAccount.returnId",
|
|
2833
|
+
"channelId": "$service:himiStoreAccount.returnChannelId"
|
|
2833
2834
|
}
|
|
2834
2835
|
}
|
|
2835
2836
|
}
|
|
@@ -19,6 +19,7 @@ interface AuthRouteInput {
|
|
|
19
19
|
contextName?: string;
|
|
20
20
|
returnScreenId?: string;
|
|
21
21
|
returnId?: string;
|
|
22
|
+
returnChannelId?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// The screen's boot input survives refresh; consuming it must survive too.
|
|
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
|
|
40
|
-
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
|
|
41
|
+
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
|
|
41
42
|
const route = routeInputConsumed ? {} : routeInput();
|
|
42
43
|
return {
|
|
43
44
|
authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
|
|
44
45
|
authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
|
|
45
46
|
returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
|
|
46
47
|
returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
|
|
48
|
+
returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/** Where a successful sign-in returns to, or null. Never Account itself — that would
|
|
51
53
|
* only push a second copy of the screen the member is already on. */
|
|
52
|
-
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
|
|
54
|
+
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
|
|
53
55
|
if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
|
|
54
|
-
return s.returnId
|
|
56
|
+
return s.returnId || s.returnChannelId ? {
|
|
57
|
+
screenId: s.returnScreenId,
|
|
58
|
+
args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
|
|
59
|
+
} : { screenId: s.returnScreenId };
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
/** Resume the member-only screen that sent the visitor here, once. The return path is
|
|
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
|
|
|
61
66
|
const target = resumeTarget(next);
|
|
62
67
|
if (!next.isMember || !target) return next;
|
|
63
68
|
routeInputConsumed = true;
|
|
64
|
-
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
|
|
69
|
+
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
// Actions are not serialized: two quick Sign in taps both run against the pre-tap
|
|
@@ -165,6 +170,7 @@ interface S {
|
|
|
165
170
|
authContextName: string;
|
|
166
171
|
returnScreenId: string;
|
|
167
172
|
returnId: string;
|
|
173
|
+
returnChannelId: string;
|
|
168
174
|
/** Show Continue when an already-signed-in member opens Account with a return path.
|
|
169
175
|
* A sign-in made here resumes on its own (resumeAfterAuth). */
|
|
170
176
|
hasReturnPath: boolean;
|
|
@@ -364,6 +370,7 @@ const svc = defineService<S, {
|
|
|
364
370
|
authContextName: "",
|
|
365
371
|
returnScreenId: "",
|
|
366
372
|
returnId: "",
|
|
373
|
+
returnChannelId: "",
|
|
367
374
|
hasReturnPath: false,
|
|
368
375
|
noReturnPath: true,
|
|
369
376
|
returnCta: "Continue",
|
|
@@ -475,6 +482,7 @@ const svc = defineService<S, {
|
|
|
475
482
|
authContextName: "",
|
|
476
483
|
returnScreenId: "",
|
|
477
484
|
returnId: "",
|
|
485
|
+
returnChannelId: "",
|
|
478
486
|
};
|
|
479
487
|
return derive(cleared);
|
|
480
488
|
},
|
|
@@ -2307,7 +2307,8 @@ const SCREENS = runtimeSetting({
|
|
|
2307
2307
|
"actionId": "himi.open",
|
|
2308
2308
|
"params": {
|
|
2309
2309
|
"screenId": "$service:himiStoreAccount.returnScreenId",
|
|
2310
|
-
"id": "$service:himiStoreAccount.returnId"
|
|
2310
|
+
"id": "$service:himiStoreAccount.returnId",
|
|
2311
|
+
"channelId": "$service:himiStoreAccount.returnChannelId"
|
|
2311
2312
|
}
|
|
2312
2313
|
}
|
|
2313
2314
|
}
|
|
@@ -19,6 +19,7 @@ interface AuthRouteInput {
|
|
|
19
19
|
contextName?: string;
|
|
20
20
|
returnScreenId?: string;
|
|
21
21
|
returnId?: string;
|
|
22
|
+
returnChannelId?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// The screen's boot input survives refresh; consuming it must survive too.
|
|
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
|
|
40
|
-
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
|
|
41
|
+
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
|
|
41
42
|
const route = routeInputConsumed ? {} : routeInput();
|
|
42
43
|
return {
|
|
43
44
|
authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
|
|
44
45
|
authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
|
|
45
46
|
returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
|
|
46
47
|
returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
|
|
48
|
+
returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/** Where a successful sign-in returns to, or null. Never Account itself — that would
|
|
51
53
|
* only push a second copy of the screen the member is already on. */
|
|
52
|
-
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
|
|
54
|
+
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
|
|
53
55
|
if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
|
|
54
|
-
return s.returnId
|
|
56
|
+
return s.returnId || s.returnChannelId ? {
|
|
57
|
+
screenId: s.returnScreenId,
|
|
58
|
+
args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
|
|
59
|
+
} : { screenId: s.returnScreenId };
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
/** Resume the member-only screen that sent the visitor here, once. The return path is
|
|
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
|
|
|
61
66
|
const target = resumeTarget(next);
|
|
62
67
|
if (!next.isMember || !target) return next;
|
|
63
68
|
routeInputConsumed = true;
|
|
64
|
-
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
|
|
69
|
+
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
// Actions are not serialized: two quick Sign in taps both run against the pre-tap
|
|
@@ -165,6 +170,7 @@ interface S {
|
|
|
165
170
|
authContextName: string;
|
|
166
171
|
returnScreenId: string;
|
|
167
172
|
returnId: string;
|
|
173
|
+
returnChannelId: string;
|
|
168
174
|
/** Show Continue when an already-signed-in member opens Account with a return path.
|
|
169
175
|
* A sign-in made here resumes on its own (resumeAfterAuth). */
|
|
170
176
|
hasReturnPath: boolean;
|
|
@@ -364,6 +370,7 @@ const svc = defineService<S, {
|
|
|
364
370
|
authContextName: "",
|
|
365
371
|
returnScreenId: "",
|
|
366
372
|
returnId: "",
|
|
373
|
+
returnChannelId: "",
|
|
367
374
|
hasReturnPath: false,
|
|
368
375
|
noReturnPath: true,
|
|
369
376
|
returnCta: "Continue",
|
|
@@ -475,6 +482,7 @@ const svc = defineService<S, {
|
|
|
475
482
|
authContextName: "",
|
|
476
483
|
returnScreenId: "",
|
|
477
484
|
returnId: "",
|
|
485
|
+
returnChannelId: "",
|
|
478
486
|
};
|
|
479
487
|
return derive(cleared);
|
|
480
488
|
},
|
|
@@ -3326,7 +3326,8 @@ const SCREENS = runtimeSetting({
|
|
|
3326
3326
|
"actionId": "himi.open",
|
|
3327
3327
|
"params": {
|
|
3328
3328
|
"screenId": "$service:himiStoreAccount.returnScreenId",
|
|
3329
|
-
"id": "$service:himiStoreAccount.returnId"
|
|
3329
|
+
"id": "$service:himiStoreAccount.returnId",
|
|
3330
|
+
"channelId": "$service:himiStoreAccount.returnChannelId"
|
|
3330
3331
|
}
|
|
3331
3332
|
}
|
|
3332
3333
|
}
|
|
@@ -19,6 +19,7 @@ interface AuthRouteInput {
|
|
|
19
19
|
contextName?: string;
|
|
20
20
|
returnScreenId?: string;
|
|
21
21
|
returnId?: string;
|
|
22
|
+
returnChannelId?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// The screen's boot input survives refresh; consuming it must survive too.
|
|
@@ -37,21 +38,25 @@ function strField(arg: unknown, key: string): string {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
/** Mid-flow auth (UX F3): intent + return path from himi.open / himalaya.input. */
|
|
40
|
-
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId"> {
|
|
41
|
+
function authIntentFromArg(arg: unknown, prev: Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId">): Pick<S, "authIntent" | "authContextName" | "returnScreenId" | "returnId" | "returnChannelId"> {
|
|
41
42
|
const route = routeInputConsumed ? {} : routeInput();
|
|
42
43
|
return {
|
|
43
44
|
authIntent: strField(arg, "intent") || route.intent || prev.authIntent || "",
|
|
44
45
|
authContextName: strField(arg, "contextName") || route.contextName || prev.authContextName || "",
|
|
45
46
|
returnScreenId: strField(arg, "returnScreenId") || route.returnScreenId || prev.returnScreenId || "",
|
|
46
47
|
returnId: strField(arg, "returnId") || route.returnId || prev.returnId || "",
|
|
48
|
+
returnChannelId: strField(arg, "returnChannelId") || route.returnChannelId || prev.returnChannelId || "",
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/** Where a successful sign-in returns to, or null. Never Account itself — that would
|
|
51
53
|
* only push a second copy of the screen the member is already on. */
|
|
52
|
-
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId">): NavDirective | null {
|
|
54
|
+
function resumeTarget(s: Pick<S, "returnScreenId" | "returnId" | "returnChannelId">): NavDirective | null {
|
|
53
55
|
if (!s.returnScreenId || s.returnScreenId === "himi_account") return null;
|
|
54
|
-
return s.returnId
|
|
56
|
+
return s.returnId || s.returnChannelId ? {
|
|
57
|
+
screenId: s.returnScreenId,
|
|
58
|
+
args: { ...(s.returnId ? { id: s.returnId } : {}), ...(s.returnChannelId ? { channelId: s.returnChannelId } : {}) },
|
|
59
|
+
} : { screenId: s.returnScreenId };
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
/** Resume the member-only screen that sent the visitor here, once. The return path is
|
|
@@ -61,7 +66,7 @@ function resumeAfterAuth(next: S): S {
|
|
|
61
66
|
const target = resumeTarget(next);
|
|
62
67
|
if (!next.isMember || !target) return next;
|
|
63
68
|
routeInputConsumed = true;
|
|
64
|
-
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "" }), target);
|
|
69
|
+
return navigate(derive({ ...next, authIntent: "", authContextName: "", returnScreenId: "", returnId: "", returnChannelId: "" }), target);
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
// Actions are not serialized: two quick Sign in taps both run against the pre-tap
|
|
@@ -165,6 +170,7 @@ interface S {
|
|
|
165
170
|
authContextName: string;
|
|
166
171
|
returnScreenId: string;
|
|
167
172
|
returnId: string;
|
|
173
|
+
returnChannelId: string;
|
|
168
174
|
/** Show Continue when an already-signed-in member opens Account with a return path.
|
|
169
175
|
* A sign-in made here resumes on its own (resumeAfterAuth). */
|
|
170
176
|
hasReturnPath: boolean;
|
|
@@ -364,6 +370,7 @@ const svc = defineService<S, {
|
|
|
364
370
|
authContextName: "",
|
|
365
371
|
returnScreenId: "",
|
|
366
372
|
returnId: "",
|
|
373
|
+
returnChannelId: "",
|
|
367
374
|
hasReturnPath: false,
|
|
368
375
|
noReturnPath: true,
|
|
369
376
|
returnCta: "Continue",
|
|
@@ -475,6 +482,7 @@ const svc = defineService<S, {
|
|
|
475
482
|
authContextName: "",
|
|
476
483
|
returnScreenId: "",
|
|
477
484
|
returnId: "",
|
|
485
|
+
returnChannelId: "",
|
|
478
486
|
};
|
|
479
487
|
return derive(cleared);
|
|
480
488
|
},
|