@mohasinac/appkit 2.7.27 → 2.7.31
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/filters/filter-load-options.d.ts +29 -0
- package/dist/_internal/client/features/filters/filter-load-options.js +98 -0
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +1 -1
- package/dist/_internal/server/features/checkout/actions.js +42 -35
- package/dist/_internal/server/features/classified/adapters.d.ts +21 -0
- package/dist/_internal/server/features/classified/adapters.js +24 -0
- package/dist/_internal/server/features/classified/index.d.ts +3 -0
- package/dist/_internal/server/features/classified/index.js +3 -0
- package/dist/_internal/server/features/classified/metadata.d.ts +8 -0
- package/dist/_internal/server/features/classified/metadata.js +43 -0
- package/dist/_internal/server/features/classified/og.d.ts +30 -0
- package/dist/_internal/server/features/classified/og.js +76 -0
- package/dist/_internal/server/features/digital-code/adapters.d.ts +21 -0
- package/dist/_internal/server/features/digital-code/adapters.js +29 -0
- package/dist/_internal/server/features/digital-code/index.d.ts +3 -0
- package/dist/_internal/server/features/digital-code/index.js +3 -0
- package/dist/_internal/server/features/digital-code/metadata.d.ts +8 -0
- package/dist/_internal/server/features/digital-code/metadata.js +36 -0
- package/dist/_internal/server/features/digital-code/og.d.ts +27 -0
- package/dist/_internal/server/features/digital-code/og.js +77 -0
- package/dist/_internal/server/features/live/adapters.d.ts +21 -0
- package/dist/_internal/server/features/live/adapters.js +34 -0
- package/dist/_internal/server/features/live/index.d.ts +3 -0
- package/dist/_internal/server/features/live/index.js +3 -0
- package/dist/_internal/server/features/live/metadata.d.ts +8 -0
- package/dist/_internal/server/features/live/metadata.js +39 -0
- package/dist/_internal/server/features/live/og.d.ts +27 -0
- package/dist/_internal/server/features/live/og.js +72 -0
- package/dist/_internal/server/features/promotions/actions.js +4 -3
- package/dist/_internal/server/jobs/core/onOrderCreate.js +19 -16
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +25 -22
- package/dist/_internal/server/jobs/core/onProductWrite.js +48 -58
- package/dist/_internal/shared/actions/action-registry.js +504 -9
- package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
- package/dist/_internal/shared/features/brands/schema.d.ts +5 -5
- package/dist/_internal/shared/features/cart/schema.d.ts +18 -18
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +1 -1
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +38 -38
- package/dist/_internal/shared/features/events/schema.d.ts +8 -8
- package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
- package/dist/_internal/shared/features/products/schema.d.ts +42 -42
- package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
- package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
- package/dist/_internal/shared/media/limits.js +4 -3
- package/dist/client.d.ts +4 -0
- package/dist/client.js +2 -0
- package/dist/configs/next.js +4 -0
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +2 -0
- package/dist/constants/field-names.d.ts +1 -0
- package/dist/constants/field-names.js +1 -0
- package/dist/constants/table-keys.d.ts +6 -0
- package/dist/constants/table-keys.js +9 -0
- package/dist/core/hooks/useSyncManager.js +9 -8
- package/dist/features/about/components/FeesView.js +10 -7
- package/dist/features/about/components/HelpPageView.js +10 -1
- package/dist/features/about/components/HowAuctionsWorkView.js +10 -1
- package/dist/features/about/components/HowCheckoutWorksView.js +10 -1
- package/dist/features/about/components/HowOffersWorkView.js +10 -1
- package/dist/features/about/components/HowOrdersWorkView.js +10 -1
- package/dist/features/about/components/HowPayoutsWorkView.js +10 -1
- package/dist/features/about/components/HowPreOrdersWorkView.js +10 -1
- package/dist/features/about/components/HowReviewsWorkView.js +10 -1
- package/dist/features/about/components/PublicProfileView.js +46 -16
- package/dist/features/about/components/SecurityPrivacyView.js +7 -1
- package/dist/features/account/components/AddressesIndexListing.js +2 -2
- package/dist/features/account/components/NotificationBell.js +27 -16
- package/dist/features/account/components/NotificationPreferencesPanel.d.ts +9 -0
- package/dist/features/account/components/NotificationPreferencesPanel.js +91 -0
- package/dist/features/account/components/UserSidebar.js +4 -4
- package/dist/features/account/components/UserSupportView.js +16 -6
- package/dist/features/account/components/index.d.ts +2 -0
- package/dist/features/account/components/index.js +1 -0
- package/dist/features/account/schemas/index.d.ts +4 -4
- package/dist/features/account/types/index.d.ts +34 -0
- package/dist/features/admin/actions/admin-actions.js +4 -3
- package/dist/features/admin/actions/notification-actions.d.ts +24 -22
- package/dist/features/admin/actions/notification-actions.js +122 -22
- package/dist/features/admin/components/AdminAdEditorView.js +29 -15
- package/dist/features/admin/components/AdminAddressEditorView.d.ts +7 -0
- package/dist/features/admin/components/AdminAddressEditorView.js +117 -0
- package/dist/features/admin/components/AdminAdsView.js +22 -28
- package/dist/features/admin/components/AdminAllEventEntriesView.js +6 -1
- package/dist/features/admin/components/AdminBidsView.js +10 -3
- package/dist/features/admin/components/AdminBlogEditorView.js +2 -2
- package/dist/features/admin/components/AdminBlogView.js +8 -3
- package/dist/features/admin/components/AdminBrandsView.js +7 -2
- package/dist/features/admin/components/AdminBundleEditorView.js +5 -2
- package/dist/features/admin/components/AdminCarouselEditorView.js +6 -3
- package/dist/features/admin/components/AdminCarouselView.js +13 -7
- package/dist/features/admin/components/AdminCategoriesView.js +8 -3
- package/dist/features/admin/components/AdminCategoryEditorView.js +12 -9
- package/dist/features/admin/components/AdminContactView.js +6 -1
- package/dist/features/admin/components/AdminCouponEditorView.js +8 -2
- package/dist/features/admin/components/AdminCouponsView.js +6 -1
- package/dist/features/admin/components/AdminEmployeeEditorView.js +12 -9
- package/dist/features/admin/components/AdminFaqEditorView.js +2 -2
- package/dist/features/admin/components/AdminFaqsView.js +7 -2
- package/dist/features/admin/components/AdminFeatureFlagsView.js +58 -13
- package/dist/features/admin/components/AdminFeaturesView.js +4 -3
- package/dist/features/admin/components/AdminMediaView.js +9 -8
- package/dist/features/admin/components/AdminNavigationView.js +10 -17
- package/dist/features/admin/components/AdminNewsletterView.js +6 -1
- package/dist/features/admin/components/AdminNotificationsView.js +11 -3
- package/dist/features/admin/components/AdminOrdersView.js +6 -1
- package/dist/features/admin/components/AdminPayoutsView.js +10 -3
- package/dist/features/admin/components/AdminPrizeDrawsView.js +10 -3
- package/dist/features/admin/components/AdminProductEditorView.d.ts +3 -1
- package/dist/features/admin/components/AdminProductEditorView.js +12 -9
- package/dist/features/admin/components/AdminProductsView.js +18 -12
- package/dist/features/admin/components/AdminReturnRequestsView.js +5 -4
- package/dist/features/admin/components/AdminReviewsView.js +36 -26
- package/dist/features/admin/components/AdminScammerEditorView.js +3 -2
- package/dist/features/admin/components/AdminScammersView.js +28 -26
- package/dist/features/admin/components/AdminSectionsView.js +112 -99
- package/dist/features/admin/components/AdminSessionsView.js +10 -3
- package/dist/features/admin/components/AdminSidebar.js +4 -4
- package/dist/features/admin/components/AdminSiteSettingsView.js +45 -4
- package/dist/features/admin/components/AdminStoresView.js +6 -1
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +0 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +1 -1
- package/dist/features/admin/components/AdminSupportTicketsView.js +32 -34
- package/dist/features/admin/components/AdminTeamView.js +6 -1
- package/dist/features/admin/components/AdminUserEditorView.js +8 -15
- package/dist/features/admin/components/AdminUsersView.js +6 -1
- package/dist/features/admin/components/AdminViewCards.js +4 -3
- package/dist/features/admin/components/DashboardStats.js +2 -2
- package/dist/features/admin/components/DataTable.js +2 -2
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/components/sections/adminSectionsTypes.js +4 -3
- package/dist/features/admin/repository/chat.repository.js +8 -8
- package/dist/features/admin/repository/site-settings.repository.d.ts +1 -0
- package/dist/features/admin/repository/site-settings.repository.js +11 -9
- package/dist/features/admin/schemas/firestore.d.ts +38 -0
- package/dist/features/admin/schemas/firestore.js +15 -0
- package/dist/features/auctions/components/AuctionBidsTable.d.ts +13 -0
- package/dist/features/auctions/components/AuctionBidsTable.js +62 -0
- package/dist/features/auctions/components/AuctionDetailPageView.js +15 -21
- package/dist/features/auctions/components/AuctionFilters.d.ts +7 -1
- package/dist/features/auctions/components/AuctionFilters.js +3 -2
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +18 -9
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +3 -2
- package/dist/features/auctions/components/index.d.ts +2 -1
- package/dist/features/auctions/components/index.js +1 -1
- package/dist/features/auctions/schemas/index.d.ts +14 -14
- package/dist/features/auth/actions/realtime-token-actions.js +19 -4
- package/dist/features/auth/components/RegisterForm.js +8 -4
- package/dist/features/auth/consent-otp.d.ts +2 -0
- package/dist/features/auth/consent-otp.js +8 -0
- package/dist/features/auth/schemas/firestore.d.ts +2 -0
- package/dist/features/auth/schemas/firestore.js +18 -25
- package/dist/features/auth/schemas/index.d.ts +2 -2
- package/dist/features/before-after/api/[id]/route.js +8 -6
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/actions/blog-actions.d.ts +3 -3
- package/dist/features/blog/components/BlogIndexListing.js +21 -2
- package/dist/features/blog/components/BlogPostForm.js +11 -5
- package/dist/features/blog/components/BlogPostView.js +10 -2
- package/dist/features/blog/schemas/index.d.ts +18 -18
- package/dist/features/cart/components/CartDrawer.js +3 -2
- package/dist/features/cart/components/CartView.js +2 -1
- package/dist/features/cart/components/CheckoutView.js +2 -1
- package/dist/features/cart/repository/cart.repository.js +4 -3
- package/dist/features/cart/utils/pending-ops.d.ts +1 -1
- package/dist/features/categories/api/[id]/route.js +4 -3
- package/dist/features/categories/api/route.js +4 -3
- package/dist/features/categories/components/BrandDetailPageView.js +2 -2
- package/dist/features/categories/components/BrandDetailTabs.d.ts +5 -1
- package/dist/features/categories/components/BrandDetailTabs.js +30 -16
- package/dist/features/categories/components/BundleCollage.d.ts +8 -0
- package/dist/features/categories/components/BundleCollage.js +50 -0
- package/dist/features/categories/components/BundleDetailView.js +2 -10
- package/dist/features/categories/components/BundleItemsPicker.js +20 -13
- package/dist/features/categories/components/CategoriesIndexListing.js +28 -9
- package/dist/features/categories/components/CategoryDetailPageView.js +2 -2
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +5 -1
- package/dist/features/categories/components/CategoryDetailTabs.js +31 -16
- package/dist/features/categories/components/CategoryProductsListing.js +52 -13
- package/dist/features/categories/components/index.d.ts +2 -0
- package/dist/features/categories/components/index.js +1 -0
- package/dist/features/categories/schemas/index.d.ts +6 -6
- package/dist/features/checkout/actions/checkout-actions.js +4 -3
- package/dist/features/checkout/hooks/usePaymentCheckout.js +31 -22
- package/dist/features/classified/components/ClassifiedFilters.d.ts +12 -0
- package/dist/features/classified/components/ClassifiedFilters.js +20 -0
- package/dist/features/classified/components/ClassifiedIndexListing.d.ts +4 -0
- package/dist/features/classified/components/ClassifiedIndexListing.js +110 -0
- package/dist/features/classified/components/ClassifiedListView.d.ts +6 -0
- package/dist/features/classified/components/ClassifiedListView.js +43 -0
- package/dist/features/classified/components/index.d.ts +6 -0
- package/dist/features/classified/components/index.js +3 -0
- package/dist/features/collections/api/[slug]/route.js +16 -12
- package/dist/features/collections/schemas/index.d.ts +5 -5
- package/dist/features/consultation/api/[id]/route.js +12 -9
- package/dist/features/consultation/components/ConsultationForm.js +3 -2
- package/dist/features/consultation/schemas/index.d.ts +6 -6
- package/dist/features/contact/email.js +77 -116
- package/dist/features/copilot/components/AdminCopilotView.js +12 -2
- package/dist/features/corporate/api/[id]/route.js +12 -9
- package/dist/features/corporate/components/CorporateInquiryForm.js +2 -1
- package/dist/features/digital-codes/components/DigitalCodeFilters.d.ts +12 -0
- package/dist/features/digital-codes/components/DigitalCodeFilters.js +17 -0
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.d.ts +4 -0
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +107 -0
- package/dist/features/digital-codes/components/DigitalCodesListView.d.ts +6 -0
- package/dist/features/digital-codes/components/DigitalCodesListView.js +37 -0
- package/dist/features/digital-codes/components/index.d.ts +6 -0
- package/dist/features/digital-codes/components/index.js +3 -0
- package/dist/features/events/actions/event-actions.js +4 -3
- package/dist/features/events/components/AdminEventEditorView.js +3 -2
- package/dist/features/events/components/AdminEventsView.js +4 -2
- package/dist/features/events/components/EventPollWidget.js +5 -5
- package/dist/features/events/components/EventsIndexListing.js +2 -2
- package/dist/features/events/repository/event-entry.repository.d.ts +1 -0
- package/dist/features/events/repository/event-entry.repository.js +5 -0
- package/dist/features/events/schemas/index.d.ts +20 -20
- package/dist/features/faq/actions/faq-actions.d.ts +8 -8
- package/dist/features/faq/components/ContactCTA.js +3 -1
- package/dist/features/faq/components/FAQAccordion.js +1 -1
- package/dist/features/faq/schemas/index.d.ts +4 -4
- package/dist/features/filters/AsyncFacetSection.d.ts +18 -0
- package/dist/features/filters/AsyncFacetSection.js +65 -0
- package/dist/features/filters/index.d.ts +2 -0
- package/dist/features/filters/index.js +1 -0
- package/dist/features/forms/Checkbox.js +2 -2
- package/dist/features/forms/Input.js +2 -2
- package/dist/features/forms/Radio.js +5 -5
- package/dist/features/forms/Select.js +2 -2
- package/dist/features/forms/Slider.js +2 -2
- package/dist/features/forms/Textarea.js +2 -2
- package/dist/features/homepage/api/[id]/route.js +4 -3
- package/dist/features/homepage/api/sections/[id]/route.js +12 -9
- package/dist/features/homepage/components/AdSlot.js +2 -1
- package/dist/features/homepage/components/AdvertisementBanner.js +5 -3
- package/dist/features/homepage/components/BrandsSection.js +2 -2
- package/dist/features/homepage/components/CTABannerSection.js +2 -2
- package/dist/features/homepage/components/CharacterHotspot.d.ts +2 -2
- package/dist/features/homepage/components/CharacterHotspot.js +119 -157
- package/dist/features/homepage/components/CharacterHotspotForm.js +25 -20
- package/dist/features/homepage/components/CustomCardsSection.js +8 -6
- package/dist/features/homepage/components/FeaturedProductsSection.js +2 -2
- package/dist/features/homepage/components/GoogleReviewsSection.js +3 -3
- package/dist/features/homepage/components/HeroBanner.js +5 -4
- package/dist/features/homepage/components/HeroCarousel.js +13 -26
- package/dist/features/homepage/components/HowItWorksSection.js +4 -2
- package/dist/features/homepage/components/SocialFeedSection.js +2 -2
- package/dist/features/homepage/components/SocialPostCard.js +3 -2
- package/dist/features/homepage/lib/social-feed-fetcher.js +6 -3
- package/dist/features/layout/AppLayoutShell.d.ts +8 -2
- package/dist/features/layout/AppLayoutShell.js +54 -78
- package/dist/features/layout/BottomActions.js +43 -48
- package/dist/features/live/components/LiveItemFilters.d.ts +12 -0
- package/dist/features/live/components/LiveItemFilters.js +24 -0
- package/dist/features/live/components/LiveItemsIndexListing.d.ts +4 -0
- package/dist/features/live/components/LiveItemsIndexListing.js +108 -0
- package/dist/features/live/components/LiveItemsListView.d.ts +6 -0
- package/dist/features/live/components/LiveItemsListView.js +43 -0
- package/dist/features/live/components/index.d.ts +6 -0
- package/dist/features/live/components/index.js +3 -0
- package/dist/features/media/MediaLightbox.js +8 -14
- package/dist/features/media/types/index.d.ts +2 -2
- package/dist/features/media/upload/CameraCapture.js +2 -2
- package/dist/features/media/upload/ImageUpload.js +4 -2
- package/dist/features/media/upload/MediaUploadField.js +24 -8
- package/dist/features/media/upload/MediaUploadList.js +1 -1
- package/dist/features/orders/actions/order-actions.js +4 -3
- package/dist/features/orders/components/MarketplaceOrderCard.js +2 -1
- package/dist/features/orders/components/OrderFilters.js +12 -9
- package/dist/features/orders/schemas/index.d.ts +6 -6
- package/dist/features/pre-orders/api/[id]/route.js +12 -9
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -4
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +29 -22
- package/dist/features/pre-orders/components/PreOrderFilters.d.ts +7 -1
- package/dist/features/pre-orders/components/PreOrderFilters.js +3 -2
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +17 -52
- package/dist/features/pre-orders/components/PreorderCard.d.ts +0 -9
- package/dist/features/pre-orders/components/PreorderCard.js +2 -13
- package/dist/features/pre-orders/components/index.d.ts +1 -1
- package/dist/features/pre-orders/components/index.js +1 -1
- package/dist/features/pre-orders/schemas/index.d.ts +10 -10
- package/dist/features/products/api/[id]/route.js +9 -7
- package/dist/features/products/api/route.js +1 -1
- package/dist/features/products/columns/productTableColumns.js +3 -3
- package/dist/features/products/components/AuctionsIndexListing.js +15 -51
- package/dist/features/products/components/BidHistory.js +2 -2
- package/dist/features/products/components/CompareOverlay.d.ts +2 -0
- package/dist/features/products/components/CompareOverlay.js +3 -2
- package/dist/features/products/components/MakeOfferButton.js +20 -14
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -1
- package/dist/features/products/components/PrizeDrawCollage.d.ts +1 -15
- package/dist/features/products/components/PrizeDrawCollage.js +54 -14
- package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -1
- package/dist/features/products/components/PrizeDrawEntryActions.js +2 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +9 -7
- package/dist/features/products/components/PrizeDrawsIndexListing.js +18 -51
- package/dist/features/products/components/PrizeRevealModal.js +24 -14
- package/dist/features/products/components/ProductDetailPageView.js +2 -1
- package/dist/features/products/components/ProductFilters.d.ts +7 -1
- package/dist/features/products/components/ProductFilters.js +11 -8
- package/dist/features/products/components/ProductForm.js +18 -16
- package/dist/features/products/components/ProductGalleryClient.js +2 -1
- package/dist/features/products/components/ProductGrid.js +12 -15
- package/dist/features/products/components/ProductsIndexListing.js +16 -52
- package/dist/features/products/components/ProductsIndexPageView.js +2 -2
- package/dist/features/products/repository/products.repository.d.ts +4 -0
- package/dist/features/products/repository/products.repository.js +22 -3
- package/dist/features/products/schemas/firestore.d.ts +7 -1
- package/dist/features/products/schemas/index.d.ts +56 -56
- package/dist/features/products/schemas/product-features.validators.d.ts +14 -14
- package/dist/features/products/types/index.d.ts +4 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +1 -1
- package/dist/features/promotions/schemas/index.d.ts +6 -6
- package/dist/features/reviews/actions/review-actions.js +6 -5
- package/dist/features/reviews/api/[id]/route.js +4 -3
- package/dist/features/reviews/components/ReviewDetailPageView.js +2 -2
- package/dist/features/reviews/components/ReviewDetailShell.js +6 -3
- package/dist/features/reviews/components/ReviewsIndexListing.js +2 -2
- package/dist/features/reviews/schemas/index.d.ts +6 -6
- package/dist/features/scams/components/ScamProfileView.js +19 -10
- package/dist/features/scams/components/ScamRegistryView.js +2 -1
- package/dist/features/search/components/Search.d.ts +1 -1
- package/dist/features/search/components/Search.js +56 -49
- package/dist/features/search/schemas/index.d.ts +5 -5
- package/dist/features/seller/actions/offer-actions.js +11 -9
- package/dist/features/seller/components/SellerAddressesView.js +6 -4
- package/dist/features/seller/components/SellerBidsView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +1 -1
- package/dist/features/seller/components/SellerOffersPanel.js +6 -1
- package/dist/features/seller/components/SellerOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +3 -3
- package/dist/features/seller/components/SellerPreOrdersView.js +5 -4
- package/dist/features/seller/components/SellerPrizeDrawsView.js +5 -4
- package/dist/features/seller/components/SellerProductShell.d.ts +19 -1
- package/dist/features/seller/components/SellerProductShell.js +75 -9
- package/dist/features/seller/components/SellerProductsView.js +10 -11
- package/dist/features/seller/components/SellerShippingView.js +3 -3
- package/dist/features/seller/components/SellerSidebar.js +10 -7
- package/dist/features/seller/components/SellerStorefrontView.js +3 -3
- package/dist/features/seller/schemas/index.d.ts +4 -4
- package/dist/features/shell/FormShell.js +2 -1
- package/dist/features/shell/QuickFormDrawer.js +4 -3
- package/dist/features/shell/StepForm.js +4 -3
- package/dist/features/stores/actions/store-query-actions.js +4 -3
- package/dist/features/stores/components/StoreAboutView.js +2 -1
- package/dist/features/stores/components/StoreAuctionsListing.js +43 -64
- package/dist/features/stores/components/StoreDetailLayoutView.js +18 -4
- package/dist/features/stores/components/StorePreOrdersListing.js +33 -57
- package/dist/features/stores/components/StoreProductsListing.js +16 -49
- package/dist/features/stores/components/StoresIndexListing.js +2 -2
- package/dist/features/stores/schemas/index.d.ts +2 -2
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +8 -7
- package/dist/features/wishlist/hooks/useGuestWishlist.d.ts +5 -5
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +6 -6
- package/dist/features/wishlist/utils/guest-wishlist.d.ts +5 -5
- package/dist/index.d.ts +27 -3
- package/dist/index.js +1743 -1725
- package/dist/monitoring/server-logger.js +5 -9
- package/dist/next/api/apiHandler.js +56 -37
- package/dist/next/components/GlobalError.js +2 -1
- package/dist/next/routing/route-map.d.ts +41 -0
- package/dist/next/routing/route-map.js +17 -0
- package/dist/react/ErrorBoundary.js +2 -1
- package/dist/react/contexts/SessionContext.js +38 -28
- package/dist/react/hooks/useCamera.d.ts +1 -1
- package/dist/react/hooks/useCamera.js +8 -7
- package/dist/seed/products-auctions-seed-data.js +40 -40
- package/dist/seed/products-preorders-seed-data.js +16 -16
- package/dist/seed/products-prize-draws-seed-data.js +4 -4
- package/dist/seed/products-standard-seed-data.js +202 -202
- package/dist/seed/site-settings-seed-data.js +6 -0
- package/dist/server-entry.d.ts +3 -0
- package/dist/server-entry.js +3 -0
- package/dist/server.d.ts +12 -0
- package/dist/server.js +15 -0
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/DataTable.js +28 -7
- package/dist/ui/components/Button.d.ts +8 -1
- package/dist/ui/components/Button.js +47 -8
- package/dist/ui/components/CollageLightbox.d.ts +18 -0
- package/dist/ui/components/CollageLightbox.js +41 -0
- package/dist/ui/components/Dropdown.js +7 -6
- package/dist/ui/components/ImageLightbox.d.ts +7 -1
- package/dist/ui/components/ImageLightbox.js +15 -5
- package/dist/ui/components/PageLoader.js +4 -3
- package/dist/ui/components/PaginatedMultiSelect.d.ts +28 -0
- package/dist/ui/components/PaginatedMultiSelect.js +141 -0
- package/dist/ui/components/PaginatedMultiSelect.style.css +272 -0
- package/dist/ui/components/Semantic.js +1 -1
- package/dist/ui/components/SideDrawer.js +17 -15
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -0
- package/dist/utils/number.formatter.js +5 -13
- package/dist/utils/string.formatter.js +21 -18
- package/dist/validation/schemas.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
3
|
-
import { useState, useCallback
|
|
4
|
-
import { SlidersHorizontal, X } from "lucide-react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useCallback } from "react";
|
|
5
4
|
import { useUrlTable } from "../../../react/hooks/useUrlTable";
|
|
5
|
+
import { usePendingTable } from "../../../react/hooks/usePendingTable";
|
|
6
6
|
import { useProducts } from "../../products/hooks/useProducts";
|
|
7
|
-
import { Pagination, useToast, ListingToolbar, LoginRequiredModal } from "../../../ui";
|
|
7
|
+
import { Pagination, useToast, ListingToolbar, FilterDrawer, LoginRequiredModal, } from "../../../ui";
|
|
8
8
|
import { useAuthGate } from "../../../react/hooks/useAuthGate";
|
|
9
9
|
import { ACTION_ID } from "../../products/constants/action-defs";
|
|
10
10
|
import { ROUTES } from "../../../next";
|
|
@@ -24,58 +24,23 @@ export function StoreProductsListing({ storeId, initialData }) {
|
|
|
24
24
|
const localCart = useGuestCart();
|
|
25
25
|
const localWishlist = useGuestWishlist();
|
|
26
26
|
const wishlistedIds = new Set(localWishlist.items.filter((i) => i.type === "product").map((i) => i.itemId));
|
|
27
|
-
|
|
28
|
-
const [pendingFilters, setPendingFilters] = useState(() => Object.fromEntries(FILTER_KEYS.map((k) => [k, table.get(k)])));
|
|
29
|
-
const pendingTable = useMemo(() => ({
|
|
30
|
-
get: (key) => pendingFilters[key] ?? "",
|
|
31
|
-
getNumber: (key, fallback = 0) => {
|
|
32
|
-
const v = pendingFilters[key];
|
|
33
|
-
if (!v)
|
|
34
|
-
return fallback;
|
|
35
|
-
const n = Number(v);
|
|
36
|
-
return isNaN(n) ? fallback : n;
|
|
37
|
-
},
|
|
38
|
-
set: (key, value) => setPendingFilters((p) => ({ ...p, [key]: value })),
|
|
39
|
-
setMany: (updates) => setPendingFilters((p) => ({ ...p, ...updates })),
|
|
40
|
-
clear: (keys) => {
|
|
41
|
-
const ks = keys ?? FILTER_KEYS;
|
|
42
|
-
setPendingFilters((p) => ({
|
|
43
|
-
...p,
|
|
44
|
-
...Object.fromEntries(ks.map((k) => [k, ""])),
|
|
45
|
-
}));
|
|
46
|
-
},
|
|
47
|
-
setPage: (_) => { },
|
|
48
|
-
setPageSize: (_) => { },
|
|
49
|
-
setSort: (_) => { },
|
|
50
|
-
buildSieveParams: () => "",
|
|
51
|
-
buildSearchParams: () => "",
|
|
52
|
-
params: new URLSearchParams(),
|
|
53
|
-
}), [pendingFilters]);
|
|
27
|
+
const { pendingTable, filterActiveCount, onFilterApply, onFilterClear, onFilterReset } = usePendingTable(table, FILTER_KEYS);
|
|
54
28
|
const openFilters = useCallback(() => {
|
|
55
|
-
|
|
29
|
+
onFilterReset();
|
|
56
30
|
setFilterOpen(true);
|
|
57
|
-
}, [
|
|
31
|
+
}, [onFilterReset]);
|
|
58
32
|
const applyFilters = useCallback(() => {
|
|
59
|
-
|
|
60
|
-
for (const k of FILTER_KEYS)
|
|
61
|
-
updates[k] = pendingFilters[k] ?? "";
|
|
62
|
-
table.setMany(updates);
|
|
33
|
+
onFilterApply();
|
|
63
34
|
setFilterOpen(false);
|
|
64
|
-
}, [
|
|
65
|
-
const clearFilters = useCallback(() => {
|
|
66
|
-
setPendingFilters(Object.fromEntries(FILTER_KEYS.map((k) => [k, ""])));
|
|
67
|
-
}, []);
|
|
35
|
+
}, [onFilterApply]);
|
|
68
36
|
const resetAll = useCallback(() => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
updates[k] = "";
|
|
72
|
-
table.setMany(updates);
|
|
37
|
+
table.setMany({ q: "", sort: "" });
|
|
38
|
+
onFilterClear();
|
|
73
39
|
setSearchInput("");
|
|
74
|
-
}, [table]);
|
|
75
|
-
const activeFilterCount = FILTER_KEYS.filter((k) => !!table.get(k)).length;
|
|
40
|
+
}, [table, onFilterClear]);
|
|
76
41
|
const hasActiveState = !!table.get("q") ||
|
|
77
42
|
table.get("sort") !== "-createdAt" ||
|
|
78
|
-
|
|
43
|
+
filterActiveCount > 0;
|
|
79
44
|
const params = {
|
|
80
45
|
q: table.get("q") || undefined,
|
|
81
46
|
condition: table.get("condition") || undefined,
|
|
@@ -128,5 +93,7 @@ export function StoreProductsListing({ storeId, initialData }) {
|
|
|
128
93
|
});
|
|
129
94
|
showToast("Added to cart", "success");
|
|
130
95
|
}, [localCart, showToast]);
|
|
131
|
-
return (_jsxs("div", { className: "min-h-[200px]", children: [_jsx(ListingToolbar, { filterCount:
|
|
96
|
+
return (_jsxs("div", { className: "min-h-[200px]", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search store products...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || "-createdAt", sortOptions: PRODUCT_PUBLIC_SORT_OPTIONS, onSortChange: (v) => {
|
|
97
|
+
table.set("sort", v);
|
|
98
|
+
}, view: view === "card" ? "grid" : "list", onViewChange: (v) => handleViewToggle(v === "grid" ? "card" : "list"), onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx("div", { className: "py-6", children: isLoading ? (_jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-6", children: Array.from({ length: 8 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-100 dark:border-slate-700 overflow-hidden animate-pulse", children: [_jsx("div", { className: "aspect-square bg-zinc-200 dark:bg-slate-700" }), _jsxs("div", { className: "p-3 space-y-2", children: [_jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-3/4" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-1/2" }), _jsx("div", { className: "h-4 bg-zinc-200 dark:bg-slate-700 rounded w-1/3" })] })] }, i))) })) : (_jsx(ProductGrid, { products: products, getProductHref: (p) => String(ROUTES.PUBLIC.PRODUCT_DETAIL(p.slug || p.id)), view: view, emptyLabel: "This store has no products yet.", onWishlistToggle: handleWishlistToggle, wishlistedIds: wishlistedIds, onAddToCart: handleAddToCart })) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: onFilterClear, activeCount: filterActiveCount, hideTrigger: true, children: _jsx(ProductFilters, { table: pendingTable, currencyPrefix: "\u20B9" }) }), _jsx(LoginRequiredModal, { isOpen: modalOpen, onClose: closeModal, message: modalMessage })] }));
|
|
132
99
|
}
|
|
@@ -4,7 +4,7 @@ import { useState, useCallback, useMemo } from "react";
|
|
|
4
4
|
import { SlidersHorizontal, X } from "lucide-react";
|
|
5
5
|
import { useUrlTable } from "../../../react/hooks/useUrlTable";
|
|
6
6
|
import { useStores } from "../hooks/useStores";
|
|
7
|
-
import { BulkActionBar, Pagination,
|
|
7
|
+
import { BulkActionBar, ListingToolbar, Pagination, Text } from "../../../ui";
|
|
8
8
|
import { ROUTES } from "../../../next";
|
|
9
9
|
import { InteractiveStoreCard } from "./InteractiveStoreCard";
|
|
10
10
|
import { StoreFilters } from "./StoreFilters";
|
|
@@ -128,7 +128,7 @@ export function StoresIndexListing({ initialData }) {
|
|
|
128
128
|
disabled: selection.selectedCount !== 1,
|
|
129
129
|
onClick: () => { selection.clearSelection(); },
|
|
130
130
|
},
|
|
131
|
-
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: table.getNumber("page", 1), totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx("div", { className: "py-6", children: isLoading ? (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: Array.from({ length: 6 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-100 dark:border-slate-700 overflow-hidden animate-pulse", children: [_jsx("div", { className: "aspect-video bg-zinc-200 dark:bg-slate-700" }), _jsxs("div", { className: "p-4 space-y-2.5", children: [_jsx("div", { className: "flex items-center gap-2", children: _jsx("div", { className: "h-10 w-10 rounded-lg bg-zinc-200 dark:bg-slate-700" }) }), _jsx("div", { className: "h-4 bg-zinc-200 dark:bg-slate-700 rounded w-2/3" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-full" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-1/2" })] })] }, i))) })) : stores.length === 0 ? (_jsx(
|
|
131
|
+
] }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: table.getNumber("page", 1), totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx("div", { className: "py-6", children: isLoading ? (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: Array.from({ length: 6 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-100 dark:border-slate-700 overflow-hidden animate-pulse", children: [_jsx("div", { className: "aspect-video bg-zinc-200 dark:bg-slate-700" }), _jsxs("div", { className: "p-4 space-y-2.5", children: [_jsx("div", { className: "flex items-center gap-2", children: _jsx("div", { className: "h-10 w-10 rounded-lg bg-zinc-200 dark:bg-slate-700" }) }), _jsx("div", { className: "h-4 bg-zinc-200 dark:bg-slate-700 rounded w-2/3" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-full" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-1/2" })] })] }, i))) })) : stores.length === 0 ? (_jsx(Text, { className: "py-16 text-center text-sm text-zinc-500 dark:text-zinc-400", children: "No stores found." })) : view === "list" ? (_jsx("div", { className: "flex flex-col divide-y divide-zinc-100 dark:divide-zinc-800 rounded-xl border border-zinc-100 dark:border-zinc-800", children: stores.map((store) => {
|
|
132
132
|
const storeKey = store.storeSlug ?? store.id;
|
|
133
133
|
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
134
|
}) })) : (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: stores.map((store) => {
|
|
@@ -73,13 +73,13 @@ export declare const storeListParamsSchema: z.ZodObject<{
|
|
|
73
73
|
}, "strip", z.ZodTypeAny, {
|
|
74
74
|
sort?: string | undefined;
|
|
75
75
|
pageSize?: number | undefined;
|
|
76
|
-
page?: number | undefined;
|
|
77
76
|
category?: string | undefined;
|
|
77
|
+
page?: number | undefined;
|
|
78
78
|
filters?: string | undefined;
|
|
79
79
|
}, {
|
|
80
80
|
sort?: string | undefined;
|
|
81
81
|
pageSize?: number | undefined;
|
|
82
|
-
page?: number | undefined;
|
|
83
82
|
category?: string | undefined;
|
|
83
|
+
page?: number | undefined;
|
|
84
84
|
filters?: string | undefined;
|
|
85
85
|
}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
|
+
const CLS_SECTION_CARD = "border border-zinc-200 dark:border-zinc-700 rounded-xl p-5";
|
|
4
5
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
5
|
-
import { Alert, Button, Form, FormActions, Input, Toggle, useToast
|
|
6
|
+
import { Alert, Button, Form, FormActions, Heading, Input, Section, Text, Toggle, useToast } from "../../../ui";
|
|
6
7
|
import { apiClient } from "../../../http";
|
|
7
8
|
import { WHATSAPP_SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
|
|
8
9
|
import { buildPurchaseAnnouncementMessage } from "../helpers/whatsapp";
|
|
@@ -119,9 +120,9 @@ export function SellerWhatsAppSettingsView({ hasCapability }) {
|
|
|
119
120
|
},
|
|
120
121
|
});
|
|
121
122
|
if (!hasCapability) {
|
|
122
|
-
return (_jsx("div", { className: "max-w-xl mx-auto py-8 px-4", children: _jsxs(Alert, { variant: "warning", children: [_jsx(
|
|
123
|
+
return (_jsx("div", { className: "max-w-xl mx-auto py-8 px-4", children: _jsxs(Alert, { variant: "warning", children: [_jsx(Text, { className: "font-medium", children: "WhatsApp catalog sync is not enabled for your store." }), _jsx(Text, { className: "text-sm mt-1", children: "Contact LetItRip support to request access to the WhatsApp Business integration." })] }) }));
|
|
123
124
|
}
|
|
124
|
-
return (_jsxs("div", { className: "max-w-2xl mx-auto space-y-8 py-6 px-4", children: [_jsxs(
|
|
125
|
+
return (_jsxs("div", { className: "max-w-2xl mx-auto space-y-8 py-6 px-4", children: [_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "text-base font-semibold text-zinc-900 dark:text-zinc-100 mb-4", children: "How to connect your WhatsApp Business account" }), _jsx("ol", { className: "space-y-3", children: STEPS.map((step) => {
|
|
125
126
|
const done = step.checkKey === undefined
|
|
126
127
|
? false
|
|
127
128
|
: step.checkKey === "connected"
|
|
@@ -129,11 +130,11 @@ export function SellerWhatsAppSettingsView({ hasCapability }) {
|
|
|
129
130
|
: Boolean(cfg?.[step.checkKey]);
|
|
130
131
|
return (_jsxs("li", { className: "flex gap-3", children: [_jsx("span", { className: `flex-shrink-0 w-6 h-6 rounded-full text-xs font-bold flex items-center justify-center mt-0.5 ${done
|
|
131
132
|
? "bg-green-500 text-white"
|
|
132
|
-
: "bg-zinc-200 dark:bg-zinc-700 text-zinc-600 dark:text-zinc-300"}`, children: done ? "✓" : step.n }), _jsxs(
|
|
133
|
-
}) })] }), _jsxs(
|
|
133
|
+
: "bg-zinc-200 dark:bg-zinc-700 text-zinc-600 dark:text-zinc-300"}`, children: done ? "✓" : step.n }), _jsxs(_Fragment, { children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: step.title }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 mt-0.5", children: step.body })] })] }, step.n));
|
|
134
|
+
}) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsxs("div", { className: "flex items-center justify-between 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("span", { className: "text-xs font-medium px-2 py-0.5 rounded-full bg-green-100 text-green-800 dark:bg-green-900/40 dark:text-green-300", children: "Connected" })) : (_jsx("span", { className: "text-xs font-medium px-2 py-0.5 rounded-full bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400", children: "Not configured" }))] }), _jsxs(Form, { onSubmit: (e) => {
|
|
134
135
|
e.preventDefault();
|
|
135
136
|
saveMutation.mutate();
|
|
136
|
-
}, 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…" : "Save & Connect" }) })] })] }), _jsxs(
|
|
137
|
+
}, 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…" : "Save & Connect" }) })] })] }), _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("div", { className: "flex items-center justify-between mb-4", children: [_jsxs(_Fragment, { 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("div", { className: "flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400 mb-3", children: [_jsxs("span", { children: ["Last sync: ", new Date(cfg.lastCatalogSyncAt).toLocaleString("en-IN")] }), cfg.lastSyncCount !== undefined && _jsxs("span", { children: ["\u00B7 ", cfg.lastSyncCount, " products"] }), cfg.lastSyncStatus && (_jsx("span", { className: `px-1.5 py-0.5 rounded ${STATUS_COLOR[cfg.lastSyncStatus] ?? ""}`, children: cfg.lastSyncStatus }))] })), _jsx(Text, { className: "text-xs text-zinc-400 dark:text-zinc-500 mb-3", children: "Only published standard products are synced. Auctions and pre-orders are excluded. Batches of up to 50 products per call." }), _jsx(Button, { onClick: () => syncMutation.mutate(), isLoading: syncMutation.isPending, disabled: !cfg?.connected || !syncEnabled || syncMutation.isPending, variant: "secondary", children: syncMutation.isPending ? "Syncing…" : "Sync Now" })] }), _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({
|
|
137
138
|
buyerName: "Ravi K.",
|
|
138
139
|
firstItemName: "Charizard PSA 9",
|
|
139
140
|
additionalItemCount: 2,
|
|
@@ -7,14 +7,14 @@ import { type GuestWishlistItem } from "../utils/guest-wishlist";
|
|
|
7
7
|
export declare function useGuestWishlist(): {
|
|
8
8
|
items: GuestWishlistItem[];
|
|
9
9
|
count: number;
|
|
10
|
-
countByType: (type: "product" | "auction" | "preorder" | "category" | "store") => number;
|
|
11
|
-
add: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store", snapshot?: {
|
|
10
|
+
countByType: (type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => number;
|
|
11
|
+
add: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live", snapshot?: {
|
|
12
12
|
title?: string;
|
|
13
13
|
image?: string;
|
|
14
14
|
}) => void;
|
|
15
|
-
remove: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store") => void;
|
|
16
|
-
isInWishlist: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store") => boolean;
|
|
15
|
+
remove: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => void;
|
|
16
|
+
isInWishlist: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => boolean;
|
|
17
17
|
clear: () => void;
|
|
18
|
-
getByType: (type: "product" | "auction" | "preorder" | "category" | "store") => GuestWishlistItem[];
|
|
18
|
+
getByType: (type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => GuestWishlistItem[];
|
|
19
19
|
isInitialized: boolean;
|
|
20
20
|
};
|
|
@@ -29,7 +29,7 @@ export declare function useWishlistWithGuest(userId: string | null | undefined,
|
|
|
29
29
|
productPrice: number;
|
|
30
30
|
productSlug: string;
|
|
31
31
|
addedAt: string | undefined;
|
|
32
|
-
type: "
|
|
32
|
+
type: "auction" | "classified" | "digital-code" | "live" | "category" | "product" | "preorder" | "store";
|
|
33
33
|
}[];
|
|
34
34
|
total: number;
|
|
35
35
|
wishlistedIds: Set<string>;
|
|
@@ -41,15 +41,15 @@ export declare function useWishlistWithGuest(userId: string | null | undefined,
|
|
|
41
41
|
guestWishlist: {
|
|
42
42
|
items: import("..").GuestWishlistItem[];
|
|
43
43
|
count: number;
|
|
44
|
-
countByType: (type: "product" | "auction" | "preorder" | "category" | "store") => number;
|
|
45
|
-
add: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store", snapshot?: {
|
|
44
|
+
countByType: (type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => number;
|
|
45
|
+
add: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live", snapshot?: {
|
|
46
46
|
title?: string;
|
|
47
47
|
image?: string;
|
|
48
48
|
}) => void;
|
|
49
|
-
remove: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store") => void;
|
|
50
|
-
isInWishlist: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store") => boolean;
|
|
49
|
+
remove: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => void;
|
|
50
|
+
isInWishlist: (itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => boolean;
|
|
51
51
|
clear: () => void;
|
|
52
|
-
getByType: (type: "product" | "auction" | "preorder" | "category" | "store") => import("..").GuestWishlistItem[];
|
|
52
|
+
getByType: (type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live") => import("..").GuestWishlistItem[];
|
|
53
53
|
isInitialized: boolean;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface GuestWishlistItem {
|
|
2
2
|
itemId: string;
|
|
3
|
-
type: "product" | "auction" | "preorder" | "category" | "store";
|
|
3
|
+
type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live";
|
|
4
4
|
title?: string;
|
|
5
5
|
image?: string;
|
|
6
6
|
addedAt?: string;
|
|
@@ -11,12 +11,12 @@ export interface GuestWishlistStorage {
|
|
|
11
11
|
removeItem(key: string): void;
|
|
12
12
|
}
|
|
13
13
|
export declare function getGuestWishlistItems(storage?: GuestWishlistStorage | null, key?: string): GuestWishlistItem[];
|
|
14
|
-
export declare function addToGuestWishlist(itemId: string, type: "product" | "auction" | "preorder" | "category" | "store", snapshot?: {
|
|
14
|
+
export declare function addToGuestWishlist(itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live", snapshot?: {
|
|
15
15
|
title?: string;
|
|
16
16
|
image?: string;
|
|
17
17
|
}, storage?: GuestWishlistStorage | null, key?: string): GuestWishlistItem[];
|
|
18
|
-
export declare function removeFromGuestWishlist(itemId: string, type: "product" | "auction" | "preorder" | "category" | "store", storage?: GuestWishlistStorage | null, key?: string): GuestWishlistItem[];
|
|
19
|
-
export declare function isInGuestWishlist(itemId: string, type: "product" | "auction" | "preorder" | "category" | "store", storage?: GuestWishlistStorage | null, key?: string): boolean;
|
|
18
|
+
export declare function removeFromGuestWishlist(itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live", storage?: GuestWishlistStorage | null, key?: string): GuestWishlistItem[];
|
|
19
|
+
export declare function isInGuestWishlist(itemId: string, type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live", storage?: GuestWishlistStorage | null, key?: string): boolean;
|
|
20
20
|
export declare function clearGuestWishlist(storage?: GuestWishlistStorage | null, key?: string): void;
|
|
21
21
|
export declare function getGuestWishlistCount(storage?: GuestWishlistStorage | null, key?: string): number;
|
|
22
|
-
export declare function getGuestWishlistByType(type: "product" | "auction" | "preorder" | "category" | "store", storage?: GuestWishlistStorage | null, key?: string): GuestWishlistItem[];
|
|
22
|
+
export declare function getGuestWishlistByType(type: "product" | "auction" | "preorder" | "category" | "store" | "classified" | "digital-code" | "live", storage?: GuestWishlistStorage | null, key?: string): GuestWishlistItem[];
|
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export type { DynamicSelectOption } from "./ui/index";
|
|
|
61
61
|
export type { DynamicSelectProps } from "./ui/index";
|
|
62
62
|
export type { InlineCreateSelectProps } from "./ui/index";
|
|
63
63
|
export { InlineCreateSelect } from "./ui/index";
|
|
64
|
+
export type { PaginatedMultiSelectProps } from "./ui/index";
|
|
65
|
+
export { PaginatedMultiSelect } from "./ui/index";
|
|
64
66
|
export { EmptyState } from "./ui/index";
|
|
65
67
|
export type { EmptyStateProps } from "./ui/index";
|
|
66
68
|
export type { FilterDrawerProps } from "./ui/index";
|
|
@@ -942,6 +944,8 @@ export type { UserOffersPanelProps } from "./features/account/index";
|
|
|
942
944
|
export { UserOrderTrackView } from "./features/account/index";
|
|
943
945
|
export { UserOrdersView } from "./features/account/index";
|
|
944
946
|
export { UserSettingsView } from "./features/account/index";
|
|
947
|
+
export { NotificationPreferencesPanel } from "./features/account/index";
|
|
948
|
+
export type { NotificationPreferencesPanelProps } from "./features/account/index";
|
|
945
949
|
export { accountAdminColumns } from "./features/account/index";
|
|
946
950
|
export { buildAccountColumns } from "./features/account/index";
|
|
947
951
|
export { manifest } from "./features/account/index";
|
|
@@ -992,6 +996,8 @@ export type { NotificationBellLabels } from "./features/account/index";
|
|
|
992
996
|
export type { NotificationBellProps } from "./features/account/index";
|
|
993
997
|
export type { NotificationBellRenderLinkProps } from "./features/account/index";
|
|
994
998
|
export type { NotificationPreferences } from "./features/account/index";
|
|
999
|
+
export type { NotificationChannelPrefs } from "./features/account/index";
|
|
1000
|
+
export type { NotificationTypePrefs } from "./features/account/index";
|
|
995
1001
|
export type { NotificationsResponse } from "./features/account/index";
|
|
996
1002
|
export type { OfferStatus } from "./features/account/index";
|
|
997
1003
|
export type { OrderDetailViewLabels } from "./features/account/index";
|
|
@@ -1052,6 +1058,8 @@ export { AdminBrandsView } from "./features/admin/index";
|
|
|
1052
1058
|
export type { AdminBrandsViewProps } from "./features/admin/index";
|
|
1053
1059
|
export { AdminBrandEditorView } from "./features/admin/index";
|
|
1054
1060
|
export type { AdminBrandEditorViewProps } from "./features/admin/index";
|
|
1061
|
+
export { AdminAddressEditorView } from "./features/admin/index";
|
|
1062
|
+
export type { AdminAddressEditorViewProps } from "./features/admin/index";
|
|
1055
1063
|
export { AdminCategoriesView } from "./features/admin/index";
|
|
1056
1064
|
export { AdminCategoryEditorView } from "./features/admin/index";
|
|
1057
1065
|
export type { AdminCategoryEditorViewProps } from "./features/admin/index";
|
|
@@ -1129,6 +1137,8 @@ export { CHAT_ROOM_COLLECTION } from "./features/admin/index";
|
|
|
1129
1137
|
export { CHAT_ROOM_FIELDS } from "./features/admin/index";
|
|
1130
1138
|
export { CHAT_ROOM_INDEXED_FIELDS } from "./features/admin/index";
|
|
1131
1139
|
export { DEFAULT_CHAT_ROOM_DATA } from "./features/admin/index";
|
|
1140
|
+
export { DEFAULT_NOTIFICATION_CHANNELS } from "./features/admin/index";
|
|
1141
|
+
export { meetsMinPriority } from "./features/admin/index";
|
|
1132
1142
|
export { DEFAULT_NOTIFICATION_DATA } from "./features/admin/index";
|
|
1133
1143
|
export { DEFAULT_SITE_SETTINGS_DATA } from "./features/admin/index";
|
|
1134
1144
|
export { DEFAULT_TRUST_BAR_ITEMS } from "./features/admin/index";
|
|
@@ -1224,10 +1234,13 @@ export type { DrawerFormFooterProps } from "./features/admin/index";
|
|
|
1224
1234
|
export type { FeatureFlagKey } from "./features/admin/index";
|
|
1225
1235
|
export type { FeatureFlagMeta } from "./features/admin/index";
|
|
1226
1236
|
export type { FeaturedResult } from "./features/admin/index";
|
|
1237
|
+
export type { NotificationChannelConfig } from "./features/admin/index";
|
|
1227
1238
|
export type { NotificationCreateInput } from "./features/admin/index";
|
|
1228
1239
|
export type { NotificationDocument } from "./features/admin/index";
|
|
1229
1240
|
export type { NotificationPriority } from "./features/admin/index";
|
|
1230
1241
|
export type { NotificationUpdateInput } from "./features/admin/index";
|
|
1242
|
+
export type { SendNotificationInput } from "./features/admin/server";
|
|
1243
|
+
export type { SendNotificationResult } from "./features/admin/server";
|
|
1231
1244
|
export type { QuickActionItem } from "./features/admin/index";
|
|
1232
1245
|
export type { QuickActionsPanelProps } from "./features/admin/index";
|
|
1233
1246
|
export type { SiteSettingsCredentials } from "./features/admin/index";
|
|
@@ -1271,6 +1284,7 @@ export { listAdminUsers } from "./features/admin/server";
|
|
|
1271
1284
|
export { listNotifications } from "./features/admin/server";
|
|
1272
1285
|
export { markAllNotificationsRead } from "./features/admin/server";
|
|
1273
1286
|
export { markNotificationRead } from "./features/admin/server";
|
|
1287
|
+
export { sendNotification } from "./features/admin/server";
|
|
1274
1288
|
export { revokeSession } from "./features/admin/server";
|
|
1275
1289
|
export { revokeUserSessions } from "./features/admin/server";
|
|
1276
1290
|
export { sendChatMessage } from "./features/admin/server";
|
|
@@ -1279,14 +1293,14 @@ export type { AdminActor } from "./features/admin/server";
|
|
|
1279
1293
|
export type { ChatRoomsResult } from "./features/admin/server";
|
|
1280
1294
|
export type { CreateRoomInput } from "./features/admin/server";
|
|
1281
1295
|
export type { CreateRoomResult } from "./features/admin/server";
|
|
1282
|
-
export { AuctionCard } from "./features/auctions/index";
|
|
1283
|
-
export { AuctionCountdown } from "./features/auctions/index";
|
|
1284
1296
|
export { BID_COLLECTION } from "./features/auctions/index";
|
|
1285
1297
|
export { BID_INDEXED_FIELDS } from "./features/auctions/index";
|
|
1286
1298
|
export { BID_PUBLIC_FIELDS } from "./features/auctions/index";
|
|
1287
1299
|
export { BID_UPDATABLE_FIELDS } from "./features/auctions/index";
|
|
1288
1300
|
export { BidStatusValues } from "./features/auctions/index";
|
|
1289
1301
|
export { DEFAULT_BID_DATA } from "./features/auctions/index";
|
|
1302
|
+
export { AuctionBidsTable } from "./features/auctions/index";
|
|
1303
|
+
export type { AuctionBidsTableProps, AuctionWithBids } from "./features/auctions/index";
|
|
1290
1304
|
export { MarketplaceAuctionCard } from "./features/auctions/index";
|
|
1291
1305
|
export { MarketplaceAuctionGrid } from "./features/auctions/index";
|
|
1292
1306
|
export { auctionAdminColumns } from "./features/auctions/index";
|
|
@@ -1341,6 +1355,7 @@ export { CONSENT_OTP_MAX_BYPASS_CREDITS } from "./features/auth/server";
|
|
|
1341
1355
|
export { CONSENT_OTP_VERIFY_RATE_LIMIT } from "./features/auth/server";
|
|
1342
1356
|
export { authMeGET } from "./features/auth/server";
|
|
1343
1357
|
export { buildConsentOtpEmail } from "./features/auth/server";
|
|
1358
|
+
export { buildConsentOtpWhatsApp } from "./features/auth/server";
|
|
1344
1359
|
export { consentOtpRateLimitRef } from "./features/auth/server";
|
|
1345
1360
|
export { consentOtpRef } from "./features/auth/server";
|
|
1346
1361
|
export { createPasswordResetToken } from "./features/auth/server";
|
|
@@ -1875,6 +1890,8 @@ export type { FaqUpdateInput } from "./features/faq/server";
|
|
|
1875
1890
|
export type { VoteFaqActionInput } from "./features/faq/server";
|
|
1876
1891
|
export type { VoteFaqActionResult } from "./features/faq/server";
|
|
1877
1892
|
export { FilterFacetSection } from "./features/filters/index";
|
|
1893
|
+
export { AsyncFacetSection } from "./features/filters/index";
|
|
1894
|
+
export type { AsyncFacetSectionProps } from "./features/filters/index";
|
|
1878
1895
|
export { FilterPanel } from "./features/filters/index";
|
|
1879
1896
|
export { RangeFilter } from "./features/filters/index";
|
|
1880
1897
|
export { SwitchFilter } from "./features/filters/index";
|
|
@@ -2247,9 +2264,14 @@ export type { UsePaymentEventReturn } from "./features/payments/index";
|
|
|
2247
2264
|
export { PaymentsRepository } from "./features/payments/server";
|
|
2248
2265
|
export { MarketplacePreorderCard } from "./features/pre-orders/index";
|
|
2249
2266
|
export { PreorderBadge } from "./features/pre-orders/index";
|
|
2250
|
-
export { PreorderCard } from "./features/pre-orders/index";
|
|
2251
2267
|
export { PreOrdersIndexListing } from "./features/pre-orders/index";
|
|
2252
2268
|
export type { PreOrdersIndexListingProps } from "./features/pre-orders/index";
|
|
2269
|
+
export { ClassifiedIndexListing } from "./features/classified/components/index";
|
|
2270
|
+
export type { ClassifiedIndexListingProps } from "./features/classified/components/index";
|
|
2271
|
+
export { DigitalCodesIndexListing } from "./features/digital-codes/components/index";
|
|
2272
|
+
export type { DigitalCodesIndexListingProps } from "./features/digital-codes/components/index";
|
|
2273
|
+
export { LiveItemsIndexListing } from "./features/live/components/index";
|
|
2274
|
+
export type { LiveItemsIndexListingProps } from "./features/live/components/index";
|
|
2253
2275
|
export { buildPreorderColumns } from "./features/pre-orders/index";
|
|
2254
2276
|
export { getPreorderStatus } from "./features/pre-orders/index";
|
|
2255
2277
|
export { preorderAdminColumns } from "./features/pre-orders/index";
|
|
@@ -2270,6 +2292,8 @@ export { AuctionDetailView } from "./features/products/index";
|
|
|
2270
2292
|
export type { BundlesListViewProps } from "./features/categories/components/BundlesListView";
|
|
2271
2293
|
export { BundleDetailView } from "./features/categories/components/BundleDetailView";
|
|
2272
2294
|
export type { BundleDetailViewProps } from "./features/categories/components/BundleDetailView";
|
|
2295
|
+
export { BundleCollage } from "./features/categories/components/BundleCollage";
|
|
2296
|
+
export type { BundleCollageProps } from "./features/categories/components/BundleCollage";
|
|
2273
2297
|
export { BundleBuyNowCta } from "./features/categories/components/BundleBuyNowCta";
|
|
2274
2298
|
export type { BundleBuyNowCtaProps } from "./features/categories/components/BundleBuyNowCta";
|
|
2275
2299
|
export { AuctionsView } from "./features/products/index";
|