@wix/himalaya-cli 0.1749.0 → 0.1751.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/himi-package.d.ts +478 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/host-compatibility.d.ts +56 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/icon-catalog.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +156 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +2 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast-service.d.ts +105 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/podcast.d.ts +116 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +326 -13
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +730 -81
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +155 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin → 21f35a12bd94f4ab97a9a75453c4adcadc438daf024a4b1950d5c356c123bd01.bin} +1 -1
- package/dist/browser-plane/sw.js +7 -7
- package/dist/cli.mjs +44618 -35753
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +4 -0
- package/guides/designing-himi-screens.md +7 -0
- package/guides/getting-started.md +5 -1
- package/guides/headless-loop.md +1 -1
- package/guides/himi-json-output.md +54 -1
- package/guides/himi-skill.md +5 -1
- package/guides/index.json +6 -0
- package/guides/one-app-to-himi-app.md +31 -8
- package/guides/qa-builds.md +12 -1
- package/guides/recipe-podcast.md +149 -0
- package/guides/skill.md +3 -1
- package/guides/store-submission.md +149 -34
- package/guides/tier-5-add-a-screen.md +16 -2
- package/guides/wix-business-context.md +43 -0
- package/guides/wix-platform-usage.md +7 -2
- package/package.json +10 -10
- package/template-icons/fitness-gym.png +0 -0
- package/template-icons/personal-fitness-trainer.png +0 -0
- package/templates/beauty-salon/config.ts +12 -0
- package/templates/beauty-salon/dev/index.ts +1 -1
- package/templates/beauty-salon/l10n/en.json +1 -1
- package/templates/beauty-salon/tier5-src/_shared/booking-session.ts +3 -1
- package/templates/beauty-salon/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/beauty-salon/tier5-src/_shared/header-badges.ts +113 -0
- package/templates/beauty-salon/tier5-src/_shared/location-pin.ts +97 -0
- package/templates/beauty-salon/tier5-src/_shared/member-access.ts +17 -6
- package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/beauty-salon/tier5-src/_shared/source-badges.ts +72 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/beauty-salon/tier5-src/himi-branded-lite-nav/index.ts +152 -0
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/beauty-salon/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/branded-lite/config.ts +12 -0
- package/templates/branded-lite/dev/index.ts +101 -1
- package/templates/branded-lite/l10n/en.json +22 -1
- package/templates/branded-lite/l10n/es.json +22 -0
- package/templates/branded-lite/l10n/fr.json +23 -0
- package/templates/branded-lite/l10n/he.json +19 -0
- package/templates/branded-lite/tier5-src/_shared/booking-session.ts +3 -1
- package/templates/branded-lite/tier5-src/_shared/location-pin.ts +97 -0
- package/templates/branded-lite/tier5-src/_shared/member-access.ts +17 -6
- package/templates/branded-lite/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/branded-lite/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/branded-lite/tier5-src/himi-branded-lite-access-nav/index.ts +10 -5
- package/templates/branded-lite/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-nav/index.ts +152 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
- package/templates/branded-lite/tier5-src/himi-branded-lite-video/index.ts +12 -1
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/branded-lite/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/brandy/README.md +33 -0
- package/templates/brandy/config.ts +51 -7
- package/templates/brandy/dev/index.ts +23 -9
- package/templates/community-club/l10n/en.json +1 -1
- package/templates/community-club/tier5-src/_shared/member-access.ts +17 -6
- package/templates/community-club/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/community-club/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/community-club/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/community-club/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/conference/tier5-src/_shared/member-access.ts +17 -6
- package/templates/conference/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/events-meetups/l10n/en.json +1 -1
- package/templates/events-meetups/tier5-src/_shared/member-access.ts +17 -6
- package/templates/events-meetups/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/events-meetups/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/events-meetups/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/fitness-gym/README.md +53 -0
- package/templates/fitness-gym/config.ts +560 -0
- package/templates/fitness-gym/dev/index.ts +25787 -0
- package/templates/fitness-gym/himalaya.content.json +64 -0
- package/templates/fitness-gym/himalaya.template.json +15 -0
- package/templates/fitness-gym/icon.png +0 -0
- package/templates/fitness-gym/platforms.json +1 -0
- package/templates/fitness-gym/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/fitness-gym/tier5-src/_shared/booking-location.ts +147 -0
- package/templates/fitness-gym/tier5-src/_shared/booking-session.ts +224 -0
- package/templates/fitness-gym/tier5-src/_shared/branded-lite-hosted.ts +280 -0
- package/templates/fitness-gym/tier5-src/_shared/branded-load-state.ts +109 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-copy.ts +40 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-history.ts +51 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-message-model.ts +177 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-model.ts +56 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-presenter.ts +576 -0
- package/templates/fitness-gym/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-contract.ts +228 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-query.ts +193 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +400 -0
- package/templates/fitness-gym/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +523 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-account.ts +194 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-booking-saved.ts +88 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-bookings.ts +318 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-copy.ts +116 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-media.ts +29 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-store.ts +7 -0
- package/templates/fitness-gym/tier5-src/_shared/himi-text.ts +24 -0
- package/templates/fitness-gym/tier5-src/_shared/host-events.ts +66 -0
- package/templates/fitness-gym/tier5-src/_shared/hosted-checkout.ts +70 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance-form.ts +106 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-attendance.ts +38 -0
- package/templates/fitness-gym/tier5-src/_shared/iap-worker.ts +127 -0
- package/templates/fitness-gym/tier5-src/_shared/inbox-rooms.ts +68 -0
- package/templates/fitness-gym/tier5-src/_shared/local-preferences.ts +38 -0
- package/templates/fitness-gym/tier5-src/_shared/member-access.ts +63 -0
- package/templates/fitness-gym/tier5-src/_shared/member-account-routes.ts +52 -0
- package/templates/fitness-gym/tier5-src/_shared/member-bookings.ts +107 -0
- package/templates/fitness-gym/tier5-src/_shared/member-screen.ts +99 -0
- package/templates/fitness-gym/tier5-src/_shared/notification-target.ts +141 -0
- package/templates/fitness-gym/tier5-src/_shared/offset-page.ts +10 -0
- package/templates/fitness-gym/tier5-src/_shared/online-actions.ts +76 -0
- package/templates/fitness-gym/tier5-src/_shared/owner-load-error.ts +348 -0
- package/templates/fitness-gym/tier5-src/_shared/payment-setup.ts +6 -0
- package/templates/fitness-gym/tier5-src/_shared/pricing-plan-display.ts +64 -0
- package/templates/fitness-gym/tier5-src/_shared/program-description.ts +11 -0
- package/templates/fitness-gym/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/fitness-gym/tier5-src/_shared/program-standing.ts +46 -0
- package/templates/fitness-gym/tier5-src/_shared/rich-body.ts +78 -0
- package/templates/fitness-gym/tier5-src/_shared/rich-content-link.ts +34 -0
- package/templates/fitness-gym/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/fitness-gym/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/fitness-gym/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-bi.ts +85 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-member-links.ts +114 -0
- package/templates/fitness-gym/tier5-src/_shared/wix-service-price.ts +146 -0
- package/templates/fitness-gym/tier5-src/business-chat/index.ts +732 -0
- package/templates/fitness-gym/tier5-src/business-contact/index.ts +6 -0
- package/templates/fitness-gym/tier5-src/himi-booking-account/index.ts +267 -0
- package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +468 -0
- package/templates/fitness-gym/tier5-src/himi-booking-service/index.ts +1190 -0
- package/templates/fitness-gym/tier5-src/himi-booking-services/index.ts +791 -0
- package/templates/fitness-gym/tier5-src/himi-booking-time/index.ts +1729 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-agenda/index.ts +988 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-member-programs/index.ts +656 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-plans/index.ts +495 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-program/facts.ts +52 -0
- package/templates/fitness-gym/tier5-src/himi-branded-lite-program/index.ts +845 -0
- package/templates/fitness-gym/tier5-src/himi-fitcoach-goal/index.ts +191 -0
- package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +619 -0
- package/templates/fitness-gym/tier5-src/himi-store-account/index.ts +1007 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-my-subscriptions/index.ts +84 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-subscription-detail/index.ts +139 -0
- package/templates/fitness-gym/tokens.json +414 -0
- package/templates/gym-fitness/config.ts +12 -0
- package/templates/gym-fitness/dev/index.ts +1 -1
- package/templates/gym-fitness/l10n/en.json +1 -1
- package/templates/gym-fitness/tier5-src/_shared/booking-session.ts +3 -1
- package/templates/gym-fitness/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/gym-fitness/tier5-src/_shared/header-badges.ts +113 -0
- package/templates/gym-fitness/tier5-src/_shared/location-pin.ts +97 -0
- package/templates/gym-fitness/tier5-src/_shared/member-access.ts +17 -6
- package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/gym-fitness/tier5-src/_shared/source-badges.ts +72 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/gym-fitness/tier5-src/himi-branded-lite-nav/index.ts +152 -0
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/gym-fitness/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/medical-services/dev/index.ts +2 -1
- package/templates/medical-services/tier5-src/_shared/booking-session.ts +3 -1
- package/templates/medical-services/tier5-src/_shared/member-access.ts +17 -6
- package/templates/medical-services/tier5-src/himi-booking-account/index.ts +16 -1
- package/templates/medical-services/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/nonprofit-cause/l10n/en.json +1 -1
- package/templates/nonprofit-cause/tier5-src/_shared/member-access.ts +17 -6
- package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/nonprofit-cause/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/personal-fitness-trainer/README.md +51 -0
- package/templates/personal-fitness-trainer/config.ts +343 -0
- package/templates/personal-fitness-trainer/dev/index.ts +24813 -0
- package/templates/personal-fitness-trainer/himalaya.content.json +79 -0
- package/templates/personal-fitness-trainer/himalaya.template.json +14 -0
- package/templates/personal-fitness-trainer/icon.png +0 -0
- package/templates/personal-fitness-trainer/platforms.json +3 -0
- package/templates/personal-fitness-trainer/splash.json +3 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/booking-location.ts +147 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/booking-session.ts +224 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/branded-lite-hosted.ts +280 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/branded-load-state.ts +109 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/business-chat-copy.ts +40 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/business-chat-history.ts +51 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/business-chat-message-model.ts +177 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/business-chat-model.ts +56 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/business-chat-presenter.ts +576 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/collection-contract.ts +228 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/collection-query.ts +193 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/collection-service.ts +400 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/detail-presence.ts +51 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/empty-flags.ts +33 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/engine-intl.ts +523 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-account.ts +194 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-booking-saved.ts +88 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-bookings.ts +318 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-copy.ts +116 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-layouts.ts +142 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-store.ts +7 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/himi-text.ts +24 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/host-events.ts +66 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/hosted-checkout.ts +70 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/iap-attendance-form.ts +106 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/iap-attendance.ts +38 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/iap-worker.ts +127 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/inbox-rooms.ts +68 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/local-preferences.ts +38 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/member-access.ts +63 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/member-account-routes.ts +52 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/member-bookings.ts +107 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/member-screen.ts +99 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/offset-page.ts +10 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/online-actions.ts +76 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/owner-load-error.ts +348 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/payment-setup.ts +6 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/pricing-plan-display.ts +64 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/rich-body.ts +78 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/rich-content-link.ts +34 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/video-caption.ts +21 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/wix-bi.ts +85 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/wix-service-price.ts +146 -0
- package/templates/personal-fitness-trainer/tier5-src/business-chat/index.ts +732 -0
- package/templates/personal-fitness-trainer/tier5-src/business-contact/index.ts +6 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-booking-bookings/index.ts +468 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-booking-service/index.ts +1190 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-booking-services/index.ts +791 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-booking-time/index.ts +1729 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +242 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/index.ts +1094 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-agenda/index.ts +988 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-appearance/index.ts +94 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-notifsettings/index.ts +173 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-plans/index.ts +495 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-splash/index.ts +35 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-video/index.ts +226 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-videos/index.ts +145 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-fitness-trainer-home/index.ts +70 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-fitness-trainer-profile/index.ts +53 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-store-account/index.ts +1007 -0
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-app-language/index.ts +73 -0
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-delete-account/index.ts +59 -0
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-my-subscriptions/index.ts +84 -0
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-subscription-detail/index.ts +139 -0
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-view-profile/index.ts +119 -0
- package/templates/personal-fitness-trainer/tokens.json +381 -0
- package/templates/podcast-creator/dev/index.ts +100 -0
- package/templates/podcast-creator/l10n/en.json +22 -1
- package/templates/podcast-creator/l10n/es.json +22 -0
- package/templates/podcast-creator/l10n/fr.json +18 -0
- package/templates/podcast-creator/l10n/he.json +15 -0
- package/templates/podcast-creator/tier5-src/_shared/member-access.ts +17 -6
- package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/podcast-creator/tier5-src/himi-branded-lite-podcasts/index.ts +14 -234
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/podcast-creator/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/portfolio-creative/l10n/en.json +1 -1
- package/templates/portfolio-creative/tier5-src/_shared/member-access.ts +17 -6
- package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/portfolio-creative/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/restaurant/l10n/en.json +1 -1
- package/templates/restaurant/tier5-src/_shared/member-access.ts +17 -6
- package/templates/restaurant/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/restaurant/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/restaurant/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/retail-store/l10n/en.json +1 -1
- package/templates/retail-store/tier5-src/_shared/member-access.ts +17 -6
- package/templates/retail-store/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/retail-store/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/retail-store/tier5-src/wix-spaces-view-profile/index.ts +68 -55
- package/templates/salon-spa/dev/index.ts +1 -1
- package/templates/salon-spa/tier5-src/_shared/booking-session.ts +3 -1
- package/templates/salon-spa/tier5-src/_shared/member-access.ts +17 -6
- package/templates/salon-spa/tier5-src/himi-booking-account/index.ts +16 -1
- package/templates/salon-spa/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/salon-spa/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/wholesale-store/tier5-src/_shared/member-access.ts +17 -6
- package/templates/wholesale-store/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/yoga-studio/config.ts +12 -0
- package/templates/yoga-studio/dev/index.ts +1 -1
- package/templates/yoga-studio/l10n/en.json +1 -1
- package/templates/yoga-studio/tier5-src/_shared/booking-session.ts +3 -1
- package/templates/yoga-studio/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/yoga-studio/tier5-src/_shared/header-badges.ts +113 -0
- package/templates/yoga-studio/tier5-src/_shared/location-pin.ts +97 -0
- package/templates/yoga-studio/tier5-src/_shared/member-access.ts +17 -6
- package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +16 -0
- package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +5 -8
- package/templates/yoga-studio/tier5-src/_shared/source-badges.ts +72 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-agenda/index.ts +37 -4
- package/templates/yoga-studio/tier5-src/himi-branded-lite-nav/index.ts +152 -0
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/yoga-studio/tier5-src/wix-spaces-view-profile/index.ts +68 -55
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
// Tier-5 bundle: himi-fitcoach-goal — the fitness-gym template's goal screen (himi_fit_goal).
|
|
2
|
+
//
|
|
3
|
+
// A goal is a row of the app's own CMS collection (the collection id arrives as the `goals`
|
|
4
|
+
// param, the row's slug as the route's `id`). It says what the goal means, how the coach trains
|
|
5
|
+
// it and how many sessions it takes, and links one Personal Workout service (`serviceId`): that
|
|
6
|
+
// service gives the minutes and the price, and "Book your first session" opens Choose a time for
|
|
7
|
+
// it. A visitor signs in first (the sign-in sheet), then lands on Choose a time.
|
|
8
|
+
//
|
|
9
|
+
// States: loading; ready; ready without a service (the price line and the minutes tile hide, the
|
|
10
|
+
// button opens Workouts); not found (the slug matches no row); error (a failed read, with Retry).
|
|
11
|
+
import { defineService, navigate } from "@himalaya/state";
|
|
12
|
+
import { queryServices, type WixService } from "@himalaya/wix-bookings";
|
|
13
|
+
import { queryDataItems } from "@himalaya/wix-data";
|
|
14
|
+
import { wixMediaUrl } from "@himalaya/wix-media";
|
|
15
|
+
import { servicePriceLine, serviceDurationText, type BookingLabel } from "../_shared/himi-bookings.js";
|
|
16
|
+
import { signedInEmail } from "../_shared/himi-account.js";
|
|
17
|
+
import { within } from "../_shared/member-screen.js";
|
|
18
|
+
import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
19
|
+
|
|
20
|
+
export const SERVICE = "himiFitcoachGoal";
|
|
21
|
+
|
|
22
|
+
export interface Pill { id: string; text: string }
|
|
23
|
+
export interface Step { id: string; number: string; title: string; text: string }
|
|
24
|
+
export interface S {
|
|
25
|
+
status: "loading" | "ready" | "notFound" | "error";
|
|
26
|
+
isLoading: boolean; notLoading: boolean;
|
|
27
|
+
hideContent: boolean; hideNotFound: boolean; hideError: boolean;
|
|
28
|
+
slug: string;
|
|
29
|
+
nameLine1: string; nameLine2: string; title: string; summary: string;
|
|
30
|
+
image: string; imageAlt: string; hasImage: boolean; noImage: boolean;
|
|
31
|
+
muscles: Pill[]; noMuscles: boolean;
|
|
32
|
+
sessions: string; perWeek: string; minutes: string; noMinutes: boolean;
|
|
33
|
+
whatItIs: string; noWhatItIs: boolean;
|
|
34
|
+
steps: Step[]; noSteps: boolean;
|
|
35
|
+
planTitle: string; noPlanTitle: boolean; planNote: string;
|
|
36
|
+
/** "30 min · Online · €99" — "" without a linked service. */
|
|
37
|
+
priceLine: string; noPriceLine: boolean;
|
|
38
|
+
serviceId: string; hasService: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const BOOT: S = {
|
|
42
|
+
status: "loading", isLoading: true, notLoading: false, hideContent: true, hideNotFound: true, hideError: true,
|
|
43
|
+
slug: "", nameLine1: "", nameLine2: "", title: "", summary: "", image: "", imageAlt: "", hasImage: false, noImage: true,
|
|
44
|
+
muscles: [], noMuscles: true, sessions: "", perWeek: "", minutes: "", noMinutes: true, whatItIs: "", noWhatItIs: true,
|
|
45
|
+
steps: [], noSteps: true, planTitle: "", noPlanTitle: true, planNote: "", priceLine: "", noPriceLine: true, serviceId: "", hasService: false,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const clean = (value: unknown): string => (typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "");
|
|
49
|
+
const num = (value: unknown): number => { const n = Number(value); return Number.isFinite(n) && n > 0 ? Math.round(n) : 0; };
|
|
50
|
+
const label: BookingLabel = (key, fallback, values) =>
|
|
51
|
+
values ? copyTemplate(`workout.${key}`, fallback, values) : copyParam(`workout.${key}`, fallback);
|
|
52
|
+
|
|
53
|
+
/** The display name on two lines, the last line lime: the last word alone on line 2. */
|
|
54
|
+
export function nameLines(title: string): [string, string] {
|
|
55
|
+
const words = clean(title).toUpperCase().split(" ").filter(Boolean);
|
|
56
|
+
if (words.length < 2) return ["", words.join(" ")];
|
|
57
|
+
return [words.slice(0, -1).join(" "), words[words.length - 1]];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** A CMS image value: a URL, a `wix:image://v1/<id>/…` reference or a media id. */
|
|
61
|
+
export function cmsImage(value: unknown): string {
|
|
62
|
+
const raw = clean(value);
|
|
63
|
+
const ref = /^wix:image:\/\/v1\/([^/#]+)/.exec(raw);
|
|
64
|
+
return wixMediaUrl(ref ? ref[1] : raw);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const minutesOf = (service: WixService): number => {
|
|
68
|
+
const durations = (service as { schedule?: { availabilityConstraints?: { sessionDurations?: unknown[] } } }).schedule?.availabilityConstraints?.sessionDurations ?? [];
|
|
69
|
+
return durations.map(num).find((n) => n > 0) ?? 0;
|
|
70
|
+
};
|
|
71
|
+
const placeOf = (service: WixService): string => {
|
|
72
|
+
const loc = (service as { locations?: Array<{ type?: string; custom?: { address?: { formattedAddress?: string } }; business?: { name?: string } }> }).locations?.[0];
|
|
73
|
+
return clean(loc?.custom?.address?.formattedAddress) || clean(loc?.business?.name);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export function goalState(data: Record<string, unknown>, service: WixService | undefined): S {
|
|
77
|
+
const title = clean(data.title);
|
|
78
|
+
const [nameLine1, nameLine2] = nameLines(title);
|
|
79
|
+
const sessions = num(data.sessions), perWeek = num(data.perWeek);
|
|
80
|
+
const weeks = sessions && perWeek ? Math.ceil(sessions / perWeek) : 0;
|
|
81
|
+
const steps: Step[] = [1, 2, 3, 4]
|
|
82
|
+
.map((n) => ({ id: `step${n}`, number: String(n), title: clean(data[`step${n}Title`]), text: clean(data[`step${n}Text`]) }))
|
|
83
|
+
.filter((s) => s.title || s.text);
|
|
84
|
+
const muscles = (Array.isArray(data.muscles) ? data.muscles : []).map(clean).filter(Boolean).map((text, i) => ({ id: `m${i}`, text }));
|
|
85
|
+
const image = cmsImage(data.image);
|
|
86
|
+
const minutes = service ? minutesOf(service) : 0;
|
|
87
|
+
const price = service ? servicePriceLine(service, label) : undefined;
|
|
88
|
+
// A CUSTOM rate is the owner's sentence ("Priced on consultation"): it stays in the price line.
|
|
89
|
+
const priceText = price ? price.text : "";
|
|
90
|
+
const priceLine = service ? [serviceDurationText(service, label), placeOf(service), priceText].filter(Boolean).join(" · ") : "";
|
|
91
|
+
const what = clean(data.whatItIs);
|
|
92
|
+
const planTitle = sessions && weeks
|
|
93
|
+
? copyTemplate("goal.planTitle", "{sessions} sessions over {weeks} weeks", { sessions, weeks })
|
|
94
|
+
: sessions ? copyTemplate("goal.planTitleSessions", "{sessions} sessions", { sessions }) : "";
|
|
95
|
+
const planNote = [copyParam("goal.planNote", "Your coach adjusts the plan after your first session."),
|
|
96
|
+
// Only a priced rate: a free one has no unit, and "Free per session." would not read.
|
|
97
|
+
priceText && price && !price.isText && price.unit ? copyTemplate("goal.perSession", "{price} per session.", { price: priceText }) : ""].filter(Boolean).join(" ");
|
|
98
|
+
return {
|
|
99
|
+
status: "ready", isLoading: false, notLoading: true, hideContent: false, hideNotFound: true, hideError: true,
|
|
100
|
+
slug: clean(data.slug), nameLine1, nameLine2, title, summary: clean(data.summary),
|
|
101
|
+
image, imageAlt: clean(data.imageAlt) || title, hasImage: !!image, noImage: !image,
|
|
102
|
+
muscles, noMuscles: muscles.length === 0,
|
|
103
|
+
sessions: sessions ? String(sessions) : "", perWeek: perWeek ? copyTemplate("goal.perWeekValue", "{n}×", { n: perWeek }) : "",
|
|
104
|
+
minutes: minutes ? String(minutes) : "", noMinutes: !minutes,
|
|
105
|
+
whatItIs: what, noWhatItIs: !what,
|
|
106
|
+
steps, noSteps: steps.length === 0,
|
|
107
|
+
planTitle, noPlanTitle: !planTitle, planNote,
|
|
108
|
+
priceLine, noPriceLine: !priceLine,
|
|
109
|
+
serviceId: service?.id ?? "", hasService: !!service,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
let collectionId = "";
|
|
114
|
+
|
|
115
|
+
/** The route's `id` (the goal slug): hosts thread the `himi.open` nav param into the worker's
|
|
116
|
+
* input (`himalaya.input.id`); an onAppear param wins where a host passes one there. */
|
|
117
|
+
function routeSlug(arg: unknown): string {
|
|
118
|
+
const fromArg = strArg(arg, "id");
|
|
119
|
+
if (fromArg) return fromArg;
|
|
120
|
+
const input = (globalThis as { himalaya?: { input?: { id?: unknown } } }).himalaya?.input;
|
|
121
|
+
return typeof input?.id === "string" ? input.id.trim() : "";
|
|
122
|
+
}
|
|
123
|
+
let loadSeq = 0;
|
|
124
|
+
const strArg = (arg: unknown, key: string): string => {
|
|
125
|
+
const v = (arg as Record<string, unknown> | undefined)?.[key];
|
|
126
|
+
return typeof v === "string" ? v.trim() : "";
|
|
127
|
+
};
|
|
128
|
+
let latest: S = BOOT;
|
|
129
|
+
const commit = (next: S): S => (latest = next);
|
|
130
|
+
const now = (): S => (svc.getState?.() as S | undefined) ?? latest;
|
|
131
|
+
|
|
132
|
+
async function load(slug: string): Promise<S> {
|
|
133
|
+
const mine = ++loadSeq;
|
|
134
|
+
if (!slug || !collectionId) return { ...BOOT, status: "notFound", isLoading: false, notLoading: true, hideNotFound: false };
|
|
135
|
+
try {
|
|
136
|
+
const res = await queryDataItems(collectionId, 1, { slug: { $eq: slug } });
|
|
137
|
+
const data = (res.dataItems?.[0]?.data ?? undefined) as Record<string, unknown> | undefined;
|
|
138
|
+
if (mine !== loadSeq) return now();
|
|
139
|
+
if (!data) return { ...BOOT, slug, status: "notFound", isLoading: false, notLoading: true, hideNotFound: false };
|
|
140
|
+
const serviceId = clean(data.serviceId);
|
|
141
|
+
let service: WixService | undefined;
|
|
142
|
+
if (serviceId) {
|
|
143
|
+
// A service that is gone or hidden is no service: the goal still shows, without a price.
|
|
144
|
+
// A query that FAILS is not that: it falls to the error state below, with Retry.
|
|
145
|
+
const found = await queryServices({ query: { filter: { id: { $in: [serviceId] } }, paging: { limit: 1 } } });
|
|
146
|
+
service = (found?.services ?? []).find((s) => s.id === serviceId && !(s as { hidden?: boolean }).hidden);
|
|
147
|
+
}
|
|
148
|
+
if (mine !== loadSeq) return now();
|
|
149
|
+
return goalState(data, service);
|
|
150
|
+
} catch {
|
|
151
|
+
if (mine !== loadSeq) return now();
|
|
152
|
+
return { ...BOOT, slug, status: "error", isLoading: false, notLoading: true, hideError: false };
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const svc = defineService<S, {
|
|
157
|
+
load: (s: S, arg?: unknown) => Promise<S>;
|
|
158
|
+
retry: (s: S) => Promise<S>;
|
|
159
|
+
startLoading: (s: S, arg?: unknown) => S;
|
|
160
|
+
book: (s: S, arg?: unknown) => Promise<S>;
|
|
161
|
+
}>(SERVICE, {
|
|
162
|
+
state: BOOT,
|
|
163
|
+
actions: {
|
|
164
|
+
load: async (s, arg) => {
|
|
165
|
+
stashCopy(arg);
|
|
166
|
+
collectionId = strArg(arg, "goals") || collectionId;
|
|
167
|
+
const slug = routeSlug(arg);
|
|
168
|
+
// Another goal than the one on screen: its skeleton shows first, never the old goal's words.
|
|
169
|
+
if (slug !== s.slug) await svc.startLoading({ slug });
|
|
170
|
+
return commit(await load(slug));
|
|
171
|
+
},
|
|
172
|
+
retry: async (s) => { await svc.startLoading({ slug: s.slug }); return commit(await load(s.slug)); },
|
|
173
|
+
startLoading: (_s, arg) => commit({ ...BOOT, slug: strArg(arg, "slug") }),
|
|
174
|
+
// "Book your first session": Choose a time for the goal's Personal Workout. A visitor gets the
|
|
175
|
+
// sign-in sheet first, and lands on Choose a time once signed in. Without a service: Workouts.
|
|
176
|
+
book: async (s, arg) => {
|
|
177
|
+
// No linked Personal Workout (every scaffold's sample row): the Workouts TAB, never a push of
|
|
178
|
+
// its list onto the Home stack.
|
|
179
|
+
if (!s.hasService || !s.serviceId) return navigate(s, { tab: "workouts" });
|
|
180
|
+
const signIn = strArg(arg, "signInScreenId");
|
|
181
|
+
const email = signIn ? await within(signedInEmail(), 4_500, "") : "member";
|
|
182
|
+
const current = now();
|
|
183
|
+
if (email) return navigate(current, { screenId: "himi_time", args: { id: s.serviceId } });
|
|
184
|
+
return navigate(current, {
|
|
185
|
+
screenId: signIn, presentation: "sheet",
|
|
186
|
+
args: { mode: "signin", modal: "1", returnScreenId: "himi_time", returnId: s.serviceId, returnTab: strArg(arg, "returnTab") || "home" },
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
export { svc };
|