flowrix 1.0.1-beta.85 → 1.0.1-beta.87
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/module.d.mts +3 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +336 -0
- package/dist/runtime/composables/Blog/useBlogIndex.d.ts +108 -0
- package/dist/runtime/composables/Blog/useBlogIndex.js +86 -0
- package/dist/runtime/composables/Blog/useBlogMain.d.ts +13 -0
- package/dist/runtime/composables/Blog/useBlogMain.js +7 -0
- package/dist/runtime/composables/Blog/useBlogSidebar.d.ts +7 -0
- package/dist/runtime/composables/Blog/useBlogSidebar.js +37 -0
- package/dist/runtime/composables/Blog/useBlogSingle.d.ts +30 -0
- package/dist/runtime/composables/Blog/useBlogSingle.js +87 -0
- package/dist/runtime/composables/Blog/useMagazineCard.d.ts +13 -0
- package/dist/runtime/composables/Blog/useMagazineCard.js +14 -0
- package/dist/runtime/composables/Blog/useSingleBlogMain.d.ts +20 -0
- package/dist/runtime/composables/Blog/useSingleBlogMain.js +28 -0
- package/dist/runtime/composables/Brand/brand.d.ts +7 -0
- package/dist/runtime/composables/Brand/brand.js +47 -0
- package/dist/runtime/composables/Cart/useCart.d.ts +40 -0
- package/dist/runtime/composables/Cart/useCart.js +10 -0
- package/dist/runtime/composables/Cart/useCartDetail.d.ts +59 -0
- package/dist/runtime/composables/Cart/useCartDetail.js +51 -0
- package/dist/runtime/composables/Category/useCategoryContent.d.ts +9 -0
- package/dist/runtime/composables/Category/useCategoryContent.js +15 -0
- package/dist/runtime/composables/Category/useCategoryGrid.d.ts +40 -0
- package/dist/runtime/composables/Category/useCategoryGrid.js +38 -0
- package/dist/runtime/composables/Category/useCategoryIndex.d.ts +33 -0
- package/dist/runtime/composables/Category/useCategoryIndex.js +65 -0
- package/dist/runtime/composables/Category/useCategoryTop.d.ts +18 -0
- package/dist/runtime/composables/Category/useCategoryTop.js +65 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.d.ts +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.js +22 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.d.ts +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.js +88 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +52 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +155 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +48 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +90 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.d.ts +15 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +135 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.d.ts +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.js +22 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +7 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.js +43 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.d.ts +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.js +22 -0
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +197 -0
- package/dist/runtime/composables/Checkout/useCheckout.js +374 -0
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +43 -0
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.js +84 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +55 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.js +196 -0
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +15 -0
- package/dist/runtime/composables/Checkout/useCreateAccount.js +63 -0
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +4 -0
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +37 -0
- package/dist/runtime/composables/Customer/useBillingAddress.d.ts +112 -0
- package/dist/runtime/composables/Customer/useBillingAddress.js +93 -0
- package/dist/runtime/composables/Customer/useLogin.d.ts +9 -0
- package/dist/runtime/composables/Customer/useLogin.js +34 -0
- package/dist/runtime/composables/Customer/useOrders.d.ts +29 -0
- package/dist/runtime/composables/Customer/useOrders.js +56 -0
- package/dist/runtime/composables/Customer/usePasswordReset.d.ts +26 -0
- package/dist/runtime/composables/Customer/usePasswordReset.js +258 -0
- package/dist/runtime/composables/Customer/useProfile.d.ts +75 -0
- package/dist/runtime/composables/Customer/useProfile.js +106 -0
- package/dist/runtime/composables/Customer/useQuotations.d.ts +32 -0
- package/dist/runtime/composables/Customer/useQuotations.js +40 -0
- package/dist/runtime/composables/Customer/useRegister.d.ts +127 -0
- package/dist/runtime/composables/Customer/useRegister.js +325 -0
- package/dist/runtime/composables/Customer/useShippingAddress.d.ts +121 -0
- package/dist/runtime/composables/Customer/useShippingAddress.js +145 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +21 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.js +94 -0
- package/dist/runtime/composables/Customer/useUserCards.d.ts +22 -0
- package/dist/runtime/composables/Customer/useUserCards.js +65 -0
- package/dist/runtime/composables/Customer/useWishlists.d.ts +25 -0
- package/dist/runtime/composables/Customer/useWishlists.js +183 -0
- package/dist/runtime/composables/Extras/useCountry.d.ts +11 -0
- package/dist/runtime/composables/Extras/useCountry.js +12 -0
- package/dist/runtime/composables/Extras/useDateFormatter.d.ts +4 -0
- package/dist/runtime/composables/Extras/useDateFormatter.js +20 -0
- package/dist/runtime/composables/Extras/useNumberOnly.d.ts +5 -0
- package/dist/runtime/composables/Extras/useNumberOnly.js +21 -0
- package/dist/runtime/composables/Extras/usePasswordFormatter.d.ts +8 -0
- package/dist/runtime/composables/Extras/usePasswordFormatter.js +61 -0
- package/dist/runtime/composables/Extras/useSrcSets.d.ts +8 -0
- package/dist/runtime/composables/Extras/useSrcSets.js +26 -0
- package/dist/runtime/composables/Extras/useTogglePassword.d.ts +4 -0
- package/dist/runtime/composables/Extras/useTogglePassword.js +11 -0
- package/dist/runtime/composables/Footer/useFooter.d.ts +14 -0
- package/dist/runtime/composables/Footer/useFooter.js +61 -0
- package/dist/runtime/composables/Header/useHeader.d.ts +14 -0
- package/dist/runtime/composables/Header/useHeader.js +67 -0
- package/dist/runtime/composables/Menu/MainMenu.d.ts +4 -0
- package/dist/runtime/composables/Menu/MainMenu.js +17 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributeType.d.ts +3 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributeType.js +20 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributes.d.ts +70 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributes.js +68 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomProduct.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomProduct.js +107 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.d.ts +159 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.js +2080 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleAttribute.d.ts +4 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleAttribute.js +27 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleStep.d.ts +68 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleStep.js +21 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleValue.d.ts +67 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleValue.js +15 -0
- package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProduct/useSteps.js +78 -0
- package/dist/runtime/composables/Product/simpleProduct/useSimpleProduct.d.ts +25 -0
- package/dist/runtime/composables/Product/simpleProduct/useSimpleProduct.js +77 -0
- package/dist/runtime/composables/Product/useProductCard.d.ts +13 -0
- package/dist/runtime/composables/Product/useProductCard.js +88 -0
- package/dist/runtime/composables/Product/useProductComponent.d.ts +5 -0
- package/dist/runtime/composables/Product/useProductComponent.js +23 -0
- package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -0
- package/dist/runtime/composables/Product/useProductSlug.js +25 -0
- package/dist/runtime/composables/Product/useQuickView.d.ts +8 -0
- package/dist/runtime/composables/Product/useQuickView.js +27 -0
- package/dist/runtime/composables/Product/useService.d.ts +17 -0
- package/dist/runtime/composables/Product/useService.js +64 -0
- package/dist/runtime/composables/Product/useTemplate.d.ts +5 -0
- package/dist/runtime/composables/Product/useTemplate.js +21 -0
- package/dist/runtime/composables/Samples/useSamples.d.ts +10 -0
- package/dist/runtime/composables/Samples/useSamples.js +36 -0
- package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +6 -0
- package/dist/runtime/composables/SideBar/Filters/useFilters.js +51 -0
- package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +5 -0
- package/dist/runtime/composables/SideBar/Filters/useSorting.js +27 -0
- package/dist/runtime/composables/SideBar/useSideBar.d.ts +8 -0
- package/dist/runtime/composables/SideBar/useSideBar.js +68 -0
- package/dist/runtime/composables/index.d.ts +78 -0
- package/dist/runtime/composables/index.js +78 -0
- package/dist/runtime/composables/types.d.ts +5 -0
- package/dist/runtime/composables/types.js +0 -0
- package/dist/runtime/composables/useAddToCart.d.ts +28 -0
- package/dist/runtime/composables/useAddToCart.js +111 -0
- package/dist/runtime/composables/useAddresses.d.ts +18 -0
- package/dist/runtime/composables/useAddresses.js +126 -0
- package/dist/runtime/composables/useCards.d.ts +19 -0
- package/dist/runtime/composables/useCards.js +73 -0
- package/dist/runtime/composables/useClientApi.d.ts +23 -0
- package/dist/runtime/composables/useClientApi.js +53 -0
- package/dist/runtime/composables/useDataLayer.d.ts +18 -0
- package/dist/runtime/composables/useDataLayer.js +386 -0
- package/dist/runtime/composables/useDynamicHtmlRenderer.d.ts +4 -0
- package/dist/runtime/composables/useDynamicHtmlRenderer.js +33 -0
- package/dist/runtime/composables/useLocation.d.ts +13 -0
- package/dist/runtime/composables/useLocation.js +32 -0
- package/dist/runtime/composables/useLocations.d.ts +12 -0
- package/dist/runtime/composables/useLocations.js +53 -0
- package/dist/runtime/composables/useMetaLayer.d.ts +10 -0
- package/dist/runtime/composables/useMetaLayer.js +263 -0
- package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
- package/dist/runtime/composables/useQuotationCheckout.js +138 -0
- package/dist/runtime/composables/useSearch.d.ts +7 -0
- package/dist/runtime/composables/useSearch.js +40 -0
- package/dist/runtime/composables/useSubscriptions.d.ts +13 -0
- package/dist/runtime/composables/useSubscriptions.js +58 -0
- package/dist/runtime/composables/useTikTokDatalayer.d.ts +8 -0
- package/dist/runtime/composables/useTikTokDatalayer.js +165 -0
- package/dist/runtime/composables/useWebforms.d.ts +16 -0
- package/dist/runtime/composables/useWebforms.js +75 -0
- package/dist/runtime/middleware/flowrix.d.ts +7 -0
- package/dist/runtime/middleware/flowrix.js +60 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +5 -0
- package/dist/runtime/plugins/persistedstate.client.d.ts +2 -0
- package/dist/runtime/plugins/persistedstate.client.js +9 -0
- package/dist/runtime/server/api/albums.d.ts +2 -0
- package/dist/runtime/server/api/albums.js +18 -0
- package/dist/runtime/server/api/auth/forgot.d.ts +5 -0
- package/dist/runtime/server/api/auth/forgot.js +44 -0
- package/dist/runtime/server/api/auth/login.d.ts +11 -0
- package/dist/runtime/server/api/auth/login.js +68 -0
- package/dist/runtime/server/api/auth/logout.d.ts +5 -0
- package/dist/runtime/server/api/auth/logout.js +23 -0
- package/dist/runtime/server/api/auth/register.d.ts +2 -0
- package/dist/runtime/server/api/auth/register.js +51 -0
- package/dist/runtime/server/api/auth/session.get.d.ts +2 -0
- package/dist/runtime/server/api/auth/session.get.js +46 -0
- package/dist/runtime/server/api/auth/user/reset-password.d.ts +5 -0
- package/dist/runtime/server/api/auth/user/reset-password.js +40 -0
- package/dist/runtime/server/api/auth/user/session.d.ts +2 -0
- package/dist/runtime/server/api/auth/user/session.js +43 -0
- package/dist/runtime/server/api/auth/user/verify-token.d.ts +6 -0
- package/dist/runtime/server/api/auth/user/verify-token.js +50 -0
- package/dist/runtime/server/api/banners.d.ts +3 -0
- package/dist/runtime/server/api/banners.js +43 -0
- package/dist/runtime/server/api/brand/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/brand/[...slug].js +60 -0
- package/dist/runtime/server/api/brand/index.d.ts +2 -0
- package/dist/runtime/server/api/brand/index.js +23 -0
- package/dist/runtime/server/api/cache/[...slug].delete.d.ts +2 -0
- package/dist/runtime/server/api/cache/[...slug].delete.js +40 -0
- package/dist/runtime/server/api/cache/clean.get.d.ts +5 -0
- package/dist/runtime/server/api/cache/clean.get.js +16 -0
- package/dist/runtime/server/api/cart/[slug]/add.d.ts +2 -0
- package/dist/runtime/server/api/cart/[slug]/add.js +21 -0
- package/dist/runtime/server/api/cart/[slug]/update.d.ts +2 -0
- package/dist/runtime/server/api/cart/[slug]/update.js +21 -0
- package/dist/runtime/server/api/cart/related.d.ts +2 -0
- package/dist/runtime/server/api/cart/related.js +21 -0
- package/dist/runtime/server/api/cart/remove.d.ts +2 -0
- package/dist/runtime/server/api/cart/remove.js +21 -0
- package/dist/runtime/server/api/cart/service/[slug]/add.d.ts +2 -0
- package/dist/runtime/server/api/cart/service/[slug]/add.js +16 -0
- package/dist/runtime/server/api/catalog/categories.d.ts +3 -0
- package/dist/runtime/server/api/catalog/categories.js +46 -0
- package/dist/runtime/server/api/catalog/categoriesall.d.ts +3 -0
- package/dist/runtime/server/api/catalog/categoriesall.js +46 -0
- package/dist/runtime/server/api/catalog/featured.d.ts +3 -0
- package/dist/runtime/server/api/catalog/featured.js +44 -0
- package/dist/runtime/server/api/catalog/samples.d.ts +3 -0
- package/dist/runtime/server/api/catalog/samples.js +47 -0
- package/dist/runtime/server/api/catalog/search.d.ts +3 -0
- package/dist/runtime/server/api/catalog/search.js +47 -0
- package/dist/runtime/server/api/category/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/category/[...slug].js +57 -0
- package/dist/runtime/server/api/checkout/applyCoupon.d.ts +2 -0
- package/dist/runtime/server/api/checkout/applyCoupon.js +20 -0
- package/dist/runtime/server/api/checkout/configs.d.ts +2 -0
- package/dist/runtime/server/api/checkout/configs.js +19 -0
- package/dist/runtime/server/api/checkout/countries.d.ts +2 -0
- package/dist/runtime/server/api/checkout/countries.js +17 -0
- package/dist/runtime/server/api/checkout/paymentmethod.d.ts +2 -0
- package/dist/runtime/server/api/checkout/paymentmethod.js +20 -0
- package/dist/runtime/server/api/checkout/quotation/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/[slug].js +21 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].js +37 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.js +21 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].js +23 -0
- package/dist/runtime/server/api/cmspost/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/cmspost/[...slug].js +51 -0
- package/dist/runtime/server/api/cmspost/all.d.ts +3 -0
- package/dist/runtime/server/api/cmspost/all.js +17 -0
- package/dist/runtime/server/api/company/profile.d.ts +2 -0
- package/dist/runtime/server/api/company/profile.js +18 -0
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.d.ts +3 -0
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +19 -0
- package/dist/runtime/server/api/contact-center/webforms/create.d.ts +2 -0
- package/dist/runtime/server/api/contact-center/webforms/create.js +16 -0
- package/dist/runtime/server/api/countries.d.ts +2 -0
- package/dist/runtime/server/api/countries.js +37 -0
- package/dist/runtime/server/api/customer/address/add.d.ts +14 -0
- package/dist/runtime/server/api/customer/address/add.js +33 -0
- package/dist/runtime/server/api/customer/address/delete.d.ts +20 -0
- package/dist/runtime/server/api/customer/address/delete.js +37 -0
- package/dist/runtime/server/api/customer/address/setshipping.d.ts +20 -0
- package/dist/runtime/server/api/customer/address/setshipping.js +41 -0
- package/dist/runtime/server/api/customer/address/update.d.ts +20 -0
- package/dist/runtime/server/api/customer/address/update.js +42 -0
- package/dist/runtime/server/api/customer/cards/delete.d.ts +2 -0
- package/dist/runtime/server/api/customer/cards/delete.js +23 -0
- package/dist/runtime/server/api/customer/cards/get.d.ts +2 -0
- package/dist/runtime/server/api/customer/cards/get.js +17 -0
- package/dist/runtime/server/api/customer/change-password.d.ts +14 -0
- package/dist/runtime/server/api/customer/change-password.js +34 -0
- package/dist/runtime/server/api/customer/checkout.d.ts +2 -0
- package/dist/runtime/server/api/customer/checkout.js +20 -0
- package/dist/runtime/server/api/customer/orders.d.ts +2 -0
- package/dist/runtime/server/api/customer/orders.js +17 -0
- package/dist/runtime/server/api/customer/profile/update.d.ts +14 -0
- package/dist/runtime/server/api/customer/profile/update.js +34 -0
- package/dist/runtime/server/api/customer/quotations.d.ts +2 -0
- package/dist/runtime/server/api/customer/quotations.js +17 -0
- package/dist/runtime/server/api/customer/search.d.ts +2 -0
- package/dist/runtime/server/api/customer/search.js +15 -0
- package/dist/runtime/server/api/customer/tax-invoice.d.ts +8 -0
- package/dist/runtime/server/api/customer/tax-invoice.js +36 -0
- package/dist/runtime/server/api/customer/wishlist/add.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/add.js +30 -0
- package/dist/runtime/server/api/customer/wishlist/createWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/createWishList.js +29 -0
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +46 -0
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +30 -0
- package/dist/runtime/server/api/customer/wishlist/get.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/get.js +17 -0
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +21 -0
- package/dist/runtime/server/api/customer/wishlist/updateWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/updateWishList.js +30 -0
- package/dist/runtime/server/api/featured.d.ts +2 -0
- package/dist/runtime/server/api/featured.js +16 -0
- package/dist/runtime/server/api/generate/robots.get.d.ts +2 -0
- package/dist/runtime/server/api/generate/robots.get.js +20 -0
- package/dist/runtime/server/api/generate/sitemap.get.d.ts +2 -0
- package/dist/runtime/server/api/generate/sitemap.get.js +32 -0
- package/dist/runtime/server/api/location.d.ts +2 -0
- package/dist/runtime/server/api/location.js +13 -0
- package/dist/runtime/server/api/nav/[id]/links.d.ts +2 -0
- package/dist/runtime/server/api/nav/[id]/links.js +19 -0
- package/dist/runtime/server/api/page/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/page/[...slug].js +51 -0
- package/dist/runtime/server/api/product/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/product/[...slug].js +49 -0
- package/dist/runtime/server/api/quickview/[slug].d.ts +2 -0
- package/dist/runtime/server/api/quickview/[slug].js +16 -0
- package/dist/runtime/server/api/samples.d.ts +3 -0
- package/dist/runtime/server/api/samples.js +20 -0
- package/dist/runtime/server/api/search.d.ts +3 -0
- package/dist/runtime/server/api/search.js +15 -0
- package/dist/runtime/server/api/service/[slug].d.ts +3 -0
- package/dist/runtime/server/api/service/[slug].js +54 -0
- package/dist/runtime/server/api/service/availability.d.ts +2 -0
- package/dist/runtime/server/api/service/availability.js +27 -0
- package/dist/runtime/server/api/service/getall.d.ts +3 -0
- package/dist/runtime/server/api/service/getall.js +54 -0
- package/dist/runtime/server/api/shop.d.ts +3 -0
- package/dist/runtime/server/api/shop.js +15 -0
- package/dist/runtime/server/api/subscribe.d.ts +2 -0
- package/dist/runtime/server/api/subscribe.js +16 -0
- package/dist/runtime/server/api/v2/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/v2/[...slug].js +11 -0
- package/dist/runtime/server/api/webform.d.ts +3 -0
- package/dist/runtime/server/api/webform.js +16 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/stores/Booking.d.ts +99 -0
- package/dist/runtime/stores/Booking.js +96 -0
- package/dist/runtime/stores/Cart.d.ts +79 -0
- package/dist/runtime/stores/Cart.js +309 -0
- package/dist/runtime/stores/Categories.d.ts +13 -0
- package/dist/runtime/stores/Categories.js +90 -0
- package/dist/runtime/stores/Checkout.d.ts +79 -0
- package/dist/runtime/stores/Checkout.js +208 -0
- package/dist/runtime/stores/IpLocation.d.ts +18 -0
- package/dist/runtime/stores/IpLocation.js +29 -0
- package/dist/runtime/stores/NavMenu.d.ts +15 -0
- package/dist/runtime/stores/NavMenu.js +26 -0
- package/dist/runtime/stores/Search.d.ts +5 -0
- package/dist/runtime/stores/Search.js +33 -0
- package/dist/runtime/stores/Services.d.ts +7 -0
- package/dist/runtime/stores/Services.js +49 -0
- package/dist/runtime/stores/Utilities.d.ts +5 -0
- package/dist/runtime/stores/Utilities.js +11 -0
- package/dist/runtime/stores/addresses.d.ts +15 -0
- package/dist/runtime/stores/addresses.js +31 -0
- package/dist/runtime/stores/auth.d.ts +59 -0
- package/dist/runtime/stores/auth.js +441 -0
- package/dist/runtime/stores/cards.d.ts +15 -0
- package/dist/runtime/stores/cards.js +22 -0
- package/dist/runtime/stores/compareStore.d.ts +7 -0
- package/dist/runtime/stores/compareStore.js +45 -0
- package/dist/runtime/stores/countries.d.ts +8 -0
- package/dist/runtime/stores/countries.js +15 -0
- package/dist/runtime/stores/index.d.ts +26 -0
- package/dist/runtime/stores/index.js +24 -0
- package/dist/runtime/stores/locations.d.ts +11 -0
- package/dist/runtime/stores/locations.js +19 -0
- package/dist/runtime/stores/orders.d.ts +16 -0
- package/dist/runtime/stores/orders.js +19 -0
- package/dist/runtime/stores/product/README.md +141 -0
- package/dist/runtime/stores/product/slug.d.ts +165 -0
- package/dist/runtime/stores/product/slug.js +91 -0
- package/dist/runtime/stores/product.d.ts +5 -0
- package/dist/runtime/stores/product.js +38 -0
- package/dist/runtime/stores/quotations.d.ts +12 -0
- package/dist/runtime/stores/quotations.js +19 -0
- package/dist/runtime/stores/subscriptions.d.ts +11 -0
- package/dist/runtime/stores/subscriptions.js +19 -0
- package/dist/runtime/stores/useCompanyProfile.d.ts +7 -0
- package/dist/runtime/stores/useCompanyProfile.js +22 -0
- package/dist/runtime/stores/useNavMenuStore.d.ts +5 -0
- package/dist/runtime/stores/useNavMenuStore.js +23 -0
- package/dist/runtime/stores/webforms.d.ts +18 -0
- package/dist/runtime/stores/webforms.js +23 -0
- package/dist/runtime/stores/wishlists.d.ts +136 -0
- package/dist/runtime/stores/wishlists.js +249 -0
- package/dist/runtime/utils/api.d.ts +13 -0
- package/dist/runtime/utils/api.js +98 -0
- package/dist/runtime/utils/companyProfile.d.ts +22 -0
- package/dist/runtime/utils/companyProfile.js +21 -0
- package/dist/runtime/utils/htmlCache.d.ts +5 -0
- package/dist/runtime/utils/htmlCache.js +64 -0
- package/dist/types.d.mts +7 -0
- package/package.json +12 -1
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
|
+
import { useRoute, useRequestHeaders, useHead } from "#imports";
|
|
3
|
+
import magazineImg1 from "@/assets/images/single-blog/Mask Group 79.png";
|
|
4
|
+
import magazineImg2 from "@/assets/images/single-blog/Mask Group 80.png";
|
|
5
|
+
export const useBlogSingle = (props) => {
|
|
6
|
+
const route = useRoute();
|
|
7
|
+
const magazineCards = ref([
|
|
8
|
+
{
|
|
9
|
+
CardImg: magazineImg1,
|
|
10
|
+
CardTitle: "What is Matter Technology and Why Does it Matter?"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
CardImg: magazineImg2,
|
|
14
|
+
CardTitle: "Easily convert your existing roller blinds into smart shades"
|
|
15
|
+
}
|
|
16
|
+
]);
|
|
17
|
+
const loading = ref(false);
|
|
18
|
+
const limit = 4;
|
|
19
|
+
const total = ref(magazineCards.value.length);
|
|
20
|
+
const currentIndex = ref(magazineCards.value.length);
|
|
21
|
+
const loadMore = async () => {
|
|
22
|
+
if (loading.value || currentIndex.value >= total.value) return;
|
|
23
|
+
loading.value = true;
|
|
24
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
25
|
+
const nextProducts = magazineCards.value.slice(currentIndex.value, currentIndex.value + limit);
|
|
26
|
+
magazineCards.value.push(...nextProducts);
|
|
27
|
+
currentIndex.value += nextProducts.length;
|
|
28
|
+
loading.value = false;
|
|
29
|
+
};
|
|
30
|
+
const fullPath = computed(() => {
|
|
31
|
+
if (process.server) {
|
|
32
|
+
const headers = useRequestHeaders();
|
|
33
|
+
const protocol = headers["x-forwarded-proto"] || "http";
|
|
34
|
+
const host = headers.host || "localhost";
|
|
35
|
+
return `${protocol}://${host}${route.fullPath}`;
|
|
36
|
+
} else {
|
|
37
|
+
return `${window.location.origin}${route.fullPath}`;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const setupSEO = () => {
|
|
41
|
+
useHead(() => {
|
|
42
|
+
const css = props.postData?.content?.css || "";
|
|
43
|
+
return {
|
|
44
|
+
style: css ? [{
|
|
45
|
+
children: css,
|
|
46
|
+
type: "text/css"
|
|
47
|
+
}] : []
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
useHead({
|
|
51
|
+
title: props.postData?.meta_title || "Blog Post",
|
|
52
|
+
meta: [
|
|
53
|
+
{
|
|
54
|
+
name: "description",
|
|
55
|
+
content: props.postData?.meta_description || ""
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "og:title",
|
|
59
|
+
content: props.postData?.meta_title || ""
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "og:description",
|
|
63
|
+
content: props.postData?.meta_description || ""
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "og:url",
|
|
67
|
+
content: fullPath.value
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const progressPercentage = computed(() => magazineCards.value.length / total.value * 100);
|
|
73
|
+
const canLoadMore = computed(() => !loading.value && magazineCards.value.length < total.value);
|
|
74
|
+
setupSEO();
|
|
75
|
+
return {
|
|
76
|
+
// State
|
|
77
|
+
magazineCards,
|
|
78
|
+
loading,
|
|
79
|
+
total,
|
|
80
|
+
// Computed
|
|
81
|
+
progressPercentage,
|
|
82
|
+
canLoadMore,
|
|
83
|
+
fullPath,
|
|
84
|
+
// Methods
|
|
85
|
+
loadMore
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface MagazineCard {
|
|
2
|
+
CardImg: string;
|
|
3
|
+
CardTitle: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
}
|
|
6
|
+
interface MagazineCardProps {
|
|
7
|
+
magazineCard: MagazineCard;
|
|
8
|
+
}
|
|
9
|
+
export declare const useMagazineCard: (props: MagazineCardProps) => {
|
|
10
|
+
card: import("vue").ComputedRef<MagazineCard>;
|
|
11
|
+
navigateToArticle: () => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { navigateTo } from "#imports";
|
|
3
|
+
export const useMagazineCard = (props) => {
|
|
4
|
+
const card = computed(() => props.magazineCard);
|
|
5
|
+
const navigateToArticle = () => {
|
|
6
|
+
if (card.value.url) {
|
|
7
|
+
navigateTo(card.value.url);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
card,
|
|
12
|
+
navigateToArticle
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface BlogContent {
|
|
2
|
+
html: string;
|
|
3
|
+
}
|
|
4
|
+
interface BlogPostData {
|
|
5
|
+
name: string;
|
|
6
|
+
author: string;
|
|
7
|
+
publish_date: string;
|
|
8
|
+
category: string;
|
|
9
|
+
image_url: string;
|
|
10
|
+
content: BlogContent;
|
|
11
|
+
}
|
|
12
|
+
interface SingleBlogMainProps {
|
|
13
|
+
postData: BlogPostData;
|
|
14
|
+
}
|
|
15
|
+
export declare const useSingleBlogMain: (props: SingleBlogMainProps) => {
|
|
16
|
+
post: import("vue").ComputedRef<BlogPostData>;
|
|
17
|
+
formattedDate: import("vue").ComputedRef<string>;
|
|
18
|
+
navigateToCategory: () => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { navigateTo } from "#imports";
|
|
3
|
+
export const useSingleBlogMain = (props) => {
|
|
4
|
+
const post = computed(() => props.postData);
|
|
5
|
+
const formattedDate = computed(() => {
|
|
6
|
+
if (!post.value.publish_date) return "";
|
|
7
|
+
try {
|
|
8
|
+
const date = new Date(post.value.publish_date);
|
|
9
|
+
return date.toLocaleDateString("en-US", {
|
|
10
|
+
year: "numeric",
|
|
11
|
+
month: "long",
|
|
12
|
+
day: "numeric"
|
|
13
|
+
});
|
|
14
|
+
} catch (error) {
|
|
15
|
+
return post.value.publish_date;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const navigateToCategory = () => {
|
|
19
|
+
if (post.value.category) {
|
|
20
|
+
navigateTo(`/blog/category/${post.value.category.toLowerCase()}`);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
post,
|
|
25
|
+
formattedDate,
|
|
26
|
+
navigateToCategory
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineAsyncComponent, watch } from "vue";
|
|
2
|
+
import { useRoute, useFetch } from "#imports";
|
|
3
|
+
export function useBrand(template) {
|
|
4
|
+
const route = useRoute();
|
|
5
|
+
const components = import.meta.glob(
|
|
6
|
+
"~/components/Brand/Template*/**/index.vue"
|
|
7
|
+
);
|
|
8
|
+
const path = `/components/Brand/Template-${template}/index.vue`;
|
|
9
|
+
const fallbackPath = `/components/Brand/Template-default/index.vue`;
|
|
10
|
+
const Brandtemplate = defineAsyncComponent({
|
|
11
|
+
loader: async () => {
|
|
12
|
+
if (template) {
|
|
13
|
+
if (components[path]) {
|
|
14
|
+
return await components[path]();
|
|
15
|
+
} else {
|
|
16
|
+
return await components[fallbackPath]();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const slug = route.params.slug;
|
|
22
|
+
const query = route.query;
|
|
23
|
+
const { data: brandData, error, pending, refresh } = useFetch(`/api/brand/${slug}`, {
|
|
24
|
+
method: "post",
|
|
25
|
+
query
|
|
26
|
+
});
|
|
27
|
+
watch(brandData, (newData) => {
|
|
28
|
+
}, { immediate: true });
|
|
29
|
+
watch(
|
|
30
|
+
() => [route.path, route.query],
|
|
31
|
+
async () => {
|
|
32
|
+
pending.value = true;
|
|
33
|
+
const response = await useFetch(`/api/brand/${slug}`, {
|
|
34
|
+
method: "GET",
|
|
35
|
+
query: route.query
|
|
36
|
+
});
|
|
37
|
+
brandData.value = response.data.value;
|
|
38
|
+
pending.value = false;
|
|
39
|
+
},
|
|
40
|
+
{ deep: true }
|
|
41
|
+
);
|
|
42
|
+
return {
|
|
43
|
+
Brandtemplate,
|
|
44
|
+
brandData,
|
|
45
|
+
pending
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface Product {
|
|
2
|
+
name: string;
|
|
3
|
+
height?: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
type: string;
|
|
6
|
+
image: string;
|
|
7
|
+
options: {
|
|
8
|
+
promotionlabel: Array<{
|
|
9
|
+
cartPromotionTag: string;
|
|
10
|
+
cartPromotionTagBackgroundColor: string;
|
|
11
|
+
cartPromotionTagColor: string;
|
|
12
|
+
cartDescription?: string;
|
|
13
|
+
}>;
|
|
14
|
+
summary: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
pricefloat: number;
|
|
20
|
+
qty: number;
|
|
21
|
+
rpfloat: number;
|
|
22
|
+
rowId: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
bundle?: Array<{
|
|
25
|
+
name: string;
|
|
26
|
+
qty: number;
|
|
27
|
+
price: string;
|
|
28
|
+
image?: string;
|
|
29
|
+
rrp?: string;
|
|
30
|
+
}>;
|
|
31
|
+
service?: {
|
|
32
|
+
per_order_pricing: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface CartDetailProps {
|
|
36
|
+
items: Record<string, Product>;
|
|
37
|
+
}
|
|
38
|
+
export declare const useCartDetail: (props: CartDetailProps) => Promise<{
|
|
39
|
+
response: any;
|
|
40
|
+
}>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface Product {
|
|
2
|
+
name: string;
|
|
3
|
+
height?: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
type: string;
|
|
6
|
+
image: string;
|
|
7
|
+
options: {
|
|
8
|
+
promotionlabel: Array<{
|
|
9
|
+
cartPromotionTag: string;
|
|
10
|
+
cartPromotionTagBackgroundColor: string;
|
|
11
|
+
cartPromotionTagColor: string;
|
|
12
|
+
cartDescription?: string;
|
|
13
|
+
}>;
|
|
14
|
+
summary: Array<{
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
pricefloat: number;
|
|
20
|
+
qty: number;
|
|
21
|
+
rpfloat: number;
|
|
22
|
+
rowId: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
bundle?: Array<{
|
|
25
|
+
name: string;
|
|
26
|
+
qty: number;
|
|
27
|
+
price: string;
|
|
28
|
+
image?: string;
|
|
29
|
+
rrp?: string;
|
|
30
|
+
}>;
|
|
31
|
+
service?: {
|
|
32
|
+
per_order_pricing: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface CartDetailProps {
|
|
36
|
+
items: Record<string, Product>;
|
|
37
|
+
}
|
|
38
|
+
export declare const useCartDetail: (props: CartDetailProps) => {
|
|
39
|
+
productAccordionStates: import("vue").Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
40
|
+
cartItems: import("vue").ComputedRef<Record<string, Product>>;
|
|
41
|
+
companyProfile: null;
|
|
42
|
+
checkoutData: import("vue").ComputedRef<{
|
|
43
|
+
[x: string]: any;
|
|
44
|
+
preferences?: Record<string, any>[] | undefined;
|
|
45
|
+
outlets?: Record<string, any>[] | undefined;
|
|
46
|
+
deliverytype?: string | undefined;
|
|
47
|
+
order_no?: string | undefined;
|
|
48
|
+
publishableKey?: any;
|
|
49
|
+
calculations?: any;
|
|
50
|
+
shippingmethods?: any;
|
|
51
|
+
cart?: Record<string, import("../../stores/Checkout.js").CartItem> | undefined;
|
|
52
|
+
totals?: Record<string, any> | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
removeFromCartMiddleware: (productId: string, product: Product) => Promise<void>;
|
|
55
|
+
updateQuantityMiddleware: (product: Product, qty: number) => Promise<void>;
|
|
56
|
+
toggleAccordion: (rowId: string) => void;
|
|
57
|
+
dvidedsummary: (sammarydata: any[]) => any[][];
|
|
58
|
+
swatchimagesSrcset: (swatchImage: string) => string;
|
|
59
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { onMounted, ref, computed } from "vue";
|
|
2
|
+
import { useCartStore } from "../../stores/Cart.js";
|
|
3
|
+
import { useCompanyProfile } from "../../stores/useCompanyProfile.js";
|
|
4
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
5
|
+
export const useCartDetail = (props) => {
|
|
6
|
+
const cartStore = useCartStore();
|
|
7
|
+
const { profile: companyProfile } = useCompanyProfile();
|
|
8
|
+
const checkoutData = computed(() => useCheckoutStore().config);
|
|
9
|
+
const productAccordionStates = ref({});
|
|
10
|
+
onMounted(() => {
|
|
11
|
+
window.scrollTo({
|
|
12
|
+
top: 0,
|
|
13
|
+
behavior: "smooth"
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
const removeFromCartMiddleware = async (productId, product) => {
|
|
17
|
+
await cartStore.removeFromCart(productId, product);
|
|
18
|
+
};
|
|
19
|
+
const updateQuantityMiddleware = async (product, qty) => {
|
|
20
|
+
await cartStore.updateQuantity(product, qty);
|
|
21
|
+
};
|
|
22
|
+
const toggleAccordion = (rowId) => {
|
|
23
|
+
productAccordionStates.value[rowId] = !productAccordionStates.value[rowId];
|
|
24
|
+
};
|
|
25
|
+
const dvidedsummary = (sammarydata) => {
|
|
26
|
+
const sumary = [];
|
|
27
|
+
const firstMidpoint = Math.ceil(sammarydata.length / 2);
|
|
28
|
+
sumary[0] = sammarydata.slice(0, firstMidpoint);
|
|
29
|
+
sumary[1] = sammarydata.slice(firstMidpoint);
|
|
30
|
+
return sumary;
|
|
31
|
+
};
|
|
32
|
+
const swatchimagesSrcset = (swatchImage) => {
|
|
33
|
+
const swatchImage320 = swatchImage?.replace(/.webp/gi, "320.webp");
|
|
34
|
+
return swatchImage320;
|
|
35
|
+
};
|
|
36
|
+
const cartItems = computed(() => props.items);
|
|
37
|
+
return {
|
|
38
|
+
// State
|
|
39
|
+
productAccordionStates,
|
|
40
|
+
// Computed
|
|
41
|
+
cartItems,
|
|
42
|
+
companyProfile,
|
|
43
|
+
checkoutData,
|
|
44
|
+
// Methods
|
|
45
|
+
removeFromCartMiddleware,
|
|
46
|
+
updateQuantityMiddleware,
|
|
47
|
+
toggleAccordion,
|
|
48
|
+
dvidedsummary,
|
|
49
|
+
swatchimagesSrcset
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface CategoryContentProps {
|
|
2
|
+
description: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const useCategoryContent: (props: CategoryContentProps) => {
|
|
5
|
+
description: import("vue").ComputedRef<string>;
|
|
6
|
+
processedDescription: import("vue").ComputedRef<string>;
|
|
7
|
+
sanitizeContent: (content: string) => string;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
export const useCategoryContent = (props) => {
|
|
3
|
+
const description = computed(() => props.description);
|
|
4
|
+
const sanitizeContent = (content) => {
|
|
5
|
+
return content;
|
|
6
|
+
};
|
|
7
|
+
const processedDescription = computed(() => {
|
|
8
|
+
return sanitizeContent(description.value);
|
|
9
|
+
});
|
|
10
|
+
return {
|
|
11
|
+
description,
|
|
12
|
+
processedDescription,
|
|
13
|
+
sanitizeContent
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
interface Product {
|
|
2
|
+
id: string | number;
|
|
3
|
+
name: string;
|
|
4
|
+
image: string;
|
|
5
|
+
price: number;
|
|
6
|
+
}
|
|
7
|
+
interface ChildCategory {
|
|
8
|
+
slug: string;
|
|
9
|
+
name: string;
|
|
10
|
+
image: string;
|
|
11
|
+
short_description: string;
|
|
12
|
+
}
|
|
13
|
+
interface CategoryGridProps {
|
|
14
|
+
template: number;
|
|
15
|
+
childcategories: ChildCategory[];
|
|
16
|
+
products: Product[];
|
|
17
|
+
}
|
|
18
|
+
export declare const useCategoryGrid: (props: CategoryGridProps) => {
|
|
19
|
+
selectedProduct: import("vue").Ref<{
|
|
20
|
+
id: string | number;
|
|
21
|
+
name: string;
|
|
22
|
+
image: string;
|
|
23
|
+
price: number;
|
|
24
|
+
} | null, Product | {
|
|
25
|
+
id: string | number;
|
|
26
|
+
name: string;
|
|
27
|
+
image: string;
|
|
28
|
+
price: number;
|
|
29
|
+
} | null>;
|
|
30
|
+
showQuickView: import("vue").Ref<boolean, boolean>;
|
|
31
|
+
template: import("vue").ComputedRef<number>;
|
|
32
|
+
childcategories: import("vue").ComputedRef<ChildCategory[]>;
|
|
33
|
+
products: import("vue").ComputedRef<Product[]>;
|
|
34
|
+
shouldShowProducts: import("vue").ComputedRef<boolean>;
|
|
35
|
+
shouldShowCategories: import("vue").ComputedRef<boolean>;
|
|
36
|
+
openQuickView: (data: Product) => void;
|
|
37
|
+
closeQuickView: () => void;
|
|
38
|
+
formatShortDescription: (html: string) => string;
|
|
39
|
+
};
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ref, computed } from "vue";
|
|
2
|
+
export const useCategoryGrid = (props) => {
|
|
3
|
+
const selectedProduct = ref(null);
|
|
4
|
+
const showQuickView = ref(false);
|
|
5
|
+
const openQuickView = (data) => {
|
|
6
|
+
selectedProduct.value = data;
|
|
7
|
+
showQuickView.value = true;
|
|
8
|
+
};
|
|
9
|
+
const closeQuickView = () => {
|
|
10
|
+
showQuickView.value = false;
|
|
11
|
+
selectedProduct.value = null;
|
|
12
|
+
};
|
|
13
|
+
const formatShortDescription = (html) => {
|
|
14
|
+
const text = html.replace(/<[^>]*>/g, "");
|
|
15
|
+
const words = text.split(/\s+/);
|
|
16
|
+
return words.slice(0, 30).join(" ") + (words.length > 30 ? "..." : "");
|
|
17
|
+
};
|
|
18
|
+
const template = computed(() => props.template);
|
|
19
|
+
const childcategories = computed(() => props.childcategories);
|
|
20
|
+
const products = computed(() => props.products);
|
|
21
|
+
const shouldShowProducts = computed(() => template.value !== 3);
|
|
22
|
+
const shouldShowCategories = computed(() => template.value === 3 && childcategories.value.length > 0);
|
|
23
|
+
return {
|
|
24
|
+
// State
|
|
25
|
+
selectedProduct,
|
|
26
|
+
showQuickView,
|
|
27
|
+
// Computed
|
|
28
|
+
template,
|
|
29
|
+
childcategories,
|
|
30
|
+
products,
|
|
31
|
+
shouldShowProducts,
|
|
32
|
+
shouldShowCategories,
|
|
33
|
+
// Methods
|
|
34
|
+
openQuickView,
|
|
35
|
+
closeQuickView,
|
|
36
|
+
formatShortDescription
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Ref, type ComputedRef } from 'vue';
|
|
2
|
+
interface CategoryData {
|
|
3
|
+
status: string;
|
|
4
|
+
message: number;
|
|
5
|
+
data: {
|
|
6
|
+
template: any;
|
|
7
|
+
type: string;
|
|
8
|
+
record: {
|
|
9
|
+
category: object;
|
|
10
|
+
products: object;
|
|
11
|
+
brands: object[];
|
|
12
|
+
filter_values: object[];
|
|
13
|
+
filters: object[];
|
|
14
|
+
categories: object[];
|
|
15
|
+
prices: object;
|
|
16
|
+
breadcrumb: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface CategoryIndexProps {
|
|
21
|
+
data: CategoryData;
|
|
22
|
+
}
|
|
23
|
+
interface UseCategoryIndexReturn {
|
|
24
|
+
catData: Ref<any>;
|
|
25
|
+
error: Ref<any>;
|
|
26
|
+
pending: Ref<boolean>;
|
|
27
|
+
transformedApiData: ComputedRef<CategoryData | null>;
|
|
28
|
+
renderData: ComputedRef<CategoryData>;
|
|
29
|
+
refresh: () => Promise<void>;
|
|
30
|
+
getSelectedTemplate: (templateComponents: Record<string, any>) => ComputedRef<any>;
|
|
31
|
+
}
|
|
32
|
+
export declare const useCategoryIndex: (props: CategoryIndexProps) => UseCategoryIndexReturn;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useRoute, useFetch } from "#imports";
|
|
2
|
+
import { watch, computed } from "vue";
|
|
3
|
+
export const useCategoryIndex = (props) => {
|
|
4
|
+
const route = useRoute();
|
|
5
|
+
const slug = route.params.slug;
|
|
6
|
+
const { data: catData, error, pending, refresh } = useFetch(`/api/category/${slug}`, {
|
|
7
|
+
method: "GET",
|
|
8
|
+
query: route.query
|
|
9
|
+
});
|
|
10
|
+
watch(catData, (newData) => {
|
|
11
|
+
}, { immediate: true });
|
|
12
|
+
watch(
|
|
13
|
+
() => [route.path, route.query],
|
|
14
|
+
async () => {
|
|
15
|
+
pending.value = true;
|
|
16
|
+
const response = await useFetch(`/api/category/${slug}`, {
|
|
17
|
+
method: "GET",
|
|
18
|
+
query: route.query
|
|
19
|
+
});
|
|
20
|
+
catData.value = response.data.value;
|
|
21
|
+
pending.value = false;
|
|
22
|
+
},
|
|
23
|
+
{ deep: true }
|
|
24
|
+
);
|
|
25
|
+
const transformedApiData = computed(() => {
|
|
26
|
+
if (catData.value && catData.value.status === "Success") {
|
|
27
|
+
return {
|
|
28
|
+
status: catData.value.status,
|
|
29
|
+
message: catData.value.message,
|
|
30
|
+
data: {
|
|
31
|
+
template: catData.value.data?.category?.template || "default",
|
|
32
|
+
type: catData.value.data?.type || "category",
|
|
33
|
+
record: {
|
|
34
|
+
category: catData.value.data?.category || {},
|
|
35
|
+
products: catData.value.data?.products || {},
|
|
36
|
+
brands: catData.value.data?.brands || [],
|
|
37
|
+
filter_values: catData.value.data?.filter_values || [],
|
|
38
|
+
filters: catData.value.data?.filters || [],
|
|
39
|
+
categories: catData.value.data?.categories || [],
|
|
40
|
+
prices: catData.value.data?.prices || {},
|
|
41
|
+
breadcrumb: catData.value.data?.breadcrumb || ""
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
});
|
|
48
|
+
const renderData = computed(() => transformedApiData.value || props.data);
|
|
49
|
+
const getSelectedTemplate = (templateComponents) => {
|
|
50
|
+
return computed(() => {
|
|
51
|
+
return templateComponents[renderData.value?.data?.template] || templateComponents.default;
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
// State
|
|
56
|
+
catData,
|
|
57
|
+
error,
|
|
58
|
+
pending,
|
|
59
|
+
transformedApiData,
|
|
60
|
+
renderData,
|
|
61
|
+
// Methods
|
|
62
|
+
refresh,
|
|
63
|
+
getSelectedTemplate
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type SortType = 'priceasc' | 'pricedesc' | '';
|
|
2
|
+
interface CategoryTopProps {
|
|
3
|
+
from: number;
|
|
4
|
+
to: number;
|
|
5
|
+
total: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const useCategoryTop: (props: CategoryTopProps) => {
|
|
8
|
+
sortingvalue: import("vue").Ref<SortType, SortType>;
|
|
9
|
+
windowWidth: import("vue").Ref<number, number>;
|
|
10
|
+
from: import("vue").ComputedRef<number>;
|
|
11
|
+
to: import("vue").ComputedRef<number>;
|
|
12
|
+
total: import("vue").ComputedRef<number>;
|
|
13
|
+
itemCountText: import("vue").ComputedRef<string>;
|
|
14
|
+
isMobile: import("vue").ComputedRef<boolean>;
|
|
15
|
+
selectSort: (sort: SortType) => void;
|
|
16
|
+
updateWindowWidth: () => void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useRoute, useRouter } from "#imports";
|
|
2
|
+
import { ref, computed, watch, onMounted, onUnmounted } from "vue";
|
|
3
|
+
export const useCategoryTop = (props) => {
|
|
4
|
+
const route = useRoute();
|
|
5
|
+
const router = useRouter();
|
|
6
|
+
const sortingvalue = ref(route.query.sortby || "");
|
|
7
|
+
const selectSort = (sort) => {
|
|
8
|
+
const queryParams = { ...route.query };
|
|
9
|
+
if (sort && sort !== "") {
|
|
10
|
+
queryParams.sortby = sort;
|
|
11
|
+
} else {
|
|
12
|
+
delete queryParams.sortby;
|
|
13
|
+
}
|
|
14
|
+
delete queryParams.page;
|
|
15
|
+
const timestamp = Date.now();
|
|
16
|
+
router.push({
|
|
17
|
+
path: route.path,
|
|
18
|
+
query: { ...queryParams, _t: timestamp }
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
watch(() => route.query.sortby, (newSortBy) => {
|
|
22
|
+
sortingvalue.value = newSortBy || "";
|
|
23
|
+
});
|
|
24
|
+
const from = computed(() => props.from);
|
|
25
|
+
const to = computed(() => props.to);
|
|
26
|
+
const total = computed(() => props.total);
|
|
27
|
+
const itemCountText = computed(() => {
|
|
28
|
+
if (props.from && props.to && props.total) {
|
|
29
|
+
return `Showing ${props.from}-${props.to} of ${props.total} Items`;
|
|
30
|
+
}
|
|
31
|
+
return `${props.total} Items`;
|
|
32
|
+
});
|
|
33
|
+
const windowWidth = ref(1200);
|
|
34
|
+
const updateWindowWidth = () => {
|
|
35
|
+
if (process.client) {
|
|
36
|
+
windowWidth.value = window.innerWidth;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
if (process.client) {
|
|
41
|
+
updateWindowWidth();
|
|
42
|
+
window.addEventListener("resize", updateWindowWidth);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
onUnmounted(() => {
|
|
46
|
+
if (process.client) {
|
|
47
|
+
window.removeEventListener("resize", updateWindowWidth);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
const isMobile = computed(() => windowWidth.value < 1200);
|
|
51
|
+
return {
|
|
52
|
+
// State
|
|
53
|
+
sortingvalue,
|
|
54
|
+
windowWidth,
|
|
55
|
+
// Computed
|
|
56
|
+
from,
|
|
57
|
+
to,
|
|
58
|
+
total,
|
|
59
|
+
itemCountText,
|
|
60
|
+
isMobile,
|
|
61
|
+
// Methods
|
|
62
|
+
selectSort,
|
|
63
|
+
updateWindowWidth
|
|
64
|
+
};
|
|
65
|
+
};
|