@wix/himalaya-cli 0.1944.0 → 0.1946.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/stdlib/wix-sdk/ecom/src/extensions.d.ts +27 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +16 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{e113c7cdcf8f56ad861b2564505fab2a1975c7a995f92d2f999f9c4ce1a09a40.bin → 9521361aa5be10b9a96b96c0ea2f7e157e728874b20de5200879cbd735eefb38.bin} +1 -1
- package/dist/browser-plane/sw.js +9 -9
- package/dist/cli.mjs +1548 -912
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +6 -0
- package/guides/himi-json-output.md +15 -6
- package/guides/one-app-section-mappings.md +2 -2
- package/guides/one-app-to-himi-app.md +13 -4
- package/guides/release-notes.md +8 -0
- package/guides/sdk-reference.json +55 -0
- package/package.json +2 -2
- package/templates/bare-fashion/dev/index.ts +3 -1
- package/templates/bare-fashion/tier5-src/_shared/bare-fashion-product-card.ts +5 -4
- package/templates/bare-fashion/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/bare-fashion/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/bare-fashion/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-cart/index.ts +19 -12
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-collection/index.ts +9 -4
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-home/index.ts +10 -4
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-product/index.ts +17 -8
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-products/index.ts +8 -4
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-saved/index.ts +31 -12
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-search/index.ts +8 -4
- package/templates/beauty-salon/dev/index.ts +1 -0
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/beauty-salon/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/beauty-salon/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/beauty-salon/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/beauty-salon/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +7 -5
- package/templates/beauty-salon/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/branded-lite/dev/index.ts +4 -2
- package/templates/branded-lite/l10n/ar.json +5 -5
- package/templates/branded-lite/l10n/cs.json +5 -5
- package/templates/branded-lite/l10n/da.json +5 -5
- package/templates/branded-lite/l10n/de.json +5 -5
- package/templates/branded-lite/l10n/el.json +5 -5
- package/templates/branded-lite/l10n/es.json +5 -5
- package/templates/branded-lite/l10n/fi.json +5 -5
- package/templates/branded-lite/l10n/fr.json +5 -5
- package/templates/branded-lite/l10n/he.json +4 -4
- package/templates/branded-lite/l10n/hu.json +5 -5
- package/templates/branded-lite/l10n/id.json +5 -5
- package/templates/branded-lite/l10n/it.json +5 -5
- package/templates/branded-lite/l10n/ja.json +5 -5
- package/templates/branded-lite/l10n/ko.json +5 -5
- package/templates/branded-lite/l10n/lt.json +5 -5
- package/templates/branded-lite/l10n/nl.json +5 -5
- package/templates/branded-lite/l10n/no.json +5 -5
- package/templates/branded-lite/l10n/pl.json +5 -5
- package/templates/branded-lite/l10n/pt.json +5 -5
- package/templates/branded-lite/l10n/ru.json +5 -5
- package/templates/branded-lite/l10n/sv.json +5 -5
- package/templates/branded-lite/l10n/th.json +5 -5
- package/templates/branded-lite/l10n/tr.json +5 -5
- package/templates/branded-lite/l10n/uk.json +5 -5
- package/templates/branded-lite/l10n/vi.json +5 -5
- package/templates/branded-lite/l10n/zh.json +5 -5
- package/templates/branded-lite/recipes/wishlist-grid.json +1 -1
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/branded-lite/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/branded-lite/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/branded-lite/tier5-src/_shared/performance-tracker-section.ts +24 -16
- package/templates/branded-lite/tier5-src/_shared/performance-tracker-weeks.ts +27 -20
- package/templates/branded-lite/tier5-src/_shared/saved-products-section.ts +14 -8
- package/templates/branded-lite/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/branded-lite/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/branded-lite/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +32 -15
- package/templates/branded-lite/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/brandy/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/brandy/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/brandy/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/brandy/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/community-club/dev/index.ts +1 -0
- package/templates/community-club/l10n/ar.json +5 -0
- package/templates/community-club/l10n/cs.json +5 -0
- package/templates/community-club/l10n/da.json +5 -0
- package/templates/community-club/l10n/de.json +5 -0
- package/templates/community-club/l10n/el.json +5 -0
- package/templates/community-club/l10n/es.json +5 -0
- package/templates/community-club/l10n/fi.json +5 -0
- package/templates/community-club/l10n/fr.json +5 -0
- package/templates/community-club/l10n/he.json +4 -0
- package/templates/community-club/l10n/hu.json +5 -0
- package/templates/community-club/l10n/id.json +5 -0
- package/templates/community-club/l10n/it.json +5 -0
- package/templates/community-club/l10n/ja.json +5 -0
- package/templates/community-club/l10n/ko.json +5 -0
- package/templates/community-club/l10n/lt.json +5 -0
- package/templates/community-club/l10n/nl.json +5 -0
- package/templates/community-club/l10n/no.json +5 -0
- package/templates/community-club/l10n/pl.json +5 -0
- package/templates/community-club/l10n/pt.json +5 -0
- package/templates/community-club/l10n/ru.json +5 -0
- package/templates/community-club/l10n/sv.json +5 -0
- package/templates/community-club/l10n/th.json +5 -0
- package/templates/community-club/l10n/tr.json +5 -0
- package/templates/community-club/l10n/uk.json +5 -0
- package/templates/community-club/l10n/vi.json +5 -0
- package/templates/community-club/l10n/zh.json +5 -0
- package/templates/community-club/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/community-club/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/community-club/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/conference/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/conference/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/events-meetups/dev/index.ts +1 -0
- package/templates/events-meetups/l10n/ar.json +5 -0
- package/templates/events-meetups/l10n/cs.json +5 -0
- package/templates/events-meetups/l10n/da.json +5 -0
- package/templates/events-meetups/l10n/de.json +5 -0
- package/templates/events-meetups/l10n/el.json +5 -0
- package/templates/events-meetups/l10n/es.json +5 -0
- package/templates/events-meetups/l10n/fi.json +5 -0
- package/templates/events-meetups/l10n/fr.json +5 -0
- package/templates/events-meetups/l10n/he.json +4 -0
- package/templates/events-meetups/l10n/hu.json +5 -0
- package/templates/events-meetups/l10n/id.json +5 -0
- package/templates/events-meetups/l10n/it.json +5 -0
- package/templates/events-meetups/l10n/ja.json +5 -0
- package/templates/events-meetups/l10n/ko.json +5 -0
- package/templates/events-meetups/l10n/lt.json +5 -0
- package/templates/events-meetups/l10n/nl.json +5 -0
- package/templates/events-meetups/l10n/no.json +5 -0
- package/templates/events-meetups/l10n/pl.json +5 -0
- package/templates/events-meetups/l10n/pt.json +5 -0
- package/templates/events-meetups/l10n/ru.json +5 -0
- package/templates/events-meetups/l10n/sv.json +5 -0
- package/templates/events-meetups/l10n/th.json +5 -0
- package/templates/events-meetups/l10n/tr.json +5 -0
- package/templates/events-meetups/l10n/uk.json +5 -0
- package/templates/events-meetups/l10n/vi.json +5 -0
- package/templates/events-meetups/l10n/zh.json +5 -0
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/events-meetups/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/events-meetups/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/fitness-gym/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +3 -2
- package/templates/gym-fitness/dev/index.ts +3 -1
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/gym-fitness/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/gym-fitness/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/gym-fitness/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/gym-fitness/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +7 -5
- package/templates/gym-fitness/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/medical-services/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/medical-services/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/medical-services/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/nonprofit-cause/dev/index.ts +1 -0
- 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/collection-service.ts +35 -15
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/nonprofit-cause/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/nonprofit-cause/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/personal-fitness-trainer/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/personal-fitness-trainer/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/podcast-creator/dev/index.ts +1 -0
- 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/collection-service.ts +35 -15
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/podcast-creator/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/podcast-creator/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/portfolio-creative/dev/index.ts +1 -0
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/portfolio-creative/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +7 -5
- package/templates/portfolio-creative/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/professional-services/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/professional-services/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/professional-services/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/professional-services/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/restaurant/dev/index.ts +1 -0
- package/templates/restaurant/l10n/ar.json +5 -0
- package/templates/restaurant/l10n/cs.json +5 -0
- package/templates/restaurant/l10n/da.json +5 -0
- package/templates/restaurant/l10n/de.json +5 -0
- package/templates/restaurant/l10n/el.json +5 -0
- package/templates/restaurant/l10n/es.json +5 -0
- package/templates/restaurant/l10n/fi.json +5 -0
- package/templates/restaurant/l10n/fr.json +5 -0
- package/templates/restaurant/l10n/he.json +4 -0
- package/templates/restaurant/l10n/hu.json +5 -0
- package/templates/restaurant/l10n/id.json +5 -0
- package/templates/restaurant/l10n/it.json +5 -0
- package/templates/restaurant/l10n/ja.json +5 -0
- package/templates/restaurant/l10n/ko.json +5 -0
- package/templates/restaurant/l10n/lt.json +5 -0
- package/templates/restaurant/l10n/nl.json +5 -0
- package/templates/restaurant/l10n/no.json +5 -0
- package/templates/restaurant/l10n/pl.json +5 -0
- package/templates/restaurant/l10n/pt.json +5 -0
- package/templates/restaurant/l10n/ru.json +5 -0
- package/templates/restaurant/l10n/sv.json +5 -0
- package/templates/restaurant/l10n/th.json +5 -0
- package/templates/restaurant/l10n/tr.json +5 -0
- package/templates/restaurant/l10n/uk.json +5 -0
- package/templates/restaurant/l10n/vi.json +5 -0
- package/templates/restaurant/l10n/zh.json +5 -0
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/restaurant/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/restaurant/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/retail-store/dev/index.ts +1 -0
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/retail-store/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/retail-store/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/retail-store/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/retail-store/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/retail-store/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +32 -15
- package/templates/retail-store/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/salon-spa/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/salon-spa/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/salon-spa/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/wholesale-store/dev/index.ts +2 -2
- package/templates/wholesale-store/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/wholesale-store/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/wholesale-store/tier5-src/_shared/himi-store-collection.ts +7 -3
- package/templates/wholesale-store/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/wholesale-store/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/wholesale-store/tier5-src/himi-store-product/index.ts +32 -15
- package/templates/wholesale-store/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/wholesale-store/tier5-src/himi-wholesale-home/index.ts +19 -8
- package/templates/yoga-studio/dev/index.ts +3 -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/collection-service.ts +35 -15
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/yoga-studio/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +14 -13
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +65 -0
|
@@ -3,19 +3,28 @@
|
|
|
3
3
|
// card (himi-booking-bookings), so the two can never count differently.
|
|
4
4
|
//
|
|
5
5
|
// WHAT COUNTS as a session toward the goal: a CONFIRMED booking whose start falls in the CURRENT
|
|
6
|
-
// calendar week (
|
|
6
|
+
// calendar week (its first day 00:00 local → now) and is already in the past. An allow-list, not a
|
|
7
7
|
// deny-list: CREATED (checkout never completed), PENDING / PENDING_APPROVAL / PENDING_CHECKOUT,
|
|
8
8
|
// WAITING_LIST, CANCELED and DECLINED — and any status Wix adds later — do not count. That is
|
|
9
9
|
// "booked and it happened", not verified
|
|
10
10
|
// attendance: the member-scoped queryBookings row carries no attendance/check-in field (the Wix
|
|
11
11
|
// Attendance API is owner-scoped), so a no-show still counts. Future bookings this week do not
|
|
12
|
-
// count — they have not happened yet.
|
|
12
|
+
// count — they have not happened yet. So every count here is of HELD sessions, never of attendance:
|
|
13
|
+
// a label that shows one must not say "attended".
|
|
14
|
+
//
|
|
15
|
+
// THE WEEK starts on the first day of the app language's region (CLDR week data: Sunday for "en" /
|
|
16
|
+
// "en-US", Monday for "en-GB" or "de", Saturday for "ar-EG"), as the migrated source starts it. A
|
|
17
|
+
// screen may pin another day with a `firstWeekday` onAppear param (0 = Sunday … 6 = Saturday).
|
|
18
|
+
// `firstWeekdayOf` reads ECMA-402 week info where the engine has it and a CLDR table where it has
|
|
19
|
+
// not, so iOS, Android and web agree on the same week.
|
|
13
20
|
//
|
|
14
21
|
// DETERMINISM: nothing here runs at worker boot; every clock read is an argument. PURE (no network,
|
|
15
22
|
// no bridge) so the rules are unit-tested directly; the read lives with its caller.
|
|
16
23
|
|
|
17
24
|
import type { MemberBookingRow } from "./member-bookings.js";
|
|
18
25
|
import { copyParam, copyTemplate } from "./himi-copy.js";
|
|
26
|
+
import type { Weekday } from "./engine-intl.js";
|
|
27
|
+
export { MONDAY, firstWeekdayOf, resolveFirstWeekday, type Weekday } from "./engine-intl.js";
|
|
19
28
|
|
|
20
29
|
export const MAX_WEEKLY_SESSION_GOAL = 21;
|
|
21
30
|
|
|
@@ -32,27 +41,33 @@ export function parseWeeklyGoal(raw: unknown): number {
|
|
|
32
41
|
return Number.isInteger(n) && n >= 1 ? Math.min(n, MAX_WEEKLY_SESSION_GOAL) : 0;
|
|
33
42
|
}
|
|
34
43
|
|
|
35
|
-
/**
|
|
36
|
-
export function weekStartMs(now: number): number {
|
|
44
|
+
/** 00:00 local of the first day (`firstWeekday`) of `now`'s week, epoch ms. */
|
|
45
|
+
export function weekStartMs(now: number, firstWeekday: Weekday): number {
|
|
37
46
|
const d = new Date(now);
|
|
38
47
|
d.setHours(0, 0, 0, 0);
|
|
39
|
-
d.setDate(d.getDate() - ((d.getDay() +
|
|
48
|
+
d.setDate(d.getDate() - ((d.getDay() - firstWeekday + 7) % 7));
|
|
40
49
|
return d.getTime();
|
|
41
50
|
}
|
|
42
51
|
|
|
43
|
-
/** Is `row` a session that was booked and already held at `now`? The one rule every count here uses.
|
|
52
|
+
/** Is `row` a session that was booked and already held at `now`? The one rule every count here uses.
|
|
53
|
+
* Held, not attended: the member's booking row carries no check-in. */
|
|
44
54
|
export function isHeldSession(row: MemberBookingRow, now: number): boolean {
|
|
45
55
|
const start = Date.parse(row.start);
|
|
46
56
|
return Number.isFinite(start) && start < now && COUNTS_AS_SESSION.test((row.status || "").trim().toUpperCase());
|
|
47
57
|
}
|
|
48
58
|
|
|
59
|
+
/** The key one booking counts under: a booking read twice (two pages, a retry) counts once. */
|
|
60
|
+
export function sessionKey(row: MemberBookingRow): string {
|
|
61
|
+
return row.id || `${row.start}|${row.title}`;
|
|
62
|
+
}
|
|
63
|
+
|
|
49
64
|
/** Sessions toward the goal among `rows` — see the file header for what counts. */
|
|
50
|
-
export function weeklySessionsDone(rows: readonly MemberBookingRow[], now: number): number {
|
|
51
|
-
const from = weekStartMs(now);
|
|
65
|
+
export function weeklySessionsDone(rows: readonly MemberBookingRow[], now: number, firstWeekday: Weekday): number {
|
|
66
|
+
const from = weekStartMs(now, firstWeekday);
|
|
52
67
|
const seen = new Set<string>();
|
|
53
68
|
for (const row of rows) {
|
|
54
69
|
if (Date.parse(row.start) < from || !isHeldSession(row, now)) continue;
|
|
55
|
-
seen.add(row
|
|
70
|
+
seen.add(sessionKey(row));
|
|
56
71
|
}
|
|
57
72
|
return seen.size;
|
|
58
73
|
}
|
|
@@ -64,14 +79,15 @@ export interface BookingsPage {
|
|
|
64
79
|
|
|
65
80
|
/** Sessions toward the goal from PAST bookings read newest-first: `first` is the first page, and
|
|
66
81
|
* `next(cursor)` reads more only while the oldest row so far is still inside this week (a page of
|
|
67
|
-
* 50 almost always reaches back before
|
|
82
|
+
* 50 almost always reaches back before the week's first day). Bounded to MAX_WEEKLY_PAGES reads; a failing
|
|
68
83
|
* read rejects, so the caller hides the count rather than under-counting. */
|
|
69
84
|
export async function weeklySessionsFromPages(
|
|
70
85
|
first: BookingsPage,
|
|
71
86
|
next: (cursor: string) => Promise<BookingsPage>,
|
|
72
87
|
now: number,
|
|
88
|
+
firstWeekday: Weekday,
|
|
73
89
|
): Promise<number> {
|
|
74
|
-
const from = weekStartMs(now);
|
|
90
|
+
const from = weekStartMs(now, firstWeekday);
|
|
75
91
|
const rows = [...first.items];
|
|
76
92
|
let page = first;
|
|
77
93
|
for (let read = 1; read < MAX_WEEKLY_PAGES && page.nextCursor; read++) {
|
|
@@ -80,7 +96,7 @@ export async function weeklySessionsFromPages(
|
|
|
80
96
|
page = await next(page.nextCursor);
|
|
81
97
|
rows.push(...page.items);
|
|
82
98
|
}
|
|
83
|
-
return weeklySessionsDone(rows, now);
|
|
99
|
+
return weeklySessionsDone(rows, now, firstWeekday);
|
|
84
100
|
}
|
|
85
101
|
|
|
86
102
|
export interface WeeklyGoalProgress {
|
|
@@ -10,7 +10,7 @@ import { memberAccess, assertMemberAccess, memberAccessChanged, memberAccessDeni
|
|
|
10
10
|
import { fetchMemberBookings, CANCELLED_STATUSES, UNCONFIRMED_STATUSES, type MemberBookingRow } from "../_shared/member-bookings.js";
|
|
11
11
|
import { emitHostEvent } from "../_shared/host-events.js";
|
|
12
12
|
import { formatClock, formatClockRange, formatDateMedium, formatMonthDay, formatWeekdayMonthDay, formatWeekdayMonthDayLong } from "../_shared/engine-intl.js";
|
|
13
|
-
import { parseWeeklyGoal, weeklyGoalProgress, weeklySessionsFromPages } from "../_shared/weekly-goal.js";
|
|
13
|
+
import { parseWeeklyGoal, resolveFirstWeekday, weeklyGoalProgress, weeklySessionsFromPages } from "../_shared/weekly-goal.js";
|
|
14
14
|
|
|
15
15
|
// My Bookings: Upcoming / Past / Canceled tabs over the member's own bookings, a booking sheet with
|
|
16
16
|
// the details and the actions (add to calendar, directions, Book Again, Cancel Booking with a
|
|
@@ -50,6 +50,9 @@ let consumedBookingId = "";
|
|
|
50
50
|
// count comes from a dedicated read of this week's PAST bookings on each first-page fetch, NOT
|
|
51
51
|
// from `rows` (those follow the list's tab — Upcoming by default — and would read 0).
|
|
52
52
|
let weeklyGoal = 0;
|
|
53
|
+
/** The onAppear `firstWeekday` param when the screen pins one; absent, the week starts on the app
|
|
54
|
+
* language's first day (`resolveFirstWeekday`), the rule every weekly count shares. */
|
|
55
|
+
let firstWeekdayParam: unknown;
|
|
53
56
|
/** The count of the page that APPLIED — set in `apply`, never by a fetch, so a superseded fetch
|
|
54
57
|
* (another member, a refresh) cannot overwrite it: it travels in that page's metadata and is
|
|
55
58
|
* dropped with it. */
|
|
@@ -66,7 +69,7 @@ async function fetchWeeklySessionsDone(member: MemberAccess, now: number): Promi
|
|
|
66
69
|
try {
|
|
67
70
|
const nowIso = new Date(now).toISOString();
|
|
68
71
|
const read = (cursor: string) => fetchMemberBookings({ query: "", filter: "value:Past", sort: "za", savedIds: [] }, cursor, nowIso, member);
|
|
69
|
-
return await weeklySessionsFromPages(await read(""), read, now);
|
|
72
|
+
return await weeklySessionsFromPages(await read(""), read, now, resolveFirstWeekday(firstWeekdayParam));
|
|
70
73
|
} catch {
|
|
71
74
|
return null;
|
|
72
75
|
}
|
|
@@ -304,6 +307,8 @@ const svc = defineBackendCollection<S, MemberBookingRow>("himiBookingBookings",
|
|
|
304
307
|
readResultSnackbar(arg);
|
|
305
308
|
const goal = parseWeeklyGoal((arg as Record<string, unknown> | undefined)?.weeklyGoal);
|
|
306
309
|
if (goal) weeklyGoal = goal;
|
|
310
|
+
const pinnedWeekday = (arg as Record<string, unknown> | undefined)?.firstWeekday;
|
|
311
|
+
if (pinnedWeekday !== undefined) firstWeekdayParam = pinnedWeekday;
|
|
307
312
|
// A deep link (the home "next booking", the place summary) names a booking: open its sheet once
|
|
308
313
|
// its row is on the first page. `date` alone does nothing now (there is no day view).
|
|
309
314
|
const linked = runtime()?.input?.bookingId;
|
|
@@ -2523,6 +2523,7 @@ const SCREENS = runtimeSetting({
|
|
|
2523
2523
|
"verticals": "[\"plans\",\"feed\",\"events\",\"blog\",\"groups\"]",
|
|
2524
2524
|
"homeModules": "[{\"id\":\"saved\",\"label\":\"Saved on this device\",\"dataSource\":\"device.saved_items\",\"emptyWhen\":[\"noSavedContent\"]},{\"id\":\"section_0\",\"label\":\"Discover 1\",\"dataSource\":\"communityPulse.section0\",\"emptyWhen\":[\"noMemberAvatars\"]},{\"id\":\"section_1\",\"label\":\"From the field\",\"dataSource\":\"communityPulse.section1\",\"emptyWhen\":[\"noAnnouncement\",\"noUpcomingEvents\"]},{\"id\":\"section_2\",\"label\":\"Chapters & teams\",\"dataSource\":\"communityPulse.section2\",\"emptyWhen\":[\"noGroupCards\"]},{\"id\":\"section_3\",\"label\":\"Latest from the community\",\"dataSource\":\"communityPulse.section3\"}]",
|
|
2525
2525
|
"ownerDefaultLayout": "communityPulse",
|
|
2526
|
+
"firstWeekday": "0",
|
|
2526
2527
|
"copy": "{\"home.activityTitle\":\"Latest from the community\",\"home.announcementCaption\":\"From the field\",\"home.eventsTitle\":\"Volunteer opportunities\",\"home.groupsSubtitle\":\"Find your cause and pitch in.\",\"home.groupsTitle\":\"Chapters & teams\",\"home.joinConversationCta\":\"Share your story\",\"home.membersCaption\":\"Our volunteers\",\"home.onboardingBody\":\"Find a way to give, sign up to volunteer, and follow the mission's impact — all in one place.\",\"home.profileBody\":\"Sign in for RSVPs, memberships, groups and saved posts.\"}"
|
|
2527
2528
|
}
|
|
2528
2529
|
}
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "محدد",
|
|
2726
2726
|
"origin": "machine"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "المنتج",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "إخفاء",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "vybráno",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produkt",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Skrýt",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "valgt",
|
|
2726
2726
|
"origin": "machine"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produkt",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Skjul",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "ausgewählt",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produkt",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Ausblenden",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "επιλέχθηκαν",
|
|
2726
2726
|
"origin": "machine"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Προϊόν",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Απόκρυψη",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "seleccionados",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Producto",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Ocultar",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "valittu",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Tuote",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Piilota",
|
|
@@ -2705,6 +2705,11 @@
|
|
|
2705
2705
|
"translation": "sélectionné(s)",
|
|
2706
2706
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2707
2707
|
},
|
|
2708
|
+
"h_dd3b86d1ef21": {
|
|
2709
|
+
"source": "Product",
|
|
2710
|
+
"translation": "Article",
|
|
2711
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2712
|
+
},
|
|
2708
2713
|
"h_34d8b60fe253": {
|
|
2709
2714
|
"source": "Hide",
|
|
2710
2715
|
"translation": "Masquer",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "kijelölve",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Termék",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Elrejtés",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "dipilih",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produk",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Sembunyikan",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "selezionato",
|
|
2726
2726
|
"origin": "machine"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Prodotto",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Nascondi",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "選択中",
|
|
2726
2726
|
"origin": "one-app:mobile-apps-inbox:ARIA_BUSINESS_SELECTOR_SELECTED"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "商品",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "非表示",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "선택됨",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "제품",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "비공개",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "pasirinkta",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produktas",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Slėpti",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "geselecteerd",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Product",
|
|
2731
|
+
"origin": "machine"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Verbergen",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "valgte",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produkt",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Skjul",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "wybrano",
|
|
2726
2726
|
"origin": "machine"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produkt",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Ukryj",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "selecionado",
|
|
2726
2726
|
"origin": "machine"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produto",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Ocultar",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "выбрано",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Товар",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Скрыть",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "valda",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Produkt",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Dölj",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "เลือกแล้ว",
|
|
2726
2726
|
"origin": "one-app:mobile-apps-inbox:ARIA_BUSINESS_SELECTOR_SELECTED"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "สินค้า",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "ซ่อน",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "seçili",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Ürün",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Gizle",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "обрано",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Товар",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Приховати",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "đã chọn",
|
|
2726
2726
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "Sản phẩm",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "Ẩn",
|
|
@@ -2725,6 +2725,11 @@
|
|
|
2725
2725
|
"translation": "已選擇",
|
|
2726
2726
|
"origin": "one-app:mobile-apps-inbox:ARIA_BUSINESS_SELECTOR_SELECTED"
|
|
2727
2727
|
},
|
|
2728
|
+
"h_dd3b86d1ef21": {
|
|
2729
|
+
"source": "Product",
|
|
2730
|
+
"translation": "產品",
|
|
2731
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2732
|
+
},
|
|
2728
2733
|
"h_34d8b60fe253": {
|
|
2729
2734
|
"source": "Hide",
|
|
2730
2735
|
"translation": "隱藏",
|
|
@@ -15,7 +15,10 @@ type MemberAvatarFactory = (changed: () => void) => {
|
|
|
15
15
|
|
|
16
16
|
export interface CollectionSaving {
|
|
17
17
|
read(): string[];
|
|
18
|
-
|
|
18
|
+
/** May settle later (an account write); a rejection restores the selection and says so. */
|
|
19
|
+
write(ids: string[], rows: Record<string, unknown>[]): void | Promise<void>;
|
|
20
|
+
/** Re-read the saved ids `read` answers (an account list), before a load or refresh reads them. */
|
|
21
|
+
refresh?(): Promise<void>;
|
|
19
22
|
}
|
|
20
23
|
type State = Record<string, unknown>;
|
|
21
24
|
interface BackendCollection {
|
|
@@ -263,19 +266,33 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
263
266
|
const criteriaBefore = criteriaKey();
|
|
264
267
|
const before = [...prefs.savedIds], undoBefore = lastUndo;
|
|
265
268
|
update(arg, s);
|
|
269
|
+
const failed = () => {
|
|
270
|
+
prefs.savedIds = before; lastUndo = undoBefore;
|
|
271
|
+
saveMessage = copyParam('collection.saveError', 'Could not save this change. Try again.');
|
|
272
|
+
};
|
|
273
|
+
const finish = (settledLater: boolean) => {
|
|
274
|
+
persisted.write(prefs);
|
|
275
|
+
if (backend && config.backendQuery && criteriaBefore !== criteriaKey()) return backend.controller.query(criteria()).then(() => undefined);
|
|
276
|
+
// A write that settled later lands on the rows as they are now, not as they were when it began.
|
|
277
|
+
return derive(settledLater && backend ? backend.apply(s, backend.controller.getState()) : s);
|
|
278
|
+
};
|
|
266
279
|
if (saving && JSON.stringify(before) !== JSON.stringify(prefs.savedIds)) {
|
|
280
|
+
let written: void | Promise<void>;
|
|
267
281
|
try {
|
|
268
|
-
saving.write(prefs.savedIds, Array.isArray(s[config.rows]) ? s[config.rows] as CollectionRow[] : []);
|
|
269
|
-
saveMessage = '';
|
|
282
|
+
written = saving.write(prefs.savedIds, Array.isArray(s[config.rows]) ? s[config.rows] as CollectionRow[] : []);
|
|
270
283
|
} catch {
|
|
271
|
-
|
|
272
|
-
|
|
284
|
+
failed();
|
|
285
|
+
return finish(false);
|
|
286
|
+
}
|
|
287
|
+
if (written && typeof written.then === 'function') {
|
|
288
|
+
return written.then(() => { saveMessage = ''; return finish(true); }, () => { failed(); return finish(true); });
|
|
273
289
|
}
|
|
290
|
+
saveMessage = '';
|
|
274
291
|
}
|
|
275
|
-
|
|
276
|
-
if (backend && config.backendQuery && criteriaBefore !== criteriaKey()) return backend.controller.query(criteria()).then(() => undefined);
|
|
277
|
-
return derive(s);
|
|
292
|
+
return finish(false);
|
|
278
293
|
};
|
|
294
|
+
/** Runs `then` once the saved ids are re-read (an account list); at once, in the same turn, when there is nothing to re-read. */
|
|
295
|
+
const afterSavingRefresh = (then: () => Promise<undefined>): Promise<undefined> => saving?.refresh ? saving.refresh().catch(() => undefined).then(then) : then();
|
|
279
296
|
/** Filter and sort in ONE criteria change, so a tab that sets both runs one query, not two. */
|
|
280
297
|
const setCriteria = (arg: unknown): void => {
|
|
281
298
|
const input = object(arg);
|
|
@@ -329,15 +346,18 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
329
346
|
if (backend) {
|
|
330
347
|
actions.collectionDataChanged = s => derive(backend.apply(s, backend.controller.getState()));
|
|
331
348
|
actions.load = (_s, arg) => {
|
|
332
|
-
stashCopy(arg);
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
349
|
+
stashCopy(arg);
|
|
350
|
+
return afterSavingRefresh(() => {
|
|
351
|
+
syncSaved(); applyNavigationCriteria(arg, _s);
|
|
352
|
+
const reset = backend.onLoad?.(arg);
|
|
353
|
+
if (reset) { setCriteria(reset); persisted.write(prefs); }
|
|
354
|
+
// A load of what the screen already shows is the screen coming back: it revalidates behind its rows.
|
|
355
|
+
return backend.controller.query(criteria(), backend.restorePagesOnLoad, true).then(() => undefined);
|
|
356
|
+
});
|
|
337
357
|
};
|
|
338
358
|
actions.refresh = (_s, arg) => {
|
|
339
|
-
stashCopy(arg);
|
|
340
|
-
return backend.controller.query(criteria()).then(() => undefined);
|
|
359
|
+
stashCopy(arg);
|
|
360
|
+
return afterSavingRefresh(() => { syncSaved(); return backend.controller.query(criteria()).then(() => undefined); });
|
|
341
361
|
};
|
|
342
362
|
actions.loadMore = () => backend.controller.loadMore().then(() => undefined);
|
|
343
363
|
actions.retry = actions.collectionRetry = () => backend.controller.retry().then(() => undefined);
|