@wix/himalaya-cli 0.2009.0 → 0.2010.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +138 -36
- package/guides/one-app-section-mappings.md +1 -1
- package/guides/one-app-to-himi-app.md +3 -0
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/beauty-salon/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/branded-lite/l10n/ar.json +20 -0
- package/templates/branded-lite/l10n/cs.json +20 -0
- package/templates/branded-lite/l10n/da.json +20 -0
- package/templates/branded-lite/l10n/de.json +20 -0
- package/templates/branded-lite/l10n/el.json +20 -0
- package/templates/branded-lite/l10n/es.json +20 -0
- package/templates/branded-lite/l10n/fi.json +20 -0
- package/templates/branded-lite/l10n/fr.json +20 -0
- package/templates/branded-lite/l10n/he.json +16 -0
- package/templates/branded-lite/l10n/hu.json +20 -0
- package/templates/branded-lite/l10n/id.json +20 -0
- package/templates/branded-lite/l10n/it.json +20 -0
- package/templates/branded-lite/l10n/ja.json +20 -0
- package/templates/branded-lite/l10n/ko.json +20 -0
- package/templates/branded-lite/l10n/lt.json +20 -0
- package/templates/branded-lite/l10n/nl.json +20 -0
- package/templates/branded-lite/l10n/no.json +20 -0
- package/templates/branded-lite/l10n/pl.json +20 -0
- package/templates/branded-lite/l10n/pt.json +20 -0
- package/templates/branded-lite/l10n/ru.json +20 -0
- package/templates/branded-lite/l10n/sv.json +20 -0
- package/templates/branded-lite/l10n/th.json +20 -0
- package/templates/branded-lite/l10n/tr.json +20 -0
- package/templates/branded-lite/l10n/uk.json +20 -0
- package/templates/branded-lite/l10n/vi.json +20 -0
- package/templates/branded-lite/l10n/zh.json +20 -0
- package/templates/branded-lite/recipes/members-carousel.json +55 -3
- package/templates/branded-lite/recipes/plans-card.json +630 -3
- package/templates/branded-lite/recipes/products-carousel.json +74 -10
- package/templates/branded-lite/recipes/products-grid.json +74 -10
- package/templates/branded-lite/recipes/programs-filters.json +51 -2
- package/templates/branded-lite/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/branded-lite/tier5-src/_shared/member-row-extras.ts +18 -17
- package/templates/branded-lite/tier5-src/_shared/members-directory-view.ts +12 -0
- package/templates/branded-lite/tier5-src/_shared/members-directory.ts +26 -13
- package/templates/branded-lite/tier5-src/_shared/plan-facts.ts +15 -6
- package/templates/branded-lite/tier5-src/_shared/plans-section.ts +32 -6
- package/templates/branded-lite/tier5-src/_shared/products-section.ts +5 -0
- package/templates/branded-lite/tier5-src/_shared/programs-section.ts +19 -16
- package/templates/branded-lite/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/gym-fitness/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/portfolio-creative/tier5-src/_shared/store-ribbon.ts +11 -0
- package/templates/retail-store/tier5-src/_shared/himi-store-facets.ts +2 -7
- package/templates/retail-store/tier5-src/_shared/store-ribbon.ts +11 -0
package/dist/cli.mjs
CHANGED
|
@@ -20178,7 +20178,6 @@ function buttonVariant(style) {
|
|
|
20178
20178
|
var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_SIZES, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty2, own2, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
|
|
20179
20179
|
var init_tokens = __esm({
|
|
20180
20180
|
"../../core/ts/src/tokens.ts"() {
|
|
20181
|
-
"use strict";
|
|
20182
20181
|
init_define_HHP_CATALOG();
|
|
20183
20182
|
SYSTEM_FONT_FAMILY = "$system";
|
|
20184
20183
|
TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
|
|
@@ -47235,7 +47234,6 @@ function shouldRevealError(args) {
|
|
|
47235
47234
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE, AUTHORED_PATTERN_LIMIT, authoredPatterns;
|
|
47236
47235
|
var init_validation = __esm({
|
|
47237
47236
|
"../../core/ts/src/validation.ts"() {
|
|
47238
|
-
"use strict";
|
|
47239
47237
|
init_define_HHP_CATALOG();
|
|
47240
47238
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
47241
47239
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
@@ -213062,35 +213060,72 @@ function withProps(node4, id, props2) {
|
|
|
213062
213060
|
}
|
|
213063
213061
|
function plansSection(id, s5, index, ctx, options2) {
|
|
213064
213062
|
if (!ctx.hasScreen("himi_plan")) throw new RecipeError("this scaffold has no himi_plan screen for a plan card to open");
|
|
213065
|
-
const
|
|
213063
|
+
const { detailsLabel, ...load8 } = options2;
|
|
213064
|
+
const svc = ctx.uses("plans", `plans${index}`, { ...load8 });
|
|
213066
213065
|
const children2 = [];
|
|
213067
213066
|
const title = str16(s5.title).trim();
|
|
213068
213067
|
if (s5.showTitle === true && title) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
|
|
213069
|
-
children2.push(ctx.recipe("plans-card", { svc, id, detailScreen: "himi_plan", detailsLabel:
|
|
213070
|
-
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params:
|
|
213068
|
+
children2.push(ctx.recipe("plans-card", { svc, id, detailScreen: "himi_plan", detailsLabel, benefitsLabel: PLAN_BENEFITS_LABEL }), ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
213069
|
+
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: ctx.workerCopy(MODULES.plans.file) } });
|
|
213071
213070
|
}
|
|
213072
213071
|
function textAlign(alignment) {
|
|
213073
213072
|
return alignment === "center" ? "center" : alignment === "right" || alignment === "end" ? "trailing" : "leading";
|
|
213074
213073
|
}
|
|
213074
|
+
function mergedCopyPack(packs) {
|
|
213075
|
+
const out2 = {};
|
|
213076
|
+
const text32 = {};
|
|
213077
|
+
for (const pack of packs) {
|
|
213078
|
+
for (const [key4, value2] of Object.entries(pack)) {
|
|
213079
|
+
if (key4 !== "textCopy") {
|
|
213080
|
+
if (!(key4 in out2)) out2[key4] = value2;
|
|
213081
|
+
continue;
|
|
213082
|
+
}
|
|
213083
|
+
try {
|
|
213084
|
+
Object.assign(text32, { ...JSON.parse(value2), ...text32 });
|
|
213085
|
+
} catch {
|
|
213086
|
+
}
|
|
213087
|
+
}
|
|
213088
|
+
}
|
|
213089
|
+
if (Object.keys(text32).length) out2.textCopy = JSON.stringify(text32);
|
|
213090
|
+
return out2;
|
|
213091
|
+
}
|
|
213092
|
+
function bannerTextStyle(item2) {
|
|
213093
|
+
const style = str16(item2.fontStyle).trim();
|
|
213094
|
+
if (/^heading(XL|XXL)/i.test(style)) return "title1";
|
|
213095
|
+
if (/^headingL/i.test(style)) return "title2";
|
|
213096
|
+
if (/^heading/i.test(style)) return "title3";
|
|
213097
|
+
if (/^body/i.test(style)) return /bold/i.test(style) ? "bodyEmphasis" : /small/i.test(style) ? "footnote" : "body";
|
|
213098
|
+
return item2.type === "title" ? "title3" : "body";
|
|
213099
|
+
}
|
|
213100
|
+
function bannerTextColor(color) {
|
|
213101
|
+
const match = /^#?([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(str16(color).trim());
|
|
213102
|
+
if (!match || /^[0-9a-f]{6}00$/i.test(match[1])) return "";
|
|
213103
|
+
const hex2 = match[1].length === 3 ? match[1].split("").map((c2) => c2 + c2).join("") : match[1].slice(0, 6);
|
|
213104
|
+
return `#${hex2.toLowerCase()}`;
|
|
213105
|
+
}
|
|
213106
|
+
function bannerText(id, value2, style, align, color) {
|
|
213107
|
+
const words = text10(id, value2, style, { textAlign: align, color: "textOnAccent" }, { fillMaxWidth: true });
|
|
213108
|
+
return color ? vstack(`${id}.scope`, [words], 0, { fillMaxWidth: true, theme: { colors: { textOnAccent: color } } }, align) : words;
|
|
213109
|
+
}
|
|
213075
213110
|
function weekFirstDayOf(locale) {
|
|
213076
213111
|
return locale ? String(firstWeekdayOf(locale)) : void 0;
|
|
213077
213112
|
}
|
|
213078
213113
|
function membersDirectory(id, s5, index, ctx) {
|
|
213079
213114
|
const svc = ctx.uses("members", `members${index}`, { showRole: true, showActivity: true, showBadges: true, showFollow: true, letterBands: true });
|
|
213080
|
-
return composed2(id, s5, svc, ctx.recipeNodes("members-list", { svc, id, detailScreen: "himi_member" }));
|
|
213115
|
+
return composed2(id, s5, svc, ctx.recipeNodes("members-list", { svc, id, detailScreen: "himi_member" }), ctx.workerCopy(MODULES.members.file));
|
|
213081
213116
|
}
|
|
213082
|
-
function loadOnAppear(nodes3, svc) {
|
|
213117
|
+
function loadOnAppear(nodes3, svc, params = {}) {
|
|
213083
213118
|
const at2 = nodes3.findIndex((n2) => !obj20(n2.modifiers).hiddenPath);
|
|
213084
213119
|
if (at2 < 0) return false;
|
|
213085
|
-
nodes3[at2] = { ...nodes3[at2], modifiers: { ...obj20(nodes3[at2].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params
|
|
213120
|
+
nodes3[at2] = { ...nodes3[at2], modifiers: { ...obj20(nodes3[at2].modifiers), onAppear: { actionId: `tier5.${svc}.load`, params } } };
|
|
213086
213121
|
return true;
|
|
213087
213122
|
}
|
|
213088
|
-
function composed2(id, s5, svc, nodes3) {
|
|
213123
|
+
function composed2(id, s5, svc, nodes3, params = {}) {
|
|
213089
213124
|
const out2 = [];
|
|
213090
213125
|
const title = str16(s5.title).trim();
|
|
213091
213126
|
if (s5.showTitle === true && title) out2.push(vstack(`${id}.heading`, [text10(`${id}.title`, title, "title3")], 0, inset(8, 4)));
|
|
213092
|
-
if (loadOnAppear(nodes3, svc)) out2.push(...nodes3);
|
|
213093
|
-
else out2.push(vstack(`${id}.box`, nodes3, 0, { onAppear: { actionId: `tier5.${svc}.load`, params
|
|
213127
|
+
if (loadOnAppear(nodes3, svc, params)) out2.push(...nodes3);
|
|
213128
|
+
else out2.push(vstack(`${id}.box`, nodes3, 0, { onAppear: { actionId: `tier5.${svc}.load`, params } }));
|
|
213094
213129
|
return out2;
|
|
213095
213130
|
}
|
|
213096
213131
|
function programsLimit(section3, settings) {
|
|
@@ -213601,6 +213636,7 @@ function generateScreens(input) {
|
|
|
213601
213636
|
const unmapped = [];
|
|
213602
213637
|
const widgets = [];
|
|
213603
213638
|
let widgetsOmitted = false;
|
|
213639
|
+
const pageCopy = { modules: /* @__PURE__ */ new Set(), packs: [] };
|
|
213604
213640
|
const ctx = {
|
|
213605
213641
|
raw,
|
|
213606
213642
|
business: obj20(input.business),
|
|
@@ -213608,7 +213644,14 @@ function generateScreens(input) {
|
|
|
213608
213644
|
page: { label: label4, screenId, layoutItemId },
|
|
213609
213645
|
taken: taken2,
|
|
213610
213646
|
hasScreen: (id) => !input.takenScreenIds || input.takenScreenIds.has(id),
|
|
213611
|
-
|
|
213647
|
+
// Every section on a page loads into ONE page worker, and its copy stash keeps only the last pack a load delivered. So each
|
|
213648
|
+
// copy-carrying load gets the same pack, the union of every module the page's sections read, filled in once the page is built.
|
|
213649
|
+
workerCopy: (module) => {
|
|
213650
|
+
pageCopy.modules.add(module);
|
|
213651
|
+
const pack = {};
|
|
213652
|
+
pageCopy.packs.push(pack);
|
|
213653
|
+
return pack;
|
|
213654
|
+
},
|
|
213612
213655
|
action: (action) => controlAction(input, screenId, action, () => {
|
|
213613
213656
|
if (input.hasModule && !input.hasModule(MODULES.memberAction.file)) return false;
|
|
213614
213657
|
const svc = memberActionService(screenId);
|
|
@@ -213738,6 +213781,10 @@ function generateScreens(input) {
|
|
|
213738
213781
|
extras.length = extra;
|
|
213739
213782
|
}
|
|
213740
213783
|
});
|
|
213784
|
+
if (pageCopy.packs.length) {
|
|
213785
|
+
const pack = mergedCopyPack([...pageCopy.modules].sort().map((module) => input.workerCopy?.(module) ?? {}));
|
|
213786
|
+
for (const each of pageCopy.packs) Object.assign(each, pack);
|
|
213787
|
+
}
|
|
213741
213788
|
out2.unmapped.push(...unmapped);
|
|
213742
213789
|
const keptForWidgets = !children2.length && widgetsOmitted && !unmapped.length && elements2.length > 0 && elements2.every((element) => str16(obj20(sections2[str16(element.elementId)]).sectionDefinitionId) === CUSTOM_WIDGET_SECTION);
|
|
213743
213790
|
if (children2.length || keptForWidgets) out2.customWidgets.push(...widgets);
|
|
@@ -214115,7 +214162,7 @@ function addNavigation(out2, plan, taken2, pageIconOf) {
|
|
|
214115
214162
|
out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
|
|
214116
214163
|
out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
|
|
214117
214164
|
}
|
|
214118
|
-
var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, REPEATER_ON_IMAGE_INSET, REPEATER_ON_SHADE_THEME, REPEATER_ON_BARE_IMAGE_THEME, REPEATER_IMAGE_SHADE, 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;
|
|
214165
|
+
var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj20, arr4, str16, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, REPEATER_ON_IMAGE_INSET, REPEATER_ON_SHADE_THEME, REPEATER_ON_BARE_IMAGE_THEME, REPEATER_IMAGE_SHADE, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, PLAN_SELECT_LABEL, PLAN_DETAILS_LABEL, PLAN_BENEFITS_LABEL, 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;
|
|
214119
214166
|
var init_generate = __esm({
|
|
214120
214167
|
"src/one-app/generate.ts"() {
|
|
214121
214168
|
init_define_HHP_CATALOG();
|
|
@@ -214400,6 +214447,9 @@ var init_generate = __esm({
|
|
|
214400
214447
|
BUSINESS_CHAT_SCREEN = "himi_business_chat";
|
|
214401
214448
|
SUBSCRIPTIONS_MAX = 5;
|
|
214402
214449
|
selectedPlanIds = (st2) => arr4(st2.selectedPlanIds).filter((v2) => typeof v2 === "string" && !!v2);
|
|
214450
|
+
PLAN_SELECT_LABEL = "Select";
|
|
214451
|
+
PLAN_DETAILS_LABEL = "See Details";
|
|
214452
|
+
PLAN_BENEFITS_LABEL = "Show Benefits";
|
|
214403
214453
|
MEMBERS_RAIL = 10;
|
|
214404
214454
|
PROGRAMS_DEFAULT_LIMIT = 2;
|
|
214405
214455
|
PROGRAMS_INLINE_MAX = 20;
|
|
@@ -214596,9 +214646,9 @@ var init_generate = __esm({
|
|
|
214596
214646
|
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}`);
|
|
214597
214647
|
return vstack(`${id}.box`, [node3(`${id}.grid`, "Grid", { columns, ...asked > columns ? { columnsMedium: asked } : {}, spacing: gap, items: cards }, { fillMaxWidth: true })], 0, inset(8, 8));
|
|
214598
214648
|
},
|
|
214599
|
-
// The source lays its texts
|
|
214600
|
-
//
|
|
214601
|
-
// them
|
|
214649
|
+
// The source lays its texts and its button straight on the picture, where it places them (`verticalAlign`, `horizontalAlign`), in
|
|
214650
|
+
// the colors and type sizes it authored, over the picture in its own crop (`aspectRatio`, `cornerRadius`). They sit there here too,
|
|
214651
|
+
// with no panel behind them: the source draws none. With no picture the texts and the button simply stack.
|
|
214602
214652
|
platform_elements_interactive_banner_section: (id, _s2, st2, _i2, ctx, elementId) => {
|
|
214603
214653
|
const url = str16(st2.imageUri);
|
|
214604
214654
|
const tap = controlTap(ctx, obj20(st2.action), elementId, "platform_elements_interactive_banner_section", "the banner");
|
|
@@ -214617,16 +214667,18 @@ var init_generate = __esm({
|
|
|
214617
214667
|
if (item2.type === "button") {
|
|
214618
214668
|
if (tap) buttons.push(node3(`${id}.b${i2}`, "Button", { title: str16(item2.text).trim(), style: "primary", size: "md", fullWidth: false, action: tap }));
|
|
214619
214669
|
else ctx.gap(elementId, "platform_elements_interactive_banner_section", `the banner button "${str16(item2.text).trim()}" is left out: it has no action the app can run`);
|
|
214620
|
-
} else texts.push(
|
|
214670
|
+
} else if (picture) texts.push(bannerText(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), align, bannerTextColor(item2.color)));
|
|
214671
|
+
else texts.push(text10(`${id}.t${i2}`, str16(item2.text).trim(), bannerTextStyle(item2), { textAlign: align }, { fillMaxWidth: true }));
|
|
214621
214672
|
});
|
|
214622
214673
|
const tapped = tap ? { onTap: tap } : {};
|
|
214623
214674
|
if (!picture) {
|
|
214624
214675
|
const parts = [...texts, ...buttons];
|
|
214625
214676
|
return parts.length ? vstack(`${id}.box`, parts, 8, { ...inset(8, 8), ...tapped }, align === "center" ? "center" : "leading") : null;
|
|
214626
214677
|
}
|
|
214627
|
-
const
|
|
214628
|
-
const over = vstack(`${id}.over`, [...
|
|
214629
|
-
|
|
214678
|
+
const words = texts.length ? [vstack(`${id}.texts`, texts, 4, { fillMaxWidth: true }, align)] : [];
|
|
214679
|
+
const over = vstack(`${id}.over`, [...words, ...buttons], 12, { fillMaxWidth: true, padding: { leading: 16, trailing: 16, top: 16, bottom: 16 } }, align);
|
|
214680
|
+
const vertical = st2.verticalAlign === "top" || st2.verticalAlign === "bottom" ? { verticalAlignment: st2.verticalAlign } : {};
|
|
214681
|
+
return vstack(`${id}.box`, [node3(`${id}.stack`, "ZStack", { alignment: align, ...vertical, children: [picture, over] }, { fillMaxWidth: true })], 0, { ...inset(8, 8), ...tapped });
|
|
214630
214682
|
},
|
|
214631
214683
|
// A web page inside the screen. The source sizes it to its content; a fixed height is the nearest fixed equivalent.
|
|
214632
214684
|
platform_elements_web_view_section: (id, _s2, st2, _i2, ctx, elementId) => {
|
|
@@ -214761,17 +214813,26 @@ var init_generate = __esm({
|
|
|
214761
214813
|
children2.push(list5, ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
214762
214814
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
214763
214815
|
},
|
|
214764
|
-
// The selected plans as cards: name, pitch, price, validity,
|
|
214765
|
-
// A scaffold without the plans recipe keeps the title and a link to the template's plans screen, as every data
|
|
214766
|
-
|
|
214816
|
+
// The selected plans as cards: name, pitch, price, validity, the One App's "See Details" button and the benefits list (unless the
|
|
214817
|
+
// source hides it). A scaffold without the plans recipe keeps the title and a link to the template's plans screen, as every data
|
|
214818
|
+
// section does.
|
|
214819
|
+
memberships_plan_cards_carousel: (id, s5, st2, index, ctx) => plansSection(id, s5, index, ctx, { planIds: selectedPlanIds(st2), showBenefits: st2.shouldDisplayBenefitsList !== false, detailsLabel: PLAN_DETAILS_LABEL }),
|
|
214767
214820
|
// The paid-plans section is the same cards over the site's plans: the chosen ones in the source's order, else every plan in the
|
|
214768
|
-
// source's sorting
|
|
214821
|
+
// source's sorting, with the One App's "Select" button. Its default benefits layout ("expand", also when the source names none) folds
|
|
214822
|
+
// the benefits under a collapsed "Show Benefits" disclosure; any other layout lists them and is reported.
|
|
214769
214823
|
platform_paid_plans_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
214770
214824
|
const sorting = str16(st2.sorting).trim(), layout2 = str16(st2.benefitsLayoutType).trim();
|
|
214771
214825
|
const order = sorting === "oldest-first" || sorting === "newest-first" ? sorting : void 0;
|
|
214772
214826
|
if (sorting && !order) ctx.gap(sectionId, "platform_paid_plans_section", `the source sorts its plans "${sorting}"; the section shows them in the site's order`);
|
|
214773
|
-
|
|
214774
|
-
|
|
214827
|
+
const folded = !layout2 || layout2 === "expand";
|
|
214828
|
+
if (!folded) ctx.gap(sectionId, "platform_paid_plans_section", `the source lays its plan benefits out as "${layout2}"; the cards list every benefit`);
|
|
214829
|
+
return plansSection(id, s5, index, ctx, {
|
|
214830
|
+
planIds: selectedPlanIds(st2),
|
|
214831
|
+
showBenefits: true,
|
|
214832
|
+
...order ? { order } : {},
|
|
214833
|
+
...folded ? { benefits: "disclosure" } : {},
|
|
214834
|
+
detailsLabel: PLAN_SELECT_LABEL
|
|
214835
|
+
});
|
|
214775
214836
|
},
|
|
214776
214837
|
// 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
|
|
214777
214838
|
// 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
|
|
@@ -214954,12 +215015,16 @@ var init_generate = __esm({
|
|
|
214954
215015
|
ctx.gap(sectionId, type2, `the section shows the member's points and tier; the points' expiry and the "Rewards available (N)" line are not shown (the Rewards screen shows them)`);
|
|
214955
215016
|
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
|
|
214956
215017
|
},
|
|
214957
|
-
|
|
215018
|
+
// The selected Pages document inline, under the section's own heading when the source shows one ("Studio guide"). A section whose
|
|
215019
|
+
// heading is off or empty gets none: the document's text is never given a title it was not authored with.
|
|
215020
|
+
pages_section: (id, s5, _st, index, ctx, elementId) => {
|
|
214958
215021
|
const placement = ctx.placements.get(`${ctx.page.layoutItemId}:${elementId}:${index}`);
|
|
214959
215022
|
if (placement?.state === "ready" && placement.component) {
|
|
214960
215023
|
const left = arr4(placement.gaps).map(str16).filter(Boolean);
|
|
214961
215024
|
if (left.length) ctx.gap(elementId, "pages_section", `the Pages document has content the section cannot show (${left.join(", ")}); its text and images are shown without it`);
|
|
214962
|
-
|
|
215025
|
+
const title = str16(s5.title).trim();
|
|
215026
|
+
const heading = s5.showTitle === true && title ? [text10(`${id}.title`, title, "title3", {}, { fillMaxWidth: true })] : [];
|
|
215027
|
+
return vstack(`${id}.box`, [...heading, placement.component], heading.length ? 8 : 0, inset(8, 8));
|
|
214963
215028
|
}
|
|
214964
215029
|
return ctx.unsupported(elementId, "pages_section", placement ? `its Pages document is not ready in pages-content.json (state "${str16(placement.state)}")` : "its Pages document is not in pages-content.json: re-run `himi one-app migrate` to collect it");
|
|
214965
215030
|
},
|
|
@@ -215069,15 +215134,20 @@ var init_generate = __esm({
|
|
|
215069
215134
|
...categoryIds.length ? { categoryIds } : {}
|
|
215070
215135
|
});
|
|
215071
215136
|
const card2 = ctx.recipe("programs-card", { svc, id, detailScreen: "himi_program" });
|
|
215072
|
-
|
|
215137
|
+
let filterNodes = filters.status || filters.category ? ctx.optionalRecipe("programs-filters", {
|
|
215073
215138
|
svc,
|
|
215074
215139
|
id,
|
|
215075
215140
|
statusLabel: "Show programs",
|
|
215076
215141
|
categoryLabel: "Filter by category",
|
|
215077
215142
|
allProgramsLabel: "All programs",
|
|
215078
215143
|
joinedLabel: "Programs I joined",
|
|
215079
|
-
allCategoriesLabel: "All categories"
|
|
215144
|
+
allCategoriesLabel: "All categories",
|
|
215145
|
+
signInScreen: "himi_sign_in"
|
|
215080
215146
|
}) : [];
|
|
215147
|
+
if (filterNodes.length && filters.status && !ctx.hasScreen("himi_sign_in")) {
|
|
215148
|
+
filterNodes = filterNodes.map((n2) => withoutNode(n2, `${id}.signin.button`));
|
|
215149
|
+
ctx.gap(sectionId, "achievements_list_section", 'a guest on "Programs I joined" is asked to sign in; this scaffold has no himi_sign_in screen, so the prompt has no Sign in button');
|
|
215150
|
+
}
|
|
215081
215151
|
if ((filters.status || filters.category) && !filterNodes.length) {
|
|
215082
215152
|
ctx.gap(sectionId, "achievements_list_section", "the source shows category and participant-status filters; this scaffold ships no programs-filters recipe, so the list has no filter controls");
|
|
215083
215153
|
}
|
|
@@ -215101,19 +215171,26 @@ var init_generate = __esm({
|
|
|
215101
215171
|
if (show2 && show2 !== "all") return ctx.unsupported(sectionId, "platform_general_members_section", `its members filter ${JSON.stringify(show2)} is not one this generator knows`);
|
|
215102
215172
|
return membersDirectory(id, s5, index, ctx);
|
|
215103
215173
|
},
|
|
215104
|
-
// The members rail: avatar cards from the members directory module in rail mode
|
|
215105
|
-
//
|
|
215174
|
+
// The members rail: avatar cards from the members directory module in rail mode, each with the member's presence line ("Active now")
|
|
215175
|
+
// and the directory's Follow (a visitor is asked to sign in; the write is the member's own), and View All to the members directory.
|
|
215176
|
+
// `display` picks the members: everyone (also when the source set none), or only those who hold a badge. Followers and admins have no
|
|
215177
|
+
// read the directory makes, so those two are reported. A member's private profile is not in the directory read, so it never shows.
|
|
215106
215178
|
member_horizontal_list_section: (id, s5, st2, index, ctx, sectionId) => {
|
|
215107
215179
|
const type2 = "member_horizontal_list_section", display = str16(st2.display).trim() || "all-members";
|
|
215108
215180
|
if (display !== "all-members" && display !== "members-with-badges") return ctx.unsupported(sectionId, type2, `its "${display}" list needs a read the members directory does not make (followers, admins)`);
|
|
215109
215181
|
const onlyWithBadges = display === "members-with-badges";
|
|
215110
|
-
const svc = ctx.uses("members", `membersRail${index}`, { showBadges: onlyWithBadges, rail: { limit: MEMBERS_RAIL, ...onlyWithBadges ? { onlyWithBadges } : {} } });
|
|
215182
|
+
const svc = ctx.uses("members", `membersRail${index}`, { showBadges: onlyWithBadges, showActivity: true, showFollow: true, rail: { limit: MEMBERS_RAIL, ...onlyWithBadges ? { onlyWithBadges } : {} } });
|
|
215111
215183
|
const children2 = [];
|
|
215112
215184
|
const title = str16(s5.title).trim();
|
|
215113
|
-
|
|
215185
|
+
const showTitle = s5.showTitle === true && !!title;
|
|
215186
|
+
const viewAll = ctx.hasScreen("himi_members") ? node3(`${id}.all`, "Button", { title: "View All", style: "link", size: "md", action: { actionId: "himi.open", params: { screenId: "himi_members" } } }, { hiddenPath: `$service:${svc}.noMembers` }) : null;
|
|
215187
|
+
if (showTitle && viewAll) children2.push(hstack(`${id}.head`, [text10(`${id}.title`, title, "title3", { maxLines: 2 }, { ...inset(0, 0, 0), weight: 1 }), viewAll], 12));
|
|
215188
|
+
else if (showTitle) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
|
|
215114
215189
|
children2.push(ctx.recipe("members-carousel", { svc, id, detailScreen: "himi_member" }), ...ctx.optionalRecipe("section-error", { svc, id, action: "retry" }));
|
|
215190
|
+
if (viewAll && !showTitle) children2.push({ ...viewAll, body: { ...obj20(viewAll.body), props: { ...obj20(obj20(viewAll.body).props), style: "secondary", fullWidth: true } } });
|
|
215191
|
+
if (!viewAll) ctx.gap(sectionId, type2, "the source's View All opens the members directory; this scaffold has no himi_members screen, so it is left out");
|
|
215115
215192
|
ctx.gap(sectionId, type2, `the source lists its members in a horizontal list; the section shows the first ${MEMBERS_RAIL} as a rail${onlyWithBadges ? ", picked from the first page of members (those who hold a badge)" : ""}`);
|
|
215116
|
-
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params:
|
|
215193
|
+
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: ctx.workerCopy(MODULES.members.file) } });
|
|
215117
215194
|
},
|
|
215118
215195
|
// A blog list: the shared blog-list module configured from the section's own settings; unlimited follows the cursor,
|
|
215119
215196
|
// a limited list shows N posts and offers "See All Posts" for the full list in the same category.
|
|
@@ -270524,7 +270601,7 @@ function sectionWorkerCopy(contentDir2, locale) {
|
|
|
270524
270601
|
let params = {};
|
|
270525
270602
|
if (/^[a-z0-9-]+$/.test(module)) {
|
|
270526
270603
|
try {
|
|
270527
|
-
const source2 =
|
|
270604
|
+
const source2 = sharedModuleSources(join166(contentDir2, "tier5-src", "_shared"), module).join("\n");
|
|
270528
270605
|
params = pinnedWorkerParams(locale, contentDir2, source2) ?? keyedWorkerCopy(contentDir2, locale, source2);
|
|
270529
270606
|
} catch {
|
|
270530
270607
|
params = {};
|
|
@@ -270534,6 +270611,31 @@ function sectionWorkerCopy(contentDir2, locale) {
|
|
|
270534
270611
|
return params;
|
|
270535
270612
|
};
|
|
270536
270613
|
}
|
|
270614
|
+
function sharedModuleSources(dir, module) {
|
|
270615
|
+
const seen = /* @__PURE__ */ new Set();
|
|
270616
|
+
const sources = [];
|
|
270617
|
+
const visit = (name, required3) => {
|
|
270618
|
+
if (seen.has(name)) return;
|
|
270619
|
+
seen.add(name);
|
|
270620
|
+
let source2;
|
|
270621
|
+
try {
|
|
270622
|
+
source2 = readFileSync156(join166(dir, `${name}.ts`), "utf8");
|
|
270623
|
+
} catch (error) {
|
|
270624
|
+
if (required3) throw error;
|
|
270625
|
+
return;
|
|
270626
|
+
}
|
|
270627
|
+
sources.push(source2);
|
|
270628
|
+
const file2 = ts40.createSourceFile(`${name}.ts`, source2, ts40.ScriptTarget.Latest, false);
|
|
270629
|
+
for (const statement of file2.statements) {
|
|
270630
|
+
const specifier = ts40.isImportDeclaration(statement) || ts40.isExportDeclaration(statement) ? statement.moduleSpecifier : void 0;
|
|
270631
|
+
if (!specifier || !ts40.isStringLiteral(specifier)) continue;
|
|
270632
|
+
const helper = /^\.\/([a-z0-9-]+)\.js$/.exec(specifier.text)?.[1];
|
|
270633
|
+
if (helper) visit(helper, false);
|
|
270634
|
+
}
|
|
270635
|
+
};
|
|
270636
|
+
visit(module, true);
|
|
270637
|
+
return sources;
|
|
270638
|
+
}
|
|
270537
270639
|
function keyedWorkerCopy(contentDir2, locale, source2) {
|
|
270538
270640
|
const tag2 = locale?.default ?? "en";
|
|
270539
270641
|
const others = (locale?.translations ?? []).filter((t2) => t2 !== tag2);
|
|
@@ -79,7 +79,7 @@ The **Himalaya implementation** cell is blank for every unassigned row. Notes on
|
|
|
79
79
|
|
|
80
80
|
| Source sectionDefinitionId | Source viewer component | Himalaya implementation | Placement / reuse | Class | Settings, actions and gaps |
|
|
81
81
|
| --- | --- | --- | --- | --- | --- |
|
|
82
|
-
| `achievements_list_section` | `wix-one-app-achievements.SectionMemberChallengesScreen` | [Programs list/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/apps/himi-branded-lite/dev/index.ts) + [programs worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (list layout) with the `programs-card`, `programs-filters` and `programs-see-all` recipes | Composed inline; member list and program detail reused | Partial | The migration generator composes the list inline: full-width cards (duration, participants and price follow `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`), the category chips and the "All programs / Programs I joined" control (
|
|
82
|
+
| `achievements_list_section` | `wix-one-app-achievements.SectionMemberChallengesScreen` | [Programs list/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/apps/himi-branded-lite/dev/index.ts) + [programs worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (list layout) with the `programs-card`, `programs-filters` and `programs-see-all` recipes | Composed inline; member list and program detail reused | Partial | The migration generator composes the list inline: full-width cards (duration, participants and price follow `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`), the category chips and the "All programs / Programs I joined" control (shown to a visitor too and with a single program, as the source's filter menu is; "All categories" alone on a site with no categories; a visitor on "Programs I joined" is asked to sign in; both hidden when `isFilterVisible` is false, each axis also follows `filterSettings.byCategory` / `byParticipantStatus`), a card action of Join for a visitor too (it opens `himi_program`, which asks them to sign in), the 2-card mode and "See all" to `himi_programs` only while more programs exist. The card count is the definition's `extraProps.limit` (2, verified in the Catalyst definitions file); an authored `extraProps.limit` or `settings.limit` wins, an infinite flag or a non-count limit shows the whole list, and a limit above 20 shows 20 and reports a gap. A page made only of this section gets a generated screen with the list inline (it is not routed to `himi_programs`). `himi_member_programs` (worker `himi-branded-lite-member-programs`) is the member list: each card carries the signed-in member's standing from Participants v3 / Join Applications v3 (Joined, Program complete, Program ended, Pending request, Request approved, Invited, Participation suspended), a progress bar once started, the price before joining, the same two filters, cursor paging and pull-to-refresh; an ended program the member never joined is dropped. The card opens `himi_program`, which enrols through Join Applications v3 (a free program confirms the participant, a private one sends a request for owner approval, an approved paid application goes to payment), shows the same standing, and offers Cancel request only while a request waits for approval. Also read from the source: the section's chosen category (`categorySettings`) scopes the list, and a MANUAL `sortingSettings.challengesOrder` leads it (the other programs of the category follow; the category chips offer only the chosen categories, and none when one is chosen); a program's cover falls back to its video poster. Still open: join / cancel-request actions on the card itself, and Pricing Plans benefits ("Included in your plan"). |
|
|
83
83
|
| `achievements_carousel_section` | `wix-one-app-achievements.MemberChallengesCarousel` | [Programs data/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (carousel layout) with the `programs-carousel` recipe | Composed inline | Partial | The migration generator composes the carousel inline: the section title (unless `showTitle` is false), one page of snapping cards with page dots, duration, participants and price per `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`, a MANUAL `sortingSettings.challengesOrder` that puts the selected programs first (the other programs of the category follow), scoped to the section's chosen category (`categorySettings`), a retry when the read fails, and a card that opens `himi_program`. It shows 5 cards, the definition's `extraProps.limit`; an authored `extraProps.limit` or `settings.limit` wins, a non-count limit shows the most one page holds, and a limit above 20 shows 20 and reports a gap. The source carousel has no setting for its call to action (a collected app carries only the visibility flags, `sortingSettings` and `filterSettings`), so the "See All" button to `himi_programs` is always drawn under the cards, with the `programs-see-all` recipe; a scaffold without that recipe or without `himi_programs` reports a gap. Still open: the button is shown even when no more programs exist than the cards (the worker only clears its `noSeeAll` gate for an inline list). |
|
|
84
84
|
| `achievements_participant_carousel_section` | `wix-one-app-achievements.ParticipantChallengesCarousel` | Shared programs module (carousel layout, `participating`) with the `programs-participant-carousel` recipe | Composed inline | Partial | Signed-in only: hidden whole, title included, for a visitor, when the member has no programs, or when the read fails. The cards are the member's own programs with their progress (no price), and each opens `himi_program`. It shows 5 cards, the definition's `extraProps.limit`; an authored `extraProps.limit` or `settings.limit` is respected up to 20 cards (one read page). The "Programs I joined" CTA opens `himi_member_programs` and shows only with the section title, as in the source viewer. A scaffold without `himi_program` reports the section unsupported; one without `himi_member_programs` leaves out the CTA. Still open: a MANUAL selection/order is ignored, and a limit above 20 shows 20; the generator reports no gap for either. |
|
|
85
85
|
|
|
@@ -1119,6 +1119,9 @@ Copy the resulting component into an editable app source file, then insert it
|
|
|
1119
1119
|
into the actual generated screen's payload. Keep it outside collection-bound
|
|
1120
1120
|
rows that a worker replaces on load. Rendering a separate unused sample or merely
|
|
1121
1121
|
changing the catalog classification does not restore a migrated placement.
|
|
1122
|
+
When the source section shows its own heading (`showTitle: true` and a non-empty
|
|
1123
|
+
`title`, such as "Studio guide"), `generate` places that heading above the
|
|
1124
|
+
document; a section whose heading is off or empty gets none.
|
|
1122
1125
|
The component uses literal `RichContent.documentJson`; no source prose is a
|
|
1123
1126
|
service binding. The existing viewer preserves text, supported formatting, media
|
|
1124
1127
|
and safe http(s)/mailto/tel links. Legacy bare website domains gain HTTPS before
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2010.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "9b35a8ffce6125f43dcb5fcab389c9180068b563542f8ae0909e319e"
|
|
86
86
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// retitles them like any other worker string.
|
|
12
12
|
import { normalizeFormattedPrice, productImage, productOptions, productPrice, type StoreProduct } from "./himi-store.js";
|
|
13
13
|
import { readSavedProducts, toggleSavedProduct } from "./himi-store-saved.js";
|
|
14
|
+
import { ribbonText } from "./store-ribbon.js";
|
|
14
15
|
import { cleanTitle, initials } from "./himi-text.js";
|
|
15
16
|
import { copyParam, copyTemplate } from "./himi-copy.js";
|
|
16
17
|
import { formatCurrency } from "./engine-intl.js";
|
|
@@ -185,13 +186,7 @@ function swatchFields(hexes: string[], onSale: boolean) {
|
|
|
185
186
|
};
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
|
|
189
|
-
* local type, not a `StoreProduct` member: other workers already extend that type with their own `ribbon`. */
|
|
190
|
-
export function ribbonText(p: StoreProduct): string {
|
|
191
|
-
const ribbon = (p as { ribbon?: unknown }).ribbon;
|
|
192
|
-
const name = typeof ribbon === "string" ? ribbon : typeof (ribbon as { name?: unknown } | null | undefined)?.name === "string" ? (ribbon as { name: string }).name : "";
|
|
193
|
-
return name.trim();
|
|
194
|
-
}
|
|
189
|
+
export { ribbonText };
|
|
195
190
|
|
|
196
191
|
/** What the tag row (Sale tag, ribbon, swatches) shows. One rule for every screen that rebuilds it, including
|
|
197
192
|
* after the App Store presentation changes `onSale`: the ribbon wins over the Sale tag, so a product never
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// The merchant's ribbon on a product ("New", "Best Seller"…), on its own so a section that shows only tiles (products-section) reads it
|
|
2
|
+
// without the shop's sort, filter and saved-products code (himi-store-facets re-exports it).
|
|
3
|
+
import type { StoreProduct } from "./himi-store.js";
|
|
4
|
+
|
|
5
|
+
/** The ribbon the merchant set, whichever catalog answered: V3 `{ id, name }`, V1 a plain string. Read through a
|
|
6
|
+
* local type, not a `StoreProduct` member: other workers already extend that type with their own `ribbon`. */
|
|
7
|
+
export function ribbonText(p: StoreProduct): string {
|
|
8
|
+
const ribbon = (p as { ribbon?: unknown }).ribbon;
|
|
9
|
+
const name = typeof ribbon === "string" ? ribbon : typeof (ribbon as { name?: unknown } | null | undefined)?.name === "string" ? (ribbon as { name: string }).name : "";
|
|
10
|
+
return name.trim();
|
|
11
|
+
}
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "المسؤول",
|
|
6652
6652
|
"origin": "one-app:wix-one-app-selections:SELECTION_MEMBERSHIP_STATUS_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "المالك",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "خطة مجانية",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "عرض المزايا",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "عرض الكل",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, zero {لا أعضاء} one {عضو واحد} two {عضوان} few {# أعضاء} many {# عضوًا} other {# عضو}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Správce",
|
|
6652
6652
|
"origin": "one-app:wix-one-app-selections:SELECTION_MEMBERSHIP_STATUS_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Vlastník",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Bezplatný plán",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Zobrazit výhody",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Zobrazit vše",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# člen} few {# členové} other {# členů}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Admin",
|
|
6652
6652
|
"origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Ejer",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Gratis plan",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Vis fordele",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Se alle",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# medlem} other {# medlemmer}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Admin",
|
|
6652
6652
|
"origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Inhaber",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Kostenloser Plan",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Vorteile anzeigen",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Alle ansehen",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# Mitglied} other {# Mitglieder}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Διαχειριστής",
|
|
6652
6652
|
"origin": "one-app:wix-one-app-selections:SELECTION_MEMBERSHIP_STATUS_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Ιδιοκτήτης",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Δωρεάν πρόγραμμα",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Εμφάνιση πλεονεκτημάτων",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Προβολή όλων",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# μέλος} other {# μέλη}}",
|
|
@@ -6651,6 +6651,26 @@
|
|
|
6651
6651
|
"translation": "Admin",
|
|
6652
6652
|
"origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_ADMIN"
|
|
6653
6653
|
},
|
|
6654
|
+
"h_89ff31225c5f": {
|
|
6655
|
+
"source": "Owner",
|
|
6656
|
+
"translation": "Propietario",
|
|
6657
|
+
"origin": "machine"
|
|
6658
|
+
},
|
|
6659
|
+
"h_bbda53b49038": {
|
|
6660
|
+
"source": "Free plan",
|
|
6661
|
+
"translation": "Plan gratuito",
|
|
6662
|
+
"origin": "machine"
|
|
6663
|
+
},
|
|
6664
|
+
"h_7eb623041610": {
|
|
6665
|
+
"source": "Show Benefits",
|
|
6666
|
+
"translation": "Mostrar beneficios",
|
|
6667
|
+
"origin": "machine"
|
|
6668
|
+
},
|
|
6669
|
+
"h_efd83559209c": {
|
|
6670
|
+
"source": "View All",
|
|
6671
|
+
"translation": "Ver todo",
|
|
6672
|
+
"origin": "machine"
|
|
6673
|
+
},
|
|
6654
6674
|
"h_563ae24ab1fc": {
|
|
6655
6675
|
"source": "{n, plural, one {# member} other {# members}}",
|
|
6656
6676
|
"translation": "{n, plural, one {# miembro} other {# miembros}}",
|