@mohasinac/appkit 4.13.1 → 4.14.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/_internal/client/features/layout/DashboardLayoutClient.js +14 -5
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +3 -0
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +6 -0
- package/dist/_internal/client/features/lottery/LotteryDetailView.d.ts +8 -0
- package/dist/_internal/client/features/lottery/LotteryDetailView.js +4 -1
- package/dist/_internal/client/features/lottery/LotteryListView.d.ts +7 -0
- package/dist/_internal/client/features/lottery/LotteryListView.js +1 -1
- package/dist/_internal/client/features/lottery/PrizeDrawLotteryDetailView.js +4 -1
- package/dist/_internal/client/features/lottery/slot-collage-items.d.ts +15 -0
- package/dist/_internal/client/features/lottery/slot-collage-items.js +13 -0
- package/dist/_internal/server/features/auctions/actions.js +6 -0
- package/dist/_internal/server/features/bundles/data.d.ts +16 -0
- package/dist/_internal/server/features/bundles/data.js +26 -0
- package/dist/_internal/server/features/bundles/index.d.ts +1 -1
- package/dist/_internal/server/features/bundles/index.js +1 -1
- package/dist/_internal/server/features/checkout/actions.js +6 -0
- package/dist/_internal/server/features/checkout/locked-lines.d.ts +38 -0
- package/dist/_internal/server/features/checkout/locked-lines.js +171 -0
- package/dist/_internal/server/features/homepage/index.d.ts +0 -1
- package/dist/_internal/server/features/homepage/index.js +7 -1
- package/dist/_internal/server/features/lottery/adapters.js +4 -0
- package/dist/_internal/server/features/products/data.js +15 -37
- package/dist/_internal/server/features/products/index.d.ts +1 -1
- package/dist/_internal/server/features/products/index.js +1 -1
- package/dist/_internal/server/features/products/list-public.d.ts +46 -20
- package/dist/_internal/server/features/products/list-public.js +266 -90
- package/dist/_internal/server/features/products/listing-tab-counts.d.ts +44 -0
- package/dist/_internal/server/features/products/listing-tab-counts.js +97 -0
- package/dist/_internal/server/features/site-settings/adapters.d.ts +51 -0
- package/dist/_internal/server/features/site-settings/adapters.js +75 -0
- package/dist/_internal/server/features/site-settings/index.d.ts +1 -0
- package/dist/_internal/server/features/site-settings/index.js +1 -0
- package/dist/_internal/server/features/stores/adapters.d.ts +56 -0
- package/dist/_internal/server/features/stores/adapters.js +91 -0
- package/dist/_internal/server/features/stores/index.d.ts +1 -0
- package/dist/_internal/server/features/stores/index.js +1 -0
- package/dist/_internal/server/jobs/core/auctionSettlement.js +56 -2
- package/dist/_internal/server/jobs/core/offerExpiry.js +45 -9
- package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +5 -0
- package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +33 -1
- package/dist/_internal/server/jobs/handlers/messages.d.ts +7 -0
- package/dist/_internal/server/jobs/handlers/messages.js +10 -0
- package/dist/_internal/shared/actions/action-registry.js +15 -1
- package/dist/_internal/shared/checkout/lanes.d.ts +25 -0
- package/dist/_internal/shared/checkout/lanes.js +26 -0
- package/dist/_internal/shared/features/auctions/config.d.ts +27 -0
- package/dist/_internal/shared/features/auctions/config.js +27 -0
- package/dist/_internal/shared/features/blog/schema.d.ts +2 -2
- package/dist/_internal/shared/features/cart/schema.d.ts +12 -12
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
- package/dist/_internal/shared/features/emi/schedule.d.ts +24 -3
- package/dist/_internal/shared/features/emi/schedule.js +20 -5
- package/dist/_internal/shared/features/events/schema.d.ts +2 -2
- package/dist/_internal/shared/features/homepage/section-gate.d.ts +14 -0
- package/dist/_internal/shared/features/homepage/section-gate.js +51 -0
- package/dist/_internal/shared/features/offers/config.d.ts +30 -0
- package/dist/_internal/shared/features/offers/config.js +59 -0
- package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
- package/dist/_internal/shared/features/products/schema.d.ts +32 -32
- package/dist/_internal/shared/features/products/to-product-item.js +6 -0
- package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
- package/dist/_internal/shared/features/site-settings/fees.d.ts +60 -0
- package/dist/_internal/shared/features/site-settings/fees.js +39 -0
- package/dist/_internal/shared/features/site-settings/types.d.ts +40 -0
- package/dist/_internal/shared/features/site-settings/types.js +1 -0
- package/dist/_internal/shared/history/history.d.ts +66 -0
- package/dist/_internal/shared/history/history.js +158 -0
- package/dist/_internal/shared/history/index.d.ts +4 -0
- package/dist/_internal/shared/history/index.js +2 -0
- package/dist/_internal/shared/history/types.d.ts +61 -0
- package/dist/_internal/shared/history/types.js +6 -0
- package/dist/_internal/shared/listing-types/_registry.d.ts +54 -1
- package/dist/_internal/shared/listing-types/_registry.js +67 -0
- package/dist/_internal/shared/listing-types/art/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/art/config.js +5 -0
- package/dist/_internal/shared/listing-types/auction/config.d.ts +13 -0
- package/dist/_internal/shared/listing-types/auction/config.js +21 -0
- package/dist/_internal/shared/listing-types/availability.d.ts +79 -0
- package/dist/_internal/shared/listing-types/availability.js +104 -0
- package/dist/_internal/shared/listing-types/capabilities.d.ts +15 -0
- package/dist/_internal/shared/listing-types/capabilities.js +12 -0
- package/dist/_internal/shared/listing-types/classified/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/classified/config.js +5 -0
- package/dist/_internal/shared/listing-types/digital-code/config.d.ts +11 -0
- package/dist/_internal/shared/listing-types/digital-code/config.js +22 -2
- package/dist/_internal/shared/listing-types/live/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/live/config.js +5 -0
- package/dist/_internal/shared/listing-types/pre-order/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/pre-order/config.js +19 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +11 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.js +15 -0
- package/dist/_internal/shared/listing-types/standard/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/standard/config.js +5 -0
- package/dist/_internal/shared/listing-types/stickers/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/stickers/config.js +5 -0
- package/dist/client.d.ts +7 -5
- package/dist/client.js +2 -2
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +2 -0
- package/dist/constants/field-names.d.ts +49 -2
- package/dist/constants/field-names.js +53 -2
- package/dist/constants/table-keys.d.ts +17 -0
- package/dist/constants/table-keys.js +17 -0
- package/dist/errors/error-codes.d.ts +13 -1
- package/dist/errors/error-codes.js +13 -1
- package/dist/errors/error-display-map.js +12 -3
- package/dist/errors/messages.d.ts +10 -2
- package/dist/errors/messages.js +10 -2
- package/dist/features/about/components/AboutView.d.ts +3 -0
- package/dist/features/about/components/AboutView.js +3 -2
- package/dist/features/about/components/PolicyPageView.d.ts +2 -1
- package/dist/features/about/components/PolicyPageView.js +61 -23
- package/dist/features/about/components/PublicProfileView.js +5 -0
- package/dist/features/about/schemas/firestore.d.ts +3 -0
- package/dist/features/account/components/UserOrdersView.js +7 -0
- package/dist/features/account/components/index.d.ts +0 -2
- package/dist/features/account/components/index.js +0 -1
- package/dist/features/account/schemas/index.d.ts +2 -2
- package/dist/features/account/types/index.d.ts +21 -2
- package/dist/features/addresses/schemas/index.d.ts +4 -4
- package/dist/features/admin/components/AdminArtView.js +8 -3
- package/dist/features/admin/components/AdminClassifiedView.js +8 -3
- package/dist/features/admin/components/AdminDigitalCodesView.js +8 -3
- package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -0
- package/dist/features/admin/components/AdminLiveView.js +8 -3
- package/dist/features/admin/components/AdminOffersView.d.ts +4 -0
- package/dist/features/admin/components/AdminOffersView.js +186 -0
- package/dist/features/admin/components/AdminOrdersView.js +10 -1
- package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -0
- package/dist/features/admin/components/AdminProductsView.js +16 -29
- package/dist/features/admin/components/AdminSiteSettingsView.js +31 -13
- package/dist/features/admin/components/AdminSiteView.js +6 -2
- package/dist/features/admin/components/AdminStickersView.js +8 -3
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/constants/filter-tabs.d.ts +86 -0
- package/dist/features/admin/constants/filter-tabs.js +55 -0
- package/dist/features/admin/schemas/firestore.d.ts +122 -3
- package/dist/features/admin/schemas/firestore.js +1 -0
- package/dist/features/auctions/actions/bid-actions.d.ts +20 -5
- package/dist/features/auctions/actions/bid-actions.js +93 -20
- package/dist/features/auctions/components/AuctionDetailPageView.js +11 -6
- package/dist/features/auctions/components/AuctionsListView.js +5 -6
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +7 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +19 -2
- package/dist/features/auctions/components/PlaceBidFormClient.d.ts +1 -2
- package/dist/features/auctions/components/PlaceBidFormClient.js +8 -4
- package/dist/features/auctions/repository/bid.repository.d.ts +13 -0
- package/dist/features/auctions/repository/bid.repository.js +23 -0
- package/dist/features/auctions/schemas/firestore.d.ts +17 -0
- package/dist/features/auctions/schemas/index.d.ts +12 -12
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/permissions/constants.js +10 -1
- package/dist/features/blog/actions/blog-actions.d.ts +7 -7
- package/dist/features/blog/schemas/index.d.ts +6 -6
- package/dist/features/cart/repository/cart.repository.js +1 -0
- package/dist/features/cart/schemas/firestore.d.ts +15 -0
- package/dist/features/catalogue/schemas/validation.d.ts +4 -4
- package/dist/features/categories/components/BrandDetailPageView.js +23 -40
- package/dist/features/categories/components/BrandDetailTabs.d.ts +7 -7
- package/dist/features/categories/components/BrandDetailTabs.js +8 -12
- package/dist/features/categories/components/BundleCollage.js +1 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +53 -57
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +10 -8
- package/dist/features/categories/components/CategoryDetailTabs.js +11 -16
- package/dist/features/categories/components/CategoryProductsListing.js +11 -1
- package/dist/features/categories/components/ConcernCard.js +7 -1
- package/dist/features/categories/schemas/firestore.d.ts +13 -0
- package/dist/features/categories/schemas/index.d.ts +26 -26
- package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +16 -1
- package/dist/features/classified/components/ClassifiedDetailPageView.js +23 -3
- package/dist/features/events/components/AdminEventsView.js +15 -11
- package/dist/features/events/components/EventFilters.d.ts +9 -1
- package/dist/features/events/components/EventFilters.js +45 -21
- package/dist/features/events/components/EventsIndexListing.d.ts +6 -1
- package/dist/features/events/components/EventsIndexListing.js +2 -2
- package/dist/features/events/components/EventsListPageView.js +13 -4
- package/dist/features/events/repository/events.repository.d.ts +17 -0
- package/dist/features/events/repository/events.repository.js +27 -0
- package/dist/features/events/schemas/firestore.d.ts +12 -0
- package/dist/features/events/schemas/firestore.js +12 -0
- package/dist/features/events/schemas/index.d.ts +50 -50
- package/dist/features/events/types/index.d.ts +11 -0
- package/dist/features/events/types/index.js +57 -1
- package/dist/features/faq/actions/faq-actions.d.ts +12 -12
- package/dist/features/faq/schemas/index.d.ts +8 -8
- package/dist/features/filters/FilterFacetSection.d.ts +7 -1
- package/dist/features/filters/FilterFacetSection.js +11 -3
- package/dist/features/grouped/schemas/index.d.ts +4 -4
- package/dist/features/homepage/components/AnnouncementBar.d.ts +7 -1
- package/dist/features/homepage/components/AnnouncementBar.js +3 -3
- package/dist/features/homepage/components/MarketplaceHomepageView.js +20 -6
- package/dist/features/homepage/hooks/homepage-query.d.ts +16 -0
- package/dist/features/homepage/hooks/homepage-query.js +45 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +10 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.js +28 -8
- package/dist/features/homepage/hooks/useFeaturedPreOrders.js +17 -8
- package/dist/features/homepage/hooks/useFeaturedProducts.js +15 -8
- package/dist/features/homepage/schemas/index.d.ts +2 -2
- package/dist/features/layout/AppLayoutShell.d.ts +11 -1
- package/dist/features/layout/AppLayoutShell.js +15 -14
- package/dist/features/layout/BackToTop.d.ts +9 -0
- package/dist/features/layout/BackToTop.js +10 -1
- package/dist/features/layout/BottomActions.js +28 -25
- package/dist/features/layout/BottomChrome.d.ts +34 -0
- package/dist/features/layout/BottomChrome.js +55 -0
- package/dist/features/layout/BottomNavLayout.d.ts +6 -0
- package/dist/features/layout/BottomNavLayout.js +7 -1
- package/dist/features/layout/BottomNavbar.js +15 -2
- package/dist/features/layout/FooterLayout.js +11 -1
- package/dist/features/layout/NavbarLayout.js +1 -1
- package/dist/features/layout/TitleBarLayout.d.ts +7 -0
- package/dist/features/layout/TitleBarLayout.js +28 -5
- package/dist/features/layout/index.d.ts +2 -0
- package/dist/features/layout/index.js +1 -0
- package/dist/features/lottery/types/index.d.ts +3 -0
- package/dist/features/media/MediaPickerModal.js +5 -1
- package/dist/features/messages/schemas/index.d.ts +2 -2
- package/dist/features/orders/components/OrderScopeTabs.d.ts +20 -0
- package/dist/features/orders/components/OrderScopeTabs.js +31 -0
- package/dist/features/orders/constants/order-scope.d.ts +48 -0
- package/dist/features/orders/constants/order-scope.js +111 -0
- package/dist/features/orders/repository/orders.repository.d.ts +54 -7
- package/dist/features/orders/repository/orders.repository.js +116 -22
- package/dist/features/orders/schemas/firestore.d.ts +117 -0
- package/dist/features/orders/schemas/firestore.js +30 -0
- package/dist/features/orders/schemas/index.d.ts +18 -18
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +14 -9
- package/dist/features/pre-orders/components/PreOrdersListView.js +6 -5
- package/dist/features/pre-orders/schemas/index.d.ts +1 -1
- package/dist/features/products/actions/product-actions.d.ts +14 -0
- package/dist/features/products/actions/product-actions.js +49 -11
- package/dist/features/products/api/route.d.ts +12 -0
- package/dist/features/products/api/route.js +42 -100
- package/dist/features/products/components/ArtStickersListView.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.js +13 -11
- package/dist/features/products/components/AvailabilityTabs.d.ts +11 -0
- package/dist/features/products/components/AvailabilityTabs.js +47 -0
- package/dist/features/products/components/MakeOfferButton.js +48 -49
- package/dist/features/products/components/PrizeDrawCollage.d.ts +20 -4
- package/dist/features/products/components/PrizeDrawCollage.js +9 -1
- package/dist/features/products/components/PrizeDrawsIndexListing.js +14 -12
- package/dist/features/products/components/PrizeDrawsListingView.js +2 -2
- package/dist/features/products/components/PrizeDrawsSection.d.ts +7 -1
- package/dist/features/products/components/PrizeDrawsSection.js +23 -18
- package/dist/features/products/components/ProductDetailPageView.d.ts +4 -1
- package/dist/features/products/components/ProductDetailPageView.js +18 -4
- package/dist/features/products/components/ProductForm.js +5 -2
- package/dist/features/products/components/ProductGrid.js +6 -1
- package/dist/features/products/components/ProductsIndexListing.js +22 -32
- package/dist/features/products/components/ProductsIndexPageView.js +6 -9
- package/dist/features/products/components/index.d.ts +2 -2
- package/dist/features/products/components/index.js +1 -1
- package/dist/features/products/config/listing-type-listing-config.d.ts +20 -0
- package/dist/features/products/config/listing-type-listing-config.js +22 -10
- package/dist/features/products/constants/action-defs.d.ts +2 -0
- package/dist/features/products/constants/action-defs.js +6 -0
- package/dist/features/products/hooks/useAvailabilityScope.d.ts +13 -0
- package/dist/features/products/hooks/useAvailabilityScope.js +19 -0
- package/dist/features/products/hooks/useProducts.d.ts +5 -0
- package/dist/features/products/hooks/useProducts.js +13 -2
- package/dist/features/products/repository/products.repository.d.ts +31 -2
- package/dist/features/products/repository/products.repository.js +53 -21
- package/dist/features/products/schemas/firestore.d.ts +17 -3
- package/dist/features/products/schemas/firestore.js +7 -2
- package/dist/features/products/schemas/index.d.ts +66 -66
- package/dist/features/products/schemas/product-features.validators.d.ts +6 -6
- package/dist/features/products/types/index.d.ts +16 -1
- package/dist/features/promotions/schemas/index.d.ts +2 -2
- package/dist/features/reviews/schemas/index.d.ts +16 -16
- package/dist/features/search/schemas/index.d.ts +4 -4
- package/dist/features/seller/actions/offer-actions.js +25 -2
- package/dist/features/seller/components/SellerArtView.js +5 -0
- package/dist/features/seller/components/SellerAuctionsView.js +13 -15
- package/dist/features/seller/components/SellerClassifiedView.js +5 -0
- package/dist/features/seller/components/SellerDigitalCodesView.js +5 -0
- package/dist/features/seller/components/SellerLiveView.js +5 -0
- package/dist/features/seller/components/SellerOrdersView.js +31 -9
- package/dist/features/seller/components/SellerPayoutSettingsView.js +19 -18
- package/dist/features/seller/components/SellerPreOrdersView.js +5 -0
- package/dist/features/seller/components/SellerPrizeDrawsView.js +14 -16
- package/dist/features/seller/components/SellerProductShell.js +7 -1
- package/dist/features/seller/components/SellerProductsView.js +11 -8
- package/dist/features/seller/components/SellerStickersView.js +5 -0
- package/dist/features/seller/components/index.d.ts +0 -2
- package/dist/features/seller/components/index.js +0 -1
- package/dist/features/seller/repository/offer.repository.d.ts +73 -16
- package/dist/features/seller/repository/offer.repository.js +38 -3
- package/dist/features/seller/schemas/index.d.ts +2 -2
- package/dist/features/seller/schemas/offer-forms.d.ts +25 -0
- package/dist/features/seller/schemas/offer-forms.js +21 -0
- package/dist/features/seller/server.d.ts +0 -1
- package/dist/features/seller/server.js +0 -1
- package/dist/features/shell/SectionForm.d.ts +99 -0
- package/dist/features/shell/SectionForm.js +128 -0
- package/dist/features/shell/entity-form.d.ts +109 -0
- package/dist/features/shell/entity-form.js +96 -0
- package/dist/features/shell/index.d.ts +4 -0
- package/dist/features/shell/index.js +2 -0
- package/dist/features/stores/api/[storeSlug]/route.js +2 -25
- package/dist/features/stores/components/StoreAuctionsListing.js +15 -1
- package/dist/features/stores/components/StoreClassifiedsListing.js +12 -2
- package/dist/features/stores/components/StoreDetailLayoutView.js +24 -71
- package/dist/features/stores/components/StoreDigitalCodesListing.js +12 -2
- package/dist/features/stores/components/StoreLiveItemsListing.js +12 -2
- package/dist/features/stores/components/StorePreOrdersListing.js +12 -1
- package/dist/features/stores/components/StoreProductsListing.js +11 -1
- package/dist/features/stores/repository/store.repository.js +6 -0
- package/dist/features/stores/schemas/index.d.ts +6 -6
- package/dist/features/support/schemas/index.d.ts +4 -4
- package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
- package/dist/features/tester/seed-data/offers-tester-seed-data.js +119 -3
- package/dist/features/tester/seed-data/products-tester-seed-data.js +131 -1
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +105 -1
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
- package/dist/index.d.ts +13 -10
- package/dist/index.js +14 -9
- package/dist/next/routing/route-map.d.ts +7 -1
- package/dist/next/routing/route-map.js +5 -0
- package/dist/providers/db-firebase/base.repository.d.ts +30 -0
- package/dist/providers/db-firebase/base.repository.js +50 -1
- package/dist/providers/db-firebase/index.d.ts +1 -1
- package/dist/providers/db-firebase/index.js +1 -1
- package/dist/providers/db-firebase/sieve.d.ts +25 -0
- package/dist/providers/db-firebase/sieve.js +52 -18
- package/dist/react/hooks/useUrlTable.js +10 -1
- package/dist/schemas/registry.d.ts +68 -68
- package/dist/seed/_helpers/category-forest.d.ts +2 -0
- package/dist/seed/_helpers/category-forest.js +309 -0
- package/dist/seed/_helpers/category-tree.d.ts +27 -0
- package/dist/seed/_helpers/category-tree.js +103 -0
- package/dist/seed/catalogue-seed-data.js +12 -12
- package/dist/seed/categories-seed-data.js +177 -162
- package/dist/seed/events-seed-data.js +61 -10
- package/dist/seed/homepage-sections-seed-data.js +5 -1
- package/dist/seed/offers-seed-data.js +32 -27
- package/dist/seed/products-art-seed-data.js +50 -12
- package/dist/seed/products-auctions-seed-data.js +97 -18
- package/dist/seed/products-classifieds-seed-data.js +80 -16
- package/dist/seed/products-digital-codes-seed-data.js +66 -18
- package/dist/seed/products-live-items-seed-data.js +64 -13
- package/dist/seed/products-preorders-seed-data.d.ts +0 -1
- package/dist/seed/products-preorders-seed-data.js +52 -13
- package/dist/seed/products-prize-draws-seed-data.js +63 -14
- package/dist/seed/products-standard-seed-data.js +99 -26
- package/dist/seed/products-stickers-seed-data.js +47 -12
- package/dist/seed/reviews-seed-data.js +6 -1
- package/dist/seed/site-settings-seed-data.d.ts +1 -38
- package/dist/seed/site-settings-seed-data.js +38 -76
- package/dist/seed/stores-seed-data.js +71 -1
- package/dist/seed/users-seed-data.js +15 -5
- package/dist/server-entry.d.ts +1 -2
- package/dist/server-entry.js +4 -3
- package/dist/server.d.ts +4 -3
- package/dist/server.js +8 -4
- package/dist/styles.css +78 -12
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/Button.style.css +19 -4
- package/dist/ui/components/CollapsibleSection.d.ts +17 -1
- package/dist/ui/components/CollapsibleSection.js +6 -2
- package/dist/ui/components/FilterChipGroup.d.ts +25 -1
- package/dist/ui/components/FilterChipGroup.js +21 -4
- package/dist/ui/components/HandMode.style.css +47 -0
- package/dist/ui/components/Layout.d.ts +9 -2
- package/dist/ui/components/Layout.js +1 -1
- package/dist/ui/components/ListingLayout.js +8 -8
- package/dist/ui/components/ListingLayout.style.css +8 -7
- package/dist/ui/components/StickyToolbar.d.ts +3 -1
- package/dist/ui/components/StickyToolbar.js +62 -20
- package/dist/ui/components/bottom-chrome-slot.d.ts +21 -0
- package/dist/ui/components/bottom-chrome-slot.js +29 -0
- package/dist/ui/components/index.style.css +3 -0
- package/dist/ui/forms/FormShell.d.ts +43 -13
- package/dist/ui/forms/FormShell.js +22 -11
- package/dist/ui/forms/index.d.ts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -90,7 +90,7 @@ export declare const surveyFormFieldSchema: z.ZodObject<{
|
|
|
90
90
|
}>>;
|
|
91
91
|
order: z.ZodNumber;
|
|
92
92
|
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
93
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
94
94
|
id: string;
|
|
95
95
|
label: string;
|
|
96
96
|
required: boolean;
|
|
@@ -105,7 +105,7 @@ export declare const surveyFormFieldSchema: z.ZodObject<{
|
|
|
105
105
|
} | undefined;
|
|
106
106
|
placeholder?: string | undefined;
|
|
107
107
|
}, {
|
|
108
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
108
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
109
109
|
id: string;
|
|
110
110
|
label: string;
|
|
111
111
|
required: boolean;
|
|
@@ -155,7 +155,7 @@ export declare const surveyConfigSchema: z.ZodObject<{
|
|
|
155
155
|
}>>;
|
|
156
156
|
order: z.ZodNumber;
|
|
157
157
|
}, "strip", z.ZodTypeAny, {
|
|
158
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
158
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
159
159
|
id: string;
|
|
160
160
|
label: string;
|
|
161
161
|
required: boolean;
|
|
@@ -170,7 +170,7 @@ export declare const surveyConfigSchema: z.ZodObject<{
|
|
|
170
170
|
} | undefined;
|
|
171
171
|
placeholder?: string | undefined;
|
|
172
172
|
}, {
|
|
173
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
173
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
174
174
|
id: string;
|
|
175
175
|
label: string;
|
|
176
176
|
required: boolean;
|
|
@@ -192,7 +192,7 @@ export declare const surveyConfigSchema: z.ZodObject<{
|
|
|
192
192
|
hasPointSystem: boolean;
|
|
193
193
|
entryReviewRequired: boolean;
|
|
194
194
|
formFields: {
|
|
195
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
195
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
196
196
|
id: string;
|
|
197
197
|
label: string;
|
|
198
198
|
required: boolean;
|
|
@@ -215,7 +215,7 @@ export declare const surveyConfigSchema: z.ZodObject<{
|
|
|
215
215
|
hasPointSystem: boolean;
|
|
216
216
|
entryReviewRequired: boolean;
|
|
217
217
|
formFields: {
|
|
218
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
218
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
219
219
|
id: string;
|
|
220
220
|
label: string;
|
|
221
221
|
required: boolean;
|
|
@@ -261,7 +261,7 @@ export declare const feedbackConfigSchema: z.ZodObject<{
|
|
|
261
261
|
}>>;
|
|
262
262
|
order: z.ZodNumber;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
264
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
265
265
|
id: string;
|
|
266
266
|
label: string;
|
|
267
267
|
required: boolean;
|
|
@@ -276,7 +276,7 @@ export declare const feedbackConfigSchema: z.ZodObject<{
|
|
|
276
276
|
} | undefined;
|
|
277
277
|
placeholder?: string | undefined;
|
|
278
278
|
}, {
|
|
279
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
279
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
280
280
|
id: string;
|
|
281
281
|
label: string;
|
|
282
282
|
required: boolean;
|
|
@@ -295,7 +295,7 @@ export declare const feedbackConfigSchema: z.ZodObject<{
|
|
|
295
295
|
}, "strip", z.ZodTypeAny, {
|
|
296
296
|
anonymous: boolean;
|
|
297
297
|
formFields: {
|
|
298
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
298
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
299
299
|
id: string;
|
|
300
300
|
label: string;
|
|
301
301
|
required: boolean;
|
|
@@ -313,7 +313,7 @@ export declare const feedbackConfigSchema: z.ZodObject<{
|
|
|
313
313
|
}, {
|
|
314
314
|
anonymous: boolean;
|
|
315
315
|
formFields: {
|
|
316
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
316
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
317
317
|
id: string;
|
|
318
318
|
label: string;
|
|
319
319
|
required: boolean;
|
|
@@ -661,7 +661,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
661
661
|
}>>;
|
|
662
662
|
order: z.ZodNumber;
|
|
663
663
|
}, "strip", z.ZodTypeAny, {
|
|
664
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
664
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
665
665
|
id: string;
|
|
666
666
|
label: string;
|
|
667
667
|
required: boolean;
|
|
@@ -676,7 +676,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
676
676
|
} | undefined;
|
|
677
677
|
placeholder?: string | undefined;
|
|
678
678
|
}, {
|
|
679
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
679
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
680
680
|
id: string;
|
|
681
681
|
label: string;
|
|
682
682
|
required: boolean;
|
|
@@ -698,7 +698,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
698
698
|
hasPointSystem: boolean;
|
|
699
699
|
entryReviewRequired: boolean;
|
|
700
700
|
formFields: {
|
|
701
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
701
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
702
702
|
id: string;
|
|
703
703
|
label: string;
|
|
704
704
|
required: boolean;
|
|
@@ -721,7 +721,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
721
721
|
hasPointSystem: boolean;
|
|
722
722
|
entryReviewRequired: boolean;
|
|
723
723
|
formFields: {
|
|
724
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
724
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
725
725
|
id: string;
|
|
726
726
|
label: string;
|
|
727
727
|
required: boolean;
|
|
@@ -767,7 +767,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
767
767
|
}>>;
|
|
768
768
|
order: z.ZodNumber;
|
|
769
769
|
}, "strip", z.ZodTypeAny, {
|
|
770
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
770
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
771
771
|
id: string;
|
|
772
772
|
label: string;
|
|
773
773
|
required: boolean;
|
|
@@ -782,7 +782,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
782
782
|
} | undefined;
|
|
783
783
|
placeholder?: string | undefined;
|
|
784
784
|
}, {
|
|
785
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
785
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
786
786
|
id: string;
|
|
787
787
|
label: string;
|
|
788
788
|
required: boolean;
|
|
@@ -801,7 +801,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
801
801
|
}, "strip", z.ZodTypeAny, {
|
|
802
802
|
anonymous: boolean;
|
|
803
803
|
formFields: {
|
|
804
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
804
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
805
805
|
id: string;
|
|
806
806
|
label: string;
|
|
807
807
|
required: boolean;
|
|
@@ -819,7 +819,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
819
819
|
}, {
|
|
820
820
|
anonymous: boolean;
|
|
821
821
|
formFields: {
|
|
822
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
822
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
823
823
|
id: string;
|
|
824
824
|
label: string;
|
|
825
825
|
required: boolean;
|
|
@@ -992,20 +992,6 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
992
992
|
duration?: number | undefined;
|
|
993
993
|
}[];
|
|
994
994
|
slug?: string | undefined;
|
|
995
|
-
lotteryConfig?: {
|
|
996
|
-
slots: {
|
|
997
|
-
name: string;
|
|
998
|
-
slotNumber: number;
|
|
999
|
-
isBooked: boolean;
|
|
1000
|
-
bookedByUserLotteryNumber?: number | undefined;
|
|
1001
|
-
bookedByDisplayName?: string | undefined;
|
|
1002
|
-
}[];
|
|
1003
|
-
totalSlots: number;
|
|
1004
|
-
pricingMode: "uniform" | "variable";
|
|
1005
|
-
drawWindowDurationMinutes: number;
|
|
1006
|
-
maxPullsPerTransaction: number;
|
|
1007
|
-
maxPullsPerUser: number;
|
|
1008
|
-
} | undefined;
|
|
1009
995
|
hasRaffle?: boolean | undefined;
|
|
1010
996
|
raffleType?: "spin_wheel" | "open_raffle" | "top_n_scorers" | "top_n_participants" | undefined;
|
|
1011
997
|
raffleTopN?: number | undefined;
|
|
@@ -1026,6 +1012,20 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1026
1012
|
spinMaxPerUser?: number | undefined;
|
|
1027
1013
|
spinWindowStart?: string | undefined;
|
|
1028
1014
|
spinWindowEnd?: string | undefined;
|
|
1015
|
+
lotteryConfig?: {
|
|
1016
|
+
slots: {
|
|
1017
|
+
name: string;
|
|
1018
|
+
slotNumber: number;
|
|
1019
|
+
isBooked: boolean;
|
|
1020
|
+
bookedByUserLotteryNumber?: number | undefined;
|
|
1021
|
+
bookedByDisplayName?: string | undefined;
|
|
1022
|
+
}[];
|
|
1023
|
+
totalSlots: number;
|
|
1024
|
+
pricingMode: "uniform" | "variable";
|
|
1025
|
+
drawWindowDurationMinutes: number;
|
|
1026
|
+
maxPullsPerTransaction: number;
|
|
1027
|
+
maxPullsPerUser: number;
|
|
1028
|
+
} | undefined;
|
|
1029
1029
|
coverImageUrl?: string | undefined;
|
|
1030
1030
|
saleConfig?: {
|
|
1031
1031
|
discountPercent: number;
|
|
@@ -1054,7 +1054,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1054
1054
|
hasPointSystem: boolean;
|
|
1055
1055
|
entryReviewRequired: boolean;
|
|
1056
1056
|
formFields: {
|
|
1057
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
1057
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
1058
1058
|
id: string;
|
|
1059
1059
|
label: string;
|
|
1060
1060
|
required: boolean;
|
|
@@ -1074,7 +1074,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1074
1074
|
feedbackConfig?: {
|
|
1075
1075
|
anonymous: boolean;
|
|
1076
1076
|
formFields: {
|
|
1077
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
1077
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
1078
1078
|
id: string;
|
|
1079
1079
|
label: string;
|
|
1080
1080
|
required: boolean;
|
|
@@ -1108,20 +1108,6 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1108
1108
|
flaggedEntries: number;
|
|
1109
1109
|
};
|
|
1110
1110
|
slug?: string | undefined;
|
|
1111
|
-
lotteryConfig?: {
|
|
1112
|
-
slots: {
|
|
1113
|
-
name: string;
|
|
1114
|
-
slotNumber: number;
|
|
1115
|
-
isBooked: boolean;
|
|
1116
|
-
bookedByUserLotteryNumber?: number | undefined;
|
|
1117
|
-
bookedByDisplayName?: string | undefined;
|
|
1118
|
-
}[];
|
|
1119
|
-
totalSlots: number;
|
|
1120
|
-
pricingMode: "uniform" | "variable";
|
|
1121
|
-
drawWindowDurationMinutes: number;
|
|
1122
|
-
maxPullsPerTransaction: number;
|
|
1123
|
-
maxPullsPerUser: number;
|
|
1124
|
-
} | undefined;
|
|
1125
1111
|
hasRaffle?: boolean | undefined;
|
|
1126
1112
|
raffleType?: "spin_wheel" | "open_raffle" | "top_n_scorers" | "top_n_participants" | undefined;
|
|
1127
1113
|
raffleTopN?: number | undefined;
|
|
@@ -1151,6 +1137,20 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1151
1137
|
youtubeId?: string | undefined;
|
|
1152
1138
|
duration?: number | undefined;
|
|
1153
1139
|
} | null | undefined;
|
|
1140
|
+
lotteryConfig?: {
|
|
1141
|
+
slots: {
|
|
1142
|
+
name: string;
|
|
1143
|
+
slotNumber: number;
|
|
1144
|
+
isBooked: boolean;
|
|
1145
|
+
bookedByUserLotteryNumber?: number | undefined;
|
|
1146
|
+
bookedByDisplayName?: string | undefined;
|
|
1147
|
+
}[];
|
|
1148
|
+
totalSlots: number;
|
|
1149
|
+
pricingMode: "uniform" | "variable";
|
|
1150
|
+
drawWindowDurationMinutes: number;
|
|
1151
|
+
maxPullsPerTransaction: number;
|
|
1152
|
+
maxPullsPerUser: number;
|
|
1153
|
+
} | undefined;
|
|
1154
1154
|
coverImageUrl?: string | undefined;
|
|
1155
1155
|
eventImages?: {
|
|
1156
1156
|
type: "video" | "image" | "file";
|
|
@@ -1206,7 +1206,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1206
1206
|
hasPointSystem: boolean;
|
|
1207
1207
|
entryReviewRequired: boolean;
|
|
1208
1208
|
formFields: {
|
|
1209
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
1209
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
1210
1210
|
id: string;
|
|
1211
1211
|
label: string;
|
|
1212
1212
|
required: boolean;
|
|
@@ -1226,7 +1226,7 @@ export declare const eventItemSchema: z.ZodObject<{
|
|
|
1226
1226
|
feedbackConfig?: {
|
|
1227
1227
|
anonymous: boolean;
|
|
1228
1228
|
formFields: {
|
|
1229
|
-
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "
|
|
1229
|
+
type: "number" | "checkbox" | "radio" | "text" | "email" | "select" | "textarea" | "date" | "file" | "multiselect" | "rating" | "phone";
|
|
1230
1230
|
id: string;
|
|
1231
1231
|
label: string;
|
|
1232
1232
|
required: boolean;
|
|
@@ -2,6 +2,14 @@ import type { MediaField } from "../../media/types/index";
|
|
|
2
2
|
import type { JsonValue } from "@mohasinac/appkit";
|
|
3
3
|
import type { ClientLotteryConfig } from "../../lottery/types";
|
|
4
4
|
export type EventType = "sale" | "offer" | "poll" | "survey" | "feedback" | "raffle" | "spin_wheel" | "lottery";
|
|
5
|
+
export declare const ALL_EVENT_TYPES: EventType[];
|
|
6
|
+
/**
|
|
7
|
+
* Display labels for the admin/seller dashboards, which are not i18n-wrapped.
|
|
8
|
+
* Public surfaces use the `filters.eventType*` message keys instead.
|
|
9
|
+
*
|
|
10
|
+
* `Record<EventType, string>` so a new union member is a compile error here too.
|
|
11
|
+
*/
|
|
12
|
+
export declare const EVENT_TYPE_LABELS: Record<EventType, string>;
|
|
5
13
|
export type RaffleType = "top_n_scorers" | "top_n_participants" | "open_raffle" | "spin_wheel";
|
|
6
14
|
export interface SpinPrize {
|
|
7
15
|
id: string;
|
|
@@ -11,6 +19,9 @@ export interface SpinPrize {
|
|
|
11
19
|
isActive: boolean;
|
|
12
20
|
}
|
|
13
21
|
export type EventStatus = "draft" | "active" | "paused" | "ended" | "cancelled";
|
|
22
|
+
export declare const ALL_EVENT_STATUSES: EventStatus[];
|
|
23
|
+
/** Dashboard display labels — see `EVENT_TYPE_LABELS`. */
|
|
24
|
+
export declare const EVENT_STATUS_LABELS: Record<EventStatus, string>;
|
|
14
25
|
export type EntryReviewStatus = "pending" | "approved" | "flagged";
|
|
15
26
|
export type PollResultsVisibility = "always" | "after_vote" | "after_end";
|
|
16
27
|
export type FormFieldType = "text" | "textarea" | "email" | "phone" | "number" | "select" | "multiselect" | "checkbox" | "radio" | "date" | "rating" | "file";
|
|
@@ -1 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Every event type, in canonical iteration order — the single array every
|
|
3
|
+
* filter chip group, tab bar and dropdown derives from.
|
|
4
|
+
*
|
|
5
|
+
* Declared as `Record<EventType, true>` rather than a plain array on purpose:
|
|
6
|
+
* adding a member to the union without adding it here is then a COMPILE error,
|
|
7
|
+
* not a silent omission. It exists because there were THREE hand-written
|
|
8
|
+
* enumerations of this union and all three had drifted — the admin chips
|
|
9
|
+
* offered `contest`/`giveaway`/`flash-sale` (values `EventType` never had, so
|
|
10
|
+
* they matched zero rows) while omitting five real types, the public filter
|
|
11
|
+
* omitted `lottery`, and `EVENT_FIELDS.TYPE_VALUES` omitted it too. Same shape
|
|
12
|
+
* as `ALL_LISTING_TYPES_MAP`; same reason (Root Cause #61).
|
|
13
|
+
*/
|
|
14
|
+
const ALL_EVENT_TYPES_MAP = {
|
|
15
|
+
sale: true,
|
|
16
|
+
offer: true,
|
|
17
|
+
poll: true,
|
|
18
|
+
survey: true,
|
|
19
|
+
feedback: true,
|
|
20
|
+
raffle: true,
|
|
21
|
+
spin_wheel: true,
|
|
22
|
+
lottery: true,
|
|
23
|
+
};
|
|
24
|
+
export const ALL_EVENT_TYPES = Object.keys(ALL_EVENT_TYPES_MAP);
|
|
25
|
+
/**
|
|
26
|
+
* Display labels for the admin/seller dashboards, which are not i18n-wrapped.
|
|
27
|
+
* Public surfaces use the `filters.eventType*` message keys instead.
|
|
28
|
+
*
|
|
29
|
+
* `Record<EventType, string>` so a new union member is a compile error here too.
|
|
30
|
+
*/
|
|
31
|
+
export const EVENT_TYPE_LABELS = {
|
|
32
|
+
sale: "Sale",
|
|
33
|
+
offer: "Offer",
|
|
34
|
+
poll: "Poll",
|
|
35
|
+
survey: "Survey",
|
|
36
|
+
feedback: "Feedback",
|
|
37
|
+
raffle: "Raffle",
|
|
38
|
+
spin_wheel: "Spin the Wheel",
|
|
39
|
+
lottery: "Lottery",
|
|
40
|
+
};
|
|
41
|
+
/** Every event status, in lifecycle order. Compile-checked like `ALL_EVENT_TYPES`. */
|
|
42
|
+
const ALL_EVENT_STATUSES_MAP = {
|
|
43
|
+
draft: true,
|
|
44
|
+
active: true,
|
|
45
|
+
paused: true,
|
|
46
|
+
ended: true,
|
|
47
|
+
cancelled: true,
|
|
48
|
+
};
|
|
49
|
+
export const ALL_EVENT_STATUSES = Object.keys(ALL_EVENT_STATUSES_MAP);
|
|
50
|
+
/** Dashboard display labels — see `EVENT_TYPE_LABELS`. */
|
|
51
|
+
export const EVENT_STATUS_LABELS = {
|
|
52
|
+
draft: "Draft",
|
|
53
|
+
active: "Active",
|
|
54
|
+
paused: "Paused",
|
|
55
|
+
ended: "Ended",
|
|
56
|
+
cancelled: "Cancelled",
|
|
57
|
+
};
|
|
@@ -27,10 +27,10 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
27
27
|
template: z.ZodOptional<z.ZodString>;
|
|
28
28
|
}, "strip", z.ZodTypeAny, {
|
|
29
29
|
category: string;
|
|
30
|
-
priority: number;
|
|
31
|
-
order: number;
|
|
32
30
|
isActive: boolean;
|
|
31
|
+
order: number;
|
|
33
32
|
showOnHomepage: boolean;
|
|
33
|
+
priority: number;
|
|
34
34
|
question: string;
|
|
35
35
|
answer: {
|
|
36
36
|
text: string;
|
|
@@ -52,10 +52,10 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
52
52
|
};
|
|
53
53
|
template?: string | undefined;
|
|
54
54
|
tags?: string[] | undefined;
|
|
55
|
-
priority?: number | undefined;
|
|
56
|
-
order?: number | undefined;
|
|
57
55
|
isActive?: boolean | undefined;
|
|
56
|
+
order?: number | undefined;
|
|
58
57
|
showOnHomepage?: boolean | undefined;
|
|
58
|
+
priority?: number | undefined;
|
|
59
59
|
showInFooter?: boolean | undefined;
|
|
60
60
|
isPinned?: boolean | undefined;
|
|
61
61
|
relatedFAQs?: string[] | undefined;
|
|
@@ -63,10 +63,10 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
63
63
|
variables?: Record<string, string> | undefined;
|
|
64
64
|
}>, {
|
|
65
65
|
category: string;
|
|
66
|
-
priority: number;
|
|
67
|
-
order: number;
|
|
68
66
|
isActive: boolean;
|
|
67
|
+
order: number;
|
|
69
68
|
showOnHomepage: boolean;
|
|
69
|
+
priority: number;
|
|
70
70
|
question: string;
|
|
71
71
|
answer: {
|
|
72
72
|
text: string;
|
|
@@ -88,10 +88,10 @@ export declare const faqCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
88
88
|
};
|
|
89
89
|
template?: string | undefined;
|
|
90
90
|
tags?: string[] | undefined;
|
|
91
|
-
priority?: number | undefined;
|
|
92
|
-
order?: number | undefined;
|
|
93
91
|
isActive?: boolean | undefined;
|
|
92
|
+
order?: number | undefined;
|
|
94
93
|
showOnHomepage?: boolean | undefined;
|
|
94
|
+
priority?: number | undefined;
|
|
95
95
|
showInFooter?: boolean | undefined;
|
|
96
96
|
isPinned?: boolean | undefined;
|
|
97
97
|
relatedFAQs?: string[] | undefined;
|
|
@@ -126,10 +126,10 @@ export declare const faqUpdateSchema: z.ZodObject<{
|
|
|
126
126
|
template?: string | undefined;
|
|
127
127
|
category?: string | undefined;
|
|
128
128
|
tags?: string[] | undefined;
|
|
129
|
-
priority?: number | undefined;
|
|
130
|
-
order?: number | undefined;
|
|
131
129
|
isActive?: boolean | undefined;
|
|
130
|
+
order?: number | undefined;
|
|
132
131
|
showOnHomepage?: boolean | undefined;
|
|
132
|
+
priority?: number | undefined;
|
|
133
133
|
question?: string | undefined;
|
|
134
134
|
answer?: {
|
|
135
135
|
text: string;
|
|
@@ -144,10 +144,10 @@ export declare const faqUpdateSchema: z.ZodObject<{
|
|
|
144
144
|
template?: string | undefined;
|
|
145
145
|
category?: string | undefined;
|
|
146
146
|
tags?: string[] | undefined;
|
|
147
|
-
priority?: number | undefined;
|
|
148
|
-
order?: number | undefined;
|
|
149
147
|
isActive?: boolean | undefined;
|
|
148
|
+
order?: number | undefined;
|
|
150
149
|
showOnHomepage?: boolean | undefined;
|
|
150
|
+
priority?: number | undefined;
|
|
151
151
|
question?: string | undefined;
|
|
152
152
|
answer?: {
|
|
153
153
|
text: string;
|
|
@@ -92,15 +92,15 @@ export declare const faqSchema: z.ZodObject<{
|
|
|
92
92
|
createdAt?: string | undefined;
|
|
93
93
|
updatedAt?: string | undefined;
|
|
94
94
|
tags?: string[] | undefined;
|
|
95
|
-
priority?: number | undefined;
|
|
96
|
-
order?: number | undefined;
|
|
97
95
|
isActive?: boolean | undefined;
|
|
96
|
+
order?: number | undefined;
|
|
98
97
|
stats?: {
|
|
99
98
|
views?: number | undefined;
|
|
100
99
|
helpful?: number | undefined;
|
|
101
100
|
notHelpful?: number | undefined;
|
|
102
101
|
} | undefined;
|
|
103
102
|
showOnHomepage?: boolean | undefined;
|
|
103
|
+
priority?: number | undefined;
|
|
104
104
|
showInFooter?: boolean | undefined;
|
|
105
105
|
isPinned?: boolean | undefined;
|
|
106
106
|
relatedFAQs?: string[] | undefined;
|
|
@@ -118,15 +118,15 @@ export declare const faqSchema: z.ZodObject<{
|
|
|
118
118
|
createdAt?: string | undefined;
|
|
119
119
|
updatedAt?: string | undefined;
|
|
120
120
|
tags?: string[] | undefined;
|
|
121
|
-
priority?: number | undefined;
|
|
122
|
-
order?: number | undefined;
|
|
123
121
|
isActive?: boolean | undefined;
|
|
122
|
+
order?: number | undefined;
|
|
124
123
|
stats?: {
|
|
125
124
|
views?: number | undefined;
|
|
126
125
|
helpful?: number | undefined;
|
|
127
126
|
notHelpful?: number | undefined;
|
|
128
127
|
} | undefined;
|
|
129
128
|
showOnHomepage?: boolean | undefined;
|
|
129
|
+
priority?: number | undefined;
|
|
130
130
|
showInFooter?: boolean | undefined;
|
|
131
131
|
isPinned?: boolean | undefined;
|
|
132
132
|
relatedFAQs?: string[] | undefined;
|
|
@@ -283,9 +283,8 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
283
283
|
}, z.ZodTypeAny, "passthrough">;
|
|
284
284
|
category: "orders_payment" | "shipping_delivery" | "returns_refunds" | "product_information" | "account_security" | "technical_support" | "general";
|
|
285
285
|
tags: string[];
|
|
286
|
-
priority: number;
|
|
287
|
-
order: number;
|
|
288
286
|
isActive: boolean;
|
|
287
|
+
order: number;
|
|
289
288
|
createdBy: string;
|
|
290
289
|
stats: {
|
|
291
290
|
views: number;
|
|
@@ -296,6 +295,7 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
296
295
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
297
296
|
};
|
|
298
297
|
showOnHomepage: boolean;
|
|
298
|
+
priority: number;
|
|
299
299
|
question: string;
|
|
300
300
|
answer: {
|
|
301
301
|
text: string;
|
|
@@ -322,9 +322,8 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
322
322
|
}, z.ZodTypeAny, "passthrough">;
|
|
323
323
|
category: "orders_payment" | "shipping_delivery" | "returns_refunds" | "product_information" | "account_security" | "technical_support" | "general";
|
|
324
324
|
tags: string[];
|
|
325
|
-
priority: number;
|
|
326
|
-
order: number;
|
|
327
325
|
isActive: boolean;
|
|
326
|
+
order: number;
|
|
328
327
|
createdBy: string;
|
|
329
328
|
stats: {
|
|
330
329
|
views: number;
|
|
@@ -335,6 +334,7 @@ export declare const faqFirestoreSchema: z.ZodObject<{
|
|
|
335
334
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
336
335
|
};
|
|
337
336
|
showOnHomepage: boolean;
|
|
337
|
+
priority: number;
|
|
338
338
|
question: string;
|
|
339
339
|
answer: {
|
|
340
340
|
text: string;
|
|
@@ -20,10 +20,16 @@ export interface FilterFacetSectionProps {
|
|
|
20
20
|
* "dropdown" — compact pill button with a floating panel; use in horizontal toolbars.
|
|
21
21
|
*/
|
|
22
22
|
displayAs?: "accordion" | "dropdown";
|
|
23
|
+
/**
|
|
24
|
+
* Hide options whose `count` is exactly 0. Requires the caller to populate
|
|
25
|
+
* `FacetOption.count`; opt-in so the existing callers that pass no counts are
|
|
26
|
+
* unaffected. A selected option, or one with no count, is always kept.
|
|
27
|
+
*/
|
|
28
|
+
hideEmpty?: boolean;
|
|
23
29
|
}
|
|
24
30
|
/**
|
|
25
31
|
* FilterFacetSection — collapsible checkbox/radio filter section.
|
|
26
32
|
* Supports single-select and multi-select modes.
|
|
27
33
|
* When searchable, the search input is always visible and typing auto-expands.
|
|
28
34
|
*/
|
|
29
|
-
export declare function FilterFacetSection({ title, options, selected, onChange, selectionMode, defaultCollapsed, searchable, isOpen: controlledOpen, onToggle, onClear, className, displayAs, }: FilterFacetSectionProps): import("react").JSX.Element;
|
|
35
|
+
export declare function FilterFacetSection({ title, options, selected, onChange, selectionMode, defaultCollapsed, searchable, isOpen: controlledOpen, onToggle, onClear, className, displayAs, hideEmpty, }: FilterFacetSectionProps): import("react").JSX.Element;
|
|
@@ -16,7 +16,7 @@ const CLS_CLEAR_ICON = "inline-flex items-center justify-center w-5 h-5 p-[var(-
|
|
|
16
16
|
* Supports single-select and multi-select modes.
|
|
17
17
|
* When searchable, the search input is always visible and typing auto-expands.
|
|
18
18
|
*/
|
|
19
|
-
export function FilterFacetSection({ title, options, selected, onChange, selectionMode = "multi", defaultCollapsed = true, searchable = false, isOpen: controlledOpen, onToggle, onClear, className = "", displayAs = "accordion", }) {
|
|
19
|
+
export function FilterFacetSection({ title, options, selected, onChange, selectionMode = "multi", defaultCollapsed = true, searchable = false, isOpen: controlledOpen, onToggle, onClear, className = "", displayAs = "accordion", hideEmpty = false, }) {
|
|
20
20
|
const isControlled = controlledOpen !== undefined;
|
|
21
21
|
const [internalCollapsed, setInternalCollapsed] = useState(defaultCollapsed);
|
|
22
22
|
const [search, setSearch] = useState("");
|
|
@@ -47,9 +47,17 @@ export function FilterFacetSection({ title, options, selected, onChange, selecti
|
|
|
47
47
|
setInternalCollapsed(false);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
// Drop options that would return nothing, when the caller supplies counts and
|
|
51
|
+
// opts in. A selected option is always kept — a facet vanishing while it is
|
|
52
|
+
// applied would strand a value in the URL with no control to clear it — and
|
|
53
|
+
// so is an option with no count, since `undefined` means "not counted", not
|
|
54
|
+
// "zero" (Root Cause #59).
|
|
55
|
+
const scoped = hideEmpty
|
|
56
|
+
? options.filter((o) => selected.includes(o.value) || o.count === undefined || o.count > 0)
|
|
52
57
|
: options;
|
|
58
|
+
const filtered = search
|
|
59
|
+
? scoped.filter((o) => o.label.toLowerCase().includes(search.toLowerCase()))
|
|
60
|
+
: scoped;
|
|
53
61
|
const toggle = (value) => {
|
|
54
62
|
if (selectionMode === "single") {
|
|
55
63
|
onChange(selected.includes(value) ? [] : [value]);
|
|
@@ -43,9 +43,9 @@ export declare const groupedListingFirestoreSchema: z.ZodObject<{
|
|
|
43
43
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
44
44
|
}, z.ZodTypeAny, "passthrough">;
|
|
45
45
|
slug: string;
|
|
46
|
-
isFeatured: boolean;
|
|
47
46
|
isActive: boolean;
|
|
48
47
|
createdBy: string;
|
|
48
|
+
isFeatured: boolean;
|
|
49
49
|
productIds: string[];
|
|
50
50
|
groupTheme: "set" | "related" | "character" | "lineage" | "generic";
|
|
51
51
|
visibilityStatus: "hidden" | "visible";
|
|
@@ -53,8 +53,8 @@ export declare const groupedListingFirestoreSchema: z.ZodObject<{
|
|
|
53
53
|
activeMemberCount: number;
|
|
54
54
|
storeId?: string | undefined;
|
|
55
55
|
description?: string | undefined;
|
|
56
|
-
brandSlug?: string | undefined;
|
|
57
56
|
categorySlug?: string | undefined;
|
|
57
|
+
brandSlug?: string | undefined;
|
|
58
58
|
coverImage?: string | undefined;
|
|
59
59
|
}, {
|
|
60
60
|
id: string;
|
|
@@ -66,9 +66,9 @@ export declare const groupedListingFirestoreSchema: z.ZodObject<{
|
|
|
66
66
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
67
67
|
}, z.ZodTypeAny, "passthrough">;
|
|
68
68
|
slug: string;
|
|
69
|
-
isFeatured: boolean;
|
|
70
69
|
isActive: boolean;
|
|
71
70
|
createdBy: string;
|
|
71
|
+
isFeatured: boolean;
|
|
72
72
|
productIds: string[];
|
|
73
73
|
groupTheme: "set" | "related" | "character" | "lineage" | "generic";
|
|
74
74
|
visibilityStatus: "hidden" | "visible";
|
|
@@ -76,8 +76,8 @@ export declare const groupedListingFirestoreSchema: z.ZodObject<{
|
|
|
76
76
|
activeMemberCount: number;
|
|
77
77
|
storeId?: string | undefined;
|
|
78
78
|
description?: string | undefined;
|
|
79
|
-
brandSlug?: string | undefined;
|
|
80
79
|
categorySlug?: string | undefined;
|
|
80
|
+
brandSlug?: string | undefined;
|
|
81
81
|
coverImage?: string | undefined;
|
|
82
82
|
}>;
|
|
83
83
|
export type GroupedListingFromSchema = z.infer<typeof groupedListingFirestoreSchema>;
|
|
@@ -2,6 +2,12 @@ import React from "react";
|
|
|
2
2
|
export declare function hashBannerMessage(msg: string): string;
|
|
3
3
|
export interface AnnouncementBarProps {
|
|
4
4
|
message: string;
|
|
5
|
+
/**
|
|
6
|
+
* Optional destination for the message. The admin editor has collected this
|
|
7
|
+
* (and `backgroundColor`) since it was built, but neither was ever rendered —
|
|
8
|
+
* so both were silently discarded on save. Wired 2026-08-24.
|
|
9
|
+
*/
|
|
10
|
+
link?: string;
|
|
5
11
|
className?: string;
|
|
6
12
|
/** Called when the user dismisses — consumer wires this to a server action to persist. */
|
|
7
13
|
onDismiss?: (hash: string) => void;
|
|
@@ -14,4 +20,4 @@ export interface AnnouncementBarProps {
|
|
|
14
20
|
*/
|
|
15
21
|
overlay?: boolean;
|
|
16
22
|
}
|
|
17
|
-
export declare function AnnouncementBar({ message, className, onDismiss, overlay }: AnnouncementBarProps): React.JSX.Element | null;
|
|
23
|
+
export declare function AnnouncementBar({ message, link, className, onDismiss, overlay }: AnnouncementBarProps): React.JSX.Element | null;
|
|
@@ -5,7 +5,7 @@ import { useState, useEffect } from "react";
|
|
|
5
5
|
import { X } from "lucide-react";
|
|
6
6
|
import { useAuth } from "../../../react/contexts/SessionContext";
|
|
7
7
|
import { Div } from "../../../ui/components/Div";
|
|
8
|
-
import { IconButton, Row, Span } from "@mohasinac/appkit/client";
|
|
8
|
+
import { IconButton, Row, Span, TextLink } from "@mohasinac/appkit/client";
|
|
9
9
|
const STORAGE_KEY = "letitrip:announcement-dismissed";
|
|
10
10
|
const ONE_WEEK_MS = 7 * 24 * 60 * 60 * 1000;
|
|
11
11
|
export function hashBannerMessage(msg) {
|
|
@@ -38,7 +38,7 @@ function saveLocalDismissal(message) {
|
|
|
38
38
|
void normalizeError(_err); /* quota exceeded — ignore */
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
export function AnnouncementBar({ message, className = "", onDismiss, overlay = false }) {
|
|
41
|
+
export function AnnouncementBar({ message, link, className = "", onDismiss, overlay = false }) {
|
|
42
42
|
const { user } = useAuth();
|
|
43
43
|
const bannerHash = hashBannerMessage(message);
|
|
44
44
|
const userAlreadyDismissed = !!user?.dismissedBannerHash && user.dismissedBannerHash === bannerHash;
|
|
@@ -58,7 +58,7 @@ export function AnnouncementBar({ message, className = "", onDismiss, overlay =
|
|
|
58
58
|
const positionCls = overlay
|
|
59
59
|
? "absolute inset-x-0 top-0 z-20 bg-primary-700/85 backdrop-blur-sm"
|
|
60
60
|
: "relative left-1/2 right-1/2 w-screen -translate-x-1/2 bg-primary-700";
|
|
61
|
-
return (_jsx(Div, { className: `${positionCls} transition-opacity duration-200 ${mounted ? "opacity-100" : "opacity-0"} ${className}`, role: "banner", children: _jsx(Div, { paddingX: "x-page", className: "container mx-auto max-w-[1920px]", children: _jsxs(Row, { textWeight: "medium", textSize: "sm", className: "relative text-left text-white", padding: "y-xs", align: "center", justify: "start", children: [_jsx(Span, { children: message }), _jsx(IconButton, { type: "button", onClick: () => {
|
|
61
|
+
return (_jsx(Div, { className: `${positionCls} transition-opacity duration-200 ${mounted ? "opacity-100" : "opacity-0"} ${className}`, role: "banner", children: _jsx(Div, { paddingX: "x-page", className: "container mx-auto max-w-[1920px]", children: _jsxs(Row, { textWeight: "medium", textSize: "sm", className: "relative text-left text-white", padding: "y-xs", align: "center", justify: "start", children: [link ? (_jsx(TextLink, { href: link, className: "text-white underline", children: message })) : (_jsx(Span, { children: message })), _jsx(IconButton, { type: "button", onClick: () => {
|
|
62
62
|
saveLocalDismissal(message);
|
|
63
63
|
onDismiss?.(bannerHash);
|
|
64
64
|
setDismissed(true);
|