@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
|
@@ -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();
|
|
@@ -13,6 +13,7 @@ import { defineService, navigate } from "@himalaya/state";
|
|
|
13
13
|
import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
14
14
|
import { fetchMemberBookings, type MemberBookingRow } from "../_shared/member-bookings.js";
|
|
15
15
|
import { memberAccess, assertMemberAccess, memberAccessDenied, type MemberAccess } from "../_shared/member-access.js";
|
|
16
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
16
17
|
import { hostSiteFromInput } from "../_shared/branded-lite-hosted.js";
|
|
17
18
|
import { formatDateMedium } from "../_shared/engine-intl.js";
|
|
18
19
|
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
@@ -53,6 +54,7 @@ const SIGN_IN_SCREEN = "himi_sign_in";
|
|
|
53
54
|
|
|
54
55
|
let stashedVerticals: string[] | null = null;
|
|
55
56
|
let signInPresentation: "sheet" | "full_screen" | undefined;
|
|
57
|
+
let signInStyle: "page" | "" = "";
|
|
56
58
|
let generation = 0;
|
|
57
59
|
|
|
58
60
|
function appearVerticals(arg: unknown): string[] {
|
|
@@ -192,7 +194,10 @@ async function read(arg: unknown, again = true): Promise<PlaceSummaryState> {
|
|
|
192
194
|
async function load(_s: PlaceSummaryState, arg?: unknown): Promise<PlaceSummaryState | undefined> {
|
|
193
195
|
stashCopy(arg);
|
|
194
196
|
const presentation = arg && typeof arg === "object" ? (arg as Record<string, unknown>).signInPresentation : undefined;
|
|
195
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
197
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
198
|
+
signInPresentation = presentation;
|
|
199
|
+
signInStyle = signInPageStyle((arg as Record<string, unknown>).signInSheetStyle);
|
|
200
|
+
}
|
|
196
201
|
const mine = ++generation;
|
|
197
202
|
const next = await read(arg);
|
|
198
203
|
return mine === generation ? next : undefined;
|
|
@@ -211,7 +216,7 @@ const svc = defineService<PlaceSummaryState, {
|
|
|
211
216
|
if (s.hideCta || !s.ctaScreenId) return s;
|
|
212
217
|
// No return path: the tile is embedded, so the form closes over its host.
|
|
213
218
|
return navigate(s, s.ctaScreenId === SIGN_IN_SCREEN && signInPresentation
|
|
214
|
-
? { screenId: SIGN_IN_SCREEN, presentation: signInPresentation, args: { mode: "signin", modal: "1" } }
|
|
219
|
+
? { screenId: SIGN_IN_SCREEN, presentation: signInPresentation, args: { mode: "signin", modal: "1", ...signInSheetStyle(signInPresentation, signInStyle) } }
|
|
215
220
|
: { screenId: s.ctaScreenId, args: { mode: s.ctaMode } });
|
|
216
221
|
},
|
|
217
222
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { paymentSetupMessage } from "../_shared/payment-setup.js";
|
|
2
2
|
import { dispatch } from "@himalaya/dispatch";
|
|
3
3
|
import { memberAccess, assertMemberAccess } from "../_shared/member-access.js";
|
|
4
|
+
import { signInPageStyle, signInSheetStyle } from "../_shared/sign-in-sheet.js";
|
|
4
5
|
import { offlineWriteMessage, withOnlineWrites } from "../_shared/online-actions.js";
|
|
5
6
|
// Tier-5 bundle: himi-branded-lite — single online-program detail (design §3.5
|
|
6
7
|
// `programs` vertical, screen full-potential pass).
|
|
@@ -292,6 +293,7 @@ let enrollmentInFlight = false;
|
|
|
292
293
|
// Presentation dedupe only. The host remains the sole authority to resume a join.
|
|
293
294
|
let openedAuthToken = "";
|
|
294
295
|
let signInPresentation: "sheet" | "full_screen" = "sheet";
|
|
296
|
+
let signInStyle: "page" | "" = "";
|
|
295
297
|
const continuationTarget = (id: string) => `program_enrol:${id}`;
|
|
296
298
|
|
|
297
299
|
async function continuation(operation: "begin" | "check" | "consume" | "cancel", id: string, token = "") {
|
|
@@ -309,7 +311,10 @@ const programReference = () => onlineProgramItem({ id: inputId() })?.reference;
|
|
|
309
311
|
async function load(state: State, arg?: unknown): Promise<undefined> {
|
|
310
312
|
stashCopy(arg);
|
|
311
313
|
const presentation = (arg as { signInPresentation?: unknown } | undefined)?.signInPresentation;
|
|
312
|
-
if (presentation === "sheet" || presentation === "full_screen")
|
|
314
|
+
if (presentation === "sheet" || presentation === "full_screen") {
|
|
315
|
+
signInPresentation = presentation;
|
|
316
|
+
signInStyle = signInPageStyle((arg as { signInSheetStyle?: unknown }).signInSheetStyle);
|
|
317
|
+
}
|
|
313
318
|
const id = inputId();
|
|
314
319
|
const seq = ++loadSeq;
|
|
315
320
|
const [found, locale] = await Promise.all([
|
|
@@ -386,7 +391,7 @@ async function enroll(afterAuthAccount = ""): Promise<undefined> {
|
|
|
386
391
|
openedAuthToken = request.token;
|
|
387
392
|
actionMessage = "";
|
|
388
393
|
try {
|
|
389
|
-
await dispatch("himi.open", { screenId: "himi_sign_in", mode: "signin", presentation: signInPresentation, modal: "1", authContinuation: request.token });
|
|
394
|
+
await dispatch("himi.open", { screenId: "himi_sign_in", mode: "signin", presentation: signInPresentation, modal: "1", ...signInSheetStyle(signInPresentation, signInStyle), authContinuation: request.token });
|
|
390
395
|
} catch (error) {
|
|
391
396
|
openedAuthToken = "";
|
|
392
397
|
await continuation("cancel", id, request.token);
|
|
@@ -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);
|