flowrix 1.0.1-beta.84 → 1.0.1-beta.85
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.cts +2 -0
- package/package.json +8 -33
- package/dist/module.d.mts +0 -3
- package/dist/module.json +0 -9
- package/dist/module.mjs +0 -338
- package/dist/runtime/composables/Blog/useBlogIndex.d.ts +0 -108
- package/dist/runtime/composables/Blog/useBlogIndex.js +0 -86
- package/dist/runtime/composables/Blog/useBlogMain.d.ts +0 -13
- package/dist/runtime/composables/Blog/useBlogMain.js +0 -7
- package/dist/runtime/composables/Blog/useBlogSidebar.d.ts +0 -7
- package/dist/runtime/composables/Blog/useBlogSidebar.js +0 -37
- package/dist/runtime/composables/Blog/useBlogSingle.d.ts +0 -30
- package/dist/runtime/composables/Blog/useBlogSingle.js +0 -87
- package/dist/runtime/composables/Blog/useMagazineCard.d.ts +0 -13
- package/dist/runtime/composables/Blog/useMagazineCard.js +0 -14
- package/dist/runtime/composables/Blog/useSingleBlogMain.d.ts +0 -20
- package/dist/runtime/composables/Blog/useSingleBlogMain.js +0 -28
- package/dist/runtime/composables/Brand/brand.d.ts +0 -7
- package/dist/runtime/composables/Brand/brand.js +0 -47
- package/dist/runtime/composables/Cart/useCart.d.ts +0 -40
- package/dist/runtime/composables/Cart/useCart.js +0 -10
- package/dist/runtime/composables/Cart/useCartDetail.d.ts +0 -59
- package/dist/runtime/composables/Cart/useCartDetail.js +0 -51
- package/dist/runtime/composables/Category/useCategoryContent.d.ts +0 -9
- package/dist/runtime/composables/Category/useCategoryContent.js +0 -15
- package/dist/runtime/composables/Category/useCategoryGrid.d.ts +0 -40
- package/dist/runtime/composables/Category/useCategoryGrid.js +0 -38
- package/dist/runtime/composables/Category/useCategoryIndex.d.ts +0 -33
- package/dist/runtime/composables/Category/useCategoryIndex.js +0 -65
- package/dist/runtime/composables/Category/useCategoryTop.d.ts +0 -18
- package/dist/runtime/composables/Category/useCategoryTop.js +0 -65
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.d.ts +0 -3
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.js +0 -22
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.d.ts +0 -8
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.js +0 -88
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +0 -52
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +0 -155
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +0 -48
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +0 -90
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.d.ts +0 -15
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +0 -135
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.d.ts +0 -3
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.js +0 -22
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +0 -7
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.js +0 -43
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.d.ts +0 -3
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.js +0 -22
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +0 -197
- package/dist/runtime/composables/Checkout/useCheckout.js +0 -374
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +0 -43
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.js +0 -84
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +0 -55
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.js +0 -196
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +0 -15
- package/dist/runtime/composables/Checkout/useCreateAccount.js +0 -63
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +0 -4
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +0 -37
- package/dist/runtime/composables/Customer/useBillingAddress.d.ts +0 -112
- package/dist/runtime/composables/Customer/useBillingAddress.js +0 -93
- package/dist/runtime/composables/Customer/useLogin.d.ts +0 -9
- package/dist/runtime/composables/Customer/useLogin.js +0 -34
- package/dist/runtime/composables/Customer/useOrders.d.ts +0 -29
- package/dist/runtime/composables/Customer/useOrders.js +0 -56
- package/dist/runtime/composables/Customer/usePasswordReset.d.ts +0 -26
- package/dist/runtime/composables/Customer/usePasswordReset.js +0 -258
- package/dist/runtime/composables/Customer/useProfile.d.ts +0 -75
- package/dist/runtime/composables/Customer/useProfile.js +0 -106
- package/dist/runtime/composables/Customer/useQuotations.d.ts +0 -32
- package/dist/runtime/composables/Customer/useQuotations.js +0 -40
- package/dist/runtime/composables/Customer/useRegister.d.ts +0 -127
- package/dist/runtime/composables/Customer/useRegister.js +0 -325
- package/dist/runtime/composables/Customer/useShippingAddress.d.ts +0 -121
- package/dist/runtime/composables/Customer/useShippingAddress.js +0 -145
- package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +0 -21
- package/dist/runtime/composables/Customer/useUpdatePassword.js +0 -94
- package/dist/runtime/composables/Customer/useUserCards.d.ts +0 -22
- package/dist/runtime/composables/Customer/useUserCards.js +0 -65
- package/dist/runtime/composables/Customer/useWishlists.d.ts +0 -25
- package/dist/runtime/composables/Customer/useWishlists.js +0 -183
- package/dist/runtime/composables/Extras/useCountry.d.ts +0 -11
- package/dist/runtime/composables/Extras/useCountry.js +0 -12
- package/dist/runtime/composables/Extras/useDateFormatter.d.ts +0 -4
- package/dist/runtime/composables/Extras/useDateFormatter.js +0 -20
- package/dist/runtime/composables/Extras/useNumberOnly.d.ts +0 -5
- package/dist/runtime/composables/Extras/useNumberOnly.js +0 -21
- package/dist/runtime/composables/Extras/usePasswordFormatter.d.ts +0 -8
- package/dist/runtime/composables/Extras/usePasswordFormatter.js +0 -61
- package/dist/runtime/composables/Extras/useSrcSets.d.ts +0 -8
- package/dist/runtime/composables/Extras/useSrcSets.js +0 -26
- package/dist/runtime/composables/Extras/useTogglePassword.d.ts +0 -4
- package/dist/runtime/composables/Extras/useTogglePassword.js +0 -11
- package/dist/runtime/composables/Footer/useFooter.d.ts +0 -14
- package/dist/runtime/composables/Footer/useFooter.js +0 -61
- package/dist/runtime/composables/Header/useHeader.d.ts +0 -14
- package/dist/runtime/composables/Header/useHeader.js +0 -67
- package/dist/runtime/composables/Menu/MainMenu.d.ts +0 -4
- package/dist/runtime/composables/Menu/MainMenu.js +0 -17
- package/dist/runtime/composables/Product/CustomProduct/useAttributeType.d.ts +0 -3
- package/dist/runtime/composables/Product/CustomProduct/useAttributeType.js +0 -20
- package/dist/runtime/composables/Product/CustomProduct/useAttributes.d.ts +0 -70
- package/dist/runtime/composables/Product/CustomProduct/useAttributes.js +0 -68
- package/dist/runtime/composables/Product/CustomProduct/useCustomProduct.d.ts +0 -74
- package/dist/runtime/composables/Product/CustomProduct/useCustomProduct.js +0 -107
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.d.ts +0 -159
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.js +0 -2080
- package/dist/runtime/composables/Product/CustomProduct/useSingleAttribute.d.ts +0 -4
- package/dist/runtime/composables/Product/CustomProduct/useSingleAttribute.js +0 -27
- package/dist/runtime/composables/Product/CustomProduct/useSingleStep.d.ts +0 -68
- package/dist/runtime/composables/Product/CustomProduct/useSingleStep.js +0 -21
- package/dist/runtime/composables/Product/CustomProduct/useSingleValue.d.ts +0 -67
- package/dist/runtime/composables/Product/CustomProduct/useSingleValue.js +0 -15
- package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +0 -74
- package/dist/runtime/composables/Product/CustomProduct/useSteps.js +0 -78
- package/dist/runtime/composables/Product/simpleProduct/useSimpleProduct.d.ts +0 -25
- package/dist/runtime/composables/Product/simpleProduct/useSimpleProduct.js +0 -77
- package/dist/runtime/composables/Product/useProductCard.d.ts +0 -13
- package/dist/runtime/composables/Product/useProductCard.js +0 -88
- package/dist/runtime/composables/Product/useProductComponent.d.ts +0 -5
- package/dist/runtime/composables/Product/useProductComponent.js +0 -23
- package/dist/runtime/composables/Product/useProductSlug.d.ts +0 -8
- package/dist/runtime/composables/Product/useProductSlug.js +0 -25
- package/dist/runtime/composables/Product/useQuickView.d.ts +0 -8
- package/dist/runtime/composables/Product/useQuickView.js +0 -27
- package/dist/runtime/composables/Product/useService.d.ts +0 -17
- package/dist/runtime/composables/Product/useService.js +0 -64
- package/dist/runtime/composables/Product/useTemplate.d.ts +0 -5
- package/dist/runtime/composables/Product/useTemplate.js +0 -21
- package/dist/runtime/composables/Samples/useSamples.d.ts +0 -10
- package/dist/runtime/composables/Samples/useSamples.js +0 -36
- package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +0 -6
- package/dist/runtime/composables/SideBar/Filters/useFilters.js +0 -51
- package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +0 -5
- package/dist/runtime/composables/SideBar/Filters/useSorting.js +0 -27
- package/dist/runtime/composables/SideBar/useSideBar.d.ts +0 -8
- package/dist/runtime/composables/SideBar/useSideBar.js +0 -68
- package/dist/runtime/composables/index.d.ts +0 -78
- package/dist/runtime/composables/index.js +0 -78
- package/dist/runtime/composables/types.d.ts +0 -5
- package/dist/runtime/composables/types.js +0 -0
- package/dist/runtime/composables/useAddToCart.d.ts +0 -28
- package/dist/runtime/composables/useAddToCart.js +0 -111
- package/dist/runtime/composables/useAddresses.d.ts +0 -18
- package/dist/runtime/composables/useAddresses.js +0 -126
- package/dist/runtime/composables/useCards.d.ts +0 -19
- package/dist/runtime/composables/useCards.js +0 -73
- package/dist/runtime/composables/useClientApi.d.ts +0 -23
- package/dist/runtime/composables/useClientApi.js +0 -53
- package/dist/runtime/composables/useDataLayer.d.ts +0 -18
- package/dist/runtime/composables/useDataLayer.js +0 -386
- package/dist/runtime/composables/useDynamicHtmlRenderer.d.ts +0 -4
- package/dist/runtime/composables/useDynamicHtmlRenderer.js +0 -33
- package/dist/runtime/composables/useLocation.d.ts +0 -13
- package/dist/runtime/composables/useLocation.js +0 -32
- package/dist/runtime/composables/useLocations.d.ts +0 -12
- package/dist/runtime/composables/useLocations.js +0 -53
- package/dist/runtime/composables/useMetaLayer.d.ts +0 -10
- package/dist/runtime/composables/useMetaLayer.js +0 -263
- package/dist/runtime/composables/useQuotationCheckout.d.ts +0 -78
- package/dist/runtime/composables/useQuotationCheckout.js +0 -138
- package/dist/runtime/composables/useSearch.d.ts +0 -7
- package/dist/runtime/composables/useSearch.js +0 -40
- package/dist/runtime/composables/useSubscriptions.d.ts +0 -13
- package/dist/runtime/composables/useSubscriptions.js +0 -58
- package/dist/runtime/composables/useTikTokDatalayer.d.ts +0 -8
- package/dist/runtime/composables/useTikTokDatalayer.js +0 -165
- package/dist/runtime/composables/useWebforms.d.ts +0 -16
- package/dist/runtime/composables/useWebforms.js +0 -75
- package/dist/runtime/middleware/flowrix.d.ts +0 -7
- package/dist/runtime/middleware/flowrix.js +0 -60
- package/dist/runtime/plugin.d.ts +0 -2
- package/dist/runtime/plugin.js +0 -5
- package/dist/runtime/plugins/persistedstate.client.d.ts +0 -2
- package/dist/runtime/plugins/persistedstate.client.js +0 -9
- package/dist/runtime/server/api/albums.d.ts +0 -2
- package/dist/runtime/server/api/albums.js +0 -18
- package/dist/runtime/server/api/auth/forgot.d.ts +0 -5
- package/dist/runtime/server/api/auth/forgot.js +0 -44
- package/dist/runtime/server/api/auth/login.d.ts +0 -11
- package/dist/runtime/server/api/auth/login.js +0 -68
- package/dist/runtime/server/api/auth/logout.d.ts +0 -5
- package/dist/runtime/server/api/auth/logout.js +0 -23
- package/dist/runtime/server/api/auth/register.d.ts +0 -2
- package/dist/runtime/server/api/auth/register.js +0 -51
- package/dist/runtime/server/api/auth/session.get.d.ts +0 -2
- package/dist/runtime/server/api/auth/session.get.js +0 -46
- package/dist/runtime/server/api/auth/user/reset-password.d.ts +0 -5
- package/dist/runtime/server/api/auth/user/reset-password.js +0 -40
- package/dist/runtime/server/api/auth/user/session.d.ts +0 -2
- package/dist/runtime/server/api/auth/user/session.js +0 -43
- package/dist/runtime/server/api/auth/user/verify-token.d.ts +0 -6
- package/dist/runtime/server/api/auth/user/verify-token.js +0 -50
- package/dist/runtime/server/api/banners.d.ts +0 -3
- package/dist/runtime/server/api/banners.js +0 -41
- package/dist/runtime/server/api/brand/[...slug].d.ts +0 -3
- package/dist/runtime/server/api/brand/[...slug].js +0 -58
- package/dist/runtime/server/api/brand/index.d.ts +0 -2
- package/dist/runtime/server/api/brand/index.js +0 -23
- package/dist/runtime/server/api/cache/[...slug].delete.d.ts +0 -2
- package/dist/runtime/server/api/cache/[...slug].delete.js +0 -40
- package/dist/runtime/server/api/cache/clean.get.d.ts +0 -5
- package/dist/runtime/server/api/cache/clean.get.js +0 -16
- package/dist/runtime/server/api/cart/[slug]/add.d.ts +0 -2
- package/dist/runtime/server/api/cart/[slug]/add.js +0 -21
- package/dist/runtime/server/api/cart/[slug]/update.d.ts +0 -2
- package/dist/runtime/server/api/cart/[slug]/update.js +0 -21
- package/dist/runtime/server/api/cart/related.d.ts +0 -2
- package/dist/runtime/server/api/cart/related.js +0 -21
- package/dist/runtime/server/api/cart/remove.d.ts +0 -2
- package/dist/runtime/server/api/cart/remove.js +0 -21
- package/dist/runtime/server/api/cart/service/[slug]/add.d.ts +0 -2
- package/dist/runtime/server/api/cart/service/[slug]/add.js +0 -16
- package/dist/runtime/server/api/catalog/categories.d.ts +0 -3
- package/dist/runtime/server/api/catalog/categories.js +0 -44
- package/dist/runtime/server/api/catalog/categoriesall.d.ts +0 -3
- package/dist/runtime/server/api/catalog/categoriesall.js +0 -44
- package/dist/runtime/server/api/catalog/featured.d.ts +0 -3
- package/dist/runtime/server/api/catalog/featured.js +0 -42
- package/dist/runtime/server/api/catalog/samples.d.ts +0 -3
- package/dist/runtime/server/api/catalog/samples.js +0 -45
- package/dist/runtime/server/api/catalog/search.d.ts +0 -3
- package/dist/runtime/server/api/catalog/search.js +0 -45
- package/dist/runtime/server/api/category/[...slug].d.ts +0 -3
- package/dist/runtime/server/api/category/[...slug].js +0 -58
- package/dist/runtime/server/api/checkout/applyCoupon.d.ts +0 -2
- package/dist/runtime/server/api/checkout/applyCoupon.js +0 -20
- package/dist/runtime/server/api/checkout/configs.d.ts +0 -2
- package/dist/runtime/server/api/checkout/configs.js +0 -19
- package/dist/runtime/server/api/checkout/countries.d.ts +0 -2
- package/dist/runtime/server/api/checkout/countries.js +0 -17
- package/dist/runtime/server/api/checkout/paymentmethod.d.ts +0 -2
- package/dist/runtime/server/api/checkout/paymentmethod.js +0 -20
- package/dist/runtime/server/api/checkout/quotation/[slug].d.ts +0 -2
- package/dist/runtime/server/api/checkout/quotation/[slug].js +0 -21
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].d.ts +0 -2
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].js +0 -37
- package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +0 -2
- package/dist/runtime/server/api/checkout/quotation/guest/customer.js +0 -21
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].d.ts +0 -2
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].js +0 -23
- package/dist/runtime/server/api/cmspost/[...slug].d.ts +0 -3
- package/dist/runtime/server/api/cmspost/[...slug].js +0 -49
- package/dist/runtime/server/api/cmspost/all.d.ts +0 -3
- package/dist/runtime/server/api/cmspost/all.js +0 -17
- package/dist/runtime/server/api/company/profile.d.ts +0 -2
- package/dist/runtime/server/api/company/profile.js +0 -18
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.d.ts +0 -3
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +0 -19
- package/dist/runtime/server/api/contact-center/webforms/create.d.ts +0 -2
- package/dist/runtime/server/api/contact-center/webforms/create.js +0 -16
- package/dist/runtime/server/api/countries.d.ts +0 -2
- package/dist/runtime/server/api/countries.js +0 -35
- package/dist/runtime/server/api/customer/address/add.d.ts +0 -14
- package/dist/runtime/server/api/customer/address/add.js +0 -33
- package/dist/runtime/server/api/customer/address/delete.d.ts +0 -20
- package/dist/runtime/server/api/customer/address/delete.js +0 -37
- package/dist/runtime/server/api/customer/address/setshipping.d.ts +0 -20
- package/dist/runtime/server/api/customer/address/setshipping.js +0 -41
- package/dist/runtime/server/api/customer/address/update.d.ts +0 -20
- package/dist/runtime/server/api/customer/address/update.js +0 -42
- package/dist/runtime/server/api/customer/cards/delete.d.ts +0 -2
- package/dist/runtime/server/api/customer/cards/delete.js +0 -23
- package/dist/runtime/server/api/customer/cards/get.d.ts +0 -2
- package/dist/runtime/server/api/customer/cards/get.js +0 -17
- package/dist/runtime/server/api/customer/change-password.d.ts +0 -14
- package/dist/runtime/server/api/customer/change-password.js +0 -34
- package/dist/runtime/server/api/customer/checkout.d.ts +0 -2
- package/dist/runtime/server/api/customer/checkout.js +0 -20
- package/dist/runtime/server/api/customer/orders.d.ts +0 -2
- package/dist/runtime/server/api/customer/orders.js +0 -17
- package/dist/runtime/server/api/customer/profile/update.d.ts +0 -14
- package/dist/runtime/server/api/customer/profile/update.js +0 -34
- package/dist/runtime/server/api/customer/quotations.d.ts +0 -2
- package/dist/runtime/server/api/customer/quotations.js +0 -17
- package/dist/runtime/server/api/customer/search.d.ts +0 -2
- package/dist/runtime/server/api/customer/search.js +0 -15
- package/dist/runtime/server/api/customer/tax-invoice.d.ts +0 -8
- package/dist/runtime/server/api/customer/tax-invoice.js +0 -36
- package/dist/runtime/server/api/customer/wishlist/add.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/add.js +0 -30
- package/dist/runtime/server/api/customer/wishlist/createWishList.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/createWishList.js +0 -29
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +0 -46
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +0 -30
- package/dist/runtime/server/api/customer/wishlist/get.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/get.js +0 -17
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +0 -21
- package/dist/runtime/server/api/customer/wishlist/updateWishList.d.ts +0 -2
- package/dist/runtime/server/api/customer/wishlist/updateWishList.js +0 -30
- package/dist/runtime/server/api/featured.d.ts +0 -2
- package/dist/runtime/server/api/featured.js +0 -16
- package/dist/runtime/server/api/generate/sitemap.get.d.ts +0 -5
- package/dist/runtime/server/api/generate/sitemap.get.js +0 -13
- package/dist/runtime/server/api/location.d.ts +0 -2
- package/dist/runtime/server/api/location.js +0 -13
- package/dist/runtime/server/api/nav/[id]/links.d.ts +0 -2
- package/dist/runtime/server/api/nav/[id]/links.js +0 -19
- package/dist/runtime/server/api/page/[...slug].d.ts +0 -3
- package/dist/runtime/server/api/page/[...slug].js +0 -49
- package/dist/runtime/server/api/product/[...slug].d.ts +0 -3
- package/dist/runtime/server/api/product/[...slug].js +0 -47
- package/dist/runtime/server/api/quickview/[slug].d.ts +0 -2
- package/dist/runtime/server/api/quickview/[slug].js +0 -16
- package/dist/runtime/server/api/samples.d.ts +0 -3
- package/dist/runtime/server/api/samples.js +0 -20
- package/dist/runtime/server/api/search.d.ts +0 -3
- package/dist/runtime/server/api/search.js +0 -15
- package/dist/runtime/server/api/service/[slug].d.ts +0 -3
- package/dist/runtime/server/api/service/[slug].js +0 -52
- package/dist/runtime/server/api/service/availability.d.ts +0 -2
- package/dist/runtime/server/api/service/availability.js +0 -27
- package/dist/runtime/server/api/service/getall.d.ts +0 -3
- package/dist/runtime/server/api/service/getall.js +0 -52
- package/dist/runtime/server/api/shop.d.ts +0 -3
- package/dist/runtime/server/api/shop.js +0 -15
- package/dist/runtime/server/api/subscribe.d.ts +0 -2
- package/dist/runtime/server/api/subscribe.js +0 -16
- package/dist/runtime/server/api/v2/[...slug].d.ts +0 -3
- package/dist/runtime/server/api/v2/[...slug].js +0 -11
- package/dist/runtime/server/api/webform.d.ts +0 -3
- package/dist/runtime/server/api/webform.js +0 -16
- package/dist/runtime/server/tsconfig.json +0 -3
- package/dist/runtime/stores/Booking.d.ts +0 -99
- package/dist/runtime/stores/Booking.js +0 -96
- package/dist/runtime/stores/Cart.d.ts +0 -79
- package/dist/runtime/stores/Cart.js +0 -309
- package/dist/runtime/stores/Categories.d.ts +0 -13
- package/dist/runtime/stores/Categories.js +0 -90
- package/dist/runtime/stores/Checkout.d.ts +0 -79
- package/dist/runtime/stores/Checkout.js +0 -208
- package/dist/runtime/stores/IpLocation.d.ts +0 -18
- package/dist/runtime/stores/IpLocation.js +0 -29
- package/dist/runtime/stores/NavMenu.d.ts +0 -15
- package/dist/runtime/stores/NavMenu.js +0 -26
- package/dist/runtime/stores/Search.d.ts +0 -5
- package/dist/runtime/stores/Search.js +0 -33
- package/dist/runtime/stores/Services.d.ts +0 -7
- package/dist/runtime/stores/Services.js +0 -49
- package/dist/runtime/stores/Utilities.d.ts +0 -5
- package/dist/runtime/stores/Utilities.js +0 -11
- package/dist/runtime/stores/addresses.d.ts +0 -15
- package/dist/runtime/stores/addresses.js +0 -31
- package/dist/runtime/stores/auth.d.ts +0 -59
- package/dist/runtime/stores/auth.js +0 -441
- package/dist/runtime/stores/cards.d.ts +0 -15
- package/dist/runtime/stores/cards.js +0 -22
- package/dist/runtime/stores/compareStore.d.ts +0 -7
- package/dist/runtime/stores/compareStore.js +0 -45
- package/dist/runtime/stores/countries.d.ts +0 -8
- package/dist/runtime/stores/countries.js +0 -15
- package/dist/runtime/stores/index.d.ts +0 -26
- package/dist/runtime/stores/index.js +0 -24
- package/dist/runtime/stores/locations.d.ts +0 -11
- package/dist/runtime/stores/locations.js +0 -19
- package/dist/runtime/stores/orders.d.ts +0 -16
- package/dist/runtime/stores/orders.js +0 -19
- package/dist/runtime/stores/product/README.md +0 -141
- package/dist/runtime/stores/product/slug.d.ts +0 -165
- package/dist/runtime/stores/product/slug.js +0 -91
- package/dist/runtime/stores/product.d.ts +0 -5
- package/dist/runtime/stores/product.js +0 -38
- package/dist/runtime/stores/quotations.d.ts +0 -12
- package/dist/runtime/stores/quotations.js +0 -19
- package/dist/runtime/stores/subscriptions.d.ts +0 -11
- package/dist/runtime/stores/subscriptions.js +0 -19
- package/dist/runtime/stores/useCompanyProfile.d.ts +0 -7
- package/dist/runtime/stores/useCompanyProfile.js +0 -22
- package/dist/runtime/stores/useNavMenuStore.d.ts +0 -5
- package/dist/runtime/stores/useNavMenuStore.js +0 -23
- package/dist/runtime/stores/webforms.d.ts +0 -18
- package/dist/runtime/stores/webforms.js +0 -23
- package/dist/runtime/stores/wishlists.d.ts +0 -136
- package/dist/runtime/stores/wishlists.js +0 -249
- package/dist/runtime/utils/api.d.ts +0 -13
- package/dist/runtime/utils/api.js +0 -98
- package/dist/runtime/utils/companyProfile.d.ts +0 -22
- package/dist/runtime/utils/companyProfile.js +0 -21
- package/dist/runtime/utils/htmlCache.d.ts +0 -5
- package/dist/runtime/utils/htmlCache.js +0 -64
- package/dist/types.d.mts +0 -7
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
interface PostData {
|
|
2
|
-
meta_title?: string;
|
|
3
|
-
meta_description?: string;
|
|
4
|
-
content?: {
|
|
5
|
-
css?: string;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
interface MagazineCard {
|
|
9
|
-
CardImg: string;
|
|
10
|
-
CardTitle: string;
|
|
11
|
-
}
|
|
12
|
-
interface BlogSingleProps {
|
|
13
|
-
postData?: PostData;
|
|
14
|
-
}
|
|
15
|
-
export declare const useBlogSingle: (props: BlogSingleProps) => {
|
|
16
|
-
magazineCards: import("vue").Ref<{
|
|
17
|
-
CardImg: string;
|
|
18
|
-
CardTitle: string;
|
|
19
|
-
}[], MagazineCard[] | {
|
|
20
|
-
CardImg: string;
|
|
21
|
-
CardTitle: string;
|
|
22
|
-
}[]>;
|
|
23
|
-
loading: import("vue").Ref<boolean, boolean>;
|
|
24
|
-
total: import("vue").Ref<number, number>;
|
|
25
|
-
progressPercentage: import("vue").ComputedRef<number>;
|
|
26
|
-
canLoadMore: import("vue").ComputedRef<boolean>;
|
|
27
|
-
fullPath: import("vue").ComputedRef<string>;
|
|
28
|
-
loadMore: () => Promise<void>;
|
|
29
|
-
};
|
|
30
|
-
export {};
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,59 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,65 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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 {};
|