storefront-layouts 1.0.3 → 1.0.4
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/components/auth/LoginForm.js +2 -2
- package/dist/components/auth/LoginSheet.js +2 -2
- package/dist/components/auth/login-form-core.js +3 -3
- package/dist/components/auth/login-sheet-header.js +3 -3
- package/dist/components/auth/login-sheet-registry.js +2 -2
- package/dist/components/auth/login-sheet-themes/booking-agenda.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/booking.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/clothing-minimal.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/clothing.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/electronics-grid.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/electronics.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/food-modern.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/food.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/index.js +9 -9
- package/dist/components/auth/login-sheet-themes/motivational-speaker.theme.js +1 -1
- package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts +2 -2
- package/dist/components/auth/login-sheet-themes/theme-input-baselines.d.ts.map +1 -1
- package/dist/components/auth/login-sheet-themes/theme-input-baselines.js +2 -2
- package/dist/components/auth/login-sheets/StoreLoginSheetShell.d.ts.map +1 -1
- package/dist/components/auth/login-sheets/StoreLoginSheetShell.js +6 -6
- package/dist/components/auth/use-login-submit.js +3 -3
- package/dist/components/cart/InventoryHoldCountdown.js +2 -2
- package/dist/components/categories/category-masonry-grid.js +3 -3
- package/dist/components/checkout/CheckoutFeeLines.js +1 -1
- package/dist/components/checkout/ShippingOptionsPanel.js +3 -3
- package/dist/components/learning/CertificateTemplates.js +2 -2
- package/dist/components/learning/CertificateViewer.js +3 -3
- package/dist/components/learning/MentorshipProgress.d.ts.map +1 -1
- package/dist/components/learning/MentorshipProgress.js +4 -4
- package/dist/components/product/ProductVariationSelectors.js +1 -1
- package/dist/components/rich-text/CategoryDescription.js +2 -2
- package/dist/components/rich-text/ProductDescription.js +2 -2
- package/dist/components/rich-text/RichTextExcerpt.js +1 -1
- package/dist/components/rich-text/SafeRichHtml.d.ts +8 -11
- package/dist/components/rich-text/SafeRichHtml.d.ts.map +1 -1
- package/dist/components/rich-text/SafeRichHtml.js +3 -5
- package/dist/components/shipping/ProductDeliveryInfoSection.d.ts.map +1 -1
- package/dist/components/shipping/ProductDeliveryInfoSection.js +7 -4
- package/dist/components/shipping/ShippingQuoteAddressForm.js +3 -3
- package/dist/components/ui/alert-modal.js +2 -2
- package/dist/components/ui/avatar-image.js +1 -1
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/breadcrumbs.js +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/category-tree.js +2 -2
- package/dist/components/ui/checkout-button.d.ts.map +1 -1
- package/dist/components/ui/checkout-button.js +11 -283
- package/dist/components/ui/guest-checkout-modal.js +3 -3
- package/dist/components/ui/image-skeleton.js +2 -2
- package/dist/components/ui/image-with-fallback.d.ts +3 -1
- package/dist/components/ui/image-with-fallback.d.ts.map +1 -1
- package/dist/components/ui/image-with-fallback.js +55 -139
- package/dist/components/ui/input.js +1 -1
- package/dist/components/ui/limited-time-offer-badge.js +2 -2
- package/dist/components/ui/loading-skeleton-wrapper.js +1 -1
- package/dist/components/ui/modal.js +2 -2
- package/dist/components/ui/otp-input.js +1 -1
- package/dist/components/ui/out-of-stock-overlay.js +1 -1
- package/dist/components/ui/page-animate-wrapper.js +2 -2
- package/dist/components/ui/page-content-loader.js +2 -2
- package/dist/components/ui/page-loader.js +1 -1
- package/dist/components/ui/product-card.d.ts.map +1 -1
- package/dist/components/ui/product-card.js +17 -17
- package/dist/components/ui/product-rating.js +1 -1
- package/dist/components/ui/product-stock-badge.js +2 -2
- package/dist/components/ui/review-form.js +2 -2
- package/dist/components/ui/route-skeleton-loader.js +6 -6
- package/dist/components/ui/sheet.d.ts +2 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +4 -4
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/skeletons/index.js +5 -5
- package/dist/components/ui/skeletons/product-grid-skeleton.js +1 -1
- package/dist/components/ui/store-logos.d.ts.map +1 -1
- package/dist/components/ui/store-logos.js +4 -4
- package/dist/components/ui/toast.js +1 -1
- package/dist/components/ui/video-player.js +2 -2
- package/dist/editor/alignment-schemas/booking.js +1 -1
- package/dist/editor/alignment-schemas/clothing-minimal.js +1 -1
- package/dist/editor/alignment-schemas/index.js +20 -20
- package/dist/editor/alignment-schemas/lazy-loader.js +1 -1
- package/dist/editor/alignment-schemas/metadata.js +1 -1
- package/dist/editor/alignment-schemas/resolve-canvas-inspector-leaf.js +3 -3
- package/dist/editor/blocks/index.js +3 -3
- package/dist/editor/blocks/migrate-clothing-minimal.js +3 -3
- package/dist/editor/blocks/nav-outline-utils.js +2 -2
- package/dist/editor/blocks/registry.js +1 -1
- package/dist/editor/document/adapter.js +4 -4
- package/dist/editor/document/block-tree.js +1 -1
- package/dist/editor/document/index.js +6 -6
- package/dist/editor/document/validate.js +1 -1
- package/dist/editor/index.js +12 -12
- package/dist/editor/layout-content-loader.js +3 -3
- package/dist/editor/payaza-form/ArrayItemManager.js +2 -2
- package/dist/editor/payaza-form/EditorCanvasPreview.js +5 -5
- package/dist/editor/payaza-form/FieldRenderer.js +17 -17
- package/dist/editor/payaza-form/IframePreviewMessageBridge.js +3 -3
- package/dist/editor/payaza-form/PayazaFormEditor.js +31 -31
- package/dist/editor/payaza-form/PayazaFormEditorFullPage.js +2 -2
- package/dist/editor/payaza-form/SliderArrayEditor.js +3 -3
- package/dist/editor/payaza-form/components/ArrayField.js +1 -1
- package/dist/editor/payaza-form/components/BlockStylesInspector.js +1 -1
- package/dist/editor/payaza-form/components/BlocksField.js +9 -9
- package/dist/editor/payaza-form/components/ButtonField.js +3 -3
- package/dist/editor/payaza-form/components/CanvasGranularInspector.js +11 -11
- package/dist/editor/payaza-form/components/IconField.js +2 -2
- package/dist/editor/payaza-form/components/ImageField.js +1 -1
- package/dist/editor/payaza-form/components/NumberField.js +1 -1
- package/dist/editor/payaza-form/components/RichTextField.js +2 -2
- package/dist/editor/payaza-form/components/SectionField.js +1 -1
- package/dist/editor/payaza-form/components/SectionSchemaInspector.js +3 -3
- package/dist/editor/payaza-form/components/StarRatingField.js +2 -2
- package/dist/editor/payaza-form/components/TextField.js +1 -1
- package/dist/editor/payaza-form/data-merger.js +6 -6
- package/dist/editor/payaza-form/data-transformer.js +3 -3
- package/dist/editor/payaza-form/engine.js +1 -1
- package/dist/editor/payaza-form/examples/custom-widgets.example.js +1 -1
- package/dist/editor/payaza-form/index.js +8 -8
- package/dist/editor/payaza-form/layout-loader.js +2 -2
- package/dist/editor/payaza-form/preview-message-handler.js +3 -3
- package/dist/editor/payaza-form/schema-bridge.js +3 -3
- package/dist/editor/payaza-form/widget-registry.js +1 -1
- package/dist/editor/shared/BlockOutlineTree.js +2 -2
- package/dist/editor/shared/EditorHeader.js +2 -2
- package/dist/editor/shared/EditorNavigator.js +2 -2
- package/dist/editor/shared/IframePreview.js +6 -6
- package/dist/editor/shared/InlineCanvasPreview.js +8 -8
- package/dist/editor/shared/LayoutRenderer.js +1 -1
- package/dist/editor/shared/ResizableSidebar.js +1 -1
- package/dist/editor/shared/index.js +7 -7
- package/dist/hooks/use-analytics.js +3 -3
- package/dist/hooks/use-api.js +1 -1
- package/dist/hooks/use-cart-api.d.ts.map +1 -1
- package/dist/hooks/use-cart-api.js +8 -3
- package/dist/hooks/use-catalog-loader.js +3 -3
- package/dist/hooks/use-catalog-price-range.d.ts +2 -5
- package/dist/hooks/use-catalog-price-range.d.ts.map +1 -1
- package/dist/hooks/use-catalog-price-range.js +20 -5
- package/dist/hooks/use-category-products.d.ts +8 -0
- package/dist/hooks/use-category-products.d.ts.map +1 -0
- package/dist/hooks/use-category-products.js +43 -0
- package/dist/hooks/use-checkout-fees.d.ts +3 -4
- package/dist/hooks/use-checkout-fees.d.ts.map +1 -1
- package/dist/hooks/use-checkout-fees.js +1 -1
- package/dist/hooks/use-content-ready.js +1 -1
- package/dist/hooks/use-featured-products.d.ts +3 -0
- package/dist/hooks/use-featured-products.d.ts.map +1 -0
- package/dist/hooks/use-featured-products.js +25 -0
- package/dist/hooks/use-multi-store-checkout-fees.d.ts +3 -4
- package/dist/hooks/use-multi-store-checkout-fees.d.ts.map +1 -1
- package/dist/hooks/use-multi-store-checkout-fees.js +1 -1
- package/dist/hooks/use-navigation-loading.js +1 -1
- package/dist/hooks/use-payaza-checkout.d.ts +1 -1
- package/dist/hooks/use-payaza-checkout.d.ts.map +1 -1
- package/dist/hooks/use-payaza-checkout.js +9 -3
- package/dist/hooks/use-product-brands.d.ts +5 -0
- package/dist/hooks/use-product-brands.d.ts.map +1 -0
- package/dist/hooks/use-product-brands.js +25 -0
- package/dist/hooks/use-product-by-slug.d.ts +7 -0
- package/dist/hooks/use-product-by-slug.d.ts.map +1 -0
- package/dist/hooks/use-product-by-slug.js +38 -0
- package/dist/hooks/use-product-reviews.d.ts +15 -0
- package/dist/hooks/use-product-reviews.d.ts.map +1 -0
- package/dist/hooks/use-product-reviews.js +75 -0
- package/dist/hooks/use-product-variation-selection.d.ts +2 -8
- package/dist/hooks/use-product-variation-selection.d.ts.map +1 -1
- package/dist/hooks/use-product-variation-selection.js +1 -1
- package/dist/hooks/use-products-api.js +3 -3
- package/dist/hooks/use-shipping-quote.js +2 -2
- package/dist/hooks/use-store-api.js +4 -4
- package/dist/hooks/usePreviewSlideSync.js +1 -1
- package/dist/index.d.ts +62 -74
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -153
- package/dist/layouts/booking/components/BookingHomePage.d.ts.map +1 -1
- package/dist/layouts/booking/components/BookingHomePage.js +68 -74
- package/dist/layouts/booking/components/BookingMultilineHeading.js +1 -1
- package/dist/layouts/booking/components/BookingTestimonialCard.js +2 -2
- package/dist/layouts/booking/components/BookingTestimonialsEmptyState.js +1 -1
- package/dist/layouts/booking/components/booking-footer-defaults.js +2 -2
- package/dist/layouts/booking/index.js +8 -8
- package/dist/layouts/booking/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/booking/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/AboutPage.js +39 -60
- package/dist/layouts/booking/pages/BookPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/BookPage.js +16 -22
- package/dist/layouts/booking/pages/CategoriesPage.js +6 -6
- package/dist/layouts/booking/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/booking/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/CategoryPage.js +17 -26
- package/dist/layouts/booking/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/booking/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ContactPage.js +5 -12
- package/dist/layouts/booking/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/booking/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ProductDetailPage.js +203 -150
- package/dist/layouts/booking/pages/ServicesPage.d.ts +1 -1
- package/dist/layouts/booking/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/booking/pages/ServicesPage.js +11 -31
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/components/BookingHomePageAgenda.js +21 -30
- package/dist/layouts/booking-agenda/index.js +8 -8
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/AboutPage.js +11 -14
- package/dist/layouts/booking-agenda/pages/BookPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/BookPage.js +15 -21
- package/dist/layouts/booking-agenda/pages/CategoriesPage.js +5 -5
- package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/CategoryPage.js +12 -18
- package/dist/layouts/booking-agenda/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ContactPage.js +8 -13
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ProductDetailPage.js +202 -149
- package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts +1 -1
- package/dist/layouts/booking-agenda/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/booking-agenda/pages/ServicesPage.js +8 -23
- package/dist/layouts/clothing/components/ClothingHomePage.d.ts.map +1 -1
- package/dist/layouts/clothing/components/ClothingHomePage.js +199 -136
- package/dist/layouts/clothing/index.js +7 -7
- package/dist/layouts/clothing/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/AboutPage.js +19 -33
- package/dist/layouts/clothing/pages/CategoriesPage.js +8 -8
- package/dist/layouts/clothing/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/CategoryPage.js +15 -41
- package/dist/layouts/clothing/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ContactPage.js +5 -8
- package/dist/layouts/clothing/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ProductDetailPage.js +256 -167
- package/dist/layouts/clothing/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/clothing/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/clothing/pages/ProductsPage.js +125 -59
- package/dist/layouts/clothing/payaza-bindings.js +2 -2
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/components/ClothingHomePageMinimal.js +32 -131
- package/dist/layouts/clothing-minimal/components/clothing-minimal-block-render.js +8 -8
- package/dist/layouts/clothing-minimal/index.js +7 -7
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/AboutPage.js +37 -61
- package/dist/layouts/clothing-minimal/pages/CategoriesPage.js +7 -7
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/CategoryPage.js +13 -18
- package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ContactPage.js +5 -8
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductDetailPage.js +202 -143
- package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/clothing-minimal/pages/ProductsPage.js +126 -57
- package/dist/layouts/electronics/components/ElectronicsCategoriesPage.js +7 -7
- package/dist/layouts/electronics/components/ElectronicsGridProductCard.js +10 -10
- package/dist/layouts/electronics/components/ElectronicsHomePage.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsHomePage.js +29 -31
- package/dist/layouts/electronics/components/ElectronicsPageWrapper.js +4 -4
- package/dist/layouts/electronics/components/ElectronicsProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics/components/ElectronicsProductsPage.js +81 -23
- package/dist/layouts/electronics/components/ElectronicsStoreFooter.js +2 -2
- package/dist/layouts/electronics/components/ElectronicsStoreHeader.js +6 -6
- package/dist/layouts/electronics/index.js +18 -18
- package/dist/layouts/electronics/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/AboutPage.js +11 -14
- package/dist/layouts/electronics/pages/CategoriesPage.js +1 -1
- package/dist/layouts/electronics/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/CategoryPage.js +14 -20
- package/dist/layouts/electronics/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ContactPage.js +8 -13
- package/dist/layouts/electronics/pages/HelpCenterPage.js +1 -1
- package/dist/layouts/electronics/pages/PrivacyPolicyPage.js +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ProductDetailPage.js +201 -142
- package/dist/layouts/electronics/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/electronics/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics/pages/ProductsPage.js +119 -49
- package/dist/layouts/electronics/pages/TermsPage.js +1 -1
- package/dist/layouts/electronics/pages/TrackOrderPage.js +4 -4
- package/dist/layouts/electronics-grid/components/ElectronicsGridProductCard.js +10 -10
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/components/ElectronicsHomePageGrid.js +75 -33
- package/dist/layouts/electronics-grid/index.js +14 -14
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/AboutPage.js +11 -14
- package/dist/layouts/electronics-grid/pages/CategoriesPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/CategoryPage.js +14 -20
- package/dist/layouts/electronics-grid/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ContactPage.js +8 -13
- package/dist/layouts/electronics-grid/pages/ElectronicsGridCategoriesPage.js +6 -6
- package/dist/layouts/electronics-grid/pages/HelpCenterPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/PrivacyPolicyPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ProductDetailPage.js +201 -142
- package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/electronics-grid/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/electronics-grid/pages/ProductsPage.js +121 -52
- package/dist/layouts/electronics-grid/pages/TermsPage.js +1 -1
- package/dist/layouts/electronics-grid/pages/TrackOrderPage.js +4 -4
- package/dist/layouts/food/components/FoodHomePage.d.ts.map +1 -1
- package/dist/layouts/food/components/FoodHomePage.js +42 -41
- package/dist/layouts/food/index.js +8 -8
- package/dist/layouts/food/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/food/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/AboutPage.js +44 -45
- package/dist/layouts/food/pages/CategoriesPage.js +6 -6
- package/dist/layouts/food/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/food/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/CategoryPage.js +23 -21
- package/dist/layouts/food/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/food/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ContactPage.js +5 -7
- package/dist/layouts/food/pages/MenuPage.d.ts +1 -1
- package/dist/layouts/food/pages/MenuPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/MenuPage.js +81 -42
- package/dist/layouts/food/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/food/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ProductDetailPage.js +209 -171
- package/dist/layouts/food/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/food/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/food/pages/ProductsPage.js +130 -45
- package/dist/layouts/food-modern/components/FoodHomePageModern.js +10 -10
- package/dist/layouts/food-modern/index.js +8 -8
- package/dist/layouts/food-modern/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/AboutPage.js +11 -14
- package/dist/layouts/food-modern/pages/CategoriesPage.js +5 -5
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/CategoryPage.js +23 -20
- package/dist/layouts/food-modern/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ContactPage.js +5 -7
- package/dist/layouts/food-modern/pages/MenuPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/MenuPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/MenuPage.js +81 -46
- package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ProductDetailPage.js +202 -143
- package/dist/layouts/food-modern/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/food-modern/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/food-modern/pages/ProductsPage.js +117 -33
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/components/MotivationalHomePage.js +32 -23
- package/dist/layouts/motivational-speaker/components/MotivationalSpeakerPageWrapper.js +1 -1
- package/dist/layouts/motivational-speaker/index.js +9 -9
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/AboutPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/AboutPage.js +6 -9
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/CategoryPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/CategoryPage.js +18 -22
- package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ContactPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ContactPage.js +9 -13
- package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ProductsPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ProductsPage.js +121 -52
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ServiceDetailPage.js +15 -24
- package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts +1 -1
- package/dist/layouts/motivational-speaker/pages/ServicesPage.d.ts.map +1 -1
- package/dist/layouts/motivational-speaker/pages/ServicesPage.js +8 -23
- package/dist/layouts/motivational-speaker/pages/SubscriptionPage.js +7 -7
- package/dist/layouts/shared/components/BaseStoreLayout.js +9 -9
- package/dist/layouts/shared/components/CartLineQuantityControl.js +1 -1
- package/dist/layouts/shared/components/GenericPageWrapper.js +3 -3
- package/dist/layouts/shared/components/ProductPriceFilterSection.js +4 -4
- package/dist/layouts/shared/components/PromoBanner.d.ts +1 -4
- package/dist/layouts/shared/components/PromoBanner.d.ts.map +1 -1
- package/dist/layouts/shared/components/PromoBanner.js +12 -8
- package/dist/layouts/shared/components/StoreFooter.js +10 -10
- package/dist/layouts/shared/components/StoreHeader.js +7 -7
- package/dist/layouts/shared/components/TestimonialCard.d.ts.map +1 -1
- package/dist/layouts/shared/components/TestimonialCard.js +2 -2
- package/dist/layouts/shared/components/headers/BookingAgendaSidebar.js +2 -2
- package/dist/layouts/shared/components/headers/ClothingMinimalHeader.js +11 -11
- package/dist/layouts/shared/components/headers/FoodModernHeader.js +7 -7
- package/dist/layouts/shared/index.js +22 -22
- package/dist/layouts/shared/pages/AccountPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/AccountPage.js +101 -27
- package/dist/layouts/shared/pages/CartPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/CartPage.js +39 -90
- package/dist/layouts/shared/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/CheckoutPage.js +349 -868
- package/dist/layouts/shared/pages/CookiePolicyPage.js +1 -1
- package/dist/layouts/shared/pages/FeatureDisabledPage.js +1 -1
- package/dist/layouts/shared/pages/HelpCenterPage.js +1 -1
- package/dist/layouts/shared/pages/MaintenancePage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/MaintenancePage.js +2 -3
- package/dist/layouts/shared/pages/PortfolioPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/PortfolioPage.js +2 -2
- package/dist/layouts/shared/pages/PrivacyPolicyPage.js +1 -1
- package/dist/layouts/shared/pages/SizeGuidePage.js +1 -1
- package/dist/layouts/shared/pages/StyleGuidePage.js +3 -3
- package/dist/layouts/shared/pages/TeamPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/TeamPage.js +1 -1
- package/dist/layouts/shared/pages/TermsPage.js +1 -1
- package/dist/layouts/shared/pages/TrackOrderPage.js +4 -4
- package/dist/layouts/shared/pages/WishlistPage.d.ts.map +1 -1
- package/dist/layouts/shared/pages/WishlistPage.js +44 -29
- package/dist/layouts/shared/wrappers/BookingAgendaLayout.d.ts.map +1 -1
- package/dist/layouts/shared/wrappers/BookingAgendaLayout.js +80 -35
- package/dist/layouts/shared/wrappers/ClothingLayout.js +8 -8
- package/dist/layouts/shared/wrappers/ClothingMinimalLayout.js +7 -7
- package/dist/layouts/shared/wrappers/ElectronicsLayout.js +5 -5
- package/dist/layouts/shared/wrappers/FoodModernLayout.js +6 -6
- package/dist/layouts/shared/wrappers/MotivationalLayout.js +9 -9
- package/dist/layouts/shared/wrappers/StandardLayout.js +8 -8
- package/dist/lib/api.d.ts +3 -4
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +69 -109
- package/dist/lib/auth-context.js +2 -2
- package/dist/lib/content-selectors.d.ts +1 -1
- package/dist/lib/content-selectors.d.ts.map +1 -1
- package/dist/lib/content-selectors.js +8 -0
- package/dist/lib/layout-config-hydration.js +2 -2
- package/dist/lib/loading-context.d.ts.map +1 -1
- package/dist/lib/loading-context.js +11 -21
- package/dist/lib/payaza-checkout.d.ts.map +1 -1
- package/dist/lib/payaza-checkout.js +2 -4
- package/dist/lib/payaza-public-key.d.ts +6 -0
- package/dist/lib/payaza-public-key.d.ts.map +1 -0
- package/dist/lib/payaza-public-key.js +10 -0
- package/dist/lib/rich-html.d.ts +31 -26
- package/dist/lib/rich-html.d.ts.map +1 -1
- package/dist/lib/rich-html.js +1 -0
- package/dist/lib/services/analytics.service.js +1 -1
- package/dist/lib/services/auth.service.js +1 -1
- package/dist/lib/services/booking.service.js +1 -1
- package/dist/lib/services/category.service.js +1 -1
- package/dist/lib/services/checkout.service.d.ts +3 -0
- package/dist/lib/services/checkout.service.d.ts.map +1 -1
- package/dist/lib/services/checkout.service.js +1 -1
- package/dist/lib/services/contact.service.js +1 -1
- package/dist/lib/services/customer.service.js +1 -1
- package/dist/lib/services/fees.service.d.ts +17 -63
- package/dist/lib/services/fees.service.d.ts.map +1 -1
- package/dist/lib/services/fees.service.js +4 -138
- package/dist/lib/services/index.js +13 -13
- package/dist/lib/services/location.service.js +1 -1
- package/dist/lib/services/order.service.js +1 -1
- package/dist/lib/services/payment.service.js +1 -1
- package/dist/lib/services/product.service.d.ts +7 -2
- package/dist/lib/services/product.service.d.ts.map +1 -1
- package/dist/lib/services/product.service.js +13 -1
- package/dist/lib/services/promo.service.js +1 -1
- package/dist/lib/services/review.service.js +1 -1
- package/dist/lib/services/service.service.js +1 -1
- package/dist/lib/services/shipping.service.js +1 -1
- package/dist/lib/services/store.service.js +1 -1
- package/dist/lib/store-config-utils.d.ts +1 -10
- package/dist/lib/store-config-utils.d.ts.map +1 -1
- package/dist/lib/store-config-utils.js +73 -261
- package/dist/lib/store-config.js +1 -1
- package/dist/lib/store-context.d.ts +1 -23
- package/dist/lib/store-context.d.ts.map +1 -1
- package/dist/lib/store-context.js +89 -111
- package/dist/lib/store-types.d.ts +9 -91
- package/dist/lib/store-types.d.ts.map +1 -1
- package/dist/lib/utils/asset-helpers.js +1 -1
- package/dist/lib/utils/catalog-price-bounds.d.ts +16 -6
- package/dist/lib/utils/catalog-price-bounds.d.ts.map +1 -1
- package/dist/lib/utils/catalog-price-bounds.js +58 -14
- package/dist/lib/utils/category-tree.d.ts +9 -0
- package/dist/lib/utils/category-tree.d.ts.map +1 -1
- package/dist/lib/utils/category-tree.js +26 -0
- package/dist/lib/utils/editor-preview.d.ts +5 -0
- package/dist/lib/utils/editor-preview.d.ts.map +1 -1
- package/dist/lib/utils/editor-preview.js +17 -3
- package/dist/lib/utils/fee-calculations.d.ts +5 -1
- package/dist/lib/utils/fee-calculations.d.ts.map +1 -1
- package/dist/lib/utils/fee-calculations.js +28 -31
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/index.js +4 -4
- package/dist/lib/utils/product-images.js +1 -1
- package/dist/lib/utils/product-share.js +1 -1
- package/dist/lib/utils/url-helpers.d.ts +6 -0
- package/dist/lib/utils/url-helpers.d.ts.map +1 -1
- package/dist/lib/utils/url-helpers.js +20 -4
- package/dist/preview/LayoutPreview.js +6 -6
- package/dist/preview/PreviewRouter.js +4 -4
- package/dist/preview/canvas/PreviewCanvasEnhancer.js +8 -8
- package/dist/preview/canvas/preview-flush-await.js +1 -1
- package/dist/preview/canvas/preview-isolation.js +1 -1
- package/dist/preview/canvas/preview-route.js +2 -2
- package/dist/preview/index.js +5 -5
- package/dist/styles/index.css +190 -149
- package/package.json +31 -43
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { ElectronicsStoreHeader } from './ElectronicsStoreHeader
|
|
4
|
-
import { ElectronicsStoreFooter } from './ElectronicsStoreFooter
|
|
5
|
-
import { PageContentLoader } from '../../../components/ui/page-content-loader
|
|
6
|
-
import { useLoading } from '../../../lib/loading-context
|
|
3
|
+
import { ElectronicsStoreHeader } from './ElectronicsStoreHeader';
|
|
4
|
+
import { ElectronicsStoreFooter } from './ElectronicsStoreFooter';
|
|
5
|
+
import { PageContentLoader } from '../../../components/ui/page-content-loader';
|
|
6
|
+
import { useLoading } from '../../../lib/loading-context';
|
|
7
7
|
export function ElectronicsPageWrapper({ children, storeConfig }) {
|
|
8
8
|
const { isBackendLoading } = useLoading();
|
|
9
9
|
return (_jsxs("div", { className: "min-h-screen flex flex-col bg-slate-50 font-sans text-slate-900 selection:bg-blue-600 selection:text-white", children: [_jsx(ElectronicsStoreHeader, { storeConfig: storeConfig }), _jsxs("main", { className: "flex-1 pt-24 relative", children: [isBackendLoading && _jsx(PageContentLoader, {}), children] }), _jsx(ElectronicsStoreFooter, { storeConfig: storeConfig })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElectronicsProductsPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/components/ElectronicsProductsPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ElectronicsProductsPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/components/ElectronicsProductsPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAsB9D,UAAU,4BAA4B;IACnC,WAAW,EAAE,WAAW,CAAC;CAC3B;AAwUD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,2CAM1E"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from '../../../components/ui/button
|
|
4
|
-
import { Breadcrumbs } from '../../../components/ui/breadcrumbs
|
|
5
|
-
import { CategoryTree } from '../../../components/ui/category-tree
|
|
6
|
-
import { useStore } from '../../../lib/store-context
|
|
7
|
-
import { useToast } from '../../../components/ui/toast
|
|
3
|
+
import { Button } from '../../../components/ui/button';
|
|
4
|
+
import { Breadcrumbs } from '../../../components/ui/breadcrumbs';
|
|
5
|
+
import { CategoryTree } from '../../../components/ui/category-tree';
|
|
6
|
+
import { useStore } from '../../../lib/store-context';
|
|
7
|
+
import { useToast } from '../../../components/ui/toast';
|
|
8
8
|
import { Filter, ChevronDown, Search } from 'lucide-react';
|
|
9
9
|
import { useSearchParams } from 'next/navigation';
|
|
10
|
-
import { useState, useMemo, useEffect, Suspense } from 'react';
|
|
11
|
-
import { ElectronicsStoreHeader } from './ElectronicsStoreHeader
|
|
12
|
-
import { ElectronicsStoreFooter } from './ElectronicsStoreFooter
|
|
13
|
-
import { ElectronicsGridProductCard } from './ElectronicsGridProductCard
|
|
14
|
-
import { Sheet } from '../../../components/ui/sheet
|
|
10
|
+
import { useState, useMemo, useEffect, useRef, Suspense } from 'react';
|
|
11
|
+
import { ElectronicsStoreHeader } from './ElectronicsStoreHeader';
|
|
12
|
+
import { ElectronicsStoreFooter } from './ElectronicsStoreFooter';
|
|
13
|
+
import { ElectronicsGridProductCard } from './ElectronicsGridProductCard';
|
|
14
|
+
import { Sheet } from '../../../components/ui/sheet';
|
|
15
15
|
import { AnimatePresence } from 'framer-motion';
|
|
16
|
-
import {
|
|
17
|
-
import { buildCategoryTree, getAllCategoryIds, flattenCategoryTree } from '../../../lib/utils/category-tree
|
|
16
|
+
import { filterActiveProducts } from '../../../lib/utils';
|
|
17
|
+
import { buildCategoryTree, getAllCategoryIds, flattenCategoryTree } from '../../../lib/utils/category-tree';
|
|
18
|
+
import { productService } from '../../../lib/services/product.service';
|
|
19
|
+
import { transformProductToStoreProduct } from '../../../lib/store-config-utils';
|
|
20
|
+
import { useCatalogPriceRange } from '../../../hooks/use-catalog-price-range';
|
|
21
|
+
import { isWithinActivePriceRange } from '../../../lib/utils/catalog-price-bounds';
|
|
22
|
+
import { ProductPriceFilterSection } from '../../shared/components/ProductPriceFilterSection';
|
|
18
23
|
function ElectronicsProductsPageContent({ storeConfig }) {
|
|
19
24
|
const searchParams = useSearchParams();
|
|
20
25
|
const categoryParam = searchParams.get('category');
|
|
@@ -24,14 +29,14 @@ function ElectronicsProductsPageContent({ storeConfig }) {
|
|
|
24
29
|
const { addToast } = useToast();
|
|
25
30
|
// Filter States
|
|
26
31
|
const [selectedCategoryFilter, setSelectedCategoryFilter] = useState(categoryParam);
|
|
27
|
-
const
|
|
32
|
+
const storeCurrency = storeConfig.settings?.currency || 'NGN';
|
|
33
|
+
const { priceRange, setPriceRange, catalogBounds, resetPriceRange, hasActivePriceFilter, } = useCatalogPriceRange(products);
|
|
28
34
|
const [sortBy, setSortBy] = useState('featured');
|
|
29
35
|
const [visibleProducts, setVisibleProducts] = useState(12);
|
|
30
36
|
const [isFilterOpen, setIsFilterOpen] = useState(false);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, [storeConfig.products]);
|
|
37
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
38
|
+
const [totalProducts, setTotalProducts] = useState(storeConfig.products?.length || 0);
|
|
39
|
+
const [isLoadingProducts, setIsLoadingProducts] = useState(false);
|
|
35
40
|
// Build category tree for filtering
|
|
36
41
|
const categoryTree = useMemo(() => buildCategoryTree(categories), [categories]);
|
|
37
42
|
// Get selected category IDs (including children if parent is selected)
|
|
@@ -45,6 +50,40 @@ function ElectronicsProductsPageContent({ storeConfig }) {
|
|
|
45
50
|
// Return all category IDs including children
|
|
46
51
|
return getAllCategoryIds(selectedCategory);
|
|
47
52
|
}, [selectedCategoryFilter, categoryTree]);
|
|
53
|
+
const productQuery = useMemo(() => ({
|
|
54
|
+
storeId: storeConfig.id,
|
|
55
|
+
categoryIds: selectedCategoryIds.length ? selectedCategoryIds.join(',') : undefined,
|
|
56
|
+
minPrice: priceRange[0] || undefined,
|
|
57
|
+
maxPrice: priceRange[1] < catalogBounds.max ? priceRange[1] : undefined,
|
|
58
|
+
sortBy: sortBy,
|
|
59
|
+
}), [catalogBounds.max, priceRange, selectedCategoryIds, sortBy, storeConfig.id]);
|
|
60
|
+
const skipBootstrapRefetch = useRef(true);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
let cancelled = false;
|
|
63
|
+
const isDefaultQuery = !productQuery.categoryIds &&
|
|
64
|
+
!productQuery.minPrice &&
|
|
65
|
+
productQuery.maxPrice === undefined &&
|
|
66
|
+
productQuery.sortBy === 'featured';
|
|
67
|
+
if (skipBootstrapRefetch.current && isDefaultQuery && products.length > 0) {
|
|
68
|
+
skipBootstrapRefetch.current = false;
|
|
69
|
+
setTotalProducts(storeConfig.productsTotal || products.length);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
skipBootstrapRefetch.current = false;
|
|
73
|
+
setIsLoadingProducts(true);
|
|
74
|
+
productService.getProducts({ ...productQuery, page: 1, limit: 12 })
|
|
75
|
+
.then((response) => {
|
|
76
|
+
if (cancelled)
|
|
77
|
+
return;
|
|
78
|
+
setProducts(response.data.map(transformProductToStoreProduct));
|
|
79
|
+
setCurrentPage(1);
|
|
80
|
+
setTotalProducts(response.meta.total);
|
|
81
|
+
setVisibleProducts(12);
|
|
82
|
+
})
|
|
83
|
+
.catch((error) => !cancelled && console.error('Failed to fetch products:', error))
|
|
84
|
+
.finally(() => !cancelled && setIsLoadingProducts(false));
|
|
85
|
+
return () => { cancelled = true; };
|
|
86
|
+
}, [productQuery]);
|
|
48
87
|
// Filter Logic
|
|
49
88
|
const filteredAndSortedProducts = useMemo(() => {
|
|
50
89
|
const result = products.filter(product => {
|
|
@@ -54,7 +93,7 @@ function ElectronicsProductsPageContent({ storeConfig }) {
|
|
|
54
93
|
return false;
|
|
55
94
|
}
|
|
56
95
|
}
|
|
57
|
-
if (product.price
|
|
96
|
+
if (!isWithinActivePriceRange(product.price, priceRange, catalogBounds)) {
|
|
58
97
|
return false;
|
|
59
98
|
}
|
|
60
99
|
return true;
|
|
@@ -76,7 +115,26 @@ function ElectronicsProductsPageContent({ storeConfig }) {
|
|
|
76
115
|
return result;
|
|
77
116
|
}, [products, selectedCategoryFilter, selectedCategoryIds, priceRange, sortBy]);
|
|
78
117
|
const displayedProducts = filteredAndSortedProducts.slice(0, visibleProducts);
|
|
79
|
-
const hasMore =
|
|
118
|
+
const hasMore = currentPage * 12 < totalProducts;
|
|
119
|
+
const handleLoadMore = async () => {
|
|
120
|
+
if (isLoadingProducts || !hasMore)
|
|
121
|
+
return;
|
|
122
|
+
setIsLoadingProducts(true);
|
|
123
|
+
try {
|
|
124
|
+
const nextPage = currentPage + 1;
|
|
125
|
+
const response = await productService.getProducts({ ...productQuery, page: nextPage, limit: 12 });
|
|
126
|
+
setProducts((current) => [...current, ...response.data.map(transformProductToStoreProduct)]);
|
|
127
|
+
setCurrentPage(nextPage);
|
|
128
|
+
setTotalProducts(response.meta.total);
|
|
129
|
+
setVisibleProducts((current) => current + 12);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
console.error('Failed to load more products:', error);
|
|
133
|
+
}
|
|
134
|
+
finally {
|
|
135
|
+
setIsLoadingProducts(false);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
80
138
|
const handleAddToCart = (product) => {
|
|
81
139
|
addToCart(product);
|
|
82
140
|
addToast(`${product.name} added to cart`, 'success');
|
|
@@ -85,11 +143,11 @@ function ElectronicsProductsPageContent({ storeConfig }) {
|
|
|
85
143
|
{ label: storeConfig.name, href: `/${storeConfig.slug}` },
|
|
86
144
|
{ label: 'Products', href: `/${storeConfig.slug}/products` },
|
|
87
145
|
];
|
|
88
|
-
return (_jsxs("div", { className: "min-h-screen bg-slate-50 font-sans text-slate-900 selection:bg-blue-600 selection:text-white", children: [_jsx(ElectronicsStoreHeader, { storeConfig: storeConfig }), _jsxs("main", { className: "pt-24 pb-20", children: [_jsxs("div", { className: "bg-slate-950 text-white mb-10 overflow-hidden relative", children: [_jsx("div", { className: "absolute inset-0 bg-blue-600/10 pointer-events-none" }), _jsx("div", { className: "absolute -top-24 -right-24 w-96 h-96 bg-blue-500/20 rounded-full blur-[100px]" }), _jsxs("div", { className: "container mx-auto px-6 py-16 relative z-10", children: [_jsx("div", { className: "mb-6 opacity-60", children: _jsx(Breadcrumbs, { items: breadcrumbItems }) }), _jsx("h1", { className: "text-4xl md:text-5xl font-black tracking-tight mb-4", children: "All Products" }), _jsx("p", { className: "text-slate-400 max-w-xl text-lg font-light", children: "Explore our complete catalog of premium electronics." })] })] }), _jsx("div", { className: "container mx-auto px-6", children: _jsxs("div", { className: "flex flex-col lg:flex-row gap-12", children: [_jsx("aside", { className: "hidden lg:block w-64 shrink-0 space-y-10 sticky top-32 self-start h-fit", children: _jsxs("div", { children: [_jsxs("h3", { className: "font-bold text-slate-900 mb-4 flex items-center gap-2", children: [_jsx(Filter, { className: "h-4 w-4" }), " Filters"] }), _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-xs font-bold text-slate-400 uppercase tracking-wider mb-3", children: "Categories" }), _jsx(CategoryTree, { categories: categories, selectedCategoryIds: selectedCategoryFilter ? [categories.find(c => c.slug === selectedCategoryFilter)?.id || ''] : [], onCategorySelect: (slug) => setSelectedCategoryFilter(selectedCategoryFilter === slug ? null : slug), mode: "button", showAllOption: true, onAllSelect: () => setSelectedCategoryFilter(null), isAllSelected: !selectedCategoryFilter })] }),
|
|
146
|
+
return (_jsxs("div", { className: "min-h-screen bg-slate-50 font-sans text-slate-900 selection:bg-blue-600 selection:text-white", children: [_jsx(ElectronicsStoreHeader, { storeConfig: storeConfig }), _jsxs("main", { className: "pt-24 pb-20", children: [_jsxs("div", { className: "bg-slate-950 text-white mb-10 overflow-hidden relative", children: [_jsx("div", { className: "absolute inset-0 bg-blue-600/10 pointer-events-none" }), _jsx("div", { className: "absolute -top-24 -right-24 w-96 h-96 bg-blue-500/20 rounded-full blur-[100px]" }), _jsxs("div", { className: "container mx-auto px-6 py-16 relative z-10", children: [_jsx("div", { className: "mb-6 opacity-60", children: _jsx(Breadcrumbs, { items: breadcrumbItems }) }), _jsx("h1", { className: "text-4xl md:text-5xl font-black tracking-tight mb-4", children: "All Products" }), _jsx("p", { className: "text-slate-400 max-w-xl text-lg font-light", children: "Explore our complete catalog of premium electronics." })] })] }), _jsx("div", { className: "container mx-auto px-6", children: _jsxs("div", { className: "flex flex-col lg:flex-row gap-12", children: [_jsx("aside", { className: "hidden lg:block w-64 shrink-0 space-y-10 sticky top-32 self-start h-fit", children: _jsxs("div", { children: [_jsxs("h3", { className: "font-bold text-slate-900 mb-4 flex items-center gap-2", children: [_jsx(Filter, { className: "h-4 w-4" }), " Filters"] }), _jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-xs font-bold text-slate-400 uppercase tracking-wider mb-3", children: "Categories" }), _jsx(CategoryTree, { categories: categories, selectedCategoryIds: selectedCategoryFilter ? [categories.find(c => c.slug === selectedCategoryFilter)?.id || ''] : [], onCategorySelect: (slug) => setSelectedCategoryFilter(selectedCategoryFilter === slug ? null : slug), mode: "button", showAllOption: true, onAllSelect: () => setSelectedCategoryFilter(null), isAllSelected: !selectedCategoryFilter })] }), _jsx(ProductPriceFilterSection, { currency: storeCurrency, priceRange: priceRange, onPriceRangeChange: setPriceRange, bounds: catalogBounds, isFilterActive: hasActivePriceFilter, onReset: resetPriceRange })] })] }) }), _jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-4 mb-8", children: [_jsxs("div", { className: "text-sm font-medium text-slate-500", children: ["Showing ", _jsx("span", { className: "text-slate-900 font-bold", children: displayedProducts.length }), " results"] }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsxs(Button, { variant: "outline", className: "lg:hidden rounded-full border-slate-200", onClick: () => setIsFilterOpen(true), children: [_jsx(Filter, { className: "h-4 w-4 mr-2" }), " Filters"] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-sm font-medium text-slate-500 hidden sm:inline", children: "Sort by:" }), _jsxs("div", { className: "relative", children: [_jsxs("select", { value: sortBy, onChange: (e) => setSortBy(e.target.value), className: "appearance-none bg-white border border-slate-200 rounded-full pl-4 pr-10 py-2 text-sm font-medium text-slate-900 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent cursor-pointer hover:bg-slate-50 transition-colors", children: [_jsx("option", { value: "featured", children: "Featured" }), _jsx("option", { value: "newest", children: "Newest" }), _jsx("option", { value: "price-asc", children: "Price: Low to High" }), _jsx("option", { value: "price-desc", children: "Price: High to Low" }), _jsx("option", { value: "rating", children: "Top Rated" })] }), _jsx(ChevronDown, { className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-500 pointer-events-none" })] })] })] })] }), displayedProducts.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-6", children: _jsx(AnimatePresence, { mode: 'popLayout', children: displayedProducts.map((product, index) => (_jsx(ElectronicsGridProductCard, { product: product, storeSlug: storeConfig.slug, onAddToCart: handleAddToCart, index: index }, product.id))) }) })) : (_jsxs("div", { className: "flex flex-col items-center justify-center py-32 text-center bg-white rounded-3xl border border-dashed border-slate-200", children: [_jsx("div", { className: "w-16 h-16 bg-slate-50 rounded-full flex items-center justify-center mb-6", children: _jsx(Search, { className: "h-6 w-6 text-slate-400" }) }), _jsx("h3", { className: "text-lg font-bold text-slate-900 mb-2", children: "No products found" }), _jsx("p", { className: "text-slate-500 max-w-sm mx-auto mb-8 text-sm", children: "Try adjusting your filters or search criteria." }), _jsx(Button, { onClick: () => {
|
|
89
147
|
setSelectedCategoryFilter(null);
|
|
90
|
-
|
|
91
|
-
}, variant: "outline", className: "rounded-full px-8 border-slate-200", children: "Clear Filters" })] })), hasMore && (_jsx("div", { className: "mt-16 text-center", children: _jsx(Button, { onClick:
|
|
92
|
-
|
|
148
|
+
resetPriceRange();
|
|
149
|
+
}, variant: "outline", className: "rounded-full px-8 border-slate-200", children: "Clear Filters" })] })), hasMore && (_jsx("div", { className: "mt-16 text-center", children: _jsx(Button, { onClick: handleLoadMore, variant: "outline", className: "rounded-full px-10 h-12 border-slate-200 hover:bg-slate-900 hover:text-white hover:border-slate-900 transition-all text-sm font-bold uppercase tracking-wide", children: "Load More" }) }))] })] }) })] }), _jsx(ElectronicsStoreFooter, { storeConfig: storeConfig }), _jsx(Sheet, { isOpen: isFilterOpen, onClose: () => setIsFilterOpen(false), title: "Filters", side: "right", className: "w-[300px]", children: _jsxs("div", { className: "py-6 space-y-8 h-full flex flex-col", children: [_jsxs("div", { className: "flex-1 space-y-8 overflow-y-auto", children: [_jsxs("div", { children: [_jsx("h3", { className: "font-bold text-sm uppercase tracking-wider mb-4 text-slate-900", children: "Categories" }), _jsx(CategoryTree, { categories: categories, selectedCategoryIds: selectedCategoryFilter ? [categories.find(c => c.slug === selectedCategoryFilter)?.id || ''] : [], onCategorySelect: (slug) => setSelectedCategoryFilter(selectedCategoryFilter === slug ? null : slug), mode: "button", showAllOption: true, onAllSelect: () => setSelectedCategoryFilter(null), isAllSelected: !selectedCategoryFilter })] }), _jsx(ProductPriceFilterSection, { currency: storeCurrency, priceRange: priceRange, onPriceRangeChange: setPriceRange, bounds: catalogBounds, isFilterActive: hasActivePriceFilter, onReset: resetPriceRange })] }), _jsxs("div", { className: "flex gap-4 pt-6 border-t border-slate-100", children: [_jsx(Button, { variant: "outline", className: "flex-1 h-12 rounded-full border-slate-200", onClick: () => {
|
|
150
|
+
resetPriceRange();
|
|
93
151
|
setSelectedCategoryFilter(null);
|
|
94
152
|
setIsFilterOpen(false);
|
|
95
153
|
}, children: "Reset" }), _jsx(Button, { className: "flex-1 bg-blue-600 hover:bg-blue-700 text-white h-12 rounded-full", onClick: () => setIsFilterOpen(false), children: "Show Results" })] })] }) })] }));
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { Zap, Facebook, Twitter, Instagram, Mail, MapPin, Phone } from 'lucide-react';
|
|
5
|
-
import { getLayoutText, getThemeColor } from '../../../lib/utils/asset-helpers
|
|
6
|
-
import { getCurrentYear } from '../../../utils/date
|
|
5
|
+
import { getLayoutText, getThemeColor } from '../../../lib/utils/asset-helpers';
|
|
6
|
+
import { getCurrentYear } from '../../../utils/date';
|
|
7
7
|
export function ElectronicsStoreFooter({ storeConfig }) {
|
|
8
8
|
const bgDark = getThemeColor(storeConfig, 'background', 'dark', '#0F172A');
|
|
9
9
|
const textSecondary = getThemeColor(storeConfig, 'text', 'secondary', '#CBD5E1');
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from '../../../components/ui/button
|
|
3
|
+
import { Button } from '../../../components/ui/button';
|
|
4
4
|
import { ShoppingCart, Zap, Menu, X, Search, User } from 'lucide-react';
|
|
5
5
|
import Link from 'next/link';
|
|
6
6
|
import { useState, useEffect } from 'react';
|
|
7
|
-
import { cn, formatStoreDisplayName } from '../../../lib/utils
|
|
8
|
-
import { getLayoutText, getLogoUrl } from '../../../lib/utils/asset-helpers
|
|
9
|
-
import { useStore } from '../../../lib/store-context
|
|
10
|
-
import { useAuth } from '../../../lib/auth-context
|
|
11
|
-
import { StoreLogo } from '../../../components/ui/store-logos
|
|
7
|
+
import { cn, formatStoreDisplayName } from '../../../lib/utils';
|
|
8
|
+
import { getLayoutText, getLogoUrl } from '../../../lib/utils/asset-helpers';
|
|
9
|
+
import { useStore } from '../../../lib/store-context';
|
|
10
|
+
import { useAuth } from '../../../lib/auth-context';
|
|
11
|
+
import { StoreLogo } from '../../../components/ui/store-logos';
|
|
12
12
|
import { usePathname } from 'next/navigation';
|
|
13
13
|
export function ElectronicsStoreHeader({ storeConfig }) {
|
|
14
14
|
const [scrolled, setScrolled] = useState(false);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// Tech World (electronics) layout — fully sandboxed exports
|
|
2
|
-
export { ElectronicsHomePage } from './components/ElectronicsHomePage
|
|
3
|
-
export { ElectronicsProductsPage } from './components/ElectronicsProductsPage
|
|
4
|
-
export { ElectronicsCategoriesPage } from './components/ElectronicsCategoriesPage
|
|
5
|
-
export { ElectronicsPageWrapper } from './components/ElectronicsPageWrapper
|
|
6
|
-
export { ElectronicsStoreHeader } from './components/ElectronicsStoreHeader
|
|
7
|
-
export { ElectronicsStoreFooter } from './components/ElectronicsStoreFooter
|
|
8
|
-
export { ElectronicsGridProductCard } from './components/ElectronicsGridProductCard
|
|
9
|
-
export { ElectronicsProductsListingPage } from './pages/ProductsPage
|
|
10
|
-
export { ElectronicsProductDetailPage } from './pages/ProductDetailPage
|
|
11
|
-
export { ElectronicsCategoryPage } from './pages/CategoryPage
|
|
12
|
-
export { ElectronicsCategoriesListingPage } from './pages/CategoriesPage
|
|
13
|
-
export { ElectronicsAboutPage } from './pages/AboutPage
|
|
14
|
-
export { ElectronicsContactPage } from './pages/ContactPage
|
|
15
|
-
export { ElectronicsHelpCenterPage } from './pages/HelpCenterPage
|
|
16
|
-
export { ElectronicsPrivacyPolicyPage } from './pages/PrivacyPolicyPage
|
|
17
|
-
export { ElectronicsShippingReturnsPage } from './pages/ShippingReturnsPage
|
|
18
|
-
export { ElectronicsTermsPage } from './pages/TermsPage
|
|
19
|
-
export { ElectronicsTrackOrderPage } from './pages/TrackOrderPage
|
|
2
|
+
export { ElectronicsHomePage } from './components/ElectronicsHomePage';
|
|
3
|
+
export { ElectronicsProductsPage } from './components/ElectronicsProductsPage';
|
|
4
|
+
export { ElectronicsCategoriesPage } from './components/ElectronicsCategoriesPage';
|
|
5
|
+
export { ElectronicsPageWrapper } from './components/ElectronicsPageWrapper';
|
|
6
|
+
export { ElectronicsStoreHeader } from './components/ElectronicsStoreHeader';
|
|
7
|
+
export { ElectronicsStoreFooter } from './components/ElectronicsStoreFooter';
|
|
8
|
+
export { ElectronicsGridProductCard } from './components/ElectronicsGridProductCard';
|
|
9
|
+
export { ElectronicsProductsListingPage } from './pages/ProductsPage';
|
|
10
|
+
export { ElectronicsProductDetailPage } from './pages/ProductDetailPage';
|
|
11
|
+
export { ElectronicsCategoryPage } from './pages/CategoryPage';
|
|
12
|
+
export { ElectronicsCategoriesListingPage } from './pages/CategoriesPage';
|
|
13
|
+
export { ElectronicsAboutPage } from './pages/AboutPage';
|
|
14
|
+
export { ElectronicsContactPage } from './pages/ContactPage';
|
|
15
|
+
export { ElectronicsHelpCenterPage } from './pages/HelpCenterPage';
|
|
16
|
+
export { ElectronicsPrivacyPolicyPage } from './pages/PrivacyPolicyPage';
|
|
17
|
+
export { ElectronicsShippingReturnsPage } from './pages/ShippingReturnsPage';
|
|
18
|
+
export { ElectronicsTermsPage } from './pages/TermsPage';
|
|
19
|
+
export { ElectronicsTrackOrderPage } from './pages/TrackOrderPage';
|
|
@@ -2,6 +2,6 @@ import { StoreConfig } from '../../../lib/store-types';
|
|
|
2
2
|
interface AboutPageProps {
|
|
3
3
|
storeConfig: StoreConfig;
|
|
4
4
|
}
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function AboutPage({ storeConfig: initialConfig }: AboutPageProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=AboutPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"AboutPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/pages/AboutPage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,UAAU,cAAc;IACtB,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,cAAc,2CA2OvE"}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Users, Award, Heart, Leaf, MapPin, Clock, Mail, ArrowRight } from 'lucide-react';
|
|
4
|
-
import { Button } from '../../../components/ui/button
|
|
5
|
-
import { DotPattern } from '../../../components/ui/background-patterns
|
|
6
|
-
import { useStore } from '../../../lib/store-context
|
|
4
|
+
import { Button } from '../../../components/ui/button';
|
|
5
|
+
import { DotPattern } from '../../../components/ui/background-patterns';
|
|
6
|
+
import { useStore } from '../../../lib/store-context';
|
|
7
7
|
import Image from 'next/image';
|
|
8
|
-
|
|
9
|
-
import { showLayoutDecorativeBadges } from '../../../lib/layout-badges.js';
|
|
10
|
-
export function ElectronicsAboutPage({ storeConfig: initialConfig }) {
|
|
8
|
+
export function AboutPage({ storeConfig: initialConfig }) {
|
|
11
9
|
const { store } = useStore();
|
|
12
10
|
const storeConfig = store || initialConfig;
|
|
13
11
|
const primaryColor = storeConfig.branding.primaryColor;
|
|
14
12
|
const secondaryColor = storeConfig.branding.secondaryColor || primaryColor;
|
|
15
13
|
const aboutConfig = storeConfig.layoutConfig?.pages?.about;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const missionStatement = aboutConfig?.hero?.missionStatement || aboutConfig?.aboutHeader?.description || aboutConfig?.missionStatement;
|
|
14
|
+
// Electronics-specific hero image
|
|
15
|
+
const heroImage = aboutConfig?.aboutHeader?.image || aboutConfig?.heroImage || 'https://images.unsplash.com/photo-1498049381960-da565139a979?q=80&w=2071&auto=format&fit=crop';
|
|
16
|
+
const pageTitle = aboutConfig?.aboutHeader?.title || aboutConfig?.title || "Crafting Experiences, Delivering Joy.";
|
|
17
|
+
const pageContent = aboutConfig?.aboutContent?.content || aboutConfig?.content || storeConfig.description;
|
|
18
|
+
const missionStatement = aboutConfig?.aboutHeader?.description || aboutConfig?.missionStatement;
|
|
22
19
|
const galleryImages = aboutConfig?.aboutContent?.gallerySection || aboutConfig?.gallerySection;
|
|
23
20
|
const values = [
|
|
24
21
|
{
|
|
@@ -42,10 +39,10 @@ export function ElectronicsAboutPage({ storeConfig: initialConfig }) {
|
|
|
42
39
|
description: "Promoting energy-efficient devices and responsible e-waste disposal."
|
|
43
40
|
}
|
|
44
41
|
];
|
|
45
|
-
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [_jsxs("section", { "data-section": "hero",
|
|
42
|
+
return (_jsxs("div", { className: "min-h-screen bg-white pb-20 overflow-hidden", children: [_jsxs("section", { "data-section": "hero", className: "relative h-[60vh] min-h-[500px] w-full overflow-hidden", children: [_jsxs("div", { className: "absolute inset-0", children: [_jsx(Image, { src: heroImage, alt: "About Us", fill: true, className: "w-full h-full object-cover transform scale-105 animate-pulse-slow" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-black/80 via-black/50 to-transparent" })] }), _jsx("div", { className: "absolute inset-0 flex items-center", children: _jsx("div", { className: "container mx-auto px-4 sm:px-6 lg:px-8", children: _jsxs("div", { className: "max-w-3xl animate-fade-in-up", children: [_jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-1.5 rounded-full bg-white/10 backdrop-blur-md border border-white/20 text-white text-sm font-medium mb-6", children: [_jsx("span", { className: "w-2 h-2 rounded-full bg-white animate-pulse" }), "Est. 2024"] }), _jsx("h1", { className: "text-5xl md:text-7xl font-bold text-white mb-6 tracking-tight leading-tight", children: pageTitle }), _jsx("p", { className: "text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed font-light", children: missionStatement || storeConfig.description })] }) }) })] }), _jsxs("section", { "data-section": "story", className: "py-24 px-4 sm:px-6 lg:px-8 relative", children: [_jsx("div", { className: "absolute top-0 right-0 -mt-24 -mr-24 w-96 h-96 bg-gray-50 rounded-full blur-3xl -z-10" }), _jsx("div", { className: "container mx-auto max-w-7xl", children: _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-16 items-center", children: [_jsxs("div", { className: "relative", children: [galleryImages && galleryImages.length > 0 ? (_jsx("div", { className: "grid grid-cols-2 gap-4", children: galleryImages.slice(0, 4).map((img, i) => (_jsx("div", { className: `relative overflow-hidden rounded-2xl shadow-lg ${i === 0 ? 'col-span-2 aspect-[16/9]' : 'aspect-square'}`, children: _jsx(Image, { src: img.image, alt: img.caption || "Gallery Image", fill: true, className: "w-full h-full object-cover hover:scale-110 transition-transform duration-500" }) }, i))) })) : (_jsxs("div", { className: "relative aspect-[4/5] rounded-[2rem] overflow-hidden shadow-2xl", children: [_jsx(Image, { src: "https://images.unsplash.com/photo-1522202176988-66273c2fd55f?q=80&w=2071&auto=format&fit=crop", alt: "Our Team", fill: true, className: "w-full h-full object-cover" }), _jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-60" }), _jsxs("div", { className: "absolute bottom-8 left-8 text-white", children: [_jsx("p", { className: "font-bold text-lg", children: "The Dream Team" }), _jsx("p", { className: "text-white/80 text-sm", children: "Working together to serve you better" })] })] })), _jsx("div", { className: "absolute -bottom-6 -right-6 w-24 h-24 bg-white rounded-2xl shadow-xl flex items-center justify-center p-4 animate-bounce duration-[3000ms]", children: _jsx(Heart, { className: "w-10 h-10", style: { color: primaryColor, fill: primaryColor } }) })] }), _jsxs("div", { className: "space-y-10", children: [_jsxs("div", { children: [_jsx("span", { className: "text-sm font-bold uppercase tracking-widest mb-3 block", style: { color: primaryColor }, children: "Who We Are" }), _jsx("h2", { className: "text-4xl md:text-5xl font-black text-gray-900 mb-6 tracking-tight", children: "Our Journey" }), _jsxs("div", { className: "prose prose-lg text-gray-600 leading-relaxed space-y-6", children: [pageContent?.split('\n').map((paragraph, idx) => (_jsx("p", { children: paragraph }, idx))), !pageContent && (_jsxs(_Fragment, { children: [_jsxs("p", { children: ["Founded with a bold vision to redefine excellence in the ", _jsx("span", { className: "font-semibold text-gray-900", children: storeConfig.type }), " industry, ", storeConfig.name, " has grown from a small passion project into a beloved brand. We believe in the power of quality, innovation, and community."] }), _jsx("p", { children: "Every day, we strive to bring you the best products, curated with care and delivered with a smile. Our team is dedicated to ensuring that your experience with us is nothing short of exceptional." })] }))] })] }), _jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-8", children: values.map((item, idx) => (_jsxs("div", { className: "flex gap-4 group", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("div", { className: "w-14 h-14 rounded-2xl flex items-center justify-center transition-colors group-hover:bg-gray-100", style: { backgroundColor: `${primaryColor}10` }, children: _jsx(item.icon, { className: "h-7 w-7 transition-transform group-hover:scale-110", style: { color: primaryColor } }) }) }), _jsxs("div", { children: [_jsx("h4", { className: "font-bold text-gray-900 mb-2 text-lg", children: item.title }), _jsx("p", { className: "text-gray-600 text-sm leading-relaxed", children: item.description })] })] }, idx))) })] })] }) })] }), _jsxs("section", { "data-section": "stats", className: "py-20 relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 opacity-10", children: _jsx(DotPattern, { color: primaryColor, cx: 2, cy: 2, cr: 2, width: 30, height: 30 }) }), _jsx("div", { className: "absolute inset-0", style: { backgroundColor: `${secondaryColor}15` } }), _jsx("div", { className: "container mx-auto px-4 relative z-10", children: _jsx("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-12", children: [
|
|
46
43
|
{ label: "Devices Sold", value: "50k+" },
|
|
47
44
|
{ label: "Products", value: storeConfig.products?.length ? `${storeConfig.products.length}+` : "100+" },
|
|
48
45
|
{ label: "Years in Tech", value: "12+" },
|
|
49
46
|
{ label: "Service Points", value: "15+" }
|
|
50
|
-
].map((stat, idx) => (_jsxs("div", { className: "text-center group", children: [_jsx("div", { className: "text-5xl md:text-6xl font-black mb-2 tracking-tight transition-transform group-hover:scale-110 duration-300", style: { color: primaryColor }, children: stat.value }), _jsx("div", { className: "text-gray-600 font-bold uppercase tracking-widest text-xs md:text-sm", children: stat.label })] }, idx))) }) })] }), _jsx("section", { "data-section": "contact-info",
|
|
47
|
+
].map((stat, idx) => (_jsxs("div", { className: "text-center group", children: [_jsx("div", { className: "text-5xl md:text-6xl font-black mb-2 tracking-tight transition-transform group-hover:scale-110 duration-300", style: { color: primaryColor }, children: stat.value }), _jsx("div", { className: "text-gray-600 font-bold uppercase tracking-widest text-xs md:text-sm", children: stat.label })] }, idx))) }) })] }), _jsx("section", { "data-section": "contact-info", className: "py-24 px-4 sm:px-6 lg:px-8 bg-white", children: _jsxs("div", { className: "container mx-auto max-w-6xl", children: [_jsxs("div", { className: "text-center mb-16", children: [_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-gray-900 mb-4", children: "Get in Touch" }), _jsx("p", { className: "text-gray-500 max-w-xl mx-auto", children: "Have questions? We'd love to hear from you. Reach out to our team via email, phone, or visit us at our store." })] }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: [_jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center", children: [_jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(MapPin, { className: "h-8 w-8 text-gray-400 group-hover:text-blue-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Visit Us" }), _jsxs("p", { className: "text-gray-600 leading-relaxed", children: [storeConfig.contactInfo?.address?.street || '123 Store Street', _jsx("br", {}), storeConfig.contactInfo?.address?.city || 'Commerce City', ", ", storeConfig.contactInfo?.address?.state || 'ST', " ", storeConfig.contactInfo?.address?.zipCode || '12345'] })] }), _jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center relative overflow-hidden", children: [_jsx("div", { className: "absolute inset-0 border-2 border-transparent group-hover:border-orange-100 rounded-[2rem] transition-colors pointer-events-none" }), _jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(Mail, { className: "h-8 w-8 text-gray-400 group-hover:text-orange-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Email Us" }), _jsxs("p", { className: "text-gray-600 leading-relaxed mb-4", children: [storeConfig.contactInfo?.email || `hello@${storeConfig.slug}.com`, _jsx("br", {}), storeConfig.contactInfo?.phone || '+1 (555) 123-4567'] }), _jsxs(Button, { variant: "link", className: "text-orange-600 font-bold p-0 h-auto hover:no-underline group-hover:translate-x-1 transition-transform", children: ["Send a message ", _jsx(ArrowRight, { className: "ml-1 h-4 w-4" })] })] }), _jsxs("div", { className: "group p-8 rounded-[2rem] bg-gray-50 border border-gray-100 hover:shadow-xl hover:-translate-y-2 transition-all duration-300 text-center", children: [_jsx("div", { className: "w-16 h-16 mx-auto mb-6 rounded-2xl bg-white shadow-sm flex items-center justify-center group-hover:scale-110 transition-transform", children: _jsx(Clock, { className: "h-8 w-8 text-gray-400 group-hover:text-green-500 transition-colors" }) }), _jsx("h3", { className: "font-bold text-xl text-gray-900 mb-3", children: "Opening Hours" }), _jsx("p", { className: "text-gray-600 leading-relaxed", children: storeConfig.locations?.[0]?.openingHours || (_jsxs(_Fragment, { children: ["Mon - Fri: 9am - 6pm", _jsx("br", {}), "Sat - Sun: 10am - 4pm"] })) })] })] })] }) })] }));
|
|
51
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { ElectronicsCategoriesPage } from '../../electronics/components/ElectronicsCategoriesPage
|
|
3
|
+
import { ElectronicsCategoriesPage } from '../../electronics/components/ElectronicsCategoriesPage';
|
|
4
4
|
export function ElectronicsCategoriesListingPage({ storeConfig }) {
|
|
5
5
|
return _jsx(ElectronicsCategoriesPage, { storeConfig: storeConfig });
|
|
6
6
|
}
|
|
@@ -3,6 +3,6 @@ interface CategoryPageProps {
|
|
|
3
3
|
storeConfig: StoreConfig;
|
|
4
4
|
categorySlug: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function CategoryPage({ storeConfig, categorySlug }: CategoryPageProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=CategoryPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/pages/CategoryPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CategoryPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/pages/CategoryPage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAA8B,MAAM,mBAAmB,CAAC;AAc5E,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,iBAAiB,2CAsH5E"}
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useCategoryProducts } from '../../../hooks/use-category-products';
|
|
4
|
+
import { Button } from '../../../components/ui/button';
|
|
5
|
+
import { ImageWithFallback } from '../../../components/ui/image-with-fallback';
|
|
6
|
+
import { useStore } from '../../../lib/store-context';
|
|
6
7
|
import { ArrowLeft, Filter } from 'lucide-react';
|
|
7
8
|
import Link from 'next/link';
|
|
8
|
-
import { useToast } from '../../../components/ui/toast
|
|
9
|
-
import { useAnalytics } from '../../../hooks/use-analytics
|
|
9
|
+
import { useToast } from '../../../components/ui/toast';
|
|
10
|
+
import { useAnalytics } from '../../../hooks/use-analytics';
|
|
10
11
|
import { useEffect } from 'react';
|
|
11
|
-
import { ProductCard } from '../../../components/ui/product-card
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
-
const storeConfig = store || initialConfig;
|
|
18
|
-
const isPreview = isEditorPreviewMode(storeConfig);
|
|
19
|
-
const { categories: loadedCategories, products: loadedProducts } = useCatalogLoader(storeConfig, {
|
|
20
|
-
fetchServices: false,
|
|
21
|
-
});
|
|
22
|
-
const category = resolveCategoryBySlugForDisplay(loadedCategories, categorySlug, isPreview);
|
|
23
|
-
const products = resolveCategoryProductsForDisplay(loadedProducts, category?.id, isPreview);
|
|
12
|
+
import { ProductCard } from '../../../components/ui/product-card';
|
|
13
|
+
export function CategoryPage({ storeConfig, categorySlug }) {
|
|
14
|
+
const categories = storeConfig.categories || [];
|
|
15
|
+
const category = categories.find(c => c.slug === categorySlug);
|
|
16
|
+
const { products, isLoading, hasMore, loadMore } = useCategoryProducts(storeConfig.id, category?.id);
|
|
17
|
+
const { addToCart } = useStore();
|
|
24
18
|
const { addToast } = useToast();
|
|
25
19
|
const { trackEvent } = useAnalytics();
|
|
26
20
|
// Track category view
|
|
@@ -51,5 +45,5 @@ export function ElectronicsCategoryPage({ storeConfig: initialConfig, categorySl
|
|
|
51
45
|
const isDarkTheme = storeConfig.type === 'food-modern' || storeConfig.branding.theme === 'dark';
|
|
52
46
|
const bgColor = isDarkTheme ? 'bg-[#0F0F0F]' : 'bg-gray-50';
|
|
53
47
|
const textColor = isDarkTheme ? 'text-white' : 'text-gray-900';
|
|
54
|
-
return (_jsxs("div", { className: "min-h-screen bg-gray-50 text-gray-900 transition-colors duration-300", children: [_jsxs("div", { className: "relative h-[40vh] overflow-hidden", children: [_jsx(ImageWithFallback, { src: category.image, alt: category.name, className: "w-full h-full object-cover", skeletonAspectRatio: "16/9" }), _jsx("div", { className: "absolute inset-0 bg-black/40 backdrop-blur-[2px]" }), _jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center p-6 text-white", children: [_jsx("h1", { className: "text-5xl md:text-7xl font-bold tracking-tight mb-4", children: category.name }), _jsx(
|
|
48
|
+
return (_jsxs("div", { className: "min-h-screen bg-gray-50 text-gray-900 transition-colors duration-300", children: [_jsxs("div", { className: "relative h-[40vh] overflow-hidden", children: [_jsx(ImageWithFallback, { src: category.image, alt: category.name, className: "w-full h-full object-cover", skeletonAspectRatio: "16/9" }), _jsx("div", { className: "absolute inset-0 bg-black/40 backdrop-blur-[2px]" }), _jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center p-6 text-white", children: [_jsx("h1", { className: "text-5xl md:text-7xl font-bold tracking-tight mb-4", children: category.name }), category.description && (_jsx("p", { className: "text-lg md:text-xl max-w-2xl opacity-90 font-light", children: category.description }))] })] }), _jsxs("div", { className: "container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-12", children: [_jsxs("div", { className: "flex flex-col md:flex-row justify-between items-center mb-10 gap-4", children: [_jsxs(Link, { href: `/${storeConfig.slug}/categories`, className: "inline-flex items-center text-sm font-medium text-gray-600 hover:text-gray-900", children: [_jsx(ArrowLeft, { className: "h-4 w-4 mr-2" }), "Back to All Categories"] }), _jsx("div", { className: "flex items-center gap-4", children: _jsxs(Button, { variant: "outline", className: "bg-white", children: [_jsx(Filter, { className: "h-4 w-4 mr-2" }), " Filter"] }) })] }), !hasItems ? (_jsxs("div", { className: "text-center py-20 border border-dashed border-gray-300 rounded-3xl", children: [_jsx("p", { className: "text-gray-500 text-lg", children: "No products found in this category." }), _jsx(Button, { className: "mt-4", onClick: () => window.history.back(), children: "Go Back" })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8", children: products.map((product) => (_jsx(ProductCard, { product: product, storeSlug: storeConfig.slug, onAddToCart: handleAddToCart, onQuickView: handleQuickView }, product.id))) }), hasMore && (_jsx("div", { className: "mt-10 flex justify-center", children: _jsx(Button, { onClick: loadMore, disabled: isLoading, children: "Load more" }) }))] }))] })] }));
|
|
55
49
|
}
|
|
@@ -2,6 +2,6 @@ import { StoreConfig } from '../../../lib/store-types';
|
|
|
2
2
|
interface ContactPageProps {
|
|
3
3
|
storeConfig: StoreConfig;
|
|
4
4
|
}
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function ContactPage({ storeConfig: initialConfig }: ContactPageProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=ContactPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/pages/ContactPage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContactPage.d.ts","sourceRoot":"","sources":["../../../../src/layouts/electronics/pages/ContactPage.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,UAAU,gBAAgB;IACtB,WAAW,EAAE,WAAW,CAAC;CAC5B;AAED,wBAAgB,WAAW,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,gBAAgB,2CA0S3E"}
|