@wix/himalaya-cli 0.1750.0 → 0.1751.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.
Files changed (170) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/himi-package.d.ts +478 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/host-compatibility.d.ts +56 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +4 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +154 -7
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +3 -0
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast-service.d.ts +105 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast.d.ts +116 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +326 -13
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +730 -81
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +155 -0
  14. package/dist/browser-plane/assets.json +5 -5
  15. package/dist/browser-plane/preview-deferred/{b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin → 21f35a12bd94f4ab97a9a75453c4adcadc438daf024a4b1950d5c356c123bd01.bin} +1 -1
  16. package/dist/browser-plane/sw.js +7 -7
  17. package/dist/cli.mjs +34995 -31326
  18. package/dist/preview-assets.generated.bin +0 -0
  19. package/guides/component-reference.json +1 -1
  20. package/guides/component-reference.md +4 -0
  21. package/guides/designing-himi-screens.md +7 -0
  22. package/guides/getting-started.md +2 -0
  23. package/guides/headless-loop.md +1 -1
  24. package/guides/himi-skill.md +2 -0
  25. package/guides/index.json +6 -0
  26. package/guides/qa-builds.md +12 -1
  27. package/guides/recipe-podcast.md +149 -0
  28. package/guides/tier-5-add-a-screen.md +16 -2
  29. package/guides/wix-business-context.md +29 -0
  30. package/guides/wix-platform-usage.md +7 -2
  31. package/package.json +10 -10
  32. package/template-icons/fitness-gym.png +0 -0
  33. package/templates/beauty-salon/dev/index.ts +1 -1
  34. package/templates/beauty-salon/l10n/en.json +1 -1
  35. package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +16 -0
  36. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +5 -8
  37. package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  38. package/templates/branded-lite/dev/index.ts +101 -1
  39. package/templates/branded-lite/l10n/en.json +22 -1
  40. package/templates/branded-lite/l10n/es.json +22 -0
  41. package/templates/branded-lite/l10n/fr.json +18 -0
  42. package/templates/branded-lite/l10n/he.json +15 -0
  43. package/templates/branded-lite/tier5-src/_shared/program-fields.ts +16 -0
  44. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +5 -8
  45. package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  46. package/templates/branded-lite/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
  47. package/templates/brandy/README.md +33 -0
  48. package/templates/brandy/config.ts +51 -7
  49. package/templates/brandy/dev/index.ts +23 -9
  50. package/templates/community-club/l10n/en.json +1 -1
  51. package/templates/community-club/tier5-src/_shared/program-fields.ts +16 -0
  52. package/templates/community-club/tier5-src/_shared/programs-section.ts +5 -8
  53. package/templates/events-meetups/l10n/en.json +1 -1
  54. package/templates/events-meetups/tier5-src/_shared/program-fields.ts +16 -0
  55. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +5 -8
  56. package/templates/fitness-gym/README.md +53 -0
  57. package/templates/fitness-gym/config.ts +560 -0
  58. package/templates/fitness-gym/dev/index.ts +25787 -0
  59. package/templates/fitness-gym/himalaya.content.json +64 -0
  60. package/templates/fitness-gym/himalaya.template.json +15 -0
  61. package/templates/fitness-gym/icon.png +0 -0
  62. package/templates/fitness-gym/platforms.json +1 -0
  63. package/templates/fitness-gym/tier5-src/_shared/app-locale.ts +61 -0
  64. package/templates/fitness-gym/tier5-src/_shared/booking-location.ts +147 -0
  65. package/templates/fitness-gym/tier5-src/_shared/booking-session.ts +224 -0
  66. package/templates/fitness-gym/tier5-src/_shared/branded-lite-hosted.ts +280 -0
  67. package/templates/fitness-gym/tier5-src/_shared/branded-load-state.ts +109 -0
  68. package/templates/fitness-gym/tier5-src/_shared/business-chat-copy.ts +40 -0
  69. package/templates/fitness-gym/tier5-src/_shared/business-chat-history.ts +51 -0
  70. package/templates/fitness-gym/tier5-src/_shared/business-chat-message-model.ts +177 -0
  71. package/templates/fitness-gym/tier5-src/_shared/business-chat-model.ts +56 -0
  72. package/templates/fitness-gym/tier5-src/_shared/business-chat-presenter.ts +576 -0
  73. package/templates/fitness-gym/tier5-src/_shared/business-chat-transport.ts +148 -0
  74. package/templates/fitness-gym/tier5-src/_shared/collection-contract.ts +228 -0
  75. package/templates/fitness-gym/tier5-src/_shared/collection-query.ts +193 -0
  76. package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +400 -0
  77. package/templates/fitness-gym/tier5-src/_shared/detail-presence.ts +51 -0
  78. package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +523 -0
  79. package/templates/fitness-gym/tier5-src/_shared/himi-account.ts +194 -0
  80. package/templates/fitness-gym/tier5-src/_shared/himi-booking-saved.ts +88 -0
  81. package/templates/fitness-gym/tier5-src/_shared/himi-bookings.ts +318 -0
  82. package/templates/fitness-gym/tier5-src/_shared/himi-copy.ts +116 -0
  83. package/templates/fitness-gym/tier5-src/_shared/himi-media.ts +29 -0
  84. package/templates/fitness-gym/tier5-src/_shared/himi-store.ts +7 -0
  85. package/templates/fitness-gym/tier5-src/_shared/himi-text.ts +24 -0
  86. package/templates/fitness-gym/tier5-src/_shared/host-events.ts +66 -0
  87. package/templates/fitness-gym/tier5-src/_shared/hosted-checkout.ts +70 -0
  88. package/templates/fitness-gym/tier5-src/_shared/iap-attendance-form.ts +106 -0
  89. package/templates/fitness-gym/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
  90. package/templates/fitness-gym/tier5-src/_shared/iap-attendance.ts +38 -0
  91. package/templates/fitness-gym/tier5-src/_shared/iap-worker.ts +127 -0
  92. package/templates/fitness-gym/tier5-src/_shared/inbox-rooms.ts +68 -0
  93. package/templates/fitness-gym/tier5-src/_shared/local-preferences.ts +38 -0
  94. package/templates/fitness-gym/tier5-src/_shared/member-access.ts +63 -0
  95. package/templates/fitness-gym/tier5-src/_shared/member-account-routes.ts +52 -0
  96. package/templates/fitness-gym/tier5-src/_shared/member-bookings.ts +107 -0
  97. package/templates/fitness-gym/tier5-src/_shared/member-screen.ts +99 -0
  98. package/templates/fitness-gym/tier5-src/_shared/notification-target.ts +141 -0
  99. package/templates/fitness-gym/tier5-src/_shared/offset-page.ts +10 -0
  100. package/templates/fitness-gym/tier5-src/_shared/online-actions.ts +76 -0
  101. package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +348 -0
  102. package/templates/fitness-gym/tier5-src/_shared/payment-setup.ts +6 -0
  103. package/templates/fitness-gym/tier5-src/_shared/pricing-plan-display.ts +64 -0
  104. package/templates/fitness-gym/tier5-src/_shared/program-description.ts +11 -0
  105. package/templates/fitness-gym/tier5-src/_shared/program-fields.ts +16 -0
  106. package/templates/fitness-gym/tier5-src/_shared/program-standing.ts +46 -0
  107. package/templates/fitness-gym/tier5-src/_shared/rich-body.ts +78 -0
  108. package/templates/fitness-gym/tier5-src/_shared/rich-content-link.ts +34 -0
  109. package/templates/fitness-gym/tier5-src/_shared/sign-in-sheet.ts +18 -0
  110. package/templates/fitness-gym/tier5-src/_shared/staff-name.ts +18 -0
  111. package/templates/fitness-gym/tier5-src/_shared/weekly-goal.ts +107 -0
  112. package/templates/fitness-gym/tier5-src/_shared/wix-bi.ts +85 -0
  113. package/templates/fitness-gym/tier5-src/_shared/wix-member-links.ts +114 -0
  114. package/templates/fitness-gym/tier5-src/_shared/wix-service-price.ts +146 -0
  115. package/templates/fitness-gym/tier5-src/business-chat/index.ts +732 -0
  116. package/templates/fitness-gym/tier5-src/business-contact/index.ts +6 -0
  117. package/templates/fitness-gym/tier5-src/himi-booking-account/index.ts +267 -0
  118. package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +468 -0
  119. package/templates/fitness-gym/tier5-src/himi-booking-service/index.ts +1190 -0
  120. package/templates/fitness-gym/tier5-src/himi-booking-services/index.ts +791 -0
  121. package/templates/fitness-gym/tier5-src/himi-booking-time/index.ts +1729 -0
  122. package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +988 -0
  123. package/templates/fitness-gym/tier5-src/himi-branded-lite-member-programs/index.ts +656 -0
  124. package/templates/fitness-gym/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
  125. package/templates/fitness-gym/tier5-src/himi-branded-lite-plans/index.ts +495 -0
  126. package/templates/fitness-gym/tier5-src/himi-branded-lite-program/facts.ts +52 -0
  127. package/templates/fitness-gym/tier5-src/himi-branded-lite-program/index.ts +845 -0
  128. package/templates/fitness-gym/tier5-src/himi-fitcoach-goal/index.ts +191 -0
  129. package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +619 -0
  130. package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +1007 -0
  131. package/templates/fitness-gym/tier5-src/wix-spaces-my-subscriptions/index.ts +84 -0
  132. package/templates/fitness-gym/tier5-src/wix-spaces-subscription-detail/index.ts +139 -0
  133. package/templates/fitness-gym/tokens.json +414 -0
  134. package/templates/gym-fitness/dev/index.ts +1 -1
  135. package/templates/gym-fitness/l10n/en.json +1 -1
  136. package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +16 -0
  137. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +5 -8
  138. package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  139. package/templates/medical-services/dev/index.ts +2 -1
  140. package/templates/medical-services/tier5-src/himi-booking-account/index.ts +16 -1
  141. package/templates/nonprofit-cause/l10n/en.json +1 -1
  142. package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +16 -0
  143. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +5 -8
  144. package/templates/personal-fitness-trainer/dev/index.ts +2 -2
  145. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  146. package/templates/podcast-creator/dev/index.ts +100 -0
  147. package/templates/podcast-creator/l10n/en.json +22 -1
  148. package/templates/podcast-creator/l10n/es.json +22 -0
  149. package/templates/podcast-creator/l10n/fr.json +18 -0
  150. package/templates/podcast-creator/l10n/he.json +15 -0
  151. package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +16 -0
  152. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +5 -8
  153. package/templates/podcast-creator/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
  154. package/templates/portfolio-creative/l10n/en.json +1 -1
  155. package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +16 -0
  156. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +5 -8
  157. package/templates/restaurant/l10n/en.json +1 -1
  158. package/templates/restaurant/tier5-src/_shared/program-fields.ts +16 -0
  159. package/templates/restaurant/tier5-src/_shared/programs-section.ts +5 -8
  160. package/templates/retail-store/l10n/en.json +1 -1
  161. package/templates/retail-store/tier5-src/_shared/program-fields.ts +16 -0
  162. package/templates/retail-store/tier5-src/_shared/programs-section.ts +5 -8
  163. package/templates/salon-spa/dev/index.ts +1 -1
  164. package/templates/salon-spa/tier5-src/himi-booking-account/index.ts +16 -1
  165. package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
  166. package/templates/yoga-studio/dev/index.ts +1 -1
  167. package/templates/yoga-studio/l10n/en.json +1 -1
  168. package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +16 -0
  169. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +5 -8
  170. package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
@@ -22,7 +22,8 @@ import { iapPriceFields, onlineProgramItem, type IapPollDirective } from "@himal
22
22
  import { createIapCommerce } from "@himalaya/iap-checkout";
23
23
  import { createCollectionQuery, type CollectionPage, type CollectionQueryState } from "./collection-query.js";
24
24
  import { memberAccess, memberAccessChanged, memberAccessDenied, type MemberAccess } from "./member-access.js";
25
- import { cleanTitle, initials } from "./himi-text.js";
25
+ import { initials } from "./himi-text.js";
26
+ import { isProgramDraft, isProgramEnded, programName } from "./program-fields.js";
26
27
  import { programImage } from "./himi-media.js";
27
28
  import { descriptionBody } from "./rich-body.js";
28
29
  import { programDescription } from "./program-description.js";
@@ -125,19 +126,15 @@ export interface State {
125
126
  const full = (p: WixProgram): WixProgramFull => p as WixProgramFull;
126
127
 
127
128
  function programTitle(p: WixProgram): string {
128
- return cleanTitle(p.description?.title ?? p.settings?.title ?? p.title ?? p.details?.title)
129
- || copyParam("memberPrograms.programFallbackName", "Program");
129
+ return programName(p) || copyParam("memberPrograms.programFallbackName", "Program");
130
130
  }
131
131
  function programDetails(p: WixProgram): string {
132
132
  // The body may be a Ricos document or serialized text: read it the way the catalog and detail do.
133
133
  const raw = descriptionBody(programDescription(p)).bodyText.replace(/\s+/g, " ").trim();
134
134
  return raw.length > 140 ? `${raw.slice(0, 139).trimEnd()}…` : raw;
135
135
  }
136
- function programStatus(p: WixProgram): string {
137
- return (p.status ?? p.state ?? "").toUpperCase();
138
- }
139
- const isEnded = (p: WixProgram) => programStatus(p) === "ENDED" || programStatus(p) === "FINISHED";
140
- const isDraft = (p: WixProgram) => programStatus(p) === "DRAFT";
136
+ const isEnded = isProgramEnded;
137
+ const isDraft = isProgramDraft;
141
138
  function accessType(p: WixProgram): string {
142
139
  return (full(p).restrictions?.accessType ?? "PUBLIC").toUpperCase();
143
140
  }
@@ -126,6 +126,14 @@ interface S extends LoadFlags {
126
126
  /** A location is chosen and has no session in the loaded days: its own empty state. */
127
127
  locationEmpty: boolean;
128
128
  notLocationEmpty: boolean;
129
+ /** The optional "All · Booked" filter, for an app that asks for it (`load` param `filters: "1"`):
130
+ * "booked" lists only the member's own sessions (booked or on the waitlist). Off by default, so
131
+ * an app that does not bind it lists every session, as before. */
132
+ filter?: "all" | "booked";
133
+ hideFilter?: boolean;
134
+ /** The booked filter is on and the member has no session in the loaded days. */
135
+ bookedEmpty?: boolean;
136
+ notBookedEmpty?: boolean;
129
137
  }
130
138
 
131
139
  const flag = (on: boolean): string => (on ? "true" : "");
@@ -300,6 +308,10 @@ let quietUntil = 0;
300
308
  * it. Cleared by the list's own scroll and a calendar tap, whose plain day the renderer compares
301
309
  * with what it reported (an echo of the member's own scroll never moves the list). */
302
310
  let scrollNonce = 0;
311
+ /** The "All · Booked" filter: offered when the screen's load asks for it, and the member's choice. */
312
+ let filtersOn = false;
313
+ /** The member the "Booked" choice was made by: another member (or a sign-out) opens on "All". */
314
+ let bookedFilterFor = "";
303
315
  let busy = false;
304
316
  /** An Add to Calendar flow is running (a permission prompt, a save, the calendar page). Its own
305
317
  * flag, not `busy`: the session sheet must still close while it runs. */
@@ -428,14 +440,22 @@ function derive(s: S): S {
428
440
  // From today on (the loaded days never start before it), at the chosen location. The list is
429
441
  // one run of days: a tap on the calendar SCROLLS it to a day, and scrolling it moves the
430
442
  // selection, so it never starts at the selected day (the days above it would vanish).
431
- const shown = sessions.filter((x) => x.day >= s.today && (!locationKey || x.locationKey === locationKey));
443
+ const bookedOnly = filtersOn && !!member?.email && bookedFilterFor === member.email;
444
+ const mine = (x: Session) => { const p = places.get(x.key)?.place; return p === "booked" || p === "waitlisted"; };
445
+ const shown = sessions.filter((x) => x.day >= s.today && (!locationKey || x.locationKey === locationKey) && (!bookedOnly || mine(x)));
432
446
  const events = rowsOk === false ? [] : shown.map((x, i) => eventOf(x, places.get(x.key), shown[i + 1]?.day !== x.day));
433
447
  const sheet = sessions.find((x) => x.key === sheetKey);
434
448
  const sheetPlace = sheet ? places.get(sheet.key)?.place ?? "" : "";
435
449
  const loaded = s.status === "ready" && rowsOk !== false && !!services;
436
- const locationEmpty = loaded && !!locationKey && shown.length === 0;
450
+ const locationEmpty = loaded && !!locationKey && shown.length === 0 && !bookedOnly;
451
+ const bookedEmpty = loaded && bookedOnly && shown.length === 0;
437
452
  return {
438
453
  ...s,
454
+ filter: bookedOnly ? "booked" : "all",
455
+ // A visitor has no sessions of their own: the filter shows only to a signed-in member.
456
+ hideFilter: !filtersOn || !member?.email,
457
+ bookedEmpty,
458
+ notBookedEmpty: !bookedEmpty,
439
459
  ...locationMenu(choices, chosenLocation.id),
440
460
  locationSheetOpen: locationSheet,
441
461
  locationEmpty,
@@ -449,7 +469,7 @@ function derive(s: S): S {
449
469
  signedIn: !!member?.email,
450
470
  updateRequired: rowsOk === false,
451
471
  listHidden: s.busy === true || rowsOk === false || events.length === 0,
452
- ...emptyFlags(loaded && services!.length === 0, loaded && services!.length > 0 && events.length === 0 && !locationEmpty),
472
+ ...emptyFlags(loaded && services!.length === 0, loaded && services!.length > 0 && events.length === 0 && !locationEmpty && !bookedEmpty),
453
473
  sheetOpen: !!sheet && !!sheetPlace,
454
474
  sheetTitle: sheet?.title ?? "",
455
475
  sheetWhen: sheet ? joined(dayLabel(sheet.start, { absolute: true }), timeLabel(sheet.start), lengthLabel(sheet.start, sheet.end)) : "",
@@ -630,6 +650,7 @@ function initial(): S {
630
650
  sheetOpen: false, sheetTitle: "", sheetWhen: "", sheetMeta: "", sheetHideCalendar: true, sheetHideCancel: true, sheetHideLeave: true, sheetBusy: false, sheetServiceId: "", sheetSessionId: "", sheetStart: "",
631
651
  locationOptions: [], locationLabel: "", locationA11y: "", hasLocationMenu: false, noLocationMenu: true,
632
652
  locationActive: false, noLocationActive: true, locationSheetOpen: false, locationEmpty: false, notLocationEmpty: true,
653
+ filter: "all", hideFilter: true, bookedEmpty: false, notBookedEmpty: true,
633
654
  };
634
655
  }
635
656
 
@@ -673,10 +694,13 @@ const svc = defineService<S, {
673
694
  openLocations: (s: S) => S;
674
695
  closeLocations: (s: S) => S;
675
696
  selectLocation: (s: S, p?: unknown) => Promise<S | undefined>;
697
+ setFilter: (s: S, p?: unknown) => S;
676
698
  }>("himiBrandedAgenda", {
677
699
  // An action's result belongs to that visit: a cold start must not replay it from saved state,
678
700
  // nor reopen the location sheet.
679
- notHydrated: ["resultOpen", "resultOpenB", "resultText", "resultOk", "resultInfo", "locationSheetOpen"],
701
+ notHydrated: ["resultOpen", "resultOpenB", "resultText", "resultOk", "resultInfo", "locationSheetOpen", "filter", "hideFilter", "bookedEmpty", "notBookedEmpty"],
702
+ // The optional Booked filter is the member's choice for this run: never written to the device.
703
+ notPersisted: ["filter", "hideFilter", "bookedEmpty", "notBookedEmpty"],
680
704
  state: initial(),
681
705
  actions: {
682
706
  load: async (s, p) => {
@@ -688,6 +712,7 @@ const svc = defineService<S, {
688
712
  }
689
713
  const signInScreen = argOf(p, "signInScreenId");
690
714
  if (/^[a-z][a-z0-9_]{0,63}$/.test(signInScreen)) signInScreenId = signInScreen;
715
+ if (argOf(p, "filters") === "1") filtersOn = true;
691
716
  const fw = Number(argOf(p, "firstWeekday") || s.firstWeekday);
692
717
  const today = dayKey(new Date());
693
718
  // First appearance: open on this week. A re-appearance keeps the member's place and
@@ -932,6 +957,14 @@ const svc = defineService<S, {
932
957
  locationSheet = true;
933
958
  return derive({ ...s, ...wanted });
934
959
  },
960
+ // The "All · Booked" filter (a segmented control's id, or `{ id }`). A list of the member's own
961
+ // sessions, from the same loaded days; the calendar's dots follow it.
962
+ setFilter: (s, p) => {
963
+ const id = typeof p === "string" ? p : argOf(p, "id") || argOf(p, "value") || argOf(p, "selectedId");
964
+ if (id !== "all" && id !== "booked") return s;
965
+ bookedFilterFor = id === "booked" ? member?.email ?? "" : "";
966
+ return derive({ ...s, ...wanted });
967
+ },
935
968
  closeLocations: (s) => {
936
969
  if (!locationSheet) return s;
937
970
  locationSheet = false;
@@ -2241,7 +2241,7 @@ const SCREENS = runtimeSetting({
2241
2241
  "package": "himalaya",
2242
2242
  "type": "Fab",
2243
2243
  "props": {
2244
- "icon": "chat",
2244
+ "icon": "whatsapp",
2245
2245
  "tint": "whatsapp",
2246
2246
  "action": {
2247
2247
  "actionId": "tier5.himiClinicHome.openWhatsApp",
@@ -2272,6 +2272,7 @@ const SCREENS = runtimeSetting({
2272
2272
  }
2273
2273
  }
2274
2274
  },
2275
+ "stickyFooterPlacement": "floating",
2275
2276
  "topBar": {
2276
2277
  "items": [
2277
2278
  {
@@ -39,6 +39,10 @@ interface S {
39
39
  noActivity: boolean;
40
40
  servicesScreenId: string;
41
41
  bookingsScreenId: string;
42
+ /** Sign out asks first on a screen that binds the confirm step (askSignOut → signOut, or
43
+ * cancelSignOut). A screen that calls signOut directly signs out at once, as before. */
44
+ confirmingSignOut?: boolean;
45
+ notConfirmingSignOut?: boolean;
42
46
  }
43
47
 
44
48
  function derive(s: S): S {
@@ -46,6 +50,8 @@ function derive(s: S): S {
46
50
  const hasActivity = s.activityRows.length > 0;
47
51
  return {
48
52
  ...s,
53
+ confirmingSignOut: !!s.confirmingSignOut && s.isMember,
54
+ notConfirmingSignOut: !(s.confirmingSignOut && s.isMember),
49
55
  isLoading: s.status === "loading",
50
56
  notLoading: s.status !== "loading",
51
57
  notMember: !s.isMember,
@@ -167,8 +173,14 @@ const svc = defineService<S, {
167
173
  signIn: (s: S) => Promise<S>;
168
174
  register: (s: S) => Promise<S>;
169
175
  signOut: (s: S) => Promise<S>;
176
+ askSignOut: (s: S) => S;
177
+ cancelSignOut: (s: S) => S;
170
178
  openForMember: (s: S, arg?: unknown) => Promise<S>;
171
179
  }>("himiBookingAccount", {
180
+ // An open sign-out confirm is this run's: a cold start never re-opens the dialog, and the flag
181
+ // is never written to the device.
182
+ notHydrated: ["confirmingSignOut", "notConfirmingSignOut"],
183
+ notPersisted: ["confirmingSignOut", "notConfirmingSignOut"],
172
184
  state: derive({
173
185
  status: "loading",
174
186
  isMember: false,
@@ -244,8 +256,11 @@ const svc = defineService<S, {
244
256
  },
245
257
  signOut: async (s) => {
246
258
  try { await dispatch("himi.wix.signOut"); } catch { /* ignore */ }
247
- return probe({ ...s, isMember: false, isRegistering: false, message: "" });
259
+ return probe({ ...s, isMember: false, isRegistering: false, message: "", confirmingSignOut: false });
248
260
  },
261
+ // The confirm step before a sign-out (a destructive action always confirms).
262
+ askSignOut: (s) => derive({ ...s, confirmingSignOut: true }),
263
+ cancelSignOut: (s) => derive({ ...s, confirmingSignOut: false }),
249
264
  },
250
265
  });
251
266
  svc.load();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$source": "en",
3
- "$generated": "2026-11-15T09:24:42.792Z",
3
+ "$generated": "2026-11-17T08:26:59.985Z",
4
4
  "messages": {
5
5
  "h_01e1787a9e5b": {
6
6
  "source": "App language",
@@ -0,0 +1,16 @@
1
+ // How a worker reads an Online Program's lifecycle and name. Wix returns them in more than one
2
+ // shape (v3 `status` or `state`; `description.title`, `settings.title`, a flat `title` or
3
+ // `details.title`), so every screen that lists programs reads them here, the same way.
4
+ import type { WixProgram } from "@himalaya/wix-online-programs";
5
+ import { cleanTitle } from "./himi-text.js";
6
+
7
+ export function programStatus(p: WixProgram): string {
8
+ return (p.status ?? p.state ?? "").toUpperCase();
9
+ }
10
+ export const isProgramEnded = (p: WixProgram): boolean => programStatus(p) === "ENDED" || programStatus(p) === "FINISHED";
11
+ export const isProgramDraft = (p: WixProgram): boolean => programStatus(p) === "DRAFT";
12
+
13
+ /** The program's own name, cleaned; "" when it has none (the caller picks its own fallback word). */
14
+ export function programName(p: WixProgram): string {
15
+ return cleanTitle(p.description?.title ?? p.settings?.title ?? p.title ?? p.details?.title);
16
+ }
@@ -22,7 +22,8 @@ import { iapPriceFields, onlineProgramItem, type IapPollDirective } from "@himal
22
22
  import { createIapCommerce } from "@himalaya/iap-checkout";
23
23
  import { createCollectionQuery, type CollectionPage, type CollectionQueryState } from "./collection-query.js";
24
24
  import { memberAccess, memberAccessChanged, memberAccessDenied, type MemberAccess } from "./member-access.js";
25
- import { cleanTitle, initials } from "./himi-text.js";
25
+ import { initials } from "./himi-text.js";
26
+ import { isProgramDraft, isProgramEnded, programName } from "./program-fields.js";
26
27
  import { programImage } from "./himi-media.js";
27
28
  import { descriptionBody } from "./rich-body.js";
28
29
  import { programDescription } from "./program-description.js";
@@ -125,19 +126,15 @@ export interface State {
125
126
  const full = (p: WixProgram): WixProgramFull => p as WixProgramFull;
126
127
 
127
128
  function programTitle(p: WixProgram): string {
128
- return cleanTitle(p.description?.title ?? p.settings?.title ?? p.title ?? p.details?.title)
129
- || copyParam("memberPrograms.programFallbackName", "Program");
129
+ return programName(p) || copyParam("memberPrograms.programFallbackName", "Program");
130
130
  }
131
131
  function programDetails(p: WixProgram): string {
132
132
  // The body may be a Ricos document or serialized text: read it the way the catalog and detail do.
133
133
  const raw = descriptionBody(programDescription(p)).bodyText.replace(/\s+/g, " ").trim();
134
134
  return raw.length > 140 ? `${raw.slice(0, 139).trimEnd()}…` : raw;
135
135
  }
136
- function programStatus(p: WixProgram): string {
137
- return (p.status ?? p.state ?? "").toUpperCase();
138
- }
139
- const isEnded = (p: WixProgram) => programStatus(p) === "ENDED" || programStatus(p) === "FINISHED";
140
- const isDraft = (p: WixProgram) => programStatus(p) === "DRAFT";
136
+ const isEnded = isProgramEnded;
137
+ const isDraft = isProgramDraft;
141
138
  function accessType(p: WixProgram): string {
142
139
  return (full(p).restrictions?.accessType ?? "PUBLIC").toUpperCase();
143
140
  }
@@ -1298,7 +1298,7 @@ const SCREENS = runtimeSetting({
1298
1298
  "type": "Text",
1299
1299
  "props": {
1300
1300
  "text": "$item.time",
1301
- "style": "body",
1301
+ "style": "bodyEmphasis",
1302
1302
  "maxLines": 1,
1303
1303
  "monospacedDigits": true
1304
1304
  }
@@ -1322,7 +1322,7 @@ const SCREENS = runtimeSetting({
1322
1322
  }
1323
1323
  },
1324
1324
  "modifiers": {
1325
- "width": 84
1325
+ "width": 80
1326
1326
  }
1327
1327
  },
1328
1328
  {
@@ -126,6 +126,14 @@ interface S extends LoadFlags {
126
126
  /** A location is chosen and has no session in the loaded days: its own empty state. */
127
127
  locationEmpty: boolean;
128
128
  notLocationEmpty: boolean;
129
+ /** The optional "All · Booked" filter, for an app that asks for it (`load` param `filters: "1"`):
130
+ * "booked" lists only the member's own sessions (booked or on the waitlist). Off by default, so
131
+ * an app that does not bind it lists every session, as before. */
132
+ filter?: "all" | "booked";
133
+ hideFilter?: boolean;
134
+ /** The booked filter is on and the member has no session in the loaded days. */
135
+ bookedEmpty?: boolean;
136
+ notBookedEmpty?: boolean;
129
137
  }
130
138
 
131
139
  const flag = (on: boolean): string => (on ? "true" : "");
@@ -300,6 +308,10 @@ let quietUntil = 0;
300
308
  * it. Cleared by the list's own scroll and a calendar tap, whose plain day the renderer compares
301
309
  * with what it reported (an echo of the member's own scroll never moves the list). */
302
310
  let scrollNonce = 0;
311
+ /** The "All · Booked" filter: offered when the screen's load asks for it, and the member's choice. */
312
+ let filtersOn = false;
313
+ /** The member the "Booked" choice was made by: another member (or a sign-out) opens on "All". */
314
+ let bookedFilterFor = "";
303
315
  let busy = false;
304
316
  /** An Add to Calendar flow is running (a permission prompt, a save, the calendar page). Its own
305
317
  * flag, not `busy`: the session sheet must still close while it runs. */
@@ -428,14 +440,22 @@ function derive(s: S): S {
428
440
  // From today on (the loaded days never start before it), at the chosen location. The list is
429
441
  // one run of days: a tap on the calendar SCROLLS it to a day, and scrolling it moves the
430
442
  // selection, so it never starts at the selected day (the days above it would vanish).
431
- const shown = sessions.filter((x) => x.day >= s.today && (!locationKey || x.locationKey === locationKey));
443
+ const bookedOnly = filtersOn && !!member?.email && bookedFilterFor === member.email;
444
+ const mine = (x: Session) => { const p = places.get(x.key)?.place; return p === "booked" || p === "waitlisted"; };
445
+ const shown = sessions.filter((x) => x.day >= s.today && (!locationKey || x.locationKey === locationKey) && (!bookedOnly || mine(x)));
432
446
  const events = rowsOk === false ? [] : shown.map((x, i) => eventOf(x, places.get(x.key), shown[i + 1]?.day !== x.day));
433
447
  const sheet = sessions.find((x) => x.key === sheetKey);
434
448
  const sheetPlace = sheet ? places.get(sheet.key)?.place ?? "" : "";
435
449
  const loaded = s.status === "ready" && rowsOk !== false && !!services;
436
- const locationEmpty = loaded && !!locationKey && shown.length === 0;
450
+ const locationEmpty = loaded && !!locationKey && shown.length === 0 && !bookedOnly;
451
+ const bookedEmpty = loaded && bookedOnly && shown.length === 0;
437
452
  return {
438
453
  ...s,
454
+ filter: bookedOnly ? "booked" : "all",
455
+ // A visitor has no sessions of their own: the filter shows only to a signed-in member.
456
+ hideFilter: !filtersOn || !member?.email,
457
+ bookedEmpty,
458
+ notBookedEmpty: !bookedEmpty,
439
459
  ...locationMenu(choices, chosenLocation.id),
440
460
  locationSheetOpen: locationSheet,
441
461
  locationEmpty,
@@ -449,7 +469,7 @@ function derive(s: S): S {
449
469
  signedIn: !!member?.email,
450
470
  updateRequired: rowsOk === false,
451
471
  listHidden: s.busy === true || rowsOk === false || events.length === 0,
452
- ...emptyFlags(loaded && services!.length === 0, loaded && services!.length > 0 && events.length === 0 && !locationEmpty),
472
+ ...emptyFlags(loaded && services!.length === 0, loaded && services!.length > 0 && events.length === 0 && !locationEmpty && !bookedEmpty),
453
473
  sheetOpen: !!sheet && !!sheetPlace,
454
474
  sheetTitle: sheet?.title ?? "",
455
475
  sheetWhen: sheet ? joined(dayLabel(sheet.start, { absolute: true }), timeLabel(sheet.start), lengthLabel(sheet.start, sheet.end)) : "",
@@ -630,6 +650,7 @@ function initial(): S {
630
650
  sheetOpen: false, sheetTitle: "", sheetWhen: "", sheetMeta: "", sheetHideCalendar: true, sheetHideCancel: true, sheetHideLeave: true, sheetBusy: false, sheetServiceId: "", sheetSessionId: "", sheetStart: "",
631
651
  locationOptions: [], locationLabel: "", locationA11y: "", hasLocationMenu: false, noLocationMenu: true,
632
652
  locationActive: false, noLocationActive: true, locationSheetOpen: false, locationEmpty: false, notLocationEmpty: true,
653
+ filter: "all", hideFilter: true, bookedEmpty: false, notBookedEmpty: true,
633
654
  };
634
655
  }
635
656
 
@@ -673,10 +694,13 @@ const svc = defineService<S, {
673
694
  openLocations: (s: S) => S;
674
695
  closeLocations: (s: S) => S;
675
696
  selectLocation: (s: S, p?: unknown) => Promise<S | undefined>;
697
+ setFilter: (s: S, p?: unknown) => S;
676
698
  }>("himiBrandedAgenda", {
677
699
  // An action's result belongs to that visit: a cold start must not replay it from saved state,
678
700
  // nor reopen the location sheet.
679
- notHydrated: ["resultOpen", "resultOpenB", "resultText", "resultOk", "resultInfo", "locationSheetOpen"],
701
+ notHydrated: ["resultOpen", "resultOpenB", "resultText", "resultOk", "resultInfo", "locationSheetOpen", "filter", "hideFilter", "bookedEmpty", "notBookedEmpty"],
702
+ // The optional Booked filter is the member's choice for this run: never written to the device.
703
+ notPersisted: ["filter", "hideFilter", "bookedEmpty", "notBookedEmpty"],
680
704
  state: initial(),
681
705
  actions: {
682
706
  load: async (s, p) => {
@@ -688,6 +712,7 @@ const svc = defineService<S, {
688
712
  }
689
713
  const signInScreen = argOf(p, "signInScreenId");
690
714
  if (/^[a-z][a-z0-9_]{0,63}$/.test(signInScreen)) signInScreenId = signInScreen;
715
+ if (argOf(p, "filters") === "1") filtersOn = true;
691
716
  const fw = Number(argOf(p, "firstWeekday") || s.firstWeekday);
692
717
  const today = dayKey(new Date());
693
718
  // First appearance: open on this week. A re-appearance keeps the member's place and
@@ -932,6 +957,14 @@ const svc = defineService<S, {
932
957
  locationSheet = true;
933
958
  return derive({ ...s, ...wanted });
934
959
  },
960
+ // The "All · Booked" filter (a segmented control's id, or `{ id }`). A list of the member's own
961
+ // sessions, from the same loaded days; the calendar's dots follow it.
962
+ setFilter: (s, p) => {
963
+ const id = typeof p === "string" ? p : argOf(p, "id") || argOf(p, "value") || argOf(p, "selectedId");
964
+ if (id !== "all" && id !== "booked") return s;
965
+ bookedFilterFor = id === "booked" ? member?.email ?? "" : "";
966
+ return derive({ ...s, ...wanted });
967
+ },
935
968
  closeLocations: (s) => {
936
969
  if (!locationSheet) return s;
937
970
  locationSheet = false;
@@ -21113,6 +21113,41 @@ const SCREENS = runtimeSetting({
21113
21113
  "props": {
21114
21114
  "spacing": 8,
21115
21115
  "children": [
21116
+ {
21117
+ "id": "himi_podcasts.mini_player_previous",
21118
+ "body": {
21119
+ "package": "himalaya",
21120
+ "type": "Button",
21121
+ "props": {
21122
+ "title": "Previous",
21123
+ "leadingIcon": "skip_previous",
21124
+ "iconOnly": true,
21125
+ "style": "plain",
21126
+ "action": {
21127
+ "actionId": "tier5.himiBrandedPodcasts.previousEpisode"
21128
+ }
21129
+ }
21130
+ }
21131
+ },
21132
+ {
21133
+ "id": "himi_podcasts.mini_player_back",
21134
+ "body": {
21135
+ "package": "himalaya",
21136
+ "type": "Button",
21137
+ "props": {
21138
+ "title": "Back 15 seconds",
21139
+ "leadingIcon": "undo",
21140
+ "iconOnly": true,
21141
+ "style": "plain",
21142
+ "action": {
21143
+ "actionId": "tier5.himiBrandedPodcasts.seekBy",
21144
+ "params": {
21145
+ "deltaMs": "-15000"
21146
+ }
21147
+ }
21148
+ }
21149
+ }
21150
+ },
21116
21151
  {
21117
21152
  "id": "himi_podcasts.mini_player_toggle",
21118
21153
  "body": {
@@ -21128,6 +21163,25 @@ const SCREENS = runtimeSetting({
21128
21163
  }
21129
21164
  }
21130
21165
  },
21166
+ {
21167
+ "id": "himi_podcasts.mini_player_forward",
21168
+ "body": {
21169
+ "package": "himalaya",
21170
+ "type": "Button",
21171
+ "props": {
21172
+ "title": "Forward 30 seconds",
21173
+ "leadingIcon": "refresh",
21174
+ "iconOnly": true,
21175
+ "style": "plain",
21176
+ "action": {
21177
+ "actionId": "tier5.himiBrandedPodcasts.seekBy",
21178
+ "params": {
21179
+ "deltaMs": "30000"
21180
+ }
21181
+ }
21182
+ }
21183
+ }
21184
+ },
21131
21185
  {
21132
21186
  "id": "himi_podcasts.mini_player_next",
21133
21187
  "body": {
@@ -21147,6 +21201,52 @@ const SCREENS = runtimeSetting({
21147
21201
  }
21148
21202
  }
21149
21203
  },
21204
+ {
21205
+ "id": "himi_podcasts.playback_error",
21206
+ "body": {
21207
+ "package": "himalaya",
21208
+ "type": "VStack",
21209
+ "props": {
21210
+ "spacing": 6,
21211
+ "alignment": "leading",
21212
+ "children": [
21213
+ {
21214
+ "id": "",
21215
+ "body": {
21216
+ "package": "himalaya",
21217
+ "type": "Text",
21218
+ "props": {
21219
+ "text": "$service:himiBrandedPodcasts.playbackErrorText",
21220
+ "style": "footnote",
21221
+ "color": "danger",
21222
+ "collapseWhenEmpty": true
21223
+ }
21224
+ }
21225
+ },
21226
+ {
21227
+ "id": "himi_podcasts.playback_retry",
21228
+ "body": {
21229
+ "package": "himalaya",
21230
+ "type": "Button",
21231
+ "props": {
21232
+ "title": "Try again",
21233
+ "style": "secondary",
21234
+ "action": {
21235
+ "actionId": "tier5.himiBrandedPodcasts.retryPlayback"
21236
+ }
21237
+ }
21238
+ },
21239
+ "modifiers": {
21240
+ "hiddenPath": "$service:himiBrandedPodcasts.hidePlaybackRetry"
21241
+ }
21242
+ }
21243
+ ]
21244
+ }
21245
+ },
21246
+ "modifiers": {
21247
+ "hiddenPath": "$service:himiBrandedPodcasts.hidePlaybackError"
21248
+ }
21249
+ },
21150
21250
  {
21151
21251
  "id": "himi_podcasts.mini_player_progress",
21152
21252
  "body": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$source": "en",
3
- "$generated": "2026-11-15T09:24:42.792Z",
3
+ "$generated": "2026-11-17T08:26:59.985Z",
4
4
  "messages": {
5
5
  "h_01e1787a9e5b": {
6
6
  "source": "App language",
@@ -327,6 +327,13 @@
327
327
  "key": "accountSettings.manageLoginCta",
328
328
  "keyOrigin": "string-table"
329
329
  },
330
+ "h_30668dc2c5d0": {
331
+ "source": "Forward 30 seconds",
332
+ "kind": "Button.title",
333
+ "translation": "",
334
+ "key": "podcasts.seekForwardCta",
335
+ "keyOrigin": "string-table"
336
+ },
330
337
  "h_311872a406d5": {
331
338
  "source": "Your profile photo is managed on the Wix site.",
332
339
  "kind": "Text.text",
@@ -499,6 +506,13 @@
499
506
  "key": "account.backToSignInCta",
500
507
  "keyOrigin": "string-table"
501
508
  },
509
+ "h_50f94286ba30": {
510
+ "source": "Previous",
511
+ "kind": "Button.title",
512
+ "translation": "",
513
+ "key": "podcasts.previousCta",
514
+ "keyOrigin": "string-table"
515
+ },
502
516
  "h_511f7ba65081": {
503
517
  "source": "Something did not load.",
504
518
  "kind": "Text.text",
@@ -629,6 +643,13 @@
629
643
  "key": "plans.errorTitle",
630
644
  "keyOrigin": "string-table"
631
645
  },
646
+ "h_6a20b2e95b10": {
647
+ "source": "Back 15 seconds",
648
+ "kind": "Button.title",
649
+ "translation": "",
650
+ "key": "podcasts.seekBackCta",
651
+ "keyOrigin": "string-table"
652
+ },
632
653
  "h_6a72085653e4": {
633
654
  "source": "All",
634
655
  "kind": "atom.label",
@@ -2,9 +2,31 @@
2
2
  "$source": "es",
3
3
  "$note": "Partial stock translations; missing strings retain their English fallback.",
4
4
  "messages": {
5
+ "h_30668dc2c5d0": {
6
+ "source": "Forward 30 seconds",
7
+ "key": "podcasts.seekForwardCta",
8
+ "translation": "Avanzar 30 segundos",
9
+ "origin": "machine"
10
+ },
11
+ "h_50f94286ba30": {
12
+ "source": "Previous",
13
+ "key": "podcasts.previousCta",
14
+ "translation": "Anterior",
15
+ "origin": "machine"
16
+ },
17
+ "h_6a20b2e95b10": {
18
+ "source": "Back 15 seconds",
19
+ "key": "podcasts.seekBackCta",
20
+ "translation": "Retroceder 15 segundos",
21
+ "origin": "machine"
22
+ },
5
23
  "h_0d049cb0b019": {
6
24
  "source": "This site is not accepting online payments. Go back or contact the business for other payment options.",
7
25
  "translation": "Este sitio no acepta pagos en línea. Vuelve atrás o contacta con el negocio para consultar otras opciones de pago."
26
+ },
27
+ "h_5d12bd53552c": {
28
+ "source": "Play",
29
+ "translation": "Reproducir"
8
30
  }
9
31
  }
10
32
  }
@@ -1454,6 +1454,24 @@
1454
1454
  "translation": "Suivre",
1455
1455
  "origin": "machine"
1456
1456
  },
1457
+ "h_30668dc2c5d0": {
1458
+ "source": "Forward 30 seconds",
1459
+ "key": "podcasts.seekForwardCta",
1460
+ "translation": "Avancer de 30 secondes",
1461
+ "origin": "machine"
1462
+ },
1463
+ "h_50f94286ba30": {
1464
+ "source": "Previous",
1465
+ "key": "podcasts.previousCta",
1466
+ "translation": "Précédent",
1467
+ "origin": "machine"
1468
+ },
1469
+ "h_6a20b2e95b10": {
1470
+ "source": "Back 15 seconds",
1471
+ "key": "podcasts.seekBackCta",
1472
+ "translation": "Reculer de 15 secondes",
1473
+ "origin": "machine"
1474
+ },
1457
1475
  "h_03e89418ffdf": {
1458
1476
  "source": "Your Home",
1459
1477
  "translation": "Votre accueil",
@@ -1224,6 +1224,21 @@
1224
1224
  "key": "loyalty.follow",
1225
1225
  "translation": "מעקב"
1226
1226
  },
1227
+ "h_30668dc2c5d0": {
1228
+ "source": "Forward 30 seconds",
1229
+ "key": "podcasts.seekForwardCta",
1230
+ "translation": "קדימה 30 שניות"
1231
+ },
1232
+ "h_50f94286ba30": {
1233
+ "source": "Previous",
1234
+ "key": "podcasts.previousCta",
1235
+ "translation": "הקודם"
1236
+ },
1237
+ "h_6a20b2e95b10": {
1238
+ "source": "Back 15 seconds",
1239
+ "key": "podcasts.seekBackCta",
1240
+ "translation": "אחורה 15 שניות"
1241
+ },
1227
1242
  "h_03e89418ffdf": {
1228
1243
  "source": "Your Home",
1229
1244
  "translation": "הבית שלך"