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
|
@@ -130,6 +130,9 @@ export interface CheckoutResponse {
|
|
|
130
130
|
inventoryHoldUntil?: string | null;
|
|
131
131
|
checkoutGroupId?: string;
|
|
132
132
|
isMultiStore?: boolean;
|
|
133
|
+
/** True when the order total is zero — skip Payaza and complete immediately. */
|
|
134
|
+
paymentNotRequired?: boolean;
|
|
135
|
+
paymentStatus?: string;
|
|
133
136
|
orders?: Array<{
|
|
134
137
|
orderId: string;
|
|
135
138
|
orderNumber: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/checkout.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3E,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QAER,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,M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AC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;CACJ;AAED,eAAO,MAAM,eAAe;IAC1B;;OAEG;0BAEK,eAAe,YACX;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GACpC,OAAO,CAAC,gBAAgB,CAAC;qCAepB,0BAA0B,YACtB;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GACpC,OAAO,CAAC,gBAAgB,CAAC;IAc5B;;OAEG;4BAC2B,MAAM,iBAAiB,MAAM,wBAAwB,MAAM,UAAU,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYzH;;OAEG;wBACuB,MAAM,GAAG,OAAO,CAAC;QACzC,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,OAAO,EAAE,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CAiBH,CAAC"}
|
|
1
|
+
{"version":3,"file":"checkout.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/checkout.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3E,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO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AAC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;CACJ;AAED,eAAO,MAAM,eAAe;IAC1B;;OAEG;0BAEK,eAAe,YACX;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GACpC,OAAO,CAAC,gBAAgB,CAAC;qCAepB,0BAA0B,YACtB;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GACpC,OAAO,CAAC,gBAAgB,CAAC;IAc5B;;OAEG;4BAC2B,MAAM,iBAAiB,MAAM,wBAAwB,MAAM,UAAU,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYzH;;OAEG;wBACuB,MAAM,GAAG,OAAO,CAAC;QACzC,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,OAAO,EAAE,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CAiBH,CAAC"}
|
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
export type FeeSource = 'merchant' | 'platform';
|
|
2
|
-
export interface CheckoutFeeLine {
|
|
3
|
-
key: string;
|
|
4
|
-
label: string;
|
|
5
|
-
amount: number;
|
|
6
|
-
source?: FeeSource;
|
|
7
|
-
type?: string;
|
|
8
|
-
chargeId?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface PlatformCharge {
|
|
11
|
-
chargeId: string;
|
|
12
|
-
label: string;
|
|
13
|
-
type: string;
|
|
14
|
-
amount: number;
|
|
15
|
-
rate?: number;
|
|
16
|
-
}
|
|
17
|
-
export interface MerchantFeesSection {
|
|
18
|
-
configuredBy: 'store_fee_settings';
|
|
19
|
-
tax: number;
|
|
20
|
-
serviceCharge: number;
|
|
21
|
-
total: number;
|
|
22
|
-
lines: CheckoutFeeLine[];
|
|
23
|
-
}
|
|
24
|
-
export interface PlatformFeesSection {
|
|
25
|
-
configuredBy: 'backoffice';
|
|
26
|
-
collectionFeePayer: 'customer' | 'merchant';
|
|
27
|
-
charges: PlatformCharge[];
|
|
28
|
-
total: number;
|
|
29
|
-
customerTotal: number;
|
|
30
|
-
lines: CheckoutFeeLine[];
|
|
31
|
-
}
|
|
32
|
-
export interface CheckoutFeeBreakdown {
|
|
33
|
-
subtotal: number;
|
|
34
|
-
shipping: number;
|
|
35
|
-
merchant: MerchantFeesSection;
|
|
36
|
-
platform: PlatformFeesSection;
|
|
37
|
-
customerLines: CheckoutFeeLine[];
|
|
38
|
-
totalPayable: number;
|
|
39
|
-
}
|
|
40
1
|
export interface FeeCalculationRequest {
|
|
41
2
|
storeId: string;
|
|
42
3
|
subtotal: number;
|
|
@@ -44,8 +5,22 @@ export interface FeeCalculationRequest {
|
|
|
44
5
|
orderType?: 'product' | 'service' | 'mixed';
|
|
45
6
|
shippingCost?: number;
|
|
46
7
|
}
|
|
8
|
+
export interface CheckoutFeeLine {
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
amount: number;
|
|
12
|
+
source: 'merchant' | 'platform';
|
|
13
|
+
type?: string;
|
|
14
|
+
chargeId?: string;
|
|
15
|
+
}
|
|
47
16
|
export interface FeeCalculationResponse {
|
|
48
|
-
feeBreakdown
|
|
17
|
+
feeBreakdown: {
|
|
18
|
+
subtotal: number;
|
|
19
|
+
shipping: number;
|
|
20
|
+
customerLines: CheckoutFeeLine[];
|
|
21
|
+
totalPayable: number;
|
|
22
|
+
};
|
|
23
|
+
/** Legacy response fields retained for callers that still use them. */
|
|
49
24
|
charges?: Array<{
|
|
50
25
|
label: string;
|
|
51
26
|
type: string;
|
|
@@ -54,32 +29,11 @@ export interface FeeCalculationResponse {
|
|
|
54
29
|
chargeId: string;
|
|
55
30
|
}>;
|
|
56
31
|
totalCharges?: number;
|
|
57
|
-
actualPlatformFee?: number;
|
|
58
|
-
collectionFeePayer?: 'customer' | 'merchant';
|
|
59
|
-
shopazaCharges?: FeeCalculationResponse['charges'];
|
|
60
|
-
merchantServiceCharge?: number;
|
|
61
|
-
tax?: number;
|
|
62
|
-
totalCollectibleFees?: number;
|
|
63
|
-
}
|
|
64
|
-
export declare const EMPTY_CHECKOUT_FEE_BREAKDOWN: CheckoutFeeBreakdown;
|
|
65
|
-
export declare function normalizeCheckoutFeeBreakdown(result: FeeCalculationResponse, fallbackSubtotal?: number, fallbackShipping?: number): CheckoutFeeBreakdown;
|
|
66
|
-
export interface BatchFeeCalculationStoreRequest {
|
|
67
|
-
storeId: string;
|
|
68
|
-
subtotal: number;
|
|
69
|
-
orderType?: 'product' | 'service' | 'mixed';
|
|
70
|
-
shippingCost?: number;
|
|
71
|
-
}
|
|
72
|
-
export interface BatchFeeCalculationResult {
|
|
73
|
-
storeId: string;
|
|
74
|
-
feeBreakdown?: CheckoutFeeBreakdown;
|
|
75
|
-
error?: string;
|
|
76
32
|
}
|
|
77
33
|
export declare const feesService: {
|
|
78
|
-
calculateFees(data: FeeCalculationRequest): Promise<FeeCalculationResponse>;
|
|
79
34
|
/**
|
|
80
|
-
*
|
|
81
|
-
* breakdown per store, instead of firing one /calculate call per store from the client.
|
|
35
|
+
* Calculate fees for an order
|
|
82
36
|
*/
|
|
83
|
-
|
|
37
|
+
calculateFees(data: FeeCalculationRequest): Promise<FeeCalculationResponse>;
|
|
84
38
|
};
|
|
85
39
|
//# sourceMappingURL=fees.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fees.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/fees.service.ts"],"names":[],"mappings":"AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"fees.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/fees.service.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,eAAe,EAAE,CAAC;QACjC,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,uEAAuE;IACvE,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,WAAW;IACtB;;OAEG;wBACuB,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAUlF,CAAC"}
|
|
@@ -1,131 +1,8 @@
|
|
|
1
|
-
import { api } from '../api
|
|
2
|
-
const emptyMerchantSection = () => ({
|
|
3
|
-
configuredBy: 'store_fee_settings',
|
|
4
|
-
tax: 0,
|
|
5
|
-
serviceCharge: 0,
|
|
6
|
-
total: 0,
|
|
7
|
-
lines: [],
|
|
8
|
-
});
|
|
9
|
-
const emptyPlatformSection = () => ({
|
|
10
|
-
configuredBy: 'backoffice',
|
|
11
|
-
collectionFeePayer: 'customer',
|
|
12
|
-
charges: [],
|
|
13
|
-
total: 0,
|
|
14
|
-
customerTotal: 0,
|
|
15
|
-
lines: [],
|
|
16
|
-
});
|
|
17
|
-
export const EMPTY_CHECKOUT_FEE_BREAKDOWN = {
|
|
18
|
-
subtotal: 0,
|
|
19
|
-
shipping: 0,
|
|
20
|
-
merchant: emptyMerchantSection(),
|
|
21
|
-
platform: emptyPlatformSection(),
|
|
22
|
-
customerLines: [],
|
|
23
|
-
totalPayable: 0,
|
|
24
|
-
};
|
|
25
|
-
function isConsolidatedBreakdown(value) {
|
|
26
|
-
if (!value || typeof value !== 'object')
|
|
27
|
-
return false;
|
|
28
|
-
const record = value;
|
|
29
|
-
return (typeof record.merchant === 'object' &&
|
|
30
|
-
record.merchant !== null &&
|
|
31
|
-
typeof record.platform === 'object' &&
|
|
32
|
-
record.platform !== null);
|
|
33
|
-
}
|
|
34
|
-
function normalizeLegacyBreakdown(legacy, fallbackSubtotal, fallbackShipping) {
|
|
35
|
-
const subtotal = Number(legacy.subtotal) || fallbackSubtotal;
|
|
36
|
-
const shipping = Number(legacy.shipping) || fallbackShipping;
|
|
37
|
-
const tax = Number(legacy.tax) || 0;
|
|
38
|
-
const serviceCharge = Number(legacy.merchantServiceCharge) || 0;
|
|
39
|
-
const collectionFeePayer = legacy.collectionFeePayer === 'merchant' ? 'merchant' : 'customer';
|
|
40
|
-
const shopazaCharges = (legacy.shopazaCharges ??
|
|
41
|
-
legacy.charges ??
|
|
42
|
-
[])
|
|
43
|
-
.map((charge) => ({
|
|
44
|
-
chargeId: charge.chargeId || charge.label,
|
|
45
|
-
label: charge.label,
|
|
46
|
-
type: charge.type || 'FIXED',
|
|
47
|
-
amount: Number(charge.amount) || 0,
|
|
48
|
-
rate: charge.rate,
|
|
49
|
-
}))
|
|
50
|
-
.filter((charge) => charge.amount > 0);
|
|
51
|
-
const platformTotal = Number(legacy.actualPlatformFee) ||
|
|
52
|
-
shopazaCharges.reduce((sum, charge) => sum + charge.amount, 0);
|
|
53
|
-
const customerTotal = Number(legacy.customerPlatformFee) ||
|
|
54
|
-
Number(legacy.totalCharges) ||
|
|
55
|
-
(collectionFeePayer === 'customer' ? platformTotal : 0);
|
|
56
|
-
const merchantLines = [];
|
|
57
|
-
if (tax > 0)
|
|
58
|
-
merchantLines.push({ key: 'vat', label: 'VAT', amount: tax, source: 'merchant' });
|
|
59
|
-
if (serviceCharge > 0) {
|
|
60
|
-
merchantLines.push({
|
|
61
|
-
key: 'service_charge',
|
|
62
|
-
label: 'Service charge',
|
|
63
|
-
amount: serviceCharge,
|
|
64
|
-
source: 'merchant',
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
const merchant = {
|
|
68
|
-
configuredBy: 'store_fee_settings',
|
|
69
|
-
tax,
|
|
70
|
-
serviceCharge,
|
|
71
|
-
total: tax + serviceCharge,
|
|
72
|
-
lines: merchantLines,
|
|
73
|
-
};
|
|
74
|
-
const platform = {
|
|
75
|
-
configuredBy: 'backoffice',
|
|
76
|
-
collectionFeePayer,
|
|
77
|
-
charges: shopazaCharges,
|
|
78
|
-
total: platformTotal,
|
|
79
|
-
customerTotal,
|
|
80
|
-
lines: collectionFeePayer === 'customer'
|
|
81
|
-
? shopazaCharges.map((charge) => ({
|
|
82
|
-
key: `platform:${charge.chargeId}`,
|
|
83
|
-
label: charge.label || 'Collection fee',
|
|
84
|
-
amount: charge.amount,
|
|
85
|
-
source: 'platform',
|
|
86
|
-
type: charge.type,
|
|
87
|
-
chargeId: charge.chargeId,
|
|
88
|
-
}))
|
|
89
|
-
: [],
|
|
90
|
-
};
|
|
91
|
-
const customerLines = legacy.customerLines ??
|
|
92
|
-
legacy.lines ??
|
|
93
|
-
[
|
|
94
|
-
...merchant.lines,
|
|
95
|
-
...(shipping > 0
|
|
96
|
-
? [{ key: 'shipping', label: 'Shipping', amount: shipping, source: 'merchant' }]
|
|
97
|
-
: []),
|
|
98
|
-
...platform.lines,
|
|
99
|
-
];
|
|
100
|
-
return {
|
|
101
|
-
subtotal,
|
|
102
|
-
shipping,
|
|
103
|
-
merchant,
|
|
104
|
-
platform,
|
|
105
|
-
customerLines,
|
|
106
|
-
totalPayable: Number(legacy.totalPayable) ||
|
|
107
|
-
subtotal + merchant.total + shipping + platform.customerTotal,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
export function normalizeCheckoutFeeBreakdown(result, fallbackSubtotal = 0, fallbackShipping = 0) {
|
|
111
|
-
if (result.feeBreakdown) {
|
|
112
|
-
if (isConsolidatedBreakdown(result.feeBreakdown)) {
|
|
113
|
-
return result.feeBreakdown;
|
|
114
|
-
}
|
|
115
|
-
return normalizeLegacyBreakdown(result.feeBreakdown, fallbackSubtotal, fallbackShipping);
|
|
116
|
-
}
|
|
117
|
-
return normalizeLegacyBreakdown({
|
|
118
|
-
subtotal: fallbackSubtotal,
|
|
119
|
-
shipping: fallbackShipping,
|
|
120
|
-
tax: result.tax,
|
|
121
|
-
merchantServiceCharge: result.merchantServiceCharge,
|
|
122
|
-
collectionFeePayer: result.collectionFeePayer,
|
|
123
|
-
shopazaCharges: result.charges ?? result.shopazaCharges,
|
|
124
|
-
customerPlatformFee: result.totalCharges,
|
|
125
|
-
actualPlatformFee: result.actualPlatformFee,
|
|
126
|
-
}, fallbackSubtotal, fallbackShipping);
|
|
127
|
-
}
|
|
1
|
+
import { api } from '../api';
|
|
128
2
|
export const feesService = {
|
|
3
|
+
/**
|
|
4
|
+
* Calculate fees for an order
|
|
5
|
+
*/
|
|
129
6
|
async calculateFees(data) {
|
|
130
7
|
const response = await api.post('/fees/calculate', data);
|
|
131
8
|
if (response.data.status === 'success') {
|
|
@@ -133,15 +10,4 @@ export const feesService = {
|
|
|
133
10
|
}
|
|
134
11
|
throw new Error(response.data.message || 'Failed to calculate fees');
|
|
135
12
|
},
|
|
136
|
-
/**
|
|
137
|
-
* Fee preview for a cart spanning multiple stores — one HTTP round trip that returns a
|
|
138
|
-
* breakdown per store, instead of firing one /calculate call per store from the client.
|
|
139
|
-
*/
|
|
140
|
-
async calculateFeesBatch(stores, currency) {
|
|
141
|
-
const response = await api.post('/fees/calculate-batch', { stores, currency });
|
|
142
|
-
if (response.data.status === 'success') {
|
|
143
|
-
return response.data.data.results;
|
|
144
|
-
}
|
|
145
|
-
throw new Error(response.data.message || 'Failed to calculate fees');
|
|
146
|
-
},
|
|
147
13
|
};
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Note: cart, wishlist, and order services removed - they're not needed for editor preview
|
|
4
4
|
* These services are only used in shared pages (cart, wishlist, account, orders) which aren't editable
|
|
5
5
|
*/
|
|
6
|
-
export * from './store.service
|
|
7
|
-
export * from './product.service
|
|
8
|
-
export * from './category.service
|
|
9
|
-
export * from './auth.service
|
|
10
|
-
export * from './checkout.service
|
|
11
|
-
export * from './service.service
|
|
12
|
-
export * from './booking.service
|
|
13
|
-
export * from './customer.service
|
|
14
|
-
export * from './review.service
|
|
15
|
-
export * from './promo.service
|
|
16
|
-
export * from './shipping.service
|
|
17
|
-
export * from './fees.service
|
|
18
|
-
export * from './location.service
|
|
6
|
+
export * from './store.service';
|
|
7
|
+
export * from './product.service';
|
|
8
|
+
export * from './category.service';
|
|
9
|
+
export * from './auth.service';
|
|
10
|
+
export * from './checkout.service';
|
|
11
|
+
export * from './service.service';
|
|
12
|
+
export * from './booking.service';
|
|
13
|
+
export * from './customer.service';
|
|
14
|
+
export * from './review.service';
|
|
15
|
+
export * from './promo.service';
|
|
16
|
+
export * from './shipping.service';
|
|
17
|
+
export * from './fees.service';
|
|
18
|
+
export * from './location.service';
|
|
@@ -5,8 +5,6 @@ export interface Product {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
price: number;
|
|
7
7
|
compareAtPrice?: number;
|
|
8
|
-
isLimitedTimeOffer?: boolean;
|
|
9
|
-
limitedTimeOfferEndsAt?: string | null;
|
|
10
8
|
images: Array<{
|
|
11
9
|
url: string;
|
|
12
10
|
isPrimary?: boolean;
|
|
@@ -18,6 +16,7 @@ export interface Product {
|
|
|
18
16
|
currency: string;
|
|
19
17
|
storeId: string;
|
|
20
18
|
categoryId?: string;
|
|
19
|
+
categoryIds?: string;
|
|
21
20
|
subcategoryId?: string;
|
|
22
21
|
subcategory?: any;
|
|
23
22
|
locationId?: string;
|
|
@@ -27,6 +26,7 @@ export interface Product {
|
|
|
27
26
|
stock?: number;
|
|
28
27
|
rating?: number;
|
|
29
28
|
brand?: string;
|
|
29
|
+
brands?: string;
|
|
30
30
|
trackInventory?: boolean;
|
|
31
31
|
lowStockThreshold?: number;
|
|
32
32
|
variations?: any[];
|
|
@@ -37,6 +37,7 @@ export interface Product {
|
|
|
37
37
|
export interface ProductListParams {
|
|
38
38
|
storeId: string;
|
|
39
39
|
categoryId?: string;
|
|
40
|
+
categoryIds?: string;
|
|
40
41
|
locationId?: string;
|
|
41
42
|
productType?: string;
|
|
42
43
|
checkoutType?: string;
|
|
@@ -88,5 +89,9 @@ export declare const productService: {
|
|
|
88
89
|
* Get featured products
|
|
89
90
|
*/
|
|
90
91
|
getFeaturedProducts(storeId: string, limit?: number): Promise<Product[]>;
|
|
92
|
+
/**
|
|
93
|
+
* Distinct brands for filter sidebars (full catalog, not just loaded page).
|
|
94
|
+
*/
|
|
95
|
+
getProductBrands(storeId: string): Promise<string[]>;
|
|
91
96
|
};
|
|
92
97
|
//# sourceMappingURL=product.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/product.service.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,
|
|
1
|
+
{"version":3,"file":"product.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/product.service.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,MAAM,EAAE,CAAC;IAC/D,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IACzC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;IACrD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAA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,MAAM,cAAc;IACzB;;OAEG;wBACuB,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAwBjF;;OAEG;uBACsB,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQlD;;OAEG;2BAC0B,MAAM,WAAW,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,eAAe,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;IAWhH;;OAEG;kCACiC,MAAM,UAAS,MAAM,GAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAUlF;;OAEG;iCACgC,MAAM,UAAS,MAAM,GAAQ,OAAO,CAAC,OAAO,EAAE,CAAC;IAUlF;;OAEG;iCACgC,MAAM,UAAS,MAAM,GAAQ,OAAO,CAAC,OAAO,EAAE,CAAC;IAUlF;;OAEG;8BAC6B,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAS3D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { api } from '../api
|
|
1
|
+
import { api } from '../api';
|
|
2
2
|
export const productService = {
|
|
3
3
|
/**
|
|
4
4
|
* Get products with filtering, sorting, and pagination
|
|
@@ -83,4 +83,16 @@ export const productService = {
|
|
|
83
83
|
}
|
|
84
84
|
throw new Error(response.data.message || 'Failed to fetch featured products');
|
|
85
85
|
},
|
|
86
|
+
/**
|
|
87
|
+
* Distinct brands for filter sidebars (full catalog, not just loaded page).
|
|
88
|
+
*/
|
|
89
|
+
async getProductBrands(storeId) {
|
|
90
|
+
const response = await api.get('/products/brands', {
|
|
91
|
+
params: { storeId },
|
|
92
|
+
});
|
|
93
|
+
if (response.data.status === 'success') {
|
|
94
|
+
return response.data.data || [];
|
|
95
|
+
}
|
|
96
|
+
throw new Error(response.data.message || 'Failed to fetch product brands');
|
|
97
|
+
},
|
|
86
98
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type StoreResponse } from './services/store.service';
|
|
2
1
|
import { type Category } from './services/category.service';
|
|
3
2
|
import { type Product } from './services/product.service';
|
|
4
3
|
import { type Service } from './services/service.service';
|
|
@@ -19,19 +18,11 @@ export declare function transformCategoryToStoreCategory(apiCategory: Category):
|
|
|
19
18
|
* Transforms API Product to StoreProduct format
|
|
20
19
|
* Calculates inStock based on trackInventory and inventory data
|
|
21
20
|
*/
|
|
22
|
-
export
|
|
23
|
-
/** When mapping cart line items, preserves cart-aware availableStock from the API. */
|
|
24
|
-
cartLineQty?: number;
|
|
25
|
-
}
|
|
26
|
-
export declare function transformProductToStoreProduct(apiProduct: Product, options?: TransformProductOptions): StoreProduct;
|
|
21
|
+
export declare function transformProductToStoreProduct(apiProduct: Product): StoreProduct;
|
|
27
22
|
/**
|
|
28
23
|
* Transforms API Service to StoreService format
|
|
29
24
|
*/
|
|
30
25
|
export declare function transformServiceToStoreService(apiService: Service): StoreService;
|
|
31
|
-
/**
|
|
32
|
-
* Transforms API StoreResponse to StoreConfig format
|
|
33
|
-
*/
|
|
34
|
-
export declare function transformStoreResponseToConfig(apiStore: StoreResponse): StoreConfig;
|
|
35
26
|
/**
|
|
36
27
|
* Result type for getStoreConfigAsync
|
|
37
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-config-utils.d.ts","sourceRoot":"","sources":["../../src/lib/store-config-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store-config-utils.d.ts","sourceRoot":"","sources":["../../src/lib/store-config-utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAmB,aAAa,EAAE,YAAY,EAAE,YAAY,EAAqB,MAAM,eAAe,CAAC;AAYhI;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,EAAE,CAgGrD;AAgVD;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,WAAW,EAAE,QAAQ,GAAG,aAAa,CAarF;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,OAAO,GAAG,YAAY,CA0IhF;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,OAAO,GAAG,YAAY,CA6DhF;AA00BD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAyHvF"}
|