@wix/himalaya-cli 0.1616.0 → 0.1618.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/dev-server/src/builder.d.ts +15 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +28 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/one-app-section.d.ts +39 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/one-app-visibility.d.ts +22 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +151 -24
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +8 -0
- package/dist/cli.mjs +1042 -389
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +10 -1
- package/guides/component-reference.md +25 -2
- package/guides/designing-himi-screens.md +3 -1
- package/guides/hhp.md +3 -1
- package/guides/himi-json-output.md +11 -1
- package/guides/index.json +1 -1
- package/guides/one-app-section-mappings.md +32 -0
- package/guides/one-app-to-himi-app.md +133 -9
- 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);
|
|
@@ -1946,7 +1946,8 @@ const SCREENS = runtimeSetting({
|
|
|
1946
1946
|
"params": {
|
|
1947
1947
|
"screenId": "himi_sign_in",
|
|
1948
1948
|
"mode": "signin",
|
|
1949
|
-
"modal": "1"
|
|
1949
|
+
"modal": "1",
|
|
1950
|
+
"sheetStyle": "page"
|
|
1950
1951
|
},
|
|
1951
1952
|
"presentation": "sheet"
|
|
1952
1953
|
}
|
|
@@ -1967,7 +1968,8 @@ const SCREENS = runtimeSetting({
|
|
|
1967
1968
|
"params": {
|
|
1968
1969
|
"screenId": "himi_sign_in",
|
|
1969
1970
|
"mode": "register",
|
|
1970
|
-
"modal": "1"
|
|
1971
|
+
"modal": "1",
|
|
1972
|
+
"sheetStyle": "page"
|
|
1971
1973
|
},
|
|
1972
1974
|
"presentation": "sheet"
|
|
1973
1975
|
}
|
|
@@ -3172,6 +3174,7 @@ const SCREENS = runtimeSetting({
|
|
|
3172
3174
|
"restorePurchases": "1",
|
|
3173
3175
|
"signInScreen": "himi_sign_in",
|
|
3174
3176
|
"signInPresentation": "sheet",
|
|
3177
|
+
"signInSheetStyle": "page",
|
|
3175
3178
|
"signInReturnTab": "profile",
|
|
3176
3179
|
"pollIdentity": "1",
|
|
3177
3180
|
"cartCount": "1",
|
|
@@ -3449,7 +3452,8 @@ const SCREENS = runtimeSetting({
|
|
|
3449
3452
|
"screenId": "himi_sign_in",
|
|
3450
3453
|
"mode": "signin",
|
|
3451
3454
|
"returnScreenId": "himi_account_settings",
|
|
3452
|
-
"modal": "1"
|
|
3455
|
+
"modal": "1",
|
|
3456
|
+
"sheetStyle": "page"
|
|
3453
3457
|
},
|
|
3454
3458
|
"presentation": "sheet"
|
|
3455
3459
|
}
|
|
@@ -6469,7 +6473,8 @@ const SCREENS = runtimeSetting({
|
|
|
6469
6473
|
"params": {
|
|
6470
6474
|
"screenId": "himi_sign_in",
|
|
6471
6475
|
"returnScreenId": "himi_notif_settings",
|
|
6472
|
-
"modal": "1"
|
|
6476
|
+
"modal": "1",
|
|
6477
|
+
"sheetStyle": "page"
|
|
6473
6478
|
},
|
|
6474
6479
|
"presentation": "sheet"
|
|
6475
6480
|
}
|
|
@@ -6864,7 +6869,8 @@ const SCREENS = runtimeSetting({
|
|
|
6864
6869
|
"mode": "signin",
|
|
6865
6870
|
"intent": "profile",
|
|
6866
6871
|
"returnScreenId": "himi_view_profile",
|
|
6867
|
-
"modal": "1"
|
|
6872
|
+
"modal": "1",
|
|
6873
|
+
"sheetStyle": "page"
|
|
6868
6874
|
},
|
|
6869
6875
|
"presentation": "sheet"
|
|
6870
6876
|
}
|
|
@@ -16375,7 +16381,8 @@ const SCREENS = runtimeSetting({
|
|
|
16375
16381
|
"mode": "signin",
|
|
16376
16382
|
"intent": "orders",
|
|
16377
16383
|
"returnScreenId": "himi_orders",
|
|
16378
|
-
"modal": "1"
|
|
16384
|
+
"modal": "1",
|
|
16385
|
+
"sheetStyle": "page"
|
|
16379
16386
|
},
|
|
16380
16387
|
"presentation": "sheet"
|
|
16381
16388
|
}
|
|
@@ -17112,7 +17119,8 @@ const SCREENS = runtimeSetting({
|
|
|
17112
17119
|
"mode": "signin",
|
|
17113
17120
|
"intent": "addresses",
|
|
17114
17121
|
"returnScreenId": "himi_addresses",
|
|
17115
|
-
"modal": "1"
|
|
17122
|
+
"modal": "1",
|
|
17123
|
+
"sheetStyle": "page"
|
|
17116
17124
|
},
|
|
17117
17125
|
"presentation": "sheet"
|
|
17118
17126
|
}
|
|
@@ -18171,7 +18179,8 @@ const SCREENS = runtimeSetting({
|
|
|
18171
18179
|
"mode": "signin",
|
|
18172
18180
|
"intent": "addresses",
|
|
18173
18181
|
"returnScreenId": "himi_address",
|
|
18174
|
-
"modal": "1"
|
|
18182
|
+
"modal": "1",
|
|
18183
|
+
"sheetStyle": "page"
|
|
18175
18184
|
},
|
|
18176
18185
|
"presentation": "sheet"
|
|
18177
18186
|
}
|
|
@@ -18844,7 +18853,8 @@ const SCREENS = runtimeSetting({
|
|
|
18844
18853
|
"mode": "signin",
|
|
18845
18854
|
"intent": "wallet",
|
|
18846
18855
|
"returnScreenId": "himi_wallet",
|
|
18847
|
-
"modal": "1"
|
|
18856
|
+
"modal": "1",
|
|
18857
|
+
"sheetStyle": "page"
|
|
18848
18858
|
},
|
|
18849
18859
|
"presentation": "sheet"
|
|
18850
18860
|
}
|
|
@@ -19068,7 +19078,8 @@ const SCREENS = runtimeSetting({
|
|
|
19068
19078
|
"mode": "signin",
|
|
19069
19079
|
"intent": "post",
|
|
19070
19080
|
"returnScreenId": "himi_create_post",
|
|
19071
|
-
"modal": "1"
|
|
19081
|
+
"modal": "1",
|
|
19082
|
+
"sheetStyle": "page"
|
|
19072
19083
|
},
|
|
19073
19084
|
"presentation": "sheet"
|
|
19074
19085
|
}
|
|
@@ -23398,7 +23409,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
23398
23409
|
"screenId": "himi_sign_in",
|
|
23399
23410
|
"returnScreenId": "himi_order",
|
|
23400
23411
|
"returnId": "$service:himiBrandedOrder.id",
|
|
23401
|
-
"modal": "1"
|
|
23412
|
+
"modal": "1",
|
|
23413
|
+
"sheetStyle": "page"
|
|
23402
23414
|
},
|
|
23403
23415
|
"presentation": "sheet"
|
|
23404
23416
|
}
|
|
@@ -25337,7 +25349,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
25337
25349
|
"params": {
|
|
25338
25350
|
"screenId": "himi_sign_in",
|
|
25339
25351
|
"mode": "signin",
|
|
25340
|
-
"modal": "1"
|
|
25352
|
+
"modal": "1",
|
|
25353
|
+
"sheetStyle": "page"
|
|
25341
25354
|
},
|
|
25342
25355
|
"presentation": "sheet"
|
|
25343
25356
|
}
|
|
@@ -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);
|
|
@@ -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
|
+
}
|
|
@@ -13,6 +13,7 @@ import { addDays, dayKey, dayLabel, timeLabel } from "@himalaya/time";
|
|
|
13
13
|
import { getService, queryServiceAvailability, registerToWaitlist, type WixAvailabilityEntry, type WixService, type WixServiceAddress, type WixServiceBookingPolicy } from "@himalaya/wix-bookings";
|
|
14
14
|
import { getMyMember } from "@himalaya/wix-members";
|
|
15
15
|
import { memberAccess, type MemberAccess } from "../_shared/member-access.js";
|
|
16
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
16
17
|
import { placesIn, sessionControl, sessionOf, type MemberPlace, type Session, type SessionControl } from "../_shared/booking-session.js";
|
|
17
18
|
import { categoryName, courseDatesText, courseReadWindows, courseSessionsAvailability, courseWindowOpen, serviceDurationText, servicePriceLine, slotStartInstant, type BookingLabel, type ServicePriceLine } from "../_shared/himi-bookings.js";
|
|
18
19
|
import { formatServiceMoney, serviceCurrency } from "../_shared/wix-service-price.js";
|
|
@@ -723,10 +724,14 @@ const sameMember = (a: MemberAccess | undefined, b: MemberAccess | undefined): b
|
|
|
723
724
|
* appear (or tap) params — Branded Lite passes `himi_sign_in` as a sheet. */
|
|
724
725
|
let signInScreenId = "";
|
|
725
726
|
let signInPresentation: "" | "sheet" | "full_screen" = "";
|
|
727
|
+
let signInStyle: "page" | "" = "";
|
|
726
728
|
function rememberSignIn(arg: unknown): void {
|
|
727
|
-
const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown };
|
|
729
|
+
const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown; signInSheetStyle?: unknown };
|
|
728
730
|
if (typeof a.signInScreenId === "string" && a.signInScreenId.trim()) signInScreenId = a.signInScreenId.trim();
|
|
729
|
-
if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen")
|
|
731
|
+
if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen") {
|
|
732
|
+
signInPresentation = a.signInPresentation;
|
|
733
|
+
signInStyle = signInPageStyle(a.signInSheetStyle);
|
|
734
|
+
}
|
|
730
735
|
}
|
|
731
736
|
|
|
732
737
|
// ---- State -----------------------------------------------------------------------
|
|
@@ -1130,7 +1135,7 @@ const svc = defineService<S, {
|
|
|
1130
1135
|
// joins the waitlist itself. A sign-in sheet only closes, and this screen loads again.
|
|
1131
1136
|
if (!signInScreenId) return navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId } });
|
|
1132
1137
|
return navigate(s, signInPresentation
|
|
1133
|
-
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
|
|
1138
|
+
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
|
|
1134
1139
|
: { screenId: signInScreenId, args: { mode: "signin" } });
|
|
1135
1140
|
}
|
|
1136
1141
|
const name = await memberName();
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
queryServices, registerToWaitlist, type WixAvailabilityEntry, type WixBooking, type WixService,
|
|
29
29
|
} from "@himalaya/wix-bookings";
|
|
30
30
|
import { getMyMember } from "@himalaya/wix-members";
|
|
31
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
31
32
|
import { LOADING, loadFailed, type LoadFlags } from "../_shared/branded-load-state.js";
|
|
32
33
|
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
33
34
|
import { slotStartInstant } from "../_shared/himi-bookings.js";
|
|
@@ -650,6 +651,7 @@ async function settled(next: S | undefined): Promise<S | undefined> {
|
|
|
650
651
|
|
|
651
652
|
/** How the app opens its sign-in screen, from the appear params ("" = push). */
|
|
652
653
|
let signInPresentation: "" | "sheet" | "full_screen" = "";
|
|
654
|
+
let signInStyle: "page" | "" = "";
|
|
653
655
|
/** The app's sign-in screen (`signInScreenId` appear param): Branded Lite's `himi_sign_in` by
|
|
654
656
|
* default; an app with no such screen names its own (salon-spa: the Profile tab, `himi_account`). */
|
|
655
657
|
let signInScreenId = "himi_sign_in";
|
|
@@ -680,7 +682,10 @@ const svc = defineService<S, {
|
|
|
680
682
|
load: async (s, p) => {
|
|
681
683
|
stashCopy(p);
|
|
682
684
|
const presentation = argOf(p, "signInPresentation");
|
|
683
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
685
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
686
|
+
signInPresentation = presentation;
|
|
687
|
+
signInStyle = signInPageStyle(argOf(p, "signInSheetStyle"));
|
|
688
|
+
}
|
|
684
689
|
const signInScreen = argOf(p, "signInScreenId");
|
|
685
690
|
if (/^[a-z][a-z0-9_]{0,63}$/.test(signInScreen)) signInScreenId = signInScreen;
|
|
686
691
|
const fw = Number(argOf(p, "firstWeekday") || s.firstWeekday);
|
|
@@ -883,7 +888,7 @@ const svc = defineService<S, {
|
|
|
883
888
|
busy = false;
|
|
884
889
|
// As a modal it only closes, and this screen loads again (its re-appearance reload).
|
|
885
890
|
return navigate(s, signInPresentation
|
|
886
|
-
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
|
|
891
|
+
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
|
|
887
892
|
: { screenId: signInScreenId, args: { mode: "signin", returnScreenId: "himi_agenda" } });
|
|
888
893
|
}
|
|
889
894
|
const name = await memberName();
|
|
@@ -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);
|
|
@@ -2904,7 +2904,8 @@ const SCREENS = runtimeSetting({
|
|
|
2904
2904
|
"params": {
|
|
2905
2905
|
"screenId": "himi_sign_in",
|
|
2906
2906
|
"mode": "signin",
|
|
2907
|
-
"modal": "1"
|
|
2907
|
+
"modal": "1",
|
|
2908
|
+
"sheetStyle": "page"
|
|
2908
2909
|
},
|
|
2909
2910
|
"presentation": "sheet"
|
|
2910
2911
|
}
|
|
@@ -2925,7 +2926,8 @@ const SCREENS = runtimeSetting({
|
|
|
2925
2926
|
"params": {
|
|
2926
2927
|
"screenId": "himi_sign_in",
|
|
2927
2928
|
"mode": "register",
|
|
2928
|
-
"modal": "1"
|
|
2929
|
+
"modal": "1",
|
|
2930
|
+
"sheetStyle": "page"
|
|
2929
2931
|
},
|
|
2930
2932
|
"presentation": "sheet"
|
|
2931
2933
|
}
|
|
@@ -4210,6 +4212,7 @@ const SCREENS = runtimeSetting({
|
|
|
4210
4212
|
"restorePurchases": "1",
|
|
4211
4213
|
"signInScreen": "himi_sign_in",
|
|
4212
4214
|
"signInPresentation": "sheet",
|
|
4215
|
+
"signInSheetStyle": "page",
|
|
4213
4216
|
"signInReturnTab": "profile",
|
|
4214
4217
|
"pollIdentity": "1",
|
|
4215
4218
|
"copy": "{\"account.subtitle\":\"Bookings, RSVPs, memberships, programs and saved content in one place.\",\"storeAccount.authBody\":\"Sign in to continue — bookings, RSVPs, memberships and programs stay with you.\",\"storeAccount.authBodyRegister\":\"Create a member account to continue — bookings, RSVPs, memberships and programs stay with you.\"}"
|
|
@@ -4467,7 +4470,8 @@ const SCREENS = runtimeSetting({
|
|
|
4467
4470
|
"screenId": "himi_sign_in",
|
|
4468
4471
|
"mode": "signin",
|
|
4469
4472
|
"returnScreenId": "himi_account_settings",
|
|
4470
|
-
"modal": "1"
|
|
4473
|
+
"modal": "1",
|
|
4474
|
+
"sheetStyle": "page"
|
|
4471
4475
|
},
|
|
4472
4476
|
"presentation": "sheet"
|
|
4473
4477
|
}
|
|
@@ -7487,7 +7491,8 @@ const SCREENS = runtimeSetting({
|
|
|
7487
7491
|
"params": {
|
|
7488
7492
|
"screenId": "himi_sign_in",
|
|
7489
7493
|
"returnScreenId": "himi_notif_settings",
|
|
7490
|
-
"modal": "1"
|
|
7494
|
+
"modal": "1",
|
|
7495
|
+
"sheetStyle": "page"
|
|
7491
7496
|
},
|
|
7492
7497
|
"presentation": "sheet"
|
|
7493
7498
|
}
|
|
@@ -7882,7 +7887,8 @@ const SCREENS = runtimeSetting({
|
|
|
7882
7887
|
"mode": "signin",
|
|
7883
7888
|
"intent": "profile",
|
|
7884
7889
|
"returnScreenId": "himi_view_profile",
|
|
7885
|
-
"modal": "1"
|
|
7890
|
+
"modal": "1",
|
|
7891
|
+
"sheetStyle": "page"
|
|
7886
7892
|
},
|
|
7887
7893
|
"presentation": "sheet"
|
|
7888
7894
|
}
|
|
@@ -8950,7 +8956,8 @@ const SCREENS = runtimeSetting({
|
|
|
8950
8956
|
"mode": "signin",
|
|
8951
8957
|
"intent": "wallet",
|
|
8952
8958
|
"returnScreenId": "himi_wallet",
|
|
8953
|
-
"modal": "1"
|
|
8959
|
+
"modal": "1",
|
|
8960
|
+
"sheetStyle": "page"
|
|
8954
8961
|
},
|
|
8955
8962
|
"presentation": "sheet"
|
|
8956
8963
|
}
|
|
@@ -9462,7 +9469,8 @@ const SCREENS = runtimeSetting({
|
|
|
9462
9469
|
"actionId": "tier5.himiPlaceSummary.load",
|
|
9463
9470
|
"params": {
|
|
9464
9471
|
"verticals": "[\"bookings\",\"programs\",\"plans\",\"events\",\"blog\"]",
|
|
9465
|
-
"signInPresentation": "sheet"
|
|
9472
|
+
"signInPresentation": "sheet",
|
|
9473
|
+
"signInSheetStyle": "page"
|
|
9466
9474
|
}
|
|
9467
9475
|
}
|
|
9468
9476
|
}
|
|
@@ -12366,7 +12374,8 @@ const SCREENS = runtimeSetting({
|
|
|
12366
12374
|
"screenId": "himi_sign_in",
|
|
12367
12375
|
"mode": "signin",
|
|
12368
12376
|
"returnScreenId": "himi_bookings",
|
|
12369
|
-
"modal": "1"
|
|
12377
|
+
"modal": "1",
|
|
12378
|
+
"sheetStyle": "page"
|
|
12370
12379
|
},
|
|
12371
12380
|
"presentation": "sheet"
|
|
12372
12381
|
},
|
|
@@ -15479,7 +15488,8 @@ const SCREENS = runtimeSetting({
|
|
|
15479
15488
|
"actionId": "tier5.himiBrandedAgenda.load",
|
|
15480
15489
|
"params": {
|
|
15481
15490
|
"firstWeekday": "0",
|
|
15482
|
-
"signInPresentation": "sheet"
|
|
15491
|
+
"signInPresentation": "sheet",
|
|
15492
|
+
"signInSheetStyle": "page"
|
|
15483
15493
|
}
|
|
15484
15494
|
}
|
|
15485
15495
|
}
|
|
@@ -19074,7 +19084,8 @@ const SCREENS = runtimeSetting({
|
|
|
19074
19084
|
"mode": "signin",
|
|
19075
19085
|
"intent": "programs",
|
|
19076
19086
|
"returnScreenId": "himi_member_programs",
|
|
19077
|
-
"modal": "1"
|
|
19087
|
+
"modal": "1",
|
|
19088
|
+
"sheetStyle": "page"
|
|
19078
19089
|
},
|
|
19079
19090
|
"presentation": "sheet"
|
|
19080
19091
|
}
|
|
@@ -22067,7 +22078,8 @@ const SCREENS = runtimeSetting({
|
|
|
22067
22078
|
"params": {
|
|
22068
22079
|
"screenId": "himi_sign_in",
|
|
22069
22080
|
"mode": "signin",
|
|
22070
|
-
"modal": "1"
|
|
22081
|
+
"modal": "1",
|
|
22082
|
+
"sheetStyle": "page"
|
|
22071
22083
|
},
|
|
22072
22084
|
"presentation": "sheet"
|
|
22073
22085
|
}
|
|
@@ -22455,7 +22467,8 @@ const SCREENS = runtimeSetting({
|
|
|
22455
22467
|
"mode": "signin",
|
|
22456
22468
|
"intent": "post",
|
|
22457
22469
|
"returnScreenId": "himi_create_post",
|
|
22458
|
-
"modal": "1"
|
|
22470
|
+
"modal": "1",
|
|
22471
|
+
"sheetStyle": "page"
|
|
22459
22472
|
},
|
|
22460
22473
|
"presentation": "sheet"
|
|
22461
22474
|
}
|
|
@@ -26234,7 +26247,8 @@ const SCREENS = runtimeSetting({
|
|
|
26234
26247
|
"params": {
|
|
26235
26248
|
"screenId": "himi_sign_in",
|
|
26236
26249
|
"mode": "signin",
|
|
26237
|
-
"modal": "1"
|
|
26250
|
+
"modal": "1",
|
|
26251
|
+
"sheetStyle": "page"
|
|
26238
26252
|
},
|
|
26239
26253
|
"presentation": "sheet"
|
|
26240
26254
|
}
|
|
@@ -32241,7 +32255,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
32241
32255
|
"actionId": "tier5.himiBookingService.load",
|
|
32242
32256
|
"params": {
|
|
32243
32257
|
"signInScreenId": "himi_sign_in",
|
|
32244
|
-
"signInPresentation": "sheet"
|
|
32258
|
+
"signInPresentation": "sheet",
|
|
32259
|
+
"signInSheetStyle": "page"
|
|
32245
32260
|
}
|
|
32246
32261
|
}
|
|
32247
32262
|
}
|
|
@@ -35469,7 +35484,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
35469
35484
|
"screenId": "himi_sign_in",
|
|
35470
35485
|
"mode": "signin",
|
|
35471
35486
|
"intent": "book",
|
|
35472
|
-
"modal": "1"
|
|
35487
|
+
"modal": "1",
|
|
35488
|
+
"sheetStyle": "page"
|
|
35473
35489
|
},
|
|
35474
35490
|
"presentation": "sheet"
|
|
35475
35491
|
}
|
|
@@ -36222,7 +36238,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
36222
36238
|
"onAppear": {
|
|
36223
36239
|
"actionId": "tier5.himiBrandedProgram.load",
|
|
36224
36240
|
"params": {
|
|
36225
|
-
"signInPresentation": "sheet"
|
|
36241
|
+
"signInPresentation": "sheet",
|
|
36242
|
+
"signInSheetStyle": "page"
|
|
36226
36243
|
}
|
|
36227
36244
|
}
|
|
36228
36245
|
}
|
|
@@ -39503,7 +39520,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
39503
39520
|
"screenId": "himi_sign_in",
|
|
39504
39521
|
"mode": "signin",
|
|
39505
39522
|
"intent": "rsvp",
|
|
39506
|
-
"modal": "1"
|
|
39523
|
+
"modal": "1",
|
|
39524
|
+
"sheetStyle": "page"
|
|
39507
39525
|
},
|
|
39508
39526
|
"presentation": "sheet"
|
|
39509
39527
|
}
|
|
@@ -39819,7 +39837,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
39819
39837
|
"params": {
|
|
39820
39838
|
"screenId": "himi_sign_in",
|
|
39821
39839
|
"mode": "signin",
|
|
39822
|
-
"modal": "1"
|
|
39840
|
+
"modal": "1",
|
|
39841
|
+
"sheetStyle": "page"
|
|
39823
39842
|
},
|
|
39824
39843
|
"presentation": "sheet"
|
|
39825
39844
|
}
|
|
@@ -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
|
+
}
|
|
@@ -13,6 +13,7 @@ import { addDays, dayKey, dayLabel, timeLabel } from "@himalaya/time";
|
|
|
13
13
|
import { getService, queryServiceAvailability, registerToWaitlist, type WixAvailabilityEntry, type WixService, type WixServiceAddress, type WixServiceBookingPolicy } from "@himalaya/wix-bookings";
|
|
14
14
|
import { getMyMember } from "@himalaya/wix-members";
|
|
15
15
|
import { memberAccess, type MemberAccess } from "../_shared/member-access.js";
|
|
16
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
16
17
|
import { placesIn, sessionControl, sessionOf, type MemberPlace, type Session, type SessionControl } from "../_shared/booking-session.js";
|
|
17
18
|
import { categoryName, courseDatesText, courseReadWindows, courseSessionsAvailability, courseWindowOpen, serviceDurationText, servicePriceLine, slotStartInstant, type BookingLabel, type ServicePriceLine } from "../_shared/himi-bookings.js";
|
|
18
19
|
import { formatServiceMoney, serviceCurrency } from "../_shared/wix-service-price.js";
|
|
@@ -723,10 +724,14 @@ const sameMember = (a: MemberAccess | undefined, b: MemberAccess | undefined): b
|
|
|
723
724
|
* appear (or tap) params — Branded Lite passes `himi_sign_in` as a sheet. */
|
|
724
725
|
let signInScreenId = "";
|
|
725
726
|
let signInPresentation: "" | "sheet" | "full_screen" = "";
|
|
727
|
+
let signInStyle: "page" | "" = "";
|
|
726
728
|
function rememberSignIn(arg: unknown): void {
|
|
727
|
-
const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown };
|
|
729
|
+
const a = (arg ?? {}) as { signInScreenId?: unknown; signInPresentation?: unknown; signInSheetStyle?: unknown };
|
|
728
730
|
if (typeof a.signInScreenId === "string" && a.signInScreenId.trim()) signInScreenId = a.signInScreenId.trim();
|
|
729
|
-
if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen")
|
|
731
|
+
if (a.signInPresentation === "sheet" || a.signInPresentation === "full_screen") {
|
|
732
|
+
signInPresentation = a.signInPresentation;
|
|
733
|
+
signInStyle = signInPageStyle(a.signInSheetStyle);
|
|
734
|
+
}
|
|
730
735
|
}
|
|
731
736
|
|
|
732
737
|
// ---- State -----------------------------------------------------------------------
|
|
@@ -1130,7 +1135,7 @@ const svc = defineService<S, {
|
|
|
1130
1135
|
// joins the waitlist itself. A sign-in sheet only closes, and this screen loads again.
|
|
1131
1136
|
if (!signInScreenId) return navigate(s, { screenId: "himi_time", args: { id: s.id, start: s.sessionStart, sessionId: s.sessionId } });
|
|
1132
1137
|
return navigate(s, signInPresentation
|
|
1133
|
-
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
|
|
1138
|
+
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
|
|
1134
1139
|
: { screenId: signInScreenId, args: { mode: "signin" } });
|
|
1135
1140
|
}
|
|
1136
1141
|
const name = await memberName();
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
queryServices, registerToWaitlist, type WixAvailabilityEntry, type WixBooking, type WixService,
|
|
29
29
|
} from "@himalaya/wix-bookings";
|
|
30
30
|
import { getMyMember } from "@himalaya/wix-members";
|
|
31
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
31
32
|
import { LOADING, loadFailed, type LoadFlags } from "../_shared/branded-load-state.js";
|
|
32
33
|
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
33
34
|
import { slotStartInstant } from "../_shared/himi-bookings.js";
|
|
@@ -650,6 +651,7 @@ async function settled(next: S | undefined): Promise<S | undefined> {
|
|
|
650
651
|
|
|
651
652
|
/** How the app opens its sign-in screen, from the appear params ("" = push). */
|
|
652
653
|
let signInPresentation: "" | "sheet" | "full_screen" = "";
|
|
654
|
+
let signInStyle: "page" | "" = "";
|
|
653
655
|
/** The app's sign-in screen (`signInScreenId` appear param): Branded Lite's `himi_sign_in` by
|
|
654
656
|
* default; an app with no such screen names its own (salon-spa: the Profile tab, `himi_account`). */
|
|
655
657
|
let signInScreenId = "himi_sign_in";
|
|
@@ -680,7 +682,10 @@ const svc = defineService<S, {
|
|
|
680
682
|
load: async (s, p) => {
|
|
681
683
|
stashCopy(p);
|
|
682
684
|
const presentation = argOf(p, "signInPresentation");
|
|
683
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
685
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
686
|
+
signInPresentation = presentation;
|
|
687
|
+
signInStyle = signInPageStyle(argOf(p, "signInSheetStyle"));
|
|
688
|
+
}
|
|
684
689
|
const signInScreen = argOf(p, "signInScreenId");
|
|
685
690
|
if (/^[a-z][a-z0-9_]{0,63}$/.test(signInScreen)) signInScreenId = signInScreen;
|
|
686
691
|
const fw = Number(argOf(p, "firstWeekday") || s.firstWeekday);
|
|
@@ -883,7 +888,7 @@ const svc = defineService<S, {
|
|
|
883
888
|
busy = false;
|
|
884
889
|
// As a modal it only closes, and this screen loads again (its re-appearance reload).
|
|
885
890
|
return navigate(s, signInPresentation
|
|
886
|
-
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
|
|
891
|
+
? { screenId: signInScreenId, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
|
|
887
892
|
: { screenId: signInScreenId, args: { mode: "signin", returnScreenId: "himi_agenda" } });
|
|
888
893
|
}
|
|
889
894
|
const name = await memberName();
|