@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
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export { DropdownTrigger } from "./ui/index";
|
|
|
45
45
|
export { FormFieldSpan } from "./ui/index";
|
|
46
46
|
export { FormGrid } from "./ui/index";
|
|
47
47
|
export { FormGroup } from "./ui/index";
|
|
48
|
-
export type { FormShellStep, FormShellContextValue } from "./ui/index";
|
|
48
|
+
export type { FormShellStep, FormShellNav, FormShellContextValue } from "./ui/index";
|
|
49
49
|
export type { FieldInputProps } from "./ui/index";
|
|
50
50
|
export { FieldInput } from "./ui/index";
|
|
51
51
|
export type { FieldSelectProps } from "./ui/index";
|
|
@@ -966,7 +966,6 @@ export { ProfileView } from "./features/account/index";
|
|
|
966
966
|
export { UserAccountHubView } from "./features/account/index";
|
|
967
967
|
export { UserAddressesView } from "./features/account/index";
|
|
968
968
|
export { UserNotificationsView } from "./features/account/index";
|
|
969
|
-
export { UserOffersView } from "./features/account/index";
|
|
970
969
|
export { UserOffersPanel } from "./features/account/index";
|
|
971
970
|
export type { UserOffersPanelProps } from "./features/account/index";
|
|
972
971
|
export { UserOrderTrackView } from "./features/account/index";
|
|
@@ -1052,8 +1051,6 @@ export type { UserNotification } from "./features/account/index";
|
|
|
1052
1051
|
export type { UserNotificationsViewLabels } from "./features/account/index";
|
|
1053
1052
|
export type { UserNotificationsViewProps } from "./features/account/index";
|
|
1054
1053
|
export type { UserOffer } from "./features/account/index";
|
|
1055
|
-
export type { UserOffersViewLabels } from "./features/account/index";
|
|
1056
|
-
export type { UserOffersViewProps } from "./features/account/index";
|
|
1057
1054
|
export type { UserOrder } from "./features/account/index";
|
|
1058
1055
|
export type { UserOrderTrackViewLabels } from "./features/account/index";
|
|
1059
1056
|
export type { UserOrderTrackViewProps } from "./features/account/index";
|
|
@@ -1075,6 +1072,7 @@ export { AdminAnalyticsView } from "./features/admin/index";
|
|
|
1075
1072
|
export { AdminAdsView } from "./features/admin/index";
|
|
1076
1073
|
export { AdminAdEditorView } from "./features/admin/index";
|
|
1077
1074
|
export { AdminBidsView } from "./features/admin/index";
|
|
1075
|
+
export { AdminOffersView } from "./features/admin/index";
|
|
1078
1076
|
export { AdminBlogView } from "./features/admin/index";
|
|
1079
1077
|
export { AdminBlogEditorView } from "./features/admin/index";
|
|
1080
1078
|
export type { AdminBlogEditorViewProps } from "./features/admin/index";
|
|
@@ -1236,6 +1234,7 @@ export type { AdminAnalyticsViewProps } from "./features/admin/index";
|
|
|
1236
1234
|
export type { AdminAdsViewProps } from "./features/admin/index";
|
|
1237
1235
|
export type { AdminAdEditorViewProps } from "./features/admin/index";
|
|
1238
1236
|
export type { AdminBidsViewProps } from "./features/admin/index";
|
|
1237
|
+
export type { AdminOffersViewProps } from "./features/admin/index";
|
|
1239
1238
|
export type { AdminBlogViewProps } from "./features/admin/index";
|
|
1240
1239
|
export type { AdminCarouselViewProps } from "./features/admin/index";
|
|
1241
1240
|
export type { AdminCategoriesViewProps } from "./features/admin/index";
|
|
@@ -2280,6 +2279,8 @@ export type { OrderDocument } from "./features/orders/index";
|
|
|
2280
2279
|
export type { OrderRefundEvent, RefundType } from "./features/orders/schemas/firestore";
|
|
2281
2280
|
export { MANUAL_PAYMENT_METHODS, isManualPaymentMethod, PAYMENT_REVIEW_QUEUE_MODES, isPaymentReviewQueueMode, PAYMENT_REVIEW_QUEUE_SCAN_LIMIT, } from "./features/orders/constants/payment-window";
|
|
2282
2281
|
export type { PaymentReviewQueueMode } from "./features/orders/constants/payment-window";
|
|
2282
|
+
export { ORDER_SCOPE_VALUES, ORDER_SCOPE_TABS, isOrderScope, statusesForScope, mergeOrderScopeFilter, } from "./features/orders/constants/order-scope";
|
|
2283
|
+
export type { OrderScope } from "./features/orders/constants/order-scope";
|
|
2283
2284
|
export type { OrderDocumentItem } from "./features/orders/index";
|
|
2284
2285
|
export type { OrderFilterVariant } from "./features/orders/index";
|
|
2285
2286
|
export type { OrderFiltersProps } from "./features/orders/index";
|
|
@@ -2392,7 +2393,6 @@ export type { BundleBuyNowCtaProps } from "./features/categories/components/Bund
|
|
|
2392
2393
|
export { BidHistory } from "./features/products/index";
|
|
2393
2394
|
export { DEFAULT_PRODUCT_DATA } from "./features/products/index";
|
|
2394
2395
|
export { InteractiveProductCard } from "./features/products/index";
|
|
2395
|
-
export { MakeOfferForm } from "./features/products/index";
|
|
2396
2396
|
export { ACTION_ID, ACTION_META, DETAIL_ACTIONS, MOBILE_PRIMARY_ACTIONS, LISTING_BULK_ACTIONS } from "./features/products/index";
|
|
2397
2397
|
export type { ActionId, ActionMeta, ActionVariant } from "./features/products/index";
|
|
2398
2398
|
export { ROW_ACTION_ID, ROW_ACTION_META, ADMIN_ROW_ACTIONS, SELLER_ROW_ACTIONS, USER_ROW_ACTIONS, ADMIN_BULK_ACTIONS, SELLER_BULK_ACTIONS } from "./features/products/index";
|
|
@@ -2464,7 +2464,10 @@ export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLa
|
|
|
2464
2464
|
export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers";
|
|
2465
2465
|
export { computeCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeWhatsAppNotifyFee, computeGiftWrapFee, computeShipmentProtectionFee, calculateGst, } from "./_internal/shared/fees/calculator";
|
|
2466
2466
|
export type { FeeCommissionRates, CheckoutFees, PayoutDeduction, CodHandlingFeeRates, WhatsAppNotifyFeeRates, GiftWrapFeeRates, ShipmentProtectionFeeRates, GstBreakdown, } from "./_internal/shared/fees/calculator";
|
|
2467
|
-
export { checkEmiEligibility, computeEmiSchedule } from "./_internal/shared/features/emi/schedule";
|
|
2467
|
+
export { checkEmiEligibility, computeEmiSchedule, computeBuyerEmiQuote } from "./_internal/shared/features/emi/schedule";
|
|
2468
|
+
export type { BuyerEmiQuote } from "./_internal/shared/features/emi/schedule";
|
|
2469
|
+
export { toBuyerFacingFees, toBuyerEmiSettings, } from "./_internal/shared/features/site-settings/fees";
|
|
2470
|
+
export type { BuyerFacingFees, BuyerEmiSettings, } from "./_internal/shared/features/site-settings/fees";
|
|
2468
2471
|
export type { EmiSettings, EmiIneligibleReason, EmiEligibility, EmiInstallmentPlan, EmiScheduleResult, } from "./_internal/shared/features/emi/schedule";
|
|
2469
2472
|
export { isAdminUser, isSellerUser, isModeratorUser, isEmployeeUser, isBuyerUser, isEffectiveAdminUser, } from "./features/auth/role-predicates";
|
|
2470
2473
|
export { sanitizeProductForPublic, sanitizeProductsForPublic } from "./features/products/index";
|
|
@@ -2484,7 +2487,6 @@ export type { BidHistoryEntry } from "./features/products/index";
|
|
|
2484
2487
|
export type { BidHistoryProps } from "./features/products/index";
|
|
2485
2488
|
export type { InteractiveProductCardProps } from "./features/products/index";
|
|
2486
2489
|
export type { ListingType } from "./features/products/index";
|
|
2487
|
-
export type { MakeOfferFormProps } from "./features/products/index";
|
|
2488
2490
|
export type { PlaceBidFormProps } from "./features/products/index";
|
|
2489
2491
|
export type { PreOrderDetailViewProps } from "./features/products/index";
|
|
2490
2492
|
export type { ProductAdminUpdateInput } from "./features/products/index";
|
|
@@ -2721,8 +2723,6 @@ export { SellerGroupedListingsView as StoreGroupedListingsView } from "./feature
|
|
|
2721
2723
|
export { SellerAnalyticsAlertsView } from "./features/seller/index";
|
|
2722
2724
|
export type { SellerAnalyticsAlertsViewProps } from "./features/seller/index";
|
|
2723
2725
|
export { SellerAnalyticsAlertsView as StoreAnalyticsAlertsView } from "./features/seller/index";
|
|
2724
|
-
export { SellerOffersPanel } from "./features/seller/index";
|
|
2725
|
-
export type { SellerOffersPanelProps, SellerOfferAction } from "./features/seller/index";
|
|
2726
2726
|
export { SellerOrdersView } from "./features/seller/index";
|
|
2727
2727
|
export { SellerOrderDetailPanel } from "./features/seller/index";
|
|
2728
2728
|
export { SellerPayoutHistoryTable } from "./features/seller/index";
|
|
@@ -2858,7 +2858,6 @@ export { requestPayout } from "./features/seller/server";
|
|
|
2858
2858
|
export { respondToOffer } from "./features/seller/server";
|
|
2859
2859
|
export { sellerCouponsGET } from "./features/seller/server";
|
|
2860
2860
|
export { sellerDeleteProduct } from "./features/seller/server";
|
|
2861
|
-
export { sellerOffersGET } from "./features/seller/server";
|
|
2862
2861
|
export { sellerProductsGET } from "./features/seller/server";
|
|
2863
2862
|
export { sellerStoreGET } from "./features/seller/server";
|
|
2864
2863
|
export { sellerUpdateProduct } from "./features/seller/server";
|
|
@@ -3196,6 +3195,10 @@ export { QuickFormDrawer } from "./features/shell/index";
|
|
|
3196
3195
|
export type { QuickFieldType, QuickFieldDef, QuickFormDrawerProps } from "./features/shell/index";
|
|
3197
3196
|
export { StepForm, StepFormActions, StepIndicator } from "./features/shell/index";
|
|
3198
3197
|
export type { StepDef, StepFormProps, StepFormActionsProps } from "./features/shell/index";
|
|
3198
|
+
export { SectionForm, useSectionFormNav, orderSections, buildFieldToSectionIndex, sectionAnchorId, } from "./features/shell/index";
|
|
3199
|
+
export type { SectionDef, SectionFormProps, UseSectionFormNavResult } from "./features/shell/index";
|
|
3200
|
+
export { deriveQuickFields, deriveQuickFieldNames, allDefinitionFields, applyDerive, assertNoDeriveCollision, humaniseFieldName, } from "./features/shell/index";
|
|
3201
|
+
export type { EntityFormDefinition } from "./features/shell/index";
|
|
3199
3202
|
export { renderProductOgImage } from "./_internal/server/features/products/og";
|
|
3200
3203
|
export type { ProductOgData } from "./_internal/server/features/products/og";
|
|
3201
3204
|
export { renderAuctionOgImage } from "./_internal/server/features/auctions/og";
|
package/dist/index.js
CHANGED
|
@@ -1964,8 +1964,6 @@ export { UserAddressesView } from "./features/account/index";
|
|
|
1964
1964
|
// UserNotificationsView - Component for user notifications view.
|
|
1965
1965
|
export { UserNotificationsView } from "./features/account/index";
|
|
1966
1966
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
1967
|
-
// UserOffersView - Component for user offers view.
|
|
1968
|
-
export { UserOffersView } from "./features/account/index";
|
|
1969
1967
|
// [CLIENT]-Runs in browser only â€" interactive buyer offers panel with accept/withdraw actions.
|
|
1970
1968
|
// UserOffersPanel - Interactive buyer offers panel.
|
|
1971
1969
|
export { UserOffersPanel } from "./features/account/index";
|
|
@@ -2085,6 +2083,8 @@ export { AdminAdEditorView } from "./features/admin/index";
|
|
|
2085
2083
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2086
2084
|
// AdminBidsView - Component for admin bids view.
|
|
2087
2085
|
export { AdminBidsView } from "./features/admin/index";
|
|
2086
|
+
// AdminOffersView - Component for admin offers view.
|
|
2087
|
+
export { AdminOffersView } from "./features/admin/index";
|
|
2088
2088
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2089
2089
|
// AdminBlogView - Component for admin blog view.
|
|
2090
2090
|
export { AdminBlogView } from "./features/admin/index";
|
|
@@ -4170,6 +4170,7 @@ export { useTrackOrder } from "./features/orders/index";
|
|
|
4170
4170
|
// queue discriminator. Pure data + predicates — no firebase-admin in the
|
|
4171
4171
|
// import chain, so safe on the main barrel (see "appkit Export Rules").
|
|
4172
4172
|
export { MANUAL_PAYMENT_METHODS, isManualPaymentMethod, PAYMENT_REVIEW_QUEUE_MODES, isPaymentReviewQueueMode, PAYMENT_REVIEW_QUEUE_SCAN_LIMIT, } from "./features/orders/constants/payment-window";
|
|
4173
|
+
export { ORDER_SCOPE_VALUES, ORDER_SCOPE_TABS, isOrderScope, statusesForScope, mergeOrderScopeFilter, } from "./features/orders/constants/order-scope";
|
|
4173
4174
|
// ./features/orders/server
|
|
4174
4175
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
4175
4176
|
// cancelOrderForUser - Shared export for cancel order for user.
|
|
@@ -4334,8 +4335,6 @@ export { DEFAULT_PRODUCT_DATA } from "./features/products/index";
|
|
|
4334
4335
|
// InteractiveProductCard - Component for interactive product card.
|
|
4335
4336
|
export { InteractiveProductCard } from "./features/products/index";
|
|
4336
4337
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4337
|
-
// MakeOfferForm - Component for make offer form.
|
|
4338
|
-
export { MakeOfferForm } from "./features/products/index";
|
|
4339
4338
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4340
4339
|
// ACTION_ID / ACTION_META / DETAIL_ACTIONS / MOBILE_PRIMARY_ACTIONS / LISTING_BULK_ACTIONS - Single source of truth for all product-type action constants.
|
|
4341
4340
|
// Product / listing actions
|
|
@@ -4474,7 +4473,10 @@ export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers";
|
|
|
4474
4473
|
// Shared fee calculator — platform/gateway/GST/COD handling/WhatsApp-addon fee math (pure, client-safe).
|
|
4475
4474
|
export { computeCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeWhatsAppNotifyFee, computeGiftWrapFee, computeShipmentProtectionFee, calculateGst, } from "./_internal/shared/fees/calculator";
|
|
4476
4475
|
// EMI eligibility + schedule computation (pure, client-safe — used for checkout quotes).
|
|
4477
|
-
export { checkEmiEligibility, computeEmiSchedule } from "./_internal/shared/features/emi/schedule";
|
|
4476
|
+
export { checkEmiEligibility, computeEmiSchedule, computeBuyerEmiQuote } from "./_internal/shared/features/emi/schedule";
|
|
4477
|
+
// Buyer-facing projections of siteSettings.commissions / .emi — the single
|
|
4478
|
+
// definition of "safe to send to a browser" for fee data. See fees.ts header.
|
|
4479
|
+
export { toBuyerFacingFees, toBuyerEmiSettings, } from "./_internal/shared/features/site-settings/fees";
|
|
4478
4480
|
// User-role predicates â€" SB-UNI-E 2026-05-13.
|
|
4479
4481
|
export { isAdminUser, isSellerUser, isModeratorUser, isEmployeeUser, isBuyerUser, isEffectiveAdminUser, } from "./features/auth/role-predicates";
|
|
4480
4482
|
// [SERVER-ONLY]-Safe in browser but intended for server routes.
|
|
@@ -4915,8 +4917,6 @@ export { SellerGroupedListingsView as StoreGroupedListingsView } from "./feature
|
|
|
4915
4917
|
export { SellerAnalyticsAlertsView } from "./features/seller/index";
|
|
4916
4918
|
export { SellerAnalyticsAlertsView as StoreAnalyticsAlertsView } from "./features/seller/index";
|
|
4917
4919
|
// [CLIENT]-Runs in browser only â€" uses useState/useEffect/fetch.
|
|
4918
|
-
// SellerOffersPanel - Interactive panel with accept/decline/counter actions for seller offers.
|
|
4919
|
-
export { SellerOffersPanel } from "./features/seller/index";
|
|
4920
4920
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4921
4921
|
// SellerOrdersView - Component for seller orders view.
|
|
4922
4922
|
export { SellerOrdersView } from "./features/seller/index";
|
|
@@ -5132,8 +5132,6 @@ export { sellerCouponsGET } from "./features/seller/server";
|
|
|
5132
5132
|
// sellerDeleteProduct - Shared export for seller delete product.
|
|
5133
5133
|
export { sellerDeleteProduct } from "./features/seller/server";
|
|
5134
5134
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
5135
|
-
// sellerOffersGET - Shared export for seller offers get.
|
|
5136
|
-
export { sellerOffersGET } from "./features/seller/server";
|
|
5137
5135
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
5138
5136
|
// sellerProductsGET - Shared export for seller products get.
|
|
5139
5137
|
export { sellerProductsGET } from "./features/seller/server";
|
|
@@ -5602,6 +5600,13 @@ export { CommandPalette, useCommandPaletteHotkey } from "./features/shell/index"
|
|
|
5602
5600
|
export { QuickFormDrawer } from "./features/shell/index";
|
|
5603
5601
|
// [CLIENT] StepForm â€" multi-step wizard with step indicator, prev/next, localStorage persistence.
|
|
5604
5602
|
export { StepForm, StepFormActions, StepIndicator } from "./features/shell/index";
|
|
5603
|
+
// [CLIENT] SectionForm — collapsible-section form engine replacing StepForm.
|
|
5604
|
+
// Required section first and always open, one shared submit at the bottom, no
|
|
5605
|
+
// per-section gate blocking a later section.
|
|
5606
|
+
export { SectionForm, useSectionFormNav, orderSections, buildFieldToSectionIndex, sectionAnchorId, } from "./features/shell/index";
|
|
5607
|
+
// [CLIENT] EntityFormDefinition — one definition per entity, rendered as both a
|
|
5608
|
+
// self-submitting quick drawer and a full page, so the two cannot drift.
|
|
5609
|
+
export { deriveQuickFields, deriveQuickFieldNames, allDefinitionFields, applyDerive, assertNoDeriveCollision, humaniseFieldName, } from "./features/shell/index";
|
|
5605
5610
|
// OG image renderers (server-side JSX, used with next/og ImageResponse)
|
|
5606
5611
|
export { renderProductOgImage } from "./_internal/server/features/products/og";
|
|
5607
5612
|
export { renderAuctionOgImage } from "./_internal/server/features/auctions/og";
|
|
@@ -64,6 +64,8 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
64
64
|
readonly HELP_ACCOUNT: "/help/account";
|
|
65
65
|
readonly TERMS: "/terms";
|
|
66
66
|
readonly PRIVACY: "/privacy";
|
|
67
|
+
readonly ETHICS: "/ethics";
|
|
68
|
+
readonly CODE_OF_CONDUCT: "/code-of-conduct";
|
|
67
69
|
readonly SECURITY: "/security";
|
|
68
70
|
readonly TRACK_ORDER: "/track";
|
|
69
71
|
readonly SELLER_GUIDE: "/seller-guide";
|
|
@@ -293,6 +295,7 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
293
295
|
readonly ORDERS: "/admin/orders";
|
|
294
296
|
readonly ORDER_DETAIL: (id: string) => string;
|
|
295
297
|
readonly BIDS: "/admin/bids";
|
|
298
|
+
readonly OFFERS: "/admin/offers";
|
|
296
299
|
readonly BLOG: "/admin/blog";
|
|
297
300
|
readonly BLOG_NEW: "/admin/blog/new";
|
|
298
301
|
readonly BLOG_EDIT: (id: string) => string;
|
|
@@ -436,6 +439,8 @@ export declare const ROUTES: {
|
|
|
436
439
|
readonly HELP_ACCOUNT: "/help/account";
|
|
437
440
|
readonly TERMS: "/terms";
|
|
438
441
|
readonly PRIVACY: "/privacy";
|
|
442
|
+
readonly ETHICS: "/ethics";
|
|
443
|
+
readonly CODE_OF_CONDUCT: "/code-of-conduct";
|
|
439
444
|
readonly SECURITY: "/security";
|
|
440
445
|
readonly TRACK_ORDER: "/track";
|
|
441
446
|
readonly SELLER_GUIDE: "/seller-guide";
|
|
@@ -665,6 +670,7 @@ export declare const ROUTES: {
|
|
|
665
670
|
readonly ORDERS: "/admin/orders";
|
|
666
671
|
readonly ORDER_DETAIL: (id: string) => string;
|
|
667
672
|
readonly BIDS: "/admin/bids";
|
|
673
|
+
readonly OFFERS: "/admin/offers";
|
|
668
674
|
readonly BLOG: "/admin/blog";
|
|
669
675
|
readonly BLOG_NEW: "/admin/blog/new";
|
|
670
676
|
readonly BLOG_EDIT: (id: string) => string;
|
|
@@ -840,6 +846,6 @@ export declare const SELLER_ROUTES: {
|
|
|
840
846
|
readonly GUIDE_SETTINGS: "/store/guide/settings";
|
|
841
847
|
readonly GUIDE_WHATSAPP: "/store/guide/whatsapp";
|
|
842
848
|
};
|
|
843
|
-
export declare const PUBLIC_ROUTES: readonly ["/", string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "/unauthorized", "/auth/login", "/auth/register", "/auth/forgot-password", "/auth/reset-password", "/auth/verify-email"];
|
|
849
|
+
export declare const PUBLIC_ROUTES: readonly ["/", string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, "/unauthorized", "/auth/login", "/auth/register", "/auth/forgot-password", "/auth/reset-password", "/auth/verify-email"];
|
|
844
850
|
export declare const PROTECTED_ROUTES: readonly [string, string, string, string, string, string, string];
|
|
845
851
|
export declare const AUTH_ROUTES: readonly ["/auth/login", "/auth/register"];
|
|
@@ -57,6 +57,8 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
57
57
|
HELP_ACCOUNT: "/help/account",
|
|
58
58
|
TERMS: "/terms",
|
|
59
59
|
PRIVACY: "/privacy",
|
|
60
|
+
ETHICS: "/ethics",
|
|
61
|
+
CODE_OF_CONDUCT: "/code-of-conduct",
|
|
60
62
|
SECURITY: "/security",
|
|
61
63
|
TRACK_ORDER: "/track",
|
|
62
64
|
SELLER_GUIDE: "/seller-guide",
|
|
@@ -303,6 +305,7 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
303
305
|
ORDERS: "/admin/orders",
|
|
304
306
|
ORDER_DETAIL: (id) => `/admin/orders/${id}/view`,
|
|
305
307
|
BIDS: "/admin/bids",
|
|
308
|
+
OFFERS: "/admin/offers",
|
|
306
309
|
BLOG: "/admin/blog",
|
|
307
310
|
BLOG_NEW: "/admin/blog/new",
|
|
308
311
|
BLOG_EDIT: (id) => `/admin/blog/${id}/edit`,
|
|
@@ -449,6 +452,8 @@ export const PUBLIC_ROUTES = [
|
|
|
449
452
|
ROUTES.PUBLIC.HELP,
|
|
450
453
|
ROUTES.PUBLIC.TERMS,
|
|
451
454
|
ROUTES.PUBLIC.PRIVACY,
|
|
455
|
+
ROUTES.PUBLIC.ETHICS,
|
|
456
|
+
ROUTES.PUBLIC.CODE_OF_CONDUCT,
|
|
452
457
|
ROUTES.ERRORS.UNAUTHORIZED,
|
|
453
458
|
ROUTES.AUTH.LOGIN,
|
|
454
459
|
ROUTES.AUTH.REGISTER,
|
|
@@ -21,6 +21,36 @@ export declare abstract class BaseRepository<T extends DocumentData> {
|
|
|
21
21
|
protected sieveQuery<TResult extends DocumentData = T>(model: SieveModel, fields: FirebaseSieveFields, options?: FirebaseSieveOptions & {
|
|
22
22
|
baseQuery?: CollectionReference | Query;
|
|
23
23
|
}): Promise<FirebaseSieveResult<TResult>>;
|
|
24
|
+
/**
|
|
25
|
+
* Count matches for a Sieve model without reading any documents.
|
|
26
|
+
*
|
|
27
|
+
* Prefer this over `sieveQuery({ pageSize: 1 }).total` whenever only the
|
|
28
|
+
* number is wanted — that idiom pays for a wasted document read per call,
|
|
29
|
+
* which matters once a surface issues one query per union member.
|
|
30
|
+
*/
|
|
31
|
+
protected sieveCount(model: SieveModel, fields: FirebaseSieveFields, options?: FirebaseSieveOptions & {
|
|
32
|
+
baseQuery?: CollectionReference | Query;
|
|
33
|
+
}): Promise<number>;
|
|
34
|
+
/**
|
|
35
|
+
* How many documents match each value of a discriminator field, given a
|
|
36
|
+
* shared base filter — the "N rows of each type" behind every faceted tab
|
|
37
|
+
* bar and filter chip group.
|
|
38
|
+
*
|
|
39
|
+
* One `.count()` aggregation per value, all in parallel. A value whose query
|
|
40
|
+
* fails maps to `undefined`, NOT to 0: callers hide a facet at zero, and a
|
|
41
|
+
* swallowed failure that reads as "none of these exist" would hide a facet
|
|
42
|
+
* holding real rows (Root Cause #59). `undefined` means "unknown", and every
|
|
43
|
+
* caller is expected to keep the facet visible in that case.
|
|
44
|
+
*
|
|
45
|
+
* `values` may contain a pipe-joined OR-group (`"art|stickers"`) — it is
|
|
46
|
+
* passed through untouched so the enhanced adapter upgrades it to a
|
|
47
|
+
* Firestore `in` query, exactly as it does on the list path.
|
|
48
|
+
*/
|
|
49
|
+
protected facetCounts(field: string, values: readonly string[], fields: FirebaseSieveFields, options?: FirebaseSieveOptions & {
|
|
50
|
+
baseQuery?: CollectionReference | Query;
|
|
51
|
+
/** Sieve clauses ANDed into every count (e.g. `status==published`). */
|
|
52
|
+
baseFilters?: string;
|
|
53
|
+
}): Promise<Record<string, number | undefined>>;
|
|
24
54
|
findByIdInTx(tx: Transaction, id: string): Promise<T | null>;
|
|
25
55
|
findByIdOrFailInTx(tx: Transaction, id: string): Promise<T>;
|
|
26
56
|
createInTx(tx: Transaction, data: Partial<T> | FirestoreDocument): DocumentReference;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeError } from "../../errors/normalize";
|
|
2
2
|
import { DatabaseError, NotFoundError } from "../../errors";
|
|
3
3
|
import { serverLogger } from "../../monitoring";
|
|
4
|
-
import { applySieveToFirestore, } from "./sieve";
|
|
4
|
+
import { applySieveToFirestore, countSieveMatches, } from "./sieve";
|
|
5
5
|
import { deserializeTimestamps, prepareForFirestore } from "./helpers";
|
|
6
6
|
import { getAdminDb } from "./admin";
|
|
7
7
|
export class BaseRepository {
|
|
@@ -174,6 +174,55 @@ export class BaseRepository {
|
|
|
174
174
|
options: sieveOptions,
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Count matches for a Sieve model without reading any documents.
|
|
179
|
+
*
|
|
180
|
+
* Prefer this over `sieveQuery({ pageSize: 1 }).total` whenever only the
|
|
181
|
+
* number is wanted — that idiom pays for a wasted document read per call,
|
|
182
|
+
* which matters once a surface issues one query per union member.
|
|
183
|
+
*/
|
|
184
|
+
async sieveCount(model, fields, options) {
|
|
185
|
+
const { baseQuery, ...sieveOptions } = options ?? {};
|
|
186
|
+
return countSieveMatches({
|
|
187
|
+
baseQuery: baseQuery ?? this.getCollection(),
|
|
188
|
+
model,
|
|
189
|
+
fields,
|
|
190
|
+
options: sieveOptions,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* How many documents match each value of a discriminator field, given a
|
|
195
|
+
* shared base filter — the "N rows of each type" behind every faceted tab
|
|
196
|
+
* bar and filter chip group.
|
|
197
|
+
*
|
|
198
|
+
* One `.count()` aggregation per value, all in parallel. A value whose query
|
|
199
|
+
* fails maps to `undefined`, NOT to 0: callers hide a facet at zero, and a
|
|
200
|
+
* swallowed failure that reads as "none of these exist" would hide a facet
|
|
201
|
+
* holding real rows (Root Cause #59). `undefined` means "unknown", and every
|
|
202
|
+
* caller is expected to keep the facet visible in that case.
|
|
203
|
+
*
|
|
204
|
+
* `values` may contain a pipe-joined OR-group (`"art|stickers"`) — it is
|
|
205
|
+
* passed through untouched so the enhanced adapter upgrades it to a
|
|
206
|
+
* Firestore `in` query, exactly as it does on the list path.
|
|
207
|
+
*/
|
|
208
|
+
async facetCounts(field, values, fields, options) {
|
|
209
|
+
const { baseFilters, ...rest } = options ?? {};
|
|
210
|
+
const entries = await Promise.all(values.map(async (value) => {
|
|
211
|
+
// Sieve ANDs clauses with a comma; see utils/sieve-builder.ts.
|
|
212
|
+
const filters = [baseFilters, `${field}==${value}`]
|
|
213
|
+
.filter(Boolean)
|
|
214
|
+
.join(",");
|
|
215
|
+
try {
|
|
216
|
+
return [value, await this.sieveCount({ filters }, fields, rest)];
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
void normalizeError(error);
|
|
220
|
+
serverLogger.warn(`facetCounts: count failed for ${this.collection}.${field}==${value}; facet will stay visible`);
|
|
221
|
+
return [value, undefined];
|
|
222
|
+
}
|
|
223
|
+
}));
|
|
224
|
+
return Object.fromEntries(entries);
|
|
225
|
+
}
|
|
177
226
|
async findByIdInTx(tx, id) {
|
|
178
227
|
const docRef = this.getCollection().doc(id);
|
|
179
228
|
const snap = await tx.get(docRef);
|
|
@@ -27,4 +27,4 @@ export declare const firebaseDbProvider: IDbProvider;
|
|
|
27
27
|
export { buildFirebaseClientConfig, normalizeFirebaseConfigValue, } from "./client-config";
|
|
28
28
|
export type { FirebaseClientConfig } from "./client-config";
|
|
29
29
|
export type { SieveModel, SieveFields, SieveFieldConfig, SieveOptions, SieveResult, SieveFilterAlias, SieveFilterAliases, FirebaseSieveFieldConfig, FirebaseSieveFields, FirebaseSieveOptions, FirebaseSieveResult, } from "./sieve";
|
|
30
|
-
export { applySieveToFirestore, expandFilterAliases, parseSieveDateValue } from "./sieve";
|
|
30
|
+
export { applySieveToFirestore, countSieveMatches, expandFilterAliases, parseSieveDateValue } from "./sieve";
|
|
@@ -38,4 +38,4 @@ export const firebaseDbProvider = {
|
|
|
38
38
|
};
|
|
39
39
|
// Firebase client config builder (for consumer app bundles)
|
|
40
40
|
export { buildFirebaseClientConfig, normalizeFirebaseConfigValue, } from "./client-config";
|
|
41
|
-
export { applySieveToFirestore, expandFilterAliases, parseSieveDateValue } from "./sieve";
|
|
41
|
+
export { applySieveToFirestore, countSieveMatches, expandFilterAliases, parseSieveDateValue } from "./sieve";
|
|
@@ -129,6 +129,22 @@ export type FirebaseSieveFieldConfig = SieveFieldConfig;
|
|
|
129
129
|
export type FirebaseSieveFields = SieveFields;
|
|
130
130
|
export type FirebaseSieveOptions = SieveOptions;
|
|
131
131
|
export type FirebaseSieveResult<T> = SieveResult<T>;
|
|
132
|
+
/**
|
|
133
|
+
* Count matching documents WITHOUT reading any of them.
|
|
134
|
+
*
|
|
135
|
+
* `applySieveToFirestore(...).total` already counts via the `.count()`
|
|
136
|
+
* aggregation, but it also fetches a page of documents on the way — so the
|
|
137
|
+
* `list({ pageSize: 1 }).total` idiom used across the codebase pays for one
|
|
138
|
+
* wasted document read per call. Facet/tab counts issue one query per union
|
|
139
|
+
* member, so that waste multiplies; this path skips the document read
|
|
140
|
+
* entirely.
|
|
141
|
+
*/
|
|
142
|
+
export declare function countSieveMatches(params: {
|
|
143
|
+
baseQuery: CollectionReference | Query;
|
|
144
|
+
model: SieveModel;
|
|
145
|
+
fields: SieveFields;
|
|
146
|
+
options?: SieveOptions;
|
|
147
|
+
}): Promise<number>;
|
|
132
148
|
/**
|
|
133
149
|
* Apply Sieve DSL to a CollectionReference/Query without requiring repository subclassing.
|
|
134
150
|
*/
|
|
@@ -149,4 +165,13 @@ export declare abstract class FirebaseSieveRepository<T extends DocumentData> ex
|
|
|
149
165
|
protected sieveQuery<TResult extends DocumentData = T>(model: SieveModel, fields: SieveFields, options?: SieveOptions & {
|
|
150
166
|
baseQuery?: CollectionReference | Query;
|
|
151
167
|
}): Promise<SieveResult<TResult>>;
|
|
168
|
+
/**
|
|
169
|
+
* Count matches for a Sieve model without reading any documents.
|
|
170
|
+
*
|
|
171
|
+
* Same filter pipeline as `sieveQuery` (aliases included) — see
|
|
172
|
+
* `countSieveMatches`.
|
|
173
|
+
*/
|
|
174
|
+
protected sieveCount(model: SieveModel, fields: SieveFields, options?: SieveOptions & {
|
|
175
|
+
baseQuery?: CollectionReference | Query;
|
|
176
|
+
}): Promise<number>;
|
|
152
177
|
}
|
|
@@ -128,12 +128,15 @@ function withAliasesExpanded(model, aliases) {
|
|
|
128
128
|
return { ...model, filters: expanded };
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Build the filtered (unpaginated) Firestore query for a Sieve model.
|
|
132
|
+
*
|
|
133
|
+
* Extracted so the count-only path and the full list path apply the SAME
|
|
134
|
+
* filter pipeline — alias expansion included. Hand-building a Firestore query
|
|
135
|
+
* for a "just give me the total" call would skip `expandFilterAliases`, and a
|
|
136
|
+
* same-field OR group like `listingType==art|stickers` would silently vanish
|
|
137
|
+
* (Root Cause #58). Never reimplement this; call it.
|
|
132
138
|
*/
|
|
133
|
-
|
|
134
|
-
const { baseQuery, model, fields, options } = params;
|
|
135
|
-
const { aliases, ...rest } = options ?? {};
|
|
136
|
-
const merged = { ...SIEVE_DEFAULTS, ...rest };
|
|
139
|
+
function buildFilteredSieveQuery(baseQuery, model, fields, merged, aliases) {
|
|
137
140
|
const effective = withAliasesExpanded(model, aliases);
|
|
138
141
|
const processor = new SieveProcessorBase({
|
|
139
142
|
// MUST be the enhanced adapter, not the stock one. This is the path
|
|
@@ -150,12 +153,37 @@ export async function applySieveToFirestore(params) {
|
|
|
150
153
|
options: merged,
|
|
151
154
|
fields,
|
|
152
155
|
});
|
|
156
|
+
return processor.apply(effective, baseQuery, {
|
|
157
|
+
applyPagination: false,
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Count matching documents WITHOUT reading any of them.
|
|
162
|
+
*
|
|
163
|
+
* `applySieveToFirestore(...).total` already counts via the `.count()`
|
|
164
|
+
* aggregation, but it also fetches a page of documents on the way — so the
|
|
165
|
+
* `list({ pageSize: 1 }).total` idiom used across the codebase pays for one
|
|
166
|
+
* wasted document read per call. Facet/tab counts issue one query per union
|
|
167
|
+
* member, so that waste multiplies; this path skips the document read
|
|
168
|
+
* entirely.
|
|
169
|
+
*/
|
|
170
|
+
export async function countSieveMatches(params) {
|
|
171
|
+
const { baseQuery, model, fields, options } = params;
|
|
172
|
+
const { aliases, ...rest } = options ?? {};
|
|
173
|
+
const merged = { ...SIEVE_DEFAULTS, ...rest };
|
|
174
|
+
return getFirestoreCount(buildFilteredSieveQuery(baseQuery, model, fields, merged, aliases));
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Apply Sieve DSL to a CollectionReference/Query without requiring repository subclassing.
|
|
178
|
+
*/
|
|
179
|
+
export async function applySieveToFirestore(params) {
|
|
180
|
+
const { baseQuery, model, fields, options } = params;
|
|
181
|
+
const { aliases, ...rest } = options ?? {};
|
|
182
|
+
const merged = { ...SIEVE_DEFAULTS, ...rest };
|
|
153
183
|
const page = Math.max(1, Number(model.page ?? 1));
|
|
154
184
|
const pageSize = Math.min(merged.maxPageSize, Math.max(1, Number(model.pageSize ?? merged.defaultPageSize)));
|
|
155
185
|
// Apply filters + sorts once; count without reading docs.
|
|
156
|
-
const filteredQ =
|
|
157
|
-
applyPagination: false,
|
|
158
|
-
});
|
|
186
|
+
const filteredQ = buildFilteredSieveQuery(baseQuery, model, fields, merged, aliases);
|
|
159
187
|
const total = await getFirestoreCount(filteredQ);
|
|
160
188
|
// Apply pagination on top of the already-filtered query — avoids re-applying
|
|
161
189
|
// the full Sieve DSL from the base.
|
|
@@ -185,19 +213,10 @@ export class FirebaseSieveRepository extends FirebaseRepository {
|
|
|
185
213
|
const { baseQuery, aliases, ...sieveOptions } = options ?? {};
|
|
186
214
|
const merged = { ...SIEVE_DEFAULTS, ...sieveOptions };
|
|
187
215
|
const base = baseQuery ?? this.getCollection();
|
|
188
|
-
const effective = withAliasesExpanded(model, aliases);
|
|
189
|
-
const processor = new SieveProcessorBase({
|
|
190
|
-
adapter: createEnhancedFirebaseAdapter(),
|
|
191
|
-
autoLoadConfig: false,
|
|
192
|
-
options: merged,
|
|
193
|
-
fields,
|
|
194
|
-
});
|
|
195
216
|
const page = Math.max(1, Number(model.page ?? 1));
|
|
196
217
|
const pageSize = Math.min(merged.maxPageSize, Math.max(1, Number(model.pageSize ?? merged.defaultPageSize)));
|
|
197
218
|
// Apply filters + sorts once; count without reading docs.
|
|
198
|
-
const filteredQ =
|
|
199
|
-
applyPagination: false,
|
|
200
|
-
});
|
|
219
|
+
const filteredQ = buildFilteredSieveQuery(base, model, fields, merged, aliases);
|
|
201
220
|
const total = await getFirestoreCount(filteredQ);
|
|
202
221
|
// Apply pagination on top of the already-filtered query — avoids re-applying
|
|
203
222
|
// the full Sieve DSL from the base.
|
|
@@ -214,4 +233,19 @@ export class FirebaseSieveRepository extends FirebaseRepository {
|
|
|
214
233
|
hasMore: page < totalPages,
|
|
215
234
|
};
|
|
216
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* Count matches for a Sieve model without reading any documents.
|
|
238
|
+
*
|
|
239
|
+
* Same filter pipeline as `sieveQuery` (aliases included) — see
|
|
240
|
+
* `countSieveMatches`.
|
|
241
|
+
*/
|
|
242
|
+
async sieveCount(model, fields, options) {
|
|
243
|
+
const { baseQuery, ...rest } = options ?? {};
|
|
244
|
+
return countSieveMatches({
|
|
245
|
+
baseQuery: baseQuery ?? this.getCollection(),
|
|
246
|
+
model,
|
|
247
|
+
fields,
|
|
248
|
+
options: rest,
|
|
249
|
+
});
|
|
250
|
+
}
|
|
217
251
|
}
|
|
@@ -35,7 +35,16 @@
|
|
|
35
35
|
import { useRouter, usePathname, useSearchParams } from "next/navigation";
|
|
36
36
|
import { useCallback, useRef } from "react";
|
|
37
37
|
import { TABLE_KEYS } from "../../constants/table-keys";
|
|
38
|
-
|
|
38
|
+
// Keys whose change must NOT reset pagination. `SECTION` is here because
|
|
39
|
+
// expanding a form section is not a filter change: without it, opening a
|
|
40
|
+
// section inside a listing's drawer would rewrite the listing's own URL with
|
|
41
|
+
// `page=1` and refetch the table behind it.
|
|
42
|
+
const NON_RESETTING_KEYS = [
|
|
43
|
+
TABLE_KEYS.PAGE,
|
|
44
|
+
TABLE_KEYS.PAGE_SIZE,
|
|
45
|
+
TABLE_KEYS.VIEW,
|
|
46
|
+
TABLE_KEYS.SECTION,
|
|
47
|
+
];
|
|
39
48
|
export function useUrlTable(options) {
|
|
40
49
|
// Always call native hooks unconditionally (React rules).
|
|
41
50
|
const nativeRouter = useRouter();
|