@wix/himalaya-cli 0.1616.0 → 0.1617.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/cli.mjs +36 -36
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/tier-5-add-a-screen.md +1 -1
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +37 -18
- package/templates/beauty-salon/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/beauty-salon/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/branded-lite/dev/index.ts +95 -47
- package/templates/branded-lite/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/community-club/dev/index.ts +27 -13
- package/templates/community-club/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/community-club/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/events-meetups/dev/index.ts +25 -12
- package/templates/events-meetups/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/gym-fitness/dev/index.ts +41 -20
- package/templates/gym-fitness/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/gym-fitness/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/nonprofit-cause/dev/index.ts +31 -15
- package/templates/nonprofit-cause/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/podcast-creator/dev/index.ts +29 -14
- package/templates/podcast-creator/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/portfolio-creative/dev/index.ts +31 -15
- package/templates/portfolio-creative/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/restaurant/dev/index.ts +27 -13
- package/templates/restaurant/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/retail-store/dev/index.ts +25 -12
- package/templates/retail-store/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/salon-spa/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/salon-spa/tier5-src/himi-store-account/index.ts +8 -2
- package/templates/yoga-studio/dev/index.ts +37 -18
- package/templates/yoga-studio/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +8 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-place-summary/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +8 -2
|
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
|
|
|
14
14
|
import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
|
|
15
15
|
import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
|
|
16
16
|
import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
17
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
17
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
18
19
|
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
|
|
19
20
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
|
|
|
143
144
|
if (after.args?.channelId) back.returnChannelId = after.args.channelId;
|
|
144
145
|
}
|
|
145
146
|
if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
|
|
146
|
-
const modalArgs: Record<string, string> = { ...args, modal: "1" };
|
|
147
|
+
const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
|
|
147
148
|
// With no tab to open it on, a modal has no way to the member screen: it only closes.
|
|
148
149
|
if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
|
|
149
150
|
return navigate(next, { screenId, presentation, args: modalArgs });
|
|
@@ -231,6 +232,8 @@ let appliedSeq = 0;
|
|
|
231
232
|
let signInScreenRequested = "";
|
|
232
233
|
/** Account only: how it opens the standalone sign-in screen ("" = push). */
|
|
233
234
|
let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
|
|
235
|
+
/** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
|
|
236
|
+
let signInStyleRequested: "page" | "" = "";
|
|
234
237
|
/** Account only: its tab, where a member screen opens after a modal sign-in. */
|
|
235
238
|
let signInReturnTabRequested = "";
|
|
236
239
|
let standaloneRequested = false;
|
|
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
|
|
|
268
271
|
}
|
|
269
272
|
signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
|
|
270
273
|
const presentation = strField(arg, "signInPresentation");
|
|
271
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
274
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
275
|
+
signInPresentationRequested = presentation;
|
|
276
|
+
signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
|
|
277
|
+
}
|
|
272
278
|
signInReturnTabRequested ||= strField(arg, "signInReturnTab");
|
|
273
279
|
// Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
|
|
274
280
|
standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
|
|
@@ -2323,7 +2323,8 @@ const SCREENS = runtimeSetting({
|
|
|
2323
2323
|
"params": {
|
|
2324
2324
|
"screenId": "himi_sign_in",
|
|
2325
2325
|
"mode": "signin",
|
|
2326
|
-
"modal": "1"
|
|
2326
|
+
"modal": "1",
|
|
2327
|
+
"sheetStyle": "page"
|
|
2327
2328
|
},
|
|
2328
2329
|
"presentation": "sheet"
|
|
2329
2330
|
}
|
|
@@ -2344,7 +2345,8 @@ const SCREENS = runtimeSetting({
|
|
|
2344
2345
|
"params": {
|
|
2345
2346
|
"screenId": "himi_sign_in",
|
|
2346
2347
|
"mode": "register",
|
|
2347
|
-
"modal": "1"
|
|
2348
|
+
"modal": "1",
|
|
2349
|
+
"sheetStyle": "page"
|
|
2348
2350
|
},
|
|
2349
2351
|
"presentation": "sheet"
|
|
2350
2352
|
}
|
|
@@ -3385,6 +3387,7 @@ const SCREENS = runtimeSetting({
|
|
|
3385
3387
|
"restorePurchases": "1",
|
|
3386
3388
|
"signInScreen": "himi_sign_in",
|
|
3387
3389
|
"signInPresentation": "sheet",
|
|
3390
|
+
"signInSheetStyle": "page",
|
|
3388
3391
|
"signInReturnTab": "profile",
|
|
3389
3392
|
"pollIdentity": "1",
|
|
3390
3393
|
"copy": "{\"account.subtitle\":\"RSVPs, groups and saved content in one place.\",\"storeAccount.authBody\":\"Sign in to continue — RSVPs and groups stay with you.\",\"storeAccount.authBodyRegister\":\"Create a member account to continue — RSVPs and groups stay with you.\"}"
|
|
@@ -3642,7 +3645,8 @@ const SCREENS = runtimeSetting({
|
|
|
3642
3645
|
"screenId": "himi_sign_in",
|
|
3643
3646
|
"mode": "signin",
|
|
3644
3647
|
"returnScreenId": "himi_account_settings",
|
|
3645
|
-
"modal": "1"
|
|
3648
|
+
"modal": "1",
|
|
3649
|
+
"sheetStyle": "page"
|
|
3646
3650
|
},
|
|
3647
3651
|
"presentation": "sheet"
|
|
3648
3652
|
}
|
|
@@ -6662,7 +6666,8 @@ const SCREENS = runtimeSetting({
|
|
|
6662
6666
|
"params": {
|
|
6663
6667
|
"screenId": "himi_sign_in",
|
|
6664
6668
|
"returnScreenId": "himi_notif_settings",
|
|
6665
|
-
"modal": "1"
|
|
6669
|
+
"modal": "1",
|
|
6670
|
+
"sheetStyle": "page"
|
|
6666
6671
|
},
|
|
6667
6672
|
"presentation": "sheet"
|
|
6668
6673
|
}
|
|
@@ -7057,7 +7062,8 @@ const SCREENS = runtimeSetting({
|
|
|
7057
7062
|
"mode": "signin",
|
|
7058
7063
|
"intent": "profile",
|
|
7059
7064
|
"returnScreenId": "himi_view_profile",
|
|
7060
|
-
"modal": "1"
|
|
7065
|
+
"modal": "1",
|
|
7066
|
+
"sheetStyle": "page"
|
|
7061
7067
|
},
|
|
7062
7068
|
"presentation": "sheet"
|
|
7063
7069
|
}
|
|
@@ -7791,7 +7797,8 @@ const SCREENS = runtimeSetting({
|
|
|
7791
7797
|
"mode": "signin",
|
|
7792
7798
|
"intent": "post",
|
|
7793
7799
|
"returnScreenId": "himi_feed",
|
|
7794
|
-
"modal": "1"
|
|
7800
|
+
"modal": "1",
|
|
7801
|
+
"sheetStyle": "page"
|
|
7795
7802
|
},
|
|
7796
7803
|
"presentation": "sheet"
|
|
7797
7804
|
}
|
|
@@ -8411,7 +8418,8 @@ const SCREENS = runtimeSetting({
|
|
|
8411
8418
|
"mode": "signin",
|
|
8412
8419
|
"intent": "post",
|
|
8413
8420
|
"returnScreenId": "himi_create_post",
|
|
8414
|
-
"modal": "1"
|
|
8421
|
+
"modal": "1",
|
|
8422
|
+
"sheetStyle": "page"
|
|
8415
8423
|
},
|
|
8416
8424
|
"presentation": "sheet"
|
|
8417
8425
|
}
|
|
@@ -12190,7 +12198,8 @@ const SCREENS = runtimeSetting({
|
|
|
12190
12198
|
"params": {
|
|
12191
12199
|
"screenId": "himi_sign_in",
|
|
12192
12200
|
"mode": "signin",
|
|
12193
|
-
"modal": "1"
|
|
12201
|
+
"modal": "1",
|
|
12202
|
+
"sheetStyle": "page"
|
|
12194
12203
|
},
|
|
12195
12204
|
"presentation": "sheet"
|
|
12196
12205
|
}
|
|
@@ -19304,7 +19313,8 @@ const SCREENS = runtimeSetting({
|
|
|
19304
19313
|
"mode": "signin",
|
|
19305
19314
|
"intent": "groups",
|
|
19306
19315
|
"returnScreenId": "himi_my_groups",
|
|
19307
|
-
"modal": "1"
|
|
19316
|
+
"modal": "1",
|
|
19317
|
+
"sheetStyle": "page"
|
|
19308
19318
|
},
|
|
19309
19319
|
"presentation": "sheet"
|
|
19310
19320
|
}
|
|
@@ -19730,7 +19740,8 @@ const SCREENS = runtimeSetting({
|
|
|
19730
19740
|
"actionId": "himi.open",
|
|
19731
19741
|
"params": {
|
|
19732
19742
|
"screenId": "himi_sign_in",
|
|
19733
|
-
"modal": "1"
|
|
19743
|
+
"modal": "1",
|
|
19744
|
+
"sheetStyle": "page"
|
|
19734
19745
|
},
|
|
19735
19746
|
"presentation": "sheet"
|
|
19736
19747
|
}
|
|
@@ -24883,7 +24894,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
24883
24894
|
"screenId": "himi_sign_in",
|
|
24884
24895
|
"mode": "signin",
|
|
24885
24896
|
"intent": "rsvp",
|
|
24886
|
-
"modal": "1"
|
|
24897
|
+
"modal": "1",
|
|
24898
|
+
"sheetStyle": "page"
|
|
24887
24899
|
},
|
|
24888
24900
|
"presentation": "sheet"
|
|
24889
24901
|
}
|
|
@@ -25199,7 +25211,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
25199
25211
|
"params": {
|
|
25200
25212
|
"screenId": "himi_sign_in",
|
|
25201
25213
|
"mode": "signin",
|
|
25202
|
-
"modal": "1"
|
|
25214
|
+
"modal": "1",
|
|
25215
|
+
"sheetStyle": "page"
|
|
25203
25216
|
},
|
|
25204
25217
|
"presentation": "sheet"
|
|
25205
25218
|
}
|
|
@@ -26477,7 +26490,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
26477
26490
|
"contextName": "$service:himiBrandedGroup.name",
|
|
26478
26491
|
"returnScreenId": "himi_group",
|
|
26479
26492
|
"returnId": "$service:himiBrandedGroup.id",
|
|
26480
|
-
"modal": "1"
|
|
26493
|
+
"modal": "1",
|
|
26494
|
+
"sheetStyle": "page"
|
|
26481
26495
|
},
|
|
26482
26496
|
"presentation": "sheet"
|
|
26483
26497
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// A sign-in sheet can be a form page rather than a drawer. `sheetStyle: "page"` keeps the iOS sheet
|
|
2
|
+
// and opens a full-screen modal on Android and web, whose sheet is a bottom drawer. A host older
|
|
3
|
+
// than the param ignores it and draws its own sheet.
|
|
4
|
+
//
|
|
5
|
+
// Opt-in per app: the app passes `signInSheetStyle: "page"` beside `signInPresentation`. These
|
|
6
|
+
// workers are shared (Salon & Spa runs them too), and an app that opens its other sign-ins as a
|
|
7
|
+
// plain sheet must not get a page from some of them and a drawer from the rest.
|
|
8
|
+
|
|
9
|
+
/** The app's `signInSheetStyle` param, read beside `signInPresentation`: "page", else "". */
|
|
10
|
+
export function signInPageStyle(value: unknown): "page" | "" {
|
|
11
|
+
return value === "page" ? "page" : "";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** The nav args a sign-in opened with `presentation` adds: `sheetStyle` on a sheet the app asked
|
|
15
|
+
* to open as a page, else none. */
|
|
16
|
+
export function signInSheetStyle(presentation: string | undefined, style: "page" | ""): { sheetStyle?: "page" } {
|
|
17
|
+
return presentation === "sheet" && style === "page" ? { sheetStyle: "page" } : {};
|
|
18
|
+
}
|
|
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
|
|
|
14
14
|
import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
|
|
15
15
|
import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
|
|
16
16
|
import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
17
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
17
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
18
19
|
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
|
|
19
20
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
|
|
|
143
144
|
if (after.args?.channelId) back.returnChannelId = after.args.channelId;
|
|
144
145
|
}
|
|
145
146
|
if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
|
|
146
|
-
const modalArgs: Record<string, string> = { ...args, modal: "1" };
|
|
147
|
+
const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
|
|
147
148
|
// With no tab to open it on, a modal has no way to the member screen: it only closes.
|
|
148
149
|
if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
|
|
149
150
|
return navigate(next, { screenId, presentation, args: modalArgs });
|
|
@@ -231,6 +232,8 @@ let appliedSeq = 0;
|
|
|
231
232
|
let signInScreenRequested = "";
|
|
232
233
|
/** Account only: how it opens the standalone sign-in screen ("" = push). */
|
|
233
234
|
let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
|
|
235
|
+
/** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
|
|
236
|
+
let signInStyleRequested: "page" | "" = "";
|
|
234
237
|
/** Account only: its tab, where a member screen opens after a modal sign-in. */
|
|
235
238
|
let signInReturnTabRequested = "";
|
|
236
239
|
let standaloneRequested = false;
|
|
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
|
|
|
268
271
|
}
|
|
269
272
|
signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
|
|
270
273
|
const presentation = strField(arg, "signInPresentation");
|
|
271
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
274
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
275
|
+
signInPresentationRequested = presentation;
|
|
276
|
+
signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
|
|
277
|
+
}
|
|
272
278
|
signInReturnTabRequested ||= strField(arg, "signInReturnTab");
|
|
273
279
|
// Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
|
|
274
280
|
standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
|
|
@@ -2507,7 +2507,8 @@ const SCREENS = runtimeSetting({
|
|
|
2507
2507
|
"params": {
|
|
2508
2508
|
"screenId": "himi_sign_in",
|
|
2509
2509
|
"mode": "signin",
|
|
2510
|
-
"modal": "1"
|
|
2510
|
+
"modal": "1",
|
|
2511
|
+
"sheetStyle": "page"
|
|
2511
2512
|
},
|
|
2512
2513
|
"presentation": "sheet"
|
|
2513
2514
|
}
|
|
@@ -2528,7 +2529,8 @@ const SCREENS = runtimeSetting({
|
|
|
2528
2529
|
"params": {
|
|
2529
2530
|
"screenId": "himi_sign_in",
|
|
2530
2531
|
"mode": "register",
|
|
2531
|
-
"modal": "1"
|
|
2532
|
+
"modal": "1",
|
|
2533
|
+
"sheetStyle": "page"
|
|
2532
2534
|
},
|
|
2533
2535
|
"presentation": "sheet"
|
|
2534
2536
|
}
|
|
@@ -3569,6 +3571,7 @@ const SCREENS = runtimeSetting({
|
|
|
3569
3571
|
"restorePurchases": "1",
|
|
3570
3572
|
"signInScreen": "himi_sign_in",
|
|
3571
3573
|
"signInPresentation": "sheet",
|
|
3574
|
+
"signInSheetStyle": "page",
|
|
3572
3575
|
"signInReturnTab": "profile",
|
|
3573
3576
|
"pollIdentity": "1",
|
|
3574
3577
|
"copy": "{\"account.subtitle\":\"RSVPs, groups and saved content in one place.\",\"storeAccount.authBody\":\"Sign in to continue — RSVPs and groups stay with you.\",\"storeAccount.authBodyRegister\":\"Create a member account to continue — RSVPs and groups stay with you.\"}"
|
|
@@ -3826,7 +3829,8 @@ const SCREENS = runtimeSetting({
|
|
|
3826
3829
|
"screenId": "himi_sign_in",
|
|
3827
3830
|
"mode": "signin",
|
|
3828
3831
|
"returnScreenId": "himi_account_settings",
|
|
3829
|
-
"modal": "1"
|
|
3832
|
+
"modal": "1",
|
|
3833
|
+
"sheetStyle": "page"
|
|
3830
3834
|
},
|
|
3831
3835
|
"presentation": "sheet"
|
|
3832
3836
|
}
|
|
@@ -6846,7 +6850,8 @@ const SCREENS = runtimeSetting({
|
|
|
6846
6850
|
"params": {
|
|
6847
6851
|
"screenId": "himi_sign_in",
|
|
6848
6852
|
"returnScreenId": "himi_notif_settings",
|
|
6849
|
-
"modal": "1"
|
|
6853
|
+
"modal": "1",
|
|
6854
|
+
"sheetStyle": "page"
|
|
6850
6855
|
},
|
|
6851
6856
|
"presentation": "sheet"
|
|
6852
6857
|
}
|
|
@@ -7241,7 +7246,8 @@ const SCREENS = runtimeSetting({
|
|
|
7241
7246
|
"mode": "signin",
|
|
7242
7247
|
"intent": "profile",
|
|
7243
7248
|
"returnScreenId": "himi_view_profile",
|
|
7244
|
-
"modal": "1"
|
|
7249
|
+
"modal": "1",
|
|
7250
|
+
"sheetStyle": "page"
|
|
7245
7251
|
},
|
|
7246
7252
|
"presentation": "sheet"
|
|
7247
7253
|
}
|
|
@@ -7975,7 +7981,8 @@ const SCREENS = runtimeSetting({
|
|
|
7975
7981
|
"mode": "signin",
|
|
7976
7982
|
"intent": "post",
|
|
7977
7983
|
"returnScreenId": "himi_feed",
|
|
7978
|
-
"modal": "1"
|
|
7984
|
+
"modal": "1",
|
|
7985
|
+
"sheetStyle": "page"
|
|
7979
7986
|
},
|
|
7980
7987
|
"presentation": "sheet"
|
|
7981
7988
|
}
|
|
@@ -8595,7 +8602,8 @@ const SCREENS = runtimeSetting({
|
|
|
8595
8602
|
"mode": "signin",
|
|
8596
8603
|
"intent": "post",
|
|
8597
8604
|
"returnScreenId": "himi_create_post",
|
|
8598
|
-
"modal": "1"
|
|
8605
|
+
"modal": "1",
|
|
8606
|
+
"sheetStyle": "page"
|
|
8599
8607
|
},
|
|
8600
8608
|
"presentation": "sheet"
|
|
8601
8609
|
}
|
|
@@ -12374,7 +12382,8 @@ const SCREENS = runtimeSetting({
|
|
|
12374
12382
|
"params": {
|
|
12375
12383
|
"screenId": "himi_sign_in",
|
|
12376
12384
|
"mode": "signin",
|
|
12377
|
-
"modal": "1"
|
|
12385
|
+
"modal": "1",
|
|
12386
|
+
"sheetStyle": "page"
|
|
12378
12387
|
},
|
|
12379
12388
|
"presentation": "sheet"
|
|
12380
12389
|
}
|
|
@@ -19488,7 +19497,8 @@ const SCREENS = runtimeSetting({
|
|
|
19488
19497
|
"mode": "signin",
|
|
19489
19498
|
"intent": "groups",
|
|
19490
19499
|
"returnScreenId": "himi_my_groups",
|
|
19491
|
-
"modal": "1"
|
|
19500
|
+
"modal": "1",
|
|
19501
|
+
"sheetStyle": "page"
|
|
19492
19502
|
},
|
|
19493
19503
|
"presentation": "sheet"
|
|
19494
19504
|
}
|
|
@@ -22843,7 +22853,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
22843
22853
|
"screenId": "himi_sign_in",
|
|
22844
22854
|
"mode": "signin",
|
|
22845
22855
|
"intent": "rsvp",
|
|
22846
|
-
"modal": "1"
|
|
22856
|
+
"modal": "1",
|
|
22857
|
+
"sheetStyle": "page"
|
|
22847
22858
|
},
|
|
22848
22859
|
"presentation": "sheet"
|
|
22849
22860
|
}
|
|
@@ -23159,7 +23170,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
23159
23170
|
"params": {
|
|
23160
23171
|
"screenId": "himi_sign_in",
|
|
23161
23172
|
"mode": "signin",
|
|
23162
|
-
"modal": "1"
|
|
23173
|
+
"modal": "1",
|
|
23174
|
+
"sheetStyle": "page"
|
|
23163
23175
|
},
|
|
23164
23176
|
"presentation": "sheet"
|
|
23165
23177
|
}
|
|
@@ -24437,7 +24449,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
24437
24449
|
"contextName": "$service:himiBrandedGroup.name",
|
|
24438
24450
|
"returnScreenId": "himi_group",
|
|
24439
24451
|
"returnId": "$service:himiBrandedGroup.id",
|
|
24440
|
-
"modal": "1"
|
|
24452
|
+
"modal": "1",
|
|
24453
|
+
"sheetStyle": "page"
|
|
24441
24454
|
},
|
|
24442
24455
|
"presentation": "sheet"
|
|
24443
24456
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// A sign-in sheet can be a form page rather than a drawer. `sheetStyle: "page"` keeps the iOS sheet
|
|
2
|
+
// and opens a full-screen modal on Android and web, whose sheet is a bottom drawer. A host older
|
|
3
|
+
// than the param ignores it and draws its own sheet.
|
|
4
|
+
//
|
|
5
|
+
// Opt-in per app: the app passes `signInSheetStyle: "page"` beside `signInPresentation`. These
|
|
6
|
+
// workers are shared (Salon & Spa runs them too), and an app that opens its other sign-ins as a
|
|
7
|
+
// plain sheet must not get a page from some of them and a drawer from the rest.
|
|
8
|
+
|
|
9
|
+
/** The app's `signInSheetStyle` param, read beside `signInPresentation`: "page", else "". */
|
|
10
|
+
export function signInPageStyle(value: unknown): "page" | "" {
|
|
11
|
+
return value === "page" ? "page" : "";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** The nav args a sign-in opened with `presentation` adds: `sheetStyle` on a sheet the app asked
|
|
15
|
+
* to open as a page, else none. */
|
|
16
|
+
export function signInSheetStyle(presentation: string | undefined, style: "page" | ""): { sheetStyle?: "page" } {
|
|
17
|
+
return presentation === "sheet" && style === "page" ? { sheetStyle: "page" } : {};
|
|
18
|
+
}
|
|
@@ -14,6 +14,7 @@ import { dispatch } from "@himalaya/dispatch";
|
|
|
14
14
|
import { getCurrentCart, searchOrders, type WixOrder } from "@himalaya/wix-ecom";
|
|
15
15
|
import { guestProfile, loadMemberProfile, signedInEmail, strOf, fmtDate, titleCase, type AccountActivityRow } from "../_shared/himi-account";
|
|
16
16
|
import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
17
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
17
18
|
import { memberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
18
19
|
import { createIapCommerce, onlineProgramOrders, pricingPlanOrders, storesAppleSalesEnabled, storesProductOrders } from "@himalaya/iap-checkout";
|
|
19
20
|
import { IAP_RESTORE_KEYS, NO_IAP_RESTORE, createIapRestore, resetUnhydratedKeysOnOlderRuntime, type IapRestoreFields } from "../_shared/iap-worker.js";
|
|
@@ -143,7 +144,7 @@ function openSignIn(next: S, args: Record<string, string>, after: { screenId: st
|
|
|
143
144
|
if (after.args?.channelId) back.returnChannelId = after.args.channelId;
|
|
144
145
|
}
|
|
145
146
|
if (!presentation) return navigate(next, { screenId, args: { ...args, ...back } });
|
|
146
|
-
const modalArgs: Record<string, string> = { ...args, modal: "1" };
|
|
147
|
+
const modalArgs: Record<string, string> = { ...args, modal: "1", ...signInSheetStyle(presentation, signInStyleRequested) };
|
|
147
148
|
// With no tab to open it on, a modal has no way to the member screen: it only closes.
|
|
148
149
|
if (after && signInReturnTabRequested) Object.assign(modalArgs, back, { returnTab: signInReturnTabRequested });
|
|
149
150
|
return navigate(next, { screenId, presentation, args: modalArgs });
|
|
@@ -231,6 +232,8 @@ let appliedSeq = 0;
|
|
|
231
232
|
let signInScreenRequested = "";
|
|
232
233
|
/** Account only: how it opens the standalone sign-in screen ("" = push). */
|
|
233
234
|
let signInPresentationRequested: "" | "sheet" | "full_screen" = "";
|
|
235
|
+
/** Account only: `signInSheetStyle`, "page" when the app opens that sheet as a full page. */
|
|
236
|
+
let signInStyleRequested: "page" | "" = "";
|
|
234
237
|
/** Account only: its tab, where a member screen opens after a modal sign-in. */
|
|
235
238
|
let signInReturnTabRequested = "";
|
|
236
239
|
let standaloneRequested = false;
|
|
@@ -268,7 +271,10 @@ function appearConfig(s: S, arg: unknown): AppearConfig {
|
|
|
268
271
|
}
|
|
269
272
|
signInScreenRequested ||= strField(arg, "signInScreen") || s.signInScreen;
|
|
270
273
|
const presentation = strField(arg, "signInPresentation");
|
|
271
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
274
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
275
|
+
signInPresentationRequested = presentation;
|
|
276
|
+
signInStyleRequested = signInPageStyle(strField(arg, "signInSheetStyle"));
|
|
277
|
+
}
|
|
272
278
|
signInReturnTabRequested ||= strField(arg, "signInReturnTab");
|
|
273
279
|
// Only the sign-in screen's route carries `mode`, so it marks the form from the boot load on.
|
|
274
280
|
standaloneRequested ||= s.standalone || appearing || (!routeInputConsumed && !!routeInput().mode);
|
|
@@ -2930,7 +2930,8 @@ const SCREENS = runtimeSetting({
|
|
|
2930
2930
|
"params": {
|
|
2931
2931
|
"screenId": "himi_sign_in",
|
|
2932
2932
|
"mode": "signin",
|
|
2933
|
-
"modal": "1"
|
|
2933
|
+
"modal": "1",
|
|
2934
|
+
"sheetStyle": "page"
|
|
2934
2935
|
},
|
|
2935
2936
|
"presentation": "sheet"
|
|
2936
2937
|
}
|
|
@@ -2951,7 +2952,8 @@ const SCREENS = runtimeSetting({
|
|
|
2951
2952
|
"params": {
|
|
2952
2953
|
"screenId": "himi_sign_in",
|
|
2953
2954
|
"mode": "register",
|
|
2954
|
-
"modal": "1"
|
|
2955
|
+
"modal": "1",
|
|
2956
|
+
"sheetStyle": "page"
|
|
2955
2957
|
},
|
|
2956
2958
|
"presentation": "sheet"
|
|
2957
2959
|
}
|
|
@@ -4399,6 +4401,7 @@ const SCREENS = runtimeSetting({
|
|
|
4399
4401
|
"restorePurchases": "1",
|
|
4400
4402
|
"signInScreen": "himi_sign_in",
|
|
4401
4403
|
"signInPresentation": "sheet",
|
|
4404
|
+
"signInSheetStyle": "page",
|
|
4402
4405
|
"signInReturnTab": "profile",
|
|
4403
4406
|
"pollIdentity": "1",
|
|
4404
4407
|
"cartCount": "1",
|
|
@@ -4676,7 +4679,8 @@ const SCREENS = runtimeSetting({
|
|
|
4676
4679
|
"screenId": "himi_sign_in",
|
|
4677
4680
|
"mode": "signin",
|
|
4678
4681
|
"returnScreenId": "himi_account_settings",
|
|
4679
|
-
"modal": "1"
|
|
4682
|
+
"modal": "1",
|
|
4683
|
+
"sheetStyle": "page"
|
|
4680
4684
|
},
|
|
4681
4685
|
"presentation": "sheet"
|
|
4682
4686
|
}
|
|
@@ -7696,7 +7700,8 @@ const SCREENS = runtimeSetting({
|
|
|
7696
7700
|
"params": {
|
|
7697
7701
|
"screenId": "himi_sign_in",
|
|
7698
7702
|
"returnScreenId": "himi_notif_settings",
|
|
7699
|
-
"modal": "1"
|
|
7703
|
+
"modal": "1",
|
|
7704
|
+
"sheetStyle": "page"
|
|
7700
7705
|
},
|
|
7701
7706
|
"presentation": "sheet"
|
|
7702
7707
|
}
|
|
@@ -8091,7 +8096,8 @@ const SCREENS = runtimeSetting({
|
|
|
8091
8096
|
"mode": "signin",
|
|
8092
8097
|
"intent": "profile",
|
|
8093
8098
|
"returnScreenId": "himi_view_profile",
|
|
8094
|
-
"modal": "1"
|
|
8099
|
+
"modal": "1",
|
|
8100
|
+
"sheetStyle": "page"
|
|
8095
8101
|
},
|
|
8096
8102
|
"presentation": "sheet"
|
|
8097
8103
|
}
|
|
@@ -17591,7 +17597,8 @@ const SCREENS = runtimeSetting({
|
|
|
17591
17597
|
"mode": "signin",
|
|
17592
17598
|
"intent": "orders",
|
|
17593
17599
|
"returnScreenId": "himi_orders",
|
|
17594
|
-
"modal": "1"
|
|
17600
|
+
"modal": "1",
|
|
17601
|
+
"sheetStyle": "page"
|
|
17595
17602
|
},
|
|
17596
17603
|
"presentation": "sheet"
|
|
17597
17604
|
}
|
|
@@ -18328,7 +18335,8 @@ const SCREENS = runtimeSetting({
|
|
|
18328
18335
|
"mode": "signin",
|
|
18329
18336
|
"intent": "addresses",
|
|
18330
18337
|
"returnScreenId": "himi_addresses",
|
|
18331
|
-
"modal": "1"
|
|
18338
|
+
"modal": "1",
|
|
18339
|
+
"sheetStyle": "page"
|
|
18332
18340
|
},
|
|
18333
18341
|
"presentation": "sheet"
|
|
18334
18342
|
}
|
|
@@ -19387,7 +19395,8 @@ const SCREENS = runtimeSetting({
|
|
|
19387
19395
|
"mode": "signin",
|
|
19388
19396
|
"intent": "addresses",
|
|
19389
19397
|
"returnScreenId": "himi_address",
|
|
19390
|
-
"modal": "1"
|
|
19398
|
+
"modal": "1",
|
|
19399
|
+
"sheetStyle": "page"
|
|
19391
19400
|
},
|
|
19392
19401
|
"presentation": "sheet"
|
|
19393
19402
|
}
|
|
@@ -20060,7 +20069,8 @@ const SCREENS = runtimeSetting({
|
|
|
20060
20069
|
"mode": "signin",
|
|
20061
20070
|
"intent": "wallet",
|
|
20062
20071
|
"returnScreenId": "himi_wallet",
|
|
20063
|
-
"modal": "1"
|
|
20072
|
+
"modal": "1",
|
|
20073
|
+
"sheetStyle": "page"
|
|
20064
20074
|
},
|
|
20065
20075
|
"presentation": "sheet"
|
|
20066
20076
|
}
|
|
@@ -20572,7 +20582,8 @@ const SCREENS = runtimeSetting({
|
|
|
20572
20582
|
"actionId": "tier5.himiPlaceSummary.load",
|
|
20573
20583
|
"params": {
|
|
20574
20584
|
"verticals": "[\"store\",\"bookings\",\"plans\",\"events\",\"blog\"]",
|
|
20575
|
-
"signInPresentation": "sheet"
|
|
20585
|
+
"signInPresentation": "sheet",
|
|
20586
|
+
"signInSheetStyle": "page"
|
|
20576
20587
|
}
|
|
20577
20588
|
}
|
|
20578
20589
|
}
|
|
@@ -23476,7 +23487,8 @@ const SCREENS = runtimeSetting({
|
|
|
23476
23487
|
"screenId": "himi_sign_in",
|
|
23477
23488
|
"mode": "signin",
|
|
23478
23489
|
"returnScreenId": "himi_bookings",
|
|
23479
|
-
"modal": "1"
|
|
23490
|
+
"modal": "1",
|
|
23491
|
+
"sheetStyle": "page"
|
|
23480
23492
|
},
|
|
23481
23493
|
"presentation": "sheet"
|
|
23482
23494
|
},
|
|
@@ -26589,7 +26601,8 @@ const SCREENS = runtimeSetting({
|
|
|
26589
26601
|
"actionId": "tier5.himiBrandedAgenda.load",
|
|
26590
26602
|
"params": {
|
|
26591
26603
|
"firstWeekday": "0",
|
|
26592
|
-
"signInPresentation": "sheet"
|
|
26604
|
+
"signInPresentation": "sheet",
|
|
26605
|
+
"signInSheetStyle": "page"
|
|
26593
26606
|
}
|
|
26594
26607
|
}
|
|
26595
26608
|
}
|
|
@@ -29732,7 +29745,8 @@ const SCREENS = runtimeSetting({
|
|
|
29732
29745
|
"params": {
|
|
29733
29746
|
"screenId": "himi_sign_in",
|
|
29734
29747
|
"mode": "signin",
|
|
29735
|
-
"modal": "1"
|
|
29748
|
+
"modal": "1",
|
|
29749
|
+
"sheetStyle": "page"
|
|
29736
29750
|
},
|
|
29737
29751
|
"presentation": "sheet"
|
|
29738
29752
|
}
|
|
@@ -30120,7 +30134,8 @@ const SCREENS = runtimeSetting({
|
|
|
30120
30134
|
"mode": "signin",
|
|
30121
30135
|
"intent": "post",
|
|
30122
30136
|
"returnScreenId": "himi_create_post",
|
|
30123
|
-
"modal": "1"
|
|
30137
|
+
"modal": "1",
|
|
30138
|
+
"sheetStyle": "page"
|
|
30124
30139
|
},
|
|
30125
30140
|
"presentation": "sheet"
|
|
30126
30141
|
}
|
|
@@ -33899,7 +33914,8 @@ const SCREENS = runtimeSetting({
|
|
|
33899
33914
|
"params": {
|
|
33900
33915
|
"screenId": "himi_sign_in",
|
|
33901
33916
|
"mode": "signin",
|
|
33902
|
-
"modal": "1"
|
|
33917
|
+
"modal": "1",
|
|
33918
|
+
"sheetStyle": "page"
|
|
33903
33919
|
},
|
|
33904
33920
|
"presentation": "sheet"
|
|
33905
33921
|
}
|
|
@@ -39265,7 +39281,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
39265
39281
|
"screenId": "himi_sign_in",
|
|
39266
39282
|
"returnScreenId": "himi_order",
|
|
39267
39283
|
"returnId": "$service:himiBrandedOrder.id",
|
|
39268
|
-
"modal": "1"
|
|
39284
|
+
"modal": "1",
|
|
39285
|
+
"sheetStyle": "page"
|
|
39269
39286
|
},
|
|
39270
39287
|
"presentation": "sheet"
|
|
39271
39288
|
}
|
|
@@ -43430,7 +43447,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
43430
43447
|
"actionId": "tier5.himiBookingService.load",
|
|
43431
43448
|
"params": {
|
|
43432
43449
|
"signInScreenId": "himi_sign_in",
|
|
43433
|
-
"signInPresentation": "sheet"
|
|
43450
|
+
"signInPresentation": "sheet",
|
|
43451
|
+
"signInSheetStyle": "page"
|
|
43434
43452
|
}
|
|
43435
43453
|
}
|
|
43436
43454
|
}
|
|
@@ -46658,7 +46676,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
46658
46676
|
"screenId": "himi_sign_in",
|
|
46659
46677
|
"mode": "signin",
|
|
46660
46678
|
"intent": "book",
|
|
46661
|
-
"modal": "1"
|
|
46679
|
+
"modal": "1",
|
|
46680
|
+
"sheetStyle": "page"
|
|
46662
46681
|
},
|
|
46663
46682
|
"presentation": "sheet"
|
|
46664
46683
|
}
|
|
@@ -50041,7 +50060,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
50041
50060
|
"screenId": "himi_sign_in",
|
|
50042
50061
|
"mode": "signin",
|
|
50043
50062
|
"intent": "rsvp",
|
|
50044
|
-
"modal": "1"
|
|
50063
|
+
"modal": "1",
|
|
50064
|
+
"sheetStyle": "page"
|
|
50045
50065
|
},
|
|
50046
50066
|
"presentation": "sheet"
|
|
50047
50067
|
}
|
|
@@ -50357,7 +50377,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
50357
50377
|
"params": {
|
|
50358
50378
|
"screenId": "himi_sign_in",
|
|
50359
50379
|
"mode": "signin",
|
|
50360
|
-
"modal": "1"
|
|
50380
|
+
"modal": "1",
|
|
50381
|
+
"sheetStyle": "page"
|
|
50361
50382
|
},
|
|
50362
50383
|
"presentation": "sheet"
|
|
50363
50384
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// A sign-in sheet can be a form page rather than a drawer. `sheetStyle: "page"` keeps the iOS sheet
|
|
2
|
+
// and opens a full-screen modal on Android and web, whose sheet is a bottom drawer. A host older
|
|
3
|
+
// than the param ignores it and draws its own sheet.
|
|
4
|
+
//
|
|
5
|
+
// Opt-in per app: the app passes `signInSheetStyle: "page"` beside `signInPresentation`. These
|
|
6
|
+
// workers are shared (Salon & Spa runs them too), and an app that opens its other sign-ins as a
|
|
7
|
+
// plain sheet must not get a page from some of them and a drawer from the rest.
|
|
8
|
+
|
|
9
|
+
/** The app's `signInSheetStyle` param, read beside `signInPresentation`: "page", else "". */
|
|
10
|
+
export function signInPageStyle(value: unknown): "page" | "" {
|
|
11
|
+
return value === "page" ? "page" : "";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** The nav args a sign-in opened with `presentation` adds: `sheetStyle` on a sheet the app asked
|
|
15
|
+
* to open as a page, else none. */
|
|
16
|
+
export function signInSheetStyle(presentation: string | undefined, style: "page" | ""): { sheetStyle?: "page" } {
|
|
17
|
+
return presentation === "sheet" && style === "page" ? { sheetStyle: "page" } : {};
|
|
18
|
+
}
|