@wix/himalaya-cli 0.1748.0 → 0.1750.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/bin/himi +16 -0
- 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/schema.d.ts +9 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/l10n.mjs +1 -1
- package/dist/browser-plane/assets.json +7 -7
- package/dist/browser-plane/preview-deferred/{63821bbb8f637899037252154a5587f0596e4b537173c7f50551f9e44f7c22c0.bin → b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin} +1 -1
- package/dist/browser-plane/sw.js +6 -6
- package/dist/browser-plane/t5-frame.html +1 -1
- package/dist/browser-plane/t5-worker-frame.html +1 -1
- package/dist/cli.mjs +13464 -8217
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +1 -1
- package/guides/component-reference.md +9 -0
- package/guides/getting-started.md +3 -1
- package/guides/himi-json-output.md +54 -1
- package/guides/himi-skill.md +3 -1
- package/guides/one-app-to-himi-app.md +31 -8
- package/guides/skill.md +3 -1
- package/guides/store-submission.md +149 -34
- package/guides/wix-business-context.md +14 -0
- package/package.json +10 -10
- package/template-icons/medical-services.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 -0
- package/templates/beauty-salon/l10n/en.json +6 -0
- package/templates/beauty-salon/l10n/fr.json +11 -0
- package/templates/beauty-salon/l10n/he.json +9 -0
- 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/member-bookings.ts +17 -4
- package/templates/beauty-salon/tier5-src/_shared/source-badges.ts +72 -0
- package/templates/beauty-salon/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +6 -2
- package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +7 -2
- package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +6 -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/beauty-salon-owner/dev/index.ts +54 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/branded-lite/config.ts +12 -0
- package/templates/branded-lite/dev/index.ts +1 -0
- package/templates/branded-lite/l10n/fr.json +10 -0
- package/templates/branded-lite/l10n/he.json +8 -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/member-bookings.ts +17 -4
- package/templates/branded-lite/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +6 -2
- package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +6 -4
- package/templates/branded-lite/tier5-src/himi-branded-lite-access-nav/index.ts +10 -5
- package/templates/branded-lite/tier5-src/himi-branded-lite-nav/index.ts +152 -0
- 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/community-club/dev/index.ts +1 -0
- package/templates/community-club/tier5-src/_shared/member-access.ts +17 -6
- package/templates/community-club/tier5-src/_shared/member-bookings.ts +17 -4
- 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/community-club-owner/dev/index.ts +54 -0
- package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/conference/dev/index.ts +1 -0
- 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/dev/index.ts +1 -0
- package/templates/events-meetups/tier5-src/_shared/member-access.ts +17 -6
- package/templates/events-meetups/tier5-src/_shared/member-bookings.ts +17 -4
- 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/events-meetups-owner/dev/index.ts +54 -0
- package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/gym-fitness/config.ts +12 -0
- package/templates/gym-fitness/dev/index.ts +1 -0
- package/templates/gym-fitness/l10n/en.json +6 -0
- package/templates/gym-fitness/l10n/fr.json +11 -0
- package/templates/gym-fitness/l10n/he.json +9 -0
- 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/member-bookings.ts +17 -4
- package/templates/gym-fitness/tier5-src/_shared/source-badges.ts +72 -0
- package/templates/gym-fitness/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +6 -2
- package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +7 -2
- package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +6 -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/gym-fitness-owner/dev/index.ts +54 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/medical-services/README.md +53 -0
- package/templates/medical-services/config.ts +320 -0
- package/templates/medical-services/dev/index.ts +17783 -0
- package/templates/medical-services/himalaya.content.json +46 -0
- package/templates/medical-services/himalaya.template.json +14 -0
- package/templates/medical-services/icon.png +0 -0
- package/templates/medical-services/platforms.json +1 -0
- package/templates/medical-services/tier5-src/_shared/app-locale.ts +61 -0
- package/templates/medical-services/tier5-src/_shared/booking-location.ts +147 -0
- package/templates/medical-services/tier5-src/_shared/booking-session.ts +224 -0
- package/templates/medical-services/tier5-src/_shared/branded-lite-hosted.ts +280 -0
- package/templates/medical-services/tier5-src/_shared/branded-load-state.ts +109 -0
- package/templates/medical-services/tier5-src/_shared/business-chat-copy.ts +40 -0
- package/templates/medical-services/tier5-src/_shared/business-chat-history.ts +51 -0
- package/templates/medical-services/tier5-src/_shared/business-chat-message-model.ts +177 -0
- package/templates/medical-services/tier5-src/_shared/business-chat-model.ts +56 -0
- package/templates/medical-services/tier5-src/_shared/business-chat-presenter.ts +576 -0
- package/templates/medical-services/tier5-src/_shared/business-chat-transport.ts +148 -0
- package/templates/medical-services/tier5-src/_shared/collection-contract.ts +228 -0
- package/templates/medical-services/tier5-src/_shared/collection-query.ts +193 -0
- package/templates/medical-services/tier5-src/_shared/collection-service.ts +400 -0
- package/templates/medical-services/tier5-src/_shared/engine-intl.ts +523 -0
- package/templates/medical-services/tier5-src/_shared/faq-list.ts +405 -0
- package/templates/medical-services/tier5-src/_shared/himi-account.ts +194 -0
- package/templates/medical-services/tier5-src/_shared/himi-booking-saved.ts +88 -0
- package/templates/medical-services/tier5-src/_shared/himi-bookings.ts +318 -0
- package/templates/medical-services/tier5-src/_shared/himi-copy.ts +116 -0
- package/templates/medical-services/tier5-src/_shared/himi-store.ts +7 -0
- package/templates/medical-services/tier5-src/_shared/himi-text.ts +24 -0
- package/templates/medical-services/tier5-src/_shared/host-events.ts +66 -0
- package/templates/medical-services/tier5-src/_shared/hosted-checkout.ts +70 -0
- package/templates/medical-services/tier5-src/_shared/iap-attendance-form.ts +106 -0
- package/templates/medical-services/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
- package/templates/medical-services/tier5-src/_shared/iap-attendance.ts +38 -0
- package/templates/medical-services/tier5-src/_shared/iap-worker.ts +127 -0
- package/templates/medical-services/tier5-src/_shared/inbox-rooms.ts +68 -0
- package/templates/medical-services/tier5-src/_shared/local-preferences.ts +38 -0
- package/templates/medical-services/tier5-src/_shared/member-access.ts +63 -0
- package/templates/medical-services/tier5-src/_shared/member-account-routes.ts +52 -0
- package/templates/medical-services/tier5-src/_shared/member-bookings.ts +107 -0
- package/templates/medical-services/tier5-src/_shared/member-screen.ts +99 -0
- package/templates/medical-services/tier5-src/_shared/notification-target.ts +141 -0
- package/templates/medical-services/tier5-src/_shared/offset-page.ts +10 -0
- package/templates/medical-services/tier5-src/_shared/online-actions.ts +76 -0
- package/templates/medical-services/tier5-src/_shared/owner-load-error.ts +348 -0
- package/templates/medical-services/tier5-src/_shared/payment-setup.ts +6 -0
- package/templates/medical-services/tier5-src/_shared/rich-body.ts +78 -0
- package/templates/medical-services/tier5-src/_shared/rich-content-link.ts +34 -0
- package/templates/medical-services/tier5-src/_shared/sign-in-sheet.ts +18 -0
- package/templates/medical-services/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/medical-services/tier5-src/_shared/weekly-goal.ts +107 -0
- package/templates/medical-services/tier5-src/_shared/wix-bi.ts +85 -0
- package/templates/medical-services/tier5-src/_shared/wix-member-links.ts +114 -0
- package/templates/medical-services/tier5-src/_shared/wix-service-price.ts +146 -0
- package/templates/medical-services/tier5-src/business-chat/index.ts +732 -0
- package/templates/medical-services/tier5-src/himi-booking-account/index.ts +252 -0
- package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +468 -0
- package/templates/medical-services/tier5-src/himi-booking-service/index.ts +1190 -0
- package/templates/medical-services/tier5-src/himi-booking-services/index.ts +791 -0
- package/templates/medical-services/tier5-src/himi-booking-time/index.ts +1729 -0
- package/templates/medical-services/tier5-src/himi-branded-lite-faq/index.ts +6 -0
- package/templates/medical-services/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
- package/templates/medical-services/tier5-src/himi-clinic-home/index.ts +389 -0
- package/templates/medical-services/tier5-src/himi-store-account/index.ts +1007 -0
- package/templates/medical-services/tokens.json +418 -0
- package/templates/nonprofit-cause/dev/index.ts +1 -0
- package/templates/nonprofit-cause/tier5-src/_shared/member-access.ts +17 -6
- package/templates/nonprofit-cause/tier5-src/_shared/member-bookings.ts +17 -4
- 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/nonprofit-cause-owner/dev/index.ts +54 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/owner-lite/dev/index.ts +54 -0
- package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- 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 +955 -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 +1 -0
- package/templates/podcast-creator/tier5-src/_shared/member-access.ts +17 -6
- package/templates/podcast-creator/tier5-src/_shared/member-bookings.ts +17 -4
- 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/podcast-creator-owner/dev/index.ts +54 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/portfolio-creative/dev/index.ts +1 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-access.ts +17 -6
- package/templates/portfolio-creative/tier5-src/_shared/member-bookings.ts +17 -4
- 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/portfolio-creative-owner/dev/index.ts +54 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/restaurant/dev/index.ts +1 -0
- package/templates/restaurant/tier5-src/_shared/member-access.ts +17 -6
- package/templates/restaurant/tier5-src/_shared/member-bookings.ts +17 -4
- 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/restaurant-owner/dev/index.ts +54 -0
- package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/retail-store/dev/index.ts +1 -0
- package/templates/retail-store/tier5-src/_shared/member-access.ts +17 -6
- package/templates/retail-store/tier5-src/_shared/member-bookings.ts +17 -4
- 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/retail-store-owner/dev/index.ts +54 -0
- package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
- package/templates/salon-spa/dev/index.ts +1 -0
- 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/_shared/member-bookings.ts +17 -4
- package/templates/salon-spa/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +6 -2
- package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +7 -2
- package/templates/salon-spa/tier5-src/himi-booking-time/index.ts +6 -4
- package/templates/salon-spa/tier5-src/himi-store-account/index.ts +13 -4
- package/templates/wholesale-store/dev/index.ts +1 -0
- 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 -0
- package/templates/yoga-studio/l10n/en.json +6 -0
- package/templates/yoga-studio/l10n/fr.json +11 -0
- package/templates/yoga-studio/l10n/he.json +9 -0
- 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/member-bookings.ts +17 -4
- package/templates/yoga-studio/tier5-src/_shared/source-badges.ts +72 -0
- package/templates/yoga-studio/tier5-src/_shared/staff-name.ts +18 -0
- package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +6 -2
- package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +6 -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
- package/templates/yoga-studio-owner/dev/index.ts +54 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +30 -4
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
{
|
|
2
|
+
"colors": {
|
|
3
|
+
"surfacePrimary": {
|
|
4
|
+
"light": "#F5F3EB",
|
|
5
|
+
"dark": "#1D2019",
|
|
6
|
+
"highContrast": "#FFFFFF"
|
|
7
|
+
},
|
|
8
|
+
"surfaceSecondary": {
|
|
9
|
+
"light": "#EDE8DF",
|
|
10
|
+
"dark": "#282D23",
|
|
11
|
+
"highContrast": "#F5F3EB"
|
|
12
|
+
},
|
|
13
|
+
"surfaceElevated": {
|
|
14
|
+
"light": "#F9F7F0",
|
|
15
|
+
"dark": "#30352A",
|
|
16
|
+
"highContrast": "#F9F7F0"
|
|
17
|
+
},
|
|
18
|
+
"surfaceSubtle": {
|
|
19
|
+
"light": "#EEEADF",
|
|
20
|
+
"dark": "#252B20",
|
|
21
|
+
"highContrast": "#F0F0E8"
|
|
22
|
+
},
|
|
23
|
+
"surfaceTertiary": {
|
|
24
|
+
"light": "#E4DECC",
|
|
25
|
+
"dark": "#343B2C",
|
|
26
|
+
"highContrast": "#E4DECC"
|
|
27
|
+
},
|
|
28
|
+
"textPrimary": {
|
|
29
|
+
"light": "#292626",
|
|
30
|
+
"dark": "#F5F3EB",
|
|
31
|
+
"highContrast": "#151510"
|
|
32
|
+
},
|
|
33
|
+
"textSecondary": {
|
|
34
|
+
"light": "#626154",
|
|
35
|
+
"dark": "#C8C7B7",
|
|
36
|
+
"highContrast": "#35352B"
|
|
37
|
+
},
|
|
38
|
+
"textTertiary": {
|
|
39
|
+
"light": "#72705F",
|
|
40
|
+
"dark": "#B8B6A6",
|
|
41
|
+
"highContrast": "#72705F"
|
|
42
|
+
},
|
|
43
|
+
"textOnAccent": {
|
|
44
|
+
"light": "#FFFFFF",
|
|
45
|
+
"dark": "#242718",
|
|
46
|
+
"highContrast": "#FFFFFF"
|
|
47
|
+
},
|
|
48
|
+
"accentPrimary": {
|
|
49
|
+
"light": "#57532A",
|
|
50
|
+
"dark": "#C8C18C",
|
|
51
|
+
"highContrast": "#454118"
|
|
52
|
+
},
|
|
53
|
+
"accentSecondary": {
|
|
54
|
+
"light": "#82695D",
|
|
55
|
+
"dark": "#BBA398",
|
|
56
|
+
"highContrast": "#82695D"
|
|
57
|
+
},
|
|
58
|
+
"accentSurface": {
|
|
59
|
+
"light": "#E9E6CD",
|
|
60
|
+
"dark": "#363D2A",
|
|
61
|
+
"highContrast": "#E9E6CD"
|
|
62
|
+
},
|
|
63
|
+
"success": {
|
|
64
|
+
"light": "#008A2E",
|
|
65
|
+
"dark": "#33E633",
|
|
66
|
+
"highContrast": "#3FB950"
|
|
67
|
+
},
|
|
68
|
+
"successSurface": {
|
|
69
|
+
"light": "#D6FFD6",
|
|
70
|
+
"dark": "#112911",
|
|
71
|
+
"highContrast": "#FFFFFF"
|
|
72
|
+
},
|
|
73
|
+
"warning": {
|
|
74
|
+
"light": "#7A4D00",
|
|
75
|
+
"dark": "#FFB300",
|
|
76
|
+
"highContrast": "#D29922"
|
|
77
|
+
},
|
|
78
|
+
"warningSurface": {
|
|
79
|
+
"light": "#FFF3C2",
|
|
80
|
+
"dark": "#292109",
|
|
81
|
+
"highContrast": "#FFFFFF"
|
|
82
|
+
},
|
|
83
|
+
"danger": {
|
|
84
|
+
"light": "#D60000",
|
|
85
|
+
"dark": "#FF3333",
|
|
86
|
+
"highContrast": "#FF5555"
|
|
87
|
+
},
|
|
88
|
+
"dangerSurface": {
|
|
89
|
+
"light": "#FFD6D6",
|
|
90
|
+
"dark": "#291111",
|
|
91
|
+
"highContrast": "#FFFFFF"
|
|
92
|
+
},
|
|
93
|
+
"border": {
|
|
94
|
+
"light": "#DDD8C6",
|
|
95
|
+
"dark": "#444A3B",
|
|
96
|
+
"highContrast": "#DDD8C6"
|
|
97
|
+
},
|
|
98
|
+
"accentText": {
|
|
99
|
+
"light": "#57532A",
|
|
100
|
+
"dark": "#D9D29B",
|
|
101
|
+
"highContrast": "#57532A"
|
|
102
|
+
},
|
|
103
|
+
"accentSoft": {
|
|
104
|
+
"light": "#E9E6CD",
|
|
105
|
+
"dark": "#363D2A",
|
|
106
|
+
"highContrast": "#E9E6CD"
|
|
107
|
+
},
|
|
108
|
+
"heroText": {
|
|
109
|
+
"light": "#FFFFFF",
|
|
110
|
+
"dark": "#FFFFFF",
|
|
111
|
+
"highContrast": "#FFFFFF"
|
|
112
|
+
},
|
|
113
|
+
"heroScrim": {
|
|
114
|
+
"light": "#29261699",
|
|
115
|
+
"dark": "#16191299",
|
|
116
|
+
"highContrast": "#29261699"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"spacing": {
|
|
120
|
+
"xs": 4,
|
|
121
|
+
"sm": 8,
|
|
122
|
+
"md": 12,
|
|
123
|
+
"lg": 16,
|
|
124
|
+
"xl": 24
|
|
125
|
+
},
|
|
126
|
+
"typography": {
|
|
127
|
+
"pageTitle": {
|
|
128
|
+
"size": 28,
|
|
129
|
+
"weight": 400,
|
|
130
|
+
"line": 1.25,
|
|
131
|
+
"letterSpacing": 0
|
|
132
|
+
},
|
|
133
|
+
"title1": {
|
|
134
|
+
"family": "Georgia",
|
|
135
|
+
"size": 28,
|
|
136
|
+
"weight": 400,
|
|
137
|
+
"line": 1.15
|
|
138
|
+
},
|
|
139
|
+
"title2": {
|
|
140
|
+
"family": "Georgia",
|
|
141
|
+
"size": 24,
|
|
142
|
+
"weight": 400,
|
|
143
|
+
"line": 1.2
|
|
144
|
+
},
|
|
145
|
+
"title3": {
|
|
146
|
+
"family": "Georgia",
|
|
147
|
+
"size": 21,
|
|
148
|
+
"weight": 400,
|
|
149
|
+
"line": 1.25
|
|
150
|
+
},
|
|
151
|
+
"body": {
|
|
152
|
+
"family": "Wix Madefor Text",
|
|
153
|
+
"size": 16,
|
|
154
|
+
"weight": 400,
|
|
155
|
+
"line": 1.5
|
|
156
|
+
},
|
|
157
|
+
"bodyEmphasis": {
|
|
158
|
+
"family": "Wix Madefor Text",
|
|
159
|
+
"size": 16,
|
|
160
|
+
"weight": 600,
|
|
161
|
+
"line": 1.4
|
|
162
|
+
},
|
|
163
|
+
"footnote": {
|
|
164
|
+
"size": 13,
|
|
165
|
+
"weight": 500,
|
|
166
|
+
"line": 1.3,
|
|
167
|
+
"letterSpacing": 0,
|
|
168
|
+
"family": "Wix Madefor Text"
|
|
169
|
+
},
|
|
170
|
+
"footnoteRegular": {
|
|
171
|
+
"size": 14,
|
|
172
|
+
"weight": 400,
|
|
173
|
+
"line": 1.4,
|
|
174
|
+
"letterSpacing": 1
|
|
175
|
+
},
|
|
176
|
+
"caption": {
|
|
177
|
+
"family": "Wix Madefor Text",
|
|
178
|
+
"size": 13,
|
|
179
|
+
"weight": 400,
|
|
180
|
+
"line": 1.35
|
|
181
|
+
},
|
|
182
|
+
"display": {
|
|
183
|
+
"size": 44,
|
|
184
|
+
"weight": 800,
|
|
185
|
+
"line": 1.1,
|
|
186
|
+
"letterSpacing": -1,
|
|
187
|
+
"family": "Wix Madefor Display"
|
|
188
|
+
},
|
|
189
|
+
"heroTitle": {
|
|
190
|
+
"size": 38,
|
|
191
|
+
"weight": 800,
|
|
192
|
+
"line": 1.1,
|
|
193
|
+
"letterSpacing": -0.8,
|
|
194
|
+
"family": "Wix Madefor Display"
|
|
195
|
+
},
|
|
196
|
+
"largeTitle": {
|
|
197
|
+
"family": "Georgia",
|
|
198
|
+
"size": 42,
|
|
199
|
+
"weight": 400,
|
|
200
|
+
"line": 1.05
|
|
201
|
+
},
|
|
202
|
+
"headline": {
|
|
203
|
+
"family": "Wix Madefor Text",
|
|
204
|
+
"size": 17,
|
|
205
|
+
"weight": 600,
|
|
206
|
+
"line": 1.3
|
|
207
|
+
},
|
|
208
|
+
"pricingTitle": {
|
|
209
|
+
"family": "Georgia",
|
|
210
|
+
"size": 28,
|
|
211
|
+
"weight": 400,
|
|
212
|
+
"line": 1.15
|
|
213
|
+
},
|
|
214
|
+
"pricingSection": {
|
|
215
|
+
"family": "Wix Madefor Text",
|
|
216
|
+
"size": 17,
|
|
217
|
+
"weight": 600,
|
|
218
|
+
"line": 1.3
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"controls": {
|
|
222
|
+
"button": {
|
|
223
|
+
"variants": {
|
|
224
|
+
"tertiary": {
|
|
225
|
+
"label": "textPrimary"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"radius": {
|
|
231
|
+
"sm": 3,
|
|
232
|
+
"md": 6,
|
|
233
|
+
"lg": 8,
|
|
234
|
+
"pill": 0
|
|
235
|
+
},
|
|
236
|
+
"kit": {
|
|
237
|
+
"material": "flat",
|
|
238
|
+
"density": "comfortable",
|
|
239
|
+
"motion": "smooth"
|
|
240
|
+
},
|
|
241
|
+
"shadows": {
|
|
242
|
+
"sm": {
|
|
243
|
+
"color": "#000000",
|
|
244
|
+
"opacity": 0.08,
|
|
245
|
+
"radius": 6,
|
|
246
|
+
"x": 0,
|
|
247
|
+
"y": 2
|
|
248
|
+
},
|
|
249
|
+
"md": {
|
|
250
|
+
"color": "#000000",
|
|
251
|
+
"opacity": 0.12,
|
|
252
|
+
"radius": 16,
|
|
253
|
+
"x": 0,
|
|
254
|
+
"y": 6
|
|
255
|
+
},
|
|
256
|
+
"lg": {
|
|
257
|
+
"color": "#000000",
|
|
258
|
+
"opacity": 0.16,
|
|
259
|
+
"radius": 28,
|
|
260
|
+
"x": 0,
|
|
261
|
+
"y": 12
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"gradients": {
|
|
265
|
+
"brand": {
|
|
266
|
+
"colors": [
|
|
267
|
+
"accentPrimary",
|
|
268
|
+
"accentSecondary"
|
|
269
|
+
],
|
|
270
|
+
"angle": 135
|
|
271
|
+
},
|
|
272
|
+
"subtle": {
|
|
273
|
+
"colors": [
|
|
274
|
+
"surfaceSecondary",
|
|
275
|
+
"surfacePrimary"
|
|
276
|
+
],
|
|
277
|
+
"angle": 180
|
|
278
|
+
},
|
|
279
|
+
"hero": {
|
|
280
|
+
"colors": [
|
|
281
|
+
"accentSurface",
|
|
282
|
+
"surfacePrimary"
|
|
283
|
+
],
|
|
284
|
+
"angle": 160
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"materials": {
|
|
288
|
+
"flat": {
|
|
289
|
+
"style": "flat",
|
|
290
|
+
"tint": "surfaceSecondary",
|
|
291
|
+
"opacity": 1
|
|
292
|
+
},
|
|
293
|
+
"glass": {
|
|
294
|
+
"style": "glass",
|
|
295
|
+
"tint": "surfaceSecondary",
|
|
296
|
+
"opacity": 0.6,
|
|
297
|
+
"blur": 20
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"motions": {
|
|
301
|
+
"smooth": {
|
|
302
|
+
"duration": 250,
|
|
303
|
+
"easing": "easeInOut"
|
|
304
|
+
},
|
|
305
|
+
"bouncy": {
|
|
306
|
+
"duration": 420,
|
|
307
|
+
"easing": "spring"
|
|
308
|
+
},
|
|
309
|
+
"quick": {
|
|
310
|
+
"duration": 140,
|
|
311
|
+
"easing": "easeOut"
|
|
312
|
+
},
|
|
313
|
+
"appearSoft": {
|
|
314
|
+
"duration": 500,
|
|
315
|
+
"easing": "easeOut"
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"tabBar": {
|
|
319
|
+
"background": {
|
|
320
|
+
"color": "surfacePrimary"
|
|
321
|
+
},
|
|
322
|
+
"shape": {
|
|
323
|
+
"kind": "full",
|
|
324
|
+
"inset": 12,
|
|
325
|
+
"cornerRadius": 26
|
|
326
|
+
},
|
|
327
|
+
"selectedIndicator": {
|
|
328
|
+
"kind": "colorOnly",
|
|
329
|
+
"color": "accentPrimary"
|
|
330
|
+
},
|
|
331
|
+
"activeTint": "accentPrimary",
|
|
332
|
+
"inactiveTint": "textPrimary",
|
|
333
|
+
"labels": {
|
|
334
|
+
"show": true,
|
|
335
|
+
"typography": "caption"
|
|
336
|
+
},
|
|
337
|
+
"iconSize": 22,
|
|
338
|
+
"motion": "crisp",
|
|
339
|
+
"border": {
|
|
340
|
+
"topHairline": true,
|
|
341
|
+
"color": "border",
|
|
342
|
+
"width": 1
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"drawer": {
|
|
346
|
+
"background": {
|
|
347
|
+
"color": "surfaceSecondary"
|
|
348
|
+
},
|
|
349
|
+
"width": 300,
|
|
350
|
+
"activeTint": "accentPrimary",
|
|
351
|
+
"inactiveTint": "textSecondary",
|
|
352
|
+
"selectedIndicator": {
|
|
353
|
+
"kind": "pill",
|
|
354
|
+
"color": "accentPrimary"
|
|
355
|
+
},
|
|
356
|
+
"labels": {
|
|
357
|
+
"show": true,
|
|
358
|
+
"typography": "body"
|
|
359
|
+
},
|
|
360
|
+
"iconSize": 22,
|
|
361
|
+
"edgeInsets": 12,
|
|
362
|
+
"motion": "smooth"
|
|
363
|
+
},
|
|
364
|
+
"contentMaxWidth": {
|
|
365
|
+
"base": 480,
|
|
366
|
+
"medium": 600,
|
|
367
|
+
"expanded": 760
|
|
368
|
+
},
|
|
369
|
+
"idiom": {
|
|
370
|
+
"ios": {
|
|
371
|
+
"radius": {
|
|
372
|
+
"md": 6
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"material": {
|
|
376
|
+
"radius": {
|
|
377
|
+
"md": 8
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
@@ -8,6 +8,7 @@ const runtimeSetting = (value: unknown): unknown => {
|
|
|
8
8
|
if (value === "__HIMI_PODCAST_FEED_URL__") return process.env.PODCAST_FEED_URL?.trim() || "";
|
|
9
9
|
if (value === "__HIMI_MEMBER_PHOTO_UPLOAD_FUNCTION__") return process.env.HIMI_BRANDED_LITE_MEMBER_PHOTO_UPLOAD_FUNCTION?.trim() || "";
|
|
10
10
|
if (value === "__HIMI_MEMBER_SITE_URL__") return String((config as { auth?: { config?: { siteUrl?: unknown } } }).auth?.config?.siteUrl ?? "").trim();
|
|
11
|
+
if (typeof value === "string" && value.startsWith("__HIMI_MEMBER_SITE_URL__/")) return String((config as { auth?: { config?: { siteUrl?: unknown } } }).auth?.config?.siteUrl ?? "").trim().replace(/\/+$/, "") + value.slice(24);
|
|
11
12
|
if (Array.isArray(value)) return value.map(runtimeSetting);
|
|
12
13
|
if (!value || typeof value !== "object") return value;
|
|
13
14
|
return Object.fromEntries(Object.entries(value).map(([key, child]) => [key, runtimeSetting(child)]));
|
|
@@ -1,33 +1,44 @@
|
|
|
1
1
|
import { dispatch } from "@himalaya/dispatch";
|
|
2
2
|
import { getMyData } from "@himalaya/wix-users";
|
|
3
3
|
|
|
4
|
-
export interface MemberAccess { email: string; scope: string; }
|
|
4
|
+
export interface MemberAccess { email: string; scope: string; signedIn?: boolean; }
|
|
5
5
|
export function memberAccessChanged(): Error {
|
|
6
6
|
const error = new Error("Member access changed"); error.name = "MemberAccessChanged"; return error;
|
|
7
7
|
}
|
|
8
|
-
export async function memberAccess(): Promise<MemberAccess> {
|
|
8
|
+
export async function memberAccess(options: { throwOnUnavailable?: boolean } = {}): Promise<MemberAccess> {
|
|
9
9
|
let email = "";
|
|
10
|
+
let signedIn = false;
|
|
10
11
|
let identityUnavailable = false;
|
|
11
12
|
try {
|
|
12
|
-
const value = await dispatch("himi.wix.memberIdentity") as { email?: unknown; payload?: { email?: unknown } } | null;
|
|
13
|
+
const value = await dispatch("himi.wix.memberIdentity") as { status?: unknown; ok?: unknown; email?: unknown; signedIn?: unknown; payload?: { email?: unknown; signedIn?: unknown } } | null;
|
|
14
|
+
if (value?.status === "error" || value?.ok === false) throw value;
|
|
13
15
|
const raw = value?.email ?? value?.payload?.email;
|
|
14
16
|
email = typeof raw === "string" ? raw.trim().toLowerCase() : "";
|
|
17
|
+
signedIn = (value?.signedIn ?? value?.payload?.signedIn) === true;
|
|
15
18
|
} catch { identityUnavailable = true; }
|
|
16
19
|
// Older native hosts predate the memberIdentity action but can still expose
|
|
17
20
|
// the authenticated profile through wix-users. Only a missing action uses
|
|
18
|
-
// that rung
|
|
21
|
+
// that rung. A successful host response is authoritative, including a signed-in
|
|
22
|
+
// session whose email has not arrived yet; it must not consult owner records.
|
|
19
23
|
if (!email && identityUnavailable) {
|
|
20
24
|
try {
|
|
21
25
|
const profile = await getMyData();
|
|
22
26
|
const raw = profile.email ?? profile.contactEmail;
|
|
23
27
|
email = typeof raw === "string" ? raw.trim().toLowerCase() : "";
|
|
24
|
-
} catch {
|
|
28
|
+
} catch (error) {
|
|
29
|
+
const failure = error as { status?: unknown; statusCode?: unknown; code?: unknown } | null;
|
|
30
|
+
const anonymous = failure?.status === 401 || failure?.statusCode === 401 || failure?.code === "UNAUTHENTICATED";
|
|
31
|
+
// Legacy bridges can lose the structured status. An unknown failure is
|
|
32
|
+
// unavailable in strict consumers, never evidence of a signed-out session.
|
|
33
|
+
if (options.throwOnUnavailable && !anonymous) throw error;
|
|
34
|
+
}
|
|
25
35
|
}
|
|
26
36
|
const input = (globalThis as { himalaya?: { input?: Record<string, unknown> } }).himalaya?.input;
|
|
27
37
|
const account = input?.__himiPreferenceAccount, business = input?.__himiPreferenceBusiness;
|
|
28
38
|
const valid = (v: unknown): v is string => typeof v === "string" && /^[A-Za-z0-9_.:-]{1,128}$/.test(v) && v !== "default";
|
|
29
39
|
// These fields are overwritten by authenticated hosts. Older binaries stay online-only.
|
|
30
|
-
|
|
40
|
+
// A session signal does not grant an email-scoped cache or private query.
|
|
41
|
+
return { email, signedIn: signedIn || Boolean(email), scope: email && valid(account) && valid(business) ? JSON.stringify([account, business, email]) : "" };
|
|
31
42
|
}
|
|
32
43
|
export async function assertMemberAccess(member: MemberAccess): Promise<void> {
|
|
33
44
|
const current = await memberAccess();
|
|
@@ -10,6 +10,17 @@ import { dayKey } from "@himalaya/time";
|
|
|
10
10
|
* booking is in exactly one tab. */
|
|
11
11
|
export const CANCELLED_STATUSES = ["CANCELED", "CANCELLED", "DECLINED"];
|
|
12
12
|
|
|
13
|
+
/** Wix made the booking, but no checkout confirmed it: a paid booking the member did not pay
|
|
14
|
+
* for, or left in the payment page, stays here. It holds no place and the business does not
|
|
15
|
+
* see it in its booking calendar, so it is not an appointment. */
|
|
16
|
+
export const UNCONFIRMED_STATUSES = ["CREATED"];
|
|
17
|
+
|
|
18
|
+
export interface FetchMemberBookingsOptions {
|
|
19
|
+
/** Keep the unconfirmed bookings (`UNCONFIRMED_STATUSES`). Only a list that marks them as
|
|
20
|
+
* not confirmed may ask for them; Home and every count leave them out. */
|
|
21
|
+
includeUnconfirmed?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
export interface MemberBookingRow {
|
|
14
25
|
id: string; title: string; subtitle: string; status: string; revision: string;
|
|
15
26
|
start: string; end: string; day: string; serviceId: string;
|
|
@@ -70,7 +81,7 @@ export function memberBookingRow(booking: WixBooking): MemberBookingRow {
|
|
|
70
81
|
courseStart: instant(schedule?.firstSessionStart),
|
|
71
82
|
courseEnd: instant(schedule?.lastSessionEnd) };
|
|
72
83
|
}
|
|
73
|
-
export async function fetchMemberBookings(criteria: CollectionQuery, cursor: string, now: string, expected?: MemberAccess) {
|
|
84
|
+
export async function fetchMemberBookings(criteria: CollectionQuery, cursor: string, now: string, expected?: MemberAccess, options: FetchMemberBookingsOptions = {}) {
|
|
74
85
|
const member = expected ?? await memberAccess();
|
|
75
86
|
const metadata = { email: member.email, scope: member.scope, needsSignIn: !member.email };
|
|
76
87
|
if (!member.email) return { items: [] as MemberBookingRow[], nextCursor: "", metadata };
|
|
@@ -79,9 +90,10 @@ export async function fetchMemberBookings(criteria: CollectionQuery, cursor: str
|
|
|
79
90
|
const filter: Record<string, unknown> = { "contactDetails.email": { $eq: member.email } };
|
|
80
91
|
if (criteria.query) filter.id = { $eq: criteria.query };
|
|
81
92
|
if (criteria.filter === "saved") filter.id = criteria.query ? { $in: criteria.savedIds.filter(id => id === criteria.query) } : { $in: criteria.savedIds };
|
|
82
|
-
|
|
93
|
+
const notListed = options.includeUnconfirmed ? CANCELLED_STATUSES : [...CANCELLED_STATUSES, ...UNCONFIRMED_STATUSES];
|
|
94
|
+
if (criteria.filter === "value:Upcoming") { filter.startDate = { $gte: now }; filter.status = { $nin: notListed }; }
|
|
83
95
|
// Past is what took place: a canceled or declined booking is in the Canceled tab only.
|
|
84
|
-
if (criteria.filter === "value:Past") { filter.startDate = { $lt: now }; filter.status = { $nin:
|
|
96
|
+
if (criteria.filter === "value:Past") { filter.startDate = { $lt: now }; filter.status = { $nin: notListed }; }
|
|
85
97
|
if (criteria.filter === "value:Cancelled") filter.status = { $in: CANCELLED_STATUSES };
|
|
86
98
|
const response = await queryBookings({ query: { filter, paging: { limit: 50, offset: Number(cursor || 0) },
|
|
87
99
|
sort: [{ fieldName: "startDate", order: criteria.sort === "za" ? "DESC" : "ASC" }, { fieldName: "id", order: "ASC" }] } });
|
|
@@ -89,6 +101,7 @@ export async function fetchMemberBookings(criteria: CollectionQuery, cursor: str
|
|
|
89
101
|
const raw = response.bookings ?? [];
|
|
90
102
|
// Server authorization remains authoritative. This guard also rejects a
|
|
91
103
|
// malformed/cross-member row before any UI projection. No private disk cache.
|
|
92
|
-
const items = raw.filter(booking => booking.id && booking.contactDetails?.email?.trim().toLowerCase() === member.email).map(memberBookingRow)
|
|
104
|
+
const items = raw.filter(booking => booking.id && booking.contactDetails?.email?.trim().toLowerCase() === member.email).map(memberBookingRow)
|
|
105
|
+
.filter(row => options.includeUnconfirmed || !UNCONFIRMED_STATUSES.includes(row.statusKey));
|
|
93
106
|
return { items, ...offsetPage(cursor, raw.length, 50, response.pagingMetadata), metadata };
|
|
94
107
|
}
|
|
@@ -565,6 +565,9 @@ interface S extends IapRestoreFields {
|
|
|
565
565
|
lastNameFocus: string;
|
|
566
566
|
emailFocus: string;
|
|
567
567
|
message: string;
|
|
568
|
+
hideMessage: boolean;
|
|
569
|
+
messageKind: "error" | "success";
|
|
570
|
+
resetSent: boolean;
|
|
568
571
|
isLoading: boolean;
|
|
569
572
|
notLoading: boolean;
|
|
570
573
|
isRegistering: boolean;
|
|
@@ -640,6 +643,9 @@ function derive(s: S): S {
|
|
|
640
643
|
const name = s.isMember ? greetingName(s.memberName) : "";
|
|
641
644
|
return {
|
|
642
645
|
...s,
|
|
646
|
+
hideMessage: !s.message,
|
|
647
|
+
messageKind: s.resetSent ? "success" : "error",
|
|
648
|
+
resetSent: !!s.message && !!s.resetSent,
|
|
643
649
|
greeting: name
|
|
644
650
|
? copyTemplate("storeAccount.greetingMember", "Hey, {name}", { name })
|
|
645
651
|
: copyParam("storeAccount.greetingGuest", "Hey, guest"),
|
|
@@ -815,7 +821,7 @@ const svc = defineService<S, {
|
|
|
815
821
|
restorePublish: (s: S) => S;
|
|
816
822
|
iapRestore: (s: S) => Promise<undefined>;
|
|
817
823
|
}>("himiStoreAccount", {
|
|
818
|
-
notHydrated: ["password", "authBusy", "emailError", "passwordError", "passwordFocus", "lastNameFocus", "emailFocus", ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, ...IAP_RESTORE_KEYS],
|
|
824
|
+
notHydrated: ["message", "hideMessage", "messageKind", "resetSent", "password", "authBusy", "emailError", "passwordError", "passwordFocus", "lastNameFocus", "emailFocus", ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, ...IAP_RESTORE_KEYS],
|
|
819
825
|
state: derive({
|
|
820
826
|
status: "loading",
|
|
821
827
|
isMember: false,
|
|
@@ -846,6 +852,9 @@ const svc = defineService<S, {
|
|
|
846
852
|
lastNameFocus: "",
|
|
847
853
|
emailFocus: "",
|
|
848
854
|
message: "",
|
|
855
|
+
hideMessage: true,
|
|
856
|
+
messageKind: "error",
|
|
857
|
+
resetSent: false,
|
|
849
858
|
isLoading: true,
|
|
850
859
|
notLoading: false,
|
|
851
860
|
// The form's first paint is already on its route's mode: only sign-in's route has `mode`.
|
|
@@ -942,10 +951,10 @@ const svc = defineService<S, {
|
|
|
942
951
|
rejectResult(raw, "reset");
|
|
943
952
|
if (revision !== editRevision) return derive({ ...svc.getState(), authBusy: false });
|
|
944
953
|
return derive({ ...svc.getState(), authBusy: false, isRecovering: false,
|
|
945
|
-
message: copyParam("storeAccount.resetSent", "If that email is registered, a reset link is on its way.") });
|
|
954
|
+
resetSent: true, message: copyParam("storeAccount.resetSent", "If that email is registered, a reset link is on its way.") });
|
|
946
955
|
} catch (error) {
|
|
947
956
|
return derive({ ...svc.getState(), authBusy: false,
|
|
948
|
-
message: revision === editRevision ? authFailure(error, "reset", translated).reason : "" });
|
|
957
|
+
resetSent: false, message: revision === editRevision ? authFailure(error, "reset", translated).reason : "" });
|
|
949
958
|
} finally { authInFlight = false; }
|
|
950
959
|
},
|
|
951
960
|
signIn: (s) => authenticate(s, "signIn"),
|
|
@@ -991,7 +1000,7 @@ const svc = defineService<S, {
|
|
|
991
1000
|
},
|
|
992
1001
|
});
|
|
993
1002
|
|
|
994
|
-
resetUnhydratedKeysOnOlderRuntime(svc, derive({ ...svc.getState(), ...NO_IAP_RESTORE, ...NO_VISIT, ...NO_FOCUS_ALL, passwordFocus: "", isRegistering: ROUTE_ASKS_REGISTER }), [...IAP_RESTORE_KEYS, ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, "lastNameFocus", "emailFocus", "passwordFocus"]);
|
|
1003
|
+
resetUnhydratedKeysOnOlderRuntime(svc, derive({ ...svc.getState(), ...NO_IAP_RESTORE, ...NO_VISIT, ...NO_FOCUS_ALL, message: "", resetSent: false, passwordFocus: "", isRegistering: ROUTE_ASKS_REGISTER }), ["message", "hideMessage", "messageKind", "resetSent", ...IAP_RESTORE_KEYS, ...VISIT_KEYS, ...VISIT_DERIVED_KEYS, "lastNameFocus", "emailFocus", "passwordFocus"]);
|
|
995
1004
|
// `boot` tells settle this is not a visit: the host drops this call's navigation, and the
|
|
996
1005
|
// appear refresh does the visit's moves.
|
|
997
1006
|
svc.load({ boot: "1" });
|