@wix/himalaya-cli 0.1899.0 → 0.1901.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/app-config.d.ts +4 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/app-info/src/index.d.ts +1 -1
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{3c8ce407707a87e172345007371329f9c47e65e182a1e2ff617b7f75e6bb95ab.bin → e8580dd7946999b652493628a07600d2e5a0c7864cc0a8a807b8a20903f0698d.bin} +1 -1
- package/dist/browser-plane/sw.js +9 -9
- package/dist/cli.mjs +75775 -74157
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/ads.md +92 -0
- package/guides/himi-json-output.md +37 -2
- package/guides/index.json +6 -0
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +2 -1
- package/templates/beauty-salon/l10n/ar.json +5 -0
- package/templates/beauty-salon/l10n/cs.json +5 -0
- package/templates/beauty-salon/l10n/da.json +5 -0
- package/templates/beauty-salon/l10n/de.json +5 -0
- package/templates/beauty-salon/l10n/el.json +5 -0
- package/templates/beauty-salon/l10n/es.json +5 -0
- package/templates/beauty-salon/l10n/fi.json +5 -0
- package/templates/beauty-salon/l10n/fr.json +5 -0
- package/templates/beauty-salon/l10n/he.json +4 -0
- package/templates/beauty-salon/l10n/hu.json +5 -0
- package/templates/beauty-salon/l10n/id.json +5 -0
- package/templates/beauty-salon/l10n/it.json +5 -0
- package/templates/beauty-salon/l10n/ja.json +5 -0
- package/templates/beauty-salon/l10n/ko.json +5 -0
- package/templates/beauty-salon/l10n/lt.json +5 -0
- package/templates/beauty-salon/l10n/nl.json +5 -0
- package/templates/beauty-salon/l10n/no.json +5 -0
- package/templates/beauty-salon/l10n/pl.json +5 -0
- package/templates/beauty-salon/l10n/pt.json +5 -0
- package/templates/beauty-salon/l10n/ru.json +5 -0
- package/templates/beauty-salon/l10n/sv.json +5 -0
- package/templates/beauty-salon/l10n/th.json +5 -0
- package/templates/beauty-salon/l10n/tr.json +5 -0
- package/templates/beauty-salon/l10n/uk.json +5 -0
- package/templates/beauty-salon/l10n/vi.json +5 -0
- package/templates/beauty-salon/l10n/zh.json +5 -0
- package/templates/beauty-salon/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/beauty-salon/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/beauty-salon/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/beauty-salon-owner/config.ts +32 -1
- package/templates/beauty-salon-owner/dev/index.ts +565 -1
- package/templates/beauty-salon-owner/himalaya.content.json +3 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/beauty-salon-owner/tier5-src/wix-owner-booking/index.ts +9 -3
- package/templates/branded-lite/dev/index.ts +2 -1
- package/templates/branded-lite/l10n/ar.json +5 -0
- package/templates/branded-lite/l10n/cs.json +5 -0
- package/templates/branded-lite/l10n/da.json +5 -0
- package/templates/branded-lite/l10n/de.json +5 -0
- package/templates/branded-lite/l10n/el.json +5 -0
- package/templates/branded-lite/l10n/es.json +5 -0
- package/templates/branded-lite/l10n/fi.json +5 -0
- package/templates/branded-lite/l10n/fr.json +5 -0
- package/templates/branded-lite/l10n/he.json +4 -0
- package/templates/branded-lite/l10n/hu.json +5 -0
- package/templates/branded-lite/l10n/id.json +5 -0
- package/templates/branded-lite/l10n/it.json +5 -0
- package/templates/branded-lite/l10n/ja.json +5 -0
- package/templates/branded-lite/l10n/ko.json +5 -0
- package/templates/branded-lite/l10n/lt.json +5 -0
- package/templates/branded-lite/l10n/nl.json +5 -0
- package/templates/branded-lite/l10n/no.json +5 -0
- package/templates/branded-lite/l10n/pl.json +5 -0
- package/templates/branded-lite/l10n/pt.json +5 -0
- package/templates/branded-lite/l10n/ru.json +5 -0
- package/templates/branded-lite/l10n/sv.json +5 -0
- package/templates/branded-lite/l10n/th.json +5 -0
- package/templates/branded-lite/l10n/tr.json +5 -0
- package/templates/branded-lite/l10n/uk.json +5 -0
- package/templates/branded-lite/l10n/vi.json +5 -0
- package/templates/branded-lite/l10n/zh.json +5 -0
- package/templates/branded-lite/recipes/events-inline.json +2 -2
- package/templates/branded-lite/recipes/subscriptions-list.json +2 -1
- package/templates/branded-lite/tier5-src/_shared/my-subscriptions-section.ts +6 -8
- package/templates/branded-lite/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/branded-lite/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/branded-lite/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/brandy/dev/member-screens.ts +4 -2
- package/templates/brandy/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/brandy/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/brandy/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/community-club-owner/config.ts +32 -1
- package/templates/community-club-owner/dev/index.ts +538 -1
- package/templates/community-club-owner/himalaya.content.json +3 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/community-club-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/events-meetups-owner/config.ts +32 -1
- package/templates/events-meetups-owner/dev/index.ts +511 -1
- package/templates/events-meetups-owner/himalaya.content.json +3 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/fitness-gym/dev/index.ts +2 -1
- package/templates/fitness-gym/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/fitness-gym/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/gym-fitness/dev/index.ts +2 -1
- package/templates/gym-fitness/l10n/ar.json +5 -0
- package/templates/gym-fitness/l10n/cs.json +5 -0
- package/templates/gym-fitness/l10n/da.json +5 -0
- package/templates/gym-fitness/l10n/de.json +5 -0
- package/templates/gym-fitness/l10n/el.json +5 -0
- package/templates/gym-fitness/l10n/es.json +5 -0
- package/templates/gym-fitness/l10n/fi.json +5 -0
- package/templates/gym-fitness/l10n/fr.json +5 -0
- package/templates/gym-fitness/l10n/he.json +4 -0
- package/templates/gym-fitness/l10n/hu.json +5 -0
- package/templates/gym-fitness/l10n/id.json +5 -0
- package/templates/gym-fitness/l10n/it.json +5 -0
- package/templates/gym-fitness/l10n/ja.json +5 -0
- package/templates/gym-fitness/l10n/ko.json +5 -0
- package/templates/gym-fitness/l10n/lt.json +5 -0
- package/templates/gym-fitness/l10n/nl.json +5 -0
- package/templates/gym-fitness/l10n/no.json +5 -0
- package/templates/gym-fitness/l10n/pl.json +5 -0
- package/templates/gym-fitness/l10n/pt.json +5 -0
- package/templates/gym-fitness/l10n/ru.json +5 -0
- package/templates/gym-fitness/l10n/sv.json +5 -0
- package/templates/gym-fitness/l10n/th.json +5 -0
- package/templates/gym-fitness/l10n/tr.json +5 -0
- package/templates/gym-fitness/l10n/uk.json +5 -0
- package/templates/gym-fitness/l10n/vi.json +5 -0
- package/templates/gym-fitness/l10n/zh.json +5 -0
- package/templates/gym-fitness/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/gym-fitness/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/gym-fitness/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/gym-fitness-owner/config.ts +32 -1
- package/templates/gym-fitness-owner/dev/index.ts +565 -1
- package/templates/gym-fitness-owner/himalaya.content.json +3 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/gym-fitness-owner/tier5-src/wix-owner-booking/index.ts +9 -3
- package/templates/nonprofit-cause/dev/index.ts +2 -1
- package/templates/nonprofit-cause/l10n/ar.json +5 -0
- package/templates/nonprofit-cause/l10n/cs.json +5 -0
- package/templates/nonprofit-cause/l10n/da.json +5 -0
- package/templates/nonprofit-cause/l10n/de.json +5 -0
- package/templates/nonprofit-cause/l10n/el.json +5 -0
- package/templates/nonprofit-cause/l10n/es.json +5 -0
- package/templates/nonprofit-cause/l10n/fi.json +5 -0
- package/templates/nonprofit-cause/l10n/fr.json +5 -0
- package/templates/nonprofit-cause/l10n/he.json +4 -0
- package/templates/nonprofit-cause/l10n/hu.json +5 -0
- package/templates/nonprofit-cause/l10n/id.json +5 -0
- package/templates/nonprofit-cause/l10n/it.json +5 -0
- package/templates/nonprofit-cause/l10n/ja.json +5 -0
- package/templates/nonprofit-cause/l10n/ko.json +5 -0
- package/templates/nonprofit-cause/l10n/lt.json +5 -0
- package/templates/nonprofit-cause/l10n/nl.json +5 -0
- package/templates/nonprofit-cause/l10n/no.json +5 -0
- package/templates/nonprofit-cause/l10n/pl.json +5 -0
- package/templates/nonprofit-cause/l10n/pt.json +5 -0
- package/templates/nonprofit-cause/l10n/ru.json +5 -0
- package/templates/nonprofit-cause/l10n/sv.json +5 -0
- package/templates/nonprofit-cause/l10n/th.json +5 -0
- package/templates/nonprofit-cause/l10n/tr.json +5 -0
- package/templates/nonprofit-cause/l10n/uk.json +5 -0
- package/templates/nonprofit-cause/l10n/vi.json +5 -0
- package/templates/nonprofit-cause/l10n/zh.json +5 -0
- package/templates/nonprofit-cause/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/nonprofit-cause/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/nonprofit-cause/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/nonprofit-cause-owner/config.ts +32 -1
- package/templates/nonprofit-cause-owner/dev/index.ts +538 -1
- package/templates/nonprofit-cause-owner/himalaya.content.json +3 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/nonprofit-cause-owner/tier5-src/wix-owner-booking/index.ts +9 -3
- package/templates/owner-lite/config.ts +32 -1
- package/templates/owner-lite/dev/index.ts +565 -1
- package/templates/owner-lite/himalaya.content.json +3 -0
- package/templates/owner-lite/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/owner-lite/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/owner-lite/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/owner-lite/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/owner-lite/tier5-src/wix-owner-booking/index.ts +9 -3
- package/templates/personal-fitness-trainer/dev/index.ts +2 -1
- package/templates/personal-fitness-trainer/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/podcast-creator/dev/index.ts +2 -1
- package/templates/podcast-creator/l10n/ar.json +5 -0
- package/templates/podcast-creator/l10n/cs.json +5 -0
- package/templates/podcast-creator/l10n/da.json +5 -0
- package/templates/podcast-creator/l10n/de.json +5 -0
- package/templates/podcast-creator/l10n/el.json +5 -0
- package/templates/podcast-creator/l10n/es.json +5 -0
- package/templates/podcast-creator/l10n/fi.json +5 -0
- package/templates/podcast-creator/l10n/fr.json +5 -0
- package/templates/podcast-creator/l10n/he.json +4 -0
- package/templates/podcast-creator/l10n/hu.json +5 -0
- package/templates/podcast-creator/l10n/id.json +5 -0
- package/templates/podcast-creator/l10n/it.json +5 -0
- package/templates/podcast-creator/l10n/ja.json +5 -0
- package/templates/podcast-creator/l10n/ko.json +5 -0
- package/templates/podcast-creator/l10n/lt.json +5 -0
- package/templates/podcast-creator/l10n/nl.json +5 -0
- package/templates/podcast-creator/l10n/no.json +5 -0
- package/templates/podcast-creator/l10n/pl.json +5 -0
- package/templates/podcast-creator/l10n/pt.json +5 -0
- package/templates/podcast-creator/l10n/ru.json +5 -0
- package/templates/podcast-creator/l10n/sv.json +5 -0
- package/templates/podcast-creator/l10n/th.json +5 -0
- package/templates/podcast-creator/l10n/tr.json +5 -0
- package/templates/podcast-creator/l10n/uk.json +5 -0
- package/templates/podcast-creator/l10n/vi.json +5 -0
- package/templates/podcast-creator/l10n/zh.json +5 -0
- package/templates/podcast-creator/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/podcast-creator/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/podcast-creator/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/podcast-creator-owner/config.ts +32 -1
- package/templates/podcast-creator-owner/dev/index.ts +538 -1
- package/templates/podcast-creator-owner/himalaya.content.json +3 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/portfolio-creative-owner/config.ts +32 -1
- package/templates/portfolio-creative-owner/dev/index.ts +565 -1
- package/templates/portfolio-creative-owner/himalaya.content.json +3 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/portfolio-creative-owner/tier5-src/wix-owner-booking/index.ts +9 -3
- package/templates/professional-services/dev/index.ts +2 -1
- package/templates/professional-services/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/professional-services/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/professional-services/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/restaurant-owner/config.ts +32 -1
- package/templates/restaurant-owner/dev/index.ts +565 -1
- package/templates/restaurant-owner/himalaya.content.json +3 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/restaurant-owner/tier5-src/wix-owner-booking/index.ts +9 -3
- package/templates/retail-store-owner/config.ts +32 -1
- package/templates/retail-store-owner/dev/index.ts +538 -1
- package/templates/retail-store-owner/himalaya.content.json +3 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-order/index.ts +5 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/yoga-studio/dev/index.ts +2 -1
- package/templates/yoga-studio/l10n/ar.json +5 -0
- package/templates/yoga-studio/l10n/cs.json +5 -0
- package/templates/yoga-studio/l10n/da.json +5 -0
- package/templates/yoga-studio/l10n/de.json +5 -0
- package/templates/yoga-studio/l10n/el.json +5 -0
- package/templates/yoga-studio/l10n/es.json +5 -0
- package/templates/yoga-studio/l10n/fi.json +5 -0
- package/templates/yoga-studio/l10n/fr.json +5 -0
- package/templates/yoga-studio/l10n/he.json +4 -0
- package/templates/yoga-studio/l10n/hu.json +5 -0
- package/templates/yoga-studio/l10n/id.json +5 -0
- package/templates/yoga-studio/l10n/it.json +5 -0
- package/templates/yoga-studio/l10n/ja.json +5 -0
- package/templates/yoga-studio/l10n/ko.json +5 -0
- package/templates/yoga-studio/l10n/lt.json +5 -0
- package/templates/yoga-studio/l10n/nl.json +5 -0
- package/templates/yoga-studio/l10n/no.json +5 -0
- package/templates/yoga-studio/l10n/pl.json +5 -0
- package/templates/yoga-studio/l10n/pt.json +5 -0
- package/templates/yoga-studio/l10n/ru.json +5 -0
- package/templates/yoga-studio/l10n/sv.json +5 -0
- package/templates/yoga-studio/l10n/th.json +5 -0
- package/templates/yoga-studio/l10n/tr.json +5 -0
- package/templates/yoga-studio/l10n/uk.json +5 -0
- package/templates/yoga-studio/l10n/vi.json +5 -0
- package/templates/yoga-studio/l10n/zh.json +5 -0
- package/templates/yoga-studio/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/yoga-studio/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/yoga-studio/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/yoga-studio-owner/config.ts +32 -1
- package/templates/yoga-studio-owner/dev/index.ts +538 -1
- package/templates/yoga-studio-owner/himalaya.content.json +3 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-availability.ts +14 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-chat.ts +179 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-maestro-tab.ts +42 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro/index.ts +345 -48
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-maestro-history/index.ts +106 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-record/index.ts +9 -3
- package/templates/yoga-studio-owner/tier5-src/wix-owner-booking/index.ts +9 -3
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Tier-5 bundle: __HIMI_APP_NAME__ — the owner's past Maestro chats about the business on screen.
|
|
2
|
+
//
|
|
3
|
+
// Symphony keeps the chats; this lists the ones that were opened for this business, newest
|
|
4
|
+
// first. A row opens the Maestro screen on that chat (`conversationId`), which reads its
|
|
5
|
+
// messages itself. Nothing is cached here: storage is shared by everyone who signs in on the
|
|
6
|
+
// device, and a business id is not an account.
|
|
7
|
+
|
|
8
|
+
import { formatMonthDay } from "../_shared/engine-intl.js";
|
|
9
|
+
import { defineService } from "@himalaya/state";
|
|
10
|
+
import { copyParam, stashCopy } from "../_shared/himi-copy.js";
|
|
11
|
+
import { readSelectedSite } from "../_shared/owner-selected-site.js";
|
|
12
|
+
import { symphonyAccount, type MaestroWixApi } from "../_shared/owner-maestro-availability.js";
|
|
13
|
+
import { pastChats, type PastChat } from "../_shared/owner-maestro-chat.js";
|
|
14
|
+
|
|
15
|
+
interface Host { wixApi?: MaestroWixApi; input?: Record<string, unknown> }
|
|
16
|
+
const host = (): Host => (globalThis as { himalaya?: Host }).himalaya ?? {};
|
|
17
|
+
|
|
18
|
+
/** The same business the Maestro screen talks about. */
|
|
19
|
+
function activeSiteId(): string {
|
|
20
|
+
const v = host().input?.__himiPreferenceBusiness;
|
|
21
|
+
const scoped = typeof v === "string" ? v.trim() : "";
|
|
22
|
+
return scoped || readSelectedSite()?.id || "";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** `stamp` marks the list a row was shown in, so opening the same chat from a later list is a new request. */
|
|
26
|
+
export interface HistoryRow { id: string; title: string; subtitle: string; section: string; stamp: string }
|
|
27
|
+
|
|
28
|
+
export interface MaestroHistoryState {
|
|
29
|
+
items: HistoryRow[];
|
|
30
|
+
itemsHidden: string;
|
|
31
|
+
/** Says the owner has no past chats ("" collapses the line). */
|
|
32
|
+
emptyText: string;
|
|
33
|
+
/** Says the list could not be read, which is not the same as having none. */
|
|
34
|
+
error: string;
|
|
35
|
+
errorHidden: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const initial: MaestroHistoryState = { items: [], itemsHidden: "true", emptyText: "", error: "", errorHidden: "true" };
|
|
39
|
+
|
|
40
|
+
const DAY = 24 * 60 * 60 * 1000;
|
|
41
|
+
|
|
42
|
+
/** Which recency bucket a chat falls in, by calendar day on this device: "Today" starts at
|
|
43
|
+
* midnight, as the date on each row does. A date that cannot be read sorts as older. */
|
|
44
|
+
function bucketOf(updated: string, now: number): string {
|
|
45
|
+
const at = Date.parse(updated);
|
|
46
|
+
const midnight = new Date(now);
|
|
47
|
+
midnight.setHours(0, 0, 0, 0);
|
|
48
|
+
const today = midnight.getTime();
|
|
49
|
+
const age = Number.isNaN(at) ? Number.POSITIVE_INFINITY : today - at;
|
|
50
|
+
if (age <= 0) return copyParam("ownerMaestroHistory.today", "Today");
|
|
51
|
+
if (age <= 6 * DAY) return copyParam("ownerMaestroHistory.last7", "Last 7 days");
|
|
52
|
+
if (age <= 29 * DAY) return copyParam("ownerMaestroHistory.last30", "Last 30 days");
|
|
53
|
+
return copyParam("ownerMaestroHistory.older", "Older");
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function dayLabel(updated: string): string {
|
|
57
|
+
const at = Date.parse(updated);
|
|
58
|
+
if (Number.isNaN(at)) return "";
|
|
59
|
+
return formatMonthDay(new Date(at));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Rows in the order given, with the bucket named on the first row of each bucket only. */
|
|
63
|
+
function rowsOf(chats: PastChat[], now: number): HistoryRow[] {
|
|
64
|
+
let last = "";
|
|
65
|
+
return chats.map((c) => {
|
|
66
|
+
const bucket = bucketOf(c.updated, now);
|
|
67
|
+
const section = bucket === last ? "" : bucket;
|
|
68
|
+
last = bucket;
|
|
69
|
+
return { id: c.id, title: c.title || copyParam("ownerMaestroHistory.untitled", "Untitled conversation"), subtitle: dayLabel(c.updated), section, stamp: String(now) };
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const none = (): MaestroHistoryState =>
|
|
74
|
+
({ ...initial, emptyText: copyParam("ownerMaestroHistory.empty", "No past conversations yet.") });
|
|
75
|
+
const failed = (): MaestroHistoryState =>
|
|
76
|
+
({ ...initial, error: copyParam("ownerMaestroHistory.failed", "Your conversations couldn't be loaded. Try again in a moment."), errorHidden: "false" });
|
|
77
|
+
|
|
78
|
+
const svc = defineService<MaestroHistoryState, {
|
|
79
|
+
load: (s: MaestroHistoryState, arg?: unknown) => Promise<MaestroHistoryState>;
|
|
80
|
+
}>("himiOwnerLiteMaestroHistory", {
|
|
81
|
+
state: initial,
|
|
82
|
+
// The list is read again on every appear and is never shown from an earlier run.
|
|
83
|
+
notPersisted: ["items", "itemsHidden", "emptyText", "error", "errorHidden"],
|
|
84
|
+
notHydrated: ["items", "itemsHidden", "emptyText", "error", "errorHidden"],
|
|
85
|
+
actions: {
|
|
86
|
+
load: async (_s, arg) => {
|
|
87
|
+
stashCopy(arg);
|
|
88
|
+
const site = activeSiteId();
|
|
89
|
+
const api = host().wixApi;
|
|
90
|
+
if (!site || !api) return failed();
|
|
91
|
+
try {
|
|
92
|
+
// No Symphony account means no chats: the list call would only be refused.
|
|
93
|
+
if (!(await symphonyAccount(api))) return none();
|
|
94
|
+
const chats = await pastChats(api, site);
|
|
95
|
+
if (!chats.length) return none();
|
|
96
|
+
return { ...initial, items: rowsOf(chats, Date.now()), itemsHidden: "false" };
|
|
97
|
+
} catch {
|
|
98
|
+
return failed();
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// No module-scope `svc.load()`: a bridge call made while the bundle is still being evaluated
|
|
105
|
+
// stalls on the Android WebView, and `onAppear` loads the list anyway.
|
|
106
|
+
export { svc };
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { defineService } from "@himalaya/state";
|
|
10
10
|
import { getOrder, type WixOrder, type WixOrderLineItem } from "@himalaya/wix-ecom";
|
|
11
11
|
import { ownerLoadError, isOwnerPreviewDemo, ownerDemoFallback } from "../_shared/owner-load-error.js";
|
|
12
|
+
import { askMaestroHidden } from "../_shared/owner-maestro-tab.js";
|
|
12
13
|
import { DEMO_ORDERS, DEMO_NOTE, demoOrderDate } from "../_shared/owner-preview-demo.js";
|
|
13
14
|
import { stashCopy, copyParam } from "../_shared/himi-copy.js";
|
|
14
15
|
import { formatDateMedium } from "../_shared/engine-intl.js";
|
|
@@ -60,6 +61,8 @@ interface OrderState extends LiveSessionFields {
|
|
|
60
61
|
/** Non-empty when showing owner-preview-demo sample data (web preview, no owner bridge). */
|
|
61
62
|
demoNote: string;
|
|
62
63
|
notDemo: boolean;
|
|
64
|
+
/** "false" while the assistant tab is Maestro for this business: the screen offers Ask Maestro. */
|
|
65
|
+
askMaestroHidden: string;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -160,6 +163,8 @@ function shape(s: Partial<OrderState>): OrderState {
|
|
|
160
163
|
const hasEntity = !!s.title && status === "ready";
|
|
161
164
|
const isLoading = status === "loading";
|
|
162
165
|
return {
|
|
166
|
+
// Only an order on screen can be asked about; loading, an error and "not found" have none.
|
|
167
|
+
askMaestroHidden: hasEntity ? askMaestroHidden() : "true",
|
|
163
168
|
id: s.id ?? "",
|
|
164
169
|
status,
|
|
165
170
|
title: s.title ?? "",
|
|
@@ -2,15 +2,20 @@ import { defineService } from '@himalaya/state';
|
|
|
2
2
|
import { getOwnerRecord, ownerModuleError, type OwnerRecord } from '../_shared/owner-module-data.js';
|
|
3
3
|
import { ownerInput, inputOwnerModule, openOwnerDashboard } from '../_shared/owner-module-runtime.js';
|
|
4
4
|
import { stashCopy, copyParam } from '../_shared/himi-copy.js';
|
|
5
|
+
import { askMaestroHidden } from '../_shared/owner-maestro-tab.js';
|
|
5
6
|
const moduleId = inputOwnerModule();
|
|
6
7
|
interface State {
|
|
8
|
+
/** The record on screen, so the screen can name it to another screen. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** "false" while the assistant tab is Maestro for this business: a contact offers Ask Maestro. */
|
|
11
|
+
askMaestroHidden: string;
|
|
7
12
|
status: string; title: string; subtitle: string; image: string; noImage: boolean; statusLabel: string;
|
|
8
13
|
fields: OwnerRecord['fields']; error: string; notLoading: boolean; notErrored: boolean; hideContent: boolean;
|
|
9
14
|
handoffError: string;
|
|
10
15
|
}
|
|
11
16
|
let generation = 0;
|
|
12
17
|
const svc = defineService('himiOwnerRecord', {
|
|
13
|
-
state: { status: 'loading', title: '', subtitle: '', image: '', noImage: true, statusLabel: '', fields: [], error: '',
|
|
18
|
+
state: { id: '', askMaestroHidden: 'true', status: 'loading', title: '', subtitle: '', image: '', noImage: true, statusLabel: '', fields: [], error: '',
|
|
14
19
|
notLoading: false, notErrored: true, hideContent: true, handoffError: '' } as State,
|
|
15
20
|
actions: {
|
|
16
21
|
async load(state: State, arg?: unknown): Promise<State | undefined> {
|
|
@@ -21,10 +26,11 @@ const svc = defineService('himiOwnerRecord', {
|
|
|
21
26
|
if (!moduleId || typeof id !== 'string') throw new Error('Invalid record link');
|
|
22
27
|
const record = await getOwnerRecord(moduleId, id);
|
|
23
28
|
if (revision !== generation) return undefined;
|
|
24
|
-
return { ...state, ...record, noImage: !record.image, status: 'ready', error: '', notLoading: true, notErrored: true, hideContent: false };
|
|
29
|
+
return { ...state, ...record, askMaestroHidden: askMaestroHidden(), noImage: !record.image, status: 'ready', error: '', notLoading: true, notErrored: true, hideContent: false };
|
|
25
30
|
} catch (error) {
|
|
26
31
|
if (revision !== generation) return undefined;
|
|
27
|
-
|
|
32
|
+
// No record is on screen, so nothing to ask about: a pooled worker's state still holds the last one's id.
|
|
33
|
+
return { ...state, askMaestroHidden: 'true', status: 'error', error: ownerModuleError(error, 'detail'), notLoading: true, notErrored: false, hideContent: true };
|
|
28
34
|
}
|
|
29
35
|
},
|
|
30
36
|
async openDashboard(state: State): Promise<State> {
|
|
@@ -26580,7 +26580,8 @@ const SCREENS = runtimeSetting({
|
|
|
26580
26580
|
"type": "Text",
|
|
26581
26581
|
"props": {
|
|
26582
26582
|
"text": "$item.endDate",
|
|
26583
|
-
"style": "footnoteRegular"
|
|
26583
|
+
"style": "footnoteRegular",
|
|
26584
|
+
"collapseWhenEmpty": true
|
|
26584
26585
|
}
|
|
26585
26586
|
}
|
|
26586
26587
|
}
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "صالح حتى",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "صالح حتى الإلغاء",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "تعذّر تحميل الاشتراكات.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Platí do",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Platí do zrušení",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Předplatná se nepodařilo načíst.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Gyldig til",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Gyldig indtil opsigelse",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Abonnementer kunne ikke indlæses.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Gültig bis",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Gültig bis zur Kündigung",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Abonnements konnten nicht geladen werden.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Ισχύει έως",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Ισχύει έως την ακύρωση",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Δεν ήταν δυνατή η φόρτωση των συνδρομών.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Válido hasta",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Válido hasta su cancelación",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "No se pudieron cargar las suscripciones.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Voimassa asti",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Voimassa toistaiseksi",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Tilauksia ei voitu ladata.",
|
|
@@ -4572,6 +4572,11 @@
|
|
|
4572
4572
|
"translation": "Valable jusqu'au",
|
|
4573
4573
|
"origin": "machine"
|
|
4574
4574
|
},
|
|
4575
|
+
"h_40895070d6bf": {
|
|
4576
|
+
"source": "Valid until canceled",
|
|
4577
|
+
"translation": "Valable jusqu'à résiliation",
|
|
4578
|
+
"origin": "machine"
|
|
4579
|
+
},
|
|
4575
4580
|
"h_513a2ae3716f": {
|
|
4576
4581
|
"source": "Subscriptions could not be loaded.",
|
|
4577
4582
|
"translation": "Impossible de charger les abonnements.",
|
|
@@ -3735,6 +3735,10 @@
|
|
|
3735
3735
|
"source": "Valid until",
|
|
3736
3736
|
"translation": "בתוקף עד"
|
|
3737
3737
|
},
|
|
3738
|
+
"h_40895070d6bf": {
|
|
3739
|
+
"source": "Valid until canceled",
|
|
3740
|
+
"translation": "בתוקף עד לביטול"
|
|
3741
|
+
},
|
|
3738
3742
|
"h_513a2ae3716f": {
|
|
3739
3743
|
"source": "Subscriptions could not be loaded.",
|
|
3740
3744
|
"translation": "לא ניתן לטעון את המנויים."
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Érvényes eddig",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Lemondásig érvényes",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Az előfizetéseket nem sikerült betölteni.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Berlaku hingga",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Berlaku hingga dibatalkan",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Langganan tidak dapat dimuat.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Valido fino al",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Valido fino alla disdetta",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Impossibile caricare gli abbonamenti.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "有効期限",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "解約まで有効",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "サブスクリプションを読み込めませんでした。",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "유효 기간",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "해지 시까지 유효",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "구독을 불러올 수 없어요.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Galioja iki",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Galioja iki atšaukimo",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Nepavyko įkelti prenumeratų.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Geldig tot",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Geldig tot opzegging",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Abonnementen konden niet worden geladen.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Gyldig til",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Gyldig til oppsigelse",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Abonnementene kunne ikke lastes inn.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Ważne do",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Ważne do czasu anulowania",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Nie udało się wczytać subskrypcji.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Válido até",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Válido até o cancelamento",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Não foi possível carregar as assinaturas.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Действует до",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Действует до отмены",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Не удалось загрузить подписки.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Giltig till",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Giltig tills vidare",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Det gick inte att läsa in prenumerationerna.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "ใช้ได้ถึง",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "ใช้ได้จนกว่าจะยกเลิก",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "โหลดการสมัครใช้งานไม่ได้",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Geçerlilik tarihi",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "İptal edilene kadar geçerli",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Abonelikler yüklenemedi.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Діє до",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Діє до скасування",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Не вдалося завантажити підписки.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "Có hiệu lực đến",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "Có hiệu lực đến khi hủy",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "Không thể tải các gói đăng ký.",
|
|
@@ -4587,6 +4587,11 @@
|
|
|
4587
4587
|
"translation": "有效期限至",
|
|
4588
4588
|
"origin": "machine"
|
|
4589
4589
|
},
|
|
4590
|
+
"h_40895070d6bf": {
|
|
4591
|
+
"source": "Valid until canceled",
|
|
4592
|
+
"translation": "有效期至取消为止",
|
|
4593
|
+
"origin": "machine"
|
|
4594
|
+
},
|
|
4590
4595
|
"h_513a2ae3716f": {
|
|
4591
4596
|
"source": "Subscriptions could not be loaded.",
|
|
4592
4597
|
"translation": "無法載入訂閱。",
|
|
@@ -20,6 +20,45 @@ export function orderDate(value?: string): string {
|
|
|
20
20
|
return value && Number.isFinite(Date.parse(value)) ? formatDateMedium(new Date(value)) : "";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The order is valid until it is canceled: an ACTIVE single-payment order whose purchased pricing says
|
|
25
|
+
* "unlimited" (`singlePaymentUnlimited`) and that has no end, no scheduled end and no billing cycle.
|
|
26
|
+
* Only the order's own pricing decides it; today's plan is never consulted, because it can have changed.
|
|
27
|
+
*/
|
|
28
|
+
export function orderOpenEnded(order: WixPlanOrder): boolean {
|
|
29
|
+
if (order.status !== "ACTIVE" || order.endDate || order.earliestEndDate || order.autoRenewCanceled || order.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") return false;
|
|
30
|
+
const pricing = order.pricing ?? {};
|
|
31
|
+
const details = order.priceDetails ?? {};
|
|
32
|
+
if (pricing.subscription || details.subscription || pricing.singlePaymentForDuration || details.singlePaymentForDuration) return false;
|
|
33
|
+
return pricing.singlePaymentUnlimited === true || details.singlePaymentUnlimited === true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** One order's validity line on a subscription card: the label, the date after it, and whether the line shows. */
|
|
37
|
+
export interface OrderValidity {
|
|
38
|
+
/** "Valid until" / "Current period ends" / "End date" / "Expired on", or the whole line "Valid until canceled". */
|
|
39
|
+
label: string;
|
|
40
|
+
/** The formatted date; empty for an open-ended order, whose label says it all. */
|
|
41
|
+
date: string;
|
|
42
|
+
/** True when the order says nothing reliable about its validity: the card hides the line. */
|
|
43
|
+
hidden: boolean;
|
|
44
|
+
openEnded: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function orderValidity(order: WixPlanOrder): OrderValidity {
|
|
48
|
+
// A subscription with no end date but a running billing cycle is "valid" until the cycle ends.
|
|
49
|
+
const periodEnd = !order.earliestEndDate && !order.endDate && order.status === "ACTIVE" && (order.pricing?.subscription ?? order.priceDetails?.subscription)
|
|
50
|
+
? orderDate(order.currentCycle?.endedDate) : "";
|
|
51
|
+
const date = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
52
|
+
if (!date && orderOpenEnded(order)) {
|
|
53
|
+
return { label: copyParam("mySubscriptions.validUntilCanceled", "Valid until canceled"), date: "", hidden: false, openEnded: true };
|
|
54
|
+
}
|
|
55
|
+
const label = periodEnd ? copyParam("subscriptionDetail.periodEnd", "Current period ends")
|
|
56
|
+
: order.status === "CANCELED" ? copyParam("subscriptionDetail.endDate", "End date")
|
|
57
|
+
: order.status === "ENDED" ? copyParam("mySubscriptions.expiredOn", "Expired on")
|
|
58
|
+
: copyParam("mySubscriptions.validUntil", "Valid until");
|
|
59
|
+
return { label, date, hidden: !date, openEnded: false };
|
|
60
|
+
}
|
|
61
|
+
|
|
23
62
|
/** The purchased order owns its price; today's plan is never a price fallback. */
|
|
24
63
|
export function orderPrice(order: WixPlanOrder): string {
|
|
25
64
|
const cycle = order.currentCycle?.index ?? 1;
|
|
@@ -2,12 +2,12 @@ import { defineService } from "@himalaya/state";
|
|
|
2
2
|
import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
3
3
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
4
4
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged } from "../_shared/member-access.js";
|
|
5
|
-
import {
|
|
5
|
+
import { orderPrice, orderStatus, orderValidity } from "../_shared/pricing-plan-display.js";
|
|
6
6
|
import { descriptionBody } from "../_shared/rich-body.js";
|
|
7
7
|
import { copyParam, stashCopy } from "../_shared/himi-copy.js";
|
|
8
8
|
import { isHttp401 } from "../_shared/member-read.js";
|
|
9
9
|
|
|
10
|
-
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; expired: boolean; dateLabel: string }
|
|
10
|
+
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; openEnded: boolean; expired: boolean; dateLabel: string }
|
|
11
11
|
interface S {
|
|
12
12
|
status: string; orders: Row[]; rows: Row[]; allOrders: Row[]; selectedTab: string; nextCursor: string;
|
|
13
13
|
emptyText: string; hideAccountCta: boolean; noOrders: boolean;
|
|
@@ -32,10 +32,10 @@ function project(state: S): S {
|
|
|
32
32
|
emptyText: orders.length ? "" : state.selectedTab === "expired" ? copyParam("mySubscriptions.expiredEmpty", "No expired subscriptions") : copyParam("mySubscriptions.activeEmpty", "No active subscriptions") };
|
|
33
33
|
}
|
|
34
34
|
function norm(order: WixPlanOrder): Row {
|
|
35
|
-
const
|
|
36
|
-
const endDate = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
35
|
+
const validity = orderValidity(order);
|
|
37
36
|
return { id: order.id, name: order.planName || copyParam("plans.planFallbackName", "Plan"), subtitle: orderStatus(order),
|
|
38
|
-
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
37
|
+
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
38
|
+
endDate: validity.date, noEndDate: validity.hidden, openEnded: validity.openEnded, dateLabel: validity.label,
|
|
39
39
|
expired: ["ENDED", "CANCELED"].includes(order.status ?? "") };
|
|
40
40
|
}
|
|
41
41
|
async function readPage(state: S, reset: boolean): Promise<S | undefined> {
|
|
@@ -2,7 +2,7 @@ import { defineService } from "@himalaya/state";
|
|
|
2
2
|
import { getMyPlanOrder, requestCancellation, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
3
3
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
4
4
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged, type MemberAccess } from "../_shared/member-access.js";
|
|
5
|
-
import { orderDate, orderPrice, orderStatus, orderFacts } from "../_shared/pricing-plan-display.js";
|
|
5
|
+
import { orderDate, orderPrice, orderStatus, orderFacts, orderOpenEnded } from "../_shared/pricing-plan-display.js";
|
|
6
6
|
import { presence, presenceAfterError, detailInputId, type PresenceFlags } from "../_shared/detail-presence.js";
|
|
7
7
|
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
8
8
|
|
|
@@ -34,7 +34,8 @@ function project(o: WixPlanOrder, message = ""): S {
|
|
|
34
34
|
const scheduled = Boolean((o.pricing?.subscription ?? o.priceDetails?.subscription) && o.currentCycle?.endedDate && Date.parse(o.currentCycle.endedDate) > Date.now());
|
|
35
35
|
const renews = o.status === "ACTIVE" && scheduled ? orderDate(o.currentCycle?.endedDate) : "";
|
|
36
36
|
return { ...initial(), ...presence("found"), status: "ready", notActive: o.status !== "ACTIVE", isActive: o.status === "ACTIVE", name: o.planName || copyParam("subscriptionDetail.fallbackName", "Subscription"), subtitle: orderStatus(o), price: orderPrice(o),
|
|
37
|
-
validity: (o.earliestEndDate || o.autoRenewCanceled || o.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") && end ? copyTemplate("subscriptionDetail.scheduledEndMessage", "Your subscription ends on {date}.", { date: end }) : renews ? copyTemplate("placeSummary.planRenews", "Renews {date}", { date: renews })
|
|
37
|
+
validity: (o.earliestEndDate || o.autoRenewCanceled || o.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") && end ? copyTemplate("subscriptionDetail.scheduledEndMessage", "Your subscription ends on {date}.", { date: end }) : renews ? copyTemplate("placeSummary.planRenews", "Renews {date}", { date: renews })
|
|
38
|
+
: orderOpenEnded(o) ? copyParam("mySubscriptions.validUntilCanceled", "Valid until canceled") : "",
|
|
38
39
|
facts: orderFacts(o), hideCancel: !canCancel(o) || cancellationsSent.has(cancellationKey(o.id)), noScheduledOption: !scheduled,
|
|
39
40
|
effectiveAt: scheduled ? "NEXT_PAYMENT_DATE" : "IMMEDIATELY", actionMessage: message };
|
|
40
41
|
}
|