@wix/himalaya-cli 0.1035.0 → 0.1037.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +7 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/display.d.ts +13 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/portfolio/src/index.d.ts +46 -9
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +28 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-portfolio.mjs +14 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores-collections.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +7 -1
- package/dist/cli.mjs +482 -113
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +51 -2
- package/guides/sdk-reference.json +32 -14
- package/guides/wix-business-context.md +13 -1
- package/guides/wix-site-to-himi-app.md +10 -1
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +72 -175
- package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/beauty-salon/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +14 -8
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/beauty-salon/tier5-src/wix-spaces-collections/index.ts +1 -1
- package/templates/beauty-salon/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/beauty-salon-owner/dev/index.ts +84 -599
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-appointments/index.ts +4 -1
- package/templates/branded-lite/dev/index.ts +178 -264
- package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/branded-lite/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/branded-lite/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +14 -8
- package/templates/branded-lite/tier5-src/himi-branded-lite-cms/index.ts +5 -5
- package/templates/branded-lite/tier5-src/himi-branded-lite-coupons/index.ts +33 -7
- package/templates/branded-lite/tier5-src/himi-branded-lite-donations/index.ts +3 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-forms/index.ts +11 -10
- package/templates/branded-lite/tier5-src/himi-branded-lite-giftcards/index.ts +3 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-invoices/index.ts +3 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-loyalty/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-portfolio/index.ts +2 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-portfolio-project/index.ts +3 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-reserve/index.ts +5 -3
- package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/branded-lite/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/branded-lite/tier5-src/wix-spaces-collections/index.ts +1 -1
- package/templates/branded-lite/tier5-src/wix-spaces-forum/index.ts +7 -1
- package/templates/branded-lite/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/community-club/dev/index.ts +62 -81
- package/templates/community-club/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/community-club/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/community-club/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/community-club/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/community-club/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/community-club/tier5-src/himi-branded-lite-cms/index.ts +5 -5
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/community-club/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/community-club/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/community-club/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/community-club/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/community-club/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/community-club-owner/dev/index.ts +84 -599
- package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/community-club-owner/tier5-src/himi-owner-lite-events/index.ts +1 -0
- package/templates/events-meetups/dev/index.ts +60 -79
- package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/events-meetups/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/events-meetups/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/events-meetups/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/events-meetups/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/events-meetups/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/events-meetups/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/events-meetups-owner/dev/index.ts +84 -543
- package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-events/index.ts +1 -0
- package/templates/gym-fitness/dev/index.ts +73 -204
- package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/gym-fitness/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +14 -8
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/gym-fitness/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/gym-fitness/tier5-src/wix-spaces-collections/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/gym-fitness-owner/dev/index.ts +84 -627
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-appointments/index.ts +4 -1
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-events/index.ts +1 -0
- package/templates/himi-chat/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/nonprofit-cause/dev/index.ts +71 -90
- package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/nonprofit-cause/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/nonprofit-cause/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/nonprofit-cause/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/nonprofit-cause/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/nonprofit-cause/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/nonprofit-cause-owner/dev/index.ts +84 -571
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-appointments/index.ts +4 -1
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-events/index.ts +1 -0
- package/templates/owner-lite/dev/index.ts +84 -627
- package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/owner-lite/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/owner-lite/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/owner-lite/tier5-src/himi-owner-lite-appointments/index.ts +4 -1
- package/templates/owner-lite/tier5-src/himi-owner-lite-events/index.ts +1 -0
- package/templates/podcast-creator/dev/index.ts +71 -90
- package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/podcast-creator/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/podcast-creator/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/podcast-creator/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/podcast-creator/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/podcast-creator/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/podcast-creator/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/podcast-creator-owner/dev/index.ts +84 -599
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-events/index.ts +1 -0
- package/templates/portfolio-creative/dev/index.ts +62 -137
- package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/portfolio-creative/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-portfolio/index.ts +2 -2
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-portfolio-project/index.ts +3 -3
- package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/portfolio-creative/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/portfolio-creative/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/portfolio-creative/tier5-src/wix-spaces-collections/index.ts +1 -1
- package/templates/portfolio-creative/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/portfolio-creative-owner/dev/index.ts +84 -599
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-appointments/index.ts +4 -1
- package/templates/restaurant/dev/index.ts +124 -101
- package/templates/restaurant/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/restaurant/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/restaurant/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/restaurant/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/restaurant/tier5-src/himi-branded-lite-reserve/index.ts +5 -3
- package/templates/restaurant/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/restaurant/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/restaurant/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/restaurant/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/restaurant-owner/dev/index.ts +84 -627
- package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-appointments/index.ts +4 -1
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-events/index.ts +1 -0
- package/templates/retail-store/dev/index.ts +59 -106
- package/templates/retail-store/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/retail-store/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/retail-store/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/retail-store/tier5-src/wix-spaces-collections/index.ts +1 -1
- package/templates/retail-store/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/retail-store-owner/dev/index.ts +84 -571
- package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/yoga-studio/dev/index.ts +73 -148
- package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-restaurants.ts +4 -4
- package/templates/yoga-studio/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +14 -8
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +12 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-info/index.ts +5 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +1 -1
- package/templates/yoga-studio/tier5-src/himi-events-list/index.ts +20 -4
- package/templates/yoga-studio/tier5-src/himi-events-my-events/index.ts +2 -2
- package/templates/yoga-studio/tier5-src/wix-spaces-whats-new/index.ts +4 -4
- package/templates/yoga-studio-owner/dev/index.ts +84 -571
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +22 -6
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +16 -9
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +19 -5
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +51 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-load-error.ts +49 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-module-data.ts +2 -2
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-appointments/index.ts +4 -1
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-events/index.ts +1 -0
|
@@ -44,6 +44,11 @@ export interface ScreenDescriptor {
|
|
|
44
44
|
/** RFC 0010 (top-bar amendment) — shell-owned top bar: trailing actions +
|
|
45
45
|
* leading/style override. Mirror of TopBarConfig in core.proto. */
|
|
46
46
|
topBar?: import("@wix/himalaya/core").TopBarConfig;
|
|
47
|
+
/** Sticky slots the host pins OUTSIDE the screen scroll (a toolbar above the
|
|
48
|
+
* payload; a composer / confirm bar below it). Mirror of
|
|
49
|
+
* ScreenDescriptor.sticky_header / sticky_footer in core.proto. */
|
|
50
|
+
stickyHeader?: Component;
|
|
51
|
+
stickyFooter?: Component;
|
|
47
52
|
}
|
|
48
53
|
/** Tier 3/4 + embeddable WebView behavior. Mirror of WebViewConfig in core.proto
|
|
49
54
|
* (RFC 0038). All fields optional; zero values reproduce legacy behavior. */
|
|
@@ -605,7 +610,8 @@ export declare function stepper(props: {
|
|
|
605
610
|
value: number;
|
|
606
611
|
min?: number;
|
|
607
612
|
max?: number;
|
|
608
|
-
onChange?: ActionShape;
|
|
613
|
+
onChange?: ActionShape; /** `$service:` path the count follows (worker is the source of truth). */
|
|
614
|
+
valuePath?: string;
|
|
609
615
|
}, opts?: {
|
|
610
616
|
id?: string;
|
|
611
617
|
}): Component;
|
|
@@ -6,6 +6,8 @@ export interface EventRow {
|
|
|
6
6
|
day: string;
|
|
7
7
|
month: string;
|
|
8
8
|
dateLine: string;
|
|
9
|
+
/** "Past" once the event has finished, else "". */
|
|
10
|
+
statusLabel: string;
|
|
9
11
|
location: string;
|
|
10
12
|
status: string;
|
|
11
13
|
image: string;
|
|
@@ -30,6 +32,16 @@ export declare function eventAddress(e: WixEvent): string;
|
|
|
30
32
|
export declare function eventMapUrl(e: WixEvent): string;
|
|
31
33
|
export declare function eventStartMillis(e: WixEvent): number | undefined;
|
|
32
34
|
export declare function eventEndMillis(e: WixEvent): number | undefined;
|
|
33
|
-
|
|
35
|
+
/** The event's date line. The year is written only when it is not the current year, so a
|
|
36
|
+
* past-year event can no longer pass for an upcoming one ("Sat, Jul 18"). `now` is injectable
|
|
37
|
+
* for tests; it defaults to the wall clock. */
|
|
38
|
+
export declare function eventWhen(e: WixEvent, now?: number): string;
|
|
39
|
+
/** Has the event finished? Its end when it has one, else its start. */
|
|
40
|
+
export declare function eventIsPast(e: WixEvent, now?: number): boolean;
|
|
41
|
+
/** One-argument on purpose: callers write `.map(normalizeEvent)`, which would pass the array
|
|
42
|
+
* index as a second argument. Use {@link normalizeEventAt} to pin the clock. */
|
|
34
43
|
export declare function normalizeEvent(e: WixEvent): EventRow;
|
|
44
|
+
/** {@link normalizeEvent} against an explicit clock (epoch ms): `now` decides whether the date
|
|
45
|
+
* line carries the year and whether `statusLabel` reads "Past". Pure — no API call, any scope. */
|
|
46
|
+
export declare function normalizeEventAt(e: WixEvent, now: number): EventRow;
|
|
35
47
|
export declare function eventDescription(e: WixEvent): string;
|
|
@@ -5,12 +5,36 @@ declare global {
|
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
+
/** A Wix Portfolio media image — a project / collection cover or a project item's image. */
|
|
9
|
+
export interface WixMediaImage {
|
|
10
|
+
type?: string;
|
|
11
|
+
imageInfo?: {
|
|
12
|
+
id?: string;
|
|
13
|
+
url?: string;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The Wix media reference of a Portfolio cover or item image — its `imageInfo.url`, else
|
|
20
|
+
* its `imageInfo.id` — for `wixMediaUrl` to resolve and size. `""` when there is none.
|
|
21
|
+
* A bare string is still accepted, so a cover stored as a url string keeps rendering.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const image = wixMediaUrl(portfolioCoverRef(project.coverImage));
|
|
25
|
+
*/
|
|
26
|
+
export declare function portfolioCoverRef(cover: WixMediaImage | string | null | undefined): string;
|
|
8
27
|
export interface WixPortfolioProject {
|
|
9
28
|
id: string;
|
|
10
29
|
title?: string;
|
|
11
30
|
description?: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Project cover. The live wire shape is a media OBJECT
|
|
33
|
+
* (`{type:"WIX_MEDIA", imageInfo:{id,url,width,height}}`), not a url string —
|
|
34
|
+
* read it with {@link portfolioCoverRef}; `wixMediaUrl` returns `""` for the object.
|
|
35
|
+
* A url string is still accepted, for projects constructed by hand.
|
|
36
|
+
*/
|
|
37
|
+
coverImage?: WixMediaImage | string;
|
|
14
38
|
slug?: string;
|
|
15
39
|
hidden?: boolean;
|
|
16
40
|
createdDate?: string;
|
|
@@ -28,12 +52,6 @@ export interface WixListProjectsResponse {
|
|
|
28
52
|
}
|
|
29
53
|
/** GET /portfolio/v1/projects — list projects (paged). */
|
|
30
54
|
export declare function listProjects(limit?: number, cursor?: string): Promise<WixListProjectsResponse>;
|
|
31
|
-
export interface WixMediaImage {
|
|
32
|
-
imageInfo?: {
|
|
33
|
-
id?: string;
|
|
34
|
-
url?: string;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
55
|
export interface WixPortfolioCollection {
|
|
38
56
|
id: string;
|
|
39
57
|
title?: string;
|
|
@@ -72,6 +90,10 @@ export interface WixPortfolioProjectItem {
|
|
|
72
90
|
}
|
|
73
91
|
export interface WixListProjectItemsResponse {
|
|
74
92
|
items?: WixPortfolioProjectItem[];
|
|
93
|
+
/**
|
|
94
|
+
* Paging, under the name this function always documented. A Wix query reports it as
|
|
95
|
+
* `metadata`; {@link listProjectItems} copies that here when `pagingMetadata` is absent.
|
|
96
|
+
*/
|
|
75
97
|
pagingMetadata?: {
|
|
76
98
|
count?: number;
|
|
77
99
|
cursors?: {
|
|
@@ -79,6 +101,21 @@ export interface WixListProjectItemsResponse {
|
|
|
79
101
|
};
|
|
80
102
|
hasNext?: boolean;
|
|
81
103
|
};
|
|
104
|
+
/** The query endpoint's own name for the paging block. */
|
|
105
|
+
metadata?: {
|
|
106
|
+
count?: number;
|
|
107
|
+
cursors?: {
|
|
108
|
+
next?: string;
|
|
109
|
+
};
|
|
110
|
+
hasNext?: boolean;
|
|
111
|
+
};
|
|
82
112
|
}
|
|
83
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* POST /portfolio/v1/items/query — list a project's items.
|
|
115
|
+
*
|
|
116
|
+
* A first page filters on `projectId` with `paging.limit`. Passing a `cursor` (a previous
|
|
117
|
+
* page's `pagingMetadata.cursors.next`) switches to `cursorPaging` and drops the filter,
|
|
118
|
+
* because a Wix query cursor already carries it. Items come back in the order Wix returns
|
|
119
|
+
* them — sort on `sortOrder` for the author's order.
|
|
120
|
+
*/
|
|
84
121
|
export declare function listProjectItems(projectId: string, limit?: number, cursor?: string): Promise<WixListProjectItemsResponse>;
|
|
@@ -185,21 +185,38 @@ function clockTime(d) {
|
|
|
185
185
|
const minute = d.getMinutes();
|
|
186
186
|
return `${hour}:${minute < 10 ? `0${minute}` : minute} ${h < 12 ? "AM" : "PM"}`;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function clockParts(d) {
|
|
189
|
+
const clean = clockTime(d).replace(/[ ]/g, " ");
|
|
190
|
+
const m = /^(.*?)\s*([AP]M)$/i.exec(clean);
|
|
191
|
+
return m ? { time: m[1], meridiem: m[2] } : { time: clean, meridiem: "" };
|
|
192
|
+
}
|
|
193
|
+
function clockRange(s, e) {
|
|
194
|
+
const a = clockParts(s);
|
|
195
|
+
const b = clockParts(e);
|
|
196
|
+
const same = !!a.meridiem && a.meridiem === b.meridiem && e.getTime() - s.getTime() < 12 * 3600 * 1e3;
|
|
197
|
+
return `${same ? a.time : clockTime(s)} \u2013 ${clockTime(e)}`;
|
|
198
|
+
}
|
|
199
|
+
function eventWhen(e, now = Date.now()) {
|
|
189
200
|
const start = startDateOf(e);
|
|
190
201
|
const end = endDateOf(e);
|
|
191
202
|
if (!start) return titleCase(e.eventStatus) || "Date to be announced";
|
|
192
203
|
const s = new Date(start);
|
|
193
204
|
if (Number.isNaN(s.getTime())) return "Date to be announced";
|
|
194
|
-
const date = weekdayMonthDay(s)
|
|
205
|
+
const date = s.getFullYear() === new Date(now).getFullYear() ? weekdayMonthDay(s) : `${weekdayMonthDay(s)}, ${s.getFullYear()}`;
|
|
195
206
|
const time = clockTime(s);
|
|
196
207
|
if (!end) return `${date} at ${time}`;
|
|
197
208
|
const eDate = new Date(end);
|
|
198
|
-
if (Number.isNaN(eDate.getTime())) return `${date} at ${time}`;
|
|
199
|
-
|
|
200
|
-
|
|
209
|
+
if (Number.isNaN(eDate.getTime()) || eDate.getTime() <= s.getTime()) return `${date} at ${time}`;
|
|
210
|
+
return `${date} \xB7 ${clockRange(s, eDate)}`;
|
|
211
|
+
}
|
|
212
|
+
function eventIsPast(e, now = Date.now()) {
|
|
213
|
+
const ms = eventEndMillis(e) ?? eventStartMillis(e);
|
|
214
|
+
return ms != null && ms < now;
|
|
201
215
|
}
|
|
202
216
|
function normalizeEvent(e) {
|
|
217
|
+
return normalizeEventAt(e, Date.now());
|
|
218
|
+
}
|
|
219
|
+
function normalizeEventAt(e, now) {
|
|
203
220
|
const id = e.id || e.title || "event";
|
|
204
221
|
const title = e.title || "Event";
|
|
205
222
|
const start = startDateOf(e);
|
|
@@ -210,7 +227,10 @@ function normalizeEvent(e) {
|
|
|
210
227
|
title,
|
|
211
228
|
day: date && !Number.isNaN(date.getTime()) ? String(date.getDate()) : title.slice(0, 1).toUpperCase(),
|
|
212
229
|
month: date && !Number.isNaN(date.getTime()) ? date.toLocaleString("en-US", { month: "short" }).toUpperCase() : "",
|
|
213
|
-
dateLine: eventWhen(e),
|
|
230
|
+
dateLine: eventWhen(e, now),
|
|
231
|
+
// "Past" for a finished event, "" otherwise — the shared collection row prints it in the
|
|
232
|
+
// meta line, so an event from last month no longer reads as current.
|
|
233
|
+
statusLabel: eventIsPast(e, now) ? "Past" : "",
|
|
214
234
|
location: eventLocation(e),
|
|
215
235
|
status: titleCase(e.eventStatus) || titleCase(e.status),
|
|
216
236
|
image,
|
|
@@ -370,6 +390,7 @@ export {
|
|
|
370
390
|
eventDescription,
|
|
371
391
|
eventEndMillis,
|
|
372
392
|
eventImage,
|
|
393
|
+
eventIsPast,
|
|
373
394
|
eventLocation,
|
|
374
395
|
eventMapUrl,
|
|
375
396
|
eventStartMillis,
|
|
@@ -378,6 +399,7 @@ export {
|
|
|
378
399
|
getEventGuestList,
|
|
379
400
|
getEventsOrder,
|
|
380
401
|
normalizeEvent,
|
|
402
|
+
normalizeEventAt,
|
|
381
403
|
queryAvailableTickets,
|
|
382
404
|
queryEvents,
|
|
383
405
|
startDateOf,
|
|
@@ -10,6 +10,14 @@ function wixCall(method, path, body) {
|
|
|
10
10
|
}
|
|
11
11
|
return globalThis.himalaya.wixApi.call(method, path, body);
|
|
12
12
|
}
|
|
13
|
+
function portfolioCoverRef(cover) {
|
|
14
|
+
if (typeof cover === "string") return cover.trim();
|
|
15
|
+
if (!cover || typeof cover !== "object") return "";
|
|
16
|
+
const info = cover.imageInfo;
|
|
17
|
+
const url = typeof info?.url === "string" ? info.url.trim() : "";
|
|
18
|
+
if (url) return url;
|
|
19
|
+
return typeof info?.id === "string" ? info.id.trim() : "";
|
|
20
|
+
}
|
|
13
21
|
function listProjects(limit = 100, cursor) {
|
|
14
22
|
return wixCall("GET", `/portfolio/v1/projects?${pagingQuery(limit, cursor)}`);
|
|
15
23
|
}
|
|
@@ -17,11 +25,15 @@ function listCollections(limit = 100, cursor) {
|
|
|
17
25
|
return wixCall("GET", `/portfolio/v1/collections?${pagingQuery(limit, cursor)}`);
|
|
18
26
|
}
|
|
19
27
|
function listProjectItems(projectId, limit = 100, cursor) {
|
|
20
|
-
|
|
28
|
+
const query = cursor ? { cursorPaging: { limit, cursor } } : { filter: { projectId }, paging: { limit } };
|
|
29
|
+
return wixCall("POST", "/portfolio/v1/items/query", { query }).then(
|
|
30
|
+
(response) => response && !response.pagingMetadata && response.metadata ? { ...response, pagingMetadata: response.metadata } : response
|
|
31
|
+
);
|
|
21
32
|
}
|
|
22
33
|
export {
|
|
23
34
|
listCollections,
|
|
24
35
|
listProjectItems,
|
|
25
|
-
listProjects
|
|
36
|
+
listProjects,
|
|
37
|
+
portfolioCoverRef
|
|
26
38
|
};
|
|
27
39
|
//# sourceMappingURL=wix-portfolio.mjs.map
|
|
@@ -95,7 +95,7 @@ function getStoreCategory(categoryId) {
|
|
|
95
95
|
}
|
|
96
96
|
function categoryCount(c) {
|
|
97
97
|
const n = c.itemCounter;
|
|
98
|
-
return n != null ? `${n} ${n === 1 ? "product" : "products"}` : "";
|
|
98
|
+
return n != null && n > 0 ? `${n} ${n === 1 ? "product" : "products"}` : "";
|
|
99
99
|
}
|
|
100
100
|
function categoryImage(c, size = WIX_LIST_IMAGE) {
|
|
101
101
|
return wixMediaUrl(c.image?.url || "", size);
|
|
@@ -557,12 +557,18 @@ function fallbackMoney(num, code) {
|
|
|
557
557
|
const symbol = CURRENCY_SYMBOL[code];
|
|
558
558
|
return symbol ? `${sign}${symbol}${body}` : `${sign}${code}\xA0${body}`;
|
|
559
559
|
}
|
|
560
|
+
function symbolFirst(formatted) {
|
|
561
|
+
const raw = formatted.replace(/[]/g, "").trim();
|
|
562
|
+
const m = /^(-?)(\d{1,3}(?:,\d{3})*(?:\.\d+)?|\d+(?:\.\d+)?)[\s ]*(\S+)$/.exec(raw);
|
|
563
|
+
if (!m || !Object.values(CURRENCY_SYMBOL).includes(m[3])) return raw;
|
|
564
|
+
return `${m[1]}${m[3]}${m[2]}`;
|
|
565
|
+
}
|
|
560
566
|
function productCurrency(p) {
|
|
561
567
|
return p.currency || p.priceData?.currency || p.price?.currency || p.actualPriceRange?.minValue?.currency || "";
|
|
562
568
|
}
|
|
563
569
|
function productPrice(p) {
|
|
564
570
|
const preformatted = p.priceData?.formatted?.price || p.price?.formatted?.price || p.actualPriceRange?.minValue?.formattedAmount;
|
|
565
|
-
if (preformatted) return preformatted;
|
|
571
|
+
if (preformatted) return symbolFirst(preformatted);
|
|
566
572
|
const amount = p.priceData?.price != null ? p.priceData.price : p.price?.price != null ? p.price.price : p.actualPriceRange?.minValue?.amount ?? "";
|
|
567
573
|
if (amount === "" || amount == null) return "";
|
|
568
574
|
return formatMoney(amount, productCurrency(p));
|