@wix/himalaya-cli 0.1953.0 → 0.1955.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/stdlib/auth-providers/wix/src/index.d.ts +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +2 -1
- package/dist/cli.mjs +224 -98
- package/guides/one-app-section-mappings.md +4 -4
- package/guides/one-app-to-himi-app.md +14 -10
- package/package.json +2 -2
- package/templates/bare-fashion/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/beauty-salon/tier5-src/_shared/agenda-calendar.ts +95 -0
- package/templates/beauty-salon/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/beauty-salon/tier5-src/_shared/class-sessions.ts +113 -0
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/branded-lite/l10n/ar.json +10 -0
- package/templates/branded-lite/l10n/cs.json +10 -0
- package/templates/branded-lite/l10n/da.json +10 -0
- package/templates/branded-lite/l10n/de.json +10 -0
- package/templates/branded-lite/l10n/el.json +10 -0
- package/templates/branded-lite/l10n/es.json +10 -0
- package/templates/branded-lite/l10n/fi.json +10 -0
- package/templates/branded-lite/l10n/fr.json +10 -0
- package/templates/branded-lite/l10n/he.json +9 -0
- package/templates/branded-lite/l10n/hu.json +10 -0
- package/templates/branded-lite/l10n/id.json +10 -0
- package/templates/branded-lite/l10n/it.json +10 -0
- package/templates/branded-lite/l10n/ja.json +10 -0
- package/templates/branded-lite/l10n/ko.json +10 -0
- package/templates/branded-lite/l10n/lt.json +10 -0
- package/templates/branded-lite/l10n/nl.json +10 -0
- package/templates/branded-lite/l10n/no.json +10 -0
- package/templates/branded-lite/l10n/pl.json +10 -0
- package/templates/branded-lite/l10n/pt.json +10 -0
- package/templates/branded-lite/l10n/ru.json +10 -0
- package/templates/branded-lite/l10n/sv.json +10 -0
- package/templates/branded-lite/l10n/th.json +10 -0
- package/templates/branded-lite/l10n/tr.json +10 -0
- package/templates/branded-lite/l10n/uk.json +10 -0
- package/templates/branded-lite/l10n/vi.json +10 -0
- package/templates/branded-lite/l10n/zh.json +10 -0
- package/templates/branded-lite/recipes/blog-carousel-classic.json +335 -0
- package/templates/branded-lite/recipes/blog-carousel-full.json +374 -0
- package/templates/branded-lite/recipes/class-calendar.json +707 -0
- package/templates/branded-lite/recipes/events-inline-carousel.json +308 -0
- package/templates/branded-lite/recipes/galleries-carousel.json +51 -2
- package/templates/branded-lite/recipes/galleries-collage.json +51 -2
- package/templates/branded-lite/recipes/galleries-list.json +51 -2
- package/templates/branded-lite/recipes/groups-cards.json +194 -86
- package/templates/branded-lite/recipes/groups-list.json +209 -62
- package/templates/branded-lite/recipes/upcoming-sessions.json +280 -0
- package/templates/branded-lite/tier5-src/_shared/agenda-calendar.ts +95 -0
- package/templates/branded-lite/tier5-src/_shared/blog-list.ts +5 -1
- package/templates/branded-lite/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/branded-lite/tier5-src/_shared/class-calendar-section.ts +280 -0
- package/templates/branded-lite/tier5-src/_shared/class-sessions.ts +113 -0
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/branded-lite/tier5-src/_shared/galleries-section.ts +70 -23
- package/templates/branded-lite/tier5-src/_shared/groups-section.ts +297 -26
- package/templates/branded-lite/tier5-src/_shared/upcoming-sessions-section.ts +121 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
- package/templates/brandy/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/conference/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/fitness-gym/tier5-src/_shared/agenda-calendar.ts +95 -0
- package/templates/fitness-gym/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/fitness-gym/tier5-src/_shared/class-sessions.ts +113 -0
- package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
- package/templates/gym-fitness/tier5-src/_shared/agenda-calendar.ts +95 -0
- package/templates/gym-fitness/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/gym-fitness/tier5-src/_shared/class-sessions.ts +113 -0
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/medical-services/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/medical-services/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/owner-lite/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/agenda-calendar.ts +95 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/class-sessions.ts +113 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/professional-services/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/professional-services/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/salon-spa/tier5-src/_shared/agenda-calendar.ts +95 -0
- package/templates/salon-spa/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/salon-spa/tier5-src/_shared/class-sessions.ts +113 -0
- package/templates/salon-spa/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
- package/templates/wholesale-store/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/yoga-studio/tier5-src/_shared/agenda-calendar.ts +95 -0
- package/templates/yoga-studio/tier5-src/_shared/booking-session.ts +10 -0
- package/templates/yoga-studio/tier5-src/_shared/class-sessions.ts +113 -0
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +13 -146
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +6 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-selected-site.ts +13 -0
- package/templates/branded-lite/recipes/blog-hero.json +0 -95
|
@@ -135,5 +135,10 @@ export interface WixNativeAuthConfig {
|
|
|
135
135
|
* login gate; a Himi sign-out is never undone by it. Refused in consumer and account mode.
|
|
136
136
|
* See docs/wix-authentication.md → "Adopting a legacy session on an in-place upgrade". */
|
|
137
137
|
adoptLegacySession?: boolean;
|
|
138
|
+
/** #6681 — whether `bootstrap()` mints an anonymous visitor token on a signed-out launch.
|
|
139
|
+
* Default `true`. Set `false` for an app whose OAuth client has no site (so the anonymous grant is
|
|
140
|
+
* refused with a 400) and whose signed-out surfaces need no visitor: the provider then settles
|
|
141
|
+
* signed out without the wasted round trip. Only the bootstrap mint is skipped; sign-in is unchanged. */
|
|
142
|
+
mintVisitor?: boolean;
|
|
138
143
|
}
|
|
139
144
|
export declare function WixNativeAuthProvider(config: WixNativeAuthConfig): AuthProvider;
|
|
@@ -1392,7 +1392,8 @@ function WixNativeAuthProvider(config) {
|
|
|
1392
1392
|
...config.petriOverrides ? { petriOverrides: config.petriOverrides } : {},
|
|
1393
1393
|
devMode: config.devMode ?? false,
|
|
1394
1394
|
...config.hostProvided ? { hostProvided: true } : {},
|
|
1395
|
-
...config.adoptLegacySession ? { adoptLegacySession: true } : {}
|
|
1395
|
+
...config.adoptLegacySession ? { adoptLegacySession: true } : {},
|
|
1396
|
+
...config.mintVisitor === false ? { mintVisitor: false } : {}
|
|
1396
1397
|
}
|
|
1397
1398
|
};
|
|
1398
1399
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -3964,7 +3964,6 @@ var init_himi_package = __esm({
|
|
|
3964
3964
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
3965
3965
|
var init_icon_catalog_generated = __esm({
|
|
3966
3966
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
3967
|
-
"use strict";
|
|
3968
3967
|
init_define_HHP_CATALOG();
|
|
3969
3968
|
ICON_VIEW_BOX = 24;
|
|
3970
3969
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -12706,6 +12705,20 @@ function compileV2(html, profile, options2) {
|
|
|
12706
12705
|
if (!info4?.paths.has(relative41)) error(el2, "HHP-BINDING-PATH", `Unknown controller state path ${relative41}.`);
|
|
12707
12706
|
return `$service:${serviceName2}.${relative41}`;
|
|
12708
12707
|
}
|
|
12708
|
+
function projectText(el2, row2, text32, matches2) {
|
|
12709
|
+
for (const match of matches2) path2(el2, match[1], row2);
|
|
12710
|
+
const key4 = `t${textProjections.length}`;
|
|
12711
|
+
const normalized2 = text32.replace(/{{\s*([\w.$]+)\s*}}/g, (_match, raw) => `{{${raw.startsWith("$item.") ? raw : statePath(raw)}}}`);
|
|
12712
|
+
textProjections.push({ key: key4, text: normalized2, ...typeof row2 === "string" && row2 ? { collection: row2 } : {} });
|
|
12713
|
+
return typeof row2 === "string" && row2 ? `$item.__hhpText_${key4}` : `$service:${serviceName2}.__hhpText.${key4}`;
|
|
12714
|
+
}
|
|
12715
|
+
function interpolations(el2, text32) {
|
|
12716
|
+
if (/{{|}}/.test(text32.replace(/{{\s*[\w.$]+\s*}}/g, ""))) {
|
|
12717
|
+
error(el2, "HHP-TEXT-EXPRESSION", "Text interpolation accepts state/item paths; compute expressions in the controller.");
|
|
12718
|
+
return void 0;
|
|
12719
|
+
}
|
|
12720
|
+
return [...text32.matchAll(/{{\s*([\w.$]+)\s*}}/g)];
|
|
12721
|
+
}
|
|
12709
12722
|
const read2 = (value2, dotted) => dotted.split(".").reduce((current, key4) => current && typeof current === "object" && Object.hasOwn(current, key4) ? current[key4] : void 0, value2);
|
|
12710
12723
|
function rowValues(row2, raw) {
|
|
12711
12724
|
if (!row2) return [];
|
|
@@ -12769,17 +12782,12 @@ function compileV2(html, profile, options2) {
|
|
|
12769
12782
|
const textNodes = element.contents().toArray().filter((n2) => n2.type === "text");
|
|
12770
12783
|
const text32 = textNodes.map((n2) => n2.data).join(" ").replace(/\s+/g, " ").trim();
|
|
12771
12784
|
if (["Text", "RichText"].includes(type2)) {
|
|
12772
|
-
const matches2 =
|
|
12773
|
-
if (/{{|}}/.test(text32.replace(/{{\s*[\w.$]+\s*}}/g, ""))) error(el2, "HHP-TEXT-EXPRESSION", "Text interpolation accepts state/item paths; compute expressions in the controller.");
|
|
12785
|
+
const matches2 = interpolations(el2, text32) ?? [];
|
|
12774
12786
|
if (matches2.length) {
|
|
12775
12787
|
if (matches2.length === 1 && matches2[0][0] === text32 && type2 === "Text") {
|
|
12776
12788
|
props2.text = path2(el2, matches2[0][1], row2);
|
|
12777
12789
|
} else if ((controller || nanoActions) && type2 === "Text") {
|
|
12778
|
-
|
|
12779
|
-
const key4 = `t${textProjections.length}`;
|
|
12780
|
-
const normalized2 = text32.replace(/{{\s*([\w.$]+)\s*}}/g, (_match, raw) => `{{${raw.startsWith("$item.") ? raw : statePath(raw)}}}`);
|
|
12781
|
-
textProjections.push({ key: key4, text: normalized2, ...row2 ? { collection: row2 } : {} });
|
|
12782
|
-
props2.text = row2 ? `$item.__hhpText_${key4}` : `$service:${serviceName2}.__hhpText.${key4}`;
|
|
12790
|
+
props2.text = projectText(el2, row2, text32, matches2);
|
|
12783
12791
|
} else {
|
|
12784
12792
|
if (profile.surfaces.some((surface) => surface === "ios" || surface === "android" || surface === "macos"))
|
|
12785
12793
|
error(el2, "HHP-TEXT-TEMPLATE-SURFACE", "Text templates are not implemented by the enabled native renderers.", "Compute the complete string in controller state and bind it on a Text component with {{path}} or bind:content.");
|
|
@@ -12799,8 +12807,17 @@ function compileV2(html, profile, options2) {
|
|
|
12799
12807
|
if (heading) props2.style = heading;
|
|
12800
12808
|
else error(el2, "HHP-TOKEN", "Headings require a body, title1, headline, or largeTitle typography token.");
|
|
12801
12809
|
}
|
|
12802
|
-
} else if (type2 === "Button" && (text32 || attrs.title))
|
|
12803
|
-
|
|
12810
|
+
} else if (type2 === "Button" && (text32 || attrs.title)) {
|
|
12811
|
+
const label4 = text32 || attrs.title;
|
|
12812
|
+
const matches2 = interpolations(el2, label4);
|
|
12813
|
+
if (!matches2?.length) props2.title = label4;
|
|
12814
|
+
else if (matches2.length === 1 && matches2[0][0] === label4) props2.title = path2(el2, matches2[0][1], row2);
|
|
12815
|
+
else if (controller || nanoActions) props2.title = projectText(el2, row2, label4, matches2);
|
|
12816
|
+
else {
|
|
12817
|
+
props2.title = label4;
|
|
12818
|
+
error(el2, "HHP-TEXT-TEMPLATE-SURFACE", "A button label mixing copy and {{paths}} needs a worker to build the complete string.", "Keep the complete label in state and bind it with a single {{path}}.");
|
|
12819
|
+
}
|
|
12820
|
+
} else if (text32) error(el2, "HHP-TEXT", "Wrap container text in a paragraph or span.");
|
|
12804
12821
|
if (type2 === "Image" && attrs.src) {
|
|
12805
12822
|
if (/^https:\/\//.test(attrs.src)) props2.url = attrs.src;
|
|
12806
12823
|
else {
|
|
@@ -25041,11 +25058,21 @@ async function bootBundleWorker(bundleJs, opts) {
|
|
|
25041
25058
|
}
|
|
25042
25059
|
if (opts.snapshotServices !== false) for (const { name, def: def2 } of captured) services2[name] = clone(def2.state);
|
|
25043
25060
|
}
|
|
25044
|
-
return {
|
|
25045
|
-
|
|
25046
|
-
|
|
25047
|
-
|
|
25048
|
-
|
|
25061
|
+
return {
|
|
25062
|
+
services: services2,
|
|
25063
|
+
calls,
|
|
25064
|
+
errors,
|
|
25065
|
+
oversizeWixResponses,
|
|
25066
|
+
handles,
|
|
25067
|
+
navDirectives,
|
|
25068
|
+
pollDirectives,
|
|
25069
|
+
pendingTimers: () => guestActions !== void 0 ? void 0 : timers.size,
|
|
25070
|
+
dispose: () => {
|
|
25071
|
+
for (const t2 of timers) clearTimeout(t2);
|
|
25072
|
+
timers.clear();
|
|
25073
|
+
guestSession?.dispose();
|
|
25074
|
+
}
|
|
25075
|
+
};
|
|
25049
25076
|
}
|
|
25050
25077
|
async function loadBundleServicesLive(bundleJs, opts) {
|
|
25051
25078
|
const { services: services2, calls, errors, oversizeWixResponses, dispose } = await bootBundleWorker(bundleJs, opts);
|
|
@@ -210415,6 +210442,7 @@ function barePngUrls(raw) {
|
|
|
210415
210442
|
const settings = record3(record3(section3).settings);
|
|
210416
210443
|
add(record3(settings.data).url);
|
|
210417
210444
|
add(settings.imageUri);
|
|
210445
|
+
add(settings.coverImageUrl);
|
|
210418
210446
|
if (Array.isArray(settings.items)) for (const item2 of settings.items) add(record3(item2).imageUrl);
|
|
210419
210447
|
}
|
|
210420
210448
|
return [...found];
|
|
@@ -210610,18 +210638,28 @@ function withoutNode(node4, id) {
|
|
|
210610
210638
|
};
|
|
210611
210639
|
return walk6(node4);
|
|
210612
210640
|
}
|
|
210613
|
-
function
|
|
210641
|
+
function patchNode(node4, id, patch) {
|
|
210614
210642
|
const walk6 = (value2) => {
|
|
210615
210643
|
if (Array.isArray(value2)) return value2.map(walk6);
|
|
210616
210644
|
if (!value2 || typeof value2 !== "object") return value2;
|
|
210617
210645
|
const entry = value2;
|
|
210618
210646
|
const next = Object.fromEntries(Object.entries(entry).map(([k3, v2]) => [k3, walk6(v2)]));
|
|
210619
|
-
|
|
210620
|
-
const { onTap: _onTap, pressFeedback: _pressFeedback, ...modifiers } = obj19(next.modifiers);
|
|
210621
|
-
return { ...next, modifiers };
|
|
210647
|
+
return entry.id === id ? patch(next) : next;
|
|
210622
210648
|
};
|
|
210623
210649
|
return walk6(node4);
|
|
210624
210650
|
}
|
|
210651
|
+
function withoutTap(node4, id) {
|
|
210652
|
+
return patchNode(node4, id, (entry) => {
|
|
210653
|
+
const { onTap: _onTap, pressFeedback: _pressFeedback, ...modifiers } = obj19(entry.modifiers);
|
|
210654
|
+
return { ...entry, modifiers };
|
|
210655
|
+
});
|
|
210656
|
+
}
|
|
210657
|
+
function withProps(node4, id, props2) {
|
|
210658
|
+
return patchNode(node4, id, (entry) => {
|
|
210659
|
+
const body = obj19(entry.body);
|
|
210660
|
+
return { ...entry, body: { ...body, props: { ...obj19(body.props), ...props2 } } };
|
|
210661
|
+
});
|
|
210662
|
+
}
|
|
210625
210663
|
function plansSection(id, s5, index, ctx, options2) {
|
|
210626
210664
|
if (!ctx.hasScreen("himi_plan")) throw new RecipeError("this scaffold has no himi_plan screen for a plan card to open");
|
|
210627
210665
|
const svc = ctx.uses("plans", `plans${index}`, { ...options2 });
|
|
@@ -210686,28 +210724,43 @@ function galleryCards(id, s5, index, ctx, options2) {
|
|
|
210686
210724
|
const title = str15(s5.title).trim();
|
|
210687
210725
|
const viewAll = ctx.hasScreen("himi_galleries") ? node3(`${id}.all`, "Button", { title: "View All", style: "secondary", size: "md", fullWidth: true, action: { actionId: "himi.open", params: { screenId: "himi_galleries" } } }, { hiddenPath: `$service:${svc}.noMore` }) : void 0;
|
|
210688
210726
|
if (s5.showTitle !== false && title) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
|
|
210689
|
-
children2.push(
|
|
210727
|
+
children2.push(galleriesRecipe(options2.layout, svc, id, ctx), ...viewAll ? [viewAll] : [], ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
210690
210728
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
210691
210729
|
}
|
|
210730
|
+
function galleriesRecipe(name, svc, id, ctx) {
|
|
210731
|
+
const node4 = ctx.recipe(name, { svc, id, signInScreen: "himi_sign_in" });
|
|
210732
|
+
return ctx.hasScreen("himi_sign_in") ? node4 : withoutNode(node4, `${id}.signin.button`);
|
|
210733
|
+
}
|
|
210692
210734
|
function galleryCollage(id, index, ctx, options2) {
|
|
210693
210735
|
if (!ctx.hasScreen("himi_gallery")) throw new RecipeError("this scaffold has no himi_gallery screen for a gallery tile to open, so the section keeps its title and a See All link.");
|
|
210694
210736
|
const svc = ctx.uses("galleries", `galleries${index}`, { limit: 1, showName: options2.showName, collage: true });
|
|
210695
|
-
return vstack(`${id}.box`, [
|
|
210737
|
+
return vstack(`${id}.box`, [galleriesRecipe("galleries-collage", svc, id, ctx), ...ctx.optionalRecipe("section-error", { svc, id, action: "load" })], 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
210696
210738
|
}
|
|
210697
210739
|
function groupsSection(recipe, type2) {
|
|
210698
210740
|
return (id, s5, st2, index, ctx, sectionId) => {
|
|
210699
210741
|
if (!ctx.hasScreen("himi_group")) return ctx.unsupported(sectionId, type2, "this scaffold has no himi_group screen for a row to open");
|
|
210700
210742
|
const groupIds = arr3(st2.groupsIds).filter((v2) => typeof v2 === "string" && !!v2);
|
|
210701
210743
|
const limit = countOf2(st2.maxGroups);
|
|
210702
|
-
const createText2 = str15(st2.createButtonText).trim();
|
|
210703
|
-
|
|
210744
|
+
const createText2 = str15(st2.createButtonText).trim() || "Create Group";
|
|
210745
|
+
ctx.gap(sectionId, type2, `the source has a "${createText2}" control for a member the site lets create groups; the section has none, because Wix refuses group creation to every member session (createGroup needs an owner token)`);
|
|
210704
210746
|
const svc = ctx.uses("groups", `groups${index}`, { ...groupIds.length ? { groupIds } : {}, ...limit !== void 0 ? { limit } : {}, ...recipe === "groups-cards" ? { cards: true } : {} });
|
|
210705
|
-
const
|
|
210706
|
-
const
|
|
210707
|
-
|
|
210708
|
-
|
|
210709
|
-
|
|
210710
|
-
|
|
210747
|
+
const title = s5.showTitle === true ? str15(s5.title).trim() : "";
|
|
210748
|
+
const expand3 = str15(st2.expandButtonText).trim() || "View All";
|
|
210749
|
+
const signInScreen = ctx.hasScreen("himi_sign_in") ? "himi_sign_in" : "";
|
|
210750
|
+
let list5 = ctx.recipe(recipe, {
|
|
210751
|
+
svc,
|
|
210752
|
+
id,
|
|
210753
|
+
title,
|
|
210754
|
+
detailScreen: "himi_group",
|
|
210755
|
+
signInScreen,
|
|
210756
|
+
...recipe === "groups-list" ? { headLabel: "Search", searchPlaceholder: "Search groups", seeAllLabel: expand3, seeAllScreen: "himi_groups" } : { headLabel: expand3, headScreen: "himi_groups" }
|
|
210757
|
+
});
|
|
210758
|
+
list5 = withoutNode(list5, title ? `${id}.headSpacer` : `${id}.headTitle`);
|
|
210759
|
+
if (!ctx.hasScreen("himi_groups")) {
|
|
210760
|
+
list5 = recipe === "groups-list" ? withoutNode(list5, `${id}.more`) : withoutNode(list5, `${id}.all`);
|
|
210761
|
+
if (recipe === "groups-cards" && !title) list5 = withoutNode(list5, `${id}.head`);
|
|
210762
|
+
}
|
|
210763
|
+
return vstack(`${id}.box`, [list5, ...ctx.optionalRecipe("section-error", { svc, id, action: "load" })], 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
210711
210764
|
};
|
|
210712
210765
|
}
|
|
210713
210766
|
function productsSection(kind) {
|
|
@@ -210777,7 +210830,7 @@ function wishlistSection(id, s5, st2, index, ctx, sectionId) {
|
|
|
210777
210830
|
children2.push(list5, ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
210778
210831
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
210779
210832
|
}
|
|
210780
|
-
function blogOptions(st2,
|
|
210833
|
+
function blogOptions(st2, rows = {}) {
|
|
210781
210834
|
const content = obj19(st2.contentSettings);
|
|
210782
210835
|
const display = obj19(st2.displayOptions);
|
|
210783
210836
|
const raw = content.postsPerCategory;
|
|
@@ -210797,7 +210850,8 @@ function blogOptions(st2, listRows = false) {
|
|
|
210797
210850
|
views: display.times_viewed === true,
|
|
210798
210851
|
comments: display.comments === true,
|
|
210799
210852
|
// Each its own source switch (absent: hidden). The full list See All opens gets the same row facts.
|
|
210800
|
-
...
|
|
210853
|
+
...rows.avatar ? { avatar: display.avatar === true } : {},
|
|
210854
|
+
...rows.excerpt ? { excerpt: display.excerpt === true } : {}
|
|
210801
210855
|
},
|
|
210802
210856
|
// The native list shows "2 hours ago", not an absolute date (observed on the source app; no source setting carries it).
|
|
210803
210857
|
relativeTime: true
|
|
@@ -210807,7 +210861,7 @@ function blogOptions(st2, listRows = false) {
|
|
|
210807
210861
|
function blogSection(id, s5, st2, index, ctx, sectionId, type2) {
|
|
210808
210862
|
const display = obj19(st2.displayOptions);
|
|
210809
210863
|
if (st2.postsLayout !== void 0 && st2.postsLayout !== "list") ctx.gap(sectionId, type2, `post layout "${String(st2.postsLayout)}" is shown as the shared blog list`);
|
|
210810
|
-
const { base: base2, limit } = blogOptions(st2, true);
|
|
210864
|
+
const { base: base2, limit } = blogOptions(st2, { avatar: true, excerpt: true });
|
|
210811
210865
|
const svc = ctx.uses("blog", `blog${index}`, { ...base2, ...limit !== void 0 ? { limit, seeAll: true } : {} });
|
|
210812
210866
|
const nodes3 = ctx.recipeNodes("blog-list", { svc, id, detailScreen: "himi_blog_post" });
|
|
210813
210867
|
loadOnAppear(nodes3, svc);
|
|
@@ -210830,43 +210884,50 @@ function blogSection(id, s5, st2, index, ctx, sectionId, type2) {
|
|
|
210830
210884
|
}
|
|
210831
210885
|
return out2;
|
|
210832
210886
|
}
|
|
210833
|
-
function blogCarousel(type2,
|
|
210887
|
+
function blogCarousel(type2, look) {
|
|
210834
210888
|
return (id, s5, st2, index, ctx, sectionId) => {
|
|
210835
|
-
const { base: base2, limit } = blogOptions(st2);
|
|
210889
|
+
const { base: base2, limit } = blogOptions(st2, { avatar: true });
|
|
210836
210890
|
const shown3 = Math.min(limit ?? BLOG_HERO_MAX, BLOG_HERO_MAX);
|
|
210837
210891
|
if (limit === void 0 || limit > BLOG_HERO_MAX) ctx.gap(sectionId, type2, `the source carousel is not limited to ${BLOG_HERO_MAX} posts; the app shows the latest ${shown3}`);
|
|
210838
|
-
for (const reason of layoutGaps(st2)) ctx.gap(sectionId, type2, reason);
|
|
210839
210892
|
const svc = ctx.uses("blog", `blog${index}`, { ...base2, limit: shown3 });
|
|
210840
210893
|
const children2 = [];
|
|
210841
210894
|
const title = str15(s5.title).trim();
|
|
210842
210895
|
if (s5.showTitle === true && title) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
|
|
210843
|
-
|
|
210844
|
-
|
|
210896
|
+
const textOnly = look === "classic" && obj19(base2.show).cover === false;
|
|
210897
|
+
const skeleton = look === "full" ? 240 : textOnly ? 110 : 270;
|
|
210898
|
+
children2.push(node3(`${id}.loading`, "Skeleton", { height: skeleton, count: 1, cornerRadius: 12 }, { padding: { leading: 0, trailing: 0, top: 0, bottom: 0 }, hiddenPath: `$service:${svc}.notLoading` }));
|
|
210899
|
+
const cards = ctx.recipe(`blog-carousel-${look}`, { svc, id, detailScreen: "himi_blog_post" });
|
|
210900
|
+
children2.push(textOnly ? withoutNode(cards, `${id}.media`) : cards, ...ctx.optionalRecipe("section-error", { svc, id, action: "retry" }));
|
|
210845
210901
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
210846
210902
|
};
|
|
210847
210903
|
}
|
|
210848
210904
|
function withOpenParams(node4, id, values) {
|
|
210849
|
-
|
|
210850
|
-
|
|
210851
|
-
|
|
210852
|
-
|
|
210853
|
-
const next = Object.fromEntries(Object.entries(entry).map(([k3, v2]) => [k3, walk6(v2)]));
|
|
210854
|
-
if (entry.id !== id) return next;
|
|
210855
|
-
const body = obj19(next.body), props2 = obj19(body.props), action = obj19(props2.action);
|
|
210856
|
-
return { ...next, body: { ...body, props: { ...props2, action: { ...action, params: { ...obj19(action.params), ...values } } } } };
|
|
210857
|
-
};
|
|
210858
|
-
return walk6(node4);
|
|
210905
|
+
return patchNode(node4, id, (entry) => {
|
|
210906
|
+
const body = obj19(entry.body), props2 = obj19(body.props), action = obj19(props2.action);
|
|
210907
|
+
return { ...entry, body: { ...body, props: { ...props2, action: { ...action, params: { ...obj19(action.params), ...values } } } } };
|
|
210908
|
+
});
|
|
210859
210909
|
}
|
|
210860
|
-
function eventsInline(id, s5, st2, index, ctx) {
|
|
210910
|
+
function eventsInline(id, s5, st2, index, ctx, rail = false) {
|
|
210861
210911
|
const { categoryIds, eventIds } = eventsSelection(st2);
|
|
210862
210912
|
const open6 = eventsOpenParams(st2);
|
|
210863
|
-
const
|
|
210864
|
-
const
|
|
210865
|
-
const
|
|
210913
|
+
const hasList = ctx.hasScreen("himi_events");
|
|
210914
|
+
const seeAll = !rail && Object.keys(open6).length > 0 && hasList;
|
|
210915
|
+
const svc = ctx.uses("events", `events${index}`, { ...rail ? { limit: EVENTS_RAIL_INLINE } : {}, ...categoryIds.length ? { categoryIds } : {}, ...eventIds.length ? { eventIds } : {} });
|
|
210916
|
+
const recipe = ctx.recipe(rail ? "events-inline-carousel" : "events-inline", { svc, id, shareLabel: "Share", seeAllLabel: seeAll ? "See All" : "", seeAllScreen: "himi_events" });
|
|
210866
210917
|
const card2 = seeAll ? withOpenParams(recipe, `${id}.see_all`, open6) : withoutNode(recipe, `${id}.see_all`);
|
|
210867
210918
|
const children2 = [];
|
|
210868
210919
|
const title = str15(s5.title).trim();
|
|
210869
|
-
if (s5.showTitle === true && title)
|
|
210920
|
+
if (s5.showTitle === true && title) {
|
|
210921
|
+
children2.push(rail && hasList ? hstack(`${id}.head`, [
|
|
210922
|
+
text10(`${id}.title`, title, "title3", { maxLines: 2 }, { ...inset(0, 0, 0), weight: 1 }),
|
|
210923
|
+
node3(
|
|
210924
|
+
`${id}.all`,
|
|
210925
|
+
"Button",
|
|
210926
|
+
{ title: "View All", style: "link", size: "md", action: { actionId: "himi.open", params: { screenId: "himi_events", ...open6 } } },
|
|
210927
|
+
{ hiddenPath: `$service:${svc}.noRows` }
|
|
210928
|
+
)
|
|
210929
|
+
], 12) : text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
|
|
210930
|
+
}
|
|
210870
210931
|
children2.push(card2, ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
210871
210932
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
210872
210933
|
}
|
|
@@ -211628,7 +211689,7 @@ function addNavigation(out2, plan, taken2, pageIconOf) {
|
|
|
211628
211689
|
out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
|
|
211629
211690
|
out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
|
|
211630
211691
|
}
|
|
211631
|
-
var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS,
|
|
211692
|
+
var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj19, arr3, str15, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
|
|
211632
211693
|
var init_generate = __esm({
|
|
211633
211694
|
"src/one-app/generate.ts"() {
|
|
211634
211695
|
init_define_HHP_CATALOG();
|
|
@@ -211752,7 +211813,7 @@ var init_generate = __esm({
|
|
|
211752
211813
|
// `himi_groups_feed` is a newer template screen: a scaffold without it links `himi_groups` (`TEMPLATE_FALLBACKS`), as a page of only this section opens it.
|
|
211753
211814
|
groups_feed_section: { screen: "himi_groups_feed", needsScreen: true },
|
|
211754
211815
|
// Link only when the scaffold has the events screen: without it the link would open nothing, so the section is reported instead.
|
|
211755
|
-
events_carousel_section: { sibling: "events_list_section", screen: "himi_events", needsScreen: true, siblingShowsAll: showsEveryEvent },
|
|
211816
|
+
events_carousel_section: { sibling: "events_list_section", screen: "himi_events", needsScreen: true, params: eventsOpenParams, siblingShowsAll: showsEveryEvent },
|
|
211756
211817
|
// Upcoming sessions of the business (the Bookings widget): the template's agenda screen lists the site's upcoming class and course sessions.
|
|
211757
211818
|
platform_general_upcoming_section: { screen: "himi_agenda", needsScreen: true },
|
|
211758
211819
|
// One event's schedule inline needs `himi_event` for View All to open; without it (or with no event chosen) the section keeps its title and a link to the events screen.
|
|
@@ -211761,7 +211822,6 @@ var init_generate = __esm({
|
|
|
211761
211822
|
stores_products_search_section: { screen: "himi_shop", needsScreen: true },
|
|
211762
211823
|
stores_wishlist_section: { screen: "himi_saved_products", needsScreen: true }
|
|
211763
211824
|
};
|
|
211764
|
-
NO_INLINE_SECTION = "its data has no inline section yet";
|
|
211765
211825
|
BOTTOM_TABS_BEFORE_MORE = 4;
|
|
211766
211826
|
TEMPLATE_VERTICALS = {
|
|
211767
211827
|
platform_general_members_section: "himi_members",
|
|
@@ -211868,6 +211928,9 @@ var init_generate = __esm({
|
|
|
211868
211928
|
services: { file: "services-section", register: "registerServicesSection", capabilities: ["wix_api"] },
|
|
211869
211929
|
// The member's own bookings: the read goes through the same member identity as My Bookings.
|
|
211870
211930
|
upcomingBookings: { file: "upcoming-bookings-section", register: "registerUpcomingBookingsSection", capabilities: ["wix_api"] },
|
|
211931
|
+
// The Agenda inline (week strip, filters, the day's sessions) and the business's next sessions: the Agenda's reads and the member's places.
|
|
211932
|
+
classCalendar: { file: "class-calendar-section", register: "registerClassCalendarSection", capabilities: ["wix_api"] },
|
|
211933
|
+
upcomingSessions: { file: "upcoming-sessions-section", register: "registerUpcomingSessionsSection", capabilities: ["wix_api"] },
|
|
211871
211934
|
// The member's weekly goal, streak and all-time sessions, counted from the same member-scoped bookings (and the same rule) as My Bookings.
|
|
211872
211935
|
performanceTracker: { file: "performance-tracker-section", register: "registerPerformanceTrackerSection", capabilities: ["wix_api"] },
|
|
211873
211936
|
videos: { file: "videos-section", register: "registerVideosSection", capabilities: ["wix_api"] },
|
|
@@ -211900,6 +211963,7 @@ var init_generate = __esm({
|
|
|
211900
211963
|
};
|
|
211901
211964
|
DIRECT_VIDEO_FILE = /\.(?:mp4|m4v|mov|webm|m3u8)(?:[?#]|$)/i;
|
|
211902
211965
|
UNREAD_IMAGE_RATIO = 4 / 3;
|
|
211966
|
+
REPEATER_COLUMNS_MAX = 3;
|
|
211903
211967
|
BUSINESS_CHAT_SCREEN = "himi_business_chat";
|
|
211904
211968
|
SUBSCRIPTIONS_MAX = 5;
|
|
211905
211969
|
selectedPlanIds = (st2) => arr3(st2.selectedPlanIds).filter((v2) => typeof v2 === "string" && !!v2);
|
|
@@ -211915,6 +211979,9 @@ var init_generate = __esm({
|
|
|
211915
211979
|
SHOP_ALL = "all";
|
|
211916
211980
|
SERVICES_INLINE = 6;
|
|
211917
211981
|
UPCOMING_INLINE = 3;
|
|
211982
|
+
CALENDAR_INLINE = 10;
|
|
211983
|
+
UPCOMING_SESSIONS_INLINE = 3;
|
|
211984
|
+
UPCOMING_INTERVALS = /* @__PURE__ */ new Set(["day", "week", "month"]);
|
|
211918
211985
|
HISTORY_INLINE = 1;
|
|
211919
211986
|
PRODUCTS_INLINE = { carousel: 8, grid: 6 };
|
|
211920
211987
|
GROUP_FEED_POSTS_MAX = 20;
|
|
@@ -211928,6 +211995,7 @@ var init_generate = __esm({
|
|
|
211928
211995
|
VIDEOS_INLINE_DEFAULT = 8;
|
|
211929
211996
|
VIDEOS_INLINE_MAX = 20;
|
|
211930
211997
|
WISHLIST_INLINE = 6;
|
|
211998
|
+
EVENTS_RAIL_INLINE = 10;
|
|
211931
211999
|
SOCIAL_NETWORKS = {
|
|
211932
212000
|
instagram: "Instagram",
|
|
211933
212001
|
facebook: "Facebook",
|
|
@@ -212021,32 +212089,61 @@ var init_generate = __esm({
|
|
|
212021
212089
|
if (!/^\w[\w~.-]*(?:\/[\w~./-]+)?$/.test(ref)) return ctx.unsupported(elementId, "media_elements_video_section", `its Wix video reference "${url}" is not a playable URL or a media id`);
|
|
212022
212090
|
url = /\//.test(ref) ? `https://video.wixstatic.com/video/${ref}` : `https://video.wixstatic.com/video/${ref}/file`;
|
|
212023
212091
|
}
|
|
212024
|
-
|
|
212025
|
-
|
|
212026
|
-
|
|
212027
|
-
|
|
212092
|
+
const cover2 = str15(st2.coverImageUrl).trim();
|
|
212093
|
+
const poster = cover2 && webUrl(cover2) ? cover2 : "";
|
|
212094
|
+
if (cover2 && !poster) ctx.gap(elementId, "media_elements_video_section", `its cover image "${cover2}" is not an http(s) URL; the video has no poster and the player shows its own default`);
|
|
212095
|
+
return vstack(`${id}.box`, [node3(id, "Video", {
|
|
212096
|
+
url,
|
|
212097
|
+
...poster ? { poster: ctx.imageUrl(poster) } : {},
|
|
212098
|
+
controls: true,
|
|
212099
|
+
...aspect,
|
|
212100
|
+
loop: !!st2.loop,
|
|
212101
|
+
autoplay: !!st2.autoplay
|
|
212102
|
+
}, { cornerRadius: 8, fillMaxWidth: true, accessibilityLabel: ctx.page.label })], 0, inset(8, 8));
|
|
212103
|
+
},
|
|
212104
|
+
// Image cards, each with a title, a subtitle and the tap the source gave it, in the source's order. The source may lay the texts
|
|
212105
|
+
// over the image (`imageOverlay`); here they sit under it, so the image stays clear and the texts stay readable. A `grid` repeater
|
|
212106
|
+
// keeps its columns, at every width: on a narrow phone the cells shrink, the texts wrap to two lines and the whole card stays the tap.
|
|
212028
212107
|
platform_elements_repeater_section: (id, _s2, st2, _i2, ctx, elementId) => {
|
|
212029
212108
|
const options2 = obj19(st2.imageOptions);
|
|
212109
|
+
const grid = st2.type === "grid";
|
|
212110
|
+
const showText = st2.showText !== false;
|
|
212111
|
+
const align = textAlign(obj19(st2.textOptions).textAlignment);
|
|
212030
212112
|
const gap = Math.min(24, Math.max(4, Number(st2.spaceBetweenItems) || 12));
|
|
212113
|
+
const ratio = sourceRatio(options2.aspectRatio);
|
|
212114
|
+
let unsized = false;
|
|
212031
212115
|
const cards = arr3(st2.items).map(obj19).flatMap((item2, i2) => {
|
|
212032
212116
|
if (item2.isHidden === true) return [];
|
|
212033
212117
|
const title = str15(item2.title).trim();
|
|
212118
|
+
const subtitle = str15(item2.subtitle).trim();
|
|
212034
212119
|
const url = str15(item2.imageUrl);
|
|
212035
|
-
if (!
|
|
212036
|
-
const tap = controlTap(ctx, obj19(item2.actionData), elementId, "platform_elements_repeater_section", `the item "${title || url}"`);
|
|
212120
|
+
if (!url && !(showText && (title || subtitle))) return [];
|
|
212121
|
+
const tap = controlTap(ctx, obj19(item2.action ?? item2.actionData), elementId, "platform_elements_repeater_section", `the item "${title || subtitle || url}"`);
|
|
212037
212122
|
const parts = [];
|
|
212038
|
-
if (url)
|
|
212039
|
-
|
|
212040
|
-
|
|
212041
|
-
|
|
212042
|
-
|
|
212043
|
-
|
|
212044
|
-
|
|
212045
|
-
|
|
212123
|
+
if (url) {
|
|
212124
|
+
unsized ||= ratio === void 0;
|
|
212125
|
+
parts.push(node3(`${id}.i${i2}.img`, "Image", {
|
|
212126
|
+
url: ctx.imageUrl(url),
|
|
212127
|
+
fillWidth: true,
|
|
212128
|
+
aspectRatio: ratio ?? UNREAD_IMAGE_RATIO,
|
|
212129
|
+
contentMode: options2.imageScale === "fit" ? "fit" : "fill",
|
|
212130
|
+
contentDescription: title || ctx.page.label
|
|
212131
|
+
}, typeof options2.cornerRadius === "number" ? { cornerRadius: options2.cornerRadius } : void 0));
|
|
212132
|
+
}
|
|
212133
|
+
const lines2 = grid ? { maxLines: 2 } : {};
|
|
212134
|
+
const texts = [];
|
|
212135
|
+
if (showText && title) texts.push(text10(`${id}.i${i2}.title`, title, "bodyEmphasis", { textAlign: align, ...lines2 }, { fillMaxWidth: true }));
|
|
212136
|
+
if (showText && subtitle) texts.push(text10(`${id}.i${i2}.subtitle`, subtitle, "footnote", { textAlign: align, color: "textSecondary", ...lines2 }, { fillMaxWidth: true }));
|
|
212137
|
+
if (texts.length) parts.push(vstack(`${id}.i${i2}.texts`, texts, 2, { fillMaxWidth: true }));
|
|
212046
212138
|
return [vstack(`${id}.i${i2}`, parts, 8, tap ? { onTap: tap, fillMaxWidth: true } : { fillMaxWidth: true })];
|
|
212047
212139
|
});
|
|
212048
|
-
if (!cards.length) return ctx.unsupported(elementId, "platform_elements_repeater_section", "the repeater has no item with
|
|
212049
|
-
|
|
212140
|
+
if (!cards.length) return ctx.unsupported(elementId, "platform_elements_repeater_section", "the repeater has no item with an image or a text to show");
|
|
212141
|
+
if (unsized) ctx.gap(elementId, "platform_elements_repeater_section", "the source gives the cards' images no proportions; they are shown in a 4:3 box");
|
|
212142
|
+
if (!grid) return vstack(`${id}.box`, cards, gap, inset(8, 8));
|
|
212143
|
+
const asked = countOf2(st2.numberOfColumns) ?? 2;
|
|
212144
|
+
const columns = Math.min(asked, REPEATER_COLUMNS_MAX);
|
|
212145
|
+
if (asked > columns) ctx.gap(elementId, "platform_elements_repeater_section", `the source lays the items in ${asked} columns; a phone shows ${columns}, so the cards stay readable, and a wider screen shows ${asked}`);
|
|
212146
|
+
return vstack(`${id}.box`, [node3(`${id}.grid`, "Grid", { columns, ...asked > columns ? { columnsMedium: asked } : {}, spacing: gap, items: cards }, { fillMaxWidth: true })], 0, inset(8, 8));
|
|
212050
212147
|
},
|
|
212051
212148
|
// The source lays its texts over the picture. They sit on the picture here too, on a plain accent band (a translucent scrim is
|
|
212052
212149
|
// not used: a web renderer paints a band with an opacity above its sibling text) so they read on any photo; the button follows
|
|
@@ -212214,8 +212311,8 @@ var init_generate = __esm({
|
|
|
212214
212311
|
return plansSection(id, s5, index, ctx, { planIds: selectedPlanIds(st2), showBenefits: true, ...order ? { order } : {} });
|
|
212215
212312
|
},
|
|
212216
212313
|
// The site's first Pro Gallery galleries as cover cards (a rail, or full-width cards when the source turns its carousel off), as many as
|
|
212217
|
-
// the source's `maxGalleries`; with exactly one (and the carousel on) the source shows that gallery as a collage, and so does the section. Like the source, which lists a member's non-hidden, non-empty galleries
|
|
212218
|
-
//
|
|
212314
|
+
// the source's `maxGalleries`; with exactly one (and the carousel on) the source shows that gallery as a collage, and so does the section. Like the source, which lists a member's non-hidden, non-empty galleries, the
|
|
212315
|
+
// module reads for a signed-in member only: a visitor gets a sign-in state and a list it cannot read the error state, never "No galleries yet". A card opens the template's gallery screen and View All its galleries screen: a scaffold without either
|
|
212219
212316
|
// keeps the title and a link, as every data section does.
|
|
212220
212317
|
progallery_carousel_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
212221
212318
|
const asked = typeof st2.maxGalleries === "number" && st2.maxGalleries >= 1 ? Math.floor(st2.maxGalleries) : void 0;
|
|
@@ -212275,17 +212372,14 @@ var init_generate = __esm({
|
|
|
212275
212372
|
const children2 = [heading && ctx.hasScreen("himi_member_programs") ? section3 : withoutNode(section3, `${id}.cta`)];
|
|
212276
212373
|
return vstack(`${id}.box`, children2, 0, { onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
212277
212374
|
},
|
|
212278
|
-
// The latest posts as a
|
|
212279
|
-
|
|
212280
|
-
|
|
212281
|
-
|
|
212282
|
-
|
|
212283
|
-
|
|
212284
|
-
|
|
212285
|
-
|
|
212286
|
-
const extras = [display.excerpt === true && "the excerpt", display.author === true && "the author", display.likes === true && "the likes", display.times_viewed === true && "the views", display.comments === true && "the comments"].filter(Boolean);
|
|
212287
|
-
return extras.length ? [`the source's cards also show ${extras.join(", ")}; the carousel shows the cover, the title and the time`] : [];
|
|
212288
|
-
}),
|
|
212375
|
+
// The latest posts as a rail of cards, the title over the cover (the definition is the "full" layout).
|
|
212376
|
+
newBlog_postlist_carousel_full_section: blogCarousel("newBlog_postlist_carousel_full_section", "full"),
|
|
212377
|
+
// The same rail in the layout the section names: "full" (title over the cover) or "classic" (cover, then title, author and counts).
|
|
212378
|
+
newBlog_postlist_carousel_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
212379
|
+
const type2 = "newBlog_postlist_carousel_section";
|
|
212380
|
+
if (st2.carouselLayout !== void 0 && st2.carouselLayout !== "full" && st2.carouselLayout !== "classic") ctx.gap(sectionId, type2, `carousel layout "${String(st2.carouselLayout)}" is shown as the Classic carousel`);
|
|
212381
|
+
return blogCarousel(type2, st2.carouselLayout === "full" ? "full" : "classic")(id, s5, st2, index, ctx, sectionId);
|
|
212382
|
+
},
|
|
212289
212383
|
// The blog's categories as an inline vertical list. Each row opens himi_blog, whose chips are the same categories: the template screen
|
|
212290
212384
|
// does not open on a given category, so that difference is reported. The source's image and description have no row field here.
|
|
212291
212385
|
newBlog_category_list_vertical_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
@@ -212642,24 +212736,56 @@ var init_generate = __esm({
|
|
|
212642
212736
|
children2.push(...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
212643
212737
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
212644
212738
|
},
|
|
212645
|
-
// The
|
|
212646
|
-
|
|
212647
|
-
// The source
|
|
212648
|
-
//
|
|
212649
|
-
|
|
212739
|
+
// The Agenda inline, as the source section draws it: its title with See All to the Agenda, the week strip (pages by week, opens into
|
|
212740
|
+
// the month), filter chips, and the sessions of the selected day (or the next day with one), each with the one control the member can
|
|
212741
|
+
// use. The source section has no settings of its own. Booking and the member's sheet (cancel, leave, add to calendar) stay on the
|
|
212742
|
+
// screens that own them: Book opens Choose Time on the session, and the rest open the class on it.
|
|
212743
|
+
bookings_agenda_section: (id, s5, _st, index, ctx, sectionId) => {
|
|
212744
|
+
const type2 = "bookings_agenda_section";
|
|
212745
|
+
if (!ctx.hasScreen("himi_service")) return ctx.unsupported(sectionId, type2, "this scaffold has no himi_service screen for a session to open");
|
|
212746
|
+
const hasAgenda = ctx.hasScreen("himi_agenda");
|
|
212747
|
+
const timeScreen = ctx.hasScreen("himi_time") ? "himi_time" : "himi_service";
|
|
212748
|
+
ctx.gap(sectionId, type2, `the section shows the first ${CALENDAR_INLINE} sessions of the selected day (or the next day with one)${hasAgenda ? `, and See All opens the Agenda (the source's "Upcoming Classes" link)` : ""}; its filters are chips (All, the member's Booked sessions, each class), not the source's filter sheet; Booked and On waitlist open the class on the session, where the source opens a sheet to cancel or add it to the calendar (the Agenda keeps that sheet)`);
|
|
212749
|
+
const svc = ctx.uses("classCalendar", `classCalendar${index}`, { limit: CALENDAR_INLINE });
|
|
212750
|
+
const title = s5.showTitle === true ? str15(s5.title).trim() : "";
|
|
212751
|
+
const firstWeekday = ctx.firstWeekday ?? "0";
|
|
212752
|
+
let node4 = withProps(ctx.recipe("class-calendar", { svc, id, title, seeAllLabel: "See All", seeAllScreen: "himi_agenda", timeScreen, serviceScreen: "himi_service" }), `${id}.week`, { firstWeekday: Number(firstWeekday) });
|
|
212753
|
+
node4 = withoutNode(node4, title ? `${id}.headSpacer` : `${id}.title`);
|
|
212754
|
+
if (!hasAgenda) node4 = withoutNode(node4, `${id}.all`);
|
|
212755
|
+
return vstack(`${id}.box`, [node4, ...ctx.optionalRecipe("section-error", { svc, id, action: "retry" })], 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: { firstWeekday } } });
|
|
212756
|
+
},
|
|
212757
|
+
// The source strip is the Bookings member widget: the business's next sessions in its `interval` window, with the member's own place
|
|
212758
|
+
// (Booked, On waitlist). A visitor sees the same sessions without a badge; a row opens the class on that session, View All the Agenda.
|
|
212759
|
+
platform_general_upcoming_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
212760
|
+
const type2 = "platform_general_upcoming_section";
|
|
212761
|
+
if (!ctx.hasScreen("himi_service")) return ctx.unsupported(sectionId, type2, "this scaffold has no himi_service screen for a session to open");
|
|
212762
|
+
const authored2 = str15(st2.interval).trim();
|
|
212763
|
+
const interval = UPCOMING_INTERVALS.has(authored2) ? authored2 : "month";
|
|
212764
|
+
if (authored2 && authored2 !== interval) ctx.gap(sectionId, type2, `its time window ${JSON.stringify(authored2)} is not one this generator knows; the section lists the sessions of the coming month`);
|
|
212765
|
+
const hasAgenda = ctx.hasScreen("himi_agenda");
|
|
212766
|
+
ctx.gap(sectionId, type2, `the section lists the business's next ${UPCOMING_SESSIONS_INLINE} class and course sessions in its window (the Agenda's read), with the member's Booked or On waitlist badge; a row opens the class on its session${hasAgenda ? ", and View All opens the Agenda" : ""}`);
|
|
212767
|
+
const svc = ctx.uses("upcomingSessions", `upcomingSessions${index}`, { limit: UPCOMING_SESSIONS_INLINE, interval });
|
|
212768
|
+
const title = str15(s5.title).trim();
|
|
212769
|
+
let node4 = ctx.recipe("upcoming-sessions", { svc, id, title, seeAllLabel: "View All", seeAllScreen: "himi_agenda", serviceScreen: "himi_service" });
|
|
212770
|
+
node4 = withoutNode(node4, title ? `${id}.headSpacer` : `${id}.title`);
|
|
212771
|
+
if (!hasAgenda) node4 = withoutNode(node4, `${id}.all`);
|
|
212772
|
+
return vstack(`${id}.box`, [node4, ...ctx.optionalRecipe("section-error", { svc, id, action: "load" })], 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
212773
|
+
},
|
|
212650
212774
|
// Shared galleries are the members' Shared Gallery, a different data source from the Pro Gallery list the shared loader reads (the
|
|
212651
212775
|
// migration guide says not to substitute it), so the section is not shown inline: it keeps its title and links to the galleries screen.
|
|
212652
212776
|
shared_gallery_list_section: (_id, _s2, _st, _i2, ctx, elementId) => ctx.unsupported(elementId, "shared_gallery_list_section", "the source's shared galleries are the members' Shared Gallery, a different data source from the site's Pro Gallery, so they are not shown inline; the link opens the site's galleries, not the members' shared ones"),
|
|
212653
|
-
// The events carousel
|
|
212654
|
-
//
|
|
212655
|
-
//
|
|
212777
|
+
// The events carousel: the shared events cards in a rail that scrolls sideways, limited to the source's chosen categories or events as the
|
|
212778
|
+
// list section is. `filter` is 0 for every event, 1 by category and "manual" for chosen events (read off the 45 carousels collected from
|
|
212779
|
+
// the top apps); the ids decide the selection, as for the list, so `filter` only marks a selection the source made without choosing anything.
|
|
212656
212780
|
events_carousel_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
212657
212781
|
const type2 = "events_carousel_section";
|
|
212658
|
-
|
|
212659
|
-
|
|
212660
|
-
if (st2.filter !== void 0 && st2.filter !== 0 && st2.filter !== 1) return ctx.unsupported(sectionId, type2, `its event filter ${JSON.stringify(st2.filter)} is not one this generator knows`);
|
|
212661
|
-
ctx.
|
|
212662
|
-
if (st2.filter === 1) ctx.gap(sectionId, type2, "the source filters by category but chose none; the section shows every upcoming event");
|
|
212782
|
+
const { categoryIds, eventIds } = eventsSelection(st2);
|
|
212783
|
+
const every = showsEveryEvent(st2);
|
|
212784
|
+
if (st2.filter !== void 0 && st2.filter !== 0 && st2.filter !== 1 && st2.filter !== "manual") return ctx.unsupported(sectionId, type2, `its event filter ${JSON.stringify(st2.filter)} is not one this generator knows`);
|
|
212785
|
+
if (st2.filter === "manual" && every) return ctx.unsupported(sectionId, type2, "the source shows chosen events but chose none, so there is nothing to show");
|
|
212786
|
+
if (st2.filter === 1 && every) ctx.gap(sectionId, type2, "the source filters by category but chose none; the section shows every upcoming event");
|
|
212787
|
+
if (categoryIds.length && eventIds.length) ctx.gap(sectionId, type2, "the source names both categories and events; the section shows the events that are in one of the categories and are also among the chosen ones");
|
|
212788
|
+
ctx.gap(sectionId, type2, `the rail shows at most the next ${EVENTS_RAIL_INLINE} upcoming events`);
|
|
212663
212789
|
const card2 = obj19(st2.cardSettings);
|
|
212664
212790
|
const hidden = [["imageVisible", "image"], ["dateVisible", "date"], ["locationVisible", "location"]].filter(([key4]) => card2[key4] === false).map(([, name]) => name);
|
|
212665
212791
|
if (hidden.length) ctx.gap(sectionId, type2, `the source hides the event's ${hidden.join(", ")}; the card shows ${hidden.length > 1 ? "them" : "it"}`);
|
|
@@ -212668,7 +212794,7 @@ var init_generate = __esm({
|
|
|
212668
212794
|
if (custom.length) ctx.gap(sectionId, type2, `the source sets its own button label${custom.length > 1 && custom[0] !== custom[1] ? "s" : ""} ${[...new Set(custom)].map((label4) => `"${label4}"`).join(" and ")}; the card shows its own registration button label`);
|
|
212669
212795
|
const missing4 = [["guestsVisible", "guest avatars"], ["membershipOfferVisible", "the membership offer"]].filter(([key4]) => card2[key4] === true).map(([, name]) => name);
|
|
212670
212796
|
if (missing4.length) ctx.gap(sectionId, type2, `the source card shows ${missing4.join(" and ")}; the card has ${missing4.length > 1 ? "neither" : "none"}`);
|
|
212671
|
-
return eventsInline(id, s5, st2, index, ctx);
|
|
212797
|
+
return eventsInline(id, s5, st2, index, ctx, true);
|
|
212672
212798
|
},
|
|
212673
212799
|
// Links to the business's networks. Himi has no brand icons, so each link is a button named for its network (a host name for an unknown
|
|
212674
212800
|
// one); a link that is not an http(s) URL is left out and reported, never opened as something else.
|