@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
|
@@ -339,17 +339,16 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
339
339
|
updatedAt?: string | undefined;
|
|
340
340
|
storeId?: string | undefined;
|
|
341
341
|
features?: string[] | undefined;
|
|
342
|
-
category?: string | undefined;
|
|
343
|
-
featured?: boolean | undefined;
|
|
344
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
345
|
-
isPromoted?: boolean | undefined;
|
|
346
342
|
description?: string | undefined;
|
|
347
343
|
slug?: string | undefined;
|
|
344
|
+
category?: string | undefined;
|
|
345
|
+
categorySlug?: string | undefined;
|
|
348
346
|
subcategory?: string | undefined;
|
|
349
347
|
stockQuantity?: number | undefined;
|
|
350
348
|
availableQuantity?: number | undefined;
|
|
351
349
|
mainImage?: string | undefined;
|
|
352
350
|
images?: string[] | undefined;
|
|
351
|
+
featured?: boolean | undefined;
|
|
353
352
|
tags?: string[] | undefined;
|
|
354
353
|
specifications?: {
|
|
355
354
|
value: string;
|
|
@@ -362,6 +361,7 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
362
361
|
insurance?: boolean | undefined;
|
|
363
362
|
insuranceCost?: number | undefined;
|
|
364
363
|
shippingPaidBy?: "seller" | "buyer" | undefined;
|
|
364
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
365
365
|
auctionEndDate?: string | Date | undefined;
|
|
366
366
|
startingBid?: number | undefined;
|
|
367
367
|
currentBid?: number | undefined;
|
|
@@ -377,8 +377,35 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
377
377
|
preOrderDepositAmount?: number | undefined;
|
|
378
378
|
preOrderMaxQuantity?: number | undefined;
|
|
379
379
|
preOrderCurrentCount?: number | undefined;
|
|
380
|
-
preOrderProductionStatus?: "
|
|
380
|
+
preOrderProductionStatus?: "in_production" | "upcoming" | "ready_to_ship" | undefined;
|
|
381
381
|
preOrderCancellable?: boolean | undefined;
|
|
382
|
+
isPromoted?: boolean | undefined;
|
|
383
|
+
pickupAddressId?: string | undefined;
|
|
384
|
+
viewCount?: number | undefined;
|
|
385
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
386
|
+
prizeRevealWindowStart?: string | Date | undefined;
|
|
387
|
+
prizeRevealWindowEnd?: string | Date | undefined;
|
|
388
|
+
prizeDrawDurationDays?: number | undefined;
|
|
389
|
+
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
390
|
+
prizeCurrentEntries?: number | undefined;
|
|
391
|
+
prizeMaxEntries?: number | undefined;
|
|
392
|
+
pricePerEntry?: number | undefined;
|
|
393
|
+
rating?: number | undefined;
|
|
394
|
+
publishedAt?: string | undefined;
|
|
395
|
+
media?: {
|
|
396
|
+
type: "video" | "image" | "file";
|
|
397
|
+
url: string;
|
|
398
|
+
source?: "upload" | "youtube" | "external" | undefined;
|
|
399
|
+
alt?: string | undefined;
|
|
400
|
+
thumbnailUrl?: string | undefined;
|
|
401
|
+
youtubeId?: string | undefined;
|
|
402
|
+
duration?: number | undefined;
|
|
403
|
+
}[] | undefined;
|
|
404
|
+
seo?: {
|
|
405
|
+
title?: string | undefined;
|
|
406
|
+
description?: string | undefined;
|
|
407
|
+
keywords?: string[] | undefined;
|
|
408
|
+
} | undefined;
|
|
382
409
|
allowShipBeforeEmiComplete?: boolean | undefined;
|
|
383
410
|
printMeta?: {
|
|
384
411
|
size?: string | undefined;
|
|
@@ -386,8 +413,6 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
386
413
|
finish?: string | undefined;
|
|
387
414
|
editionSize?: number | undefined;
|
|
388
415
|
} | undefined;
|
|
389
|
-
pickupAddressId?: string | undefined;
|
|
390
|
-
viewCount?: number | undefined;
|
|
391
416
|
avgRating?: number | undefined;
|
|
392
417
|
reviewCount?: number | undefined;
|
|
393
418
|
bulkDiscounts?: {
|
|
@@ -432,33 +457,8 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
432
457
|
estimatedValue?: number | undefined;
|
|
433
458
|
wonByOrderId?: string | undefined;
|
|
434
459
|
}[] | undefined;
|
|
435
|
-
pricePerEntry?: number | undefined;
|
|
436
|
-
prizeMaxEntries?: number | undefined;
|
|
437
|
-
prizeCurrentEntries?: number | undefined;
|
|
438
|
-
prizeRevealWindowStart?: string | Date | undefined;
|
|
439
|
-
prizeRevealWindowEnd?: string | Date | undefined;
|
|
440
|
-
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
441
|
-
prizeDrawDurationDays?: number | undefined;
|
|
442
460
|
prizeGithubFileUrl?: string | undefined;
|
|
443
|
-
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
444
|
-
media?: {
|
|
445
|
-
type: "video" | "image" | "file";
|
|
446
|
-
url: string;
|
|
447
|
-
source?: "upload" | "youtube" | "external" | undefined;
|
|
448
|
-
alt?: string | undefined;
|
|
449
|
-
thumbnailUrl?: string | undefined;
|
|
450
|
-
youtubeId?: string | undefined;
|
|
451
|
-
duration?: number | undefined;
|
|
452
|
-
}[] | undefined;
|
|
453
461
|
inStock?: boolean | undefined;
|
|
454
|
-
rating?: number | undefined;
|
|
455
|
-
categorySlug?: string | undefined;
|
|
456
|
-
publishedAt?: string | undefined;
|
|
457
|
-
seo?: {
|
|
458
|
-
title?: string | undefined;
|
|
459
|
-
description?: string | undefined;
|
|
460
|
-
keywords?: string[] | undefined;
|
|
461
|
-
} | undefined;
|
|
462
462
|
attributes?: Record<string, string> | undefined;
|
|
463
463
|
originalPrice?: number | undefined;
|
|
464
464
|
sellerAvatar?: string | undefined;
|
|
@@ -478,17 +478,16 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
478
478
|
updatedAt?: string | undefined;
|
|
479
479
|
storeId?: string | undefined;
|
|
480
480
|
features?: string[] | undefined;
|
|
481
|
-
category?: string | undefined;
|
|
482
|
-
featured?: boolean | undefined;
|
|
483
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
484
|
-
isPromoted?: boolean | undefined;
|
|
485
481
|
description?: string | undefined;
|
|
486
482
|
slug?: string | undefined;
|
|
483
|
+
category?: string | undefined;
|
|
484
|
+
categorySlug?: string | undefined;
|
|
487
485
|
subcategory?: string | undefined;
|
|
488
486
|
stockQuantity?: number | undefined;
|
|
489
487
|
availableQuantity?: number | undefined;
|
|
490
488
|
mainImage?: string | undefined;
|
|
491
489
|
images?: string[] | undefined;
|
|
490
|
+
featured?: boolean | undefined;
|
|
492
491
|
tags?: string[] | undefined;
|
|
493
492
|
specifications?: {
|
|
494
493
|
value: string;
|
|
@@ -501,6 +500,7 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
501
500
|
insurance?: boolean | undefined;
|
|
502
501
|
insuranceCost?: number | undefined;
|
|
503
502
|
shippingPaidBy?: "seller" | "buyer" | undefined;
|
|
503
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
504
504
|
auctionEndDate?: string | Date | undefined;
|
|
505
505
|
startingBid?: number | undefined;
|
|
506
506
|
currentBid?: number | undefined;
|
|
@@ -516,8 +516,35 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
516
516
|
preOrderDepositAmount?: number | undefined;
|
|
517
517
|
preOrderMaxQuantity?: number | undefined;
|
|
518
518
|
preOrderCurrentCount?: number | undefined;
|
|
519
|
-
preOrderProductionStatus?: "
|
|
519
|
+
preOrderProductionStatus?: "in_production" | "upcoming" | "ready_to_ship" | undefined;
|
|
520
520
|
preOrderCancellable?: boolean | undefined;
|
|
521
|
+
isPromoted?: boolean | undefined;
|
|
522
|
+
pickupAddressId?: string | undefined;
|
|
523
|
+
viewCount?: number | undefined;
|
|
524
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
525
|
+
prizeRevealWindowStart?: string | Date | undefined;
|
|
526
|
+
prizeRevealWindowEnd?: string | Date | undefined;
|
|
527
|
+
prizeDrawDurationDays?: number | undefined;
|
|
528
|
+
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
529
|
+
prizeCurrentEntries?: number | undefined;
|
|
530
|
+
prizeMaxEntries?: number | undefined;
|
|
531
|
+
pricePerEntry?: number | undefined;
|
|
532
|
+
rating?: number | undefined;
|
|
533
|
+
publishedAt?: string | undefined;
|
|
534
|
+
media?: {
|
|
535
|
+
type: "video" | "image" | "file";
|
|
536
|
+
url: string;
|
|
537
|
+
source?: "upload" | "youtube" | "external" | undefined;
|
|
538
|
+
alt?: string | undefined;
|
|
539
|
+
thumbnailUrl?: string | undefined;
|
|
540
|
+
youtubeId?: string | undefined;
|
|
541
|
+
duration?: number | undefined;
|
|
542
|
+
}[] | undefined;
|
|
543
|
+
seo?: {
|
|
544
|
+
title?: string | undefined;
|
|
545
|
+
description?: string | undefined;
|
|
546
|
+
keywords?: string[] | undefined;
|
|
547
|
+
} | undefined;
|
|
521
548
|
allowShipBeforeEmiComplete?: boolean | undefined;
|
|
522
549
|
printMeta?: {
|
|
523
550
|
size?: string | undefined;
|
|
@@ -525,8 +552,6 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
525
552
|
finish?: string | undefined;
|
|
526
553
|
editionSize?: number | undefined;
|
|
527
554
|
} | undefined;
|
|
528
|
-
pickupAddressId?: string | undefined;
|
|
529
|
-
viewCount?: number | undefined;
|
|
530
555
|
avgRating?: number | undefined;
|
|
531
556
|
reviewCount?: number | undefined;
|
|
532
557
|
bulkDiscounts?: {
|
|
@@ -571,33 +596,8 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
571
596
|
estimatedValue?: number | undefined;
|
|
572
597
|
wonByOrderId?: string | undefined;
|
|
573
598
|
}[] | undefined;
|
|
574
|
-
pricePerEntry?: number | undefined;
|
|
575
|
-
prizeMaxEntries?: number | undefined;
|
|
576
|
-
prizeCurrentEntries?: number | undefined;
|
|
577
|
-
prizeRevealWindowStart?: string | Date | undefined;
|
|
578
|
-
prizeRevealWindowEnd?: string | Date | undefined;
|
|
579
|
-
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
580
|
-
prizeDrawDurationDays?: number | undefined;
|
|
581
599
|
prizeGithubFileUrl?: string | undefined;
|
|
582
|
-
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
583
|
-
media?: {
|
|
584
|
-
type: "video" | "image" | "file";
|
|
585
|
-
url: string;
|
|
586
|
-
source?: "upload" | "youtube" | "external" | undefined;
|
|
587
|
-
alt?: string | undefined;
|
|
588
|
-
thumbnailUrl?: string | undefined;
|
|
589
|
-
youtubeId?: string | undefined;
|
|
590
|
-
duration?: number | undefined;
|
|
591
|
-
}[] | undefined;
|
|
592
600
|
inStock?: boolean | undefined;
|
|
593
|
-
rating?: number | undefined;
|
|
594
|
-
categorySlug?: string | undefined;
|
|
595
|
-
publishedAt?: string | undefined;
|
|
596
|
-
seo?: {
|
|
597
|
-
title?: string | undefined;
|
|
598
|
-
description?: string | undefined;
|
|
599
|
-
keywords?: string[] | undefined;
|
|
600
|
-
} | undefined;
|
|
601
601
|
attributes?: Record<string, string> | undefined;
|
|
602
602
|
originalPrice?: number | undefined;
|
|
603
603
|
sellerAvatar?: string | undefined;
|
|
@@ -627,8 +627,8 @@ export declare const productListParamsSchema: z.ZodObject<{
|
|
|
627
627
|
storeId?: string | undefined;
|
|
628
628
|
category?: string | undefined;
|
|
629
629
|
featured?: boolean | undefined;
|
|
630
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
631
630
|
condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
|
|
631
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
632
632
|
minPrice?: number | undefined;
|
|
633
633
|
maxPrice?: number | undefined;
|
|
634
634
|
inStock?: boolean | undefined;
|
|
@@ -641,8 +641,8 @@ export declare const productListParamsSchema: z.ZodObject<{
|
|
|
641
641
|
storeId?: string | undefined;
|
|
642
642
|
category?: string | undefined;
|
|
643
643
|
featured?: boolean | undefined;
|
|
644
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
645
644
|
condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
|
|
645
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
646
646
|
minPrice?: number | undefined;
|
|
647
647
|
maxPrice?: number | undefined;
|
|
648
648
|
inStock?: boolean | undefined;
|
|
@@ -25,7 +25,7 @@ export declare const productFeatureAdminCreateSchema: z.ZodObject<{
|
|
|
25
25
|
label: string;
|
|
26
26
|
scope: "store" | "platform";
|
|
27
27
|
icon: string;
|
|
28
|
-
category: "shipping" | "custom" | "seller" | "
|
|
28
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
29
29
|
isActive: boolean;
|
|
30
30
|
displayOrder: number;
|
|
31
31
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -36,7 +36,7 @@ export declare const productFeatureAdminCreateSchema: z.ZodObject<{
|
|
|
36
36
|
label: string;
|
|
37
37
|
scope: "store" | "platform";
|
|
38
38
|
icon: string;
|
|
39
|
-
category: "shipping" | "custom" | "seller" | "
|
|
39
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
40
40
|
isActive: boolean;
|
|
41
41
|
displayOrder: number;
|
|
42
42
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -57,7 +57,7 @@ export declare const productFeatureStoreCreateSchema: z.ZodObject<{
|
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
58
|
label: string;
|
|
59
59
|
icon: string;
|
|
60
|
-
category: "shipping" | "custom" | "seller" | "
|
|
60
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
61
61
|
isActive: boolean;
|
|
62
62
|
displayOrder: number;
|
|
63
63
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -66,7 +66,7 @@ export declare const productFeatureStoreCreateSchema: z.ZodObject<{
|
|
|
66
66
|
}, {
|
|
67
67
|
label: string;
|
|
68
68
|
icon: string;
|
|
69
|
-
category: "shipping" | "custom" | "seller" | "
|
|
69
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
70
70
|
isActive: boolean;
|
|
71
71
|
displayOrder: number;
|
|
72
72
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -86,8 +86,8 @@ export declare const productFeatureUpdateSchema: z.ZodObject<{
|
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
87
|
label?: string | undefined;
|
|
88
88
|
icon?: string | undefined;
|
|
89
|
-
category?: "shipping" | "custom" | "seller" | "auction" | "condition" | "platform" | "preorder" | undefined;
|
|
90
89
|
description?: string | undefined;
|
|
90
|
+
category?: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder" | undefined;
|
|
91
91
|
isActive?: boolean | undefined;
|
|
92
92
|
displayOrder?: number | undefined;
|
|
93
93
|
iconColor?: string | undefined;
|
|
@@ -95,8 +95,8 @@ export declare const productFeatureUpdateSchema: z.ZodObject<{
|
|
|
95
95
|
}, {
|
|
96
96
|
label?: string | undefined;
|
|
97
97
|
icon?: string | undefined;
|
|
98
|
-
category?: "shipping" | "custom" | "seller" | "auction" | "condition" | "platform" | "preorder" | undefined;
|
|
99
98
|
description?: string | undefined;
|
|
99
|
+
category?: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder" | undefined;
|
|
100
100
|
isActive?: boolean | undefined;
|
|
101
101
|
displayOrder?: number | undefined;
|
|
102
102
|
iconColor?: string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MediaField } from "../../media/types/index";
|
|
2
|
+
import type { AvailabilityFilter } from "../../../constants/field-names";
|
|
2
3
|
import type { CustomField, CustomSection, ProductPrintMeta } from "../schemas/firestore";
|
|
3
4
|
export type { CustomField, CustomSection, ProductPrintMeta } from "../schemas/firestore";
|
|
4
5
|
export type ProductStatus = "draft" | "published" | "in_review" | "archived";
|
|
@@ -168,6 +169,13 @@ export interface ProductListResponse {
|
|
|
168
169
|
hasMore: boolean;
|
|
169
170
|
/** Set when the query fell back to an empty result due to a DB error (index missing, permission denied). */
|
|
170
171
|
warning?: string;
|
|
172
|
+
/**
|
|
173
|
+
* A bounded fetch saturated its ceiling, so `total` is a FLOOR. Render it as
|
|
174
|
+
* "50+", never as an exact count, and never derive a final page number from
|
|
175
|
+
* it — `totalPages` is deliberately `page + 1` while this is set, so the
|
|
176
|
+
* pager offers a live Next instead of claiming a false last page.
|
|
177
|
+
*/
|
|
178
|
+
truncated?: boolean;
|
|
171
179
|
}
|
|
172
180
|
export interface ProductListParams {
|
|
173
181
|
q?: string;
|
|
@@ -177,7 +185,14 @@ export interface ProductListParams {
|
|
|
177
185
|
condition?: ProductCondition;
|
|
178
186
|
minPrice?: number;
|
|
179
187
|
maxPrice?: number;
|
|
180
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Which availability scope to request — the three-tab bar rendered by
|
|
190
|
+
* `<AvailabilityTabs>`. Browse surfaces must send this on EVERY request,
|
|
191
|
+
* including the default `"available"`: the API treats an absent value as
|
|
192
|
+
* "all", so omitting it makes the client refetch disagree with the SSR
|
|
193
|
+
* paint, permanently (Root Cause #30).
|
|
194
|
+
*/
|
|
195
|
+
availability?: AvailabilityFilter;
|
|
181
196
|
/** Canonical listing-kind discriminator (SB1-G Phase 4). Accepts a single
|
|
182
197
|
* `ListingType`, or a `|`-joined multi-value string (sievejs OR-group,
|
|
183
198
|
* e.g. `"standard|classified|digital-code|live"`) for the consolidated
|
|
@@ -797,14 +797,14 @@ export declare const promotionsListParamsSchema: z.ZodObject<{
|
|
|
797
797
|
scope?: "seller" | "admin" | undefined;
|
|
798
798
|
pageSize?: number | undefined;
|
|
799
799
|
storeId?: string | undefined;
|
|
800
|
-
filters?: string | undefined;
|
|
801
800
|
isActive?: boolean | undefined;
|
|
801
|
+
filters?: string | undefined;
|
|
802
802
|
}, {
|
|
803
803
|
sort?: string | undefined;
|
|
804
804
|
page?: number | undefined;
|
|
805
805
|
scope?: "seller" | "admin" | undefined;
|
|
806
806
|
pageSize?: number | undefined;
|
|
807
807
|
storeId?: string | undefined;
|
|
808
|
-
filters?: string | undefined;
|
|
809
808
|
isActive?: boolean | undefined;
|
|
809
|
+
filters?: string | undefined;
|
|
810
810
|
}>;
|
|
@@ -111,10 +111,10 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
111
111
|
}, z.ZodTypeAny, "passthrough">;
|
|
112
112
|
userId: string;
|
|
113
113
|
verified: boolean;
|
|
114
|
-
rating: number;
|
|
115
114
|
productId: string;
|
|
116
115
|
productTitle: string;
|
|
117
116
|
userName: string;
|
|
117
|
+
rating: number;
|
|
118
118
|
comment: string;
|
|
119
119
|
helpfulCount: number;
|
|
120
120
|
reportCount: number;
|
|
@@ -126,10 +126,9 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
126
126
|
trimStart?: number | undefined;
|
|
127
127
|
} | undefined;
|
|
128
128
|
storeId?: string | undefined;
|
|
129
|
+
images?: string[] | undefined;
|
|
129
130
|
featured?: boolean | undefined;
|
|
130
131
|
listingType?: string | undefined;
|
|
131
|
-
images?: string[] | undefined;
|
|
132
|
-
storeName?: string | undefined;
|
|
133
132
|
userAvatar?: string | undefined;
|
|
134
133
|
moderatorId?: string | undefined;
|
|
135
134
|
moderatorNote?: string | undefined;
|
|
@@ -140,6 +139,7 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
140
139
|
rejectedAt?: string | Date | z.objectOutputType<{
|
|
141
140
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
142
141
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
142
|
+
storeName?: string | undefined;
|
|
143
143
|
userSlug?: string | undefined;
|
|
144
144
|
hasImages?: boolean | undefined;
|
|
145
145
|
isAnonymous?: boolean | undefined;
|
|
@@ -159,10 +159,10 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
159
159
|
}, z.ZodTypeAny, "passthrough">;
|
|
160
160
|
userId: string;
|
|
161
161
|
verified: boolean;
|
|
162
|
-
rating: number;
|
|
163
162
|
productId: string;
|
|
164
163
|
productTitle: string;
|
|
165
164
|
userName: string;
|
|
165
|
+
rating: number;
|
|
166
166
|
comment: string;
|
|
167
167
|
helpfulCount: number;
|
|
168
168
|
reportCount: number;
|
|
@@ -174,10 +174,9 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
174
174
|
trimStart?: number | undefined;
|
|
175
175
|
} | undefined;
|
|
176
176
|
storeId?: string | undefined;
|
|
177
|
+
images?: string[] | undefined;
|
|
177
178
|
featured?: boolean | undefined;
|
|
178
179
|
listingType?: string | undefined;
|
|
179
|
-
images?: string[] | undefined;
|
|
180
|
-
storeName?: string | undefined;
|
|
181
180
|
userAvatar?: string | undefined;
|
|
182
181
|
moderatorId?: string | undefined;
|
|
183
182
|
moderatorNote?: string | undefined;
|
|
@@ -188,6 +187,7 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
188
187
|
rejectedAt?: string | Date | z.objectInputType<{
|
|
189
188
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
190
189
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
190
|
+
storeName?: string | undefined;
|
|
191
191
|
userSlug?: string | undefined;
|
|
192
192
|
hasImages?: boolean | undefined;
|
|
193
193
|
isAnonymous?: boolean | undefined;
|
|
@@ -293,9 +293,9 @@ export declare const reviewSchema: z.ZodObject<{
|
|
|
293
293
|
status: "pending" | "approved" | "rejected";
|
|
294
294
|
id: string;
|
|
295
295
|
userId: string;
|
|
296
|
-
rating: 3 | 1 | 2 | 4 | 5;
|
|
297
296
|
productId: string;
|
|
298
297
|
userName: string;
|
|
298
|
+
rating: 3 | 1 | 2 | 4 | 5;
|
|
299
299
|
title?: string | undefined;
|
|
300
300
|
video?: {
|
|
301
301
|
url: string;
|
|
@@ -307,26 +307,26 @@ export declare const reviewSchema: z.ZodObject<{
|
|
|
307
307
|
createdAt?: string | undefined;
|
|
308
308
|
updatedAt?: string | undefined;
|
|
309
309
|
verified?: boolean | undefined;
|
|
310
|
-
featured?: boolean | undefined;
|
|
311
|
-
listingType?: string | undefined;
|
|
312
310
|
images?: {
|
|
313
311
|
url: string;
|
|
314
312
|
thumbnailUrl?: string | undefined;
|
|
315
313
|
}[] | undefined;
|
|
316
|
-
|
|
314
|
+
featured?: boolean | undefined;
|
|
315
|
+
listingType?: string | undefined;
|
|
317
316
|
productTitle?: string | undefined;
|
|
318
317
|
userAvatar?: string | undefined;
|
|
319
318
|
comment?: string | undefined;
|
|
320
319
|
helpfulCount?: number | undefined;
|
|
321
320
|
reportCount?: number | undefined;
|
|
321
|
+
storeName?: string | undefined;
|
|
322
322
|
storeSlug?: string | undefined;
|
|
323
323
|
}, {
|
|
324
324
|
status: "pending" | "approved" | "rejected";
|
|
325
325
|
id: string;
|
|
326
326
|
userId: string;
|
|
327
|
-
rating: 3 | 1 | 2 | 4 | 5;
|
|
328
327
|
productId: string;
|
|
329
328
|
userName: string;
|
|
329
|
+
rating: 3 | 1 | 2 | 4 | 5;
|
|
330
330
|
title?: string | undefined;
|
|
331
331
|
video?: {
|
|
332
332
|
url: string;
|
|
@@ -338,18 +338,18 @@ export declare const reviewSchema: z.ZodObject<{
|
|
|
338
338
|
createdAt?: string | undefined;
|
|
339
339
|
updatedAt?: string | undefined;
|
|
340
340
|
verified?: boolean | undefined;
|
|
341
|
-
featured?: boolean | undefined;
|
|
342
|
-
listingType?: string | undefined;
|
|
343
341
|
images?: {
|
|
344
342
|
url: string;
|
|
345
343
|
thumbnailUrl?: string | undefined;
|
|
346
344
|
}[] | undefined;
|
|
347
|
-
|
|
345
|
+
featured?: boolean | undefined;
|
|
346
|
+
listingType?: string | undefined;
|
|
348
347
|
productTitle?: string | undefined;
|
|
349
348
|
userAvatar?: string | undefined;
|
|
350
349
|
comment?: string | undefined;
|
|
351
350
|
helpfulCount?: number | undefined;
|
|
352
351
|
reportCount?: number | undefined;
|
|
352
|
+
storeName?: string | undefined;
|
|
353
353
|
storeSlug?: string | undefined;
|
|
354
354
|
}>;
|
|
355
355
|
/** Base schema for list-query parameters. */
|
|
@@ -371,8 +371,8 @@ export declare const reviewListParamsSchema: z.ZodObject<{
|
|
|
371
371
|
storeId?: string | undefined;
|
|
372
372
|
userId?: string | undefined;
|
|
373
373
|
featured?: boolean | undefined;
|
|
374
|
-
rating?: number | undefined;
|
|
375
374
|
productId?: string | undefined;
|
|
375
|
+
rating?: number | undefined;
|
|
376
376
|
}, {
|
|
377
377
|
sort?: string | undefined;
|
|
378
378
|
status?: "pending" | "approved" | "rejected" | undefined;
|
|
@@ -381,6 +381,6 @@ export declare const reviewListParamsSchema: z.ZodObject<{
|
|
|
381
381
|
storeId?: string | undefined;
|
|
382
382
|
userId?: string | undefined;
|
|
383
383
|
featured?: boolean | undefined;
|
|
384
|
-
rating?: number | undefined;
|
|
385
384
|
productId?: string | undefined;
|
|
385
|
+
rating?: number | undefined;
|
|
386
386
|
}>;
|
|
@@ -26,22 +26,22 @@ export declare const searchProductItemSchema: z.ZodObject<{
|
|
|
26
26
|
slug: string;
|
|
27
27
|
currency?: string | undefined;
|
|
28
28
|
status?: string | undefined;
|
|
29
|
+
price?: number | undefined;
|
|
30
|
+
mainImage?: string | undefined;
|
|
29
31
|
featured?: boolean | undefined;
|
|
30
32
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "bundle" | undefined;
|
|
31
33
|
isPromoted?: boolean | undefined;
|
|
32
|
-
price?: number | undefined;
|
|
33
|
-
mainImage?: string | undefined;
|
|
34
34
|
}, {
|
|
35
35
|
id: string;
|
|
36
36
|
title: string;
|
|
37
37
|
slug: string;
|
|
38
38
|
currency?: string | undefined;
|
|
39
39
|
status?: string | undefined;
|
|
40
|
+
price?: number | undefined;
|
|
41
|
+
mainImage?: string | undefined;
|
|
40
42
|
featured?: boolean | undefined;
|
|
41
43
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "bundle" | undefined;
|
|
42
44
|
isPromoted?: boolean | undefined;
|
|
43
|
-
price?: number | undefined;
|
|
44
|
-
mainImage?: string | undefined;
|
|
45
45
|
}>;
|
|
46
46
|
/**
|
|
47
47
|
* Form/query schema for a search request.
|
|
@@ -14,7 +14,11 @@ import { storeRepository } from "../../stores/repository/store.repository";
|
|
|
14
14
|
import { cartRepository } from "../../cart/repository/cart.repository";
|
|
15
15
|
import { maskOfferForSeller } from "../../../security";
|
|
16
16
|
import { ERROR_MESSAGES, AuthorizationError, ValidationError, NotFoundError, OFFER_ERROR_CODES, } from "../../../errors";
|
|
17
|
+
import { siteSettingsRepository } from "../../admin/repository/site-settings.repository";
|
|
18
|
+
import { canMakeOffer } from "../../../_internal/shared/listing-types/capabilities";
|
|
19
|
+
import { normalizeListingType } from "../../products/utils/listing-type";
|
|
17
20
|
import { OfferStatusValues } from "../schemas";
|
|
21
|
+
import { DEFAULT_MIN_OFFER_PERCENT, minOfferAmount, } from "../../../_internal/shared/features/offers/config";
|
|
18
22
|
/**
|
|
19
23
|
* How long an accepted offer stays claimable at its locked price. Shared by the
|
|
20
24
|
* seller-accept path, the buyer-accepts-counter path, and the expiry sweep so
|
|
@@ -26,14 +30,33 @@ const ERR_NOT_AUTHORISED = "Not authorized";
|
|
|
26
30
|
// --- Buyer: Make an Offer --------------------------------------------------
|
|
27
31
|
export async function makeOffer(userId, userEmail, input) {
|
|
28
32
|
const { productId, offerAmount, buyerNote } = input;
|
|
33
|
+
/**
|
|
34
|
+
* Three independent gates, checked in widening-to-narrowing order. Only
|
|
35
|
+
* `makeOffer` is guarded — switching the site flag off must stop NEW offers
|
|
36
|
+
* without stranding in-flight ones, so accept/decline/counter/withdraw and
|
|
37
|
+
* `checkoutOffer` deliberately stay open.
|
|
38
|
+
*/
|
|
39
|
+
const settings = await siteSettingsRepository.getSingleton().catch(() => null);
|
|
40
|
+
if (settings?.featureFlags?.offers === false) {
|
|
41
|
+
throw new ValidationError(ERROR_MESSAGES.OFFER.DISABLED, {
|
|
42
|
+
code: OFFER_ERROR_CODES.DISABLED,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
const product = await productRepository.findById(productId);
|
|
30
46
|
if (!product)
|
|
31
47
|
throw new NotFoundError(ERROR_MESSAGES.PRODUCT.NOT_FOUND);
|
|
48
|
+
// Some listing types cannot be negotiated at all — an auction already has
|
|
49
|
+
// bidding, a prize-draw sells fixed-price entries. This was never checked, so
|
|
50
|
+
// an offer could be (and in seed data was) attached to an auction, producing
|
|
51
|
+
// a cart line that claims `listingType: "standard"` in the offer lane.
|
|
52
|
+
if (!canMakeOffer(normalizeListingType(product))) {
|
|
53
|
+
throw new ValidationError("Offers aren't available for this kind of listing.");
|
|
54
|
+
}
|
|
32
55
|
if (!product.allowOffers)
|
|
33
56
|
throw new ValidationError("This product does not accept offers.");
|
|
34
|
-
const minAllowed =
|
|
57
|
+
const minAllowed = minOfferAmount(product.price, product.minOfferPercent);
|
|
35
58
|
if (offerAmount < minAllowed)
|
|
36
|
-
throw new ValidationError(`Minimum offer is ₹${minAllowed} (${product.minOfferPercent ??
|
|
59
|
+
throw new ValidationError(`Minimum offer is ₹${minAllowed} (${product.minOfferPercent ?? DEFAULT_MIN_OFFER_PERCENT}% of listing price).`);
|
|
37
60
|
if (offerAmount >= product.price)
|
|
38
61
|
throw new ValidationError("Your offer must be below the listed price. Use Add to Cart instead.");
|
|
39
62
|
const offerCount = await offerRepository.countByBuyerAndProduct(userId, productId, product.updatedAt);
|
|
@@ -14,6 +14,8 @@ import { ROUTES } from "../../../constants/index";
|
|
|
14
14
|
import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
|
|
15
15
|
import { DataListingView } from "../../admin/components/DataListingView";
|
|
16
16
|
import { SELLER_BULK_ACTIONS, ROW_ACTION_META } from "../../products/constants/action-defs";
|
|
17
|
+
import { useAvailabilityScope } from "../../products/hooks/useAvailabilityScope";
|
|
18
|
+
const LISTING_TYPES = ["art"];
|
|
17
19
|
const COLUMNS = [
|
|
18
20
|
{ key: "title", header: "Listing", render: (row) => _jsx(Text, { size: "sm", weight: "medium", children: row.title }) },
|
|
19
21
|
{ key: "price", header: "Price", render: (row) => _jsx(Text, { className: "tabular-nums", size: "sm", children: row.price }) },
|
|
@@ -57,6 +59,7 @@ export function SellerArtView({ onCreateClick, onEditClick, onDelete, onBulkDele
|
|
|
57
59
|
else
|
|
58
60
|
window.location.href = String(ROUTES.STORE.ART_NEW);
|
|
59
61
|
}, [onCreateClick]);
|
|
62
|
+
const scope = useAvailabilityScope(LISTING_TYPES);
|
|
60
63
|
const config = {
|
|
61
64
|
portal: "seller",
|
|
62
65
|
title: "Art",
|
|
@@ -87,6 +90,8 @@ export function SellerArtView({ onCreateClick, onEditClick, onDelete, onBulkDele
|
|
|
87
90
|
}),
|
|
88
91
|
getTotal: (response, mappedRows) => typeof response.meta?.total === "number" ? response.meta.total : mappedRows.length,
|
|
89
92
|
buildFilters: () => "listingType==art",
|
|
93
|
+
buildExtraParams: () => scope.extraParams,
|
|
94
|
+
renderAboveContent: scope.renderAboveContent,
|
|
90
95
|
primaryAction: { label: "New Art Print", onClick: () => handleCreate() },
|
|
91
96
|
// Mirrors the "Edit" row action below so table rows and cards both navigate on click.
|
|
92
97
|
onRowClick: (row) => handleEdit(row.id),
|
|
@@ -4,23 +4,22 @@ import { sieveFilter, SIEVE_OP } from "@mohasinac/appkit/client";
|
|
|
4
4
|
import { sortBy } from "@mohasinac/appkit/client";
|
|
5
5
|
import React, { useState, useCallback } from "react";
|
|
6
6
|
import { useEntityDelete } from "../../../react/hooks/useEntityDelete";
|
|
7
|
-
import { useUrlTable } from "../../../react/hooks/useUrlTable";
|
|
8
7
|
import { ConfirmDeleteModal, FilterChipGroup, ListingLayout, RowActionMenu } from "../../../ui";
|
|
9
8
|
import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
|
|
10
|
-
import { TABLE_KEYS } from "../../../constants/table-keys";
|
|
11
9
|
import { SELLER_AUCTION_STATUS_TABS } from "../../admin/constants/filter-tabs";
|
|
12
10
|
import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
|
|
13
11
|
import { ROUTES } from "../../../constants";
|
|
14
12
|
import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
|
|
15
13
|
import { DataListingView } from "../../admin/components/DataListingView";
|
|
16
14
|
import { SELLER_BULK_ACTIONS, ROW_ACTION_META } from "../../products/constants/action-defs";
|
|
15
|
+
import { useAvailabilityScope } from "../../products/hooks/useAvailabilityScope";
|
|
16
|
+
const AUCTION_TYPES = ["auction"];
|
|
17
17
|
export function SellerAuctionsView({ children, onEditClick, onDelete, onBulkDelete, ...props }) {
|
|
18
18
|
// Independent of DataListingView's own internal useUrlTable() — both read
|
|
19
19
|
// and write the same URL, useUrlTable has no local state, so they stay in
|
|
20
20
|
// sync (same pattern SellerProductsView already uses for its "Show sold"
|
|
21
21
|
// toggle).
|
|
22
|
-
const
|
|
23
|
-
const showEnded = toggleTable.get(TABLE_KEYS.SHOW_ENDED) === "true";
|
|
22
|
+
const scope = useAvailabilityScope(AUCTION_TYPES);
|
|
24
23
|
const [deleteTargetId, setDeleteTargetId] = useState(null);
|
|
25
24
|
const { deletingId, handleDelete: performDelete } = useEntityDelete({
|
|
26
25
|
endpoint: SELLER_ENDPOINTS.PRODUCT_BY_ID,
|
|
@@ -46,7 +45,7 @@ export function SellerAuctionsView({ children, onEditClick, onDelete, onBulkDele
|
|
|
46
45
|
title: "Auctions",
|
|
47
46
|
searchPlaceholder: "Search auctions by product name",
|
|
48
47
|
emptyLabel: "No auctions found",
|
|
49
|
-
filterKeys: ["status"
|
|
48
|
+
filterKeys: ["status"],
|
|
50
49
|
defaultSort: sortBy("auctionEndDate", "ASC"),
|
|
51
50
|
queryKey: ["seller", "auctions", "listing"],
|
|
52
51
|
endpoint: SELLER_ENDPOINTS.AUCTIONS,
|
|
@@ -73,21 +72,20 @@ export function SellerAuctionsView({ children, onEditClick, onDelete, onBulkDele
|
|
|
73
72
|
buildFilters: (state) => {
|
|
74
73
|
// Previously missing entirely — the seller Auctions tab silently
|
|
75
74
|
// listed the entire seller catalog, not just auctions.
|
|
75
|
+
//
|
|
76
|
+
// The hide-ended clause that used to live here is gone: it hard-coded
|
|
77
|
+
// `auctionEndDate >= now`, which is an INEQUALITY pushed straight into
|
|
78
|
+
// Firestore alongside whichever sort the toolbar happened to be on —
|
|
79
|
+
// the FAILED_PRECONDITION shape of Root Cause #59. The scope param now
|
|
80
|
+
// carries it, and `listPublicProducts` decides whether it can be pushed
|
|
81
|
+
// down or has to be applied over a bounded fetch.
|
|
76
82
|
const parts = ["listingType==auction"];
|
|
77
83
|
if (state.status && state.status !== "All")
|
|
78
84
|
parts.push(sieveFilter("status", SIEVE_OP.EQ, state.status));
|
|
79
|
-
if (state[TABLE_KEYS.SHOW_ENDED] !== "true") {
|
|
80
|
-
parts.push(sieveFilter("auctionEndDate", SIEVE_OP.GTE, new Date().toISOString()));
|
|
81
|
-
}
|
|
82
85
|
return parts.join(",");
|
|
83
86
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
label: "Show ended",
|
|
87
|
-
active: showEnded,
|
|
88
|
-
onChange: (next) => toggleTable.set(TABLE_KEYS.SHOW_ENDED, next ? "true" : ""),
|
|
89
|
-
},
|
|
90
|
-
],
|
|
87
|
+
buildExtraParams: () => scope.extraParams,
|
|
88
|
+
renderAboveContent: scope.renderAboveContent,
|
|
91
89
|
// Rule #7: bulk-action array sourced from the SELLER_BULK_ACTIONS preset.
|
|
92
90
|
buildBulkActions: onBulkDelete
|
|
93
91
|
? (selection) => SELLER_BULK_ACTIONS.auctions.map((id) => ({
|