@mohasinac/appkit 2.7.56 → 2.7.58
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.d.ts +7 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +8 -2
- package/dist/_internal/shared/actions/action-registry.js +31 -5
- package/dist/client.d.ts +2 -4
- package/dist/client.js +2 -3
- package/dist/configs/tailwind.d.ts +16 -3
- package/dist/configs/tailwind.js +18 -5
- package/dist/constants/field-names.d.ts +3 -0
- package/dist/constants/field-names.js +3 -0
- package/dist/features/about/components/FAQPageView.js +2 -2
- package/dist/features/about/components/FeesView.js +1 -1
- package/dist/features/about/components/PolicyPageView.js +1 -1
- package/dist/features/about/components/PublicProfileView.js +1 -1
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressesIndexListing.js +1 -1
- package/dist/features/account/components/BuyerAccountGuideView.js +7 -7
- package/dist/features/account/components/BuyerAuctionsGuideView.js +7 -7
- package/dist/features/account/components/BuyerOrdersGuideView.js +6 -6
- package/dist/features/account/components/BuyerShoppingGuideView.js +7 -7
- package/dist/features/account/components/MessagesView.js +1 -1
- package/dist/features/account/components/NotificationPreferencesPanel.js +12 -3
- package/dist/features/account/components/UserOffersPanel.js +2 -2
- package/dist/features/account/components/UserSidebar.js +3 -3
- package/dist/features/account/components/UserSupportView.js +5 -5
- package/dist/features/admin/components/AdminAdsView.js +1 -1
- package/dist/features/admin/components/AdminAllEventEntriesView.js +2 -2
- package/dist/features/admin/components/AdminAnalyticsGuideView.js +3 -3
- package/dist/features/admin/components/AdminBidsView.js +6 -2
- package/dist/features/admin/components/AdminBlogView.js +7 -2
- package/dist/features/admin/components/AdminBrandsView.js +7 -2
- package/dist/features/admin/components/AdminBundleEditorView.js +13 -9
- package/dist/features/admin/components/AdminBundlesView.js +4 -2
- package/dist/features/admin/components/AdminCarouselEditorView.js +7 -8
- package/dist/features/admin/components/AdminCarouselView.js +6 -4
- package/dist/features/admin/components/AdminCartsView.js +1 -1
- package/dist/features/admin/components/AdminCatalogGuideView.js +5 -5
- package/dist/features/admin/components/AdminCategoriesView.js +7 -2
- package/dist/features/admin/components/AdminContactEditorView.js +2 -2
- package/dist/features/admin/components/AdminContactView.js +4 -2
- package/dist/features/admin/components/AdminContentGuideView.js +6 -6
- package/dist/features/admin/components/AdminCouponsView.js +4 -2
- package/dist/features/admin/components/AdminEmployeeEditorView.js +1 -1
- package/dist/features/admin/components/AdminFaqsView.js +4 -2
- package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -1
- package/dist/features/admin/components/AdminFeaturesView.js +5 -1
- package/dist/features/admin/components/AdminGuideHubView.js +1 -1
- package/dist/features/admin/components/AdminHistoryView.js +1 -1
- package/dist/features/admin/components/AdminListingScaffold.js +1 -1
- package/dist/features/admin/components/AdminMediaView.js +10 -5
- package/dist/features/admin/components/AdminNavigationView.js +1 -1
- package/dist/features/admin/components/AdminNewsletterView.js +4 -2
- package/dist/features/admin/components/AdminNotificationsView.js +7 -2
- package/dist/features/admin/components/AdminOrdersGuideView.js +5 -5
- package/dist/features/admin/components/AdminOrdersView.js +11 -2
- package/dist/features/admin/components/AdminPayoutsView.js +6 -2
- package/dist/features/admin/components/AdminPrizeDrawsView.js +4 -0
- package/dist/features/admin/components/AdminProductsView.js +14 -2
- package/dist/features/admin/components/AdminReturnRequestsView.js +1 -1
- package/dist/features/admin/components/AdminReviewsView.js +7 -2
- package/dist/features/admin/components/AdminScammerEditorView.js +3 -3
- package/dist/features/admin/components/AdminScammersView.js +5 -5
- package/dist/features/admin/components/AdminSectionsView.js +2 -2
- package/dist/features/admin/components/AdminSessionsView.js +6 -2
- package/dist/features/admin/components/AdminSidebar.js +3 -3
- package/dist/features/admin/components/AdminSiteSettingsView.js +1 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +1 -1
- package/dist/features/admin/components/AdminStoreEditorView.js +1 -1
- package/dist/features/admin/components/AdminStoresGuideView.js +6 -6
- package/dist/features/admin/components/AdminStoresView.js +7 -2
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +3 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +4 -4
- package/dist/features/admin/components/AdminSupportTicketsView.js +8 -8
- package/dist/features/admin/components/AdminTeamGuideView.js +4 -4
- package/dist/features/admin/components/AdminTeamView.js +4 -2
- package/dist/features/admin/components/AdminTrustGuideView.js +5 -5
- package/dist/features/admin/components/AdminUserEditorView.js +2 -2
- package/dist/features/admin/components/AdminUsersGuideView.js +5 -5
- package/dist/features/admin/components/AdminUsersView.js +6 -2
- package/dist/features/admin/components/AdminViewCards.js +3 -3
- package/dist/features/admin/components/AdminWishlistsView.js +1 -1
- package/dist/features/admin/components/DataTable.js +1 -1
- package/dist/features/admin/constants/filter-tabs.d.ts +9 -0
- package/dist/features/admin/constants/filter-tabs.js +3 -0
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionBottomActions.d.ts +7 -0
- package/dist/features/auctions/components/AuctionBottomActions.js +24 -0
- package/dist/features/auctions/components/AuctionDetailPageView.js +7 -7
- package/dist/features/auctions/components/AuctionsListView.js +1 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +2 -2
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +1 -1
- package/dist/features/auctions/components/PlaceBidFormClient.js +1 -1
- package/dist/features/auth/components/LoginForm.js +1 -1
- package/dist/features/auth/components/VerifyEmailView.js +2 -2
- package/dist/features/before-after/components/BeforeAfterGallery.js +1 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +1 -1
- package/dist/features/blog/components/BlogIndexListing.js +1 -1
- package/dist/features/blog/components/BlogListView.js +2 -2
- package/dist/features/blog/components/BlogPostView.js +8 -8
- package/dist/features/cart/components/CartDrawer.js +2 -2
- package/dist/features/cart/repository/cart.repository.js +11 -4
- package/dist/features/cart/schemas/firestore.d.ts +3 -0
- package/dist/features/categories/components/BrandDetailPageView.js +1 -1
- package/dist/features/categories/components/CategoriesIndexListing.js +1 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +39 -3
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +4 -1
- package/dist/features/categories/components/CategoryDetailTabs.js +7 -2
- package/dist/features/categories/components/CategoryGrid.js +1 -1
- package/dist/features/categories/components/CategoryProductsView.js +1 -1
- package/dist/features/categories/components/CategoryStoresListing.d.ts +5 -0
- package/dist/features/categories/components/CategoryStoresListing.js +11 -0
- package/dist/features/categories/components/CategoryTableColumns.js +2 -2
- package/dist/features/categories/components/CategoryTree.js +1 -1
- package/dist/features/categories/components/index.d.ts +2 -0
- package/dist/features/categories/components/index.js +1 -0
- package/dist/features/checkout/components/CheckoutStepper.js +2 -2
- package/dist/features/classified/components/ClassifiedIndexListing.js +2 -0
- package/dist/features/classified/components/ClassifiedListView.js +1 -1
- package/dist/features/collections/components/CollectionCard.js +1 -1
- package/dist/features/contact/components/ContactInfoSidebar.js +1 -1
- package/dist/features/copilot/components/AdminCopilotView.js +2 -2
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +2 -0
- package/dist/features/digital-codes/components/DigitalCodesListView.js +1 -1
- package/dist/features/events/components/AdminEventsView.js +5 -1
- package/dist/features/events/components/EventCard.js +1 -1
- package/dist/features/events/components/EventPollWidget.js +3 -3
- package/dist/features/events/components/EventStatusBadge.js +5 -5
- package/dist/features/events/components/EventsIndexListing.js +1 -1
- package/dist/features/events/components/EventsListView.js +2 -2
- package/dist/features/events/components/SpinWheelView.js +5 -3
- package/dist/features/faq/components/FAQAccordion.js +2 -2
- package/dist/features/filters/AsyncFacetSection.js +3 -3
- package/dist/features/filters/FilterFacetSection.js +5 -5
- package/dist/features/filters/RangeFilter.js +1 -1
- package/dist/features/forms/Input.js +5 -5
- package/dist/features/forms/Select.js +3 -3
- package/dist/features/forms/Slider.js +1 -1
- package/dist/features/forms/Textarea.js +3 -3
- package/dist/features/forms/utils.d.ts +2 -2
- package/dist/features/forms/utils.js +2 -2
- package/dist/features/history/hooks/useHistory.js +23 -10
- package/dist/features/homepage/components/AdvertisementBanner.js +2 -2
- package/dist/features/homepage/components/CharacterHotspotForm.js +2 -2
- package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
- package/dist/features/homepage/components/HeroSection.js +1 -1
- package/dist/features/homepage/components/NewsletterSection.js +1 -1
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/features/layout/BottomActions.js +2 -2
- package/dist/features/layout/ListingLayout.js +3 -3
- package/dist/features/layout/TitleBarLayout.js +1 -1
- package/dist/features/live/components/LiveItemsIndexListing.js +2 -0
- package/dist/features/live/components/LiveItemsListView.js +1 -1
- package/dist/features/media/index.d.ts +2 -0
- package/dist/features/media/index.js +1 -0
- package/dist/features/media/modals/ImageCropModal.js +1 -1
- package/dist/features/media/modals/ImageEditor.d.ts +12 -0
- package/dist/features/media/modals/ImageEditor.js +73 -0
- package/dist/features/media/upload/ImageUpload.d.ts +5 -1
- package/dist/features/media/upload/ImageUpload.js +33 -8
- package/dist/features/media/upload/MediaUploadField.d.ts +5 -1
- package/dist/features/media/upload/MediaUploadField.js +26 -12
- package/dist/features/orders/components/OrdersList.js +12 -12
- package/dist/features/orders/components/RefundHistoryTable.js +2 -2
- package/dist/features/orders/components/RefundRequestView.js +3 -3
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +1 -1
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
- package/dist/features/pre-orders/components/PreOrderBadge.js +5 -5
- package/dist/features/pre-orders/components/PreOrderBottomActions.d.ts +5 -0
- package/dist/features/pre-orders/components/PreOrderBottomActions.js +22 -0
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +5 -5
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +47 -0
- package/dist/features/pre-orders/components/PreOrdersListView.js +1 -1
- package/dist/features/pre-orders/components/PreorderCard.js +3 -3
- package/dist/features/products/components/AuctionsIndexListing.js +23 -0
- package/dist/features/products/components/BidHistory.js +2 -2
- package/dist/features/products/components/CompareOverlay.js +1 -1
- package/dist/features/products/components/CustomFieldsEditor.js +1 -1
- package/dist/features/products/components/CustomSectionTabContent.js +1 -1
- package/dist/features/products/components/CustomSectionsEditor.js +1 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -2
- package/dist/features/products/components/MakeOfferButton.js +2 -2
- package/dist/features/products/components/PrizeDrawBottomActions.d.ts +6 -0
- package/dist/features/products/components/PrizeDrawBottomActions.js +24 -0
- package/dist/features/products/components/PrizeDrawDetailPageView.js +5 -7
- package/dist/features/products/components/PrizeDrawEntryActions.js +5 -18
- package/dist/features/products/components/PrizeDrawItemsEditor.js +3 -3
- package/dist/features/products/components/PrizeRevealModal.js +7 -4
- package/dist/features/products/components/ProductDetailActions.d.ts +6 -1
- package/dist/features/products/components/ProductDetailActions.js +36 -6
- package/dist/features/products/components/ProductDetailPageView.js +19 -18
- package/dist/features/products/components/ProductFeaturesSelector.js +1 -1
- package/dist/features/products/components/ProductGalleryClient.js +1 -1
- package/dist/features/products/components/ProductGrid.js +8 -8
- package/dist/features/products/components/ProductTabs.js +1 -1
- package/dist/features/products/components/ProductTabsShell.js +1 -1
- package/dist/features/products/components/ProductsIndexListing.js +47 -0
- package/dist/features/products/components/RelatedProducts.js +1 -1
- package/dist/features/products/components/ShowGroupSection.js +1 -1
- package/dist/features/products/components/SublistingCarouselSection.js +1 -1
- package/dist/features/products/components/SublistingCategorySelect.js +1 -1
- package/dist/features/products/components/index.d.ts +0 -2
- package/dist/features/products/components/index.js +0 -1
- package/dist/features/products/constants/action-defs.d.ts +7 -0
- package/dist/features/products/constants/action-defs.js +14 -0
- package/dist/features/products/constants/listing-tabs.d.ts +6 -0
- package/dist/features/products/constants/listing-tabs.js +1 -0
- package/dist/features/promotions/components/CouponCard.js +3 -3
- package/dist/features/promotions/components/CouponsIndexListing.js +2 -2
- package/dist/features/promotions/components/PromotionsView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailPageView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +4 -4
- package/dist/features/reviews/components/ReviewModal.js +2 -2
- package/dist/features/reviews/components/ReviewSummary.js +1 -1
- package/dist/features/reviews/components/ReviewsIndexListing.js +1 -1
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/seller/components/SellerAddressesView.js +4 -3
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +11 -4
- package/dist/features/seller/components/SellerBidsView.js +22 -7
- package/dist/features/seller/components/SellerBundlesView.js +11 -4
- package/dist/features/seller/components/SellerClassifiedView.js +12 -5
- package/dist/features/seller/components/SellerCouponEditorView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +13 -4
- package/dist/features/seller/components/SellerDigitalCodesView.js +11 -4
- package/dist/features/seller/components/SellerFeaturesView.js +1 -1
- package/dist/features/seller/components/SellerGoogleReviewsView.js +10 -5
- package/dist/features/seller/components/SellerGroupedListingsView.js +2 -0
- package/dist/features/seller/components/SellerLiveView.js +13 -6
- package/dist/features/seller/components/SellerOffersPanel.js +2 -2
- package/dist/features/seller/components/SellerOffersView.js +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +41 -18
- package/dist/features/seller/components/SellerPayoutMethodsView.js +14 -5
- package/dist/features/seller/components/SellerPayoutsView.js +2 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +7 -2
- package/dist/features/seller/components/SellerPrizeDrawsView.js +7 -2
- package/dist/features/seller/components/SellerProductShell.js +27 -9
- package/dist/features/seller/components/SellerProductsCards.js +2 -1
- package/dist/features/seller/components/SellerProductsView.js +22 -9
- package/dist/features/seller/components/SellerReviewsView.js +9 -1
- package/dist/features/seller/components/SellerShippingConfigsView.js +15 -6
- package/dist/features/seller/components/SellerSidebar.js +2 -2
- package/dist/features/seller/components/SellerStoreCategoriesView.js +11 -4
- package/dist/features/seller/components/SellerTemplatesView.js +20 -7
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
- package/dist/features/shell/StepForm.js +9 -3
- package/dist/features/site-settings/components/ActionPermissionsManager.js +1 -1
- package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
- package/dist/features/stores/components/InteractiveStoreCard.js +1 -1
- package/dist/features/stores/components/StoreDetailLayoutView.js +1 -1
- package/dist/features/stores/components/StoreFinanceGuideView.js +2 -2
- package/dist/features/stores/components/StoreHeader.js +1 -1
- package/dist/features/stores/components/StoreListingsGuideView.js +3 -3
- package/dist/features/stores/components/StoreOrdersGuideView.js +4 -4
- package/dist/features/stores/components/StoreReviewsListing.js +1 -1
- package/dist/features/stores/components/StoreSettingsGuideView.js +2 -2
- package/dist/features/stores/components/StoresIndexListing.js +17 -1
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +4 -4
- package/dist/features/wishlist/components/WishlistPage.js +3 -3
- package/dist/features/wishlist/hooks/useWishlistToggle.js +6 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +9 -3
- package/dist/react/hooks/use-action-dispatch.d.ts +5 -0
- package/dist/react/hooks/use-action-dispatch.js +10 -0
- package/dist/seed/cart-seed-data.js +50 -3
- package/dist/seed/categories-seed-data.js +80 -16
- package/dist/seed/index.d.ts +3 -0
- package/dist/seed/index.js +3 -0
- package/dist/seed/manifest.js +15 -1
- package/dist/seed/products-classifieds-seed-data.d.ts +10 -0
- package/dist/seed/products-classifieds-seed-data.js +197 -0
- package/dist/seed/products-digital-codes-seed-data.d.ts +10 -0
- package/dist/seed/products-digital-codes-seed-data.js +204 -0
- package/dist/seed/products-live-items-seed-data.d.ts +13 -0
- package/dist/seed/products-live-items-seed-data.js +190 -0
- package/dist/styles.css +301 -3
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/index.d.ts +3 -3
- package/dist/tokens/index.js +3 -3
- package/dist/tokens/motion.d.ts +162 -0
- package/dist/tokens/motion.js +89 -0
- package/dist/ui/DataTable.js +6 -5
- package/dist/ui/components/Accordion.js +2 -1
- package/dist/ui/components/Button.style.css +15 -0
- package/dist/ui/components/Card.d.ts +5 -2
- package/dist/ui/components/Card.js +29 -11
- package/dist/ui/components/Div.d.ts +2 -16
- package/dist/ui/components/Div.js +2 -16
- package/dist/ui/components/Input.js +1 -1
- package/dist/ui/components/Layout.d.ts +9 -19
- package/dist/ui/components/Layout.js +9 -7
- package/dist/ui/components/ListingToolbar.js +1 -1
- package/dist/ui/components/Modal.js +7 -4
- package/dist/ui/components/Motion.d.ts +75 -0
- package/dist/ui/components/Motion.js +122 -0
- package/dist/ui/components/Select.js +1 -1
- package/dist/ui/components/Semantic.d.ts +81 -14
- package/dist/ui/components/Semantic.js +75 -10
- package/dist/ui/components/Semantic.style.css +261 -2
- package/dist/ui/components/SideDrawer.d.ts +1 -1
- package/dist/ui/components/SideDrawer.js +8 -6
- package/dist/ui/components/SideModal.d.ts +1 -1
- package/dist/ui/components/SideModal.js +11 -9
- package/dist/ui/components/StackedViewShell.js +6 -1
- package/dist/ui/components/StatsGrid.js +1 -1
- package/dist/ui/components/Toast.js +5 -2
- package/dist/ui/components/Typography.d.ts +44 -3
- package/dist/ui/components/Typography.js +15 -30
- package/dist/ui/components/Typography.style.css +24 -0
- package/dist/ui/components/VacationBanner.js +2 -1
- package/dist/ui/components/surface-tokens.d.ts +70 -0
- package/dist/ui/components/surface-tokens.js +68 -0
- package/dist/ui/forms/FormShell.d.ts +6 -1
- package/dist/ui/forms/FormShell.js +32 -4
- package/dist/ui/index.d.ts +9 -6
- package/dist/ui/index.js +4 -4
- package/dist/validation/schemas.d.ts +28 -28
- package/package.json +3 -1
- package/dist/_internal/client/features/seller/print-center/InventoryLabel.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/InventoryLabel.js +0 -49
- package/dist/_internal/client/features/seller/print-center/LabelDesignPicker.d.ts +0 -7
- package/dist/_internal/client/features/seller/print-center/LabelDesignPicker.js +0 -32
- package/dist/_internal/client/features/seller/print-center/OrderPackingLabel.d.ts +0 -28
- package/dist/_internal/client/features/seller/print-center/OrderPackingLabel.js +0 -33
- package/dist/_internal/client/features/seller/print-center/PhysicalLocationModal.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/PhysicalLocationModal.js +0 -30
- package/dist/_internal/client/features/seller/print-center/PrintCenterView.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/PrintCenterView.js +0 -102
- package/dist/_internal/client/features/seller/print-center/PrintGrid.d.ts +0 -12
- package/dist/_internal/client/features/seller/print-center/PrintGrid.js +0 -13
- package/dist/_internal/client/features/seller/print-center/StoreCard.d.ts +0 -19
- package/dist/_internal/client/features/seller/print-center/StoreCard.js +0 -30
- package/dist/_internal/client/features/seller/print-center/WebsiteCard.d.ts +0 -11
- package/dist/_internal/client/features/seller/print-center/WebsiteCard.js +0 -25
- package/dist/_internal/client/features/seller/print-center/index.d.ts +0 -11
- package/dist/_internal/client/features/seller/print-center/index.js +0 -10
- package/dist/_internal/client/features/seller/print-center/types.d.ts +0 -20
- package/dist/_internal/client/features/seller/print-center/types.js +0 -20
- package/dist/_internal/client/features/seller/print-center/useInventoryPdf.d.ts +0 -18
- package/dist/_internal/client/features/seller/print-center/useInventoryPdf.js +0 -76
- package/dist/features/account/repository/address.repository.d.ts +0 -17
- package/dist/features/account/repository/address.repository.js +0 -184
- package/dist/features/auctions/components/AuctionCard.d.ts +0 -29
- package/dist/features/auctions/components/AuctionCard.js +0 -38
- package/dist/features/categories/components/BundleAddToCartCta.d.ts +0 -16
- package/dist/features/categories/components/BundleAddToCartCta.js +0 -54
- package/dist/features/categories/components/CategoriesListView.d.ts +0 -31
- package/dist/features/categories/components/CategoriesListView.js +0 -27
- package/dist/features/products/components/AuctionsView.d.ts +0 -6
- package/dist/features/products/components/AuctionsView.js +0 -5
- package/dist/features/products/components/BuyBar.d.ts +0 -21
- package/dist/features/products/components/BuyBar.js +0 -19
- package/dist/features/products/components/PreOrdersView.d.ts +0 -6
- package/dist/features/products/components/PreOrdersView.js +0 -5
- package/dist/features/reviews/components/ReviewsListView.d.ts +0 -31
- package/dist/features/reviews/components/ReviewsListView.js +0 -16
- package/dist/features/stores/components/StoresListView.d.ts +0 -19
- package/dist/features/stores/components/StoresListView.js +0 -25
- package/dist/features/stores/repository/store-address.repository.d.ts +0 -55
- package/dist/features/stores/repository/store-address.repository.js +0 -187
- package/dist/ui/components/BulkActionsBar.d.ts +0 -18
- package/dist/ui/components/BulkActionsBar.js +0 -25
- package/dist/ui/components/CollageLightbox.d.ts +0 -18
- package/dist/ui/components/CollageLightbox.js +0 -41
- package/dist/ui/components/StickyBottomBar.d.ts +0 -22
- package/dist/ui/components/StickyBottomBar.js +0 -20
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { DatabaseError, NotFoundError } from "../../../errors";
|
|
2
|
-
import { serverLogger } from "../../../monitoring";
|
|
3
|
-
import { deserializeTimestamps, getFirestoreCount, getAdminDb, prepareForFirestore, } from "../../../providers/db-firebase";
|
|
4
|
-
import { ADDRESS_PII_FIELDS, decryptPiiFields, encryptPiiFields, } from "../../../security";
|
|
5
|
-
import { USER_COLLECTION } from "../../auth";
|
|
6
|
-
import { ADDRESS_FIELDS, ADDRESS_SUBCOLLECTION, } from "../schemas";
|
|
7
|
-
export class AddressRepository {
|
|
8
|
-
getCollection(userId) {
|
|
9
|
-
return getAdminDb()
|
|
10
|
-
.collection(USER_COLLECTION)
|
|
11
|
-
.doc(userId)
|
|
12
|
-
.collection(ADDRESS_SUBCOLLECTION);
|
|
13
|
-
}
|
|
14
|
-
decryptAddress(doc) {
|
|
15
|
-
return decryptPiiFields(doc, [
|
|
16
|
-
...ADDRESS_PII_FIELDS,
|
|
17
|
-
]);
|
|
18
|
-
}
|
|
19
|
-
encryptAddressData(data) {
|
|
20
|
-
return encryptPiiFields(data, [...ADDRESS_PII_FIELDS]);
|
|
21
|
-
}
|
|
22
|
-
async findByUser(userId) {
|
|
23
|
-
try {
|
|
24
|
-
const snapshot = await this.getCollection(userId)
|
|
25
|
-
.orderBy(ADDRESS_FIELDS.CREATED_AT, "desc")
|
|
26
|
-
.get();
|
|
27
|
-
return snapshot.docs.map((doc) => this.decryptAddress(deserializeTimestamps({
|
|
28
|
-
id: doc.id,
|
|
29
|
-
...doc.data(),
|
|
30
|
-
})));
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
throw new DatabaseError(`Failed to list addresses for user: ${userId}`, error);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
async findById(userId, addressId) {
|
|
37
|
-
try {
|
|
38
|
-
const doc = await this.getCollection(userId).doc(addressId).get();
|
|
39
|
-
if (!doc.exists)
|
|
40
|
-
return null;
|
|
41
|
-
return this.decryptAddress(deserializeTimestamps({ id: doc.id, ...doc.data() }));
|
|
42
|
-
}
|
|
43
|
-
catch (error) {
|
|
44
|
-
throw new DatabaseError(`Failed to find address ${addressId} for user ${userId}`, error);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async findByIdOrFail(userId, addressId) {
|
|
48
|
-
const address = await this.findById(userId, addressId);
|
|
49
|
-
if (!address) {
|
|
50
|
-
throw new NotFoundError(`Address not found: ${addressId}`);
|
|
51
|
-
}
|
|
52
|
-
return address;
|
|
53
|
-
}
|
|
54
|
-
async count(userId) {
|
|
55
|
-
try {
|
|
56
|
-
return await getFirestoreCount(this.getCollection(userId));
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
throw new DatabaseError(`Failed to count addresses for user: ${userId}`, error);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
async create(userId, input) {
|
|
63
|
-
try {
|
|
64
|
-
const collection = this.getCollection(userId);
|
|
65
|
-
if (input.isDefault) {
|
|
66
|
-
await this.clearDefaultFlag(userId);
|
|
67
|
-
}
|
|
68
|
-
const now = new Date();
|
|
69
|
-
const docRef = collection.doc();
|
|
70
|
-
const addressData = {
|
|
71
|
-
...input,
|
|
72
|
-
createdAt: now,
|
|
73
|
-
updatedAt: now,
|
|
74
|
-
};
|
|
75
|
-
const encrypted = this.encryptAddressData(addressData);
|
|
76
|
-
await docRef.set(prepareForFirestore(encrypted));
|
|
77
|
-
serverLogger.info("Address created", {
|
|
78
|
-
userId,
|
|
79
|
-
addressId: docRef.id,
|
|
80
|
-
label: input.label,
|
|
81
|
-
});
|
|
82
|
-
return { id: docRef.id, ...addressData };
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
if (error instanceof DatabaseError || error instanceof NotFoundError) {
|
|
86
|
-
throw error;
|
|
87
|
-
}
|
|
88
|
-
throw new DatabaseError(`Failed to create address for user: ${userId}`, error);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
async update(userId, addressId, input) {
|
|
92
|
-
try {
|
|
93
|
-
await this.findByIdOrFail(userId, addressId);
|
|
94
|
-
if (input.isDefault) {
|
|
95
|
-
await this.clearDefaultFlag(userId);
|
|
96
|
-
}
|
|
97
|
-
const encryptedInput = this.encryptAddressData(input);
|
|
98
|
-
const updateData = {
|
|
99
|
-
...prepareForFirestore(encryptedInput),
|
|
100
|
-
[ADDRESS_FIELDS.UPDATED_AT]: new Date(),
|
|
101
|
-
};
|
|
102
|
-
await this.getCollection(userId).doc(addressId).update(updateData);
|
|
103
|
-
const updated = await this.findByIdOrFail(userId, addressId);
|
|
104
|
-
serverLogger.info("Address updated", { userId, addressId });
|
|
105
|
-
return updated;
|
|
106
|
-
}
|
|
107
|
-
catch (error) {
|
|
108
|
-
if (error instanceof DatabaseError || error instanceof NotFoundError) {
|
|
109
|
-
throw error;
|
|
110
|
-
}
|
|
111
|
-
throw new DatabaseError(`Failed to update address ${addressId} for user ${userId}`, error);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
async delete(userId, addressId) {
|
|
115
|
-
try {
|
|
116
|
-
await this.findByIdOrFail(userId, addressId);
|
|
117
|
-
await this.getCollection(userId).doc(addressId).delete();
|
|
118
|
-
serverLogger.info("Address deleted", { userId, addressId });
|
|
119
|
-
}
|
|
120
|
-
catch (error) {
|
|
121
|
-
if (error instanceof DatabaseError || error instanceof NotFoundError) {
|
|
122
|
-
throw error;
|
|
123
|
-
}
|
|
124
|
-
throw new DatabaseError(`Failed to delete address ${addressId} for user ${userId}`, error);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
async setDefault(userId, addressId) {
|
|
128
|
-
try {
|
|
129
|
-
await this.findByIdOrFail(userId, addressId);
|
|
130
|
-
await this.clearDefaultFlag(userId);
|
|
131
|
-
await this.getCollection(userId)
|
|
132
|
-
.doc(addressId)
|
|
133
|
-
.update({
|
|
134
|
-
[ADDRESS_FIELDS.IS_DEFAULT]: true,
|
|
135
|
-
[ADDRESS_FIELDS.UPDATED_AT]: new Date(),
|
|
136
|
-
});
|
|
137
|
-
serverLogger.info("Default address set", { userId, addressId });
|
|
138
|
-
return this.findByIdOrFail(userId, addressId);
|
|
139
|
-
}
|
|
140
|
-
catch (error) {
|
|
141
|
-
if (error instanceof DatabaseError || error instanceof NotFoundError) {
|
|
142
|
-
throw error;
|
|
143
|
-
}
|
|
144
|
-
throw new DatabaseError(`Failed to set default address ${addressId} for user ${userId}`, error);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
async clearDefaultFlag(userId) {
|
|
148
|
-
try {
|
|
149
|
-
const db = getAdminDb();
|
|
150
|
-
const snapshot = await this.getCollection(userId)
|
|
151
|
-
.where(ADDRESS_FIELDS.IS_DEFAULT, "==", true)
|
|
152
|
-
.get();
|
|
153
|
-
if (snapshot.empty)
|
|
154
|
-
return;
|
|
155
|
-
const batch = db.batch();
|
|
156
|
-
snapshot.docs.forEach((doc) => {
|
|
157
|
-
batch.update(doc.ref, {
|
|
158
|
-
[ADDRESS_FIELDS.IS_DEFAULT]: false,
|
|
159
|
-
[ADDRESS_FIELDS.UPDATED_AT]: new Date(),
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
await batch.commit();
|
|
163
|
-
}
|
|
164
|
-
catch (error) {
|
|
165
|
-
throw new DatabaseError(`Failed to clear default flag for user: ${userId}`, error);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
async deleteAllByUser(userId) {
|
|
169
|
-
try {
|
|
170
|
-
const db = getAdminDb();
|
|
171
|
-
const snapshot = await this.getCollection(userId).get();
|
|
172
|
-
if (snapshot.empty)
|
|
173
|
-
return 0;
|
|
174
|
-
const batch = db.batch();
|
|
175
|
-
snapshot.docs.forEach((doc) => batch.delete(doc.ref));
|
|
176
|
-
await batch.commit();
|
|
177
|
-
return snapshot.size;
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
throw new DatabaseError(`Failed to delete all addresses for user: ${userId}`, error);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
export const addressRepository = new AddressRepository();
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { AuctionItem } from "../types";
|
|
2
|
-
interface AuctionCountdownProps {
|
|
3
|
-
endsAt: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
labels?: {
|
|
6
|
-
ended?: string;
|
|
7
|
-
hours?: string;
|
|
8
|
-
mins?: string;
|
|
9
|
-
secs?: string;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare function AuctionCountdown({ endsAt, className, labels, }: AuctionCountdownProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
interface AuctionCardProps {
|
|
14
|
-
auction: AuctionItem;
|
|
15
|
-
labels?: {
|
|
16
|
-
currentBid?: string;
|
|
17
|
-
startingBid?: string;
|
|
18
|
-
bids?: string;
|
|
19
|
-
placeBid?: string;
|
|
20
|
-
ended?: string;
|
|
21
|
-
};
|
|
22
|
-
onBid?: (auction: AuctionItem) => void;
|
|
23
|
-
className?: string;
|
|
24
|
-
selectable?: boolean;
|
|
25
|
-
isSelected?: boolean;
|
|
26
|
-
onSelect?: (id: string, selected: boolean) => void;
|
|
27
|
-
}
|
|
28
|
-
export declare function AuctionCard({ auction, labels, onBid, className, selectable, isSelected, onSelect, }: AuctionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState, useEffect } from "react";
|
|
4
|
-
import { Article, BaseListingCard, Button, Div, Heading, Row, Span, Text } from "../../../ui";
|
|
5
|
-
import { formatCurrency } from "../../../utils/number.formatter";
|
|
6
|
-
import { getDefaultCurrency } from "../../../core/baseline-resolver";
|
|
7
|
-
import { THEME_CONSTANTS } from "../../../tokens";
|
|
8
|
-
import { useLongPress } from "../../../react/hooks/useLongPress";
|
|
9
|
-
function useCountdown(endsAt) {
|
|
10
|
-
const [msLeft, setMsLeft] = useState(() => new Date(endsAt).getTime() - Date.now());
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
const id = setInterval(() => {
|
|
13
|
-
setMsLeft(new Date(endsAt).getTime() - Date.now());
|
|
14
|
-
}, 1000);
|
|
15
|
-
return () => clearInterval(id);
|
|
16
|
-
}, [endsAt]);
|
|
17
|
-
if (msLeft <= 0)
|
|
18
|
-
return null;
|
|
19
|
-
const totalSecs = Math.floor(msLeft / 1000);
|
|
20
|
-
const h = Math.floor(totalSecs / 3600);
|
|
21
|
-
const m = Math.floor((totalSecs % 3600) / 60);
|
|
22
|
-
const s = totalSecs % 60;
|
|
23
|
-
return { h, m, s };
|
|
24
|
-
}
|
|
25
|
-
export function AuctionCountdown({ endsAt, className = "", labels = {}, }) {
|
|
26
|
-
const countdown = useCountdown(endsAt);
|
|
27
|
-
if (!countdown) {
|
|
28
|
-
return (_jsx(Span, { className: `text-sm font-medium text-red-600 ${className}`, children: labels.ended ?? "Ended" }));
|
|
29
|
-
}
|
|
30
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
31
|
-
return (_jsxs(Row, { className: `gap-1 text-sm font-mono ${className}`, children: [_jsx(Span, { className: "rounded bg-gray-900 dark:bg-slate-700 px-1.5 py-0.5 text-white", children: pad(countdown.h) }), _jsx(Span, { className: "text-gray-400 dark:text-zinc-500", children: ":" }), _jsx(Span, { className: "rounded bg-gray-900 dark:bg-slate-700 px-1.5 py-0.5 text-white", children: pad(countdown.m) }), _jsx(Span, { className: "text-gray-400 dark:text-zinc-500", children: ":" }), _jsx(Span, { className: "rounded bg-gray-900 dark:bg-slate-700 px-1.5 py-0.5 text-white", children: pad(countdown.s) })] }));
|
|
32
|
-
}
|
|
33
|
-
export function AuctionCard({ auction, labels = {}, onBid, className = "", selectable = false, isSelected = false, onSelect, }) {
|
|
34
|
-
const hasEnded = new Date(auction.auctionEndDate) <= new Date();
|
|
35
|
-
const displayBid = auction.currentBid ?? auction.startingBid;
|
|
36
|
-
const longPress = useLongPress(() => onSelect?.(auction.id, !isSelected));
|
|
37
|
-
return (_jsxs(Article, { className: `group relative rounded-xl border bg-white dark:bg-slate-900 overflow-hidden shadow-sm hover:shadow-md transition-shadow ${isSelected ? "border-primary outline outline-2 outline-primary" : "border-gray-200 dark:border-slate-700"} ${className}`, onMouseDown: onSelect && !isSelected ? longPress.onMouseDown : undefined, onMouseUp: onSelect && !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: onSelect && !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: onSelect && !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: onSelect && !isSelected ? longPress.onTouchEnd : undefined, children: [onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (e) => { e.preventDefault(); onSelect(auction.id, !isSelected); }, label: isSelected ? "Deselect auction" : "Select auction", position: "top-2 right-2", className: selectable || isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity" })), auction.mainImage && (_jsxs(Div, { className: "aspect-square overflow-hidden relative", children: [_jsx(Div, { role: "img", "aria-label": auction.title, className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${auction.mainImage})` } }), _jsx(Span, { className: "absolute top-2 left-2 rounded-full bg-orange-500 px-2 py-0.5 text-xs font-bold text-white", children: "AUCTION" })] })), _jsxs(Div, { className: "p-4", children: [_jsx(Heading, { level: 3, className: `font-semibold text-gray-900 dark:text-zinc-100 text-sm leading-snug mb-2 ${THEME_CONSTANTS.utilities.textClamp2}`, children: auction.title }), _jsxs(Row, { justify: "between", className: "mb-2", children: [_jsxs(Div, { children: [_jsx(Text, { className: "text-xs text-gray-400 dark:text-zinc-500", children: labels.currentBid ?? "Current bid" }), _jsx(Text, { className: "text-base font-bold text-gray-900 dark:text-zinc-100", children: formatCurrency(displayBid, getDefaultCurrency()) })] }), _jsx(Div, { className: "text-right", children: _jsxs(Text, { className: "text-xs text-gray-400 dark:text-zinc-500", children: [auction.bidCount, " ", labels.bids ?? "bids"] }) })] }), _jsx(Div, { className: "mb-3", children: _jsx(AuctionCountdown, { endsAt: auction.auctionEndDate, labels: { ended: labels.ended } }) }), !hasEnded && onBid && (_jsx(Button, { type: "button", variant: "warning", onClick: () => onBid(auction), className: "w-full rounded-lg bg-orange-500 py-2 text-sm font-medium text-white hover:bg-orange-600 transition-colors", children: labels.placeBid ?? "Place Bid" }))] })] }));
|
|
38
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface BundleAddToCartCtaProps {
|
|
2
|
-
/** Bundle slug — `categories/{bundle-...}` row. */
|
|
3
|
-
bundleSlug: string;
|
|
4
|
-
/** True when bundleStockStatus === "out_of_stock". Renders disabled CTA. */
|
|
5
|
-
outOfStock?: boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Server-action callback. Returning successfully marks the toast as success;
|
|
8
|
-
* any thrown error surfaces inline + as an error toast. Typed as a generic
|
|
9
|
-
* async fn so consumers can wrap the underlying action however they like.
|
|
10
|
-
*/
|
|
11
|
-
onAddToCart: (input: {
|
|
12
|
-
bundleSlug: string;
|
|
13
|
-
quantity: number;
|
|
14
|
-
}) => Promise<unknown>;
|
|
15
|
-
}
|
|
16
|
-
export declare function BundleAddToCartCta({ bundleSlug, outOfStock, onAddToCart, }: BundleAddToCartCtaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* BundleAddToCartCta — S-SBUNI-5 2026-05-13.
|
|
5
|
-
*
|
|
6
|
-
* Client island for the bundle detail page CTA. Replaces the "coming soon"
|
|
7
|
-
* disabled-CTA notice from S-SBUNI-3 + S-SBUNI-4 now that the cart-line
|
|
8
|
-
* foundation + per-member stock decrement at checkout are wired.
|
|
9
|
-
*
|
|
10
|
-
* Receives the bundle slug + an `onAddToCart` callback (typically the
|
|
11
|
-
* `addBundleToCartAction` server action from the consumer app). Renders
|
|
12
|
-
* a qty input + Add button + inline error / toast feedback.
|
|
13
|
-
*
|
|
14
|
-
* Out-of-stock bundles render a disabled button with `ctaOutOfStock` text.
|
|
15
|
-
*/
|
|
16
|
-
import { useState, useCallback } from "react";
|
|
17
|
-
import { Button, Input, Row, Stack, Text } from "../../../ui";
|
|
18
|
-
import { useToast } from "../../../ui";
|
|
19
|
-
import { BUNDLE_COPY } from "../../../_internal/shared/features/categories/bundle-copy";
|
|
20
|
-
const MIN_QTY = 1;
|
|
21
|
-
const MAX_QTY = 10;
|
|
22
|
-
export function BundleAddToCartCta({ bundleSlug, outOfStock = false, onAddToCart, }) {
|
|
23
|
-
const { showToast } = useToast();
|
|
24
|
-
const [quantity, setQuantity] = useState(MIN_QTY);
|
|
25
|
-
const [submitting, setSubmitting] = useState(false);
|
|
26
|
-
const [error, setError] = useState(null);
|
|
27
|
-
const handleClick = useCallback(async () => {
|
|
28
|
-
setError(null);
|
|
29
|
-
setSubmitting(true);
|
|
30
|
-
try {
|
|
31
|
-
await onAddToCart({ bundleSlug, quantity });
|
|
32
|
-
showToast(BUNDLE_COPY.detail.ctaSuccess, "success");
|
|
33
|
-
}
|
|
34
|
-
catch (err) {
|
|
35
|
-
const message = err instanceof Error ? err.message : BUNDLE_COPY.detail.ctaErrorFallback;
|
|
36
|
-
setError(message);
|
|
37
|
-
showToast(message, "error");
|
|
38
|
-
}
|
|
39
|
-
finally {
|
|
40
|
-
setSubmitting(false);
|
|
41
|
-
}
|
|
42
|
-
}, [bundleSlug, quantity, onAddToCart, showToast]);
|
|
43
|
-
if (outOfStock) {
|
|
44
|
-
return (_jsxs(Stack, { gap: "xs", "aria-live": "polite", children: [_jsx(Button, { variant: "primary", disabled: true, "aria-disabled": true, children: BUNDLE_COPY.detail.ctaOutOfStock }), _jsx(Text, { size: "xs", color: "muted", children: BUNDLE_COPY.detail.ctaHint })] }));
|
|
45
|
-
}
|
|
46
|
-
return (_jsxs(Stack, { gap: "sm", children: [_jsxs(Row, { gap: "sm", align: "center", className: "flex-wrap", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", color: "muted", children: BUNDLE_COPY.detail.qtyLabel }), _jsx(Input, { type: "number", inputMode: "numeric", min: MIN_QTY, max: MAX_QTY, step: 1, value: String(quantity), "aria-label": BUNDLE_COPY.detail.qtyAriaLabel, onChange: (e) => {
|
|
47
|
-
const next = Number(e.target.value);
|
|
48
|
-
if (Number.isFinite(next)) {
|
|
49
|
-
setQuantity(Math.min(Math.max(MIN_QTY, Math.floor(next)), MAX_QTY));
|
|
50
|
-
}
|
|
51
|
-
}, disabled: submitting, className: "w-20" })] }), _jsx(Button, { variant: "primary", onClick: handleClick, disabled: submitting, "aria-busy": submitting, children: submitting
|
|
52
|
-
? BUNDLE_COPY.detail.ctaAdding
|
|
53
|
-
: BUNDLE_COPY.detail.ctaAddToCart })] }), error && (_jsx(Text, { size: "sm", color: "danger", role: "alert", children: error }))] }));
|
|
54
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { CategoryItem } from "../types";
|
|
3
|
-
import type { UrlTable } from "../../filters/FilterPanel";
|
|
4
|
-
import type { CategoryFilterVariant } from "./CategoryFilters";
|
|
5
|
-
export interface CategoriesListViewProps {
|
|
6
|
-
initialData?: CategoryItem[];
|
|
7
|
-
labels?: {
|
|
8
|
-
title?: string;
|
|
9
|
-
subtitle?: string;
|
|
10
|
-
emptyTitle?: string;
|
|
11
|
-
emptyDescription?: string;
|
|
12
|
-
};
|
|
13
|
-
/** Optional UrlTable-compatible state source for shared filter/sort controls */
|
|
14
|
-
table?: UrlTable;
|
|
15
|
-
/** Filter/sort preset for admin/seller/public listing behavior */
|
|
16
|
-
filterVariant?: CategoryFilterVariant;
|
|
17
|
-
/** Controlled sort value override */
|
|
18
|
-
sortValue?: string;
|
|
19
|
-
/** Controlled sort change callback */
|
|
20
|
-
onSortChange?: (value: string) => void;
|
|
21
|
-
renderSearch?: (value: string, onChange: (v: string) => void) => React.ReactNode;
|
|
22
|
-
renderSort?: (value: string, onChange: (v: string) => void) => React.ReactNode;
|
|
23
|
-
renderFilters?: () => React.ReactNode;
|
|
24
|
-
renderCategories: (items: CategoryItem[], isLoading: boolean) => React.ReactNode;
|
|
25
|
-
renderPagination?: (total: number) => React.ReactNode;
|
|
26
|
-
items?: CategoryItem[];
|
|
27
|
-
total?: number;
|
|
28
|
-
isLoading?: boolean;
|
|
29
|
-
className?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function CategoriesListView({ labels, table, filterVariant, sortValue, onSortChange, renderSearch, renderSort, renderFilters, renderCategories, renderPagination, items, total, isLoading, className, }: CategoriesListViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Container, Div, Heading, Input, SlottedListingView, Text, } from "../../../ui";
|
|
5
|
-
import { CategoryFilters } from "./CategoryFilters";
|
|
6
|
-
import { CategorySortSelect } from "./CategorySortSelect";
|
|
7
|
-
export function CategoriesListView({ labels = {}, table, filterVariant = "public", sortValue, onSortChange, renderSearch, renderSort, renderFilters, renderCategories, renderPagination, items = [], total = 0, isLoading = false, className = "", }) {
|
|
8
|
-
const [search, setSearch] = React.useState("");
|
|
9
|
-
const [sort, setSort] = React.useState("order");
|
|
10
|
-
const resolvedSort = sortValue ?? table?.get("sorts") ?? sort;
|
|
11
|
-
const handleSortChange = (next) => {
|
|
12
|
-
onSortChange?.(next);
|
|
13
|
-
if (!sortValue) {
|
|
14
|
-
setSort(next);
|
|
15
|
-
}
|
|
16
|
-
table?.set("sorts", next);
|
|
17
|
-
};
|
|
18
|
-
const filtered = React.useMemo(() => {
|
|
19
|
-
const q = search.trim().toLowerCase();
|
|
20
|
-
if (!q)
|
|
21
|
-
return items;
|
|
22
|
-
return items.filter((c) => (c.name ?? "").toLowerCase().includes(q) ||
|
|
23
|
-
(c.description ?? "").toLowerCase().includes(q));
|
|
24
|
-
}, [items, search]);
|
|
25
|
-
return (_jsx(Div, { className: `min-h-screen ${className}`, children: _jsx(Container, { size: "full", className: "py-8", children: _jsx(SlottedListingView, { portal: "public", inlineToolbar: true, className: "space-y-4", renderHeader: () => labels.title || labels.subtitle ? (_jsxs(Div, { className: "mb-2", children: [labels.title ? (_jsx(Heading, { level: 1, className: "text-2xl font-bold", children: labels.title })) : null, labels.subtitle ? (_jsx(Text, { variant: "secondary", className: "mt-1", children: labels.subtitle })) : null] })) : null, renderSearch: () => renderSearch?.(search, setSearch) ?? (_jsx(Input, { value: search, onChange: (event) => setSearch(event.target.value), placeholder: "Search categories", className: "max-w-sm" })), renderSort: () => renderSort ? (renderSort(resolvedSort, handleSortChange)) : (_jsx(CategorySortSelect, { value: resolvedSort, onChange: handleSortChange, variant: filterVariant })), renderFilters: () => renderFilters?.() ??
|
|
26
|
-
(table ? _jsx(CategoryFilters, { table: table, variant: filterVariant }) : null), renderTable: () => renderCategories(filtered, isLoading), renderPagination: () => renderPagination?.(total) ?? null, total: total, isLoading: isLoading }) }) }));
|
|
27
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { SlottedListingViewProps } from "../../../ui";
|
|
3
|
-
export interface AuctionsViewProps extends Omit<SlottedListingViewProps, "renderTable"> {
|
|
4
|
-
renderGrid: (isLoading: boolean) => React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare function AuctionsView({ renderGrid, ...props }: AuctionsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { SlottedListingView } from "../../../ui";
|
|
3
|
-
export function AuctionsView({ renderGrid, ...props }) {
|
|
4
|
-
return (_jsx(SlottedListingView, { portal: "public", ...props, manageSearch: true, manageSort: true, inlineToolbar: true, renderTable: () => renderGrid(props.isLoading ?? false) }));
|
|
5
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface BuyBarProps {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
/** Extra classes on the bar wrapper */
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* BuyBar — sticky mobile purchase action bar.
|
|
9
|
-
*
|
|
10
|
-
* Fixed above the bottom navigation (`bottom-16`) on mobile screens.
|
|
11
|
-
* Hidden on `lg:` and above — desktop uses inline CTAs on the PDP.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <BuyBar>
|
|
16
|
-
* <WishlistButton productId={product.id} />
|
|
17
|
-
* <AddToCartButton productId={product.id} className="flex-1" />
|
|
18
|
-
* </BuyBar>
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare function BuyBar({ children, className }: BuyBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Div } from "../../../ui";
|
|
3
|
-
/**
|
|
4
|
-
* BuyBar — sticky mobile purchase action bar.
|
|
5
|
-
*
|
|
6
|
-
* Fixed above the bottom navigation (`bottom-16`) on mobile screens.
|
|
7
|
-
* Hidden on `lg:` and above — desktop uses inline CTAs on the PDP.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <BuyBar>
|
|
12
|
-
* <WishlistButton productId={product.id} />
|
|
13
|
-
* <AddToCartButton productId={product.id} className="flex-1" />
|
|
14
|
-
* </BuyBar>
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export function BuyBar({ children, className }) {
|
|
18
|
-
return (_jsx(Div, { className: `fixed bottom-16 inset-x-0 z-40 flex items-center gap-2 px-4 py-3 bg-white/95 dark:bg-zinc-900/95 backdrop-blur-sm border-t border-zinc-100 dark:border-zinc-800 lg:hidden pb-[env(safe-area-inset-bottom)]${className ? ` ${className}` : ""}`, role: "region", "aria-label": "Purchase actions", children: children }));
|
|
19
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { SlottedListingViewProps } from "../../../ui";
|
|
3
|
-
export interface PreOrdersViewProps extends Omit<SlottedListingViewProps, "renderTable"> {
|
|
4
|
-
renderGrid: (isLoading: boolean) => React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare function PreOrdersView({ renderGrid, ...props }: PreOrdersViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { SlottedListingView } from "../../../ui";
|
|
3
|
-
export function PreOrdersView({ renderGrid, ...props }) {
|
|
4
|
-
return (_jsx(SlottedListingView, { portal: "public", ...props, manageSearch: true, renderTable: () => renderGrid(props.isLoading ?? false) }));
|
|
5
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { Review, ReviewListParams, ReviewListResponse } from "../types";
|
|
3
|
-
export interface ReviewsListViewProps {
|
|
4
|
-
/** Optional initial SSR data */
|
|
5
|
-
initialData?: ReviewListResponse;
|
|
6
|
-
/** Query params passed to useReviews */
|
|
7
|
-
params?: ReviewListParams;
|
|
8
|
-
/** Rendered inside the page header */
|
|
9
|
-
renderHeader?: (total: number) => React.ReactNode;
|
|
10
|
-
/** Render search input */
|
|
11
|
-
renderSearch?: (value: string, onChange: (v: string) => void) => React.ReactNode;
|
|
12
|
-
/** Render sort dropdown */
|
|
13
|
-
renderSort?: (value: string, onChange: (v: string) => void) => React.ReactNode;
|
|
14
|
-
/** Render filter panel */
|
|
15
|
-
renderFilters?: () => React.ReactNode;
|
|
16
|
-
/** Render active filter chips */
|
|
17
|
-
renderActiveFilters?: () => React.ReactNode;
|
|
18
|
-
/** Render the data table / grid */
|
|
19
|
-
renderResults: (items: Review[], isLoading: boolean) => React.ReactNode;
|
|
20
|
-
/** Render pagination */
|
|
21
|
-
renderPagination?: (total: number) => React.ReactNode;
|
|
22
|
-
/** Render empty state */
|
|
23
|
-
renderEmptyState?: () => React.ReactNode;
|
|
24
|
-
labels?: {
|
|
25
|
-
title?: string;
|
|
26
|
-
subtitle?: string;
|
|
27
|
-
subtitleWithCount?: (count: number) => string;
|
|
28
|
-
};
|
|
29
|
-
className?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare function ReviewsListView({ initialData, params, renderHeader, renderSearch, renderSort, renderFilters, renderActiveFilters, renderResults, renderPagination, renderEmptyState, labels, className, }: ReviewsListViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Container, Div, Heading, Row, Text } from "../../../ui";
|
|
5
|
-
import { useReviews } from "../hooks/useReviews";
|
|
6
|
-
export function ReviewsListView({ initialData, params = { status: "approved", perPage: 200 }, renderHeader, renderSearch, renderSort, renderFilters, renderActiveFilters, renderResults, renderPagination, renderEmptyState, labels = {}, className = "", }) {
|
|
7
|
-
const [search, setSearch] = React.useState("");
|
|
8
|
-
const [sort, setSort] = React.useState("-rating");
|
|
9
|
-
const { reviews, total, isLoading } = useReviews(params, { initialData });
|
|
10
|
-
return (_jsx(Div, { className: `min-h-screen ${className}`, children: _jsxs(Container, { size: "full", className: "py-8", children: [renderHeader ? (renderHeader(total)) : (_jsxs(Div, { className: "mb-6", children: [_jsx(Heading, { level: 1, children: labels.title ?? "Reviews" }), _jsx(Text, { variant: "secondary", className: "mt-1", children: total > 0
|
|
11
|
-
? (labels.subtitleWithCount?.(total) ??
|
|
12
|
-
`${total} reviews from our customers`)
|
|
13
|
-
: (labels.subtitle ?? "See what our customers say") })] })), _jsxs(Row, { wrap: true, gap: "3", className: "mb-4", children: [renderSearch?.(search, setSearch), renderSort?.(sort, setSort), renderFilters?.()] }), renderActiveFilters?.(), !isLoading && total === 0 && renderEmptyState
|
|
14
|
-
? renderEmptyState()
|
|
15
|
-
: renderResults(reviews, isLoading), renderPagination?.(total)] }) }));
|
|
16
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { LayoutSlots } from "../../../contracts";
|
|
2
|
-
import type { StoreListItem } from "../types";
|
|
3
|
-
interface StoresListViewProps<T extends StoreListItem = StoreListItem> {
|
|
4
|
-
stores: T[];
|
|
5
|
-
labels?: {
|
|
6
|
-
products?: string;
|
|
7
|
-
reviews?: string;
|
|
8
|
-
sold?: string;
|
|
9
|
-
empty?: string;
|
|
10
|
-
};
|
|
11
|
-
total?: number;
|
|
12
|
-
currentPage?: number;
|
|
13
|
-
totalPages?: number;
|
|
14
|
-
className?: string;
|
|
15
|
-
/** Render-prop slot overrides — pass via `FeatureExtension.slots`. */
|
|
16
|
-
slots?: LayoutSlots<T>;
|
|
17
|
-
}
|
|
18
|
-
export declare function StoresListView<T extends StoreListItem = StoreListItem>({ stores, labels, total, currentPage, totalPages, className, slots, }: StoresListViewProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import Link from "next/link";
|
|
4
|
-
import { Div, Grid, Heading, RichText, Row, Span, Text } from "../../../ui";
|
|
5
|
-
import { normalizeRichTextHtml } from "../../../utils/string.formatter";
|
|
6
|
-
import { THEME_CONSTANTS } from "../../../tokens";
|
|
7
|
-
function StoreCard({ store, labels = {}, className = "" }) {
|
|
8
|
-
return (_jsxs(Link, { href: `/stores/${store.storeSlug ?? store.id}`, className: `block rounded-xl border border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-900 overflow-hidden shadow-sm hover:shadow-md transition-shadow ${className}`, children: [store.storeBannerURL ? (_jsx(Div, { className: "h-24 overflow-hidden bg-gray-100 dark:bg-slate-800", children: _jsx(Div, { role: "img", "aria-label": `${store.storeName} banner`, className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${store.storeBannerURL})` } }) })) : (_jsx(Div, { className: "h-24 bg-gradient-to-br from-orange-50 to-orange-100 dark:from-orange-900/20 dark:to-orange-800/20" })), _jsxs(Div, { className: "px-4 pb-4", children: [_jsx(Div, { className: "-mt-6 mb-3", children: store.storeLogoURL ? (_jsx(Div, { role: "img", "aria-label": store.storeName, className: "h-12 w-12 rounded-lg border-2 border-white dark:border-slate-800 bg-center bg-cover shadow-sm", style: { backgroundImage: `url(${store.storeLogoURL})` } })) : (_jsx(Div, { className: "h-12 w-12 rounded-lg border-2 border-white dark:border-slate-800 bg-orange-100 dark:bg-orange-900/30 flex items-center justify-center text-orange-600 dark:text-orange-400 font-bold shadow-sm", children: store.storeName[0]?.toUpperCase() })) }), _jsx(Heading, { level: 3, className: "font-semibold text-gray-900 dark:text-zinc-100 text-sm truncate", children: store.storeName }), store.storeDescription && (_jsx(RichText, { html: normalizeRichTextHtml(store.storeDescription), proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: `mt-0.5 text-xs text-gray-500 dark:text-zinc-400 ${THEME_CONSTANTS.utilities.textClamp2}` })), _jsxs(Row, { className: "gap-3 mt-2 text-xs text-gray-400 dark:text-zinc-500", children: [store.totalProducts != null && (_jsxs(Span, { children: [store.totalProducts, " ", labels.products ?? "products"] })), store.itemsSold != null && (_jsxs(Span, { children: [store.itemsSold, " ", labels.sold ?? "sold"] })), store.averageRating != null && (_jsxs(Span, { children: ["\u2605 ", store.averageRating.toFixed(1)] }))] })] })] }));
|
|
9
|
-
}
|
|
10
|
-
export function StoresListView({ stores, labels = {}, total = 0, currentPage = 1, totalPages = 1, className = "", slots, }) {
|
|
11
|
-
if (stores.length === 0) {
|
|
12
|
-
if (slots?.renderEmptyState) {
|
|
13
|
-
return _jsx(_Fragment, { children: slots.renderEmptyState() });
|
|
14
|
-
}
|
|
15
|
-
return (_jsx(Text, { className: "text-center text-gray-500 dark:text-zinc-400 py-12", children: labels.empty ?? "No stores found." }));
|
|
16
|
-
}
|
|
17
|
-
return (_jsxs(Div, { className: "space-y-4", children: [slots?.renderHeader
|
|
18
|
-
? slots.renderHeader({ total })
|
|
19
|
-
: null, _jsx(Grid, { cols: "storeCards", gap: "md", className: className, children: stores.map((store, i) => slots?.renderCard ? (_jsx(React.Fragment, { children: slots.renderCard(store, i) }, store.id)) : (_jsx(StoreCard, { store: store, labels: labels }, store.id))) }), slots?.renderFooter
|
|
20
|
-
? slots.renderFooter({
|
|
21
|
-
page: currentPage,
|
|
22
|
-
totalPages,
|
|
23
|
-
})
|
|
24
|
-
: null] }));
|
|
25
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Store Address Repository
|
|
3
|
-
*
|
|
4
|
-
* Data access layer for store address documents stored as a subcollection:
|
|
5
|
-
* stores/{storeSlug}/addresses/{addressId}
|
|
6
|
-
*
|
|
7
|
-
* Mirrors the user address repository but scoped to stores.
|
|
8
|
-
*/
|
|
9
|
-
import type { StoreAddressDocument, StoreAddressCreateInput, StoreAddressUpdateInput } from "../schemas";
|
|
10
|
-
declare class StoreAddressRepository {
|
|
11
|
-
/**
|
|
12
|
-
* Get the addresses subcollection reference for a store.
|
|
13
|
-
*/
|
|
14
|
-
private getCollection;
|
|
15
|
-
/** Decrypt PII fields after reading a store address doc from Firestore */
|
|
16
|
-
private decryptAddress;
|
|
17
|
-
/** Encrypt PII fields before writing a store address doc to Firestore */
|
|
18
|
-
private encryptAddressData;
|
|
19
|
-
/**
|
|
20
|
-
* List all addresses for a store, ordered by createdAt desc.
|
|
21
|
-
*/
|
|
22
|
-
findByStore(storeSlug: string): Promise<StoreAddressDocument[]>;
|
|
23
|
-
/**
|
|
24
|
-
* Find a single address belonging to a store.
|
|
25
|
-
*/
|
|
26
|
-
findById(storeSlug: string, addressId: string): Promise<StoreAddressDocument | null>;
|
|
27
|
-
/**
|
|
28
|
-
* Find a single address or throw NotFoundError.
|
|
29
|
-
*/
|
|
30
|
-
findByIdOrFail(storeSlug: string, addressId: string): Promise<StoreAddressDocument>;
|
|
31
|
-
/**
|
|
32
|
-
* Count the total number of addresses for a store.
|
|
33
|
-
*/
|
|
34
|
-
count(storeSlug: string): Promise<number>;
|
|
35
|
-
/**
|
|
36
|
-
* Create a new store address.
|
|
37
|
-
* If isDefault is true, clears the default flag from all other addresses first.
|
|
38
|
-
*/
|
|
39
|
-
create(storeSlug: string, input: StoreAddressCreateInput): Promise<StoreAddressDocument>;
|
|
40
|
-
/**
|
|
41
|
-
* Update an existing store address.
|
|
42
|
-
* If isDefault is set to true, clears the default flag from all other addresses.
|
|
43
|
-
*/
|
|
44
|
-
update(storeSlug: string, addressId: string, input: StoreAddressUpdateInput): Promise<StoreAddressDocument>;
|
|
45
|
-
/**
|
|
46
|
-
* Delete a store address.
|
|
47
|
-
*/
|
|
48
|
-
delete(storeSlug: string, addressId: string): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Remove the isDefault flag from all addresses of a store.
|
|
51
|
-
*/
|
|
52
|
-
private clearDefaultFlag;
|
|
53
|
-
}
|
|
54
|
-
export declare const storeAddressRepository: StoreAddressRepository;
|
|
55
|
-
export {};
|