@mohasinac/appkit 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +54 -18
- package/dist/client.js +29 -10
- package/dist/constants/api-endpoints.d.ts +384 -22
- package/dist/constants/api-endpoints.js +68 -13
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/core/contact-submissions.repository.d.ts +32 -0
- package/dist/core/contact-submissions.repository.js +49 -0
- package/dist/core/hooks/useSyncManager.d.ts +1 -0
- package/dist/core/hooks/useSyncManager.js +83 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +1 -0
- package/dist/core/integration-keys.d.ts +4 -0
- package/dist/core/integration-keys.js +8 -0
- package/dist/features/about/components/FAQPageView.js +9 -11
- package/dist/features/about/components/HowPayoutsWorkView.js +1 -1
- package/dist/features/about/components/PolicyPageView.js +32 -11
- package/dist/features/about/components/PublicProfileView.js +77 -11
- package/dist/features/account/components/AddressFilters.d.ts +5 -0
- package/dist/features/account/components/AddressFilters.js +20 -0
- package/dist/features/account/components/AddressesIndexListing.d.ts +6 -0
- package/dist/features/account/components/AddressesIndexListing.js +76 -0
- package/dist/features/account/components/UserOffersPanel.d.ts +8 -0
- package/dist/features/account/components/UserOffersPanel.js +81 -0
- package/dist/features/account/components/UserSettingsView.d.ts +2 -1
- package/dist/features/account/components/UserSettingsView.js +2 -1
- package/dist/features/account/components/UserSidebar.d.ts +12 -3
- package/dist/features/account/components/UserSidebar.js +64 -10
- package/dist/features/account/components/index.d.ts +2 -0
- package/dist/features/account/components/index.js +1 -0
- package/dist/features/account/hooks/useAddresses.d.ts +7 -0
- package/dist/features/account/hooks/useAddresses.js +12 -1
- package/dist/features/admin/actions/admin-actions.d.ts +1 -1
- package/dist/features/admin/actions/admin-actions.js +13 -3
- package/dist/features/admin/actions/admin-read-actions.d.ts +12 -0
- package/dist/features/admin/actions/admin-read-actions.js +18 -0
- package/dist/features/admin/components/AdminAdEditorView.js +6 -7
- package/dist/features/admin/components/AdminAllEventEntriesView.d.ts +4 -0
- package/dist/features/admin/components/AdminAllEventEntriesView.js +102 -0
- package/dist/features/admin/components/AdminBidsView.js +94 -8
- package/dist/features/admin/components/AdminBlogEditorView.d.ts +7 -0
- package/dist/features/admin/components/AdminBlogEditorView.js +162 -0
- package/dist/features/admin/components/AdminBlogView.d.ts +4 -1
- package/dist/features/admin/components/AdminBlogView.js +64 -10
- package/dist/features/admin/components/AdminBrandEditorView.d.ts +7 -0
- package/dist/features/admin/components/AdminBrandEditorView.js +104 -0
- package/dist/features/admin/components/AdminBrandsView.d.ts +4 -0
- package/dist/features/admin/components/AdminBrandsView.js +76 -0
- package/dist/features/admin/components/AdminCarouselEditorView.d.ts +8 -0
- package/dist/features/admin/components/AdminCarouselEditorView.js +204 -0
- package/dist/features/admin/components/AdminCarouselView.js +155 -20
- package/dist/features/admin/components/AdminCartsView.d.ts +4 -0
- package/dist/features/admin/components/AdminCartsView.js +82 -0
- package/dist/features/admin/components/AdminCategoriesView.d.ts +4 -1
- package/dist/features/admin/components/AdminCategoriesView.js +69 -26
- package/dist/features/admin/components/AdminCategoryEditorView.d.ts +7 -0
- package/dist/features/admin/components/AdminCategoryEditorView.js +115 -0
- package/dist/features/admin/components/AdminContactEditorView.d.ts +11 -0
- package/dist/features/admin/components/AdminContactEditorView.js +32 -0
- package/dist/features/admin/components/AdminContactView.d.ts +4 -0
- package/dist/features/admin/components/AdminContactView.js +141 -0
- package/dist/features/admin/components/AdminCouponEditorView.d.ts +7 -0
- package/dist/features/admin/components/AdminCouponEditorView.js +179 -0
- package/dist/features/admin/components/AdminCouponsView.d.ts +4 -1
- package/dist/features/admin/components/AdminCouponsView.js +57 -9
- package/dist/features/admin/components/AdminDashboardView.js +3 -0
- package/dist/features/admin/components/AdminFaqEditorView.d.ts +7 -0
- package/dist/features/admin/components/AdminFaqEditorView.js +128 -0
- package/dist/features/admin/components/AdminFaqsView.d.ts +4 -1
- package/dist/features/admin/components/AdminFaqsView.js +55 -6
- package/dist/features/admin/components/AdminFeatureFlagsView.js +33 -24
- package/dist/features/admin/components/AdminListingScaffold.d.ts +17 -2
- package/dist/features/admin/components/AdminListingScaffold.js +14 -3
- package/dist/features/admin/components/AdminMediaView.js +18 -8
- package/dist/features/admin/components/AdminNavEditorView.d.ts +20 -0
- package/dist/features/admin/components/AdminNavEditorView.js +84 -0
- package/dist/features/admin/components/AdminNavigationView.d.ts +1 -7
- package/dist/features/admin/components/AdminNavigationView.js +84 -72
- package/dist/features/admin/components/AdminNewsletterView.d.ts +4 -0
- package/dist/features/admin/components/AdminNewsletterView.js +132 -0
- package/dist/features/admin/components/AdminNotificationsView.d.ts +4 -0
- package/dist/features/admin/components/AdminNotificationsView.js +119 -0
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +8 -0
- package/dist/features/admin/components/AdminOrderEditorView.js +74 -0
- package/dist/features/admin/components/AdminOrdersView.js +64 -8
- package/dist/features/admin/components/AdminPayoutsView.js +122 -13
- package/dist/features/admin/components/AdminProductEditorView.d.ts +7 -0
- package/dist/features/admin/components/AdminProductEditorView.js +143 -0
- package/dist/features/admin/components/AdminProductsView.d.ts +4 -1
- package/dist/features/admin/components/AdminProductsView.js +124 -7
- package/dist/features/admin/components/AdminReturnRequestsView.d.ts +5 -0
- package/dist/features/admin/components/AdminReturnRequestsView.js +101 -0
- package/dist/features/admin/components/AdminReviewsView.js +140 -6
- package/dist/features/admin/components/AdminSectionsView.js +361 -472
- package/dist/features/admin/components/AdminSessionsView.d.ts +4 -0
- package/dist/features/admin/components/AdminSessionsView.js +119 -0
- package/dist/features/admin/components/AdminSidebar.d.ts +18 -3
- package/dist/features/admin/components/AdminSidebar.js +51 -4
- package/dist/features/admin/components/AdminSiteSettingsView.d.ts +7 -0
- package/dist/features/admin/components/AdminSiteSettingsView.js +319 -0
- package/dist/features/admin/components/AdminStoreAddressesView.d.ts +5 -0
- package/dist/features/admin/components/AdminStoreAddressesView.js +52 -0
- package/dist/features/admin/components/AdminStoreEditorView.d.ts +9 -0
- package/dist/features/admin/components/AdminStoreEditorView.js +55 -0
- package/dist/features/admin/components/AdminStoresView.js +62 -5
- package/dist/features/admin/components/AdminUserEditorView.d.ts +10 -0
- package/dist/features/admin/components/AdminUserEditorView.js +72 -0
- package/dist/features/admin/components/AdminUsersView.js +73 -14
- package/dist/features/admin/components/AdminWishlistsView.d.ts +4 -0
- package/dist/features/admin/components/AdminWishlistsView.js +53 -0
- package/dist/features/admin/components/BrandQuickCreateForm.d.ts +5 -0
- package/dist/features/admin/components/BrandQuickCreateForm.js +36 -0
- package/dist/features/admin/components/CategoryQuickCreateForm.d.ts +5 -0
- package/dist/features/admin/components/CategoryQuickCreateForm.js +35 -0
- package/dist/features/admin/components/DataTable.d.ts +5 -2
- package/dist/features/admin/components/DataTable.js +38 -4
- package/dist/features/admin/components/index.d.ts +53 -1
- package/dist/features/admin/components/index.js +26 -0
- package/dist/features/admin/components/sections/adminSectionsBuildParse.d.ts +48 -0
- package/dist/features/admin/components/sections/adminSectionsBuildParse.js +653 -0
- package/dist/features/admin/components/sections/adminSectionsTypes.d.ts +298 -0
- package/dist/features/admin/components/sections/adminSectionsTypes.js +278 -0
- package/dist/features/admin/hooks/useAdminListingData.d.ts +3 -1
- package/dist/features/admin/hooks/useAdminListingData.js +12 -7
- package/dist/features/admin/schemas/firestore.d.ts +26 -0
- package/dist/features/admin/schemas/firestore.js +1 -0
- package/dist/features/admin/server.d.ts +3 -0
- package/dist/features/admin/server.js +2 -0
- package/dist/features/admin/types/product.types.d.ts +2 -3
- package/dist/features/auctions/actions/bid-actions.js +6 -2
- package/dist/features/auctions/components/AuctionDetailPageView.d.ts +3 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +125 -53
- package/dist/features/auctions/components/AuctionFilters.d.ts +10 -0
- package/dist/features/auctions/components/AuctionFilters.js +16 -0
- package/dist/features/auctions/components/AuctionsListView.d.ts +6 -1
- package/dist/features/auctions/components/AuctionsListView.js +37 -5
- package/dist/features/auctions/components/CollapsibleBidHistory.d.ts +7 -0
- package/dist/features/auctions/components/CollapsibleBidHistory.js +8 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +4 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +43 -9
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +1 -0
- package/dist/features/auctions/components/PlaceBidFormClient.d.ts +18 -0
- package/dist/features/auctions/components/PlaceBidFormClient.js +33 -0
- package/dist/features/auctions/hooks/useAuctions.d.ts +1 -0
- package/dist/features/auctions/hooks/useAuctions.js +1 -0
- package/dist/features/auctions/schemas/index.d.ts +18 -8
- package/dist/features/auth/actions/profile-actions.d.ts +5 -3
- package/dist/features/auth/actions/profile-actions.js +30 -11
- package/dist/features/auth/auth-helpers.js +1 -0
- package/dist/features/auth/components/LoginForm.js +2 -1
- package/dist/features/auth/hooks/useAuth.js +16 -4
- package/dist/features/auth/permissions/constants.d.ts +63 -0
- package/dist/features/auth/permissions/constants.js +323 -0
- package/dist/features/auth/schemas/firestore.d.ts +20 -0
- package/dist/features/auth/schemas/index.d.ts +4 -4
- package/dist/features/auth/schemas/index.js +3 -2
- package/dist/features/auth/types/index.d.ts +1 -1
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/actions/blog-actions.d.ts +15 -15
- package/dist/features/blog/components/BlogFeaturedCard.d.ts +1 -7
- package/dist/features/blog/components/BlogFeaturedCard.js +4 -5
- package/dist/features/blog/components/BlogFilters.js +2 -1
- package/dist/features/blog/components/BlogIndexListing.js +66 -9
- package/dist/features/blog/components/BlogIndexPageView.d.ts +6 -1
- package/dist/features/blog/components/BlogIndexPageView.js +24 -4
- package/dist/features/blog/components/BlogListView.d.ts +2 -1
- package/dist/features/blog/components/BlogListView.js +10 -3
- package/dist/features/blog/components/BlogPostForm.js +6 -2
- package/dist/features/blog/components/BlogPostView.js +2 -1
- package/dist/features/blog/hooks/useBlog.d.ts +2 -0
- package/dist/features/blog/hooks/useBlog.js +2 -0
- package/dist/features/blog/schemas/index.d.ts +46 -12
- package/dist/features/brands/actions/brand-actions.d.ts +2 -0
- package/dist/features/brands/actions/brand-actions.js +5 -0
- package/dist/features/brands/index.d.ts +3 -0
- package/dist/features/brands/index.js +3 -0
- package/dist/features/brands/repository/brands.repository.d.ts +13 -0
- package/dist/features/brands/repository/brands.repository.js +60 -0
- package/dist/features/brands/schemas/index.d.ts +33 -0
- package/dist/features/brands/schemas/index.js +15 -0
- package/dist/features/brands/server.d.ts +7 -0
- package/dist/features/brands/server.js +7 -0
- package/dist/features/cart/actions/cart-actions.js +2 -2
- package/dist/features/cart/components/CartDrawer.d.ts +5 -1
- package/dist/features/cart/components/CartDrawer.js +3 -3
- package/dist/features/cart/hooks/useCartCount.d.ts +3 -2
- package/dist/features/cart/hooks/useCartCount.js +4 -2
- package/dist/features/cart/hooks/useGuestCartMerge.js +1 -1
- package/dist/features/cart/index.d.ts +1 -0
- package/dist/features/cart/index.js +1 -0
- package/dist/features/cart/repository/cart.repository.d.ts +5 -1
- package/dist/features/cart/repository/cart.repository.js +36 -5
- package/dist/features/cart/schemas/firestore.d.ts +25 -6
- package/dist/features/cart/schemas/firestore.js +2 -2
- package/dist/features/cart/schemas/index.d.ts +9 -9
- package/dist/features/cart/schemas/index.js +1 -1
- package/dist/features/cart/types/index.d.ts +1 -1
- package/dist/features/cart/utils/pending-ops.d.ts +33 -0
- package/dist/features/cart/utils/pending-ops.js +102 -0
- package/dist/features/categories/components/BrandDetailPageView.d.ts +4 -0
- package/dist/features/categories/components/BrandDetailPageView.js +54 -0
- package/dist/features/categories/components/BrandDetailTabs.d.ts +10 -0
- package/dist/features/categories/components/BrandDetailTabs.js +22 -0
- package/dist/features/categories/components/CategoriesIndexListing.d.ts +3 -1
- package/dist/features/categories/components/CategoriesIndexListing.js +117 -38
- package/dist/features/categories/components/CategoriesIndexPageView.d.ts +6 -1
- package/dist/features/categories/components/CategoriesIndexPageView.js +41 -2
- package/dist/features/categories/components/CategoryDetailPageView.js +47 -19
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +11 -0
- package/dist/features/categories/components/CategoryDetailTabs.js +22 -0
- package/dist/features/categories/components/CategoryFilters.js +2 -1
- package/dist/features/categories/components/CategoryForm.js +10 -4
- package/dist/features/categories/components/CategoryGrid.d.ts +2 -1
- package/dist/features/categories/components/CategoryGrid.js +8 -6
- package/dist/features/categories/components/CategoryProductsListing.d.ts +4 -1
- package/dist/features/categories/components/CategoryProductsListing.js +53 -13
- package/dist/features/categories/components/ConcernCard.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/categories/hooks/useCategories.d.ts +20 -0
- package/dist/features/categories/hooks/useCategories.js +52 -1
- package/dist/features/categories/hooks/useCategoryTree.d.ts +17 -0
- package/dist/features/categories/hooks/useCategoryTree.js +65 -0
- package/dist/features/categories/repository/categories.repository.js +2 -3
- package/dist/features/categories/schemas/firestore.d.ts +23 -2
- package/dist/features/categories/schemas/firestore.js +8 -0
- package/dist/features/categories/schemas/index.d.ts +8 -8
- package/dist/features/categories/types/index.d.ts +1 -0
- package/dist/features/collections/schemas/index.d.ts +2 -2
- package/dist/features/events/components/AdminEventEditorView.d.ts +6 -0
- package/dist/features/events/components/AdminEventEditorView.js +203 -0
- package/dist/features/events/components/AdminEventsView.d.ts +4 -1
- package/dist/features/events/components/AdminEventsView.js +66 -14
- package/dist/features/events/components/EventCard.js +4 -2
- package/dist/features/events/components/EventFilters.js +2 -1
- package/dist/features/events/components/EventPollWidget.d.ts +12 -0
- package/dist/features/events/components/EventPollWidget.js +62 -0
- package/dist/features/events/components/EventsIndexListing.js +92 -10
- package/dist/features/events/components/EventsListPageView.d.ts +6 -1
- package/dist/features/events/components/EventsListPageView.js +40 -7
- package/dist/features/events/components/index.d.ts +4 -0
- package/dist/features/events/components/index.js +2 -0
- package/dist/features/events/hooks/useEvents.d.ts +1 -0
- package/dist/features/events/hooks/useEvents.js +3 -0
- package/dist/features/events/repository/events.repository.js +3 -0
- package/dist/features/events/schemas/firestore.d.ts +1 -0
- package/dist/features/events/schemas/index.d.ts +44 -0
- package/dist/features/events/types/index.d.ts +3 -0
- package/dist/features/faq/actions/faq-actions.d.ts +16 -16
- package/dist/features/faq/hooks/useFaqList.js +1 -1
- package/dist/features/faq/schemas/firestore.d.ts +2 -2
- package/dist/features/faq/schemas/firestore.js +2 -1
- package/dist/features/faq/schemas/index.d.ts +4 -4
- package/dist/features/filters/FilterFacetSection.d.ts +1 -0
- package/dist/features/filters/FilterFacetSection.js +13 -1
- package/dist/features/filters/SwitchFilter.js +1 -1
- package/dist/features/grouped/schemas/firestore.d.ts +32 -0
- package/dist/features/grouped/schemas/firestore.js +19 -0
- package/dist/features/homepage/components/AdSlot.d.ts +1 -3
- package/dist/features/homepage/components/AdSlot.js +15 -14
- package/dist/features/homepage/components/BlogArticlesSection.d.ts +3 -1
- package/dist/features/homepage/components/BlogArticlesSection.js +3 -3
- package/dist/features/homepage/components/BrandsSection.d.ts +3 -1
- package/dist/features/homepage/components/BrandsSection.js +4 -3
- package/dist/features/homepage/components/CustomCardsSection.d.ts +3 -0
- package/dist/features/homepage/components/CustomCardsSection.js +76 -0
- package/dist/features/homepage/components/EventsSection.d.ts +3 -1
- package/dist/features/homepage/components/EventsSection.js +3 -3
- package/dist/features/homepage/components/FeaturedAuctionsSection.d.ts +4 -1
- package/dist/features/homepage/components/FeaturedAuctionsSection.js +3 -3
- package/dist/features/homepage/components/FeaturedPreOrdersSection.d.ts +4 -1
- package/dist/features/homepage/components/FeaturedPreOrdersSection.js +3 -3
- package/dist/features/homepage/components/FeaturedProductsSection.d.ts +4 -1
- package/dist/features/homepage/components/FeaturedProductsSection.js +8 -3
- package/dist/features/homepage/components/FeaturedStoresSection.d.ts +3 -1
- package/dist/features/homepage/components/FeaturedStoresSection.js +3 -3
- package/dist/features/homepage/components/GoogleReviewsSection.d.ts +3 -0
- package/dist/features/homepage/components/GoogleReviewsSection.js +65 -0
- package/dist/features/homepage/components/HeroCarousel.js +129 -85
- package/dist/features/homepage/components/MarketplaceHomepageView.d.ts +2 -20
- package/dist/features/homepage/components/MarketplaceHomepageView.js +73 -220
- package/dist/features/homepage/components/SectionCarousel.d.ts +1 -1
- package/dist/features/homepage/components/SectionCarousel.js +6 -4
- package/dist/features/homepage/components/ShopByCategorySection.d.ts +3 -1
- package/dist/features/homepage/components/ShopByCategorySection.js +8 -4
- package/dist/features/homepage/components/SocialFeedSection.d.ts +3 -0
- package/dist/features/homepage/components/SocialFeedSection.js +86 -0
- package/dist/features/homepage/components/SocialPostCard.d.ts +7 -0
- package/dist/features/homepage/components/SocialPostCard.js +39 -0
- package/dist/features/homepage/components/StatsCounterSection.js +1 -1
- package/dist/features/homepage/components/WelcomeSection.js +1 -1
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
- package/dist/features/homepage/hooks/useActiveAd.d.ts +23 -0
- package/dist/features/homepage/hooks/useActiveAd.js +20 -0
- package/dist/features/homepage/hooks/useBlogArticles.d.ts +1 -0
- package/dist/features/homepage/hooks/useBlogArticles.js +10 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +4 -1
- package/dist/features/homepage/hooks/useFeaturedAuctions.js +8 -4
- package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +4 -1
- package/dist/features/homepage/hooks/useFeaturedPreOrders.js +8 -4
- package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +1 -0
- package/dist/features/homepage/hooks/useFeaturedProducts.js +6 -3
- package/dist/features/homepage/hooks/useFeaturedStores.d.ts +3 -1
- package/dist/features/homepage/hooks/useFeaturedStores.js +2 -1
- package/dist/features/homepage/hooks/useHomepageEvents.d.ts +3 -1
- package/dist/features/homepage/hooks/useHomepageEvents.js +2 -1
- package/dist/features/homepage/hooks/useTopBrands.d.ts +3 -1
- package/dist/features/homepage/hooks/useTopBrands.js +2 -1
- package/dist/features/homepage/index.d.ts +2 -0
- package/dist/features/homepage/index.js +1 -0
- package/dist/features/homepage/lib/google-reviews-fetcher.d.ts +14 -0
- package/dist/features/homepage/lib/google-reviews-fetcher.js +27 -0
- package/dist/features/homepage/lib/live-stats.d.ts +14 -0
- package/dist/features/homepage/lib/live-stats.js +62 -0
- package/dist/features/homepage/lib/section-defaults.d.ts +11 -0
- package/dist/features/homepage/lib/section-defaults.js +45 -0
- package/dist/features/homepage/lib/section-helpers.d.ts +5 -0
- package/dist/features/homepage/lib/section-helpers.js +25 -0
- package/dist/features/homepage/lib/section-renderer.d.ts +33 -0
- package/dist/features/homepage/lib/section-renderer.js +164 -0
- package/dist/features/homepage/lib/social-feed-fetcher.d.ts +5 -0
- package/dist/features/homepage/lib/social-feed-fetcher.js +193 -0
- package/dist/features/homepage/schemas/firestore.d.ts +180 -29
- package/dist/features/homepage/schemas/firestore.js +7 -1
- package/dist/features/homepage/types/index.d.ts +48 -19
- package/dist/features/layout/AppLayoutShell.d.ts +11 -2
- package/dist/features/layout/AppLayoutShell.js +30 -10
- package/dist/features/layout/BottomActions.js +1 -1
- package/dist/features/layout/BottomNavbar.d.ts +15 -1
- package/dist/features/layout/BottomNavbar.js +8 -2
- package/dist/features/layout/FooterLayout.d.ts +7 -1
- package/dist/features/layout/FooterLayout.js +3 -3
- package/dist/features/layout/ListingLayout.js +2 -2
- package/dist/features/layout/MainNavbar.d.ts +6 -14
- package/dist/features/layout/MainNavbar.js +4 -16
- package/dist/features/layout/NavItem.js +1 -1
- package/dist/features/layout/NavbarLayout.d.ts +3 -1
- package/dist/features/layout/NavbarLayout.js +5 -5
- package/dist/features/layout/TitleBar.d.ts +4 -2
- package/dist/features/layout/TitleBar.js +5 -3
- package/dist/features/layout/TitleBarLayout.d.ts +3 -1
- package/dist/features/layout/TitleBarLayout.js +2 -2
- package/dist/features/layout/index.d.ts +1 -1
- package/dist/features/media/MediaPickerModal.d.ts +30 -0
- package/dist/features/media/MediaPickerModal.js +72 -0
- package/dist/features/media/index.d.ts +3 -1
- package/dist/features/media/index.js +1 -0
- package/dist/features/media/types/index.d.ts +12 -0
- package/dist/features/media/types/index.js +4 -2
- package/dist/features/media/upload/MediaUploadField.d.ts +5 -1
- package/dist/features/media/upload/MediaUploadField.js +56 -3
- package/dist/features/messages/schemas/firestore.d.ts +36 -0
- package/dist/features/messages/schemas/firestore.js +16 -0
- package/dist/features/orders/repository/orders.repository.d.ts +2 -2
- package/dist/features/orders/repository/orders.repository.js +2 -2
- package/dist/features/orders/schemas/firestore.d.ts +17 -4
- package/dist/features/orders/schemas/firestore.js +2 -2
- package/dist/features/orders/schemas/index.d.ts +18 -18
- package/dist/features/orders/schemas/index.js +3 -3
- package/dist/features/orders/types/index.d.ts +1 -1
- package/dist/features/orders/utils/order-splitter.d.ts +1 -1
- package/dist/features/orders/utils/order-splitter.js +2 -2
- package/dist/features/payments/repository/payout.repository.d.ts +4 -4
- package/dist/features/payments/repository/payout.repository.js +7 -7
- package/dist/features/payments/schemas/firestore.d.ts +6 -6
- package/dist/features/payments/schemas/firestore.js +6 -6
- package/dist/features/pre-orders/components/MarketplacePreorderCard.d.ts +3 -1
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +13 -8
- package/dist/features/pre-orders/components/PreOrderActionsClient.d.ts +11 -0
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +28 -0
- package/dist/features/pre-orders/components/PreOrderDetailPageView.d.ts +2 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +100 -14
- package/dist/features/pre-orders/components/PreOrderFilters.d.ts +10 -0
- package/dist/features/pre-orders/components/PreOrderFilters.js +24 -0
- package/dist/features/pre-orders/components/PreOrdersIndexListing.d.ts +4 -1
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +166 -11
- package/dist/features/pre-orders/components/PreOrdersListView.d.ts +6 -1
- package/dist/features/pre-orders/components/PreOrdersListView.js +26 -7
- package/dist/features/pre-orders/components/PreorderCard.js +1 -1
- package/dist/features/pre-orders/components/index.d.ts +2 -0
- package/dist/features/pre-orders/components/index.js +1 -0
- package/dist/features/pre-orders/schemas/index.d.ts +10 -0
- package/dist/features/products/actions/product-actions.d.ts +2 -2
- package/dist/features/products/actions/product-actions.js +5 -5
- package/dist/features/products/api/[id]/route.js +5 -2
- package/dist/features/products/api/route.js +10 -14
- package/dist/features/products/columns/productTableColumns.js +2 -2
- package/dist/features/products/components/AuctionDetailView.d.ts +2 -1
- package/dist/features/products/components/AuctionDetailView.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.d.ts +4 -1
- package/dist/features/products/components/AuctionsIndexListing.js +124 -10
- package/dist/features/products/components/BidHistory.d.ts +2 -1
- package/dist/features/products/components/BidHistory.js +18 -2
- package/dist/features/products/components/InteractiveProductCard.d.ts +2 -4
- package/dist/features/products/components/InteractiveProductCard.js +2 -2
- package/dist/features/products/components/MakeOfferButton.d.ts +10 -0
- package/dist/features/products/components/MakeOfferButton.js +68 -0
- package/dist/features/products/components/ProductDetailPageView.d.ts +11 -1
- package/dist/features/products/components/ProductDetailPageView.js +136 -26
- package/dist/features/products/components/ProductFilters.d.ts +13 -12
- package/dist/features/products/components/ProductFilters.js +8 -4
- package/dist/features/products/components/ProductForm.d.ts +19 -1
- package/dist/features/products/components/ProductForm.js +24 -6
- package/dist/features/products/components/ProductGrid.d.ts +16 -2
- package/dist/features/products/components/ProductGrid.js +80 -18
- package/dist/features/products/components/ProductTabsShell.d.ts +3 -11
- package/dist/features/products/components/ProductTabsShell.js +14 -14
- package/dist/features/products/components/ProductsIndexListing.js +160 -10
- package/dist/features/products/components/ProductsIndexPageView.d.ts +6 -1
- package/dist/features/products/components/ProductsIndexPageView.js +39 -6
- package/dist/features/products/components/RelatedProductsCarousel.d.ts +7 -0
- package/dist/features/products/components/RelatedProductsCarousel.js +11 -0
- package/dist/features/products/components/ShareButton.d.ts +7 -0
- package/dist/features/products/components/ShareButton.js +22 -0
- package/dist/features/products/components/index.d.ts +3 -0
- package/dist/features/products/components/index.js +2 -0
- package/dist/features/products/hooks/useProducts.d.ts +7 -0
- package/dist/features/products/hooks/useProducts.js +20 -2
- package/dist/features/products/repository/products.repository.d.ts +9 -5
- package/dist/features/products/repository/products.repository.js +19 -50
- package/dist/features/products/schemas/firestore.d.ts +11 -9
- package/dist/features/products/schemas/firestore.js +11 -3
- package/dist/features/products/schemas/index.d.ts +43 -42
- package/dist/features/products/schemas/index.js +2 -5
- package/dist/features/products/types/index.d.ts +24 -4
- package/dist/features/promotions/actions/coupon-actions.d.ts +2 -2
- package/dist/features/promotions/actions/coupon-actions.js +1 -1
- package/dist/features/promotions/actions/seller-coupon-actions.js +11 -6
- package/dist/features/promotions/api/route.js +3 -3
- package/dist/features/promotions/components/CouponCard.js +16 -7
- package/dist/features/promotions/components/CouponsIndexListing.d.ts +9 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +80 -0
- package/dist/features/promotions/components/PromotionsView.d.ts +11 -5
- package/dist/features/promotions/components/PromotionsView.js +6 -1
- package/dist/features/promotions/components/index.d.ts +4 -2
- package/dist/features/promotions/components/index.js +2 -1
- package/dist/features/promotions/hooks/useCouponValidate.d.ts +1 -1
- package/dist/features/promotions/hooks/usePromotions.js +2 -2
- package/dist/features/promotions/repository/coupons.repository.d.ts +21 -15
- package/dist/features/promotions/repository/coupons.repository.js +97 -125
- package/dist/features/promotions/schemas/firestore.d.ts +31 -2
- package/dist/features/promotions/schemas/firestore.js +29 -0
- package/dist/features/promotions/schemas/index.d.ts +9 -12
- package/dist/features/promotions/schemas/index.js +1 -2
- package/dist/features/promotions/types/index.d.ts +1 -2
- package/dist/features/reviews/actions/review-actions.js +3 -2
- package/dist/features/reviews/components/ReviewDetailPageView.d.ts +4 -0
- package/dist/features/reviews/components/ReviewDetailPageView.js +16 -0
- package/dist/features/reviews/components/ReviewDetailShell.d.ts +7 -0
- package/dist/features/reviews/components/ReviewDetailShell.js +80 -0
- package/dist/features/reviews/components/ReviewFilters.d.ts +3 -3
- package/dist/features/reviews/components/ReviewFilters.js +5 -4
- package/dist/features/reviews/components/ReviewsIndexListing.d.ts +4 -3
- package/dist/features/reviews/components/ReviewsIndexListing.js +86 -51
- package/dist/features/reviews/components/ReviewsIndexPageView.d.ts +6 -1
- package/dist/features/reviews/components/ReviewsIndexPageView.js +49 -3
- package/dist/features/reviews/components/ReviewsList.js +9 -1
- package/dist/features/reviews/components/index.d.ts +1 -0
- package/dist/features/reviews/hooks/useReviews.d.ts +1 -0
- package/dist/features/reviews/hooks/useReviews.js +16 -1
- package/dist/features/reviews/repository/reviews.repository.d.ts +9 -4
- package/dist/features/reviews/repository/reviews.repository.js +18 -7
- package/dist/features/reviews/schemas/firestore.d.ts +5 -2
- package/dist/features/reviews/schemas/firestore.js +1 -0
- package/dist/features/reviews/schemas/index.d.ts +19 -16
- package/dist/features/reviews/schemas/index.js +3 -2
- package/dist/features/reviews/types/index.d.ts +9 -3
- package/dist/features/scams/actions/scam-actions.d.ts +29 -0
- package/dist/features/scams/actions/scam-actions.js +62 -0
- package/dist/features/scams/components/ScamProfileView.d.ts +7 -0
- package/dist/features/scams/components/ScamProfileView.js +49 -0
- package/dist/features/scams/components/ScamRegistryView.d.ts +6 -0
- package/dist/features/scams/components/ScamRegistryView.js +41 -0
- package/dist/features/scams/components/index.d.ts +4 -0
- package/dist/features/scams/components/index.js +2 -0
- package/dist/features/scams/constants/scam-types.d.ts +38 -0
- package/dist/features/scams/constants/scam-types.js +443 -0
- package/dist/features/scams/repository/scammer.repository.d.ts +67 -0
- package/dist/features/scams/repository/scammer.repository.js +160 -0
- package/dist/features/scams/schemas/firestore.d.ts +362 -0
- package/dist/features/scams/schemas/firestore.js +233 -0
- package/dist/features/search/components/Search.d.ts +12 -2
- package/dist/features/search/components/Search.js +26 -7
- package/dist/features/search/components/index.d.ts +1 -1
- package/dist/features/search/hooks/useNavSuggestions.d.ts +1 -1
- package/dist/features/search/hooks/useNavSuggestions.js +2 -2
- package/dist/features/search/schemas/index.d.ts +7 -7
- package/dist/features/seller/actions/offer-actions.js +52 -36
- package/dist/features/seller/actions/seller-actions.js +19 -13
- package/dist/features/seller/api/products/route.js +9 -4
- package/dist/features/seller/components/SellerAddressesView.d.ts +3 -12
- package/dist/features/seller/components/SellerAddressesView.js +144 -4
- package/dist/features/seller/components/SellerAuctionsView.js +58 -5
- package/dist/features/seller/components/SellerBidsView.d.ts +4 -0
- package/dist/features/seller/components/SellerBidsView.js +131 -0
- package/dist/features/seller/components/SellerCouponEditorView.d.ts +19 -0
- package/dist/features/seller/components/SellerCouponEditorView.js +67 -0
- package/dist/features/seller/components/SellerCouponsView.d.ts +5 -3
- package/dist/features/seller/components/SellerCouponsView.js +135 -13
- package/dist/features/seller/components/SellerCreateProductView.d.ts +4 -10
- package/dist/features/seller/components/SellerCreateProductView.js +4 -3
- package/dist/features/seller/components/SellerEditProductView.d.ts +4 -10
- package/dist/features/seller/components/SellerEditProductView.js +4 -3
- package/dist/features/seller/components/SellerOffersPanel.d.ts +20 -0
- package/dist/features/seller/components/SellerOffersPanel.js +138 -0
- package/dist/features/seller/components/SellerOffersView.js +56 -5
- package/dist/features/seller/components/SellerOrdersView.d.ts +2 -1
- package/dist/features/seller/components/SellerOrdersView.js +185 -16
- package/dist/features/seller/components/SellerPayoutRequestView.d.ts +7 -0
- package/dist/features/seller/components/SellerPayoutRequestView.js +63 -0
- package/dist/features/seller/components/SellerPayoutSettingsView.d.ts +3 -10
- package/dist/features/seller/components/SellerPayoutSettingsView.js +89 -3
- package/dist/features/seller/components/SellerPayoutsView.js +56 -5
- package/dist/features/seller/components/SellerProductShell.d.ts +68 -0
- package/dist/features/seller/components/SellerProductShell.js +179 -0
- package/dist/features/seller/components/SellerProductsView.d.ts +2 -3
- package/dist/features/seller/components/SellerProductsView.js +194 -18
- package/dist/features/seller/components/SellerReviewsView.d.ts +5 -0
- package/dist/features/seller/components/SellerReviewsView.js +100 -0
- package/dist/features/seller/components/SellerShippingView.d.ts +3 -11
- package/dist/features/seller/components/SellerShippingView.js +87 -3
- package/dist/features/seller/components/SellerSidebar.d.ts +18 -6
- package/dist/features/seller/components/SellerSidebar.js +54 -8
- package/dist/features/seller/components/SellerStorefrontView.d.ts +26 -11
- package/dist/features/seller/components/SellerStorefrontView.js +45 -7
- package/dist/features/seller/components/index.d.ts +45 -1
- package/dist/features/seller/components/index.js +24 -0
- package/dist/features/seller/hooks/useSellerListingData.d.ts +3 -1
- package/dist/features/seller/hooks/useSellerListingData.js +6 -4
- package/dist/features/seller/hooks/useSellerStore.d.ts +2 -0
- package/dist/features/seller/hooks/useSellerStore.js +2 -0
- package/dist/features/seller/permission-map.d.ts +4 -2
- package/dist/features/seller/permission-map.js +16 -14
- package/dist/features/seller/repository/offer.repository.d.ts +3 -3
- package/dist/features/seller/repository/offer.repository.js +6 -6
- package/dist/features/seller/schemas/firestore.d.ts +7 -7
- package/dist/features/seller/schemas/firestore.js +4 -4
- package/dist/features/seller/schemas/index.d.ts +18 -18
- package/dist/features/shell/FormShell.d.ts +29 -0
- package/dist/features/shell/FormShell.js +103 -0
- package/dist/features/shell/QuickFormDrawer.d.ts +29 -0
- package/dist/features/shell/QuickFormDrawer.js +117 -0
- package/dist/features/shell/StepForm.d.ts +44 -0
- package/dist/features/shell/StepForm.js +81 -0
- package/dist/features/shell/index.d.ts +6 -0
- package/dist/features/shell/index.js +3 -0
- package/dist/features/stores/actions/store-query-actions.js +3 -3
- package/dist/features/stores/api/[storeSlug]/auctions/route.js +1 -1
- package/dist/features/stores/api/[storeSlug]/products/route.js +1 -1
- package/dist/features/stores/api/[storeSlug]/reviews/route.d.ts +1 -1
- package/dist/features/stores/api/[storeSlug]/reviews/route.js +25 -20
- package/dist/features/stores/components/InteractiveStoreCard.d.ts +2 -7
- package/dist/features/stores/components/InteractiveStoreCard.js +24 -10
- package/dist/features/stores/components/StoreAboutView.js +1 -1
- package/dist/features/stores/components/StoreAuctionsListing.d.ts +5 -2
- package/dist/features/stores/components/StoreAuctionsListing.js +103 -12
- package/dist/features/stores/components/StoreAuctionsPageView.js +8 -7
- package/dist/features/stores/components/StoreDetailLayoutView.d.ts +1 -0
- package/dist/features/stores/components/StoreDetailLayoutView.js +30 -4
- package/dist/features/stores/components/StoreFilters.d.ts +5 -0
- package/dist/features/stores/components/StoreFilters.js +20 -0
- package/dist/features/stores/components/StoreHeader.js +3 -2
- package/dist/features/stores/components/StorePreOrdersListing.d.ts +7 -0
- package/dist/features/stores/components/StorePreOrdersListing.js +92 -0
- package/dist/features/stores/components/StorePreOrdersPageView.d.ts +4 -0
- package/dist/features/stores/components/StorePreOrdersPageView.js +22 -0
- package/dist/features/stores/components/StoreProductsListing.d.ts +5 -2
- package/dist/features/stores/components/StoreProductsListing.js +113 -14
- package/dist/features/stores/components/StoreProductsPageView.js +8 -7
- package/dist/features/stores/components/StoreReviewsListing.js +4 -9
- package/dist/features/stores/components/StoresIndexListing.js +106 -9
- package/dist/features/stores/components/StoresIndexPageView.d.ts +6 -1
- package/dist/features/stores/components/StoresIndexPageView.js +9 -2
- package/dist/features/stores/components/StoresListView.js +1 -1
- package/dist/features/stores/components/index.d.ts +3 -0
- package/dist/features/stores/components/index.js +1 -0
- package/dist/features/stores/hooks/useStores.d.ts +8 -1
- package/dist/features/stores/hooks/useStores.js +17 -3
- package/dist/features/stores/schemas/firestore.d.ts +34 -0
- package/dist/features/stores/schemas/index.d.ts +10 -10
- package/dist/features/stores/types/index.d.ts +3 -0
- package/dist/features/sublisting/schemas/firestore.d.ts +30 -0
- package/dist/features/sublisting/schemas/firestore.js +19 -0
- package/dist/features/support/schemas/firestore.d.ts +113 -0
- package/dist/features/support/schemas/firestore.js +95 -0
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.d.ts +5 -0
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +143 -0
- package/dist/features/whatsapp-bot/components/index.d.ts +2 -0
- package/dist/features/whatsapp-bot/components/index.js +1 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +23 -1
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +104 -0
- package/dist/features/whatsapp-bot/server.d.ts +1 -0
- package/dist/features/whatsapp-bot/server.js +1 -0
- package/dist/features/whatsapp-bot/types/index.d.ts +49 -0
- package/dist/features/wishlist/components/WishlistView.d.ts +0 -10
- package/dist/features/wishlist/components/WishlistView.js +13 -6
- package/dist/features/wishlist/hooks/useGuestWishlist.d.ts +20 -0
- package/dist/features/wishlist/hooks/useGuestWishlist.js +49 -0
- package/dist/features/wishlist/hooks/useWishlist.js +2 -0
- package/dist/features/wishlist/hooks/useWishlistCount.d.ts +15 -0
- package/dist/features/wishlist/hooks/useWishlistCount.js +95 -0
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +56 -0
- package/dist/features/wishlist/hooks/useWishlistWithGuest.js +57 -0
- package/dist/features/wishlist/index.d.ts +3 -0
- package/dist/features/wishlist/index.js +3 -0
- package/dist/features/wishlist/schemas/index.d.ts +2 -2
- package/dist/features/wishlist/types/index.d.ts +16 -0
- package/dist/features/wishlist/utils/guest-wishlist.d.ts +22 -0
- package/dist/features/wishlist/utils/guest-wishlist.js +70 -0
- package/dist/http/api-handler.js +8 -1
- package/dist/index.d.ts +158 -13
- package/dist/index.js +188 -21
- package/dist/monitoring/server-logger.js +9 -3
- package/dist/next/routing/route-map.d.ts +184 -36
- package/dist/next/routing/route-map.js +81 -22
- package/dist/providers/db-firebase/realtime.d.ts +1 -1
- package/dist/react/contexts/SessionContext.js +17 -26
- package/dist/react/hooks/useBulkSelection.d.ts +7 -24
- package/dist/react/hooks/useBulkSelection.js +27 -34
- package/dist/react/hooks/useLongPress.d.ts +3 -16
- package/dist/react/hooks/useLongPress.js +6 -25
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +2 -0
- package/dist/repositories/index.d.ts +3 -0
- package/dist/repositories/index.js +2 -0
- package/dist/seed/actions/demo-seed-actions.d.ts +2 -2
- package/dist/seed/actions/demo-seed-actions.js +1 -1
- package/dist/seed/addresses-seed-data.js +62 -261
- package/dist/seed/anime-figures-seed-data.d.ts +8 -0
- package/dist/seed/anime-figures-seed-data.js +1033 -0
- package/dist/seed/beyblade-seed-data.d.ts +7 -0
- package/dist/seed/beyblade-seed-data.js +1129 -0
- package/dist/seed/bids-seed-data.d.ts +4 -2
- package/dist/seed/bids-seed-data.js +343 -1067
- package/dist/seed/blog-posts-seed-data.d.ts +3 -2
- package/dist/seed/blog-posts-seed-data.js +258 -181
- package/dist/seed/brands-seed-data.d.ts +7 -0
- package/dist/seed/brands-seed-data.js +410 -0
- package/dist/seed/carousel-slides-seed-data.d.ts +3 -2
- package/dist/seed/carousel-slides-seed-data.js +177 -216
- package/dist/seed/cart-seed-data.d.ts +8 -8
- package/dist/seed/cart-seed-data.js +73 -74
- package/dist/seed/categories-seed-data.d.ts +4 -2
- package/dist/seed/categories-seed-data.js +720 -879
- package/dist/seed/conversations-seed-data.d.ts +8 -0
- package/dist/seed/conversations-seed-data.js +388 -0
- package/dist/seed/cosplay-accessories-seed-data.d.ts +8 -0
- package/dist/seed/cosplay-accessories-seed-data.js +647 -0
- package/dist/seed/coupon-usage-seed-data.d.ts +25 -0
- package/dist/seed/coupon-usage-seed-data.js +69 -0
- package/dist/seed/coupons-seed-data.d.ts +4 -2
- package/dist/seed/coupons-seed-data.js +204 -338
- package/dist/seed/events-seed-data.d.ts +4 -2
- package/dist/seed/events-seed-data.js +125 -588
- package/dist/seed/factories/cart.factory.d.ts +0 -1
- package/dist/seed/factories/cart.factory.js +2 -2
- package/dist/seed/faq-seed-data.d.ts +11 -41
- package/dist/seed/faq-seed-data.js +833 -1977
- package/dist/seed/grouped-listings-seed-data.d.ts +8 -0
- package/dist/seed/grouped-listings-seed-data.js +201 -0
- package/dist/seed/homepage-sections-seed-data.d.ts +3 -13
- package/dist/seed/homepage-sections-seed-data.js +228 -252
- package/dist/seed/hot-wheels-seed-data.d.ts +7 -0
- package/dist/seed/hot-wheels-seed-data.js +1612 -0
- package/dist/seed/index.d.ts +12 -6
- package/dist/seed/index.js +10 -7
- package/dist/seed/letitrip-official-seed-data.d.ts +8 -0
- package/dist/seed/letitrip-official-seed-data.js +399 -0
- package/dist/seed/manifest.d.ts +15 -0
- package/dist/seed/manifest.js +140 -0
- package/dist/seed/notifications-seed-data.d.ts +4 -2
- package/dist/seed/notifications-seed-data.js +117 -440
- package/dist/seed/orders-seed-data.d.ts +4 -2
- package/dist/seed/orders-seed-data.js +1090 -521
- package/dist/seed/payouts-seed-data.d.ts +4 -2
- package/dist/seed/payouts-seed-data.js +522 -145
- package/dist/seed/pokemon-carousel-slides-seed-data.d.ts +4 -2
- package/dist/seed/pokemon-carousel-slides-seed-data.js +157 -268
- package/dist/seed/pokemon-categories-seed-data.d.ts +18 -21
- package/dist/seed/pokemon-categories-seed-data.js +445 -1025
- package/dist/seed/pokemon-coupons-seed-data.d.ts +6 -0
- package/dist/seed/pokemon-coupons-seed-data.js +465 -0
- package/dist/seed/pokemon-homepage-sections-seed-data.d.ts +3 -2
- package/dist/seed/pokemon-homepage-sections-seed-data.js +120 -249
- package/dist/seed/pokemon-products-seed-data.d.ts +1 -1
- package/dist/seed/pokemon-products-seed-data.js +720 -48
- package/dist/seed/pokemon-seed-bundle.d.ts +36 -11
- package/dist/seed/pokemon-seed-bundle.js +60 -11
- package/dist/seed/pokemon-stores-seed-data.d.ts +2 -3
- package/dist/seed/pokemon-stores-seed-data.js +135 -34
- package/dist/seed/pokemon-users-seed-data.d.ts +2 -2
- package/dist/seed/pokemon-users-seed-data.js +344 -261
- package/dist/seed/products-auctions-seed-data.d.ts +10 -0
- package/dist/seed/products-auctions-seed-data.js +689 -0
- package/dist/seed/products-preorders-seed-data.d.ts +9 -0
- package/dist/seed/products-preorders-seed-data.js +483 -0
- package/dist/seed/products-seed-data.js +34 -13
- package/dist/seed/products-standard-seed-data.d.ts +8 -0
- package/dist/seed/products-standard-seed-data.js +4179 -0
- package/dist/seed/retro-gaming-seed-data.d.ts +8 -0
- package/dist/seed/retro-gaming-seed-data.js +801 -0
- package/dist/seed/reviews-seed-data.d.ts +4 -2
- package/dist/seed/reviews-seed-data.js +1005 -441
- package/dist/seed/scammers-seed-data.d.ts +17 -0
- package/dist/seed/scammers-seed-data.js +118 -0
- package/dist/seed/site-settings-seed-data.js +39 -16
- package/dist/seed/store-addresses-seed-data.js +187 -65
- package/dist/seed/stores-seed-data.d.ts +3 -9
- package/dist/seed/stores-seed-data.js +212 -102
- package/dist/seed/sublisting-categories-seed-data.d.ts +7 -0
- package/dist/seed/sublisting-categories-seed-data.js +315 -0
- package/dist/seed/transformers-seed-data.d.ts +7 -0
- package/dist/seed/transformers-seed-data.js +530 -0
- package/dist/seed/users-seed-data.d.ts +3 -2
- package/dist/seed/users-seed-data.js +531 -440
- package/dist/seed/wishlists-seed-data.d.ts +5 -1
- package/dist/seed/wishlists-seed-data.js +84 -6
- package/dist/server.d.ts +10 -2
- package/dist/server.js +14 -4
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.js +2 -0
- package/dist/tokens/tokens.css +76 -31
- package/dist/ui/components/Avatar.style.css +10 -12
- package/dist/ui/components/BaseListingCard.d.ts +8 -3
- package/dist/ui/components/BaseListingCard.js +39 -30
- package/dist/ui/components/BaseListingCard.style.css +8 -6
- package/dist/ui/components/BulkActionsBar.d.ts +16 -0
- package/dist/ui/components/BulkActionsBar.js +22 -0
- package/dist/ui/components/Button.style.css +23 -23
- package/dist/ui/components/Card.style.css +60 -62
- package/dist/ui/components/Checkbox.style.css +19 -21
- package/dist/ui/components/DashboardStatsCard.style.css +12 -14
- package/dist/ui/components/Drawer.style.css +18 -14
- package/dist/ui/components/Dropdown.style.css +25 -27
- package/dist/ui/components/EmptyState.style.css +2 -4
- package/dist/ui/components/HorizontalScroller.d.ts +3 -1
- package/dist/ui/components/HorizontalScroller.js +130 -21
- package/dist/ui/components/HorizontalScroller.style.css +2 -2
- package/dist/ui/components/ImageLightbox.d.ts +0 -9
- package/dist/ui/components/ImageLightbox.js +43 -9
- package/dist/ui/components/InlineCreateSelect.d.ts +38 -0
- package/dist/ui/components/InlineCreateSelect.js +70 -0
- package/dist/ui/components/ListingLayout.style.css +41 -77
- package/dist/ui/components/ListingToolbar.d.ts +54 -0
- package/dist/ui/components/ListingToolbar.js +34 -0
- package/dist/ui/components/Modal.style.css +14 -10
- package/dist/ui/components/PageLoader.d.ts +11 -0
- package/dist/ui/components/PageLoader.js +21 -0
- package/dist/ui/components/Radio.style.css +34 -36
- package/dist/ui/components/RichTextEditor.js +1 -1
- package/dist/ui/components/RowActionMenu.d.ts +1 -0
- package/dist/ui/components/RowActionMenu.js +4 -2
- package/dist/ui/components/SectionTabs.js +1 -1
- package/dist/ui/components/SectionTabs.style.css +1 -0
- package/dist/ui/components/SideDrawer.style.css +3 -11
- package/dist/ui/components/SideModal.style.css +4 -8
- package/dist/ui/components/Slider.style.css +2 -4
- package/dist/ui/components/Tabs.style.css +8 -10
- package/dist/ui/components/Toast.style.css +22 -24
- package/dist/ui/components/Toggle.style.css +11 -13
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.js +5 -0
- package/dist/ui/rich-text/RichText.js +21 -2
- package/dist/ui/rich-text/RichText.style.css +292 -5
- package/dist/ui/rich-text/RichTextRenderer.d.ts +15 -0
- package/dist/ui/rich-text/RichTextRenderer.js +15 -0
- package/dist/utils/id-generators.d.ts +10 -0
- package/dist/utils/id-generators.js +12 -0
- package/dist/validation/schemas.d.ts +9 -9
- package/package.json +5 -1
- package/README.md +0 -116
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Heading, Section, Text } from "../../../ui";
|
|
3
|
+
import { THEME_CONSTANTS } from "../../../tokens";
|
|
4
|
+
import { siteSettingsRepository } from "../../admin/repository/site-settings.repository";
|
|
5
|
+
import { fetchGoogleReviews } from "../lib/google-reviews-fetcher";
|
|
6
|
+
// --- Star Rating -------------------------------------------------------------
|
|
7
|
+
function StarRating({ rating }) {
|
|
8
|
+
return (_jsx("div", { className: "flex items-center gap-0.5", "aria-label": `${rating} out of 5 stars`, children: [1, 2, 3, 4, 5].map((star) => (_jsx("svg", { className: `w-4 h-4 ${star <= rating ? "text-yellow-400" : "text-zinc-300 dark:text-zinc-600"}`, viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }, star))) }));
|
|
9
|
+
}
|
|
10
|
+
// --- Google Logo Badge -------------------------------------------------------
|
|
11
|
+
function GoogleBadge() {
|
|
12
|
+
return (_jsxs("span", { className: "inline-flex items-center gap-1 text-xs text-zinc-500 dark:text-zinc-400", children: [_jsxs("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("path", { fill: "#4285F4", d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), _jsx("path", { fill: "#34A853", d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), _jsx("path", { fill: "#FBBC05", d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), _jsx("path", { fill: "#EA4335", d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" })] }), "Posted on Google"] }));
|
|
13
|
+
}
|
|
14
|
+
// --- Review Card -------------------------------------------------------------
|
|
15
|
+
function ReviewCard({ review, showRating, showDate, }) {
|
|
16
|
+
const dateStr = showDate
|
|
17
|
+
? new Date(review.time * 1000).toLocaleDateString("en-IN", {
|
|
18
|
+
year: "numeric",
|
|
19
|
+
month: "short",
|
|
20
|
+
day: "numeric",
|
|
21
|
+
})
|
|
22
|
+
: null;
|
|
23
|
+
return (_jsxs("div", { className: "flex flex-col gap-3 p-4 rounded-xl bg-[var(--appkit-color-surface)] shadow-sm border border-[var(--appkit-color-border)]", children: [_jsxs("div", { className: "flex items-center gap-3", children: [review.authorPhotoUrl ? (_jsx("img", { src: review.authorPhotoUrl, alt: review.authorName, className: "w-9 h-9 rounded-full object-cover flex-shrink-0", loading: "lazy", referrerPolicy: "no-referrer" })) : (_jsx("div", { className: "w-9 h-9 rounded-full bg-[var(--appkit-color-primary)] flex items-center justify-center flex-shrink-0", children: _jsx("span", { className: "text-white text-sm font-bold", children: review.authorName.charAt(0).toUpperCase() }) })), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-sm font-semibold truncate", children: review.authorName }), dateStr && (_jsx("p", { className: "text-xs text-zinc-500 dark:text-zinc-400", children: dateStr }))] })] }), showRating && _jsx(StarRating, { rating: review.rating }), review.text && (_jsx("p", { className: "text-sm leading-relaxed text-zinc-700 dark:text-zinc-300 line-clamp-4", children: review.text })), _jsx(GoogleBadge, {})] }));
|
|
24
|
+
}
|
|
25
|
+
// --- Empty / Not Configured States -------------------------------------------
|
|
26
|
+
function NotConfiguredState() {
|
|
27
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-zinc-400 text-sm", children: [_jsxs("svg", { className: "w-10 h-10 mb-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [_jsx("circle", { cx: "12", cy: "12", r: "10" }), _jsx("path", { d: "M12 8v4m0 4h.01" })] }), "Google Reviews not configured. Add your Google Maps API key in Site Settings."] }));
|
|
28
|
+
}
|
|
29
|
+
function EmptyState() {
|
|
30
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-zinc-400 text-sm", children: [_jsx("svg", { className: "w-10 h-10 mb-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: _jsx("path", { d: "M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" }) }), "No reviews yet."] }));
|
|
31
|
+
}
|
|
32
|
+
export async function GoogleReviewsSection(config) {
|
|
33
|
+
const { placeId: configPlaceId, maxReviews = 6, minRating = 0, layout = "grid", showRating = true, showDate = true, linkToGoogleMaps = true, googleMapsUrl, } = config;
|
|
34
|
+
const { themed } = THEME_CONSTANTS;
|
|
35
|
+
// Get credentials from site settings
|
|
36
|
+
const credentials = await siteSettingsRepository
|
|
37
|
+
.getDecryptedCredentials()
|
|
38
|
+
.catch(() => ({}));
|
|
39
|
+
const apiKey = credentials.googleMapsApiKey ?? "";
|
|
40
|
+
if (!apiKey) {
|
|
41
|
+
return (_jsx(Section, { className: `py-12 ${themed.bgPrimary}`, children: _jsx("div", { className: "w-full max-w-7xl mx-auto px-4", children: _jsx(NotConfiguredState, {}) }) }));
|
|
42
|
+
}
|
|
43
|
+
const placeId = configPlaceId || credentials.googlePlaceId || "";
|
|
44
|
+
if (!placeId) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
let reviews = [];
|
|
48
|
+
let aggregateRating = 0;
|
|
49
|
+
let totalRatings = 0;
|
|
50
|
+
try {
|
|
51
|
+
const result = await fetchGoogleReviews(placeId, apiKey, maxReviews, minRating);
|
|
52
|
+
reviews = result.reviews;
|
|
53
|
+
aggregateRating = result.aggregateRating;
|
|
54
|
+
totalRatings = result.totalRatings;
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Fail silently — empty state shown
|
|
58
|
+
}
|
|
59
|
+
const gridClass = layout === "carousel"
|
|
60
|
+
? "flex gap-4 overflow-x-auto pb-2 snap-x snap-mandatory"
|
|
61
|
+
: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4";
|
|
62
|
+
const cardClass = layout === "carousel" ? "flex-shrink-0 w-72 snap-start" : "";
|
|
63
|
+
const mapsHref = googleMapsUrl || (placeId ? `https://search.google.com/local/reviews?placeid=${placeId}` : "");
|
|
64
|
+
return (_jsx(Section, { className: `py-12 ${themed.bgPrimary}`, children: _jsxs("div", { className: "w-full max-w-7xl mx-auto px-4", children: [_jsxs("div", { className: "mb-8 flex items-end justify-between gap-4", children: [_jsxs("div", { children: [_jsx(Heading, { level: 2, children: "What Our Customers Say" }), aggregateRating > 0 && (_jsxs("div", { className: "flex items-center gap-2 mt-1", children: [_jsx(StarRating, { rating: Math.round(aggregateRating) }), _jsxs(Text, { size: "sm", variant: "muted", children: [aggregateRating.toFixed(1), " \u00B7 ", totalRatings.toLocaleString(), " reviews"] })] }))] }), linkToGoogleMaps && mapsHref && (_jsx("a", { href: mapsHref, target: "_blank", rel: "noopener noreferrer", className: "shrink-0 text-sm font-medium text-blue-600 dark:text-blue-400 hover:underline", children: "View on Google \u2192" }))] }), reviews.length === 0 ? (_jsx(EmptyState, {})) : (_jsx("div", { className: gridClass, children: reviews.map((review, i) => (_jsx("div", { className: cardClass, children: _jsx(ReviewCard, { review: review, showRating: showRating, showDate: showDate }) }, `${review.authorName}-${i}`))) }))] }) }));
|
|
65
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useRef, useCallback } from "react";
|
|
4
4
|
import { useMediaQuery } from "../../../react";
|
|
5
5
|
import { THEME_CONSTANTS } from "../../../tokens";
|
|
@@ -7,7 +7,7 @@ import { Button, Div, Heading, Row, Section, Span, Text } from "../../../ui";
|
|
|
7
7
|
import { MediaImage } from "../../media/MediaImage";
|
|
8
8
|
import { MediaVideo } from "../../media/MediaVideo";
|
|
9
9
|
import { useHeroCarousel } from "../hooks/useHeroCarousel";
|
|
10
|
-
const { flex, position
|
|
10
|
+
const { flex, position } = THEME_CONSTANTS;
|
|
11
11
|
function navigate(href, push) {
|
|
12
12
|
if (push) {
|
|
13
13
|
push(href);
|
|
@@ -16,6 +16,102 @@ function navigate(href, push) {
|
|
|
16
16
|
window.location.href = href;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
+
function resolveZoneToGrid(zone) {
|
|
20
|
+
const row = zone <= 3 ? 1 : 2;
|
|
21
|
+
const col = zone <= 3 ? zone : zone - 3;
|
|
22
|
+
return { gridRow: row, gridColumn: col };
|
|
23
|
+
}
|
|
24
|
+
function getHoverClass(effect) {
|
|
25
|
+
if (!effect || effect === "none")
|
|
26
|
+
return "";
|
|
27
|
+
if (effect === "scale")
|
|
28
|
+
return "hover:scale-105";
|
|
29
|
+
if (effect === "glow")
|
|
30
|
+
return "hover:shadow-[0_0_24px_6px_rgba(255,255,255,0.25)]";
|
|
31
|
+
if (effect === "color")
|
|
32
|
+
return "hover:brightness-110";
|
|
33
|
+
return "";
|
|
34
|
+
}
|
|
35
|
+
function getSlideHeightClass(height) {
|
|
36
|
+
if (height === "viewport")
|
|
37
|
+
return "min-h-screen";
|
|
38
|
+
if (height === "tall")
|
|
39
|
+
return "min-h-[80vh]";
|
|
40
|
+
return "min-h-[60vh] md:min-h-[clamp(420px,72vh,680px)]";
|
|
41
|
+
}
|
|
42
|
+
/** Renders the slide background — image, video, solid colour, or gradient. */
|
|
43
|
+
function SlideBackground({ bg, legacy, mobileLegacy, isMobile, priority, }) {
|
|
44
|
+
const effectiveBg = bg ?? (legacy ? { type: legacy.type, url: legacy.url } : undefined);
|
|
45
|
+
const mobileUrl = effectiveBg?.mobileUrl ?? (isMobile && mobileLegacy ? mobileLegacy.url : undefined);
|
|
46
|
+
const src = mobileUrl ?? effectiveBg?.url ?? "";
|
|
47
|
+
if (!effectiveBg) {
|
|
48
|
+
return _jsx(Div, { className: `${position.fill} bg-zinc-900` });
|
|
49
|
+
}
|
|
50
|
+
if (effectiveBg.type === "color") {
|
|
51
|
+
const bg_color = effectiveBg.color ?? "var(--appkit-color-primary)";
|
|
52
|
+
return _jsx(Div, { className: position.fill, style: { backgroundColor: bg_color } });
|
|
53
|
+
}
|
|
54
|
+
if (effectiveBg.type === "gradient") {
|
|
55
|
+
const from = effectiveBg.gradientFrom ?? "var(--appkit-color-primary)";
|
|
56
|
+
const to = effectiveBg.gradientTo ?? "var(--appkit-color-secondary)";
|
|
57
|
+
const angle = effectiveBg.gradientAngle ?? 135;
|
|
58
|
+
return (_jsx(Div, { className: position.fill, style: { background: `linear-gradient(${angle}deg, ${from}, ${to})` } }));
|
|
59
|
+
}
|
|
60
|
+
if (effectiveBg.type === "video") {
|
|
61
|
+
return (_jsxs(_Fragment, { children: [_jsx(MediaVideo, { src: src, thumbnailUrl: effectiveBg.thumbnail ?? legacy?.thumbnail, alt: "", autoPlayMuted: true, loop: true, controls: false }), effectiveBg.dimOverlay?.enabled && (_jsx(Div, { className: position.fill, style: { backgroundColor: `rgba(0,0,0,${(effectiveBg.dimOverlay.opacity ?? 0) / 100})` } }))] }));
|
|
62
|
+
}
|
|
63
|
+
return (_jsxs(_Fragment, { children: [_jsx(MediaImage, { src: src, alt: "", size: "hero", priority: priority }), effectiveBg.dimOverlay?.enabled && (_jsx(Div, { className: position.fill, style: { backgroundColor: `rgba(0,0,0,${(effectiveBg.dimOverlay.opacity ?? 0) / 100})` } }))] }));
|
|
64
|
+
}
|
|
65
|
+
/** Renders the background of a card (image, video, color, gradient). */
|
|
66
|
+
function CardBackground({ bg }) {
|
|
67
|
+
if (bg.type === "color") {
|
|
68
|
+
return (_jsx(Div, { className: position.fill, style: { backgroundColor: bg.color ?? "var(--appkit-color-surface)" } }));
|
|
69
|
+
}
|
|
70
|
+
if (bg.type === "gradient") {
|
|
71
|
+
const from = bg.gradientFrom ?? "var(--appkit-color-primary)";
|
|
72
|
+
const to = bg.gradientTo ?? "var(--appkit-color-secondary)";
|
|
73
|
+
const angle = bg.gradientAngle ?? 135;
|
|
74
|
+
return (_jsx(Div, { className: position.fill, style: { background: `linear-gradient(${angle}deg, ${from}, ${to})` } }));
|
|
75
|
+
}
|
|
76
|
+
if (bg.type === "image" && bg.url) {
|
|
77
|
+
return _jsx(MediaImage, { src: bg.url, alt: "", size: "card" });
|
|
78
|
+
}
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
function CarouselCardRenderer({ card, isMobile, push, }) {
|
|
82
|
+
const mobileZone = card.mobileZone;
|
|
83
|
+
const gridPos = isMobile && mobileZone
|
|
84
|
+
? { gridRow: mobileZone <= 3 ? 1 : 2, gridColumn: mobileZone <= 3 ? mobileZone : mobileZone - 3 }
|
|
85
|
+
: resolveZoneToGrid(card.zone);
|
|
86
|
+
const hoverClass = getHoverClass(card.hover?.effect);
|
|
87
|
+
const textAlign = card.content?.textAlign ?? "left";
|
|
88
|
+
const textAlignClass = textAlign === "center" ? "text-center" : textAlign === "right" ? "text-right" : "text-left";
|
|
89
|
+
return (_jsxs(Div, { className: `relative rounded-lg overflow-hidden shadow-lg transition-all duration-300 ${hoverClass}`, style: {
|
|
90
|
+
gridRow: String(gridPos.gridRow),
|
|
91
|
+
gridColumn: String(gridPos.gridColumn),
|
|
92
|
+
minHeight: isMobile ? 100 : 140,
|
|
93
|
+
}, children: [_jsx(CardBackground, { bg: card.background }), !card.isButtonOnly && (_jsxs(Div, { className: `${position.fill} flex flex-col justify-end bg-gradient-to-t from-black/80 via-black/30 to-transparent p-2 md:p-6 ${textAlignClass}`, children: [card.content?.eyebrow && (_jsx(Text, { className: "text-[10px] md:text-xs !text-white/70 mb-0.5 uppercase tracking-wider drop-shadow-sm", children: card.content.eyebrow })), card.content?.subtitle && (_jsx(Text, { className: "hidden md:block text-xs md:text-sm !text-white/90 mb-0.5 md:mb-2 drop-shadow-sm", children: card.content.subtitle })), card.content?.title && (_jsx(Heading, { level: 2, className: `text-[11px] md:text-2xl lg:text-3xl font-bold mb-0.5 md:mb-3 drop-shadow-md ${THEME_CONSTANTS.utilities.textClamp2}`, style: { color: card.content.textColor ?? "#ffffff" }, children: card.content.title })), card.content?.description && (_jsx(Text, { className: `text-[10px] md:text-sm !text-white/80 mb-1 md:mb-4 ${THEME_CONSTANTS.utilities.textClamp1} drop-shadow-sm`, children: card.content.description })), (card.buttons?.length ?? 0) > 0 && (_jsx(Row, { wrap: true, gap: "xs", className: "md:gap-2", children: (card.buttons ?? []).map((btn, i) => {
|
|
94
|
+
const variant = btn.variant === "link" || btn.variant === "ghost"
|
|
95
|
+
? "ghost"
|
|
96
|
+
: btn.variant;
|
|
97
|
+
return (_jsx(Button, { variant: variant, size: "sm", onClick: () => {
|
|
98
|
+
if (btn.openInNewTab) {
|
|
99
|
+
window.open(btn.href, "_blank", "noopener,noreferrer");
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
navigate(btn.href, push);
|
|
103
|
+
}
|
|
104
|
+
}, children: btn.text }, btn.id ?? i));
|
|
105
|
+
}) }))] })), card.isButtonOnly && card.buttons?.[0] && (_jsx(Button, { variant: "ghost", className: `${position.fill} ${flex.center} font-semibold text-white hover:bg-black/20 transition-colors rounded-none p-0`, onClick: () => {
|
|
106
|
+
const btn = card.buttons[0];
|
|
107
|
+
if (btn.openInNewTab) {
|
|
108
|
+
window.open(btn.href, "_blank", "noopener,noreferrer");
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
navigate(btn.href, push);
|
|
112
|
+
}
|
|
113
|
+
}, children: _jsx(Span, { className: "text-lg md:text-2xl", children: card.buttons[0].text }) }))] }));
|
|
114
|
+
}
|
|
19
115
|
export function HeroCarousel({ initialSlides, push } = {}) {
|
|
20
116
|
const [currentSlide, setCurrentSlide] = useState(0);
|
|
21
117
|
const [isPaused, setIsPaused] = useState(false);
|
|
@@ -29,6 +125,9 @@ export function HeroCarousel({ initialSlides, push } = {}) {
|
|
|
29
125
|
?.filter((s) => s.active)
|
|
30
126
|
?.sort((a, b) => a.order - b.order)
|
|
31
127
|
?.slice(0, 5) || [];
|
|
128
|
+
const currentSlideData = slides[currentSlide];
|
|
129
|
+
const autoplayDelay = currentSlideData?.settings?.autoplayDelayMs ?? 4000;
|
|
130
|
+
const heightClass = getSlideHeightClass(currentSlideData?.settings?.height);
|
|
32
131
|
const goToSlide = useCallback((index) => {
|
|
33
132
|
const el = slidesRef.current;
|
|
34
133
|
if (!el)
|
|
@@ -36,9 +135,7 @@ export function HeroCarousel({ initialSlides, push } = {}) {
|
|
|
36
135
|
setCurrentSlide(index);
|
|
37
136
|
isScrollingRef.current = true;
|
|
38
137
|
el.scrollTo({ left: index * el.offsetWidth, behavior: "smooth" });
|
|
39
|
-
setTimeout(() => {
|
|
40
|
-
isScrollingRef.current = false;
|
|
41
|
-
}, 600);
|
|
138
|
+
setTimeout(() => { isScrollingRef.current = false; }, 600);
|
|
42
139
|
}, []);
|
|
43
140
|
const goNext = useCallback(() => goToSlide((currentSlide + 1) % slides.length), [currentSlide, slides.length, goToSlide]);
|
|
44
141
|
const goPrev = useCallback(() => goToSlide((currentSlide - 1 + slides.length) % slides.length), [currentSlide, slides.length, goToSlide]);
|
|
@@ -55,29 +152,9 @@ export function HeroCarousel({ initialSlides, push } = {}) {
|
|
|
55
152
|
useEffect(() => {
|
|
56
153
|
if (slides.length <= 1 || isPaused || prefersReducedMotion)
|
|
57
154
|
return;
|
|
58
|
-
const interval = setInterval(goNext,
|
|
155
|
+
const interval = setInterval(goNext, autoplayDelay);
|
|
59
156
|
return () => clearInterval(interval);
|
|
60
|
-
}, [slides.length, isPaused, prefersReducedMotion, goNext]);
|
|
61
|
-
if (isLoading) {
|
|
62
|
-
return (_jsx(Div, { className: `relative w-full ${homepage.heroMinH} ${THEME_CONSTANTS.themed.bgTertiary} animate-pulse`, children: _jsx(Div, { className: `${position.fill} ${flex.center}`, children: _jsx(Text, { variant: "secondary", children: "Loading..." }) }) }));
|
|
63
|
-
}
|
|
64
|
-
if (!slides || slides.length === 0) {
|
|
65
|
-
return (_jsxs(Div, { className: `relative w-full ${homepage.heroMinH} bg-gradient-to-br from-primary/10 to-secondary/10 ${flex.center} flex-col gap-4`, children: [_jsx(Heading, { level: 2, className: "text-2xl font-bold text-primary", children: "Coming Soon" }), _jsx(Text, { variant: "secondary", className: "text-center max-w-md px-4", children: "Amazing deals are on their way. Stay tuned!" })] }));
|
|
66
|
-
}
|
|
67
|
-
const getBackgroundStyle = (card) => {
|
|
68
|
-
const { type, value } = card.background;
|
|
69
|
-
if (type === "transparent")
|
|
70
|
-
return { background: "transparent" };
|
|
71
|
-
if (type === "color")
|
|
72
|
-
return { backgroundColor: value };
|
|
73
|
-
if (type === "gradient")
|
|
74
|
-
return { background: value };
|
|
75
|
-
return {};
|
|
76
|
-
};
|
|
77
|
-
const getGridPosition = (card) => ({
|
|
78
|
-
gridRow: String(card.gridRow),
|
|
79
|
-
gridColumn: isMobile ? "1" : String(card.gridCol),
|
|
80
|
-
});
|
|
157
|
+
}, [slides.length, isPaused, prefersReducedMotion, goNext, autoplayDelay]);
|
|
81
158
|
const handleKeyDown = (e) => {
|
|
82
159
|
if (e.key === "ArrowRight")
|
|
83
160
|
goNext();
|
|
@@ -88,63 +165,30 @@ export function HeroCarousel({ initialSlides, push } = {}) {
|
|
|
88
165
|
setIsPaused((p) => !p);
|
|
89
166
|
}
|
|
90
167
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
: isMobile
|
|
116
|
-
? "65%"
|
|
117
|
-
: "100%",
|
|
118
|
-
height: card.sizing?.heightPct
|
|
119
|
-
? `${isMobile ? Math.min(card.sizing.heightPct, 55) : card.sizing.heightPct}%`
|
|
120
|
-
: isMobile
|
|
121
|
-
? "55%"
|
|
122
|
-
: "100%",
|
|
123
|
-
justifySelf: "center",
|
|
124
|
-
alignSelf: "center",
|
|
125
|
-
}, children: [card.background.type === "image" &&
|
|
126
|
-
card.background.value && (_jsx(MediaImage, { src: card.background.value, alt: "", size: "card" })), !card.isButtonOnly && (_jsxs(Div, { className: `${position.fill} flex flex-col justify-end bg-gradient-to-t from-black/80 via-black/30 to-transparent ${card.sizing?.padding === "none"
|
|
127
|
-
? "p-0"
|
|
128
|
-
: card.sizing?.padding === "sm"
|
|
129
|
-
? "p-1.5 md:p-3"
|
|
130
|
-
: card.sizing?.padding === "lg"
|
|
131
|
-
? "p-3 md:p-8"
|
|
132
|
-
: "p-2 md:p-6"}`, children: [card.content?.subtitle && (_jsx(Text, { className: "hidden md:block text-xs md:text-sm !text-white/90 mb-0.5 md:mb-2 drop-shadow-sm", children: card.content.subtitle })), card.content?.title && (_jsx(Heading, { level: 2, className: `text-[11px] md:text-2xl lg:text-3xl font-bold !text-white mb-0.5 md:mb-3 ${THEME_CONSTANTS.utilities.textClamp1} md:${THEME_CONSTANTS.utilities.textClamp2} drop-shadow-md`, children: card.content.title })), card.content?.description && (_jsx(Text, { className: `text-[10px] md:text-sm lg:text-base !text-white/80 mb-1 md:mb-4 ${THEME_CONSTANTS.utilities.textClamp1} drop-shadow-sm`, children: card.content.description })), (card.buttons?.length ?? 0) > 0 && (_jsx(Row, { wrap: true, gap: "xs", className: "md:gap-2", children: (card.buttons ?? []).map((btn) => (_jsx(Button, { variant: btn.variant, size: "sm", onClick: () => {
|
|
133
|
-
if (btn.openInNewTab) {
|
|
134
|
-
window.open(btn.link, "_blank", "noopener,noreferrer");
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
navigate(btn.link, push);
|
|
138
|
-
}
|
|
139
|
-
}, children: btn.text }, btn.id))) }))] })), card.isButtonOnly && card.buttons?.[0] && (_jsx(Button, { variant: "ghost", className: `${position.fill} ${flex.center} font-semibold text-white hover:bg-black/20 transition-colors rounded-none p-0`, onClick: () => {
|
|
140
|
-
const btn = card.buttons[0];
|
|
141
|
-
if (btn.openInNewTab) {
|
|
142
|
-
window.open(btn.link, "_blank", "noopener,noreferrer");
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
navigate(btn.link, push);
|
|
146
|
-
}
|
|
147
|
-
}, children: _jsx(Span, { className: "text-lg md:text-2xl", children: card.buttons[0].text }) }))] }, card.id))) }))] }, slide.id))) }) }), slides.length > 1 && (_jsx(Div, { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2 z-10", children: slides.map((_, index) => (_jsx(Button, { variant: "ghost", className: `relative overflow-hidden rounded-full transition-all duration-500 p-0 !min-h-0 ${index === currentSlide
|
|
168
|
+
if (isLoading) {
|
|
169
|
+
return (_jsx(Div, { className: `relative w-full ${heightClass} ${THEME_CONSTANTS.themed.bgTertiary} animate-pulse`, children: _jsx(Div, { className: `${position.fill} ${flex.center}`, children: _jsx(Text, { variant: "secondary", children: "Loading..." }) }) }));
|
|
170
|
+
}
|
|
171
|
+
if (!slides || slides.length === 0) {
|
|
172
|
+
return (_jsxs(Div, { className: `relative w-full min-h-[260px] md:min-h-[60vh] bg-gradient-to-br from-primary/10 to-secondary/10 ${flex.center} flex-col gap-4`, children: [_jsx(Heading, { level: 2, className: "text-2xl font-bold text-primary", children: "Coming Soon" }), _jsx(Text, { variant: "secondary", className: "text-center max-w-md px-4", children: "Amazing deals are on their way. Stay tuned!" })] }));
|
|
173
|
+
}
|
|
174
|
+
return (_jsxs(Section, { ref: sectionRef, className: `relative w-full ${heightClass} overflow-hidden`, "aria-roledescription": "carousel", "aria-label": "Hero carousel", onKeyDown: handleKeyDown, onMouseEnter: () => setIsPaused(true), onMouseLeave: () => setIsPaused(false), onFocus: () => setIsPaused(true), onBlur: () => setIsPaused(false), tabIndex: 0, children: [_jsx(Div, { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: `Slide ${currentSlide + 1} of ${slides.length}` }), _jsx(Div, { className: position.fill, children: _jsx(Div, { ref: slidesRef, onScroll: handleSlidesScroll, className: "flex h-full overflow-x-auto scroll-smooth snap-x snap-mandatory [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", style: { gap: 0 }, children: slides.map((slide, slideIndex) => {
|
|
175
|
+
const slideHeightClass = getSlideHeightClass(slide.settings?.height);
|
|
176
|
+
const hasCards = slide.cards && slide.cards.length > 0;
|
|
177
|
+
return (_jsxs(Div, { className: `snap-start flex-none w-full relative self-stretch bg-zinc-900 ${slideHeightClass}`, children: [_jsx(Div, { className: position.fill, children: _jsx(SlideBackground, { bg: slide.background, legacy: slide.media, mobileLegacy: slide.mobileMedia, isMobile: isMobile, priority: slideIndex === 0 }) }), slide.overlay && (_jsxs(Div, { className: `${position.fill} ${flex.center} flex-col text-center px-6 md:px-16 lg:px-32`, children: [slide.overlay.subtitle && (_jsx(Text, { className: "stagger-1 text-xs md:text-sm !text-white/80 mb-1 md:mb-2 drop-shadow-sm uppercase tracking-widest", children: slide.overlay.subtitle })), slide.overlay.title && (_jsx(Heading, { level: 1, className: "stagger-2 font-display text-4xl md:text-6xl lg:text-8xl !text-white drop-shadow-2xl mb-2 md:mb-4", children: slide.overlay.title })), slide.overlay.description && (_jsx(Text, { className: "stagger-3 text-sm md:text-lg lg:text-xl !text-white/90 mb-4 md:mb-8 drop-shadow-sm max-w-2xl mx-auto", children: slide.overlay.description })), slide.overlay.button && (_jsx(Div, { className: "stagger-4", children: _jsx(Button, { variant: slide.overlay.button.variant, size: "sm", onClick: () => {
|
|
178
|
+
const btn = slide.overlay.button;
|
|
179
|
+
if (btn.openInNewTab) {
|
|
180
|
+
window.open(btn.link, "_blank", "noopener,noreferrer");
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
navigate(btn.link, push);
|
|
184
|
+
}
|
|
185
|
+
}, children: slide.overlay.button.text }) }))] })), hasCards && (_jsx(Div, { className: `${position.fill} grid gap-2 md:gap-4 p-4 md:p-8`, style: {
|
|
186
|
+
gridTemplateRows: "repeat(2, 1fr)",
|
|
187
|
+
gridTemplateColumns: isMobile ? "1fr" : "repeat(3, 1fr)",
|
|
188
|
+
alignContent: "center",
|
|
189
|
+
alignItems: "stretch",
|
|
190
|
+
}, children: slide.cards.slice(0, 6).map((card) => (_jsx(CarouselCardRenderer, { card: card, isMobile: isMobile, push: push }, card.id))) }))] }, slide.id));
|
|
191
|
+
}) }) }), slides.length > 1 && (_jsx(Div, { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2 z-10", children: slides.map((_, index) => (_jsx(Button, { variant: "ghost", className: `relative overflow-hidden rounded-full transition-all duration-500 p-0 !min-h-0 ${index === currentSlide
|
|
148
192
|
? THEME_CONSTANTS.carousel.dotActive
|
|
149
|
-
: `${THEME_CONSTANTS.carousel.dotInactive} hover:bg-white/75`}`, onClick: () => goToSlide(index), "aria-label": `Go to slide ${index + 1}`, children: index === currentSlide && (_jsx(Span, { className: "absolute inset-y-0 left-0 bg-black/20 rounded-full animate-[progress-fill_4s_linear_forwards]", "aria-hidden": "true" })) }, index))) })),
|
|
193
|
+
: `${THEME_CONSTANTS.carousel.dotInactive} hover:bg-white/75`}`, onClick: () => goToSlide(index), "aria-label": `Go to slide ${index + 1}`, children: index === currentSlide && (_jsx(Span, { className: "absolute inset-y-0 left-0 bg-black/20 rounded-full animate-[progress-fill_4s_linear_forwards]", "aria-hidden": "true" })) }, index))) })), slides.length > 1 && (_jsxs(Div, { className: "absolute bottom-4 right-4 z-20 flex gap-2", children: [_jsx(Button, { variant: "ghost", className: `p-0 ${THEME_CONSTANTS.carousel.arrow}`, onClick: goPrev, "aria-label": "Previous slide", children: _jsx("svg", { className: "w-7 h-7", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M15 19l-7-7 7-7" }) }) }), _jsx(Button, { variant: "ghost", className: `p-0 ${THEME_CONSTANTS.carousel.arrow}`, onClick: goNext, "aria-label": "Next slide", children: _jsx("svg", { className: "w-7 h-7", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M9 5l7 7-7 7" }) }) })] }))] }));
|
|
150
194
|
}
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
3
|
-
/** Rendered immediately after the hero carousel. Good for a full-width banner. */
|
|
4
|
-
afterHero?: React.ReactNode;
|
|
5
|
-
/** Rendered between featured products and featured auctions. */
|
|
6
|
-
afterFeaturedProducts?: React.ReactNode;
|
|
7
|
-
/** Rendered after the customer reviews section. */
|
|
8
|
-
afterReviews?: React.ReactNode;
|
|
9
|
-
/** Rendered after the FAQ section. */
|
|
10
|
-
afterFAQ?: React.ReactNode;
|
|
11
|
-
}
|
|
2
|
+
export type { MarketplaceHomepageViewAdSlots } from "../lib/section-renderer";
|
|
12
3
|
export interface MarketplaceHomepageViewProps {
|
|
13
|
-
|
|
14
|
-
* Optional ad slot content injected at key positions in the homepage.
|
|
15
|
-
* Pass `<AdSlot id="..." />` as values; they render nothing when the slot
|
|
16
|
-
* is not configured or consent hasn't been granted.
|
|
17
|
-
*/
|
|
18
|
-
adSlots?: MarketplaceHomepageViewAdSlots;
|
|
19
|
-
/**
|
|
20
|
-
* Optional newsletter form content for homepage section #16.
|
|
21
|
-
* Provide a client component wired to live subscribe actions/API.
|
|
22
|
-
*/
|
|
4
|
+
adSlots?: import("../lib/section-renderer").MarketplaceHomepageViewAdSlots;
|
|
23
5
|
newsletterFormSlot?: React.ReactNode;
|
|
24
6
|
}
|
|
25
7
|
export declare function MarketplaceHomepageView({ adSlots, newsletterFormSlot, }?: MarketplaceHomepageViewProps): Promise<import("react/jsx-runtime").JSX.Element>;
|