@mohasinac/appkit 4.13.0 → 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 +2 -2
package/dist/errors/messages.js
CHANGED
|
@@ -374,9 +374,12 @@ export const ERROR_MESSAGES = {
|
|
|
374
374
|
BID_TOO_LOW: "Your bid must be higher than the current bid",
|
|
375
375
|
INCREMENT_TOO_LOW: "Your bid does not meet the minimum increment requirement",
|
|
376
376
|
OWN_AUCTION: "You cannot bid on your own auction",
|
|
377
|
-
BUY_NOW_UNAVAILABLE: "Buy Now is
|
|
378
|
-
BUY_NOW_BIDS_STARTED: "Buy Now is no longer available — bids have already been placed",
|
|
377
|
+
BUY_NOW_UNAVAILABLE: "Buy Now is unavailable — bidding has already passed the Buy Now price",
|
|
379
378
|
BUY_NOW_NO_PRICE: "This auction does not have a Buy Now price",
|
|
379
|
+
BUYOUT_LAPSED: "Your Buy Now claim expired. Head back to the auction to bid or try again.",
|
|
380
|
+
BUYOUT_OUTBID: "Bidding passed the Buy Now price while you were checking out, so this purchase can no longer go through.",
|
|
381
|
+
AUCTION_ALREADY_SOLD: "Another buyer completed their purchase first, so this auction is already sold.",
|
|
382
|
+
AUCTION_ENDED_BEFORE_CHECKOUT: "The auction ended before you completed payment, so it went to the winning bidder.",
|
|
380
383
|
},
|
|
381
384
|
CONTACT: {
|
|
382
385
|
SEND_FAILED: "Failed to send your message. Please try again.",
|
|
@@ -454,6 +457,11 @@ export const ERROR_MESSAGES = {
|
|
|
454
457
|
},
|
|
455
458
|
// Offer errors
|
|
456
459
|
OFFER: {
|
|
460
|
+
/**
|
|
461
|
+
* The site-wide `featureFlags.offers` kill switch is off. Existing offers
|
|
462
|
+
* can still be responded to and paid for — only new ones are refused.
|
|
463
|
+
*/
|
|
464
|
+
DISABLED: "Offers are currently turned off across the site.",
|
|
457
465
|
LIMIT_REACHED: "You have reached the maximum of 3 offers for this product. Wait for the seller to update the listing.",
|
|
458
466
|
COUNTER_RANGE: "Your counter must be within 20% of the seller's counter price.",
|
|
459
467
|
NOT_COUNTERED: "There is no seller counter to respond to.",
|
|
@@ -9,6 +9,9 @@ export interface AboutViewProps {
|
|
|
9
9
|
missionText?: string;
|
|
10
10
|
howItWorksTitle?: string;
|
|
11
11
|
valuesTitle?: string;
|
|
12
|
+
valuesSubtitle?: string;
|
|
13
|
+
/** When set, renders a link from the values section through to `/ethics`. */
|
|
14
|
+
valuesLinkLabel?: string;
|
|
12
15
|
milestonesTitle?: string;
|
|
13
16
|
teamTitle?: string;
|
|
14
17
|
teamSubtitle?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Anchor, Avatar, Badge, Card, Div, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
|
|
2
|
+
import { Anchor, Avatar, Badge, Card, Div, Heading, Row, Section, Span, Stack, Text, TextLink } from "../../../ui";
|
|
3
|
+
import { ROUTES } from "../../../constants";
|
|
3
4
|
export function AboutView({ labels = {}, howItems = [], valueItems = [], milestones = [], teamMembers = [], ctaBannerClass = "", renderCtaButtons, }) {
|
|
4
|
-
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon }) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), teamMembers.length > 0 && (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-2", align: "center", children: labels.teamTitle }), labels.teamSubtitle && (_jsx(Text, { size: "lg", variant: "secondary", align: "center", className: "mb-12 max-w-2xl mx-auto", children: labels.teamSubtitle })), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: teamMembers.map((member) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", align: "center", className: "text-center", children: [_jsx(Avatar, { src: member.photoUrl, name: member.name, alt: member.name, size: "lg" }), _jsx(Heading, { level: 3, children: member.name }), _jsxs(Row, { gap: "xs", wrap: true, justify: "center", children: [_jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: member.role }), member.isFounder && _jsx(Badge, { variant: "primary", size: "xs", children: "Founder" }), member.isDeveloper && _jsx(Badge, { variant: "secondary", size: "xs", children: "Developer" })] }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: member.bio }), member.githubUrl && (_jsx(Anchor, { href: member.githubUrl, tone: "muted", size: "sm", underline: "hover", children: "GitHub \u2197" }))] }, member.name))) })] })), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
|
|
5
|
+
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: labels.valuesSubtitle ? "mb-3" : "mb-12", align: "center", children: labels.valuesTitle }), labels.valuesSubtitle && (_jsx(Text, { size: "base", variant: "secondary", align: "center", className: "mb-12 max-w-2xl mx-auto leading-relaxed", children: labels.valuesSubtitle })), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon, detail }) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text }), detail && (_jsx(Text, { size: "sm", color: "muted", className: "leading-relaxed", children: detail }))] }, title))) }), labels.valuesLinkLabel && (_jsx(Div, { className: "mt-8 text-center", children: _jsx(TextLink, { href: String(ROUTES.PUBLIC.ETHICS), size: "sm", children: labels.valuesLinkLabel }) }))] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), teamMembers.length > 0 && (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-2", align: "center", children: labels.teamTitle }), labels.teamSubtitle && (_jsx(Text, { size: "lg", variant: "secondary", align: "center", className: "mb-12 max-w-2xl mx-auto", children: labels.teamSubtitle })), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: teamMembers.map((member) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", align: "center", className: "text-center", children: [_jsx(Avatar, { src: member.photoUrl, name: member.name, alt: member.name, size: "lg" }), _jsx(Heading, { level: 3, children: member.name }), _jsxs(Row, { gap: "xs", wrap: true, justify: "center", children: [_jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: member.role }), member.isFounder && _jsx(Badge, { variant: "primary", size: "xs", children: "Founder" }), member.isDeveloper && _jsx(Badge, { variant: "secondary", size: "xs", children: "Developer" })] }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: member.bio }), member.githubUrl && (_jsx(Anchor, { href: member.githubUrl, tone: "muted", size: "sm", underline: "hover", children: "GitHub \u2197" }))] }, member.name))) })] })), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
|
|
5
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export type PolicyKey = "privacy" | "terms" | "cookies" | "refund" | "ethics" | "conduct";
|
|
1
2
|
export interface PolicyPageViewProps {
|
|
2
3
|
/** Which policy to render */
|
|
3
|
-
policy:
|
|
4
|
+
policy: PolicyKey;
|
|
4
5
|
}
|
|
5
6
|
export declare function PolicyPageView({ policy, }: PolicyPageViewProps): Promise<import("react").JSX.Element>;
|
|
@@ -6,28 +6,69 @@ import { PAGE_CONTAINER } from "../../../_internal/shared/styles/page";
|
|
|
6
6
|
import { Div, Heading, Text, Section, Stack } from "../../../ui";
|
|
7
7
|
import { TextLink } from "../../../ui";
|
|
8
8
|
import { siteSettingsRepository } from "../../../repositories";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Single source of truth for every policy page this shell can render.
|
|
11
|
+
*
|
|
12
|
+
* Declared as `Record<PolicyKey, …>` on purpose: adding a member to `PolicyKey`
|
|
13
|
+
* without adding its entry here is a COMPILE error, not a silent gap. This
|
|
14
|
+
* replaced three separate hand-maintained enumerations of the same union
|
|
15
|
+
* (a namespace map, a Firestore-field map, and an inline path lookup inside the
|
|
16
|
+
* related-links filter) — see Recurrent Root Cause #61.
|
|
17
|
+
*
|
|
18
|
+
* - `path` — used to exclude the current page from its own related list
|
|
19
|
+
* - `namespace` — next-intl namespace holding this page's copy
|
|
20
|
+
* - `firestoreField` — key inside `siteSettings.legalPages` carrying the admin HTML override
|
|
21
|
+
* - `relatedLabelKey` — i18n key that OTHER policy namespaces use to label a link to this page
|
|
22
|
+
*/
|
|
23
|
+
const POLICY_META = {
|
|
24
|
+
privacy: {
|
|
25
|
+
path: String(ROUTES.PUBLIC.PRIVACY),
|
|
26
|
+
namespace: "privacy",
|
|
27
|
+
firestoreField: "privacy",
|
|
28
|
+
relatedLabelKey: "relatedPrivacy",
|
|
29
|
+
},
|
|
30
|
+
terms: {
|
|
31
|
+
path: String(ROUTES.PUBLIC.TERMS),
|
|
32
|
+
namespace: "terms",
|
|
33
|
+
firestoreField: "terms",
|
|
34
|
+
relatedLabelKey: "relatedTerms",
|
|
35
|
+
},
|
|
36
|
+
cookies: {
|
|
37
|
+
path: String(ROUTES.PUBLIC.COOKIE_POLICY),
|
|
38
|
+
namespace: "cookies",
|
|
39
|
+
firestoreField: "cookies",
|
|
40
|
+
relatedLabelKey: "relatedCookies",
|
|
41
|
+
},
|
|
42
|
+
refund: {
|
|
43
|
+
path: String(ROUTES.PUBLIC.REFUND_POLICY),
|
|
44
|
+
namespace: "refundPolicy",
|
|
45
|
+
firestoreField: "refundPolicy",
|
|
46
|
+
relatedLabelKey: "relatedRefund",
|
|
47
|
+
},
|
|
48
|
+
ethics: {
|
|
49
|
+
path: String(ROUTES.PUBLIC.ETHICS),
|
|
50
|
+
namespace: "ethics",
|
|
51
|
+
firestoreField: "ethics",
|
|
52
|
+
relatedLabelKey: "relatedEthics",
|
|
53
|
+
},
|
|
54
|
+
conduct: {
|
|
55
|
+
path: String(ROUTES.PUBLIC.CODE_OF_CONDUCT),
|
|
56
|
+
namespace: "codeOfConduct",
|
|
57
|
+
firestoreField: "codeOfConduct",
|
|
58
|
+
relatedLabelKey: "relatedConduct",
|
|
59
|
+
},
|
|
20
60
|
};
|
|
61
|
+
const POLICY_KEYS = Object.keys(POLICY_META);
|
|
21
62
|
export async function PolicyPageView({ policy, }) {
|
|
22
63
|
const page = { container: PAGE_CONTAINER };
|
|
64
|
+
const meta = POLICY_META[policy];
|
|
23
65
|
const { getTranslations } = await import("next-intl/server");
|
|
24
|
-
const t = await getTranslations(
|
|
66
|
+
const t = await getTranslations(meta.namespace);
|
|
25
67
|
// Check Firestore for admin-overridden HTML content
|
|
26
68
|
let adminHtml = "";
|
|
27
69
|
try {
|
|
28
70
|
const settings = await siteSettingsRepository.getSingleton();
|
|
29
|
-
|
|
30
|
-
adminHtml = legalPages[firestoreFieldMap[policy]] ?? "";
|
|
71
|
+
adminHtml = settings.legalPages?.[meta.firestoreField] ?? "";
|
|
31
72
|
}
|
|
32
73
|
catch (_err) {
|
|
33
74
|
void normalizeError(_err);
|
|
@@ -36,15 +77,12 @@ export async function PolicyPageView({ policy, }) {
|
|
|
36
77
|
// i18n fallback sections
|
|
37
78
|
const rawSections = t.raw("sections");
|
|
38
79
|
const sections = Array.isArray(rawSections) ? rawSections : [];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const policyPath = { privacy: "/privacy", terms: "/terms", cookies: "/cookies", refund: "/refund-policy" }[policy];
|
|
46
|
-
return !l.href.endsWith(policyPath ?? "");
|
|
47
|
-
});
|
|
80
|
+
// Derived from POLICY_META, so a newly added policy appears in every other
|
|
81
|
+
// page's related list automatically and can never link to itself.
|
|
82
|
+
const relatedLinks = POLICY_KEYS.filter((key) => key !== policy).map((key) => ({
|
|
83
|
+
label: t(POLICY_META[key].relatedLabelKey),
|
|
84
|
+
href: POLICY_META[key].path,
|
|
85
|
+
}));
|
|
48
86
|
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Div, { className: `${page.container.sm}`, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-3", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80", size: "sm", children: t("lastUpdated") })] }) }), _jsxs(Div, { className: `${page.container.sm}`, padding: "content-banner", children: [adminHtml ? (
|
|
49
87
|
/* Admin-set HTML takes priority */
|
|
50
88
|
_jsx(Div, { className: "prose prose-neutral dark:prose-invert max-w-none", dangerouslySetInnerHTML: { __html: adminHtml } })) : (_jsxs(_Fragment, { children: [t("intro") && (_jsx(Text, { variant: "secondary", className: "mb-10 leading-relaxed", size: "base", children: t("intro") })), _jsx(Stack, { gap: "xl", children: sections.map((section, i) => (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: section.heading }), _jsx(Text, { variant: "secondary", className: "leading-relaxed whitespace-pre-line", children: section.body })] }, i))) })] })), relatedLinks.length > 0 && (_jsxs(Div, { className: `mt-14 border-t`, border: "default", padding: "t-xl", children: [_jsx(Heading, { level: 3, className: "mb-3 uppercase tracking-wide", color: "muted", size: "sm", weight: "semibold", children: t("relatedTitle") }), _jsx(Row, { wrap: true, gap: "md", children: relatedLinks.map((l) => (_jsx(TextLink, { href: l.href, variant: "muted", size: "sm", children: l.label }, l.href))) })] }))] })] }));
|
|
@@ -48,6 +48,11 @@ function toProductItem(p) {
|
|
|
48
48
|
currentBid: p.currentBid,
|
|
49
49
|
availableQuantity: p.availableQuantity,
|
|
50
50
|
tags: p.tags,
|
|
51
|
+
// Feeds ProductCard's "Taking Offers" pill. This is a second, local copy of
|
|
52
|
+
// the shared `toProductItem` in _internal/shared/features/products/ and it
|
|
53
|
+
// had the same omission — when a field is added to one, check the other.
|
|
54
|
+
allowOffers: p.allowOffers,
|
|
55
|
+
minOfferPercent: p.minOfferPercent,
|
|
51
56
|
createdAt: p.createdAt instanceof Date ? p.createdAt.toISOString() : undefined,
|
|
52
57
|
};
|
|
53
58
|
}
|
|
@@ -13,6 +13,8 @@ export interface AboutValueItem {
|
|
|
13
13
|
title: string;
|
|
14
14
|
text: string;
|
|
15
15
|
icon: string;
|
|
16
|
+
/** Optional second paragraph — how the value is actually enforced, not just stated. */
|
|
17
|
+
detail?: string;
|
|
16
18
|
}
|
|
17
19
|
export interface AboutMilestone {
|
|
18
20
|
year: string;
|
|
@@ -36,6 +38,7 @@ export interface AboutContentDocument {
|
|
|
36
38
|
howItWorksTitle: string;
|
|
37
39
|
howItems: AboutHowItem[];
|
|
38
40
|
valuesTitle: string;
|
|
41
|
+
valuesSubtitle?: string;
|
|
39
42
|
valueItems: AboutValueItem[];
|
|
40
43
|
milestonesTitle: string;
|
|
41
44
|
milestones: AboutMilestone[];
|
|
@@ -8,6 +8,7 @@ import { Button, Div, FilterChipGroup, Grid, Stack, Text, TextLink } from "../..
|
|
|
8
8
|
import { PaginatedSelect } from "../../../ui/components/PaginatedSelect";
|
|
9
9
|
import { DataListingView } from "../../admin/components/DataListingView";
|
|
10
10
|
import { OrderCard } from "../../orders/components/OrdersList";
|
|
11
|
+
import { useOrderScope } from "../../orders/components/OrderScopeTabs";
|
|
11
12
|
const CANCELLABLE_STATUSES = new Set(["pending", "confirmed", "processing"]);
|
|
12
13
|
const TRACKABLE_STATUSES = new Set(["shipped"]);
|
|
13
14
|
const SORT_OPTIONS = [
|
|
@@ -43,6 +44,7 @@ const STATUS_OPTIONS = [
|
|
|
43
44
|
{ value: "return_requested", label: "Return requested" },
|
|
44
45
|
];
|
|
45
46
|
export function UserOrdersView({ onOrderClick }) {
|
|
47
|
+
const orderScope = useOrderScope();
|
|
46
48
|
const config = {
|
|
47
49
|
portal: "user",
|
|
48
50
|
title: "My Orders",
|
|
@@ -62,6 +64,11 @@ export function UserOrdersView({ onOrderClick }) {
|
|
|
62
64
|
]
|
|
63
65
|
.filter(Boolean)
|
|
64
66
|
.join(",") || undefined,
|
|
67
|
+
// The lifecycle scope sits alongside the lane tabs as a second,
|
|
68
|
+
// independent axis: a buyer can ask "which of my auction wins are still
|
|
69
|
+
// in flight" without those two questions fighting over one control.
|
|
70
|
+
buildExtraParams: () => orderScope.extraParams,
|
|
71
|
+
renderAboveContent: orderScope.renderAboveContent,
|
|
65
72
|
renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsxs(Stack, { gap: "md", children: [_jsx(FilterChipGroup, { label: "Type", tabs: ORDER_LANE_TABS, value: pendingFilters.orderType ?? "", onChange: (id) => setPendingFilters((prev) => ({ ...prev, orderType: id })) }), _jsx(Div, { children: _jsx(PaginatedSelect, { value: pendingFilters.status || null, onChange: (v) => setPendingFilters((p) => ({ ...p, status: v ?? "" })), options: STATUS_OPTIONS, placeholder: "All statuses", ariaLabel: "Filter by order status" }) })] })),
|
|
66
73
|
renderCards: (rows, _view, _selection, isLoading) => {
|
|
67
74
|
if (isLoading) {
|
|
@@ -25,8 +25,6 @@ export { UserAddressesView } from "./UserAddressesView";
|
|
|
25
25
|
export type { UserAddressesViewProps, UserAddressesViewLabels, } from "./UserAddressesView";
|
|
26
26
|
export { UserNotificationsView } from "./UserNotificationsView";
|
|
27
27
|
export type { UserNotificationsViewProps, UserNotificationsViewLabels, } from "./UserNotificationsView";
|
|
28
|
-
export { UserOffersView } from "./UserOffersView";
|
|
29
|
-
export type { UserOffersViewProps, UserOffersViewLabels, } from "./UserOffersView";
|
|
30
28
|
export { UserOffersPanel } from "./UserOffersPanel";
|
|
31
29
|
export type { UserOffersPanelProps } from "./UserOffersPanel";
|
|
32
30
|
export { MessagesView } from "./MessagesView";
|
|
@@ -12,7 +12,6 @@ export { UserBidsView } from "./UserBidsView";
|
|
|
12
12
|
export { OrderDetailView } from "./OrderDetailView";
|
|
13
13
|
export { UserAddressesView } from "./UserAddressesView";
|
|
14
14
|
export { UserNotificationsView } from "./UserNotificationsView";
|
|
15
|
-
export { UserOffersView } from "./UserOffersView";
|
|
16
15
|
export { UserOffersPanel } from "./UserOffersPanel";
|
|
17
16
|
export { MessagesView } from "./MessagesView";
|
|
18
17
|
export { ChatList } from "./ChatList";
|
|
@@ -144,9 +144,9 @@ export declare const userProfileSchema: z.ZodObject<{
|
|
|
144
144
|
phone?: string | undefined;
|
|
145
145
|
line2?: string | undefined;
|
|
146
146
|
}[] | undefined;
|
|
147
|
-
phone?: string | undefined;
|
|
148
147
|
photoURL?: string | undefined;
|
|
149
148
|
bio?: string | undefined;
|
|
149
|
+
phone?: string | undefined;
|
|
150
150
|
notificationPreferences?: {
|
|
151
151
|
push?: boolean | undefined;
|
|
152
152
|
newsletter?: boolean | undefined;
|
|
@@ -172,9 +172,9 @@ export declare const userProfileSchema: z.ZodObject<{
|
|
|
172
172
|
phone?: string | undefined;
|
|
173
173
|
line2?: string | undefined;
|
|
174
174
|
}[] | undefined;
|
|
175
|
-
phone?: string | undefined;
|
|
176
175
|
photoURL?: string | undefined;
|
|
177
176
|
bio?: string | undefined;
|
|
177
|
+
phone?: string | undefined;
|
|
178
178
|
notificationPreferences?: {
|
|
179
179
|
push?: boolean | undefined;
|
|
180
180
|
newsletter?: boolean | undefined;
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Root Cause #36 — this module used to declare its OWN `OrderStatus` and
|
|
3
|
+
* `PaymentStatus`, and `appkit/src/index.ts` re-exported *those* rather than
|
|
4
|
+
* the real ones. So a bare `import type { OrderStatus } from "@mohasinac/appkit"`
|
|
5
|
+
* silently resolved to a narrower, wrong union:
|
|
6
|
+
*
|
|
7
|
+
* OrderStatus had a fake `"placed"` (used nowhere but its own declaration)
|
|
8
|
+
* and was MISSING `"return_requested"` — a real status with
|
|
9
|
+
* 29 references across the codebase.
|
|
10
|
+
* PaymentStatus was missing `"processing"` and `"partial_refund"`.
|
|
11
|
+
*
|
|
12
|
+
* Assigning a legitimate `OrderStatusValues.RETURN_REQUESTED` to an
|
|
13
|
+
* `OrderStatus[]` therefore failed to typecheck, which is what pushed callers
|
|
14
|
+
* onto `Set<string>` and untyped workarounds.
|
|
15
|
+
*
|
|
16
|
+
* These are now re-exports of the single source of truth. The account feature
|
|
17
|
+
* describes the same orders the rest of the app does; it never had grounds for
|
|
18
|
+
* its own union.
|
|
19
|
+
*/
|
|
20
|
+
import type { OrderStatus, PaymentStatus } from "../../orders/types/index";
|
|
21
|
+
export type { OrderStatus, PaymentStatus };
|
|
3
22
|
export interface OrderItem {
|
|
4
23
|
productId: string;
|
|
5
24
|
title: string;
|
|
@@ -41,12 +41,12 @@ export declare const addressFirestoreSchema: z.ZodObject<{
|
|
|
41
41
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
42
42
|
}, z.ZodTypeAny, "passthrough">;
|
|
43
43
|
isDefault: boolean;
|
|
44
|
-
phone: string;
|
|
45
|
-
city: string;
|
|
46
44
|
ownerId: string;
|
|
47
45
|
ownerType: "user" | "store";
|
|
48
46
|
fullName: string;
|
|
47
|
+
phone: string;
|
|
49
48
|
addressLine1: string;
|
|
49
|
+
city: string;
|
|
50
50
|
state: string;
|
|
51
51
|
postalCode: string;
|
|
52
52
|
addressLine2?: string | undefined;
|
|
@@ -62,12 +62,12 @@ export declare const addressFirestoreSchema: z.ZodObject<{
|
|
|
62
62
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
63
63
|
}, z.ZodTypeAny, "passthrough">;
|
|
64
64
|
isDefault: boolean;
|
|
65
|
-
phone: string;
|
|
66
|
-
city: string;
|
|
67
65
|
ownerId: string;
|
|
68
66
|
ownerType: "user" | "store";
|
|
69
67
|
fullName: string;
|
|
68
|
+
phone: string;
|
|
70
69
|
addressLine1: string;
|
|
70
|
+
city: string;
|
|
71
71
|
state: string;
|
|
72
72
|
postalCode: string;
|
|
73
73
|
addressLine2?: string | undefined;
|
|
@@ -13,14 +13,19 @@ import React from "react";
|
|
|
13
13
|
import { ListingLayout } from "../../../ui";
|
|
14
14
|
import { buildListingTypeListingConfig } from "../../products/config/listing-type-listing-config";
|
|
15
15
|
import { DataListingView } from "./DataListingView";
|
|
16
|
-
|
|
16
|
+
import { useAvailabilityScope } from "../../products/hooks/useAvailabilityScope";
|
|
17
|
+
const LISTING_TYPES = ["art"];
|
|
18
|
+
const CONFIG_OPTS = {
|
|
17
19
|
title: "Art",
|
|
18
20
|
searchPlaceholder: "Search art prints by name or seller",
|
|
19
21
|
emptyLabel: "No art listings",
|
|
20
|
-
}
|
|
22
|
+
};
|
|
21
23
|
export function AdminArtView({ children, ...props }) {
|
|
24
|
+
const scope = useAvailabilityScope(LISTING_TYPES);
|
|
22
25
|
if (React.Children.count(children) > 0) {
|
|
23
26
|
return (_jsx(ListingLayout, { portal: "admin", ...props, children: children }));
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
// Built per-render rather than at module scope: the availability scope
|
|
29
|
+
// reads the URL through a hook, which cannot run outside a component.
|
|
30
|
+
return (_jsx(DataListingView, { config: buildListingTypeListingConfig("art", { ...CONFIG_OPTS, scope }) }));
|
|
26
31
|
}
|
|
@@ -13,14 +13,19 @@ import React from "react";
|
|
|
13
13
|
import { ListingLayout } from "../../../ui";
|
|
14
14
|
import { buildListingTypeListingConfig } from "../../products/config/listing-type-listing-config";
|
|
15
15
|
import { DataListingView } from "./DataListingView";
|
|
16
|
-
|
|
16
|
+
import { useAvailabilityScope } from "../../products/hooks/useAvailabilityScope";
|
|
17
|
+
const LISTING_TYPES = ["classified"];
|
|
18
|
+
const CONFIG_OPTS = {
|
|
17
19
|
title: "Classified",
|
|
18
20
|
searchPlaceholder: "Search classified by name or seller",
|
|
19
21
|
emptyLabel: "No classified listings",
|
|
20
|
-
}
|
|
22
|
+
};
|
|
21
23
|
export function AdminClassifiedView({ children, ...props }) {
|
|
24
|
+
const scope = useAvailabilityScope(LISTING_TYPES);
|
|
22
25
|
if (React.Children.count(children) > 0) {
|
|
23
26
|
return (_jsx(ListingLayout, { portal: "admin", ...props, children: children }));
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
// Built per-render rather than at module scope: the availability scope
|
|
29
|
+
// reads the URL through a hook, which cannot run outside a component.
|
|
30
|
+
return (_jsx(DataListingView, { config: buildListingTypeListingConfig("classified", { ...CONFIG_OPTS, scope }) }));
|
|
26
31
|
}
|
|
@@ -13,14 +13,19 @@ import React from "react";
|
|
|
13
13
|
import { ListingLayout } from "../../../ui";
|
|
14
14
|
import { buildListingTypeListingConfig } from "../../products/config/listing-type-listing-config";
|
|
15
15
|
import { DataListingView } from "./DataListingView";
|
|
16
|
-
|
|
16
|
+
import { useAvailabilityScope } from "../../products/hooks/useAvailabilityScope";
|
|
17
|
+
const LISTING_TYPES = ["digital-code"];
|
|
18
|
+
const CONFIG_OPTS = {
|
|
17
19
|
title: "Digital Codes",
|
|
18
20
|
searchPlaceholder: "Search digital code listings",
|
|
19
21
|
emptyLabel: "No digital code listings",
|
|
20
|
-
}
|
|
22
|
+
};
|
|
21
23
|
export function AdminDigitalCodesView({ children, ...props }) {
|
|
24
|
+
const scope = useAvailabilityScope(LISTING_TYPES);
|
|
22
25
|
if (React.Children.count(children) > 0) {
|
|
23
26
|
return (_jsx(ListingLayout, { portal: "admin", ...props, children: children }));
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
// Built per-render rather than at module scope: the availability scope
|
|
29
|
+
// reads the URL through a hook, which cannot run outside a component.
|
|
30
|
+
return (_jsx(DataListingView, { config: buildListingTypeListingConfig("digital-code", { ...CONFIG_OPTS, scope }) }));
|
|
26
31
|
}
|
|
@@ -16,6 +16,7 @@ const PLATFORM_FLAGS = [
|
|
|
16
16
|
{ key: "reviews", label: "Reviews", desc: "Product review system" },
|
|
17
17
|
{ key: "wishlists", label: "Wishlists", desc: "Per-user saved lists" },
|
|
18
18
|
{ key: "coupons", label: "Coupons", desc: "Discount code system" },
|
|
19
|
+
{ key: "offers", label: "Buyer Offers", desc: "Make-an-offer price negotiation" },
|
|
19
20
|
{ key: "notifications", label: "Notifications", desc: "In-app notification feed" },
|
|
20
21
|
{ key: "chats", label: "Live Chat", desc: "Buyer-seller messaging" },
|
|
21
22
|
{ key: "sellerRegistration", label: "Seller Reg.", desc: "New vendor registration" },
|
|
@@ -13,14 +13,19 @@ import React from "react";
|
|
|
13
13
|
import { ListingLayout } from "../../../ui";
|
|
14
14
|
import { buildListingTypeListingConfig } from "../../products/config/listing-type-listing-config";
|
|
15
15
|
import { DataListingView } from "./DataListingView";
|
|
16
|
-
|
|
16
|
+
import { useAvailabilityScope } from "../../products/hooks/useAvailabilityScope";
|
|
17
|
+
const LISTING_TYPES = ["live"];
|
|
18
|
+
const CONFIG_OPTS = {
|
|
17
19
|
title: "Live Items",
|
|
18
20
|
searchPlaceholder: "Search live items",
|
|
19
21
|
emptyLabel: "No live item listings",
|
|
20
|
-
}
|
|
22
|
+
};
|
|
21
23
|
export function AdminLiveView({ children, ...props }) {
|
|
24
|
+
const scope = useAvailabilityScope(LISTING_TYPES);
|
|
22
25
|
if (React.Children.count(children) > 0) {
|
|
23
26
|
return (_jsx(ListingLayout, { portal: "admin", ...props, children: children }));
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
// Built per-render rather than at module scope: the availability scope
|
|
29
|
+
// reads the URL through a hook, which cannot run outside a component.
|
|
30
|
+
return (_jsx(DataListingView, { config: buildListingTypeListingConfig("live", { ...CONFIG_OPTS, scope }) }));
|
|
26
31
|
}
|