@mohasinac/appkit 2.8.2 → 2.8.3
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/classified/ClassifiedDetailView.js +7 -1
- package/dist/_internal/client/features/digital-code/CodeRevealPanel.js +4 -1
- package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +7 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +3 -2
- package/dist/_internal/client/features/live/LiveItemDetailView.js +11 -2
- package/dist/_internal/client/scaffolds/AppShell.js +2 -1
- package/dist/_internal/client/scaffolds/DashboardScaffold.js +2 -1
- package/dist/_internal/server/features/checkout/actions.js +40 -39
- package/dist/_internal/shared/actions/action-registry.js +6 -0
- package/dist/_internal/shared/config/index.d.ts +1 -1
- package/dist/_internal/shared/config/schema.d.ts +0 -8
- package/dist/client-entry.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/configs/next.js +12 -22
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +2 -0
- package/dist/core/hooks/useSiteSettings.d.ts +1 -1
- package/dist/features/about/components/AboutView.js +5 -2
- package/dist/features/about/components/FAQPageView.js +3 -3
- package/dist/features/about/components/FeesView.js +13 -5
- package/dist/features/about/components/HelpPageView.js +9 -5
- package/dist/features/about/components/HowAuctionsWorkView.js +9 -5
- package/dist/features/about/components/HowCheckoutWorksView.js +9 -5
- package/dist/features/about/components/HowOffersWorkView.js +10 -5
- package/dist/features/about/components/HowOrdersWorkView.js +10 -5
- package/dist/features/about/components/HowPayoutsWorkView.js +9 -5
- package/dist/features/about/components/HowPreOrdersWorkView.js +9 -5
- package/dist/features/about/components/HowReviewsWorkView.js +9 -5
- package/dist/features/about/components/PolicyPageView.js +3 -3
- package/dist/features/about/components/PublicProfileView.js +11 -4
- package/dist/features/about/components/SecurityPrivacyView.js +8 -4
- package/dist/features/about/components/ShippingPolicyView.js +3 -2
- package/dist/features/about/components/TrackOrderView.js +2 -2
- package/dist/features/about/components/UnauthorizedView.js +3 -3
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressForm.js +2 -2
- package/dist/features/account/components/AddressInlineSelect.d.ts +24 -0
- package/dist/features/account/components/AddressInlineSelect.js +78 -0
- package/dist/features/account/components/AddressSelectorCreate.d.ts +2 -1
- package/dist/features/account/components/AddressSelectorCreate.js +5 -32
- package/dist/features/account/components/AddressesIndexListing.js +3 -3
- package/dist/features/account/components/ChatWindow.js +2 -1
- package/dist/features/account/components/NotificationBell.js +13 -7
- package/dist/features/account/components/NotificationPreferencesPanel.js +4 -1
- package/dist/features/account/components/UserOffersPanel.js +2 -1
- package/dist/features/account/components/UserSidebar.js +11 -7
- package/dist/features/account/components/UserSupportView.js +13 -4
- package/dist/features/account/components/index.d.ts +2 -0
- package/dist/features/account/components/index.js +1 -0
- package/dist/features/account/hooks/useAccount.d.ts +2 -2
- package/dist/features/account/hooks/useAddressSelector.d.ts +1 -1
- package/dist/features/account/hooks/useAddresses.d.ts +2 -2
- package/dist/features/account/hooks/useNotifications.d.ts +1 -1
- package/dist/features/account/hooks/useProfile.d.ts +1 -1
- package/dist/features/account/hooks/usePublicProfile.d.ts +2 -2
- package/dist/features/addresses/repository/addresses.repository.d.ts +1 -0
- package/dist/features/addresses/repository/addresses.repository.js +13 -0
- package/dist/features/admin/components/AdminAdEditorView.js +8 -5
- package/dist/features/admin/components/AdminAddressEditorView.js +5 -5
- package/dist/features/admin/components/AdminAdsView.js +10 -7
- package/dist/features/admin/components/AdminBlogEditorView.js +15 -9
- package/dist/features/admin/components/AdminBrandEditorView.js +10 -4
- package/dist/features/admin/components/AdminBrandsView.js +4 -4
- package/dist/features/admin/components/AdminBundleEditorView.js +4 -5
- package/dist/features/admin/components/AdminBundlesView.js +3 -3
- package/dist/features/admin/components/AdminCarouselEditorView.js +6 -3
- package/dist/features/admin/components/AdminCarouselView.js +6 -6
- package/dist/features/admin/components/AdminCatalogGuideView.js +2 -1
- package/dist/features/admin/components/AdminCategoriesView.js +5 -5
- package/dist/features/admin/components/AdminCategoryEditorView.js +11 -5
- package/dist/features/admin/components/AdminContactEditorView.js +8 -1
- package/dist/features/admin/components/AdminCouponEditorView.js +23 -5
- package/dist/features/admin/components/AdminEmployeeEditorView.js +7 -4
- package/dist/features/admin/components/AdminFaqEditorView.js +9 -3
- package/dist/features/admin/components/AdminFaqsView.js +4 -4
- package/dist/features/admin/components/AdminFeatureEditorView.js +7 -1
- package/dist/features/admin/components/AdminFeatureFlagsView.js +4 -1
- package/dist/features/admin/components/AdminFilterBar.js +4 -4
- package/dist/features/admin/components/AdminGroupedListingsView.js +65 -30
- package/dist/features/admin/components/AdminGuideHubView.js +4 -1
- package/dist/features/admin/components/AdminMediaView.js +4 -1
- package/dist/features/admin/components/AdminNavigationView.js +7 -4
- package/dist/features/admin/components/AdminNotificationsView.js +2 -2
- package/dist/features/admin/components/AdminOrderEditorView.js +2 -2
- package/dist/features/admin/components/AdminPageHeader.js +5 -2
- package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -5
- package/dist/features/admin/components/AdminProductEditorView.js +12 -5
- package/dist/features/admin/components/AdminProductsView.js +4 -4
- package/dist/features/admin/components/AdminReviewsView.js +2 -2
- package/dist/features/admin/components/AdminScammerEditorView.js +6 -2
- package/dist/features/admin/components/AdminScammersView.js +3 -3
- package/dist/features/admin/components/AdminSectionsView.js +20 -22
- package/dist/features/admin/components/AdminSessionsManager.js +2 -1
- package/dist/features/admin/components/AdminSessionsView.js +2 -2
- package/dist/features/admin/components/AdminSidebar.js +11 -7
- package/dist/features/admin/components/AdminSiteConfigGuideView.js +2 -1
- package/dist/features/admin/components/AdminSiteSettingsView.js +5 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +2 -2
- package/dist/features/admin/components/AdminStoreEditorView.js +5 -5
- package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +3 -3
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +10 -3
- package/dist/features/admin/components/AdminSupportTicketsView.js +3 -3
- package/dist/features/admin/components/AdminTrustGuideView.js +3 -3
- package/dist/features/admin/components/AdminUsersGuideView.js +3 -3
- package/dist/features/admin/components/AdminViewCards.js +12 -6
- package/dist/features/admin/components/BrandQuickCreateForm.js +2 -2
- package/dist/features/admin/components/CategoryQuickCreateForm.js +2 -2
- package/dist/features/admin/components/DashboardStats.js +9 -3
- package/dist/features/admin/components/DataListingView.js +3 -3
- package/dist/features/admin/components/DataTable.js +11 -7
- package/dist/features/admin/components/DrawerFormFooter.js +2 -2
- package/dist/features/admin/components/QuickEditMenu.js +2 -1
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +5 -1
- package/dist/features/admin/hooks/useAdmin.d.ts +1 -1
- package/dist/features/admin/hooks/useAdminSectionsListing.d.ts +1 -1
- package/dist/features/admin/hooks/useChat.d.ts +1 -1
- package/dist/features/auctions/components/AuctionBidsTable.js +4 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +14 -6
- package/dist/features/auctions/components/CollapsibleBidHistory.js +5 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +9 -3
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +8 -2
- package/dist/features/auctions/components/PlaceBidFormClient.js +4 -1
- package/dist/features/auctions/hooks/useAuctions.d.ts +8 -8
- package/dist/features/auth/components/RegisterForm.js +2 -2
- package/dist/features/auth/components/VerifyEmailView.js +5 -2
- package/dist/features/auth/hooks/useAuth.d.ts +2 -2
- package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +8 -1
- package/dist/features/blog/components/BlogIndexListing.js +11 -5
- package/dist/features/blog/components/BlogListView.js +11 -3
- package/dist/features/blog/components/BlogPostView.js +10 -3
- package/dist/features/cart/components/CartDrawer.js +11 -3
- package/dist/features/cart/components/CartSummary.js +2 -2
- package/dist/features/cart/components/CheckoutOtpModal.js +2 -1
- package/dist/features/cart/hooks/useCart.d.ts +1 -1
- package/dist/features/cart/hooks/useCartQuery.d.ts +1 -1
- package/dist/features/cart/hooks/useCheckoutReadQueries.d.ts +2 -2
- package/dist/features/cart/hooks/useOrder.d.ts +2 -2
- package/dist/features/categories/components/BrandDetailPageView.js +5 -2
- package/dist/features/categories/components/BrandDetailTabs.js +5 -1
- package/dist/features/categories/components/BundleDetailView.js +6 -3
- package/dist/features/categories/components/BundleDynamicRuleEditor.js +3 -1
- package/dist/features/categories/components/BundleItemsPicker.js +10 -3
- package/dist/features/categories/components/CategoriesIndexListing.js +12 -6
- package/dist/features/categories/components/CategoryBundlesListing.js +5 -2
- package/dist/features/categories/components/CategoryDetailPageView.js +6 -2
- package/dist/features/categories/components/CategoryDetailTabs.js +5 -1
- package/dist/features/categories/components/CategoryForm.js +6 -3
- package/dist/features/categories/components/CategoryGrid.js +9 -2
- package/dist/features/categories/components/CategoryProductsListing.js +10 -4
- package/dist/features/categories/components/CategorySelectorCreate.js +3 -3
- package/dist/features/categories/components/CategorySortSelect.js +1 -1
- package/dist/features/categories/components/CategoryStoresListing.js +3 -3
- package/dist/features/categories/components/CategoryTableColumns.js +10 -6
- package/dist/features/categories/components/CategoryTree.js +1 -1
- package/dist/features/categories/hooks/useCategories.d.ts +3 -3
- package/dist/features/categories/hooks/useCategorySelector.d.ts +3 -3
- package/dist/features/categories/hooks/useCategoryTree.d.ts +1 -1
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +2 -2
- package/dist/features/classified/components/ClassifiedFilters.js +2 -2
- package/dist/features/classified/components/ClassifiedIndexListing.js +9 -3
- package/dist/features/collections/components/CollectionCard.js +2 -1
- package/dist/features/collections/hooks/useCollections.d.ts +2 -2
- package/dist/features/contact/components/ContactForm.js +4 -2
- package/dist/features/contact/components/ContactInfoSidebar.js +4 -1
- package/dist/features/copilot/components/AdminCopilotView.js +13 -5
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +9 -3
- package/dist/features/events/components/AdminEventEditorView.js +62 -40
- package/dist/features/events/components/AdminEventEntriesView.js +9 -6
- package/dist/features/events/components/EventCard.js +7 -1
- package/dist/features/events/components/EventFormDrawer.js +2 -1
- package/dist/features/events/components/EventLeaderboard.js +4 -4
- package/dist/features/events/components/EventOfferCard.js +4 -1
- package/dist/features/events/components/EventParticipateView.js +3 -2
- package/dist/features/events/components/EventPollWidget.js +6 -5
- package/dist/features/events/components/EventRaffleEntryForm.js +5 -2
- package/dist/features/events/components/EventRaffleWinnerView.js +7 -1
- package/dist/features/events/components/EventRafflesSection.js +2 -2
- package/dist/features/events/components/EventSaleBanner.js +5 -2
- package/dist/features/events/components/EventsIndexListing.js +8 -2
- package/dist/features/events/components/EventsListView.js +4 -1
- package/dist/features/events/components/SpinWheelView.js +7 -2
- package/dist/features/events/hooks/useEvent.d.ts +3 -3
- package/dist/features/events/hooks/useEvents.d.ts +1 -1
- package/dist/features/events/schemas/firestore.d.ts +1 -0
- package/dist/features/events/types/index.d.ts +1 -0
- package/dist/features/faq/components/ContactCTA.js +4 -1
- package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
- package/dist/features/faq/components/FAQHelpfulButtons.js +8 -5
- package/dist/features/faq/components/FAQPageContent.js +5 -5
- package/dist/features/faq/components/FAQSortDropdown.js +2 -2
- package/dist/features/faq/hooks/useFAQs.d.ts +1 -1
- package/dist/features/faq/hooks/useFaqList.d.ts +15 -15
- package/dist/features/filters/AsyncFacetSection.js +4 -2
- package/dist/features/filters/FilterFacetSection.js +14 -6
- package/dist/features/filters/RangeFilter.js +4 -2
- package/dist/features/filters/SwitchFilter.js +2 -1
- package/dist/features/forms/Checkbox.js +1 -1
- package/dist/features/forms/Radio.js +1 -1
- package/dist/features/forms/Slider.js +1 -1
- package/dist/features/homepage/components/AdSlot.js +4 -4
- package/dist/features/homepage/components/AdvertisementBanner.js +13 -4
- package/dist/features/homepage/components/AnnouncementBar.js +2 -1
- package/dist/features/homepage/components/BeforeAfterCard.js +8 -2
- package/dist/features/homepage/components/BrandsSection.js +6 -3
- package/dist/features/homepage/components/CTABannerSection.js +2 -2
- package/dist/features/homepage/components/CharacterHotspot.js +5 -2
- package/dist/features/homepage/components/CharacterHotspotForm.js +8 -4
- package/dist/features/homepage/components/CustomCardsSection.js +13 -7
- package/dist/features/homepage/components/CustomerReviewsSection.js +9 -3
- package/dist/features/homepage/components/FAQSection.js +7 -4
- package/dist/features/homepage/components/FeaturedBundlesSection.js +8 -2
- package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
- package/dist/features/homepage/components/GoogleReviewsSection.js +14 -8
- package/dist/features/homepage/components/HeroCarousel.js +1 -1
- package/dist/features/homepage/components/HomepageSkeleton.js +7 -1
- package/dist/features/homepage/components/HowItWorksInfoView.js +2 -2
- package/dist/features/homepage/components/HowItWorksSection.js +2 -2
- package/dist/features/homepage/components/NewsletterBanner.js +3 -2
- package/dist/features/homepage/components/NewsletterSection.js +5 -2
- package/dist/features/homepage/components/PromoGrid.js +4 -1
- package/dist/features/homepage/components/SectionCarousel.js +7 -4
- package/dist/features/homepage/components/SecurityHighlightsSection.js +3 -3
- package/dist/features/homepage/components/ShopByCategorySection.js +10 -4
- package/dist/features/homepage/components/SiteFeaturesSection.js +5 -2
- package/dist/features/homepage/components/SocialFeedSection.js +4 -4
- package/dist/features/homepage/components/SocialPostCard.js +6 -3
- package/dist/features/homepage/components/TrustFeaturesSection.js +5 -5
- package/dist/features/homepage/components/TrustIndicatorsSection.js +5 -2
- package/dist/features/homepage/components/WelcomeSection.js +1 -1
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +3 -3
- package/dist/features/homepage/hooks/useBlogArticles.d.ts +1 -1
- package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +1 -1
- package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +1 -1
- package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +1 -1
- package/dist/features/homepage/hooks/useFeaturedStores.d.ts +1 -1
- package/dist/features/homepage/hooks/useHeroCarousel.d.ts +1 -1
- package/dist/features/homepage/hooks/useHomepageEvents.d.ts +1 -1
- package/dist/features/homepage/hooks/useHomepageReviews.d.ts +1 -1
- package/dist/features/homepage/hooks/useHomepageSections.d.ts +1 -1
- package/dist/features/homepage/hooks/useTopBrands.d.ts +1 -1
- package/dist/features/homepage/hooks/useTopCategories.d.ts +1 -1
- package/dist/features/layout/AppLayoutShell.js +2 -1
- package/dist/features/layout/BackToTop.js +1 -1
- package/dist/features/layout/BottomActions.js +4 -3
- package/dist/features/layout/BottomNavItem.js +1 -1
- package/dist/features/layout/BottomSheet.js +4 -1
- package/dist/features/layout/FooterLayout.js +1 -1
- package/dist/features/layout/NavbarLayout.js +4 -1
- package/dist/features/layout/SidebarLayout.js +5 -2
- package/dist/features/live/components/LiveItemFilters.js +2 -2
- package/dist/features/live/components/LiveItemsIndexListing.js +9 -3
- package/dist/features/loyalty/components/CoinsDisplay.js +4 -2
- package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +1 -1
- package/dist/features/media/AvatarUpload.js +2 -2
- package/dist/features/media/MediaLightbox.js +3 -2
- package/dist/features/media/modals/VideoThumbnailSelector.js +4 -1
- package/dist/features/media/modals/VideoTrimModal.js +1 -1
- package/dist/features/media/upload/CameraCapture.js +1 -1
- package/dist/features/media/upload/ImageUpload.js +4 -1
- package/dist/features/media/upload/MediaUploadField.js +11 -2
- package/dist/features/media/upload/MediaUploadList.js +5 -1
- package/dist/features/orders/components/MarketplaceOrderCard.js +2 -2
- package/dist/features/orders/components/OrdersList.js +2 -1
- package/dist/features/orders/components/RefundHistoryTable.js +4 -1
- package/dist/features/orders/components/RefundRequestView.js +2 -1
- package/dist/features/orders/hooks/useOrders.d.ts +2 -2
- package/dist/features/payments/hooks/usePayments.d.ts +1 -1
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -1
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +3 -3
- package/dist/features/pre-orders/components/PreOrderBadge.js +2 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +16 -7
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +32 -24
- package/dist/features/pre-orders/hooks/usePreOrders.d.ts +2 -2
- package/dist/features/products/columns/productTableColumns.js +9 -4
- package/dist/features/products/components/AuctionsIndexListing.js +9 -3
- package/dist/features/products/components/BidHistory.js +4 -4
- package/dist/features/products/components/CompareOverlay.js +10 -2
- package/dist/features/products/components/CustomFieldsEditor.js +2 -1
- package/dist/features/products/components/CustomSectionTabContent.js +2 -2
- package/dist/features/products/components/CustomSectionsEditor.js +3 -2
- package/dist/features/products/components/GroupSettingsPanel.js +34 -26
- package/dist/features/products/components/MakeOfferButton.js +6 -2
- package/dist/features/products/components/MakeOfferForm.js +2 -1
- package/dist/features/products/components/MarketplaceBundleCard.js +6 -3
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +3 -2
- package/dist/features/products/components/PlaceBidForm.js +2 -1
- package/dist/features/products/components/PrizeDrawCollage.js +6 -2
- package/dist/features/products/components/PrizeDrawDetailPageView.js +6 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +4 -2
- package/dist/features/products/components/PrizeDrawsIndexListing.js +6 -3
- package/dist/features/products/components/PrizeDrawsSection.js +2 -2
- package/dist/features/products/components/PrizeRevealModal.js +5 -1
- package/dist/features/products/components/ProductDetailPageView.js +32 -16
- package/dist/features/products/components/ProductFeatureBadges.js +9 -9
- package/dist/features/products/components/ProductForm.d.ts +11 -1
- package/dist/features/products/components/ProductForm.js +10 -5
- package/dist/features/products/components/ProductGalleryClient.js +8 -4
- package/dist/features/products/components/ProductGradingTab.js +4 -1
- package/dist/features/products/components/ProductGrid.js +35 -14
- package/dist/features/products/components/ProductInfo.js +2 -1
- package/dist/features/products/components/ProductTabs.js +2 -1
- package/dist/features/products/components/ProductTabsShell.js +5 -1
- package/dist/features/products/components/ProductsIndexListing.js +32 -24
- package/dist/features/products/components/ProductsIndexPageView.js +2 -2
- package/dist/features/products/components/RelatedProducts.js +3 -3
- package/dist/features/products/components/ShowGroupSection.js +10 -6
- package/dist/features/products/components/SublistingCarouselSection.js +7 -3
- package/dist/features/products/components/SublistingCategorySelect.d.ts +3 -1
- package/dist/features/products/components/SublistingCategorySelect.js +4 -37
- package/dist/features/products/constants/action-defs.js +3 -3
- package/dist/features/products/hooks/useProductDetail.d.ts +1 -1
- package/dist/features/products/hooks/useRelatedProducts.d.ts +1 -1
- package/dist/features/promotions/components/CouponCard.js +5 -3
- package/dist/features/promotions/components/CouponsIndexListing.js +7 -3
- package/dist/features/promotions/hooks/usePromotions.d.ts +2 -2
- package/dist/features/promotions/repository/coupons.repository.d.ts +8 -0
- package/dist/features/promotions/repository/coupons.repository.js +2 -0
- package/dist/features/reviews/components/ReviewDetailPageView.js +3 -3
- package/dist/features/reviews/components/ReviewDetailShell.js +15 -3
- package/dist/features/reviews/components/ReviewSummary.js +4 -2
- package/dist/features/reviews/components/ReviewsIndexListing.js +8 -2
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/reviews/hooks/useReviews.d.ts +2 -2
- package/dist/features/scams/components/ScamAwarenessModal.js +2 -2
- package/dist/features/scams/components/ScamProfileView.js +3 -3
- package/dist/features/scams/components/ScamRegistryView.js +6 -4
- package/dist/features/search/components/Search.js +9 -6
- package/dist/features/search/components/SearchFiltersRow.js +1 -1
- package/dist/features/search/components/SearchResultsSection.js +1 -1
- package/dist/features/search/hooks/useSearch.d.ts +2 -2
- package/dist/features/seller/components/CouponInlineSelect.d.ts +22 -0
- package/dist/features/seller/components/CouponInlineSelect.js +103 -0
- package/dist/features/seller/components/GroupInlineSelect.d.ts +23 -0
- package/dist/features/seller/components/GroupInlineSelect.js +80 -0
- package/dist/features/seller/components/PhysicalLocationModal.js +2 -1
- package/dist/features/seller/components/PrintCenterView.js +2 -1
- package/dist/features/seller/components/ProductInlineSelect.d.ts +24 -0
- package/dist/features/seller/components/ProductInlineSelect.js +42 -0
- package/dist/features/seller/components/QuickProductForm.js +4 -1
- package/dist/features/seller/components/SellerAddressesView.js +8 -3
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +6 -3
- package/dist/features/seller/components/SellerAnalyticsView.js +2 -2
- package/dist/features/seller/components/SellerBidsView.js +7 -7
- package/dist/features/seller/components/SellerBundlesView.js +2 -1
- package/dist/features/seller/components/SellerCouponEditorView.d.ts +2 -0
- package/dist/features/seller/components/SellerCouponEditorView.js +15 -3
- package/dist/features/seller/components/SellerCouponsView.js +1 -1
- package/dist/features/seller/components/SellerDashboardView.js +2 -2
- package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
- package/dist/features/seller/components/SellerGoogleReviewsView.js +2 -2
- package/dist/features/seller/components/SellerGroupedListingsView.js +5 -5
- package/dist/features/seller/components/SellerOrdersView.js +13 -10
- package/dist/features/seller/components/SellerPayoutMethodsView.js +5 -4
- package/dist/features/seller/components/SellerPayoutRequestView.js +5 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +6 -6
- package/dist/features/seller/components/SellerPrizeDrawsView.js +6 -6
- package/dist/features/seller/components/SellerProductShell.js +1 -1
- package/dist/features/seller/components/SellerProductsCards.js +4 -1
- package/dist/features/seller/components/SellerProductsView.js +5 -5
- package/dist/features/seller/components/SellerReviewsView.js +7 -3
- package/dist/features/seller/components/SellerShippingConfigsView.js +4 -4
- package/dist/features/seller/components/SellerShippingView.js +1 -1
- package/dist/features/seller/components/SellerSidebar.js +15 -8
- package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
- package/dist/features/seller/components/SellerStorefrontView.js +2 -2
- package/dist/features/seller/components/SellerTemplatesView.js +7 -4
- package/dist/features/seller/components/SublistingInlineSelect.d.ts +19 -0
- package/dist/features/seller/components/SublistingInlineSelect.js +83 -0
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
- package/dist/features/seller/components/index.d.ts +8 -0
- package/dist/features/seller/components/index.js +4 -0
- package/dist/features/seller/hooks/useSellerPayouts.d.ts +3 -3
- package/dist/features/seller/hooks/useSellerStore.d.ts +6 -6
- package/dist/features/seller/hooks/useSellerStorefront.d.ts +2 -2
- package/dist/features/shell/FormShell.js +10 -2
- package/dist/features/shell/QuickFormDrawer.js +5 -5
- package/dist/features/shell/StepForm.js +6 -6
- package/dist/features/site-settings/components/ActionPermissionsManager.js +8 -4
- package/dist/features/site-settings/components/NavPermissionsManager.js +7 -4
- package/dist/features/stores/components/InteractiveStoreCard.js +5 -1
- package/dist/features/stores/components/StoreAboutView.js +4 -1
- package/dist/features/stores/components/StoreAddressSelectorCreate.d.ts +2 -1
- package/dist/features/stores/components/StoreAddressSelectorCreate.js +5 -31
- package/dist/features/stores/components/StoreAuctionsListing.js +6 -3
- package/dist/features/stores/components/StoreGuideHubView.js +5 -2
- package/dist/features/stores/components/StoreHeader.js +8 -1
- package/dist/features/stores/components/StorePreOrdersListing.js +6 -3
- package/dist/features/stores/components/StoreProductsListing.js +6 -3
- package/dist/features/stores/components/StoreReviewsListing.js +8 -2
- package/dist/features/stores/components/StoresIndexListing.js +12 -6
- package/dist/features/stores/hooks/useStoreAddressSelector.d.ts +1 -1
- package/dist/features/stores/hooks/useStores.d.ts +6 -6
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +7 -1
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +2 -1
- package/dist/features/wishlist/components/WishlistPage.js +2 -1
- package/dist/features/wishlist/hooks/useUserWishlist.d.ts +15 -15
- package/dist/features/wishlist/hooks/useWishlist.d.ts +1 -1
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +13 -1
- package/dist/next/components/GlobalError.js +2 -2
- package/dist/next/routing/route-map.d.ts +2 -0
- package/dist/next/routing/route-map.js +1 -0
- package/dist/react/ErrorBoundary.js +2 -2
- package/dist/styles.css +2 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/DataTable.js +17 -16
- package/dist/ui/components/DateInput.js +2 -2
- package/dist/ui/components/DetailPageGallery.js +4 -1
- package/dist/ui/components/DetailPageTabs.js +6 -2
- package/dist/ui/components/ImageLightbox.js +5 -3
- package/dist/ui/components/Input.js +6 -3
- package/dist/ui/components/Layout.d.ts +4 -0
- package/dist/ui/components/Layout.js +1 -1
- package/dist/ui/components/Layout.style.css +1 -0
- package/dist/ui/components/ListingFilterDrawer.js +4 -1
- package/dist/ui/components/ListingLayout.js +9 -8
- package/dist/ui/components/ListingToolbar.js +5 -1
- package/dist/ui/components/PaginatedSelect.d.ts +1 -2
- package/dist/ui/components/PaginatedSelect.js +1 -2
- package/dist/ui/components/Radio.js +1 -1
- package/dist/ui/components/Select.js +2 -1
- package/dist/ui/components/Slider.js +1 -1
- package/dist/ui/components/VacationBanner.js +2 -1
- package/dist/ui/components/surface-tokens.d.ts +1 -0
- package/dist/ui/components/surface-tokens.js +1 -0
- package/package.json +11 -2
|
@@ -5,6 +5,12 @@ import Link from "next/link";
|
|
|
5
5
|
import { Badge, Button, Container, Div, Heading, Row, Section, Stack, Text, } from "../../../../ui";
|
|
6
6
|
import { ROUTES } from "../../../../next/routing/route-map";
|
|
7
7
|
import { formatCurrency } from "../../../../utils/number.formatter";
|
|
8
|
+
const __P = {
|
|
9
|
+
p4: "p-4",
|
|
10
|
+
};
|
|
11
|
+
const __O = {
|
|
12
|
+
hidden: "overflow-hidden",
|
|
13
|
+
};
|
|
8
14
|
export function ClassifiedDetailView({ product, isLoading = false, onContactSeller, }) {
|
|
9
15
|
const [pending, setPending] = useState(false);
|
|
10
16
|
const [conversation, setConversation] = useState(null);
|
|
@@ -31,5 +37,5 @@ export function ClassifiedDetailView({ product, isLoading = false, onContactSell
|
|
|
31
37
|
setPending(false);
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
|
-
return (_jsx(Container, { children: _jsx(Section, { className: "py-8", children: _jsxs(Stack, { gap: "lg", children: [product.images.length > 0 && (_jsx(Div, { className:
|
|
40
|
+
return (_jsx(Container, { children: _jsx(Section, { className: "py-8", children: _jsxs(Stack, { gap: "lg", children: [product.images.length > 0 && (_jsx(Div, { className: `${__O.hidden} rounded-lg bg-muted`, children: _jsx("img", { src: product.mainImage || product.images[0], alt: product.title, className: "h-80 w-full object-contain" }) })), _jsxs(Stack, { gap: "sm", children: [_jsxs(Row, { className: "flex-wrap gap-2", children: [_jsx(Badge, { variant: "secondary", children: "Classified" }), meta?.negotiable && _jsx(Badge, { variant: "secondary", children: "Negotiable" }), meta?.acceptsShipping && _jsx(Badge, { variant: "secondary", children: "Shipping available" })] }), _jsx(Heading, { level: 1, className: "text-2xl font-bold", children: product.title }), _jsx(Text, { className: "text-2xl font-semibold text-primary", children: price }), location && (_jsx(Text, { className: "text-sm text-muted-foreground", children: location })), _jsx(Text, { className: "text-muted-foreground", children: product.description })] }), conversation ? (_jsxs(Div, { className: `rounded-lg border border-border bg-muted/40 ${__P.p4}`, children: [_jsx(Text, { className: "mb-2 font-medium", children: "Conversation started!" }), _jsx(Link, { href: ROUTES.USER.MESSAGES, className: "text-primary underline underline-offset-2", children: "Go to your messages \u2192" })] })) : (_jsxs(Stack, { gap: "sm", children: [error && (_jsx(Text, { className: "text-sm text-destructive", children: error })), _jsx(Button, { type: "button", variant: "primary", size: "lg", isLoading: pending, disabled: pending, onClick: handleContactSeller, className: "w-full", children: "Contact Seller" })] }))] }) }) }));
|
|
35
41
|
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { Button, Div, Span, Stack, Text } from "../../../../ui";
|
|
5
|
+
const __P = {
|
|
6
|
+
p4: "p-4",
|
|
7
|
+
};
|
|
5
8
|
export function CodeRevealPanel({ orderId, redemptionInstructions, fetchCode, }) {
|
|
6
9
|
const [pending, setPending] = useState(false);
|
|
7
10
|
const [revealed, setRevealed] = useState(null);
|
|
@@ -28,5 +31,5 @@ export function CodeRevealPanel({ orderId, redemptionInstructions, fetchCode, })
|
|
|
28
31
|
setCopied(true);
|
|
29
32
|
setTimeout(() => setCopied(false), 2000);
|
|
30
33
|
}
|
|
31
|
-
return (_jsx(Div, { className:
|
|
34
|
+
return (_jsx(Div, { className: `rounded-lg border border-border bg-muted/40 ${__P.p4}`, children: _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { className: "font-medium", children: "Your Digital Code" }), !revealed ? (_jsxs(Stack, { gap: "sm", children: [error && _jsx(Text, { className: "text-sm text-destructive", children: error }), _jsx(Button, { type: "button", variant: "primary", size: "lg", isLoading: pending, disabled: pending, onClick: handleReveal, className: "w-full", children: "Reveal Code" })] })) : (_jsxs(Stack, { gap: "sm", children: [_jsxs(Div, { className: "flex items-center gap-2 rounded-md border border-border bg-background px-3 py-2 font-mono text-lg", children: [_jsx(Span, { className: "flex-1 select-all", children: revealed.code }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: handleCopy, className: "shrink-0", children: copied ? "Copied!" : "Copy" })] }), redemptionInstructions && (_jsx(Text, { className: "text-sm text-muted-foreground", children: redemptionInstructions }))] }))] }) }));
|
|
32
35
|
}
|
|
@@ -3,6 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Badge, Container, Div, Heading, Row, Section, Stack, Text, } from "../../../../ui";
|
|
4
4
|
import { formatCurrency } from "../../../../utils/number.formatter";
|
|
5
5
|
import { CodeRevealPanel } from "./CodeRevealPanel";
|
|
6
|
+
const __P = {
|
|
7
|
+
p4: "p-4",
|
|
8
|
+
};
|
|
9
|
+
const __O = {
|
|
10
|
+
hidden: "overflow-hidden",
|
|
11
|
+
};
|
|
6
12
|
export function DigitalCodeDetailView({ product, isLoading = false, orderId, fetchCode, }) {
|
|
7
13
|
if (isLoading || !product) {
|
|
8
14
|
return (_jsx(Container, { children: _jsx(Div, { className: "py-16 text-center", children: _jsx(Text, { className: "text-muted-foreground", children: isLoading ? "Loading…" : "Digital code listing not found." }) }) }));
|
|
@@ -10,5 +16,5 @@ export function DigitalCodeDetailView({ product, isLoading = false, orderId, fet
|
|
|
10
16
|
const meta = product.digitalCode;
|
|
11
17
|
const price = formatCurrency(product.price, product.currency ?? "INR");
|
|
12
18
|
const codesLeft = meta?.codesAvailable ?? 0;
|
|
13
|
-
return (_jsx(Container, { children: _jsx(Section, { className: "py-8", children: _jsxs(Stack, { gap: "lg", children: [product.images.length > 0 && (_jsx(Div, { className:
|
|
19
|
+
return (_jsx(Container, { children: _jsx(Section, { className: "py-8", children: _jsxs(Stack, { gap: "lg", children: [product.images.length > 0 && (_jsx(Div, { className: `${__O.hidden} rounded-lg bg-muted`, children: _jsx("img", { src: product.mainImage || product.images[0], alt: product.title, className: "h-80 w-full object-contain" }) })), _jsxs(Stack, { gap: "sm", children: [_jsxs(Row, { className: "flex-wrap gap-2", children: [_jsx(Badge, { variant: "secondary", children: "Digital Code" }), codesLeft > 0 ? (_jsxs(Badge, { variant: "active", children: [codesLeft, " available"] })) : (_jsx(Badge, { variant: "danger", children: "Sold out" }))] }), _jsx(Heading, { level: 1, className: "text-2xl font-bold", children: product.title }), _jsx(Text, { className: "text-2xl font-semibold text-primary", children: price }), _jsx(Text, { className: "text-muted-foreground", children: product.description })] }), orderId && fetchCode ? (_jsx(CodeRevealPanel, { orderId: orderId, redemptionInstructions: meta?.redemptionInstructions, fetchCode: fetchCode })) : (_jsxs(Div, { className: `rounded-lg border border-border bg-muted/40 ${__P.p4}`, children: [_jsx(Text, { className: "text-sm text-muted-foreground", children: "After purchase, return to your order to reveal the code instantly." }), meta?.redemptionInstructions && (_jsx(Text, { className: "mt-2 text-sm", children: meta.redemptionInstructions }))] }))] }) }) }));
|
|
14
20
|
}
|
|
@@ -29,6 +29,7 @@ import { UserSidebar } from "../../../../features/account/components/UserSidebar
|
|
|
29
29
|
import { DASHBOARD_DESKTOP_MEDIA_QUERY } from "../../../shared/features/layout/config";
|
|
30
30
|
import { filterNavItems } from "./filterNavItems";
|
|
31
31
|
import { useSiteSettings } from "../../../../core/hooks/useSiteSettings";
|
|
32
|
+
import { Div } from "../../../../ui";
|
|
32
33
|
/**
|
|
33
34
|
* Hoisted drawer-state hook — the matchMedia-aware open/close logic that was
|
|
34
35
|
* triplicated across admin/store/user layouts. Used internally by
|
|
@@ -93,9 +94,9 @@ export function DashboardLayoutClient({ variant, groups, permissions, activeHref
|
|
|
93
94
|
const adminGroups = variant === "admin"
|
|
94
95
|
? filteredGroups
|
|
95
96
|
: groups;
|
|
96
|
-
return (_jsxs(_Fragment, { children: [variant === "admin" && (_jsx(AdminSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activePath: activeHref, groups: adminGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "store" && (_jsx(StoreSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activeHref: activeHref, items: [], groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "user" && (_jsx(UserSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, items: filteredGroups.flatMap((g) => g.items), groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), _jsx(
|
|
97
|
+
return (_jsxs(_Fragment, { children: [variant === "admin" && (_jsx(AdminSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activePath: activeHref, groups: adminGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "store" && (_jsx(StoreSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, activeHref: activeHref, items: [], groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), variant === "user" && (_jsx(UserSidebar, { variant: "sidebar", desktopOpen: desktopOpen, mobileOpen: mobileOpen, items: filteredGroups.flatMap((g) => g.items), groups: filteredGroups, onCloseMobile: close, onToggle: toggle, className: className })), _jsx(Div, { className: [
|
|
97
98
|
"w-full flex-1 flex flex-col min-h-[calc(100dvh-var(--header-height,3.5rem))]",
|
|
98
99
|
contentPadding ?? DEFAULT_CONTENT_PADDING,
|
|
99
100
|
contentSurface,
|
|
100
|
-
].filter(Boolean).join(" "), children: _jsx(
|
|
101
|
+
].filter(Boolean).join(" "), children: _jsx(Div, { className: ["w-full flex-1 mx-auto", contentMaxWidth ?? DEFAULT_CONTENT_MAX_WIDTH].filter(Boolean).join(" "), children: children }) })] }));
|
|
101
102
|
}
|
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Badge, Container, Div, Heading, Row, Section, Stack, Text, } from "../../../../ui";
|
|
4
4
|
import { formatCurrency } from "../../../../utils/number.formatter";
|
|
5
|
+
const __P = {
|
|
6
|
+
p4: "p-4",
|
|
7
|
+
};
|
|
8
|
+
const __O = {
|
|
9
|
+
hidden: "overflow-hidden",
|
|
10
|
+
};
|
|
11
|
+
const CLS_WARN_BOX = "rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm";
|
|
12
|
+
const CLS_WARN_TITLE = "font-medium text-amber-900";
|
|
13
|
+
const CLS_WARN_BODY = "mt-1 text-amber-800";
|
|
5
14
|
export function LiveItemDetailView({ product, isLoading = false, renderActions, }) {
|
|
6
15
|
if (isLoading || !product) {
|
|
7
16
|
return (_jsx(Container, { children: _jsx(Div, { className: "py-16 text-center", children: _jsx(Text, { className: "text-muted-foreground", children: isLoading ? "Loading…" : "Live listing not found." }) }) }));
|
|
@@ -10,6 +19,6 @@ export function LiveItemDetailView({ product, isLoading = false, renderActions,
|
|
|
10
19
|
const price = formatCurrency(product.price, product.currency ?? "INR");
|
|
11
20
|
const jurisdictions = meta?.jurisdictionAllowed ?? [];
|
|
12
21
|
const transport = meta?.transport;
|
|
13
|
-
return (_jsx(Container, { children: _jsx(Section, { className: "py-8", children: _jsxs(Stack, { gap: "lg", children: [product.images.length > 0 && (_jsx(Div, { className:
|
|
14
|
-
` · Handling: ${formatCurrency(transport.handlingFeeInPaise, "INR")}`, transport.insuranceIncluded && " · Insurance included"] })] })), meta?.careInfo && (_jsxs(Div, { className:
|
|
22
|
+
return (_jsx(Container, { children: _jsx(Section, { className: "py-8", children: _jsxs(Stack, { gap: "lg", children: [product.images.length > 0 && (_jsx(Div, { className: `${__O.hidden} rounded-lg bg-muted`, children: _jsx("img", { src: product.mainImage || product.images[0], alt: product.title, className: "h-80 w-full object-contain" }) })), _jsxs(Stack, { gap: "sm", children: [_jsxs(Row, { className: "flex-wrap gap-2", children: [_jsx(Badge, { variant: "secondary", children: "Live Item" }), meta?.vendorVerified && (_jsx(Badge, { variant: "active", children: "Verified Seller" })), meta?.cites && (_jsxs(Badge, { variant: "warning", children: ["CITES: ", meta.cites] }))] }), _jsx(Heading, { level: 1, className: "text-2xl font-bold", children: product.title }), meta?.species && (_jsxs(Text, { className: "text-sm italic text-muted-foreground", children: [meta.species, meta.sex && meta.sex !== "n/a" && ` · ${meta.sex}`, meta.ageMonths !== undefined && ` · ${meta.ageMonths}mo`] })), _jsx(Text, { className: "text-2xl font-semibold text-primary", children: price }), _jsx(Text, { className: "text-muted-foreground", children: product.description })] }), jurisdictions.length > 0 && (_jsxs(Div, { className: CLS_WARN_BOX, children: [_jsx(Text, { className: CLS_WARN_TITLE, children: "Delivery restrictions" }), _jsxs(Text, { className: CLS_WARN_BODY, children: ["This item can only be shipped to: ", jurisdictions.join(", ")] })] })), transport && (_jsxs(Div, { className: `rounded-lg border border-border bg-muted/40 ${__P.p4} text-sm`, children: [_jsx(Text, { className: "font-medium", children: "Transport" }), _jsxs(Text, { className: "text-muted-foreground", children: ["Method: ", transport.method, transport.handlingFeeInPaise !== undefined &&
|
|
23
|
+
` · Handling: ${formatCurrency(transport.handlingFeeInPaise, "INR")}`, transport.insuranceIncluded && " · Insurance included"] })] })), meta?.careInfo && (_jsxs(Div, { className: `rounded-lg border border-border bg-muted/40 ${__P.p4} text-sm`, children: [_jsx(Text, { className: "font-medium", children: "Care information" }), _jsx(Text, { className: "mt-1 text-muted-foreground", children: meta.careInfo })] })), renderActions?.()] }) }) }));
|
|
15
24
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Div } from "../../../ui";
|
|
3
4
|
export function AppShell({ children, slotHeader, slotFooter, slotSidebar, renderHeader, renderFooter, renderSidebar, path, className, }) {
|
|
4
5
|
const ctx = { path };
|
|
5
6
|
const header = renderHeader ? renderHeader(ctx) : slotHeader;
|
|
6
7
|
const footer = renderFooter ? renderFooter(ctx) : slotFooter;
|
|
7
8
|
const sidebar = renderSidebar ? renderSidebar(ctx) : slotSidebar;
|
|
8
|
-
return (_jsxs(
|
|
9
|
+
return (_jsxs(Div, { className: `appkit-app-shell flex min-h-screen flex-col ${className ?? ""}`, children: [header ? (_jsx("header", { className: "sticky top-0 z-30 w-full", "data-appshell-slot": "header", children: header })) : null, _jsxs(Div, { className: "flex flex-1", children: [sidebar ? (_jsx("aside", { className: "hidden lg:block lg:w-64 lg:shrink-0", "data-appshell-slot": "sidebar", children: sidebar })) : null, _jsx("main", { className: "min-w-0 flex-1", "data-appshell-slot": "main", children: children })] }), footer ? (_jsx("footer", { className: "w-full", "data-appshell-slot": "footer", children: footer })) : null] }));
|
|
9
10
|
}
|
|
@@ -13,11 +13,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
* placement; the consumer owns the items.
|
|
14
14
|
*/
|
|
15
15
|
import * as React from "react";
|
|
16
|
+
import { Div } from "../../../ui";
|
|
16
17
|
export function DashboardScaffold({ children, slotPageHeader, renderNav, renderBottomNav, slotMenuToggle, initialDrawerOpen = false, className, }) {
|
|
17
18
|
const [drawerOpen, setDrawerOpen] = React.useState(initialDrawerOpen);
|
|
18
19
|
const toggleDrawer = React.useCallback(() => setDrawerOpen((v) => !v), []);
|
|
19
20
|
const ctx = { drawerOpen, toggleDrawer };
|
|
20
21
|
const nav = renderNav ? renderNav(ctx) : null;
|
|
21
22
|
const bottomNav = renderBottomNav ? renderBottomNav(ctx) : nav;
|
|
22
|
-
return (_jsxs(
|
|
23
|
+
return (_jsxs(Div, { className: `appkit-dashboard-scaffold flex min-h-screen ${className ?? ""}`, children: [nav ? (_jsx("aside", { className: "sticky top-0 hidden h-screen w-64 shrink-0 overflow-y-auto border-r border-[var(--appkit-color-border,#e5e7eb)] lg:block", "data-dashboard-slot": "sidebar", children: nav })) : null, nav ? (_jsxs("div", { className: `fixed inset-0 z-40 transition-transform md:block lg:hidden ${drawerOpen ? "translate-x-0" : "-translate-x-full"}`, "data-dashboard-slot": "drawer", "aria-hidden": !drawerOpen, children: [_jsx("div", { className: "absolute inset-0 bg-black/40", onClick: () => setDrawerOpen(false), role: "presentation" }), _jsx("nav", { className: "relative h-full w-64 overflow-y-auto bg-[var(--appkit-color-surface,#ffffff)] shadow-xl", children: nav })] })) : null, _jsxs(Div, { className: "flex min-w-0 flex-1 flex-col", children: [(slotPageHeader || slotMenuToggle) && (_jsxs("div", { className: "sticky top-0 z-20 flex items-center gap-3 border-b border-[var(--appkit-color-border,#e5e7eb)] bg-[var(--appkit-color-surface,#ffffff)] px-4 py-2", "data-dashboard-slot": "page-header", children: [slotMenuToggle ? (_jsx("span", { className: "lg:hidden", onClick: toggleDrawer, role: "presentation", children: slotMenuToggle })) : null, _jsx(Div, { className: "min-w-0 flex-1", children: slotPageHeader })] })), _jsx("main", { className: "min-w-0 flex-1 pb-20 lg:pb-0", "data-dashboard-slot": "main", children: children }), bottomNav ? (_jsx("nav", { className: "fixed bottom-0 left-0 right-0 z-30 border-t border-[var(--appkit-color-border,#e5e7eb)] bg-[var(--appkit-color-surface,#ffffff)] lg:hidden", "data-dashboard-slot": "bottom-nav", children: bottomNav })) : null] })] }));
|
|
23
24
|
}
|
|
@@ -172,6 +172,43 @@ function buildStockUpdatePayload(product, qtyDelta) {
|
|
|
172
172
|
...rule.stockDecrementExtras(product, qtyDelta),
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
+
async function flushCouponUsageAccumulator(accumulator, uid) {
|
|
176
|
+
if (accumulator.size === 0)
|
|
177
|
+
return;
|
|
178
|
+
Promise.all([...accumulator.values()].map(async ({ couponId, code, orderIds: ids, totalDiscount }) => {
|
|
179
|
+
await couponsRepository.applyCoupon(couponId, code, uid, ids, totalDiscount);
|
|
180
|
+
try {
|
|
181
|
+
const coupon = await couponsRepository.findById(couponId);
|
|
182
|
+
const perUserLimit = coupon?.usage?.perUserLimit ?? 1;
|
|
183
|
+
const newCount = await couponsRepository.getUserCouponUsageCount(uid, couponId);
|
|
184
|
+
if (newCount >= perUserLimit) {
|
|
185
|
+
await claimedCouponsRepository
|
|
186
|
+
.markUsed(uid, code, ids[0] ?? "")
|
|
187
|
+
.catch(() => { });
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
catch (err) {
|
|
191
|
+
serverLogger.warn("Failed to update claimed-coupon status", { err });
|
|
192
|
+
}
|
|
193
|
+
})).catch((err) => serverLogger.error("Failed to record coupon usage:", err));
|
|
194
|
+
}
|
|
195
|
+
function grantConsentOtpBypassCredit(db, uid, emailOtpUsed, unavailableCount) {
|
|
196
|
+
if (!emailOtpUsed || unavailableCount === 0)
|
|
197
|
+
return;
|
|
198
|
+
const metaRef = consentOtpRateLimitRef(db, uid);
|
|
199
|
+
metaRef
|
|
200
|
+
.get()
|
|
201
|
+
.then((snap) => {
|
|
202
|
+
const cur = snap.exists ? (snap.data()?.bypassCredits ?? 0) : 0;
|
|
203
|
+
return metaRef.set({ bypassCredits: Math.min(cur + 1, CONSENT_OTP_MAX_BYPASS_CREDITS) }, { merge: true });
|
|
204
|
+
})
|
|
205
|
+
.catch((err) => serverLogger.warn("Failed to grant consent OTP bypass credit", { err }));
|
|
206
|
+
}
|
|
207
|
+
function dispatchOrderConfirmationEmails(emailsToSend) {
|
|
208
|
+
if (emailsToSend.length === 0)
|
|
209
|
+
return;
|
|
210
|
+
Promise.all(emailsToSend.map((e) => sendOrderConfirmationEmail(e))).catch((err) => serverLogger.error("Order confirmation email error:", err));
|
|
211
|
+
}
|
|
175
212
|
/**
|
|
176
213
|
* Place order(s) from the user's cart in a single Firestore transaction.
|
|
177
214
|
*
|
|
@@ -554,45 +591,9 @@ export async function createCheckoutOrderAction(input) {
|
|
|
554
591
|
paid: adminBypass,
|
|
555
592
|
});
|
|
556
593
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
// Flip the user's claimed-coupon wallet row to "used" when the
|
|
561
|
-
// per-user redemption limit has been reached (default: single-use
|
|
562
|
-
// when `perUserLimit` is absent or 1). Multi-use coupons with
|
|
563
|
-
// remaining redemptions stay "active" in the wallet.
|
|
564
|
-
try {
|
|
565
|
-
const coupon = await couponsRepository.findById(couponId);
|
|
566
|
-
// Default to single-use (1) when the coupon has no explicit
|
|
567
|
-
// per-user cap configured. Coupons issued via the wallet are
|
|
568
|
-
// claim-once-use-once by design unless the seller opts into a
|
|
569
|
-
// higher cap.
|
|
570
|
-
const perUserLimit = coupon?.usage?.perUserLimit ?? 1;
|
|
571
|
-
const newCount = await couponsRepository.getUserCouponUsageCount(uid, couponId);
|
|
572
|
-
if (newCount >= perUserLimit) {
|
|
573
|
-
await claimedCouponsRepository
|
|
574
|
-
.markUsed(uid, code, ids[0] ?? "")
|
|
575
|
-
.catch(() => { });
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
catch (err) {
|
|
579
|
-
serverLogger.warn("Failed to update claimed-coupon status", { err });
|
|
580
|
-
}
|
|
581
|
-
})).catch((err) => serverLogger.error("Failed to record coupon usage:", err));
|
|
582
|
-
}
|
|
583
|
-
if (emailOtpUsed && unavailable.length > 0) {
|
|
584
|
-
const metaRef = consentOtpRateLimitRef(db, uid);
|
|
585
|
-
metaRef
|
|
586
|
-
.get()
|
|
587
|
-
.then((snap) => {
|
|
588
|
-
const cur = snap.exists ? (snap.data()?.bypassCredits ?? 0) : 0;
|
|
589
|
-
return metaRef.set({ bypassCredits: Math.min(cur + 1, CONSENT_OTP_MAX_BYPASS_CREDITS) }, { merge: true });
|
|
590
|
-
})
|
|
591
|
-
.catch((err) => serverLogger.warn("Failed to grant consent OTP bypass credit", { err }));
|
|
592
|
-
}
|
|
593
|
-
if (emailsToSend.length > 0) {
|
|
594
|
-
Promise.all(emailsToSend.map((e) => sendOrderConfirmationEmail(e))).catch((err) => serverLogger.error("Order confirmation email error:", err));
|
|
595
|
-
}
|
|
594
|
+
await flushCouponUsageAccumulator(couponUsageAccumulator, uid);
|
|
595
|
+
grantConsentOtpBypassCredit(db, uid, emailOtpUsed, unavailable.length);
|
|
596
|
+
dispatchOrderConfirmationEmails(emailsToSend);
|
|
596
597
|
serverLogger.info(`createCheckoutOrderAction: ${orderIds.length} order(s) placed for uid=${uid}` +
|
|
597
598
|
(unavailable.length > 0 ? ` (${unavailable.length} item(s) unavailable)` : ""));
|
|
598
599
|
return {
|
|
@@ -1498,6 +1498,12 @@ export const ACTIONS = {
|
|
|
1498
1498
|
description: "Cancel a single event entry.",
|
|
1499
1499
|
kind: "danger",
|
|
1500
1500
|
permissions: ["admin", "moderator"],
|
|
1501
|
+
confirmation: {
|
|
1502
|
+
title: "Cancel this entry?",
|
|
1503
|
+
body: "This will remove the participant from the event. They can re-register if the event is still open.",
|
|
1504
|
+
confirmLabel: "Cancel entry",
|
|
1505
|
+
confirmKind: "danger",
|
|
1506
|
+
},
|
|
1501
1507
|
},
|
|
1502
1508
|
// ── Review management (row-level) ─────────────────────────────────
|
|
1503
1509
|
"feature-review": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { AppkitConfig, AppkitSmokeRoute, AppkitThemeProbeRoute, AppkitAuthFixture, AppkitFirebaseConfig, AppkitFirebaseExtensions, AppkitVercelConfig, AppkitBrandConfig, AppkitSeoConfig, AppkitI18nConfig,
|
|
1
|
+
export type { AppkitConfig, AppkitSmokeRoute, AppkitThemeProbeRoute, AppkitAuthFixture, AppkitFirebaseConfig, AppkitFirebaseExtensions, AppkitVercelConfig, AppkitBrandConfig, AppkitSeoConfig, AppkitI18nConfig, FirestoreIndex, FirestoreIndexField, FirestoreFieldOverride, } from "./schema";
|
|
@@ -127,12 +127,6 @@ export interface AppkitI18nConfig {
|
|
|
127
127
|
*/
|
|
128
128
|
enableLocaleCookie?: boolean;
|
|
129
129
|
}
|
|
130
|
-
export interface AppkitImagePattern {
|
|
131
|
-
protocol?: "http" | "https";
|
|
132
|
-
hostname: string;
|
|
133
|
-
port?: string;
|
|
134
|
-
pathname?: string;
|
|
135
|
-
}
|
|
136
130
|
export interface AppkitVercelConfig {
|
|
137
131
|
/** Vercel project ID */
|
|
138
132
|
projectId: string;
|
|
@@ -154,8 +148,6 @@ export interface AppkitConfig {
|
|
|
154
148
|
seo?: AppkitSeoConfig;
|
|
155
149
|
/** i18n / next-intl routing options */
|
|
156
150
|
i18n?: AppkitI18nConfig;
|
|
157
|
-
/** next/image remotePatterns for external image hosts (demo / seed data) */
|
|
158
|
-
externalImagePatterns?: AppkitImagePattern[];
|
|
159
151
|
/** Route configuration for smoke tests and theme probing */
|
|
160
152
|
routes?: {
|
|
161
153
|
/** Routes to SSR-verify: must return 200 + expected strings in initial HTML */
|
package/dist/client-entry.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ export type { AppkitLabelSet } from "./_internal/client/i18n/LabelsProvider";
|
|
|
18
18
|
export { AppShell, DashboardScaffold } from "./_internal/client/scaffolds/index";
|
|
19
19
|
export type { AppShellProps, AppShellRenderContext, DashboardScaffoldProps, DashboardScaffoldRenderContext, } from "./_internal/client/scaffolds/index";
|
|
20
20
|
export { toClient, clientInitial } from "./_internal/shared/serialization/index";
|
|
21
|
-
export type { AppkitConfig, AppkitFirebaseConfig, AppkitFirebaseExtensions, AppkitVercelConfig, AppkitBrandConfig, AppkitSeoConfig, AppkitI18nConfig,
|
|
21
|
+
export type { AppkitConfig, AppkitFirebaseConfig, AppkitFirebaseExtensions, AppkitVercelConfig, AppkitBrandConfig, AppkitSeoConfig, AppkitI18nConfig, FirestoreIndex, FirestoreIndexField, FirestoreFieldOverride, } from "./_internal/shared/config/schema";
|
|
22
22
|
export { SEMANTIC_COLORS, SEMANTIC_COLORS_DARK, SEMANTIC_RADIUS, SEMANTIC_SHADOWS, SEMANTIC_Z_INDEX, MOTION_TOKENS, BREAKPOINTS, PLATFORM_LIMITS, } from "./_internal/shared/tokens/index";
|
|
23
23
|
export type { Responsive, Breakpoint, SemanticColor } from "./_internal/shared/tokens/index";
|
package/dist/client.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export type { UseEntityDeleteOptions, UseEntityDeleteReturn } from "./react/hook
|
|
|
64
64
|
export { ROUTES, PUBLIC_ROUTES, PROTECTED_ROUTES, AUTH_ROUTES } from "./constants/index";
|
|
65
65
|
export { Container, Grid, Row, Stack } from "./ui/components/Layout";
|
|
66
66
|
export { Div } from "./ui/components/Div";
|
|
67
|
-
export { Main, Section } from "./ui/components/Semantic";
|
|
67
|
+
export { Main, Section, Nav, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td } from "./ui/components/Semantic";
|
|
68
68
|
export { Badge } from "./ui/components/Badge";
|
|
69
69
|
export { Button } from "./ui/components/Button";
|
|
70
70
|
export { ClaimCouponButton } from "./ui/components/ClaimCouponButton";
|
package/dist/client.js
CHANGED
|
@@ -127,7 +127,7 @@ export { useEntityDelete } from "./react/hooks/useEntityDelete";
|
|
|
127
127
|
export { ROUTES, PUBLIC_ROUTES, PROTECTED_ROUTES, AUTH_ROUTES } from "./constants/index";
|
|
128
128
|
export { Container, Grid, Row, Stack } from "./ui/components/Layout";
|
|
129
129
|
export { Div } from "./ui/components/Div";
|
|
130
|
-
export { Main, Section } from "./ui/components/Semantic";
|
|
130
|
+
export { Main, Section, Nav, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td } from "./ui/components/Semantic";
|
|
131
131
|
export { Badge } from "./ui/components/Badge";
|
|
132
132
|
export { Button } from "./ui/components/Button";
|
|
133
133
|
export { ClaimCouponButton } from "./ui/components/ClaimCouponButton";
|
package/dist/configs/next.js
CHANGED
|
@@ -11,8 +11,8 @@ import path from "path";
|
|
|
11
11
|
* current and future @google-cloud/* subpackage (incl. build/protos/**) is
|
|
12
12
|
* included in Vercel Lambda bundles without needing per-package entries.
|
|
13
13
|
* - Consumer additions to the same route key are MERGED (union), not replaced.
|
|
14
|
-
* - `images.
|
|
15
|
-
*
|
|
14
|
+
* - `images.unoptimized: true` by default so any external host loads without
|
|
15
|
+
* remotePatterns maintenance (consumer can override).
|
|
16
16
|
* - `experimental.serverActions.bodySizeLimit` set to "4mb"
|
|
17
17
|
* - Optional `IgnorePlugin` for optional native deps (request, fast-crc32c)
|
|
18
18
|
*
|
|
@@ -268,23 +268,16 @@ export function defineNextConfig(override = {}) {
|
|
|
268
268
|
}
|
|
269
269
|
return consumerWebpack ? consumerWebpack(config, ctx) : config;
|
|
270
270
|
}
|
|
271
|
-
// Default
|
|
272
|
-
//
|
|
273
|
-
//
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
{ protocol: "https", hostname: "*.firebasestorage.googleapis.com" },
|
|
277
|
-
{ protocol: "https", hostname: "storage.googleapis.com" },
|
|
278
|
-
{ protocol: "http", hostname: "localhost" },
|
|
279
|
-
{ protocol: "http", hostname: "127.0.0.1" },
|
|
280
|
-
];
|
|
271
|
+
// Default to `unoptimized: true` so any external image host loads without
|
|
272
|
+
// remotePatterns maintenance. Pre-launch demo data pulls from various
|
|
273
|
+
// hosts (ygoprodeck, unsplash, picsum); prod images move to Firebase
|
|
274
|
+
// Storage via /api/media. Consumer can still pass an explicit
|
|
275
|
+
// `images.unoptimized: false` + remotePatterns to opt back in.
|
|
281
276
|
const consumerImages = override.images ?? {};
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
...
|
|
285
|
-
|
|
286
|
-
p.hostname)),
|
|
287
|
-
];
|
|
277
|
+
const mergedImages = {
|
|
278
|
+
unoptimized: true,
|
|
279
|
+
...consumerImages,
|
|
280
|
+
};
|
|
288
281
|
// Turbopack (used by `next build`) has its own alias system separate from
|
|
289
282
|
// webpack. Mirror the firebase deduplication alias so prod builds share the
|
|
290
283
|
// same Firebase app registry as dev builds.
|
|
@@ -299,10 +292,7 @@ export function defineNextConfig(override = {}) {
|
|
|
299
292
|
},
|
|
300
293
|
};
|
|
301
294
|
return {
|
|
302
|
-
images:
|
|
303
|
-
...consumerImages,
|
|
304
|
-
remotePatterns: mergedRemotePatterns,
|
|
305
|
-
},
|
|
295
|
+
images: mergedImages,
|
|
306
296
|
...rest,
|
|
307
297
|
serverExternalPackages: mergedExternal,
|
|
308
298
|
experimental: mergedExperimental,
|
|
@@ -137,6 +137,8 @@ export declare const ADMIN_ENDPOINTS: {
|
|
|
137
137
|
readonly SCAMMER_BY_ID: (id: string) => string;
|
|
138
138
|
readonly ADDRESSES: "/api/admin/addresses";
|
|
139
139
|
readonly ADDRESS_BY_ID: (id: string) => string;
|
|
140
|
+
readonly GROUPED_LISTINGS: "/api/admin/grouped-listings";
|
|
141
|
+
readonly GROUPED_LISTING_BY_ID: (id: string) => string;
|
|
140
142
|
};
|
|
141
143
|
export declare const CHAT_ENDPOINTS: {
|
|
142
144
|
readonly LIST: "/api/chat";
|
|
@@ -457,6 +459,8 @@ export declare const API_ENDPOINTS: {
|
|
|
457
459
|
readonly SCAMMER_BY_ID: (id: string) => string;
|
|
458
460
|
readonly ADDRESSES: "/api/admin/addresses";
|
|
459
461
|
readonly ADDRESS_BY_ID: (id: string) => string;
|
|
462
|
+
readonly GROUPED_LISTINGS: "/api/admin/grouped-listings";
|
|
463
|
+
readonly GROUPED_LISTING_BY_ID: (id: string) => string;
|
|
460
464
|
};
|
|
461
465
|
readonly CHAT: {
|
|
462
466
|
readonly LIST: "/api/chat";
|
|
@@ -779,6 +783,8 @@ export declare const API_ROUTES: {
|
|
|
779
783
|
readonly SCAMMER_BY_ID: (id: string) => string;
|
|
780
784
|
readonly ADDRESSES: "/api/admin/addresses";
|
|
781
785
|
readonly ADDRESS_BY_ID: (id: string) => string;
|
|
786
|
+
readonly GROUPED_LISTINGS: "/api/admin/grouped-listings";
|
|
787
|
+
readonly GROUPED_LISTING_BY_ID: (id: string) => string;
|
|
782
788
|
};
|
|
783
789
|
readonly CHAT: {
|
|
784
790
|
readonly LIST: "/api/chat";
|
|
@@ -156,6 +156,8 @@ export const ADMIN_ENDPOINTS = {
|
|
|
156
156
|
SCAMMER_BY_ID: (id) => `/api/admin/scammers/${id}`,
|
|
157
157
|
ADDRESSES: "/api/admin/addresses",
|
|
158
158
|
ADDRESS_BY_ID: (id) => `/api/admin/addresses/${id}`,
|
|
159
|
+
GROUPED_LISTINGS: "/api/admin/grouped-listings",
|
|
160
|
+
GROUPED_LISTING_BY_ID: (id) => `/api/admin/grouped-listings/${id}`,
|
|
159
161
|
};
|
|
160
162
|
// ---------------------------------------------------------------------------
|
|
161
163
|
// Chat
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useSiteSettings<T = unknown>(endpoint?: "/api/site-settings", staleTime?: number): import("@tanstack/react-query").UseQueryResult<
|
|
1
|
+
export declare function useSiteSettings<T = unknown>(endpoint?: "/api/site-settings", staleTime?: number): import("@tanstack/react-query").UseQueryResult<NoInfer<T>, Error>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Heading, Section, Span, Text } from "../../../ui";
|
|
2
|
+
import { Div, Heading, Row, Section, Span, Text } from "../../../ui";
|
|
3
|
+
const __P = {
|
|
4
|
+
p8: "p-8",
|
|
5
|
+
};
|
|
3
6
|
export function AboutView({ labels = {}, howItems = [], valueItems = [], milestones = [], heroBannerClass = "bg-gradient-to-br from-violet-600 to-indigo-600", ctaBannerClass = "bg-gradient-to-br from-violet-600 to-indigo-600", renderCtaButtons, }) {
|
|
4
|
-
return (_jsxs(
|
|
7
|
+
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { className: `${heroBannerClass} text-white py-16 md:py-20 lg:py-24`, children: _jsxs(Div, { className: "max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center", children: [_jsx(Heading, { level: 1, variant: "none", className: "text-4xl md:text-5xl font-bold mb-6 text-white", children: labels.title }), _jsx(Text, { variant: "none", className: "text-xl text-white/80 max-w-2xl mx-auto", children: labels.subtitle })] }) }), _jsxs(Div, { className: "max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-16 md:py-20 space-y-16 md:space-y-20", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "text-center mb-12", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3 gap-6 md:gap-8", children: howItems.map(({ title, text, icon, color }) => (_jsxs("div", { className: `bg-gradient-to-br ${color ?? "from-primary/5 to-primary/5"} rounded-2xl p-6 space-y-3`, children: [_jsx(Div, { className: "text-4xl", children: icon }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "text-center mb-12", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3 gap-5 md:gap-6", children: valueItems.map(({ title, text, icon }) => (_jsxs("div", { className: "bg-white dark:bg-slate-800 rounded-xl p-6 space-y-3 border border-neutral-200 dark:border-slate-700", children: [_jsx(Div, { className: "text-3xl", children: icon }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "text-center mb-10", children: labels.milestonesTitle }), _jsx(Div, { className: "relative border-l-2 border-primary/30 pl-8 space-y-8 max-w-2xl mx-auto", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 rounded-full bg-primary border-2 border-white dark:border-slate-900" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary uppercase tracking-wide", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), _jsxs(Section, { className: `text-center ${ctaBannerClass} rounded-2xl ${__P.p8} md:p-12 text-white`, children: [_jsx(Heading, { level: 2, variant: "none", className: "text-3xl font-bold mb-8 text-white", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { size: "sm", className: "text-white/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
|
|
5
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ROUTES } from "../../../constants";
|
|
3
3
|
import { THEME_CONSTANTS } from "../../../tokens";
|
|
4
|
-
import { Heading, Text, Section, Stack, RichTextRenderer } from "../../../ui";
|
|
4
|
+
import { Div, Heading, Text, Section, Stack, RichTextRenderer } from "../../../ui";
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { HelpCircle, ChevronRight } from "lucide-react";
|
|
7
7
|
const DEFAULT_HERO_CLASS = "bg-gradient-to-br from-violet-700 to-indigo-700 dark:from-violet-800 dark:to-indigo-800";
|
|
@@ -19,9 +19,9 @@ export async function FAQPageView({ category, heroBannerClass = DEFAULT_HERO_CLA
|
|
|
19
19
|
? allItems.filter((item) => item.category === category)
|
|
20
20
|
: allItems;
|
|
21
21
|
const activeCategory = categories.find((c) => c.slug === category);
|
|
22
|
-
return (_jsxs(
|
|
22
|
+
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { className: `${heroBannerClass} text-white py-14 md:py-16 lg:py-20`, children: _jsxs(Div, { className: `${page.container.md} text-center`, children: [_jsx(Heading, { level: 1, variant: "none", className: "mb-3 text-white", children: activeCategory ? activeCategory.label : t("title") }), _jsx(Text, { variant: "none", className: "text-white/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsx(Div, { className: `${page.container.md} py-10 md:py-12 lg:py-16`, children: _jsxs(Div, { className: "flex flex-col md:flex-row gap-8", children: [categories.length > 0 && (_jsxs("aside", { className: "md:w-56 flex-shrink-0", children: [_jsx(Heading, { level: 3, className: "text-sm font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400 mb-3", children: t("categoriesLabel") }), _jsxs("nav", { className: "space-y-1", children: [_jsxs(TextLink, { href: String(ROUTES.PUBLIC.FAQS), className: `flex items-center justify-between px-3 py-2 rounded-lg text-sm transition-colors ${!category
|
|
23
23
|
? "bg-primary/10 text-primary font-semibold"
|
|
24
24
|
: "hover:bg-neutral-100 dark:hover:bg-neutral-800"}`, children: [_jsxs("span", { className: `${flex.row} gap-2`, children: [_jsx(HelpCircle, { className: "w-4 h-4" }), t("allCategories")] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }), categories.map((cat) => (_jsxs(TextLink, { href: String(ROUTES.PUBLIC.FAQ_CATEGORY(cat.slug)), className: `flex items-center justify-between px-3 py-2 rounded-lg text-sm transition-colors ${category === cat.slug
|
|
25
25
|
? "bg-primary/10 text-primary font-semibold"
|
|
26
|
-
: "hover:bg-neutral-100 dark:hover:bg-neutral-800"}`, children: [_jsxs("span", { className: `${flex.row} gap-2`, children: [_jsx("span", { children: cat.icon }), cat.label] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }, cat.slug)))] })] })), _jsxs(
|
|
26
|
+
: "hover:bg-neutral-100 dark:hover:bg-neutral-800"}`, children: [_jsxs("span", { className: `${flex.row} gap-2`, children: [_jsx("span", { children: cat.icon }), cat.label] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }, cat.slug)))] })] })), _jsxs(Div, { className: "flex-1 min-w-0", children: [visibleItems.length === 0 ? (_jsxs(Section, { className: `text-center py-16 rounded-2xl border ${themed.border} ${themed.bgSecondary}`, children: [_jsx(HelpCircle, { className: "w-10 h-10 mx-auto mb-3 text-zinc-300 dark:text-zinc-600" }), _jsx(Heading, { level: 3, className: "mb-2 text-base", children: t("emptyTitle") }), _jsx(Text, { variant: "secondary", className: "text-sm", children: t("emptyText") })] })) : (_jsx(Stack, { gap: "sm", className: "space-y-3", children: visibleItems.map((item, i) => (_jsxs("details", { className: `group rounded-xl border ${themed.border} ${themed.bgPrimary} overflow-hidden`, children: [_jsxs("summary", { className: `flex items-center justify-between px-5 py-4 cursor-pointer list-none select-none font-medium text-sm hover:bg-neutral-50 dark:hover:bg-neutral-800/50 transition-colors`, children: [_jsx("span", { children: item.question }), _jsx(ChevronRight, { className: "w-4 h-4 flex-shrink-0 ml-3 transition-transform group-open:rotate-90" })] }), _jsx(Div, { className: "px-5 pb-5 pt-1", children: _jsx(RichTextRenderer, { html: item.answer, proseClass: "prose prose-sm max-w-none dark:prose-invert" }) })] }, i))) })), _jsxs(Section, { className: `mt-10 rounded-2xl p-6 text-center border ${themed.border} ${themed.bgSecondary}`, children: [_jsx(Heading, { level: 3, className: "mb-2 text-base", children: t("stillNeedHelpTitle") }), _jsx(Text, { variant: "secondary", className: "text-sm mb-4", children: t("stillNeedHelpText") }), _jsxs(Div, { className: `${flex.center} gap-4 flex-wrap`, children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), children: t("helpCenter") }), _jsx(TextLink, { href: String(ROUTES.PUBLIC.CONTACT), variant: "muted", children: t("contactUs") })] })] })] })] }) })] }));
|
|
27
27
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ROUTES } from "../../../constants";
|
|
3
3
|
import { THEME_CONSTANTS } from "../../../tokens";
|
|
4
|
-
import { Heading, Text, Section, Caption } from "../../../ui";
|
|
4
|
+
import { Div, Heading, Text, Section, Caption, Table, Thead, Tbody, Tr, Th, Td } from "../../../ui";
|
|
5
|
+
const __P = {
|
|
6
|
+
p5: "p-5",
|
|
7
|
+
};
|
|
8
|
+
const __O = {
|
|
9
|
+
xAuto: "overflow-x-auto",
|
|
10
|
+
};
|
|
5
11
|
const DEFAULT_HERO_CLASS = "bg-gradient-to-br from-violet-700 to-indigo-700 dark:from-violet-800 dark:to-indigo-800";
|
|
12
|
+
const CLS_RATE_CELL = "py-3 px-4 font-semibold text-violet-700 dark:text-violet-400";
|
|
13
|
+
const CLS_HIGHLIGHT = "font-bold text-green-700 dark:text-green-400";
|
|
6
14
|
export async function FeesView({ heroBannerClass = DEFAULT_HERO_CLASS, } = {}) {
|
|
7
15
|
const { themed, page } = THEME_CONSTANTS;
|
|
8
16
|
const { getTranslations } = await import("next-intl/server");
|
|
@@ -53,14 +61,14 @@ export async function FeesView({ heroBannerClass = DEFAULT_HERO_CLASS, } = {}) {
|
|
|
53
61
|
{ label: t("netPayoutLabel"), example: "= ₹917.40", highlight: true },
|
|
54
62
|
];
|
|
55
63
|
void ROUTES; // ROUTES imported for future CTA links if needed
|
|
56
|
-
return (_jsxs(
|
|
64
|
+
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { className: `${heroBannerClass} text-white py-14 md:py-16 lg:py-20`, children: _jsxs(Div, { className: `${page.container.sm} text-center`, children: [_jsx(Heading, { level: 1, variant: "none", className: "mb-4 text-white", children: t("title") }), _jsx(Text, { variant: "none", className: "text-white/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsxs(Div, { className: `${page.container.sm} py-10 md:py-12 lg:py-16 space-y-12`, children: [renderFeeTableSection(t, themed, FEE_ROWS), renderPayoutExampleSection(t, themed, OFFER_PAYOUT_ROWS), renderDisclaimerSection(t, themed)] })] }));
|
|
57
65
|
}
|
|
58
66
|
function renderFeeTableSection(t, themed, rows) {
|
|
59
|
-
return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", children: t("tableTitle") }), _jsx(
|
|
67
|
+
return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", children: t("tableTitle") }), _jsx(Div, { className: `${__O.xAuto} rounded-xl border ${themed.border}`, children: _jsxs(Table, { className: "w-full text-sm", children: [_jsx(Thead, { className: themed.bgSecondary, children: _jsxs(Tr, { children: [_jsx(Th, { className: "py-3 px-4 text-left font-semibold", children: t("colFeeType") }), _jsx(Th, { className: "py-3 px-4 text-left font-semibold", children: t("colRate") }), _jsx(Th, { className: "py-3 px-4 text-left font-semibold", children: t("colPaidBy") }), _jsx(Th, { className: "py-3 px-4 text-left font-semibold hidden md:table-cell", children: t("colNote") })] }) }), _jsx(Tbody, { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: rows.map((row) => (_jsxs(Tr, { className: `${themed.bgPrimary} hover:bg-neutral-50 dark:hover:bg-neutral-800/50`, children: [_jsx(Td, { className: "py-3 px-4 font-medium", children: row.category }), _jsx(Td, { className: CLS_RATE_CELL, children: row.rate }), _jsx(Td, { className: "py-3 px-4", children: _jsx(Caption, { children: row.who }) }), _jsx(Td, { className: "py-3 px-4 text-neutral-500 dark:text-neutral-400 hidden md:table-cell text-xs", children: row.note })] }, row.category))) })] }) }), _jsx(Caption, { className: "mt-3 block text-zinc-500 dark:text-zinc-400", children: t("tableNote") })] }));
|
|
60
68
|
}
|
|
61
69
|
function renderPayoutExampleSection(t, themed, rows) {
|
|
62
|
-
return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: t("payoutExampleTitle") }), _jsx(Text, { variant: "secondary", className: "mb-6", children: t("payoutExampleSubtitle") }), _jsxs(
|
|
70
|
+
return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: t("payoutExampleTitle") }), _jsx(Text, { variant: "secondary", className: "mb-6", children: t("payoutExampleSubtitle") }), _jsxs(Div, { className: `rounded-xl border ${themed.border} ${themed.bgPrimary} ${__P.p5} max-w-sm`, children: [_jsx(Heading, { level: 3, className: "text-base mb-4", children: t("payoutExampleProduct") }), _jsx(Div, { className: "space-y-2", children: rows.map((row, i) => (_jsxs(Div, { className: `flex justify-between text-sm ${row.highlight ? "border-t border-neutral-200 dark:border-neutral-700 pt-2 mt-2 font-bold" : ""}`, children: [_jsx(Text, { className: row.highlight ? "font-bold" : "text-neutral-600 dark:text-neutral-400", children: row.label }), _jsx(Text, { className: row.highlight ? CLS_HIGHLIGHT : "", children: row.example })] }, i))) })] })] }));
|
|
63
71
|
}
|
|
64
72
|
function renderDisclaimerSection(t, themed) {
|
|
65
|
-
return (_jsxs(Section, { className: `rounded-xl border ${themed.border}
|
|
73
|
+
return (_jsxs(Section, { className: `rounded-xl border ${themed.border} ${__P.p5} ${themed.bgSecondary}`, children: [_jsx(Heading, { level: 3, className: "text-base mb-2", children: t("disclaimerTitle") }), _jsx(Caption, { className: "leading-relaxed", children: t("disclaimerText") })] }));
|
|
66
74
|
}
|