@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
|
@@ -13,6 +13,7 @@ import { TABLE_KEYS, VIEW_MODE } from "../../../constants/table-keys";
|
|
|
13
13
|
import { sortBy } from "../../../constants/sort";
|
|
14
14
|
import { STORE_FIELDS } from "../../../constants/field-names";
|
|
15
15
|
import { ACTION_ID } from "../../products/constants/action-defs";
|
|
16
|
+
import { useBottomActions } from "../../layout";
|
|
16
17
|
const DEFAULT_SORT = sortBy(STORE_FIELDS.CREATED_AT);
|
|
17
18
|
const STORE_SORT_OPTIONS = [
|
|
18
19
|
{ value: sortBy(STORE_FIELDS.CREATED_AT), label: "Newest First" },
|
|
@@ -133,6 +134,21 @@ export function StoresIndexListing({ initialData }) {
|
|
|
133
134
|
return (_jsx(InteractiveStoreCard, { store: store, href: String(ROUTES.PUBLIC.STORE_DETAIL(storeKey)), selectable: selection.isSelecting, isSelected: selection.isSelected(store.id ?? store.storeSlug), onSelect: (id, sel) => { void sel; selection.toggle(id); } }, storeKey));
|
|
134
135
|
}) })) : (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: stores.map((store) => {
|
|
135
136
|
const storeKey = store.storeSlug ?? store.id;
|
|
137
|
+
useBottomActions(selection.selectedCount > 0 ? { bulk: { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: [
|
|
138
|
+
{
|
|
139
|
+
id: ACTION_ID.COMPARE,
|
|
140
|
+
label: "Compare",
|
|
141
|
+
variant: "secondary",
|
|
142
|
+
onClick: () => { selection.clearSelection(); },
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "visit",
|
|
146
|
+
label: "Visit Store",
|
|
147
|
+
variant: "primary",
|
|
148
|
+
disabled: selection.selectedCount !== 1,
|
|
149
|
+
onClick: () => { selection.clearSelection(); },
|
|
150
|
+
},
|
|
151
|
+
] } } : {});
|
|
136
152
|
return (_jsx(InteractiveStoreCard, { store: store, href: String(ROUTES.PUBLIC.STORE_DETAIL(storeKey)), selectable: selection.isSelecting, isSelected: selection.isSelected(store.id ?? store.storeSlug), onSelect: (id, sel) => { void sel; selection.toggle(id); } }, storeKey));
|
|
137
|
-
}) })) }), filterOpen && (_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-40 bg-black/40", "aria-hidden": "true", onClick: () => setFilterOpen(false) }), _jsxs("div", { className: "fixed inset-y-0 left-0 z-50 flex w-80 flex-col bg-white dark:bg-slate-900 shadow-2xl", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-zinc-200 dark:border-slate-700 px-4 py-3.5", children: [_jsxs("span", { className: "flex items-center gap-2 text-base font-semibold text-zinc-900 dark:text-zinc-100", children: [_jsx(SlidersHorizontal, { className: "h-4 w-4" }), "Filters"] }), _jsxs("div", { className: "flex items-center gap-2", children: [pendingFilterCount > 0 && (_jsx("button", { type: "button", onClick: clearFilters, className: "text-xs text-zinc-500 hover:text-rose-500 dark:text-zinc-400 transition-colors", children: "Clear all" })), _jsx("button", { type: "button", onClick: () => setFilterOpen(false), "aria-label": "Close filters", className: "rounded-lg p-1.5 text-zinc-500 hover:bg-zinc-100 dark:hover:bg-
|
|
153
|
+
}) })) }), filterOpen && (_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-40 bg-black/40", "aria-hidden": "true", onClick: () => setFilterOpen(false) }), _jsxs("div", { className: "fixed inset-y-0 left-0 z-50 flex w-80 flex-col bg-white dark:bg-slate-900 shadow-2xl", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-zinc-200 dark:border-slate-700 px-4 py-3.5", children: [_jsxs("span", { className: "flex items-center gap-2 text-base font-semibold text-zinc-900 dark:text-zinc-100", children: [_jsx(SlidersHorizontal, { className: "h-4 w-4" }), "Filters"] }), _jsxs("div", { className: "flex items-center gap-2", children: [pendingFilterCount > 0 && (_jsx("button", { type: "button", onClick: clearFilters, className: "text-xs text-zinc-500 hover:text-rose-500 dark:text-zinc-400 transition-colors", children: "Clear all" })), _jsx("button", { type: "button", onClick: () => setFilterOpen(false), "aria-label": "Close filters", className: "rounded-lg p-1.5 text-zinc-500 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors", children: _jsx(X, { className: "h-5 w-5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-y-auto px-4 py-4", children: _jsx(StoreFilters, { table: pendingTable }) }), _jsx("div", { className: "border-t border-zinc-200 dark:border-slate-700 px-4 py-3.5", children: _jsxs("button", { type: "button", onClick: applyFilters, className: "w-full rounded-lg bg-primary py-2.5 text-sm font-semibold text-white hover:bg-primary-600 transition-colors active:scale-[0.98]", children: ["Apply Filters", pendingFilterCount > 0 ? ` (${pendingFilterCount})` : ""] }) })] })] }))] }));
|
|
138
154
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
const CLS_SECTION_CARD = "border border-zinc-200 dark:border-zinc-700 rounded-xl p-5";
|
|
5
5
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
|
-
import { Alert, Badge, Button, Div, Form, FormActions, Heading, Input, Row, Section, Stack, Text, Toggle, useToast } from "../../../ui";
|
|
6
|
+
import { Alert, Badge, Button, Div, Form, FormActions, Heading, Input, Row, Section, Span, Stack, Text, Toggle, useToast } from "../../../ui";
|
|
7
7
|
import { apiClient } from "../../../http";
|
|
8
8
|
import { WHATSAPP_SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
|
|
9
9
|
import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
|
|
@@ -157,13 +157,13 @@ export function SellerWhatsAppSettingsView({ hasCapability }) {
|
|
|
157
157
|
}) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsxs(Row, { justify: "between", align: "center", className: "mb-4", children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100", children: "Connection" }), isLoading ? null : cfg?.connected ? (_jsx(Badge, { variant: "success", children: "Connected" })) : (_jsx(Badge, { variant: "default", children: "Not configured" }))] }), _jsxs(Form, { onSubmit: (e) => {
|
|
158
158
|
e.preventDefault();
|
|
159
159
|
saveMutation.mutate();
|
|
160
|
-
}, className: "space-y-4", children: [_jsx(Input, { label: "WhatsApp Business Phone Number", value: phoneNumber, onChange: (e) => setPhoneNumber(e.target.value), placeholder: "919876543210", helperText: "Digits only, include country code (e.g. 91 for India)" }), _jsx(Input, { label: "WABA ID (WhatsApp Business Account ID)", value: wabaId, onChange: (e) => setWabaId(e.target.value), placeholder: "123456789012345", helperText: "From Meta Business Manager \u2192 WhatsApp Accounts" }), _jsx(Input, { label: "Catalog ID", value: catalogId, onChange: (e) => setCatalogId(e.target.value), placeholder: "987654321098765", helperText: "From Meta Commerce Manager \u2192 Catalogs" }), _jsx(MaskedTokenInput, { label: "System User Access Token", value: accessToken, onChange: setAccessToken, placeholder: "EAAxxxxxxxx\u2026", helperText: "Long-lived token with WhatsApp Business permissions" }), _jsx(FormActions, { align: "right", children: _jsx(Button, { type: "submit", isLoading: saveMutation.isPending, disabled: saveMutation.isPending, children: saveMutation.isPending ? "Saving…" : ACTIONS.STORE["whatsapp-connect"].label }) })] })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100 mb-4", children: "Catalog Sync" }), _jsxs(Row, { justify: "between", align: "center", className: "mb-4", children: [_jsxs(Div, { children: [_jsx(Text, { className: "text-sm text-zinc-700 dark:text-zinc-300", children: "Enable catalog sync" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: "When enabled, your published standard products can be synced to WhatsApp." })] }), _jsx(Toggle, { checked: syncEnabled, onChange: setSyncEnabled, disabled: !cfg?.connected })] }), cfg?.lastCatalogSyncAt && (_jsxs(Row, { gap: "sm", align: "center", className: "text-xs text-zinc-500 dark:text-zinc-400 mb-3", children: [_jsxs(Text, { children: ["Last sync: ", new Date(cfg.lastCatalogSyncAt).toLocaleString("en-IN")] }), cfg.lastSyncCount !== undefined && _jsxs(Text, { children: ["\u00B7 ", cfg.lastSyncCount, " products"] }), cfg.lastSyncStatus && (_jsx(Badge, { variant: STATUS_VARIANT[cfg.lastSyncStatus] ?? "default", children: cfg.lastSyncStatus }))] })), _jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-
|
|
160
|
+
}, className: "space-y-4", children: [_jsx(Input, { label: "WhatsApp Business Phone Number", value: phoneNumber, onChange: (e) => setPhoneNumber(e.target.value), placeholder: "919876543210", helperText: "Digits only, include country code (e.g. 91 for India)" }), _jsx(Input, { label: "WABA ID (WhatsApp Business Account ID)", value: wabaId, onChange: (e) => setWabaId(e.target.value), placeholder: "123456789012345", helperText: "From Meta Business Manager \u2192 WhatsApp Accounts" }), _jsx(Input, { label: "Catalog ID", value: catalogId, onChange: (e) => setCatalogId(e.target.value), placeholder: "987654321098765", helperText: "From Meta Commerce Manager \u2192 Catalogs" }), _jsx(MaskedTokenInput, { label: "System User Access Token", value: accessToken, onChange: setAccessToken, placeholder: "EAAxxxxxxxx\u2026", helperText: "Long-lived token with WhatsApp Business permissions" }), _jsx(FormActions, { align: "right", children: _jsx(Button, { type: "submit", isLoading: saveMutation.isPending, disabled: saveMutation.isPending, children: saveMutation.isPending ? "Saving…" : ACTIONS.STORE["whatsapp-connect"].label }) })] })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100 mb-4", children: "Catalog Sync" }), _jsxs(Row, { justify: "between", align: "center", className: "mb-4", children: [_jsxs(Div, { children: [_jsx(Text, { className: "text-sm text-zinc-700 dark:text-zinc-300", children: "Enable catalog sync" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: "When enabled, your published standard products can be synced to WhatsApp." })] }), _jsx(Toggle, { checked: syncEnabled, onChange: setSyncEnabled, disabled: !cfg?.connected })] }), cfg?.lastCatalogSyncAt && (_jsxs(Row, { gap: "sm", align: "center", className: "text-xs text-zinc-500 dark:text-zinc-400 mb-3", children: [_jsxs(Text, { children: ["Last sync: ", new Date(cfg.lastCatalogSyncAt).toLocaleString("en-IN")] }), cfg.lastSyncCount !== undefined && _jsxs(Text, { children: ["\u00B7 ", cfg.lastSyncCount, " products"] }), cfg.lastSyncStatus && (_jsx(Badge, { variant: STATUS_VARIANT[cfg.lastSyncStatus] ?? "default", children: cfg.lastSyncStatus }))] })), _jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400 mb-3", children: "Only published standard products are synced. Auctions and pre-orders are excluded. Batches of up to 50 products per call." }), _jsxs(Div, { className: "flex gap-3", children: [_jsx(Button, { onClick: () => syncMutation.mutate(), isLoading: syncMutation.isPending, disabled: !cfg?.connected || !syncEnabled || syncMutation.isPending, variant: "secondary", children: syncMutation.isPending ? "Syncing…" : ACTIONS.STORE["whatsapp-catalog-sync"].label }), _jsx(Button, { onClick: () => importMutation.mutate(), isLoading: importMutation.isPending, disabled: !cfg?.connected || !syncEnabled || importMutation.isPending, variant: "secondary", children: importMutation.isPending ? "Importing…" : ACTIONS.STORE["whatsapp-catalog-import"].label })] }), _jsxs(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400 mt-3", children: [_jsx(Span, { weight: "bold", children: "Push" }), " sends your published standard products to WhatsApp.", " ", _jsx(Span, { weight: "bold", children: "Import" }), " creates draft products from your WhatsApp catalog. Products are matched by slug in the description field."] })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100 mb-2", children: "Purchase Announcement Preview" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 mb-3", children: "This message is sent automatically to your phone and the platform admin when a new order is placed." }), _jsx(Div, { className: "bg-zinc-50 dark:bg-zinc-800/60 rounded-lg px-4 py-3 text-sm text-zinc-700 dark:text-zinc-200 font-mono", children: buildPurchaseAnnouncementMessage({
|
|
161
161
|
buyerName: "Ravi K.",
|
|
162
162
|
firstItemName: "Charizard PSA 9",
|
|
163
163
|
additionalItemCount: 2,
|
|
164
164
|
totalAmount: 450000,
|
|
165
165
|
orderId: "order-3-20260510-a1b2c3",
|
|
166
|
-
}) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100 mb-2", children: "Catalog Preview" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 mb-4", children: "This is how your products appear in the WhatsApp Catalog when a buyer taps \"View Catalog\" in the chat. Only published standard products are included." }), _jsxs(Div, { className: "border border-zinc-200 dark:border-zinc-700 rounded-xl overflow-hidden bg-[#ECE5DD] dark:bg-zinc-800 p-3", children: [_jsxs(Row, { gap: "sm", align: "center", className: "mb-3", children: [_jsx(Div, { className: "w-8 h-8 rounded-full bg-[#25D366] flex items-center justify-center", children: _jsx(Text, { className: "text-white text-xs font-bold", children: "W" }) }), _jsxs(Div, { children: [_jsx(Text, { className: "text-xs font-semibold text-zinc-900 dark:text-zinc-100", children: cfg?.connected ? "Your Store" : "Store Name" }), _jsx(Text, { className: "text-[10px] text-zinc-500 dark:text-zinc-400", children: "WhatsApp Business" })] })] }), _jsx(Div, { className: "grid grid-cols-2 gap-2", children: SAMPLE_CATALOG_ITEMS.map((item) => (_jsxs(Div, {
|
|
166
|
+
}) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100 mb-2", children: "Catalog Preview" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 mb-4", children: "This is how your products appear in the WhatsApp Catalog when a buyer taps \"View Catalog\" in the chat. Only published standard products are included." }), _jsxs(Div, { className: "border border-zinc-200 dark:border-zinc-700 rounded-xl overflow-hidden bg-[#ECE5DD] dark:bg-zinc-800 p-3", children: [_jsxs(Row, { gap: "sm", align: "center", className: "mb-3", children: [_jsx(Div, { className: "w-8 h-8 rounded-full bg-[#25D366] flex items-center justify-center", children: _jsx(Text, { className: "text-white text-xs font-bold", children: "W" }) }), _jsxs(Div, { children: [_jsx(Text, { className: "text-xs font-semibold text-zinc-900 dark:text-zinc-100", children: cfg?.connected ? "Your Store" : "Store Name" }), _jsx(Text, { className: "text-[10px] text-zinc-500 dark:text-zinc-400", children: "WhatsApp Business" })] })] }), _jsx(Div, { className: "grid grid-cols-2 gap-2", children: SAMPLE_CATALOG_ITEMS.map((item) => (_jsxs(Div, { surface: "card", className: "overflow-hidden", children: [_jsx(Div, { className: "aspect-square bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center", children: _jsx(Text, { className: "text-2xl", children: item.emoji }) }), _jsxs(Div, { className: "p-2", children: [_jsx(Text, { className: "text-xs font-medium text-zinc-900 dark:text-zinc-100 line-clamp-2 leading-tight", children: item.name }), _jsx(Text, { className: "text-xs text-[#25D366] font-semibold mt-0.5", children: item.price })] })] }, item.id))) }), _jsx(Div, { className: "mt-3 text-center", children: _jsx(Text, { className: "text-[10px] text-zinc-500 dark:text-zinc-400", children: cfg?.lastSyncCount
|
|
167
167
|
? `${cfg.lastSyncCount} products synced to catalog`
|
|
168
|
-
: "Sync your products to populate the catalog" }) })] }), !cfg?.connected && (_jsx(Text, { className: "text-xs text-
|
|
168
|
+
: "Sync your products to populate the catalog" }) })] }), !cfg?.connected && (_jsx(Text, { className: "text-xs text-warning mt-2", children: "Connect your WhatsApp Business account above to enable the catalog." }))] })] }));
|
|
169
169
|
}
|
|
@@ -3,16 +3,16 @@ import { Button, Div, Stack, Text } from "../../../ui";
|
|
|
3
3
|
import { formatCurrency } from "../../../utils/number.formatter";
|
|
4
4
|
import { THEME_CONSTANTS } from "../../../tokens";
|
|
5
5
|
export function WishlistCard({ item, onRemove, onProductClick, }) {
|
|
6
|
-
return (_jsxs(Div, {
|
|
6
|
+
return (_jsxs(Div, { surface: "card", padding: "sm", className: "flex gap-4", children: [_jsx(Div, { role: onProductClick ? "button" : undefined, tabIndex: onProductClick ? 0 : undefined, onClick: onProductClick ? () => onProductClick(item) : undefined, onKeyDown: onProductClick
|
|
7
7
|
? (e) => e.key === "Enter" && onProductClick(item)
|
|
8
|
-
: undefined, className: `h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-neutral-100 dark:bg-slate-800 ${onProductClick ? "cursor-pointer" : ""}`, children: item.productImage && (_jsx(Div, { role: "img", "aria-label": item.productTitle ?? "", className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${item.productImage})` } })) }), _jsxs(Div, { className: "flex flex-1 flex-col justify-between", children: [_jsx(Text, { className: `font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.productTitle }), item.productPrice !== undefined && (_jsx(Text, { className: "text-sm font-semibold text-neutral-900 dark:text-zinc-100", children: formatCurrency(item.productPrice, item.productCurrency) }))] }), onRemove && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onRemove(item.id), "aria-label": "Remove from wishlist", className: "self-start text-
|
|
8
|
+
: undefined, className: `h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-neutral-100 dark:bg-slate-800 ${onProductClick ? "cursor-pointer" : ""}`, children: item.productImage && (_jsx(Div, { role: "img", "aria-label": item.productTitle ?? "", className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${item.productImage})` } })) }), _jsxs(Div, { className: "flex flex-1 flex-col justify-between", children: [_jsx(Text, { className: `font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.productTitle }), item.productPrice !== undefined && (_jsx(Text, { className: "text-sm font-semibold text-neutral-900 dark:text-zinc-100", children: formatCurrency(item.productPrice, item.productCurrency) }))] }), onRemove && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onRemove(item.id), "aria-label": "Remove from wishlist", className: "self-start text-zinc-400 dark:text-zinc-400 transition hover:text-red-500", children: "\u2715" }))] }));
|
|
9
9
|
}
|
|
10
10
|
export function WishlistPage({ items, isLoading, onRemove, onProductClick, emptyLabel = "Your wishlist is empty", }) {
|
|
11
11
|
if (isLoading) {
|
|
12
12
|
return (_jsx(Stack, { gap: "md", children: Array.from({ length: 4 }).map((_, i) => (_jsxs(Div, { className: "flex animate-pulse gap-4 rounded-xl border border-neutral-200 p-4", children: [_jsx(Div, { className: "h-20 w-20 rounded-lg bg-neutral-200" }), _jsxs(Stack, { gap: "sm", className: "flex-1", children: [_jsx(Div, { className: "h-4 w-3/4 rounded bg-neutral-200 dark:bg-slate-700" }), _jsx(Div, { className: "h-4 w-1/3 rounded bg-neutral-200 dark:bg-slate-700" })] })] }, i))) }));
|
|
13
13
|
}
|
|
14
14
|
if (items.length === 0) {
|
|
15
|
-
return (_jsx(Text, { className: "py-16 text-center text-sm text-
|
|
15
|
+
return (_jsx(Text, { className: "py-16 text-center text-sm text-zinc-500 dark:text-zinc-400", children: emptyLabel }));
|
|
16
16
|
}
|
|
17
17
|
return (_jsx(Stack, { gap: "md", children: items.map((item) => (_jsx(WishlistCard, { item: item, onRemove: onRemove, onProductClick: onProductClick }, item.id))) }));
|
|
18
18
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
|
+
import { useToast } from "../../../ui";
|
|
3
4
|
export function useWishlistToggle(productId, initial = false, actions) {
|
|
4
5
|
const [inWishlist, setInWishlist] = useState(initial);
|
|
5
6
|
const [isLoading, setIsLoading] = useState(false);
|
|
7
|
+
const { showToast } = useToast();
|
|
6
8
|
const toggle = useCallback(async () => {
|
|
7
9
|
if (!productId)
|
|
8
10
|
return;
|
|
@@ -15,18 +17,21 @@ export function useWishlistToggle(productId, initial = false, actions) {
|
|
|
15
17
|
}
|
|
16
18
|
if (prev) {
|
|
17
19
|
await actions.removeFromWishlist(productId);
|
|
20
|
+
showToast("Removed from wishlist.", "success");
|
|
18
21
|
}
|
|
19
22
|
else {
|
|
20
23
|
await actions.addToWishlist(productId);
|
|
24
|
+
showToast("Added to wishlist.", "success");
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
catch (err) {
|
|
24
28
|
setInWishlist(prev);
|
|
29
|
+
showToast(err instanceof Error ? err.message : "Something went wrong.", "error");
|
|
25
30
|
throw err;
|
|
26
31
|
}
|
|
27
32
|
finally {
|
|
28
33
|
setIsLoading(false);
|
|
29
34
|
}
|
|
30
|
-
}, [actions, inWishlist, productId]);
|
|
35
|
+
}, [actions, inWishlist, productId, showToast]);
|
|
31
36
|
return { inWishlist, isLoading, toggle };
|
|
32
37
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -625,6 +625,9 @@ export { productsStandardSeedData } from "./seed/index";
|
|
|
625
625
|
export { productsAuctionsSeedData } from "./seed/index";
|
|
626
626
|
export { productsPreordersSeedData } from "./seed/index";
|
|
627
627
|
export { productsPrizeDrawsSeedData } from "./seed/index";
|
|
628
|
+
export { productsClassifiedsSeedData } from "./seed/index";
|
|
629
|
+
export { productsDigitalCodesSeedData } from "./seed/index";
|
|
630
|
+
export { productsLiveItemsSeedData } from "./seed/index";
|
|
628
631
|
export { registerSeedLocale } from "./seed/index";
|
|
629
632
|
export { reviewsSeedData } from "./seed/index";
|
|
630
633
|
export { seedForTest } from "./seed/index";
|
|
@@ -2134,6 +2137,7 @@ export { LoyaltyRepository } from "./features/loyalty/server";
|
|
|
2134
2137
|
export { AvatarUpload } from "./features/media/index";
|
|
2135
2138
|
export { CameraCapture } from "./features/media/index";
|
|
2136
2139
|
export { ImageCropModal } from "./features/media/index";
|
|
2140
|
+
export { ImageEditor } from "./features/media/index";
|
|
2137
2141
|
export { ImageUpload } from "./features/media/index";
|
|
2138
2142
|
export { MediaAvatar } from "./features/media/index";
|
|
2139
2143
|
export { MediaImage } from "./features/media/index";
|
|
@@ -2154,6 +2158,7 @@ export { useMediaUpload } from "./features/media/index";
|
|
|
2154
2158
|
export type { AvatarUploadProps } from "./features/media/index";
|
|
2155
2159
|
export type { CameraCaptureProps } from "./features/media/index";
|
|
2156
2160
|
export type { ImageCropData } from "./features/media/index";
|
|
2161
|
+
export type { ImageEditorProps } from "./features/media/index";
|
|
2157
2162
|
export type { ImageCropModalProps } from "./features/media/index";
|
|
2158
2163
|
export type { ImageUploadProps } from "./features/media/index";
|
|
2159
2164
|
export type { LightboxItem } from "./features/media/index";
|
|
@@ -2312,7 +2317,6 @@ export type { BundleCollageProps } from "./features/categories/components/Bundle
|
|
|
2312
2317
|
export { BundleBuyNowCta } from "./features/categories/components/BundleBuyNowCta";
|
|
2313
2318
|
export type { BundleBuyNowCtaProps } from "./features/categories/components/BundleBuyNowCta";
|
|
2314
2319
|
export { BidHistory } from "./features/products/index";
|
|
2315
|
-
export { BuyBar } from "./features/products/index";
|
|
2316
2320
|
export { DEFAULT_PRODUCT_DATA } from "./features/products/index";
|
|
2317
2321
|
export { InteractiveProductCard } from "./features/products/index";
|
|
2318
2322
|
export { MakeOfferForm } from "./features/products/index";
|
|
@@ -2396,7 +2400,6 @@ export { useRelatedProducts } from "./features/products/index";
|
|
|
2396
2400
|
export type { AuctionDetailViewProps } from "./features/products/index";
|
|
2397
2401
|
export type { BidHistoryEntry } from "./features/products/index";
|
|
2398
2402
|
export type { BidHistoryProps } from "./features/products/index";
|
|
2399
|
-
export type { BuyBarProps } from "./features/products/index";
|
|
2400
2403
|
export type { InteractiveProductCardProps } from "./features/products/index";
|
|
2401
2404
|
export type { ListingType } from "./features/products/index";
|
|
2402
2405
|
export type { MakeOfferFormProps } from "./features/products/index";
|
package/dist/index.js
CHANGED
|
@@ -1322,6 +1322,12 @@ export { productsPreordersSeedData } from "./seed/index";
|
|
|
1322
1322
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1323
1323
|
// productsPrizeDrawsSeedData - Seed data for prize-draw product listings (SB5-E).
|
|
1324
1324
|
export { productsPrizeDrawsSeedData } from "./seed/index";
|
|
1325
|
+
// productsClassifiedsSeedData - Seed data for classified product listings (SB-UNI-I).
|
|
1326
|
+
export { productsClassifiedsSeedData } from "./seed/index";
|
|
1327
|
+
// productsDigitalCodesSeedData - Seed data for digital-code product listings (SB-UNI-J).
|
|
1328
|
+
export { productsDigitalCodesSeedData } from "./seed/index";
|
|
1329
|
+
// productsLiveItemsSeedData - Seed data for live-item product listings (SB-UNI-K).
|
|
1330
|
+
export { productsLiveItemsSeedData } from "./seed/index";
|
|
1325
1331
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1326
1332
|
// registerSeedLocale - Helper for register seed locale.
|
|
1327
1333
|
export { registerSeedLocale } from "./seed/index";
|
|
@@ -3980,6 +3986,9 @@ export { CameraCapture } from "./features/media/index";
|
|
|
3980
3986
|
// [CLIENT-ONLY]-Cannot run in SSR mode â€" uses browser-only APIs (window, navigator, localStorage, matchMedia, DOM events) that do not exist in Node.js.
|
|
3981
3987
|
// ImageCropModal - Component for image crop modal.
|
|
3982
3988
|
export { ImageCropModal } from "./features/media/index";
|
|
3989
|
+
// [CLIENT-ONLY]-Cannot run in SSR mode — uses browser-only APIs.
|
|
3990
|
+
// ImageEditor - Advanced crop/rotate/zoom editor (react-advanced-cropper).
|
|
3991
|
+
export { ImageEditor } from "./features/media/index";
|
|
3983
3992
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
3984
3993
|
// ImageUpload - Shared export for image upload.
|
|
3985
3994
|
export { ImageUpload } from "./features/media/index";
|
|
@@ -4286,9 +4295,6 @@ export { BundleBuyNowCta } from "./features/categories/components/BundleBuyNowCt
|
|
|
4286
4295
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4287
4296
|
// BidHistory - Shared export for bid history.
|
|
4288
4297
|
export { BidHistory } from "./features/products/index";
|
|
4289
|
-
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4290
|
-
// BuyBar - Shared export for buy bar.
|
|
4291
|
-
export { BuyBar } from "./features/products/index";
|
|
4292
4298
|
// [SCHEMA]-Schema / data-shape constant â€" Zod validator, default-value object, or Firestore collection/field name constant.
|
|
4293
4299
|
// DEFAULT_PRODUCT_DATA - Constant used across modules.
|
|
4294
4300
|
export { DEFAULT_PRODUCT_DATA } from "./features/products/index";
|
|
@@ -18,6 +18,11 @@ export type DispatchAction = {
|
|
|
18
18
|
type: "COPY";
|
|
19
19
|
text: string;
|
|
20
20
|
successMessage?: string;
|
|
21
|
+
} | {
|
|
22
|
+
type: "EXECUTE";
|
|
23
|
+
handler: () => Promise<void>;
|
|
24
|
+
successMessage?: string;
|
|
25
|
+
errorMessage?: string;
|
|
21
26
|
};
|
|
22
27
|
export interface UseActionDispatchOptions {
|
|
23
28
|
onBulk?: (actionId: string, ids: string[]) => void;
|
|
@@ -25,6 +25,16 @@ export function useActionDispatch(options) {
|
|
|
25
25
|
await navigator.clipboard.writeText(action.text);
|
|
26
26
|
showToast(action.successMessage ?? "Copied!", "success");
|
|
27
27
|
break;
|
|
28
|
+
case "EXECUTE":
|
|
29
|
+
try {
|
|
30
|
+
await action.handler();
|
|
31
|
+
if (action.successMessage)
|
|
32
|
+
showToast(action.successMessage, "success");
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
showToast(action.errorMessage ?? (err instanceof Error ? err.message : "Something went wrong."), "error");
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
28
38
|
}
|
|
29
39
|
}, [router, showToast, openPanel, options]);
|
|
30
40
|
}
|
|
@@ -17,7 +17,7 @@ const _CURRENCY = getDefaultCurrency();
|
|
|
17
17
|
const NOW = new Date();
|
|
18
18
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
19
19
|
export const cartsSeedData = [
|
|
20
|
-
// Yugi's cart: 3 items
|
|
20
|
+
// Yugi's cart: 3 standard items + 1 won-auction (locked) + 1 accepted-offer (locked)
|
|
21
21
|
{
|
|
22
22
|
id: "user-yugi-muto",
|
|
23
23
|
userId: "user-yugi-muto",
|
|
@@ -64,11 +64,44 @@ export const cartsSeedData = [
|
|
|
64
64
|
addedAt: daysAgo(1),
|
|
65
65
|
updatedAt: daysAgo(1),
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
itemId: "cartitem-yugi-blue-eyes-auction-won",
|
|
69
|
+
productId: "auction-blue-eyes-white-dragon-psa9",
|
|
70
|
+
productTitle: "Blue-Eyes White Dragon PSA 9 — Won Auction",
|
|
71
|
+
productImage: "https://images.ygoprodeck.com/images/cards/small/89631139.jpg",
|
|
72
|
+
price: 2499900,
|
|
73
|
+
currency: _CURRENCY,
|
|
74
|
+
quantity: 1,
|
|
75
|
+
storeId: "store-kaiba-corp-cards",
|
|
76
|
+
storeName: "Kaiba Corp Card Vault",
|
|
77
|
+
listingType: "auction",
|
|
78
|
+
locked: true,
|
|
79
|
+
addedAt: daysAgo(1),
|
|
80
|
+
updatedAt: daysAgo(1),
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
itemId: "cartitem-yugi-red-eyes-offer-accepted",
|
|
84
|
+
productId: "product-red-eyes-black-dragon-mrd",
|
|
85
|
+
productTitle: "Red-Eyes Black Dragon MRD — Offer Accepted",
|
|
86
|
+
productImage: "https://images.ygoprodeck.com/images/cards/small/74677422.jpg",
|
|
87
|
+
price: 899900,
|
|
88
|
+
currency: _CURRENCY,
|
|
89
|
+
quantity: 1,
|
|
90
|
+
storeId: "store-kaiba-corp-cards",
|
|
91
|
+
storeName: "Kaiba Corp Card Vault",
|
|
92
|
+
listingType: "standard",
|
|
93
|
+
isOffer: true,
|
|
94
|
+
offerId: "offer-yugi-red-eyes-001",
|
|
95
|
+
lockedPrice: 350000,
|
|
96
|
+
locked: true,
|
|
97
|
+
addedAt: daysAgo(1),
|
|
98
|
+
updatedAt: daysAgo(1),
|
|
99
|
+
},
|
|
67
100
|
],
|
|
68
101
|
createdAt: daysAgo(3),
|
|
69
102
|
updatedAt: daysAgo(1),
|
|
70
103
|
},
|
|
71
|
-
// Kaiba's cart: 2
|
|
104
|
+
// Kaiba's cart: 2 standard + 1 pre-order
|
|
72
105
|
{
|
|
73
106
|
id: "user-seto-kaiba",
|
|
74
107
|
userId: "user-seto-kaiba",
|
|
@@ -101,9 +134,23 @@ export const cartsSeedData = [
|
|
|
101
134
|
addedAt: daysAgo(4),
|
|
102
135
|
updatedAt: daysAgo(4),
|
|
103
136
|
},
|
|
137
|
+
{
|
|
138
|
+
itemId: "cartitem-kaiba-gate-guardian-preorder",
|
|
139
|
+
productId: "preorder-gate-guardian-reprint-2026",
|
|
140
|
+
productTitle: "Gate Guardian 2026 Reprint — Pre-Order",
|
|
141
|
+
productImage: "https://images.ygoprodeck.com/images/cards/small/25833572.jpg",
|
|
142
|
+
price: 349900,
|
|
143
|
+
currency: _CURRENCY,
|
|
144
|
+
quantity: 1,
|
|
145
|
+
storeId: "store-letitrip-official",
|
|
146
|
+
storeName: "LetItRip Official",
|
|
147
|
+
listingType: "pre-order",
|
|
148
|
+
addedAt: daysAgo(2),
|
|
149
|
+
updatedAt: daysAgo(2),
|
|
150
|
+
},
|
|
104
151
|
],
|
|
105
152
|
createdAt: daysAgo(5),
|
|
106
|
-
updatedAt: daysAgo(
|
|
153
|
+
updatedAt: daysAgo(2),
|
|
107
154
|
},
|
|
108
155
|
// Admin's cart: 2 items from Kaiba Corp (Admin as buyer)
|
|
109
156
|
{
|
|
@@ -28,6 +28,16 @@ const emptyMetrics = {
|
|
|
28
28
|
totalItemCount: 0,
|
|
29
29
|
lastUpdated: daysAgo(1),
|
|
30
30
|
};
|
|
31
|
+
function seedMetrics(productCount, auctionCount = 0) {
|
|
32
|
+
return {
|
|
33
|
+
...emptyMetrics,
|
|
34
|
+
productCount,
|
|
35
|
+
auctionCount,
|
|
36
|
+
totalProductCount: productCount,
|
|
37
|
+
totalAuctionCount: auctionCount,
|
|
38
|
+
totalItemCount: productCount + auctionCount,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
31
41
|
// ──────────────────────────────────────────────────────────────────────────────
|
|
32
42
|
// Categories: 6 broad collectibles roots + YGO-specific sub-hierarchy + leaves
|
|
33
43
|
// ──────────────────────────────────────────────────────────────────────────────
|
|
@@ -52,7 +62,7 @@ const rawCategories = [
|
|
|
52
62
|
isLeaf: false,
|
|
53
63
|
position: 0,
|
|
54
64
|
subtreeSize: 4,
|
|
55
|
-
metrics:
|
|
65
|
+
metrics: seedMetrics(34, 5),
|
|
56
66
|
isFeatured: true,
|
|
57
67
|
featuredPriority: 1,
|
|
58
68
|
isBrand: false,
|
|
@@ -90,7 +100,7 @@ const rawCategories = [
|
|
|
90
100
|
isLeaf: true,
|
|
91
101
|
position: 0,
|
|
92
102
|
subtreeSize: 0,
|
|
93
|
-
metrics:
|
|
103
|
+
metrics: seedMetrics(17, 4),
|
|
94
104
|
isFeatured: false,
|
|
95
105
|
isBrand: false,
|
|
96
106
|
seo: {
|
|
@@ -127,7 +137,7 @@ const rawCategories = [
|
|
|
127
137
|
isLeaf: true,
|
|
128
138
|
position: 1,
|
|
129
139
|
subtreeSize: 0,
|
|
130
|
-
metrics:
|
|
140
|
+
metrics: seedMetrics(12, 2),
|
|
131
141
|
isFeatured: false,
|
|
132
142
|
isBrand: false,
|
|
133
143
|
seo: {
|
|
@@ -164,7 +174,7 @@ const rawCategories = [
|
|
|
164
174
|
isLeaf: true,
|
|
165
175
|
position: 2,
|
|
166
176
|
subtreeSize: 0,
|
|
167
|
-
metrics:
|
|
177
|
+
metrics: seedMetrics(3, 1),
|
|
168
178
|
isFeatured: false,
|
|
169
179
|
isBrand: false,
|
|
170
180
|
seo: {
|
|
@@ -201,7 +211,7 @@ const rawCategories = [
|
|
|
201
211
|
isLeaf: true,
|
|
202
212
|
position: 3,
|
|
203
213
|
subtreeSize: 0,
|
|
204
|
-
metrics:
|
|
214
|
+
metrics: seedMetrics(3),
|
|
205
215
|
isFeatured: false,
|
|
206
216
|
isBrand: false,
|
|
207
217
|
seo: {
|
|
@@ -244,7 +254,7 @@ const rawCategories = [
|
|
|
244
254
|
isLeaf: false,
|
|
245
255
|
position: 0,
|
|
246
256
|
subtreeSize: 4,
|
|
247
|
-
metrics:
|
|
257
|
+
metrics: seedMetrics(25, 1),
|
|
248
258
|
isFeatured: true,
|
|
249
259
|
featuredPriority: 2,
|
|
250
260
|
isBrand: false,
|
|
@@ -282,7 +292,7 @@ const rawCategories = [
|
|
|
282
292
|
isLeaf: true,
|
|
283
293
|
position: 0,
|
|
284
294
|
subtreeSize: 0,
|
|
285
|
-
metrics:
|
|
295
|
+
metrics: seedMetrics(3),
|
|
286
296
|
isFeatured: false,
|
|
287
297
|
isBrand: false,
|
|
288
298
|
seo: { title: "Booster Packs | LetItRip", description: "Buy individual YGO booster packs.", keywords: ["booster pack", "yugioh pack"] },
|
|
@@ -308,7 +318,7 @@ const rawCategories = [
|
|
|
308
318
|
isLeaf: true,
|
|
309
319
|
position: 1,
|
|
310
320
|
subtreeSize: 0,
|
|
311
|
-
metrics:
|
|
321
|
+
metrics: seedMetrics(4),
|
|
312
322
|
isFeatured: false,
|
|
313
323
|
isBrand: false,
|
|
314
324
|
seo: { title: "Booster Boxes | LetItRip", description: "Buy full YGO booster boxes (24 packs).", keywords: ["booster box", "yugioh box"] },
|
|
@@ -334,7 +344,7 @@ const rawCategories = [
|
|
|
334
344
|
isLeaf: true,
|
|
335
345
|
position: 2,
|
|
336
346
|
subtreeSize: 0,
|
|
337
|
-
metrics:
|
|
347
|
+
metrics: seedMetrics(3),
|
|
338
348
|
isFeatured: false,
|
|
339
349
|
isBrand: false,
|
|
340
350
|
seo: { title: "Collector Tins | LetItRip", description: "Buy YGO collector tins with promo cards.", keywords: ["collector tin", "yugioh tin"] },
|
|
@@ -360,7 +370,7 @@ const rawCategories = [
|
|
|
360
370
|
isLeaf: true,
|
|
361
371
|
position: 3,
|
|
362
372
|
subtreeSize: 0,
|
|
363
|
-
metrics:
|
|
373
|
+
metrics: seedMetrics(5),
|
|
364
374
|
isFeatured: false,
|
|
365
375
|
isBrand: false,
|
|
366
376
|
seo: { title: "Starter & Structure Decks | LetItRip", description: "Buy YGO starter and structure decks.", keywords: ["starter deck", "structure deck", "yugioh deck"] },
|
|
@@ -392,7 +402,7 @@ const rawCategories = [
|
|
|
392
402
|
isLeaf: false,
|
|
393
403
|
position: 0,
|
|
394
404
|
subtreeSize: 4,
|
|
395
|
-
metrics:
|
|
405
|
+
metrics: seedMetrics(1, 6),
|
|
396
406
|
isFeatured: true,
|
|
397
407
|
featuredPriority: 3,
|
|
398
408
|
isBrand: false,
|
|
@@ -430,7 +440,7 @@ const rawCategories = [
|
|
|
430
440
|
isLeaf: true,
|
|
431
441
|
position: 0,
|
|
432
442
|
subtreeSize: 0,
|
|
433
|
-
metrics:
|
|
443
|
+
metrics: seedMetrics(1, 6),
|
|
434
444
|
isFeatured: false,
|
|
435
445
|
isBrand: false,
|
|
436
446
|
seo: { title: "PSA Graded YGO | LetItRip", description: "Shop PSA graded Yu-Gi-Oh! cards.", keywords: ["psa graded", "psa yugioh", "psa slab"] },
|
|
@@ -688,7 +698,7 @@ const rawCategories = [
|
|
|
688
698
|
isLeaf: false,
|
|
689
699
|
position: 0,
|
|
690
700
|
subtreeSize: 4,
|
|
691
|
-
metrics:
|
|
701
|
+
metrics: seedMetrics(8, 2),
|
|
692
702
|
isFeatured: true,
|
|
693
703
|
featuredPriority: 5,
|
|
694
704
|
isBrand: false,
|
|
@@ -831,7 +841,7 @@ const rawCategories = [
|
|
|
831
841
|
isLeaf: false,
|
|
832
842
|
position: 0,
|
|
833
843
|
subtreeSize: 4,
|
|
834
|
-
metrics:
|
|
844
|
+
metrics: seedMetrics(1),
|
|
835
845
|
isFeatured: true,
|
|
836
846
|
featuredPriority: 6,
|
|
837
847
|
isBrand: false,
|
|
@@ -858,7 +868,7 @@ const rawCategories = [
|
|
|
858
868
|
isLeaf: true,
|
|
859
869
|
position: 0,
|
|
860
870
|
subtreeSize: 0,
|
|
861
|
-
metrics:
|
|
871
|
+
metrics: seedMetrics(1),
|
|
862
872
|
isFeatured: true,
|
|
863
873
|
isBrand: false,
|
|
864
874
|
seo: { title: "Pokémon TCG | LetItRip", description: "Buy Pokémon cards — booster packs, ETBs, singles, graded slabs.", keywords: ["pokemon tcg", "pokemon cards", "charizard", "pikachu card"] },
|
|
@@ -1121,7 +1131,7 @@ const rawCategories = [
|
|
|
1121
1131
|
isLeaf: false,
|
|
1122
1132
|
position: 0,
|
|
1123
1133
|
subtreeSize: 4,
|
|
1124
|
-
metrics:
|
|
1134
|
+
metrics: seedMetrics(1),
|
|
1125
1135
|
isFeatured: true,
|
|
1126
1136
|
featuredPriority: 8,
|
|
1127
1137
|
isBrand: false,
|
|
@@ -1556,6 +1566,60 @@ const rawCategories = [
|
|
|
1556
1566
|
createdAt: daysAgo(300),
|
|
1557
1567
|
updatedAt: daysAgo(1),
|
|
1558
1568
|
},
|
|
1569
|
+
// ── SB-UNI-J: Digital Codes root + leaf ───────────────────────────────────
|
|
1570
|
+
{
|
|
1571
|
+
id: "category-digital-codes",
|
|
1572
|
+
slug: "category-digital-codes",
|
|
1573
|
+
name: "Digital Codes",
|
|
1574
|
+
description: "Instant-delivery digital redemption codes — game currency, DLC unlocks, subscription passes, and in-app purchases for Yu-Gi-Oh! digital platforms.",
|
|
1575
|
+
rootId: "category-digital-codes",
|
|
1576
|
+
parentIds: [],
|
|
1577
|
+
childrenIds: [],
|
|
1578
|
+
tier: 0,
|
|
1579
|
+
path: "digital-codes",
|
|
1580
|
+
order: 7,
|
|
1581
|
+
isLeaf: true,
|
|
1582
|
+
position: 0,
|
|
1583
|
+
subtreeSize: 0,
|
|
1584
|
+
metrics: seedMetrics(5),
|
|
1585
|
+
isFeatured: false,
|
|
1586
|
+
isBrand: false,
|
|
1587
|
+
seo: { title: "Digital Codes | LetItRip", description: "Buy Yu-Gi-Oh! digital codes — Master Duel gems, Duel Links gems, battle passes.", keywords: ["digital codes", "master duel gems", "duel links", "yugioh codes"] },
|
|
1588
|
+
display: { icon: "🔑", coverImage: "/media/category-image-digital-codes-20260101.jpg", color: "#1e40af", showInMenu: true, showInFooter: false },
|
|
1589
|
+
isActive: true,
|
|
1590
|
+
isSearchable: true,
|
|
1591
|
+
showOnHomepage: false,
|
|
1592
|
+
createdBy: "user-admin-letitrip",
|
|
1593
|
+
createdAt: daysAgo(300),
|
|
1594
|
+
updatedAt: daysAgo(1),
|
|
1595
|
+
},
|
|
1596
|
+
// ── SB-UNI-K: Live Aquatics root + leaf ─────────────────────────────────
|
|
1597
|
+
{
|
|
1598
|
+
id: "category-live-aquatics",
|
|
1599
|
+
slug: "category-live-aquatics",
|
|
1600
|
+
name: "Live Aquatics",
|
|
1601
|
+
description: "Collectible live aquatic species — koi, bettas, axolotls, shrimp, and other aquarium inhabitants. All vendors verified, CITES-compliant, specialist shipping.",
|
|
1602
|
+
rootId: "category-live-aquatics",
|
|
1603
|
+
parentIds: [],
|
|
1604
|
+
childrenIds: [],
|
|
1605
|
+
tier: 0,
|
|
1606
|
+
path: "live-aquatics",
|
|
1607
|
+
order: 8,
|
|
1608
|
+
isLeaf: true,
|
|
1609
|
+
position: 0,
|
|
1610
|
+
subtreeSize: 0,
|
|
1611
|
+
metrics: emptyMetrics,
|
|
1612
|
+
isFeatured: false,
|
|
1613
|
+
isBrand: false,
|
|
1614
|
+
seo: { title: "Live Aquatics | LetItRip", description: "Buy collectible live aquatics — koi, bettas, axolotls. Verified vendors, specialist shipping.", keywords: ["live aquatics", "koi", "betta", "axolotl", "live fish"] },
|
|
1615
|
+
display: { icon: "🐟", coverImage: "/media/category-image-live-aquatics-20260101.jpg", color: "#0891b2", showInMenu: true, showInFooter: false },
|
|
1616
|
+
isActive: true,
|
|
1617
|
+
isSearchable: true,
|
|
1618
|
+
showOnHomepage: false,
|
|
1619
|
+
createdBy: "user-admin-letitrip",
|
|
1620
|
+
createdAt: daysAgo(300),
|
|
1621
|
+
updatedAt: daysAgo(1),
|
|
1622
|
+
},
|
|
1559
1623
|
];
|
|
1560
1624
|
// ──────────────────────────────────────────────────────────────────────────────
|
|
1561
1625
|
// 25 Brands (SB-UNI-C: brands stored as categoryType:"brand")
|
package/dist/seed/index.d.ts
CHANGED
|
@@ -49,6 +49,9 @@ export { productsStandardSeedData } from "./products-standard-seed-data";
|
|
|
49
49
|
export { productsAuctionsSeedData } from "./products-auctions-seed-data";
|
|
50
50
|
export { productsPreordersSeedData } from "./products-preorders-seed-data";
|
|
51
51
|
export { productsPrizeDrawsSeedData } from "./products-prize-draws-seed-data";
|
|
52
|
+
export { productsClassifiedsSeedData } from "./products-classifieds-seed-data";
|
|
53
|
+
export { productsDigitalCodesSeedData } from "./products-digital-codes-seed-data";
|
|
54
|
+
export { productsLiveItemsSeedData } from "./products-live-items-seed-data";
|
|
52
55
|
export { ordersSeedData } from "./orders-seed-data";
|
|
53
56
|
export { reviewsSeedData } from "./reviews-seed-data";
|
|
54
57
|
export { cartsSeedData } from "./cart-seed-data";
|
package/dist/seed/index.js
CHANGED
|
@@ -37,6 +37,9 @@ export { productsStandardSeedData } from "./products-standard-seed-data";
|
|
|
37
37
|
export { productsAuctionsSeedData } from "./products-auctions-seed-data";
|
|
38
38
|
export { productsPreordersSeedData } from "./products-preorders-seed-data";
|
|
39
39
|
export { productsPrizeDrawsSeedData } from "./products-prize-draws-seed-data";
|
|
40
|
+
export { productsClassifiedsSeedData } from "./products-classifieds-seed-data";
|
|
41
|
+
export { productsDigitalCodesSeedData } from "./products-digital-codes-seed-data";
|
|
42
|
+
export { productsLiveItemsSeedData } from "./products-live-items-seed-data";
|
|
40
43
|
export { ordersSeedData } from "./orders-seed-data";
|
|
41
44
|
export { reviewsSeedData } from "./reviews-seed-data";
|
|
42
45
|
export { cartsSeedData } from "./cart-seed-data";
|
package/dist/seed/manifest.js
CHANGED
|
@@ -14,6 +14,9 @@ import { productsStandardSeedData } from "./products-standard-seed-data";
|
|
|
14
14
|
import { productsAuctionsSeedData } from "./products-auctions-seed-data";
|
|
15
15
|
import { productsPreordersSeedData } from "./products-preorders-seed-data";
|
|
16
16
|
import { productsPrizeDrawsSeedData } from "./products-prize-draws-seed-data";
|
|
17
|
+
import { productsClassifiedsSeedData } from "./products-classifieds-seed-data";
|
|
18
|
+
import { productsDigitalCodesSeedData } from "./products-digital-codes-seed-data";
|
|
19
|
+
import { productsLiveItemsSeedData } from "./products-live-items-seed-data";
|
|
17
20
|
import { ordersSeedData } from "./orders-seed-data";
|
|
18
21
|
import { reviewsSeedData } from "./reviews-seed-data";
|
|
19
22
|
import { bidsSeedData } from "./bids-seed-data";
|
|
@@ -68,6 +71,9 @@ export const SEED_MANIFEST = {
|
|
|
68
71
|
...asArr(productsAuctionsSeedData),
|
|
69
72
|
...asArr(productsPreordersSeedData),
|
|
70
73
|
...asArr(productsPrizeDrawsSeedData),
|
|
74
|
+
...asArr(productsClassifiedsSeedData),
|
|
75
|
+
...asArr(productsDigitalCodesSeedData),
|
|
76
|
+
...asArr(productsLiveItemsSeedData),
|
|
71
77
|
].map((p) => ({
|
|
72
78
|
...p,
|
|
73
79
|
// SB1-G Phase 4 — canonical listingType drives the manifest "type" tag.
|
|
@@ -77,7 +83,15 @@ export const SEED_MANIFEST = {
|
|
|
77
83
|
? "preorder"
|
|
78
84
|
: p.listingType === "prize-draw"
|
|
79
85
|
? "prize-draw"
|
|
80
|
-
: "
|
|
86
|
+
: p.listingType === "classified"
|
|
87
|
+
? "classified"
|
|
88
|
+
: p.listingType === "digital-code"
|
|
89
|
+
? "digital-code"
|
|
90
|
+
: p.listingType === "live"
|
|
91
|
+
? "live"
|
|
92
|
+
: p.listingType === "bundle"
|
|
93
|
+
? "bundle"
|
|
94
|
+
: "standard",
|
|
81
95
|
})), "title"),
|
|
82
96
|
orders: pick(asArr(ordersSeedData)),
|
|
83
97
|
reviews: pick(asArr(reviewsSeedData), "title"),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classified Products Seed Data — Yu-Gi-Oh! Theme (SB-UNI-I)
|
|
3
|
+
*
|
|
4
|
+
* Stored as ProductDocument with listingType: "classified". These are
|
|
5
|
+
* meetup/local-sale items — no cart flow, CTA routes to chat.
|
|
6
|
+
*
|
|
7
|
+
* Prices in INR paise (₹1 = 100 paise).
|
|
8
|
+
*/
|
|
9
|
+
import type { ProductDocument } from "../features/products/schemas/firestore";
|
|
10
|
+
export declare const productsClassifiedsSeedData: Partial<ProductDocument>[];
|