@wix/himalaya-cli 0.1560.0 → 0.1562.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +60 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +11 -5
- package/dist/cli.mjs +51 -42
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +3 -2
- package/guides/component-reference.md +3 -1
- package/guides/sdk-reference.json +7 -7
- package/package.json +3 -3
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/branded-lite/dev/index.ts +2390 -851
- package/templates/branded-lite/himalaya.content.json +1 -1
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/branded-lite/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/community-club/dev/index.ts +2387 -848
- package/templates/community-club/himalaya.content.json +1 -1
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/community-club/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/community-club/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/community-club-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/events-meetups/dev/index.ts +2387 -848
- package/templates/events-meetups/himalaya.content.json +1 -1
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/events-meetups/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/events-meetups-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/gym-fitness/dev/index.ts +2392 -853
- package/templates/gym-fitness/himalaya.content.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/nonprofit-cause/dev/index.ts +2387 -848
- package/templates/nonprofit-cause/himalaya.content.json +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/nonprofit-cause/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/owner-lite/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/podcast-creator/dev/index.ts +2388 -849
- package/templates/podcast-creator/himalaya.content.json +1 -1
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/podcast-creator/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/portfolio-creative/dev/index.ts +2375 -836
- package/templates/portfolio-creative/himalaya.content.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/restaurant/dev/index.ts +2388 -849
- package/templates/restaurant/himalaya.content.json +1 -1
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/restaurant/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/restaurant/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/restaurant-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/retail-store/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/retail-store-owner/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/yoga-studio/dev/index.ts +2403 -864
- package/templates/yoga-studio/himalaya.content.json +1 -1
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-events.ts +7 -0
- package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +803 -361
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +18 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/himi-events.ts +7 -0
|
@@ -486,3 +486,21 @@ export function zoneOffsetAt(at: number, timeZone: string): number {
|
|
|
486
486
|
}
|
|
487
487
|
return NaN;
|
|
488
488
|
}
|
|
489
|
+
|
|
490
|
+
/** Long zone label plus its short offset, e.g. "Israel Standard Time (GMT+2)". An engine
|
|
491
|
+
* without ECMA-402 has no zone database, so callers omit the supplementary label there. */
|
|
492
|
+
export function formatTimeZoneLabel(date: Date, timeZone: string, locale = "en"): string {
|
|
493
|
+
if (hasIntl()) {
|
|
494
|
+
if (!timeZone) return "";
|
|
495
|
+
try {
|
|
496
|
+
const parts = new Intl.DateTimeFormat(locale, { timeZone, timeZoneName: "long" }).formatToParts(date);
|
|
497
|
+
const name = parts.find((part) => part.type === "timeZoneName")?.value || timeZone;
|
|
498
|
+
const offset = new Intl.DateTimeFormat(locale, { timeZone, timeZoneName: "shortOffset" })
|
|
499
|
+
.formatToParts(date).find((part) => part.type === "timeZoneName")?.value;
|
|
500
|
+
return offset ? `${name} (${offset.replace(/:00$/, "")})` : name;
|
|
501
|
+
} catch {
|
|
502
|
+
return timeZone;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
return "";
|
|
506
|
+
}
|
|
@@ -56,3 +56,10 @@ export function rememberRsvp(eventId: string): void {
|
|
|
56
56
|
const next = [eventId, ...ids.filter((id) => id !== eventId)].slice(0, 50);
|
|
57
57
|
try { storage()?.setItem(RSVP_KEY, JSON.stringify(next)); } catch { /* best-effort */ }
|
|
58
58
|
}
|
|
59
|
+
|
|
60
|
+
/** Remove a locally confirmed RSVP after Wix confirms its cancellation. */
|
|
61
|
+
export function forgetRsvp(eventId: string): void {
|
|
62
|
+
if (!eventId) return;
|
|
63
|
+
const next = confirmedRsvpIds().filter((id) => id !== eventId);
|
|
64
|
+
try { storage()?.setItem(RSVP_KEY, JSON.stringify(next)); } catch { /* best-effort */ }
|
|
65
|
+
}
|
|
@@ -486,3 +486,21 @@ export function zoneOffsetAt(at: number, timeZone: string): number {
|
|
|
486
486
|
}
|
|
487
487
|
return NaN;
|
|
488
488
|
}
|
|
489
|
+
|
|
490
|
+
/** Long zone label plus its short offset, e.g. "Israel Standard Time (GMT+2)". An engine
|
|
491
|
+
* without ECMA-402 has no zone database, so callers omit the supplementary label there. */
|
|
492
|
+
export function formatTimeZoneLabel(date: Date, timeZone: string, locale = "en"): string {
|
|
493
|
+
if (hasIntl()) {
|
|
494
|
+
if (!timeZone) return "";
|
|
495
|
+
try {
|
|
496
|
+
const parts = new Intl.DateTimeFormat(locale, { timeZone, timeZoneName: "long" }).formatToParts(date);
|
|
497
|
+
const name = parts.find((part) => part.type === "timeZoneName")?.value || timeZone;
|
|
498
|
+
const offset = new Intl.DateTimeFormat(locale, { timeZone, timeZoneName: "shortOffset" })
|
|
499
|
+
.formatToParts(date).find((part) => part.type === "timeZoneName")?.value;
|
|
500
|
+
return offset ? `${name} (${offset.replace(/:00$/, "")})` : name;
|
|
501
|
+
} catch {
|
|
502
|
+
return timeZone;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
return "";
|
|
506
|
+
}
|
|
@@ -56,3 +56,10 @@ export function rememberRsvp(eventId: string): void {
|
|
|
56
56
|
const next = [eventId, ...ids.filter((id) => id !== eventId)].slice(0, 50);
|
|
57
57
|
try { storage()?.setItem(RSVP_KEY, JSON.stringify(next)); } catch { /* best-effort */ }
|
|
58
58
|
}
|
|
59
|
+
|
|
60
|
+
/** Remove a locally confirmed RSVP after Wix confirms its cancellation. */
|
|
61
|
+
export function forgetRsvp(eventId: string): void {
|
|
62
|
+
if (!eventId) return;
|
|
63
|
+
const next = confirmedRsvpIds().filter((id) => id !== eventId);
|
|
64
|
+
try { storage()?.setItem(RSVP_KEY, JSON.stringify(next)); } catch { /* best-effort */ }
|
|
65
|
+
}
|
|
@@ -486,3 +486,21 @@ export function zoneOffsetAt(at: number, timeZone: string): number {
|
|
|
486
486
|
}
|
|
487
487
|
return NaN;
|
|
488
488
|
}
|
|
489
|
+
|
|
490
|
+
/** Long zone label plus its short offset, e.g. "Israel Standard Time (GMT+2)". An engine
|
|
491
|
+
* without ECMA-402 has no zone database, so callers omit the supplementary label there. */
|
|
492
|
+
export function formatTimeZoneLabel(date: Date, timeZone: string, locale = "en"): string {
|
|
493
|
+
if (hasIntl()) {
|
|
494
|
+
if (!timeZone) return "";
|
|
495
|
+
try {
|
|
496
|
+
const parts = new Intl.DateTimeFormat(locale, { timeZone, timeZoneName: "long" }).formatToParts(date);
|
|
497
|
+
const name = parts.find((part) => part.type === "timeZoneName")?.value || timeZone;
|
|
498
|
+
const offset = new Intl.DateTimeFormat(locale, { timeZone, timeZoneName: "shortOffset" })
|
|
499
|
+
.formatToParts(date).find((part) => part.type === "timeZoneName")?.value;
|
|
500
|
+
return offset ? `${name} (${offset.replace(/:00$/, "")})` : name;
|
|
501
|
+
} catch {
|
|
502
|
+
return timeZone;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
return "";
|
|
506
|
+
}
|
|
@@ -56,3 +56,10 @@ export function rememberRsvp(eventId: string): void {
|
|
|
56
56
|
const next = [eventId, ...ids.filter((id) => id !== eventId)].slice(0, 50);
|
|
57
57
|
try { storage()?.setItem(RSVP_KEY, JSON.stringify(next)); } catch { /* best-effort */ }
|
|
58
58
|
}
|
|
59
|
+
|
|
60
|
+
/** Remove a locally confirmed RSVP after Wix confirms its cancellation. */
|
|
61
|
+
export function forgetRsvp(eventId: string): void {
|
|
62
|
+
if (!eventId) return;
|
|
63
|
+
const next = confirmedRsvpIds().filter((id) => id !== eventId);
|
|
64
|
+
try { storage()?.setItem(RSVP_KEY, JSON.stringify(next)); } catch { /* best-effort */ }
|
|
65
|
+
}
|