flowrix 1.0.1-beta.83 → 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 -310
- 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,96 +0,0 @@
|
|
|
1
|
-
import { defineStore } from "pinia";
|
|
2
|
-
import { useApi } from "../utils/api.js";
|
|
3
|
-
export const useBookingStore = defineStore("booking", {
|
|
4
|
-
state: () => ({
|
|
5
|
-
calendar: [],
|
|
6
|
-
timeSlots: [],
|
|
7
|
-
selectedDate: null,
|
|
8
|
-
responseData: null,
|
|
9
|
-
errorResponseData: null,
|
|
10
|
-
isLoading: false
|
|
11
|
-
}),
|
|
12
|
-
actions: {
|
|
13
|
-
async getCalendar(calendarId = 4) {
|
|
14
|
-
try {
|
|
15
|
-
this.isLoading = true;
|
|
16
|
-
const { get } = useApi();
|
|
17
|
-
const apiUrl = "services/calendar";
|
|
18
|
-
const params = {
|
|
19
|
-
calendar: calendarId
|
|
20
|
-
};
|
|
21
|
-
const response = await get(apiUrl, { params });
|
|
22
|
-
if (response) {
|
|
23
|
-
this.calendar = response.data || response;
|
|
24
|
-
}
|
|
25
|
-
} catch (error) {
|
|
26
|
-
console.error("Error fetching calendar:", error);
|
|
27
|
-
this.errorResponseData = error;
|
|
28
|
-
} finally {
|
|
29
|
-
this.isLoading = false;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
async fetchTimeSlots(bookingDate, calendarId = 4) {
|
|
33
|
-
try {
|
|
34
|
-
this.isLoading = true;
|
|
35
|
-
this.selectedDate = bookingDate;
|
|
36
|
-
const { get } = useApi();
|
|
37
|
-
const apiUrl = "services/gettimeslots";
|
|
38
|
-
const params = {
|
|
39
|
-
calendar: calendarId,
|
|
40
|
-
booking_date: bookingDate
|
|
41
|
-
};
|
|
42
|
-
const response = await get(apiUrl, { params });
|
|
43
|
-
if (response) {
|
|
44
|
-
this.timeSlots = response.data || response;
|
|
45
|
-
}
|
|
46
|
-
} catch (error) {
|
|
47
|
-
console.error("Error fetching time slots:", error);
|
|
48
|
-
this.errorResponseData = error;
|
|
49
|
-
} finally {
|
|
50
|
-
this.isLoading = false;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
async saveBookingSlot(bookingData) {
|
|
54
|
-
try {
|
|
55
|
-
this.isLoading = true;
|
|
56
|
-
const { post } = useApi();
|
|
57
|
-
const apiUrl = "services/calendar/save";
|
|
58
|
-
const response = await post(apiUrl, bookingData);
|
|
59
|
-
if (response) {
|
|
60
|
-
this.responseData = response;
|
|
61
|
-
return response;
|
|
62
|
-
}
|
|
63
|
-
} catch (error) {
|
|
64
|
-
console.error("Error saving booking slot:", error);
|
|
65
|
-
this.errorResponseData = error;
|
|
66
|
-
throw error;
|
|
67
|
-
} finally {
|
|
68
|
-
this.isLoading = false;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
// Clear error state
|
|
72
|
-
clearErrors() {
|
|
73
|
-
this.errorResponseData = null;
|
|
74
|
-
},
|
|
75
|
-
// Reset store state
|
|
76
|
-
resetBooking() {
|
|
77
|
-
this.calendar = [];
|
|
78
|
-
this.timeSlots = [];
|
|
79
|
-
this.selectedDate = null;
|
|
80
|
-
this.responseData = null;
|
|
81
|
-
this.errorResponseData = null;
|
|
82
|
-
this.isLoading = false;
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
getters: {
|
|
86
|
-
availableCalendarDates: (state) => {
|
|
87
|
-
return state.calendar.filter((item) => item.available);
|
|
88
|
-
},
|
|
89
|
-
availableTimeSlots: (state) => {
|
|
90
|
-
return state.timeSlots.filter((slot) => slot.available);
|
|
91
|
-
},
|
|
92
|
-
hasErrors: (state) => {
|
|
93
|
-
return !!state.errorResponseData;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export interface CouponData {
|
|
2
|
-
remove?: number;
|
|
3
|
-
code: string;
|
|
4
|
-
}
|
|
5
|
-
export interface CheckoutSession {
|
|
6
|
-
cart: Record<string, CartItem> | undefined;
|
|
7
|
-
vouchercodes: string[];
|
|
8
|
-
fields?: Record<string, any>;
|
|
9
|
-
code: string;
|
|
10
|
-
abndToken?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface CartItem {
|
|
13
|
-
cart: Record<string, CartItem> | undefined;
|
|
14
|
-
vouchercodes: string[];
|
|
15
|
-
fields?: CheckoutSession["fields"];
|
|
16
|
-
code: string;
|
|
17
|
-
qty?: number;
|
|
18
|
-
abndToken?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ApplyCoupon {
|
|
21
|
-
cart: Record<string, CartItem> | undefined;
|
|
22
|
-
vouchercodes: string[];
|
|
23
|
-
fields?: CheckoutSession["fields"];
|
|
24
|
-
code: string;
|
|
25
|
-
abndToken?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface CartData {
|
|
28
|
-
rowId: string;
|
|
29
|
-
cart: Record<string, CartItem> | undefined;
|
|
30
|
-
qty?: number;
|
|
31
|
-
abndToken?: string;
|
|
32
|
-
deliverymethod?: number | string;
|
|
33
|
-
shipping_state?: string | number;
|
|
34
|
-
shipping_postcode?: number;
|
|
35
|
-
shipping_country?: string | number;
|
|
36
|
-
shippingmethod?: string | number;
|
|
37
|
-
vouchercodes?: string[];
|
|
38
|
-
}
|
|
39
|
-
export interface RelatedData {
|
|
40
|
-
cart: Record<string, CartItem> | undefined;
|
|
41
|
-
qty?: number;
|
|
42
|
-
abndToken?: string;
|
|
43
|
-
deliverymethod?: number | string;
|
|
44
|
-
shipping_state?: string | number;
|
|
45
|
-
shipping_postcode?: number;
|
|
46
|
-
shipping_country?: string | number;
|
|
47
|
-
shippingmethod?: string | number;
|
|
48
|
-
vouchercodes?: string[];
|
|
49
|
-
}
|
|
50
|
-
export interface FormData {
|
|
51
|
-
cart: Record<string, CartItem> | undefined;
|
|
52
|
-
qty: number;
|
|
53
|
-
rowId: string;
|
|
54
|
-
data?: Record<string, any>;
|
|
55
|
-
abndToken?: string;
|
|
56
|
-
deliverymethod?: number | string;
|
|
57
|
-
shipping_state?: string | number;
|
|
58
|
-
shipping_postcode?: number;
|
|
59
|
-
shipping_country?: string | number;
|
|
60
|
-
shippingmethod?: string | number;
|
|
61
|
-
vouchercodes?: string[];
|
|
62
|
-
}
|
|
63
|
-
export interface CartState {
|
|
64
|
-
cart: {
|
|
65
|
-
items?: Record<string, CartItem>;
|
|
66
|
-
totals?: Record<string, any>;
|
|
67
|
-
abndToken?: string;
|
|
68
|
-
fields?: CheckoutSession["fields"];
|
|
69
|
-
};
|
|
70
|
-
lastitem?: any;
|
|
71
|
-
activeService: [];
|
|
72
|
-
coupon: string[];
|
|
73
|
-
data: [];
|
|
74
|
-
responseData: [];
|
|
75
|
-
errorResponseData: Record<string, any>;
|
|
76
|
-
addedResponse: string;
|
|
77
|
-
relatedProducts: any[];
|
|
78
|
-
}
|
|
79
|
-
export declare const useCartStore: import("pinia").StoreDefinition<"cart", CartState, {}, {}>;
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import { defineStore } from "pinia";
|
|
2
|
-
import { flowrixApi } from "../middleware/flowrix.js";
|
|
3
|
-
import { useCheckoutStore } from "./Checkout.js";
|
|
4
|
-
import { useRuntimeConfig } from "#imports";
|
|
5
|
-
import { GTM_add_to_cart } from "../composables/useDataLayer.js";
|
|
6
|
-
export const useCartStore = defineStore("cart", {
|
|
7
|
-
state: () => ({
|
|
8
|
-
cart: {},
|
|
9
|
-
lastitem: {},
|
|
10
|
-
activeService: [],
|
|
11
|
-
coupon: [],
|
|
12
|
-
data: [],
|
|
13
|
-
responseData: [],
|
|
14
|
-
errorResponseData: {},
|
|
15
|
-
addedResponse: ""
|
|
16
|
-
}),
|
|
17
|
-
actions: {
|
|
18
|
-
transformData(data) {
|
|
19
|
-
const attribute_id = {};
|
|
20
|
-
const fraction = {};
|
|
21
|
-
for (const [key, value] of Object.entries(data)) {
|
|
22
|
-
const match = key.match(/(attribute_id|fraction)\[(\d+)\]/);
|
|
23
|
-
if (match) {
|
|
24
|
-
const [, type, id] = match;
|
|
25
|
-
if (type === "attribute_id") {
|
|
26
|
-
attribute_id[id] = value;
|
|
27
|
-
} else if (type === "fraction") {
|
|
28
|
-
fraction[id] = value;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return { attribute_id, fraction };
|
|
33
|
-
},
|
|
34
|
-
async addToCart(product, qty, data, productId = "", service = []) {
|
|
35
|
-
const checkoutSession = useCheckoutStore().checkoutSession;
|
|
36
|
-
let formData = {
|
|
37
|
-
cart: void 0,
|
|
38
|
-
qty: qty ?? 1,
|
|
39
|
-
rowId: productId,
|
|
40
|
-
deliverymethod: checkoutSession?.fields?.deliverymethod,
|
|
41
|
-
shippingmethod: checkoutSession?.fields?.shippingmethod
|
|
42
|
-
};
|
|
43
|
-
if (this.coupon?.length > 0) {
|
|
44
|
-
formData.vouchercodes = this.coupon;
|
|
45
|
-
}
|
|
46
|
-
if (this.cart.items != void 0) {
|
|
47
|
-
formData.cart = this.cart.items;
|
|
48
|
-
formData.abndToken = this.cart.abndToken;
|
|
49
|
-
}
|
|
50
|
-
if (data) {
|
|
51
|
-
formData = { ...formData, ...this.transformData(data) };
|
|
52
|
-
}
|
|
53
|
-
let apiUrl = "";
|
|
54
|
-
if (productId) {
|
|
55
|
-
if (this.cart.items != void 0) {
|
|
56
|
-
formData.qty = this.cart.items[productId]?.qty ?? 1;
|
|
57
|
-
}
|
|
58
|
-
apiUrl = `cart/${product.slug}/update`;
|
|
59
|
-
formData.rowId = productId;
|
|
60
|
-
} else {
|
|
61
|
-
apiUrl = `cart/${product.slug}/add`;
|
|
62
|
-
}
|
|
63
|
-
if (service?.length !== 0) {
|
|
64
|
-
formData.deliverymethod = service.fulfilment_id;
|
|
65
|
-
apiUrl = `cart/service/${service.slug}/add`;
|
|
66
|
-
}
|
|
67
|
-
try {
|
|
68
|
-
const config = useRuntimeConfig();
|
|
69
|
-
const response = await flowrixApi.post(
|
|
70
|
-
apiUrl,
|
|
71
|
-
config,
|
|
72
|
-
{
|
|
73
|
-
body: formData
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
if (response?.status == "Success") {
|
|
77
|
-
this.addedResponse = "success";
|
|
78
|
-
this.cart = {
|
|
79
|
-
["items"]: response?.data.cart,
|
|
80
|
-
["totals"]: response?.data.calculations,
|
|
81
|
-
["abndToken"]: response?.data.abndToken
|
|
82
|
-
};
|
|
83
|
-
this.lastitem = response?.data.lastitem;
|
|
84
|
-
GTM_add_to_cart(response?.data.lastitem);
|
|
85
|
-
GTM_remove_from_cart(response?.data.lastitem);
|
|
86
|
-
useCheckoutStore().saveToCheckoutSession({
|
|
87
|
-
cart: response?.data,
|
|
88
|
-
calculations: response?.data.calculations,
|
|
89
|
-
abndToken: response?.data.abndToken,
|
|
90
|
-
fields: checkoutSession?.fields
|
|
91
|
-
});
|
|
92
|
-
} else {
|
|
93
|
-
this.addedResponse = "no";
|
|
94
|
-
}
|
|
95
|
-
} catch (error) {
|
|
96
|
-
console.error("Error adding to cart:", error);
|
|
97
|
-
this.addedResponse = "";
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
async fetchRelated() {
|
|
101
|
-
try {
|
|
102
|
-
const request = {
|
|
103
|
-
cart: this.cart.items
|
|
104
|
-
};
|
|
105
|
-
const apiUrl = `/api/cart/related`;
|
|
106
|
-
const response = await $fetch(apiUrl, {
|
|
107
|
-
method: "POST",
|
|
108
|
-
body: request
|
|
109
|
-
});
|
|
110
|
-
return response;
|
|
111
|
-
} catch (error) {
|
|
112
|
-
console.error("Error removing from cart:", error);
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
async removeFromCart(id, product) {
|
|
116
|
-
try {
|
|
117
|
-
const checkoutSession = useCheckoutStore().checkoutSession;
|
|
118
|
-
const apiUrl = `cart/remove`;
|
|
119
|
-
const request = {
|
|
120
|
-
cart: this.cart.items,
|
|
121
|
-
rowId: id,
|
|
122
|
-
abndToken: this.cart.abndToken,
|
|
123
|
-
deliverymethod: checkoutSession?.fields?.deliverymethod,
|
|
124
|
-
shippingmethod: checkoutSession?.fields?.shippingmethod
|
|
125
|
-
};
|
|
126
|
-
if (product.type === "service" || product.fulfilment_id !== void 0) {
|
|
127
|
-
request.deliverymethod = 1;
|
|
128
|
-
}
|
|
129
|
-
if (this.coupon?.length > 0) {
|
|
130
|
-
request.vouchercodes = this.coupon;
|
|
131
|
-
}
|
|
132
|
-
const config = useRuntimeConfig();
|
|
133
|
-
const response = await flowrixApi.post(apiUrl, config, {
|
|
134
|
-
body: request
|
|
135
|
-
});
|
|
136
|
-
if (response?.status == "Success") {
|
|
137
|
-
this.cart = {
|
|
138
|
-
["items"]: response?.data.cart,
|
|
139
|
-
["totals"]: response?.data.calculations,
|
|
140
|
-
["abndToken"]: response?.data.abndToken
|
|
141
|
-
};
|
|
142
|
-
this.lastitem = response?.data.lastitem;
|
|
143
|
-
GTM_remove_from_cart(response?.data.lastitem);
|
|
144
|
-
useCheckoutStore().saveToCheckoutSession({
|
|
145
|
-
cart: response.cart.items,
|
|
146
|
-
calculations: response.cart.calculations,
|
|
147
|
-
abndToken: response.cart.abndToken,
|
|
148
|
-
fields: checkoutSession?.fields
|
|
149
|
-
});
|
|
150
|
-
} else {
|
|
151
|
-
this.cart = {};
|
|
152
|
-
}
|
|
153
|
-
} catch (error) {
|
|
154
|
-
console.error("Error removing from cart:", error);
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
async updateQuantity(product, qty) {
|
|
158
|
-
try {
|
|
159
|
-
const checkoutSession = useCheckoutStore().checkoutSession;
|
|
160
|
-
const apiUrl = `cart/${product.slug}/update`;
|
|
161
|
-
const request = {
|
|
162
|
-
cart: this.cart.items,
|
|
163
|
-
rowId: product.rowId,
|
|
164
|
-
qty,
|
|
165
|
-
deliverymethod: checkoutSession?.fields?.deliverymethod,
|
|
166
|
-
shippingmethod: checkoutSession?.fields?.shippingmethod,
|
|
167
|
-
abndToken: this.cart.abndToken
|
|
168
|
-
};
|
|
169
|
-
if (this.coupon?.length > 0) {
|
|
170
|
-
request.vouchercodes = this.coupon;
|
|
171
|
-
}
|
|
172
|
-
const config = useRuntimeConfig();
|
|
173
|
-
const response = await flowrixApi.post(apiUrl, config, {
|
|
174
|
-
body: request
|
|
175
|
-
});
|
|
176
|
-
if (response?.status == "Success") {
|
|
177
|
-
this.cart = {
|
|
178
|
-
["items"]: response?.data.cart,
|
|
179
|
-
["totals"]: response?.data.calculations,
|
|
180
|
-
["abndToken"]: response?.data.abndToken
|
|
181
|
-
};
|
|
182
|
-
this.lastitem = response?.data.lastitem;
|
|
183
|
-
if (qty < product.qty) {
|
|
184
|
-
GTM_remove_from_cart(this.lastitem);
|
|
185
|
-
META_remove_from_cart(this.lastitem);
|
|
186
|
-
} else {
|
|
187
|
-
GTM_add_to_cart(this.lastitem);
|
|
188
|
-
META_add_to_cart(this.lastitem);
|
|
189
|
-
}
|
|
190
|
-
useCheckoutStore().saveToCheckoutSession({
|
|
191
|
-
cart: response.data.cart,
|
|
192
|
-
calculations: response.data.calculations,
|
|
193
|
-
abndToken: response.data.abndToken,
|
|
194
|
-
fields: checkoutSession?.fields
|
|
195
|
-
});
|
|
196
|
-
} else {
|
|
197
|
-
this.cart = {};
|
|
198
|
-
}
|
|
199
|
-
} catch (error) {
|
|
200
|
-
console.error("Error updating quantity:", error);
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
async ApplyCoupon(coupon) {
|
|
204
|
-
try {
|
|
205
|
-
let couponsCodes = this.coupon || [];
|
|
206
|
-
const checkoutSession = useCheckoutStore().checkoutSession;
|
|
207
|
-
let apiUrl = "checkout/applyCoupon";
|
|
208
|
-
const removeValue = coupon.remove ?? void 0;
|
|
209
|
-
if (removeValue !== void 0) {
|
|
210
|
-
couponsCodes.splice(removeValue, 1);
|
|
211
|
-
apiUrl = "checkout/remove-coupon";
|
|
212
|
-
}
|
|
213
|
-
const couponData = {
|
|
214
|
-
cart: this.cart.items,
|
|
215
|
-
vouchercodes: Array.from(new Set(couponsCodes)),
|
|
216
|
-
fields: checkoutSession?.fields,
|
|
217
|
-
code: removeValue === void 0 ? coupon.code : "",
|
|
218
|
-
abndToken: this.cart.abndToken
|
|
219
|
-
};
|
|
220
|
-
const config = useRuntimeConfig();
|
|
221
|
-
const response = await flowrixApi.post(apiUrl, config, {
|
|
222
|
-
body: couponData
|
|
223
|
-
});
|
|
224
|
-
if (response?.status === "Success" && response?.data?.calculations) {
|
|
225
|
-
this.cart.totals = response.data.calculations;
|
|
226
|
-
if (removeValue === void 0) {
|
|
227
|
-
couponsCodes.push(coupon.code);
|
|
228
|
-
}
|
|
229
|
-
this.coupon = Array.from(new Set(couponsCodes));
|
|
230
|
-
useCheckoutStore().saveToCheckoutSession(response.data);
|
|
231
|
-
this.errorResponseData = {};
|
|
232
|
-
this.cart = {
|
|
233
|
-
["items"]: response?.data.cart,
|
|
234
|
-
["totals"]: response?.data.calculations,
|
|
235
|
-
["abndToken"]: response?.data.abndToken
|
|
236
|
-
};
|
|
237
|
-
this.lastitem = response?.data.lastitem;
|
|
238
|
-
useCheckoutStore().saveToCheckoutSession({
|
|
239
|
-
cart: response?.data,
|
|
240
|
-
calculations: response?.data.calculations,
|
|
241
|
-
abndToken: response?.data.abndToken,
|
|
242
|
-
fields: checkoutSession?.fields
|
|
243
|
-
});
|
|
244
|
-
return response;
|
|
245
|
-
} else {
|
|
246
|
-
const errorMessage = response?.message || "Failed to apply coupon";
|
|
247
|
-
this.errorResponseData = { message: errorMessage };
|
|
248
|
-
throw new Error(errorMessage);
|
|
249
|
-
}
|
|
250
|
-
} catch (error) {
|
|
251
|
-
console.error("Apply coupon error:", error);
|
|
252
|
-
const errorMessage = error.data ? formatErrorMessage(error.data.message) : error.message || "Failed to apply coupon";
|
|
253
|
-
this.errorResponseData = { message: errorMessage };
|
|
254
|
-
throw new Error(errorMessage);
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
async AbandonedCartComplete(token) {
|
|
258
|
-
try {
|
|
259
|
-
const apiUrl = `/api/cart/abandoned/${token}/complete`;
|
|
260
|
-
await $fetch(apiUrl, {
|
|
261
|
-
method: "POST"
|
|
262
|
-
});
|
|
263
|
-
} catch (error) {
|
|
264
|
-
console.error("Error completing abandoned cart:", error);
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
async fetchAbandonedCart(token) {
|
|
268
|
-
try {
|
|
269
|
-
const apiUrl = `/api/cart/abandoned/${token}`;
|
|
270
|
-
const response = await $fetch(apiUrl);
|
|
271
|
-
if (response?.data?.cart) {
|
|
272
|
-
this.cart = {
|
|
273
|
-
items: response.data.cart,
|
|
274
|
-
totals: response.data.calculations,
|
|
275
|
-
abndToken: response.data.abndToken,
|
|
276
|
-
fields: response.data.fields
|
|
277
|
-
};
|
|
278
|
-
useCheckoutStore().saveToCheckoutSession(response.data);
|
|
279
|
-
}
|
|
280
|
-
} catch (error) {
|
|
281
|
-
console.error("Error fetching abandoned cart:", error);
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
clearCoupon() {
|
|
285
|
-
this.coupon = [];
|
|
286
|
-
},
|
|
287
|
-
clearCart() {
|
|
288
|
-
this.cart = {};
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
getters: {
|
|
292
|
-
itemsCount() {
|
|
293
|
-
if (this.cart?.items) {
|
|
294
|
-
return Object.values(this.cart.items).reduce(
|
|
295
|
-
(total, item) => {
|
|
296
|
-
return total + (typeof item.qty === "number" ? item.qty : 10);
|
|
297
|
-
},
|
|
298
|
-
0
|
|
299
|
-
);
|
|
300
|
-
}
|
|
301
|
-
return 0;
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
persist: {
|
|
305
|
-
enabled: true,
|
|
306
|
-
// simple shape that works with most versions:
|
|
307
|
-
key: "cart",
|
|
308
|
-
storage: typeof window !== "undefined" ? localStorage : void 0
|
|
309
|
-
}
|
|
310
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface CategoryState {
|
|
2
|
-
data: Record<string, any>;
|
|
3
|
-
category: Record<string, any>;
|
|
4
|
-
currentPage: number;
|
|
5
|
-
slug: string | null;
|
|
6
|
-
error: string | null;
|
|
7
|
-
}
|
|
8
|
-
export declare const useCategories: import("pinia").StoreDefinition<"Categories", CategoryState, {}, {
|
|
9
|
-
getCategories(slug: string, query?: {}): Promise<void>;
|
|
10
|
-
getChildCategories(slug: string, query?: {}): Promise<void>;
|
|
11
|
-
getAllCategories(query: any): Promise<void>;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { defineStore } from "pinia";
|
|
2
|
-
export const useCategories = defineStore("Categories", {
|
|
3
|
-
state: () => ({
|
|
4
|
-
data: {},
|
|
5
|
-
category: {},
|
|
6
|
-
allCategories: {},
|
|
7
|
-
currentPage: 1,
|
|
8
|
-
slug: null,
|
|
9
|
-
error: null
|
|
10
|
-
}),
|
|
11
|
-
actions: {
|
|
12
|
-
async getCategories(slug, query = {}) {
|
|
13
|
-
try {
|
|
14
|
-
this.slug = slug;
|
|
15
|
-
let tags = "";
|
|
16
|
-
if (slug == "blinds-spare-parts") {
|
|
17
|
-
tags = "spare-part";
|
|
18
|
-
}
|
|
19
|
-
if (tags != "") {
|
|
20
|
-
query.tags = tags;
|
|
21
|
-
}
|
|
22
|
-
const apiUrl = `categories/${slug}`;
|
|
23
|
-
const response = await $fetch(apiUrl, { params: query });
|
|
24
|
-
if (response.status === 200) {
|
|
25
|
-
this.data = response.data;
|
|
26
|
-
this.category = response.data.category;
|
|
27
|
-
this.error = null;
|
|
28
|
-
} else {
|
|
29
|
-
this.data = {};
|
|
30
|
-
this.error = "No data found";
|
|
31
|
-
}
|
|
32
|
-
} catch (error) {
|
|
33
|
-
if (error.response) {
|
|
34
|
-
this.error = error.response.data.message || "An error occurred";
|
|
35
|
-
console.error(error.response);
|
|
36
|
-
} else {
|
|
37
|
-
this.error = "An error occurred";
|
|
38
|
-
console.error(error);
|
|
39
|
-
}
|
|
40
|
-
this.data = {};
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
async getChildCategories(slug, query = {}) {
|
|
44
|
-
try {
|
|
45
|
-
this.slug = slug;
|
|
46
|
-
const apiUrl = `categories/childern/${slug}`;
|
|
47
|
-
const response = await $fetch(apiUrl, { params: query });
|
|
48
|
-
if (response.status === 200) {
|
|
49
|
-
this.data = response.data.data;
|
|
50
|
-
this.category = response.data.data.category;
|
|
51
|
-
this.error = null;
|
|
52
|
-
} else {
|
|
53
|
-
this.data = {};
|
|
54
|
-
this.error = "No data found";
|
|
55
|
-
}
|
|
56
|
-
} catch (error) {
|
|
57
|
-
if (error.response) {
|
|
58
|
-
this.error = error.response.data.message || "An error occurred";
|
|
59
|
-
console.error(error.response);
|
|
60
|
-
} else {
|
|
61
|
-
this.error = "An error occurred";
|
|
62
|
-
console.error(error);
|
|
63
|
-
}
|
|
64
|
-
this.data = {};
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
async getAllCategories(query) {
|
|
68
|
-
try {
|
|
69
|
-
const apiUrl = `categories`;
|
|
70
|
-
const response = await $fetch(apiUrl, { params: query });
|
|
71
|
-
if (response.status === 200) {
|
|
72
|
-
this.allCategories = response.data;
|
|
73
|
-
this.error = null;
|
|
74
|
-
} else {
|
|
75
|
-
this.allCategories = {};
|
|
76
|
-
this.error = "No data found";
|
|
77
|
-
}
|
|
78
|
-
} catch (error) {
|
|
79
|
-
if (error.response) {
|
|
80
|
-
this.error = error.response.data.message || "An error occurred";
|
|
81
|
-
console.error(error.response);
|
|
82
|
-
} else {
|
|
83
|
-
this.error = "An error occurred";
|
|
84
|
-
console.error(error);
|
|
85
|
-
}
|
|
86
|
-
this.allCategories = {};
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
export interface PreferenceData {
|
|
2
|
-
fields?: Record<string, any>;
|
|
3
|
-
deliverytype?: string;
|
|
4
|
-
order_no?: string;
|
|
5
|
-
publishableKey?: any;
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
}
|
|
8
|
-
export interface CartItem {
|
|
9
|
-
fields?: Record<string, any>;
|
|
10
|
-
deliverytype?: string;
|
|
11
|
-
order_no?: string;
|
|
12
|
-
publishableKey?: any;
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}
|
|
15
|
-
export interface Country {
|
|
16
|
-
id: number | string;
|
|
17
|
-
}
|
|
18
|
-
export interface ConfigData {
|
|
19
|
-
preferences?: Record<string, any>[];
|
|
20
|
-
outlets?: Record<string, any>[];
|
|
21
|
-
deliverytype?: string;
|
|
22
|
-
order_no?: string;
|
|
23
|
-
publishableKey?: any;
|
|
24
|
-
calculations?: any;
|
|
25
|
-
shippingmethods?: any;
|
|
26
|
-
cart?: Record<string, CartItem>;
|
|
27
|
-
totals?: Record<string, any>;
|
|
28
|
-
[key: string]: any;
|
|
29
|
-
}
|
|
30
|
-
export interface FieldData {
|
|
31
|
-
billing_state?: number | string;
|
|
32
|
-
billing_firstname?: string | number;
|
|
33
|
-
firstname?: string | number;
|
|
34
|
-
billing_lastname?: string | number;
|
|
35
|
-
lastname?: string | number;
|
|
36
|
-
email?: string | number;
|
|
37
|
-
billing_mobile?: string | number;
|
|
38
|
-
billing_address?: string | number;
|
|
39
|
-
billing_suburb?: string | undefined;
|
|
40
|
-
billing_postcode?: number | undefined;
|
|
41
|
-
shipping_postcode?: number | undefined;
|
|
42
|
-
deliverymethod?: number | string;
|
|
43
|
-
shippingmethod?: number | string;
|
|
44
|
-
authoritytoleave?: number | undefined;
|
|
45
|
-
customernotes?: string;
|
|
46
|
-
shippingasbilling?: boolean;
|
|
47
|
-
shipping_address?: string;
|
|
48
|
-
shipping_country?: number | string;
|
|
49
|
-
shipping_state?: number | string;
|
|
50
|
-
shipping_suburb?: string;
|
|
51
|
-
shipping_firstname?: string;
|
|
52
|
-
shipping_fullname?: string;
|
|
53
|
-
shipping_lastname?: string;
|
|
54
|
-
shipping_middlename?: string;
|
|
55
|
-
shipping_mobile?: string;
|
|
56
|
-
billing_fullname?: string;
|
|
57
|
-
billing_middlename?: string;
|
|
58
|
-
mobile?: string | number;
|
|
59
|
-
fullname?: string;
|
|
60
|
-
invoice?: string;
|
|
61
|
-
quotation_no?: string;
|
|
62
|
-
[key: string]: any;
|
|
63
|
-
}
|
|
64
|
-
export interface CheckoutState {
|
|
65
|
-
publishableKey: Record<string, any>;
|
|
66
|
-
responseData: any[];
|
|
67
|
-
config: ConfigData;
|
|
68
|
-
checkoutSession: PreferenceData & {
|
|
69
|
-
fields?: FieldData;
|
|
70
|
-
calculations?: any;
|
|
71
|
-
};
|
|
72
|
-
errorResponseData: Record<string, any>;
|
|
73
|
-
checkCustomer: any;
|
|
74
|
-
stripeElemets: any;
|
|
75
|
-
orderData: any;
|
|
76
|
-
PaymentErrors: any;
|
|
77
|
-
loading: boolean;
|
|
78
|
-
}
|
|
79
|
-
export declare const useCheckoutStore: import("pinia").StoreDefinition<"checkout", CheckoutState, {}, {}>;
|