@wix/himalaya-cli 0.1544.0 → 0.1546.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/sdk/agent/src/index.d.ts +5 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +14 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/read.d.ts +60 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/activity-counters-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ai-site-chat/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/analytics/src/index.d.ts +42 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/async-jobs/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/automations-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/badges-v2/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/billing-tax-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +5 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/extensions.d.ts +4 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/bookings-v2/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-feed/src/index.d.ts +11 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/business-tools-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/chat-web/src/index.d.ts +22 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/contacts/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/coupons/src/index.d.ts +24 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/crm-tasks/src/index.d.ts +11 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/dashboard-setup/src/index.d.ts +11 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/data-collections-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/donations/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +6 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/email-marketing-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/events/src/index.d.ts +24 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/faq-v2/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forms/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/forum/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +11 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/gift-cards/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/groups/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/extensions.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/inbox/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/invoices/src/index.d.ts +24 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/loyalty/src/index.d.ts +28 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/marketing-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-feed-viewer/src/index.d.ts +23 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +25 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/new-releases/src/index.d.ts +23 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notification-preferences/src/index.d.ts +23 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/notifications-v3/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +25 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/portfolio/src/index.d.ts +25 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/pricing-plans/src/index.d.ts +28 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/redirects-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/extensions.d.ts +2 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/restaurants/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/reviews/src/index.d.ts +24 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/seo-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-list/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/site-media/src/index.d.ts +11 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/social-feed/src/index.d.ts +23 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/display.d.ts +3 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-collections/src/index.d.ts +27 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/catalog.d.ts +7 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +4 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/extensions.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/table-reservations/src/index.d.ts +25 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/users/src/index.d.ts +23 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/video/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/wix-data/src/index.d.ts +27 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/workflows-v1/src/index.d.ts +19 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/runtime.generated.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +12 -4
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +36 -11
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +206 -12
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-activity-counters.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ai-site-chat.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-analytics.mjs +21 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-async-jobs.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-automations.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-badges.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-billing-tax.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +31 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-bookings.mjs +26 -12
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-business-tools.mjs +20 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-chat-web.mjs +29 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +28 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-contacts.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-coupons.mjs +14 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data-collections.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-data.mjs +15 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-donations.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +33 -16
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-email-marketing.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +14 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-faq.mjs +20 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forms.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-forum.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-gift-cards.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-groups.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-inbox.mjs +21 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-invoices.mjs +14 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-loyalty.mjs +16 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-marketing.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members-feed-viewer.mjs +21 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +17 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-new-releases.mjs +17 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notification-preferences.mjs +20 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-notifications.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-online-programs.mjs +16 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-portfolio.mjs +16 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-pricing-plans.mjs +22 -14
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-redirects.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-restaurants.mjs +22 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-reviews.mjs +14 -6
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-rich-content-editor.mjs +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-seo.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-site-list.mjs +19 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-social-feed.mjs +15 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores-collections.mjs +20 -10
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-stores.mjs +116 -83
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-table-reservations.mjs +16 -8
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-users.mjs +15 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-video.mjs +9 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-workflows.mjs +19 -5
- package/dist/cli.mjs +1002 -806
- package/dist/preview-assets.generated.bin +0 -0
- package/fixtures/wix-canned.json +8 -8
- package/guides/dynamic-list.service.ts +38 -29
- package/guides/form-submit.service.ts +2 -1
- package/guides/himi-json-output.md +29 -0
- package/guides/iap-products.md +49 -4
- package/guides/index.json +6 -0
- package/guides/offline-reading.md +63 -0
- package/guides/recipe-dynamic-list.md +2 -0
- package/guides/recipe-four-state.md +1 -0
- package/guides/sdk-reference.json +225 -99
- package/guides/testing-himi-apps.md +2 -0
- package/guides/tier-5-add-a-screen.md +2 -0
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +4 -3
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/beauty-salon/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-orders/index.ts +3 -0
- package/templates/beauty-salon-owner/dev/index.ts +19 -19
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/branded-lite/dev/index.ts +38 -20
- package/templates/branded-lite/tier5-src/_shared/collection-query-legacy.ts +194 -0
- package/templates/branded-lite/tier5-src/_shared/collection-query.ts +158 -99
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +31 -11
- package/templates/branded-lite/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/branded-lite/tier5-src/_shared/read-service.ts +255 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-orders/index.ts +3 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-shop/index.ts +202 -159
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +130 -201
- package/templates/community-club/dev/index.ts +4 -4
- package/templates/community-club/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/community-club/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/community-club-owner/dev/index.ts +19 -19
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/community-club-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/events-meetups/dev/index.ts +3 -3
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/events-meetups/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/events-meetups-owner/dev/index.ts +17 -17
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/events-meetups-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/gym-fitness/dev/index.ts +5 -4
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/gym-fitness/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-orders/index.ts +3 -0
- package/templates/gym-fitness-owner/dev/index.ts +20 -20
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/nonprofit-cause/dev/index.ts +4 -4
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/nonprofit-cause/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/nonprofit-cause-owner/dev/index.ts +18 -18
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/owner-lite/dev/index.ts +20 -20
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/owner-lite/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/podcast-creator/dev/index.ts +4 -4
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/podcast-creator/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/podcast-creator-owner/dev/index.ts +19 -19
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/portfolio-creative/dev/index.ts +5 -4
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/portfolio-creative/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-orders/index.ts +3 -0
- package/templates/portfolio-creative-owner/dev/index.ts +19 -19
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/restaurant/dev/index.ts +3 -3
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/restaurant/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/restaurant-owner/dev/index.ts +20 -20
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/restaurant-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/retail-store/dev/index.ts +19 -1
- package/templates/retail-store/tier5-src/_shared/collection-query-legacy.ts +194 -0
- package/templates/retail-store/tier5-src/_shared/collection-query.ts +158 -99
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +31 -11
- package/templates/retail-store/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/retail-store/tier5-src/_shared/read-service.ts +255 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-orders/index.ts +3 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-shop/index.ts +202 -159
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +130 -201
- package/templates/retail-store-owner/dev/index.ts +18 -18
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/retail-store-owner/tier5-src/_shared/owner-module-data.ts +1 -1
- package/templates/yoga-studio/dev/index.ts +4 -4
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/yoga-studio/tier5-src/_shared/iap-presentation.ts +7 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +1 -1
- package/templates/yoga-studio-owner/dev/index.ts +18 -18
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +6 -9
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-module-data.ts +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { withOnlineWrites } from './online-actions.js';
|
|
2
1
|
import { defineService as register, type ServiceDefinition } from '@himalaya/state';
|
|
3
2
|
import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
|
|
4
3
|
import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
|
|
@@ -95,10 +94,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
95
94
|
if (sort === 'default' || sort === 'az' || sort === 'za') { prefs.sort = sort; changed = true; }
|
|
96
95
|
}
|
|
97
96
|
if (Object.prototype.hasOwnProperty.call(input, 'collectionFilter')) {
|
|
98
|
-
const
|
|
99
|
-
// Old links to Saved must migrate with the stored preference when this
|
|
100
|
-
// collection no longer exposes that filter.
|
|
101
|
-
const filter = config.rowStyle === 'flat' && requestedFilter === 'saved' ? 'all' : requestedFilter;
|
|
97
|
+
const filter = String(input.collectionFilter ?? '');
|
|
102
98
|
const configured = config.filterValues ?? [];
|
|
103
99
|
const rows = Array.isArray(state[config.rows]) ? state[config.rows] as CollectionRow[] : [];
|
|
104
100
|
const derived = config.filter ? rows.map(row => String(row[config.filter!] ?? '')).filter(Boolean) : [];
|
|
@@ -142,7 +138,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
142
138
|
copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
|
|
143
139
|
});
|
|
144
140
|
if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
|
|
145
|
-
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') },
|
|
141
|
+
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
|
|
146
142
|
...projected.filters.map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label) }))];
|
|
147
143
|
const loading = s.status === 'loading' || s.isLoading === true;
|
|
148
144
|
// Older domain reducers expose `errored` rather than `isErrored`; backend
|
|
@@ -223,7 +219,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
223
219
|
? [copyParam(`collection.${name}.countOne`, config.countNoun[0]), copyParam(`collection.${name}.countMany`, config.countNoun[1])] : undefined }),
|
|
224
220
|
selectedSummary: `${prefs.selectedIds.length} ${copyParam('collection.selected', 'selected')}`,
|
|
225
221
|
filterChoices,
|
|
226
|
-
chips: config.filterValues
|
|
222
|
+
chips: config.filterValues ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
|
|
227
223
|
} };
|
|
228
224
|
};
|
|
229
225
|
const actions: Record<string, Reducer> = {};
|
|
@@ -374,8 +370,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
|
|
|
374
370
|
controller: controller as unknown as BackendCollection['controller'],
|
|
375
371
|
apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
|
|
376
372
|
});
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
// Compatibility starters retain their existing mutation behavior; accept the
|
|
374
|
+
// current authoring contract without enabling the offline-write rollout.
|
|
375
|
+
const handle = (options.register ?? register)(name, definition);
|
|
379
376
|
// Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
|
|
380
377
|
// when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
|
|
381
378
|
// starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
|
|
@@ -45,7 +45,7 @@ const LIMIT = 50;
|
|
|
45
45
|
let zoneLookup: Promise<string | undefined> | undefined;
|
|
46
46
|
function siteZone(): Promise<string | undefined> {
|
|
47
47
|
// `Promise.resolve().then` so a bridge that throws synchronously is caught here too.
|
|
48
|
-
zoneLookup ??= Promise.resolve().then(getSiteTimeZone).catch(() => undefined);
|
|
48
|
+
zoneLookup ??= Promise.resolve().then(() => getSiteTimeZone()).catch(() => undefined);
|
|
49
49
|
return zoneLookup;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -7374,7 +7374,8 @@ const SCREENS = runtimeSetting({
|
|
|
7374
7374
|
"style": "body",
|
|
7375
7375
|
"color": "textSecondary"
|
|
7376
7376
|
}
|
|
7377
|
-
}
|
|
7377
|
+
},
|
|
7378
|
+
"modifiers": {}
|
|
7378
7379
|
},
|
|
7379
7380
|
{
|
|
7380
7381
|
"id": "himi_shop.retry",
|
|
@@ -18965,7 +18966,7 @@ const SCREENS = runtimeSetting({
|
|
|
18965
18966
|
"package": "himalaya",
|
|
18966
18967
|
"type": "Text",
|
|
18967
18968
|
"props": {
|
|
18968
|
-
"text": "Showing
|
|
18969
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
18969
18970
|
"style": "caption",
|
|
18970
18971
|
"color": "textSecondary"
|
|
18971
18972
|
}
|
|
@@ -22254,7 +22255,7 @@ const SCREENS = runtimeSetting({
|
|
|
22254
22255
|
"package": "himalaya",
|
|
22255
22256
|
"type": "Text",
|
|
22256
22257
|
"props": {
|
|
22257
|
-
"text": "Showing
|
|
22258
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
22258
22259
|
"style": "caption",
|
|
22259
22260
|
"color": "textSecondary"
|
|
22260
22261
|
}
|
|
@@ -25820,7 +25821,7 @@ const SCREENS = runtimeSetting({
|
|
|
25820
25821
|
"package": "himalaya",
|
|
25821
25822
|
"type": "Text",
|
|
25822
25823
|
"props": {
|
|
25823
|
-
"text": "Showing
|
|
25824
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
25824
25825
|
"style": "caption",
|
|
25825
25826
|
"color": "textSecondary"
|
|
25826
25827
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { withOnlineWrites } from './online-actions.js';
|
|
2
1
|
import { defineService as register, type ServiceDefinition } from '@himalaya/state';
|
|
3
2
|
import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
|
|
4
3
|
import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
|
|
@@ -95,10 +94,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
95
94
|
if (sort === 'default' || sort === 'az' || sort === 'za') { prefs.sort = sort; changed = true; }
|
|
96
95
|
}
|
|
97
96
|
if (Object.prototype.hasOwnProperty.call(input, 'collectionFilter')) {
|
|
98
|
-
const
|
|
99
|
-
// Old links to Saved must migrate with the stored preference when this
|
|
100
|
-
// collection no longer exposes that filter.
|
|
101
|
-
const filter = config.rowStyle === 'flat' && requestedFilter === 'saved' ? 'all' : requestedFilter;
|
|
97
|
+
const filter = String(input.collectionFilter ?? '');
|
|
102
98
|
const configured = config.filterValues ?? [];
|
|
103
99
|
const rows = Array.isArray(state[config.rows]) ? state[config.rows] as CollectionRow[] : [];
|
|
104
100
|
const derived = config.filter ? rows.map(row => String(row[config.filter!] ?? '')).filter(Boolean) : [];
|
|
@@ -142,7 +138,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
142
138
|
copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
|
|
143
139
|
});
|
|
144
140
|
if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
|
|
145
|
-
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') },
|
|
141
|
+
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
|
|
146
142
|
...projected.filters.map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label) }))];
|
|
147
143
|
const loading = s.status === 'loading' || s.isLoading === true;
|
|
148
144
|
// Older domain reducers expose `errored` rather than `isErrored`; backend
|
|
@@ -223,7 +219,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
223
219
|
? [copyParam(`collection.${name}.countOne`, config.countNoun[0]), copyParam(`collection.${name}.countMany`, config.countNoun[1])] : undefined }),
|
|
224
220
|
selectedSummary: `${prefs.selectedIds.length} ${copyParam('collection.selected', 'selected')}`,
|
|
225
221
|
filterChoices,
|
|
226
|
-
chips: config.filterValues
|
|
222
|
+
chips: config.filterValues ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
|
|
227
223
|
} };
|
|
228
224
|
};
|
|
229
225
|
const actions: Record<string, Reducer> = {};
|
|
@@ -374,8 +370,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
|
|
|
374
370
|
controller: controller as unknown as BackendCollection['controller'],
|
|
375
371
|
apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
|
|
376
372
|
});
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
// Compatibility starters retain their existing mutation behavior; accept the
|
|
374
|
+
// current authoring contract without enabling the offline-write rollout.
|
|
375
|
+
const handle = (options.register ?? register)(name, definition);
|
|
379
376
|
// Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
|
|
380
377
|
// when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
|
|
381
378
|
// starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
|
|
@@ -103,6 +103,8 @@ export function withIapPresentation<S extends object>(options: {
|
|
|
103
103
|
// scopeLanded is the completion of the active load, not a stale load result. It
|
|
104
104
|
// must publish even if another overlapping onAppear load advanced contentVersion.
|
|
105
105
|
if (!next || (content && action !== "scopeLanded" && version !== contentVersion)) return undefined;
|
|
106
|
+
// A committed read projection supersedes older load results still carrying a skeleton.
|
|
107
|
+
if (action === "readChanged" && definition.readLifecycle) contentVersion++;
|
|
106
108
|
if (content) {
|
|
107
109
|
options.onContent?.(next);
|
|
108
110
|
const nextItems = options.items(next);
|
|
@@ -130,9 +132,11 @@ export function withIapPresentation<S extends object>(options: {
|
|
|
130
132
|
};
|
|
131
133
|
try {
|
|
132
134
|
const next = reduce(state, ...args);
|
|
133
|
-
//
|
|
134
|
-
//
|
|
135
|
-
|
|
135
|
+
// A cached read projection must commit before another onAppear can consume it.
|
|
136
|
+
// Other content actions retain their scheduling: shop filters and panels can
|
|
137
|
+
// change while a load is pending, and their existing completion order matters.
|
|
138
|
+
const synchronousReadProjection = action === "readChanged" && !!definition.readLifecycle;
|
|
139
|
+
if ((content && !synchronousReadProjection) || (next && typeof (next as Promise<S | undefined>).then === "function")) {
|
|
136
140
|
return (async () => {
|
|
137
141
|
try { return presentResult(await next); }
|
|
138
142
|
finally { finished(); }
|
|
@@ -250,7 +250,7 @@ interface State {
|
|
|
250
250
|
hideFeaturedSkeleton: boolean;
|
|
251
251
|
welcome: string;
|
|
252
252
|
refreshedAt: string;
|
|
253
|
-
/** The resolved home layout preset (
|
|
253
|
+
/** The resolved home layout preset (shared slot discriminator).
|
|
254
254
|
* Plain string, never a proto enum — a `$service:` casePath decodes it as a
|
|
255
255
|
* JSON string and unknown values fall through to the shipped defaultCase. */
|
|
256
256
|
effectiveLayout: string;
|
|
@@ -161,6 +161,9 @@ function derive(state: State): State {
|
|
|
161
161
|
});
|
|
162
162
|
return {
|
|
163
163
|
...state,
|
|
164
|
+
nextCursor: state.nextCursor ?? "",
|
|
165
|
+
filterOptions: state.filterOptions ?? [{ id: "all", label: copyParam("collection.all", "All"), selected: true },
|
|
166
|
+
...Object.keys(FULFILLMENT).map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label), selected: false }))],
|
|
164
167
|
displayRows: rows.map((row, index, rows) => {
|
|
165
168
|
// Older owned cache rows retain their original date in meta. Group only
|
|
166
169
|
// adjacent days so pagination and an explicit backend sort remain authoritative.
|
|
@@ -584,7 +584,7 @@ const SCREENS = runtimeSetting({
|
|
|
584
584
|
"package": "himalaya",
|
|
585
585
|
"type": "Text",
|
|
586
586
|
"props": {
|
|
587
|
-
"text": "Showing
|
|
587
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
588
588
|
"style": "caption",
|
|
589
589
|
"color": "textSecondary"
|
|
590
590
|
}
|
|
@@ -3938,7 +3938,7 @@ const SCREENS = runtimeSetting({
|
|
|
3938
3938
|
"package": "himalaya",
|
|
3939
3939
|
"type": "Text",
|
|
3940
3940
|
"props": {
|
|
3941
|
-
"text": "Showing
|
|
3941
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
3942
3942
|
"style": "caption",
|
|
3943
3943
|
"color": "textSecondary"
|
|
3944
3944
|
}
|
|
@@ -7205,7 +7205,7 @@ const SCREENS = runtimeSetting({
|
|
|
7205
7205
|
"package": "himalaya",
|
|
7206
7206
|
"type": "Text",
|
|
7207
7207
|
"props": {
|
|
7208
|
-
"text": "Showing
|
|
7208
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
7209
7209
|
"style": "caption",
|
|
7210
7210
|
"color": "textSecondary"
|
|
7211
7211
|
}
|
|
@@ -10379,7 +10379,7 @@ const SCREENS = runtimeSetting({
|
|
|
10379
10379
|
"package": "himalaya",
|
|
10380
10380
|
"type": "Text",
|
|
10381
10381
|
"props": {
|
|
10382
|
-
"text": "Showing
|
|
10382
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
10383
10383
|
"style": "caption",
|
|
10384
10384
|
"color": "textSecondary"
|
|
10385
10385
|
}
|
|
@@ -13733,7 +13733,7 @@ const SCREENS = runtimeSetting({
|
|
|
13733
13733
|
"package": "himalaya",
|
|
13734
13734
|
"type": "Text",
|
|
13735
13735
|
"props": {
|
|
13736
|
-
"text": "Showing
|
|
13736
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
13737
13737
|
"style": "caption",
|
|
13738
13738
|
"color": "textSecondary"
|
|
13739
13739
|
}
|
|
@@ -17087,7 +17087,7 @@ const SCREENS = runtimeSetting({
|
|
|
17087
17087
|
"package": "himalaya",
|
|
17088
17088
|
"type": "Text",
|
|
17089
17089
|
"props": {
|
|
17090
|
-
"text": "Showing
|
|
17090
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
17091
17091
|
"style": "caption",
|
|
17092
17092
|
"color": "textSecondary"
|
|
17093
17093
|
}
|
|
@@ -20441,7 +20441,7 @@ const SCREENS = runtimeSetting({
|
|
|
20441
20441
|
"package": "himalaya",
|
|
20442
20442
|
"type": "Text",
|
|
20443
20443
|
"props": {
|
|
20444
|
-
"text": "Showing
|
|
20444
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
20445
20445
|
"style": "caption",
|
|
20446
20446
|
"color": "textSecondary"
|
|
20447
20447
|
}
|
|
@@ -23795,7 +23795,7 @@ const SCREENS = runtimeSetting({
|
|
|
23795
23795
|
"package": "himalaya",
|
|
23796
23796
|
"type": "Text",
|
|
23797
23797
|
"props": {
|
|
23798
|
-
"text": "Showing
|
|
23798
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
23799
23799
|
"style": "caption",
|
|
23800
23800
|
"color": "textSecondary"
|
|
23801
23801
|
}
|
|
@@ -27149,7 +27149,7 @@ const SCREENS = runtimeSetting({
|
|
|
27149
27149
|
"package": "himalaya",
|
|
27150
27150
|
"type": "Text",
|
|
27151
27151
|
"props": {
|
|
27152
|
-
"text": "Showing
|
|
27152
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
27153
27153
|
"style": "caption",
|
|
27154
27154
|
"color": "textSecondary"
|
|
27155
27155
|
}
|
|
@@ -30503,7 +30503,7 @@ const SCREENS = runtimeSetting({
|
|
|
30503
30503
|
"package": "himalaya",
|
|
30504
30504
|
"type": "Text",
|
|
30505
30505
|
"props": {
|
|
30506
|
-
"text": "Showing
|
|
30506
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
30507
30507
|
"style": "caption",
|
|
30508
30508
|
"color": "textSecondary"
|
|
30509
30509
|
}
|
|
@@ -33770,7 +33770,7 @@ const SCREENS = runtimeSetting({
|
|
|
33770
33770
|
"package": "himalaya",
|
|
33771
33771
|
"type": "Text",
|
|
33772
33772
|
"props": {
|
|
33773
|
-
"text": "Showing
|
|
33773
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
33774
33774
|
"style": "caption",
|
|
33775
33775
|
"color": "textSecondary"
|
|
33776
33776
|
}
|
|
@@ -36944,7 +36944,7 @@ const SCREENS = runtimeSetting({
|
|
|
36944
36944
|
"package": "himalaya",
|
|
36945
36945
|
"type": "Text",
|
|
36946
36946
|
"props": {
|
|
36947
|
-
"text": "Showing
|
|
36947
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
36948
36948
|
"style": "caption",
|
|
36949
36949
|
"color": "textSecondary"
|
|
36950
36950
|
}
|
|
@@ -40298,7 +40298,7 @@ const SCREENS = runtimeSetting({
|
|
|
40298
40298
|
"package": "himalaya",
|
|
40299
40299
|
"type": "Text",
|
|
40300
40300
|
"props": {
|
|
40301
|
-
"text": "Showing
|
|
40301
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
40302
40302
|
"style": "caption",
|
|
40303
40303
|
"color": "textSecondary"
|
|
40304
40304
|
}
|
|
@@ -43652,7 +43652,7 @@ const SCREENS = runtimeSetting({
|
|
|
43652
43652
|
"package": "himalaya",
|
|
43653
43653
|
"type": "Text",
|
|
43654
43654
|
"props": {
|
|
43655
|
-
"text": "Showing
|
|
43655
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
43656
43656
|
"style": "caption",
|
|
43657
43657
|
"color": "textSecondary"
|
|
43658
43658
|
}
|
|
@@ -46919,7 +46919,7 @@ const SCREENS = runtimeSetting({
|
|
|
46919
46919
|
"package": "himalaya",
|
|
46920
46920
|
"type": "Text",
|
|
46921
46921
|
"props": {
|
|
46922
|
-
"text": "Showing
|
|
46922
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
46923
46923
|
"style": "caption",
|
|
46924
46924
|
"color": "textSecondary"
|
|
46925
46925
|
}
|
|
@@ -68518,7 +68518,7 @@ const SCREENS = runtimeSetting({
|
|
|
68518
68518
|
"package": "himalaya",
|
|
68519
68519
|
"type": "Text",
|
|
68520
68520
|
"props": {
|
|
68521
|
-
"text": "Showing
|
|
68521
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
68522
68522
|
"style": "caption",
|
|
68523
68523
|
"color": "textSecondary"
|
|
68524
68524
|
}
|
|
@@ -71248,7 +71248,7 @@ const SCREENS = runtimeSetting({
|
|
|
71248
71248
|
"package": "himalaya",
|
|
71249
71249
|
"type": "Text",
|
|
71250
71250
|
"props": {
|
|
71251
|
-
"text": "Showing
|
|
71251
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
71252
71252
|
"style": "caption",
|
|
71253
71253
|
"color": "textSecondary"
|
|
71254
71254
|
}
|
|
@@ -73752,7 +73752,7 @@ const SCREENS = runtimeSetting({
|
|
|
73752
73752
|
"package": "himalaya",
|
|
73753
73753
|
"type": "Text",
|
|
73754
73754
|
"props": {
|
|
73755
|
-
"text": "Showing
|
|
73755
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
73756
73756
|
"style": "caption",
|
|
73757
73757
|
"color": "textSecondary"
|
|
73758
73758
|
}
|
|
@@ -76434,7 +76434,7 @@ const SCREENS = runtimeSetting({
|
|
|
76434
76434
|
"package": "himalaya",
|
|
76435
76435
|
"type": "Text",
|
|
76436
76436
|
"props": {
|
|
76437
|
-
"text": "Showing
|
|
76437
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
76438
76438
|
"style": "caption",
|
|
76439
76439
|
"color": "textSecondary"
|
|
76440
76440
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { withOnlineWrites } from './online-actions.js';
|
|
2
1
|
import { defineService as register, type ServiceDefinition } from '@himalaya/state';
|
|
3
2
|
import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
|
|
4
3
|
import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
|
|
@@ -95,10 +94,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
95
94
|
if (sort === 'default' || sort === 'az' || sort === 'za') { prefs.sort = sort; changed = true; }
|
|
96
95
|
}
|
|
97
96
|
if (Object.prototype.hasOwnProperty.call(input, 'collectionFilter')) {
|
|
98
|
-
const
|
|
99
|
-
// Old links to Saved must migrate with the stored preference when this
|
|
100
|
-
// collection no longer exposes that filter.
|
|
101
|
-
const filter = config.rowStyle === 'flat' && requestedFilter === 'saved' ? 'all' : requestedFilter;
|
|
97
|
+
const filter = String(input.collectionFilter ?? '');
|
|
102
98
|
const configured = config.filterValues ?? [];
|
|
103
99
|
const rows = Array.isArray(state[config.rows]) ? state[config.rows] as CollectionRow[] : [];
|
|
104
100
|
const derived = config.filter ? rows.map(row => String(row[config.filter!] ?? '')).filter(Boolean) : [];
|
|
@@ -142,7 +138,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
142
138
|
copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
|
|
143
139
|
});
|
|
144
140
|
if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
|
|
145
|
-
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') },
|
|
141
|
+
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
|
|
146
142
|
...projected.filters.map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label) }))];
|
|
147
143
|
const loading = s.status === 'loading' || s.isLoading === true;
|
|
148
144
|
// Older domain reducers expose `errored` rather than `isErrored`; backend
|
|
@@ -223,7 +219,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
223
219
|
? [copyParam(`collection.${name}.countOne`, config.countNoun[0]), copyParam(`collection.${name}.countMany`, config.countNoun[1])] : undefined }),
|
|
224
220
|
selectedSummary: `${prefs.selectedIds.length} ${copyParam('collection.selected', 'selected')}`,
|
|
225
221
|
filterChoices,
|
|
226
|
-
chips: config.filterValues
|
|
222
|
+
chips: config.filterValues ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
|
|
227
223
|
} };
|
|
228
224
|
};
|
|
229
225
|
const actions: Record<string, Reducer> = {};
|
|
@@ -374,8 +370,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
|
|
|
374
370
|
controller: controller as unknown as BackendCollection['controller'],
|
|
375
371
|
apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
|
|
376
372
|
});
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
// Compatibility starters retain their existing mutation behavior; accept the
|
|
374
|
+
// current authoring contract without enabling the offline-write rollout.
|
|
375
|
+
const handle = (options.register ?? register)(name, definition);
|
|
379
376
|
// Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
|
|
380
377
|
// when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
|
|
381
378
|
// starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
|
|
@@ -45,7 +45,7 @@ const LIMIT = 50;
|
|
|
45
45
|
let zoneLookup: Promise<string | undefined> | undefined;
|
|
46
46
|
function siteZone(): Promise<string | undefined> {
|
|
47
47
|
// `Promise.resolve().then` so a bridge that throws synchronously is caught here too.
|
|
48
|
-
zoneLookup ??= Promise.resolve().then(getSiteTimeZone).catch(() => undefined);
|
|
48
|
+
zoneLookup ??= Promise.resolve().then(() => getSiteTimeZone()).catch(() => undefined);
|
|
49
49
|
return zoneLookup;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -9825,7 +9825,7 @@ const SCREENS = runtimeSetting({
|
|
|
9825
9825
|
"package": "himalaya",
|
|
9826
9826
|
"type": "Text",
|
|
9827
9827
|
"props": {
|
|
9828
|
-
"text": "Showing
|
|
9828
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
9829
9829
|
"style": "caption",
|
|
9830
9830
|
"color": "textSecondary"
|
|
9831
9831
|
}
|
|
@@ -13324,7 +13324,7 @@ const SCREENS = runtimeSetting({
|
|
|
13324
13324
|
"package": "himalaya",
|
|
13325
13325
|
"type": "Text",
|
|
13326
13326
|
"props": {
|
|
13327
|
-
"text": "Showing
|
|
13327
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
13328
13328
|
"style": "caption",
|
|
13329
13329
|
"color": "textSecondary"
|
|
13330
13330
|
}
|
|
@@ -16890,7 +16890,7 @@ const SCREENS = runtimeSetting({
|
|
|
16890
16890
|
"package": "himalaya",
|
|
16891
16891
|
"type": "Text",
|
|
16892
16892
|
"props": {
|
|
16893
|
-
"text": "Showing
|
|
16893
|
+
"text": "Showing previously loaded content · may be outdated",
|
|
16894
16894
|
"style": "caption",
|
|
16895
16895
|
"color": "textSecondary"
|
|
16896
16896
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { withOnlineWrites } from './online-actions.js';
|
|
2
1
|
import { defineService as register, type ServiceDefinition } from '@himalaya/state';
|
|
3
2
|
import { COLLECTIONS, COLLECTION_CHROME_MIN_ITEMS, initialCollection, normalizeCollection, projectCollection, collectionId, collectionActionsLabel, type CollectionRow } from './collection-contract.js';
|
|
4
3
|
import { localPreferences, type PreferenceRuntime } from './local-preferences.js';
|
|
@@ -95,10 +94,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
95
94
|
if (sort === 'default' || sort === 'az' || sort === 'za') { prefs.sort = sort; changed = true; }
|
|
96
95
|
}
|
|
97
96
|
if (Object.prototype.hasOwnProperty.call(input, 'collectionFilter')) {
|
|
98
|
-
const
|
|
99
|
-
// Old links to Saved must migrate with the stored preference when this
|
|
100
|
-
// collection no longer exposes that filter.
|
|
101
|
-
const filter = config.rowStyle === 'flat' && requestedFilter === 'saved' ? 'all' : requestedFilter;
|
|
97
|
+
const filter = String(input.collectionFilter ?? '');
|
|
102
98
|
const configured = config.filterValues ?? [];
|
|
103
99
|
const rows = Array.isArray(state[config.rows]) ? state[config.rows] as CollectionRow[] : [];
|
|
104
100
|
const derived = config.filter ? rows.map(row => String(row[config.filter!] ?? '')).filter(Boolean) : [];
|
|
@@ -142,7 +138,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
142
138
|
copyParam('collection.itemActionsFor', 'Actions for {title}'), copyParam('collection.itemActions', 'Item actions'));
|
|
143
139
|
});
|
|
144
140
|
if (previewId && !rows.some(row => collectionId(row) === previewId)) previewId = '';
|
|
145
|
-
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') },
|
|
141
|
+
const filterChoices = [{ id: 'all', label: copyParam('collection.all', 'All') }, { id: 'saved', label: copyParam('collection.saved', 'Saved') },
|
|
146
142
|
...projected.filters.map(label => ({ id: `value:${label}`, label: copyParam(`collection.filter.${label}`, label) }))];
|
|
147
143
|
const loading = s.status === 'loading' || s.isLoading === true;
|
|
148
144
|
// Older domain reducers expose `errored` rather than `isErrored`; backend
|
|
@@ -223,7 +219,7 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
223
219
|
? [copyParam(`collection.${name}.countOne`, config.countNoun[0]), copyParam(`collection.${name}.countMany`, config.countNoun[1])] : undefined }),
|
|
224
220
|
selectedSummary: `${prefs.selectedIds.length} ${copyParam('collection.selected', 'selected')}`,
|
|
225
221
|
filterChoices,
|
|
226
|
-
chips: config.filterValues
|
|
222
|
+
chips: config.filterValues ? filterChoices.filter(choice => ['all', 'saved', prefs.filter].includes(choice.id)) : filterChoices,
|
|
227
223
|
} };
|
|
228
224
|
};
|
|
229
225
|
const actions: Record<string, Reducer> = {};
|
|
@@ -374,8 +370,9 @@ export function defineBackendCollection<S extends object, Row extends object>(na
|
|
|
374
370
|
controller: controller as unknown as BackendCollection['controller'],
|
|
375
371
|
apply: (state, page) => options.apply(state as S, page as unknown as CollectionQueryState<Row>) as State,
|
|
376
372
|
});
|
|
377
|
-
|
|
378
|
-
|
|
373
|
+
// Compatibility starters retain their existing mutation behavior; accept the
|
|
374
|
+
// current authoring contract without enabling the offline-write rollout.
|
|
375
|
+
const handle = (options.register ?? register)(name, definition);
|
|
379
376
|
// Registration restored the state a cold boot saved: the page it showed is this run's, before the first load. Only
|
|
380
377
|
// when the service's own rows came back with it: a bundle that keeps them out of the restore (its `notHydrated`)
|
|
381
378
|
// starts its first load as before, never from rows it chose not to restore. Rows that came back empty are the
|
|
@@ -103,6 +103,8 @@ export function withIapPresentation<S extends object>(options: {
|
|
|
103
103
|
// scopeLanded is the completion of the active load, not a stale load result. It
|
|
104
104
|
// must publish even if another overlapping onAppear load advanced contentVersion.
|
|
105
105
|
if (!next || (content && action !== "scopeLanded" && version !== contentVersion)) return undefined;
|
|
106
|
+
// A committed read projection supersedes older load results still carrying a skeleton.
|
|
107
|
+
if (action === "readChanged" && definition.readLifecycle) contentVersion++;
|
|
106
108
|
if (content) {
|
|
107
109
|
options.onContent?.(next);
|
|
108
110
|
const nextItems = options.items(next);
|
|
@@ -130,9 +132,11 @@ export function withIapPresentation<S extends object>(options: {
|
|
|
130
132
|
};
|
|
131
133
|
try {
|
|
132
134
|
const next = reduce(state, ...args);
|
|
133
|
-
//
|
|
134
|
-
//
|
|
135
|
-
|
|
135
|
+
// A cached read projection must commit before another onAppear can consume it.
|
|
136
|
+
// Other content actions retain their scheduling: shop filters and panels can
|
|
137
|
+
// change while a load is pending, and their existing completion order matters.
|
|
138
|
+
const synchronousReadProjection = action === "readChanged" && !!definition.readLifecycle;
|
|
139
|
+
if ((content && !synchronousReadProjection) || (next && typeof (next as Promise<S | undefined>).then === "function")) {
|
|
136
140
|
return (async () => {
|
|
137
141
|
try { return presentResult(await next); }
|
|
138
142
|
finally { finished(); }
|
|
@@ -250,7 +250,7 @@ interface State {
|
|
|
250
250
|
hideFeaturedSkeleton: boolean;
|
|
251
251
|
welcome: string;
|
|
252
252
|
refreshedAt: string;
|
|
253
|
-
/** The resolved home layout preset (
|
|
253
|
+
/** The resolved home layout preset (shared slot discriminator).
|
|
254
254
|
* Plain string, never a proto enum — a `$service:` casePath decodes it as a
|
|
255
255
|
* JSON string and unknown values fall through to the shipped defaultCase. */
|
|
256
256
|
effectiveLayout: string;
|