flowrix 1.0.1-beta.85 → 1.0.1-beta.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +3 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +336 -0
- package/dist/runtime/composables/Blog/useBlogIndex.d.ts +108 -0
- package/dist/runtime/composables/Blog/useBlogIndex.js +86 -0
- package/dist/runtime/composables/Blog/useBlogMain.d.ts +13 -0
- package/dist/runtime/composables/Blog/useBlogMain.js +7 -0
- package/dist/runtime/composables/Blog/useBlogSidebar.d.ts +7 -0
- package/dist/runtime/composables/Blog/useBlogSidebar.js +37 -0
- package/dist/runtime/composables/Blog/useBlogSingle.d.ts +30 -0
- package/dist/runtime/composables/Blog/useBlogSingle.js +87 -0
- package/dist/runtime/composables/Blog/useMagazineCard.d.ts +13 -0
- package/dist/runtime/composables/Blog/useMagazineCard.js +14 -0
- package/dist/runtime/composables/Blog/useSingleBlogMain.d.ts +20 -0
- package/dist/runtime/composables/Blog/useSingleBlogMain.js +28 -0
- package/dist/runtime/composables/Brand/brand.d.ts +7 -0
- package/dist/runtime/composables/Brand/brand.js +47 -0
- package/dist/runtime/composables/Cart/useCart.d.ts +40 -0
- package/dist/runtime/composables/Cart/useCart.js +10 -0
- package/dist/runtime/composables/Cart/useCartDetail.d.ts +59 -0
- package/dist/runtime/composables/Cart/useCartDetail.js +51 -0
- package/dist/runtime/composables/Category/useCategoryContent.d.ts +9 -0
- package/dist/runtime/composables/Category/useCategoryContent.js +15 -0
- package/dist/runtime/composables/Category/useCategoryGrid.d.ts +40 -0
- package/dist/runtime/composables/Category/useCategoryGrid.js +38 -0
- package/dist/runtime/composables/Category/useCategoryIndex.d.ts +33 -0
- package/dist/runtime/composables/Category/useCategoryIndex.js +65 -0
- package/dist/runtime/composables/Category/useCategoryTop.d.ts +18 -0
- package/dist/runtime/composables/Category/useCategoryTop.js +65 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.d.ts +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.js +22 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.d.ts +8 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useEway.js +88 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +52 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +155 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +48 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +90 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.d.ts +15 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +135 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.d.ts +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.js +22 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +7 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.js +43 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.d.ts +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.js +22 -0
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +197 -0
- package/dist/runtime/composables/Checkout/useCheckout.js +374 -0
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +43 -0
- package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.js +84 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +55 -0
- package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.js +196 -0
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +15 -0
- package/dist/runtime/composables/Checkout/useCreateAccount.js +63 -0
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +4 -0
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +37 -0
- package/dist/runtime/composables/Customer/useBillingAddress.d.ts +112 -0
- package/dist/runtime/composables/Customer/useBillingAddress.js +93 -0
- package/dist/runtime/composables/Customer/useLogin.d.ts +9 -0
- package/dist/runtime/composables/Customer/useLogin.js +34 -0
- package/dist/runtime/composables/Customer/useOrders.d.ts +29 -0
- package/dist/runtime/composables/Customer/useOrders.js +56 -0
- package/dist/runtime/composables/Customer/usePasswordReset.d.ts +26 -0
- package/dist/runtime/composables/Customer/usePasswordReset.js +258 -0
- package/dist/runtime/composables/Customer/useProfile.d.ts +75 -0
- package/dist/runtime/composables/Customer/useProfile.js +106 -0
- package/dist/runtime/composables/Customer/useQuotations.d.ts +32 -0
- package/dist/runtime/composables/Customer/useQuotations.js +40 -0
- package/dist/runtime/composables/Customer/useRegister.d.ts +127 -0
- package/dist/runtime/composables/Customer/useRegister.js +325 -0
- package/dist/runtime/composables/Customer/useShippingAddress.d.ts +121 -0
- package/dist/runtime/composables/Customer/useShippingAddress.js +145 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +21 -0
- package/dist/runtime/composables/Customer/useUpdatePassword.js +94 -0
- package/dist/runtime/composables/Customer/useUserCards.d.ts +22 -0
- package/dist/runtime/composables/Customer/useUserCards.js +65 -0
- package/dist/runtime/composables/Customer/useWishlists.d.ts +25 -0
- package/dist/runtime/composables/Customer/useWishlists.js +183 -0
- package/dist/runtime/composables/Extras/useCountry.d.ts +11 -0
- package/dist/runtime/composables/Extras/useCountry.js +12 -0
- package/dist/runtime/composables/Extras/useDateFormatter.d.ts +4 -0
- package/dist/runtime/composables/Extras/useDateFormatter.js +20 -0
- package/dist/runtime/composables/Extras/useNumberOnly.d.ts +5 -0
- package/dist/runtime/composables/Extras/useNumberOnly.js +21 -0
- package/dist/runtime/composables/Extras/usePasswordFormatter.d.ts +8 -0
- package/dist/runtime/composables/Extras/usePasswordFormatter.js +61 -0
- package/dist/runtime/composables/Extras/useSrcSets.d.ts +8 -0
- package/dist/runtime/composables/Extras/useSrcSets.js +26 -0
- package/dist/runtime/composables/Extras/useTogglePassword.d.ts +4 -0
- package/dist/runtime/composables/Extras/useTogglePassword.js +11 -0
- package/dist/runtime/composables/Footer/useFooter.d.ts +14 -0
- package/dist/runtime/composables/Footer/useFooter.js +61 -0
- package/dist/runtime/composables/Header/useHeader.d.ts +14 -0
- package/dist/runtime/composables/Header/useHeader.js +67 -0
- package/dist/runtime/composables/Menu/MainMenu.d.ts +4 -0
- package/dist/runtime/composables/Menu/MainMenu.js +17 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributeType.d.ts +3 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributeType.js +20 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributes.d.ts +70 -0
- package/dist/runtime/composables/Product/CustomProduct/useAttributes.js +68 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomProduct.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomProduct.js +107 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.d.ts +159 -0
- package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.js +2080 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleAttribute.d.ts +4 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleAttribute.js +27 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleStep.d.ts +68 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleStep.js +21 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleValue.d.ts +67 -0
- package/dist/runtime/composables/Product/CustomProduct/useSingleValue.js +15 -0
- package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProduct/useSteps.js +78 -0
- package/dist/runtime/composables/Product/simpleProduct/useSimpleProduct.d.ts +25 -0
- package/dist/runtime/composables/Product/simpleProduct/useSimpleProduct.js +77 -0
- package/dist/runtime/composables/Product/useProductCard.d.ts +13 -0
- package/dist/runtime/composables/Product/useProductCard.js +88 -0
- package/dist/runtime/composables/Product/useProductComponent.d.ts +5 -0
- package/dist/runtime/composables/Product/useProductComponent.js +23 -0
- package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -0
- package/dist/runtime/composables/Product/useProductSlug.js +25 -0
- package/dist/runtime/composables/Product/useQuickView.d.ts +8 -0
- package/dist/runtime/composables/Product/useQuickView.js +27 -0
- package/dist/runtime/composables/Product/useService.d.ts +17 -0
- package/dist/runtime/composables/Product/useService.js +64 -0
- package/dist/runtime/composables/Product/useTemplate.d.ts +5 -0
- package/dist/runtime/composables/Product/useTemplate.js +21 -0
- package/dist/runtime/composables/Samples/useSamples.d.ts +10 -0
- package/dist/runtime/composables/Samples/useSamples.js +36 -0
- package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +6 -0
- package/dist/runtime/composables/SideBar/Filters/useFilters.js +51 -0
- package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +5 -0
- package/dist/runtime/composables/SideBar/Filters/useSorting.js +27 -0
- package/dist/runtime/composables/SideBar/useSideBar.d.ts +8 -0
- package/dist/runtime/composables/SideBar/useSideBar.js +68 -0
- package/dist/runtime/composables/index.d.ts +78 -0
- package/dist/runtime/composables/index.js +78 -0
- package/dist/runtime/composables/types.d.ts +5 -0
- package/dist/runtime/composables/types.js +0 -0
- package/dist/runtime/composables/useAddToCart.d.ts +28 -0
- package/dist/runtime/composables/useAddToCart.js +111 -0
- package/dist/runtime/composables/useAddresses.d.ts +18 -0
- package/dist/runtime/composables/useAddresses.js +126 -0
- package/dist/runtime/composables/useCards.d.ts +19 -0
- package/dist/runtime/composables/useCards.js +73 -0
- package/dist/runtime/composables/useClientApi.d.ts +23 -0
- package/dist/runtime/composables/useClientApi.js +53 -0
- package/dist/runtime/composables/useDataLayer.d.ts +18 -0
- package/dist/runtime/composables/useDataLayer.js +386 -0
- package/dist/runtime/composables/useDynamicHtmlRenderer.d.ts +4 -0
- package/dist/runtime/composables/useDynamicHtmlRenderer.js +33 -0
- package/dist/runtime/composables/useLocation.d.ts +13 -0
- package/dist/runtime/composables/useLocation.js +32 -0
- package/dist/runtime/composables/useLocations.d.ts +12 -0
- package/dist/runtime/composables/useLocations.js +53 -0
- package/dist/runtime/composables/useMetaLayer.d.ts +10 -0
- package/dist/runtime/composables/useMetaLayer.js +263 -0
- package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
- package/dist/runtime/composables/useQuotationCheckout.js +138 -0
- package/dist/runtime/composables/useSearch.d.ts +7 -0
- package/dist/runtime/composables/useSearch.js +40 -0
- package/dist/runtime/composables/useSubscriptions.d.ts +13 -0
- package/dist/runtime/composables/useSubscriptions.js +58 -0
- package/dist/runtime/composables/useTikTokDatalayer.d.ts +8 -0
- package/dist/runtime/composables/useTikTokDatalayer.js +165 -0
- package/dist/runtime/composables/useWebforms.d.ts +16 -0
- package/dist/runtime/composables/useWebforms.js +75 -0
- package/dist/runtime/middleware/flowrix.d.ts +7 -0
- package/dist/runtime/middleware/flowrix.js +60 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +5 -0
- package/dist/runtime/plugins/persistedstate.client.d.ts +2 -0
- package/dist/runtime/plugins/persistedstate.client.js +9 -0
- package/dist/runtime/server/api/albums.d.ts +2 -0
- package/dist/runtime/server/api/albums.js +18 -0
- package/dist/runtime/server/api/auth/forgot.d.ts +5 -0
- package/dist/runtime/server/api/auth/forgot.js +44 -0
- package/dist/runtime/server/api/auth/login.d.ts +11 -0
- package/dist/runtime/server/api/auth/login.js +68 -0
- package/dist/runtime/server/api/auth/logout.d.ts +5 -0
- package/dist/runtime/server/api/auth/logout.js +23 -0
- package/dist/runtime/server/api/auth/register.d.ts +2 -0
- package/dist/runtime/server/api/auth/register.js +51 -0
- package/dist/runtime/server/api/auth/session.get.d.ts +2 -0
- package/dist/runtime/server/api/auth/session.get.js +46 -0
- package/dist/runtime/server/api/auth/user/reset-password.d.ts +5 -0
- package/dist/runtime/server/api/auth/user/reset-password.js +40 -0
- package/dist/runtime/server/api/auth/user/session.d.ts +2 -0
- package/dist/runtime/server/api/auth/user/session.js +43 -0
- package/dist/runtime/server/api/auth/user/verify-token.d.ts +6 -0
- package/dist/runtime/server/api/auth/user/verify-token.js +50 -0
- package/dist/runtime/server/api/banners.d.ts +3 -0
- package/dist/runtime/server/api/banners.js +43 -0
- package/dist/runtime/server/api/brand/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/brand/[...slug].js +60 -0
- package/dist/runtime/server/api/brand/index.d.ts +2 -0
- package/dist/runtime/server/api/brand/index.js +23 -0
- package/dist/runtime/server/api/cache/[...slug].delete.d.ts +2 -0
- package/dist/runtime/server/api/cache/[...slug].delete.js +40 -0
- package/dist/runtime/server/api/cache/clean.get.d.ts +5 -0
- package/dist/runtime/server/api/cache/clean.get.js +16 -0
- package/dist/runtime/server/api/cart/[slug]/add.d.ts +2 -0
- package/dist/runtime/server/api/cart/[slug]/add.js +21 -0
- package/dist/runtime/server/api/cart/[slug]/update.d.ts +2 -0
- package/dist/runtime/server/api/cart/[slug]/update.js +21 -0
- package/dist/runtime/server/api/cart/related.d.ts +2 -0
- package/dist/runtime/server/api/cart/related.js +21 -0
- package/dist/runtime/server/api/cart/remove.d.ts +2 -0
- package/dist/runtime/server/api/cart/remove.js +21 -0
- package/dist/runtime/server/api/cart/service/[slug]/add.d.ts +2 -0
- package/dist/runtime/server/api/cart/service/[slug]/add.js +16 -0
- package/dist/runtime/server/api/catalog/categories.d.ts +3 -0
- package/dist/runtime/server/api/catalog/categories.js +46 -0
- package/dist/runtime/server/api/catalog/categoriesall.d.ts +3 -0
- package/dist/runtime/server/api/catalog/categoriesall.js +46 -0
- package/dist/runtime/server/api/catalog/featured.d.ts +3 -0
- package/dist/runtime/server/api/catalog/featured.js +44 -0
- package/dist/runtime/server/api/catalog/samples.d.ts +3 -0
- package/dist/runtime/server/api/catalog/samples.js +47 -0
- package/dist/runtime/server/api/catalog/search.d.ts +3 -0
- package/dist/runtime/server/api/catalog/search.js +47 -0
- package/dist/runtime/server/api/category/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/category/[...slug].js +57 -0
- package/dist/runtime/server/api/checkout/applyCoupon.d.ts +2 -0
- package/dist/runtime/server/api/checkout/applyCoupon.js +20 -0
- package/dist/runtime/server/api/checkout/configs.d.ts +2 -0
- package/dist/runtime/server/api/checkout/configs.js +19 -0
- package/dist/runtime/server/api/checkout/countries.d.ts +2 -0
- package/dist/runtime/server/api/checkout/countries.js +17 -0
- package/dist/runtime/server/api/checkout/paymentmethod.d.ts +2 -0
- package/dist/runtime/server/api/checkout/paymentmethod.js +20 -0
- package/dist/runtime/server/api/checkout/quotation/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/[slug].js +21 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/[slug].js +37 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/guest/customer.js +21 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].d.ts +2 -0
- package/dist/runtime/server/api/checkout/quotation/submit/[slug].js +23 -0
- package/dist/runtime/server/api/cmspost/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/cmspost/[...slug].js +51 -0
- package/dist/runtime/server/api/cmspost/all.d.ts +3 -0
- package/dist/runtime/server/api/cmspost/all.js +17 -0
- package/dist/runtime/server/api/company/profile.d.ts +2 -0
- package/dist/runtime/server/api/company/profile.js +18 -0
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.d.ts +3 -0
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +19 -0
- package/dist/runtime/server/api/contact-center/webforms/create.d.ts +2 -0
- package/dist/runtime/server/api/contact-center/webforms/create.js +16 -0
- package/dist/runtime/server/api/countries.d.ts +2 -0
- package/dist/runtime/server/api/countries.js +37 -0
- package/dist/runtime/server/api/customer/address/add.d.ts +14 -0
- package/dist/runtime/server/api/customer/address/add.js +33 -0
- package/dist/runtime/server/api/customer/address/delete.d.ts +20 -0
- package/dist/runtime/server/api/customer/address/delete.js +37 -0
- package/dist/runtime/server/api/customer/address/setshipping.d.ts +20 -0
- package/dist/runtime/server/api/customer/address/setshipping.js +41 -0
- package/dist/runtime/server/api/customer/address/update.d.ts +20 -0
- package/dist/runtime/server/api/customer/address/update.js +42 -0
- package/dist/runtime/server/api/customer/cards/delete.d.ts +2 -0
- package/dist/runtime/server/api/customer/cards/delete.js +23 -0
- package/dist/runtime/server/api/customer/cards/get.d.ts +2 -0
- package/dist/runtime/server/api/customer/cards/get.js +17 -0
- package/dist/runtime/server/api/customer/change-password.d.ts +14 -0
- package/dist/runtime/server/api/customer/change-password.js +34 -0
- package/dist/runtime/server/api/customer/checkout.d.ts +2 -0
- package/dist/runtime/server/api/customer/checkout.js +20 -0
- package/dist/runtime/server/api/customer/orders.d.ts +2 -0
- package/dist/runtime/server/api/customer/orders.js +17 -0
- package/dist/runtime/server/api/customer/profile/update.d.ts +14 -0
- package/dist/runtime/server/api/customer/profile/update.js +34 -0
- package/dist/runtime/server/api/customer/quotations.d.ts +2 -0
- package/dist/runtime/server/api/customer/quotations.js +17 -0
- package/dist/runtime/server/api/customer/search.d.ts +2 -0
- package/dist/runtime/server/api/customer/search.js +15 -0
- package/dist/runtime/server/api/customer/tax-invoice.d.ts +8 -0
- package/dist/runtime/server/api/customer/tax-invoice.js +36 -0
- package/dist/runtime/server/api/customer/wishlist/add.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/add.js +30 -0
- package/dist/runtime/server/api/customer/wishlist/createWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/createWishList.js +29 -0
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +46 -0
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +30 -0
- package/dist/runtime/server/api/customer/wishlist/get.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/get.js +17 -0
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +21 -0
- package/dist/runtime/server/api/customer/wishlist/updateWishList.d.ts +2 -0
- package/dist/runtime/server/api/customer/wishlist/updateWishList.js +30 -0
- package/dist/runtime/server/api/featured.d.ts +2 -0
- package/dist/runtime/server/api/featured.js +16 -0
- package/dist/runtime/server/api/generate/robots.get.d.ts +2 -0
- package/dist/runtime/server/api/generate/robots.get.js +20 -0
- package/dist/runtime/server/api/generate/sitemap.get.d.ts +2 -0
- package/dist/runtime/server/api/generate/sitemap.get.js +32 -0
- package/dist/runtime/server/api/location.d.ts +2 -0
- package/dist/runtime/server/api/location.js +13 -0
- package/dist/runtime/server/api/nav/[id]/links.d.ts +2 -0
- package/dist/runtime/server/api/nav/[id]/links.js +19 -0
- package/dist/runtime/server/api/page/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/page/[...slug].js +51 -0
- package/dist/runtime/server/api/product/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/product/[...slug].js +49 -0
- package/dist/runtime/server/api/quickview/[slug].d.ts +2 -0
- package/dist/runtime/server/api/quickview/[slug].js +16 -0
- package/dist/runtime/server/api/samples.d.ts +3 -0
- package/dist/runtime/server/api/samples.js +20 -0
- package/dist/runtime/server/api/search.d.ts +3 -0
- package/dist/runtime/server/api/search.js +15 -0
- package/dist/runtime/server/api/service/[slug].d.ts +3 -0
- package/dist/runtime/server/api/service/[slug].js +54 -0
- package/dist/runtime/server/api/service/availability.d.ts +2 -0
- package/dist/runtime/server/api/service/availability.js +27 -0
- package/dist/runtime/server/api/service/getall.d.ts +3 -0
- package/dist/runtime/server/api/service/getall.js +54 -0
- package/dist/runtime/server/api/shop.d.ts +3 -0
- package/dist/runtime/server/api/shop.js +15 -0
- package/dist/runtime/server/api/subscribe.d.ts +2 -0
- package/dist/runtime/server/api/subscribe.js +16 -0
- package/dist/runtime/server/api/v2/[...slug].d.ts +3 -0
- package/dist/runtime/server/api/v2/[...slug].js +11 -0
- package/dist/runtime/server/api/webform.d.ts +3 -0
- package/dist/runtime/server/api/webform.js +16 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/stores/Booking.d.ts +99 -0
- package/dist/runtime/stores/Booking.js +96 -0
- package/dist/runtime/stores/Cart.d.ts +79 -0
- package/dist/runtime/stores/Cart.js +309 -0
- package/dist/runtime/stores/Categories.d.ts +13 -0
- package/dist/runtime/stores/Categories.js +90 -0
- package/dist/runtime/stores/Checkout.d.ts +79 -0
- package/dist/runtime/stores/Checkout.js +208 -0
- package/dist/runtime/stores/IpLocation.d.ts +18 -0
- package/dist/runtime/stores/IpLocation.js +29 -0
- package/dist/runtime/stores/NavMenu.d.ts +15 -0
- package/dist/runtime/stores/NavMenu.js +26 -0
- package/dist/runtime/stores/Search.d.ts +5 -0
- package/dist/runtime/stores/Search.js +33 -0
- package/dist/runtime/stores/Services.d.ts +7 -0
- package/dist/runtime/stores/Services.js +49 -0
- package/dist/runtime/stores/Utilities.d.ts +5 -0
- package/dist/runtime/stores/Utilities.js +11 -0
- package/dist/runtime/stores/addresses.d.ts +15 -0
- package/dist/runtime/stores/addresses.js +31 -0
- package/dist/runtime/stores/auth.d.ts +59 -0
- package/dist/runtime/stores/auth.js +441 -0
- package/dist/runtime/stores/cards.d.ts +15 -0
- package/dist/runtime/stores/cards.js +22 -0
- package/dist/runtime/stores/compareStore.d.ts +7 -0
- package/dist/runtime/stores/compareStore.js +45 -0
- package/dist/runtime/stores/countries.d.ts +8 -0
- package/dist/runtime/stores/countries.js +15 -0
- package/dist/runtime/stores/index.d.ts +26 -0
- package/dist/runtime/stores/index.js +24 -0
- package/dist/runtime/stores/locations.d.ts +11 -0
- package/dist/runtime/stores/locations.js +19 -0
- package/dist/runtime/stores/orders.d.ts +16 -0
- package/dist/runtime/stores/orders.js +19 -0
- package/dist/runtime/stores/product/README.md +141 -0
- package/dist/runtime/stores/product/slug.d.ts +165 -0
- package/dist/runtime/stores/product/slug.js +91 -0
- package/dist/runtime/stores/product.d.ts +5 -0
- package/dist/runtime/stores/product.js +38 -0
- package/dist/runtime/stores/quotations.d.ts +12 -0
- package/dist/runtime/stores/quotations.js +19 -0
- package/dist/runtime/stores/subscriptions.d.ts +11 -0
- package/dist/runtime/stores/subscriptions.js +19 -0
- package/dist/runtime/stores/useCompanyProfile.d.ts +7 -0
- package/dist/runtime/stores/useCompanyProfile.js +22 -0
- package/dist/runtime/stores/useNavMenuStore.d.ts +5 -0
- package/dist/runtime/stores/useNavMenuStore.js +23 -0
- package/dist/runtime/stores/webforms.d.ts +18 -0
- package/dist/runtime/stores/webforms.js +23 -0
- package/dist/runtime/stores/wishlists.d.ts +136 -0
- package/dist/runtime/stores/wishlists.js +249 -0
- package/dist/runtime/utils/api.d.ts +13 -0
- package/dist/runtime/utils/api.js +98 -0
- package/dist/runtime/utils/companyProfile.d.ts +22 -0
- package/dist/runtime/utils/companyProfile.js +21 -0
- package/dist/runtime/utils/htmlCache.d.ts +5 -0
- package/dist/runtime/utils/htmlCache.js +64 -0
- package/dist/types.d.mts +7 -0
- package/package.json +12 -1
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { loadStripe } from "@stripe/stripe-js";
|
|
2
|
+
import { useCheckoutStore } from "../../../stores/Checkout.js";
|
|
3
|
+
let stripe = null;
|
|
4
|
+
let elements = null;
|
|
5
|
+
export default function() {
|
|
6
|
+
const checkoutStore = useCheckoutStore();
|
|
7
|
+
const loader = "auto";
|
|
8
|
+
const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
|
|
9
|
+
try {
|
|
10
|
+
inputData.paymentmethod = paymentMethod;
|
|
11
|
+
const newPrice = parseFloat(totalPrice);
|
|
12
|
+
if (paymentMethod === "web-stripe") {
|
|
13
|
+
document.querySelector("#card-element").innerHTML = `<div class="payment-loading text-center">Loading...</div>`;
|
|
14
|
+
const appearance = { theme: "stripe" };
|
|
15
|
+
await checkoutStore.paymentMethods({
|
|
16
|
+
clientsceret: checkoutStore.publishableKey.clientsceret,
|
|
17
|
+
paymentmethod: paymentMethod,
|
|
18
|
+
total: newPrice * 100
|
|
19
|
+
});
|
|
20
|
+
const clientSecret = checkoutStore.publishableKey.clientsceret;
|
|
21
|
+
inputData.clientsceret = clientSecret;
|
|
22
|
+
stripe = await loadStripe(checkoutStore.publishableKey.key);
|
|
23
|
+
elements = stripe.elements({ appearance, clientSecret, loader });
|
|
24
|
+
const paymentElementOptions = { layout: { type: "tabs" } };
|
|
25
|
+
const cardElement = elements.create("payment", paymentElementOptions);
|
|
26
|
+
cardElement.mount("#card-element");
|
|
27
|
+
}
|
|
28
|
+
checkoutStore.saveToCheckoutSession(inputData);
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.log("Error", error);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return { getpaymentMethod };
|
|
34
|
+
}
|
|
35
|
+
export const getStripeElements = async (publishableKey, clientSecret) => {
|
|
36
|
+
if (!stripe) {
|
|
37
|
+
stripe = await loadStripe(publishableKey);
|
|
38
|
+
}
|
|
39
|
+
if (!elements) {
|
|
40
|
+
elements = stripe.elements({ clientSecret });
|
|
41
|
+
}
|
|
42
|
+
return { stripe, elements };
|
|
43
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useCheckoutStore } from "../../../stores/Checkout.js";
|
|
2
|
+
export default function() {
|
|
3
|
+
const checkoutStore = useCheckoutStore();
|
|
4
|
+
const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
|
|
5
|
+
try {
|
|
6
|
+
inputData.paymentmethod = paymentMethod;
|
|
7
|
+
const newPrice = parseFloat(totalPrice);
|
|
8
|
+
if (paymentMethod == "web-zippay") {
|
|
9
|
+
await checkoutStore.paymentMethods({
|
|
10
|
+
paymentmethod: paymentMethod,
|
|
11
|
+
total: newPrice
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
checkoutStore.saveToCheckoutSession(inputData);
|
|
15
|
+
} catch (error) {
|
|
16
|
+
console.log("Error", error);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
getpaymentMethod
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
export default function (): {
|
|
2
|
+
router: import("vue-router").Router;
|
|
3
|
+
route: import("vue-router").RouteLocationNormalizedLoadedGeneric;
|
|
4
|
+
inputData: import("vue").Ref<{
|
|
5
|
+
deliverymethod: string | number | undefined;
|
|
6
|
+
billing_address: string | number | undefined;
|
|
7
|
+
billing_country: any;
|
|
8
|
+
shippingasbilling: boolean;
|
|
9
|
+
isCustomer: boolean;
|
|
10
|
+
billing_state: string | number | undefined;
|
|
11
|
+
billing_suburb: string | undefined;
|
|
12
|
+
clientsceret: any;
|
|
13
|
+
billing_postcode: number | undefined;
|
|
14
|
+
billing_mobile: string | number | undefined;
|
|
15
|
+
billing_firstname: string | number | undefined;
|
|
16
|
+
firstname: string | number | undefined;
|
|
17
|
+
billing_middlename: string | undefined;
|
|
18
|
+
billing_lastname: string | number | undefined;
|
|
19
|
+
lastname: string | number | undefined;
|
|
20
|
+
shipping_address: string | undefined;
|
|
21
|
+
shippingmethod: string | number | undefined;
|
|
22
|
+
shipping_country: any;
|
|
23
|
+
shipping_state: string | number | undefined;
|
|
24
|
+
shipping_suburb: string | undefined;
|
|
25
|
+
shipping_postcode: number | undefined;
|
|
26
|
+
shipping_mobile: string | undefined;
|
|
27
|
+
shipping_firstname: string | undefined;
|
|
28
|
+
shipping_middlename: string | undefined;
|
|
29
|
+
shipping_lastname: string | undefined;
|
|
30
|
+
vouchercode: any;
|
|
31
|
+
paymentmethod: string;
|
|
32
|
+
cart: any;
|
|
33
|
+
abndToken: string | undefined;
|
|
34
|
+
customertoken: string;
|
|
35
|
+
email: string | number | undefined;
|
|
36
|
+
mobile: string | number | undefined;
|
|
37
|
+
authoritytoleave: undefined;
|
|
38
|
+
register: string;
|
|
39
|
+
password: string;
|
|
40
|
+
password_confirmation: string;
|
|
41
|
+
passwordStrengthValue: string;
|
|
42
|
+
customernotes: string;
|
|
43
|
+
ewayKey: string;
|
|
44
|
+
eway_cardname: string;
|
|
45
|
+
eway_cardnumber: string;
|
|
46
|
+
eway_expirymonth: string;
|
|
47
|
+
eway_expiryyear: string;
|
|
48
|
+
eway_cvn: string;
|
|
49
|
+
till_cardname: string;
|
|
50
|
+
till_cardnumber: string;
|
|
51
|
+
till_cvn: string;
|
|
52
|
+
till_expirymonth: string;
|
|
53
|
+
till_expiryyear: string;
|
|
54
|
+
save_card_details: number;
|
|
55
|
+
}, {
|
|
56
|
+
deliverymethod: string | number | undefined;
|
|
57
|
+
billing_address: string | number | undefined;
|
|
58
|
+
billing_country: any;
|
|
59
|
+
shippingasbilling: boolean;
|
|
60
|
+
isCustomer: boolean;
|
|
61
|
+
billing_state: string | number | undefined;
|
|
62
|
+
billing_suburb: string | undefined;
|
|
63
|
+
clientsceret: any;
|
|
64
|
+
billing_postcode: number | undefined;
|
|
65
|
+
billing_mobile: string | number | undefined;
|
|
66
|
+
billing_firstname: string | number | undefined;
|
|
67
|
+
firstname: string | number | undefined;
|
|
68
|
+
billing_middlename: string | undefined;
|
|
69
|
+
billing_lastname: string | number | undefined;
|
|
70
|
+
lastname: string | number | undefined;
|
|
71
|
+
shipping_address: string | undefined;
|
|
72
|
+
shippingmethod: string | number | undefined;
|
|
73
|
+
shipping_country: any;
|
|
74
|
+
shipping_state: string | number | undefined;
|
|
75
|
+
shipping_suburb: string | undefined;
|
|
76
|
+
shipping_postcode: number | undefined;
|
|
77
|
+
shipping_mobile: string | undefined;
|
|
78
|
+
shipping_firstname: string | undefined;
|
|
79
|
+
shipping_middlename: string | undefined;
|
|
80
|
+
shipping_lastname: string | undefined;
|
|
81
|
+
vouchercode: any;
|
|
82
|
+
paymentmethod: string;
|
|
83
|
+
cart: any;
|
|
84
|
+
abndToken: string | undefined;
|
|
85
|
+
customertoken: string;
|
|
86
|
+
email: string | number | undefined;
|
|
87
|
+
mobile: string | number | undefined;
|
|
88
|
+
authoritytoleave: undefined;
|
|
89
|
+
register: string;
|
|
90
|
+
password: string;
|
|
91
|
+
password_confirmation: string;
|
|
92
|
+
passwordStrengthValue: string;
|
|
93
|
+
customernotes: string;
|
|
94
|
+
ewayKey: string;
|
|
95
|
+
eway_cardname: string;
|
|
96
|
+
eway_cardnumber: string;
|
|
97
|
+
eway_expirymonth: string;
|
|
98
|
+
eway_expiryyear: string;
|
|
99
|
+
eway_cvn: string;
|
|
100
|
+
till_cardname: string;
|
|
101
|
+
till_cardnumber: string;
|
|
102
|
+
till_cvn: string;
|
|
103
|
+
till_expirymonth: string;
|
|
104
|
+
till_expiryyear: string;
|
|
105
|
+
save_card_details: number;
|
|
106
|
+
} | {
|
|
107
|
+
deliverymethod: string | number | undefined;
|
|
108
|
+
billing_address: string | number | undefined;
|
|
109
|
+
billing_country: any;
|
|
110
|
+
shippingasbilling: boolean;
|
|
111
|
+
isCustomer: boolean;
|
|
112
|
+
billing_state: string | number | undefined;
|
|
113
|
+
billing_suburb: string | undefined;
|
|
114
|
+
clientsceret: any;
|
|
115
|
+
billing_postcode: number | undefined;
|
|
116
|
+
billing_mobile: string | number | undefined;
|
|
117
|
+
billing_firstname: string | number | undefined;
|
|
118
|
+
firstname: string | number | undefined;
|
|
119
|
+
billing_middlename: string | undefined;
|
|
120
|
+
billing_lastname: string | number | undefined;
|
|
121
|
+
lastname: string | number | undefined;
|
|
122
|
+
shipping_address: string | undefined;
|
|
123
|
+
shippingmethod: string | number | undefined;
|
|
124
|
+
shipping_country: any;
|
|
125
|
+
shipping_state: string | number | undefined;
|
|
126
|
+
shipping_suburb: string | undefined;
|
|
127
|
+
shipping_postcode: number | undefined;
|
|
128
|
+
shipping_mobile: string | undefined;
|
|
129
|
+
shipping_firstname: string | undefined;
|
|
130
|
+
shipping_middlename: string | undefined;
|
|
131
|
+
shipping_lastname: string | undefined;
|
|
132
|
+
vouchercode: any;
|
|
133
|
+
paymentmethod: string;
|
|
134
|
+
cart: any;
|
|
135
|
+
abndToken: string | undefined;
|
|
136
|
+
customertoken: string;
|
|
137
|
+
email: string | number | undefined;
|
|
138
|
+
mobile: string | number | undefined;
|
|
139
|
+
authoritytoleave: undefined;
|
|
140
|
+
register: string;
|
|
141
|
+
password: string;
|
|
142
|
+
password_confirmation: string;
|
|
143
|
+
passwordStrengthValue: string;
|
|
144
|
+
customernotes: string;
|
|
145
|
+
ewayKey: string;
|
|
146
|
+
eway_cardname: string;
|
|
147
|
+
eway_cardnumber: string;
|
|
148
|
+
eway_expirymonth: string;
|
|
149
|
+
eway_expiryyear: string;
|
|
150
|
+
eway_cvn: string;
|
|
151
|
+
till_cardname: string;
|
|
152
|
+
till_cardnumber: string;
|
|
153
|
+
till_cvn: string;
|
|
154
|
+
till_expirymonth: string;
|
|
155
|
+
till_expiryyear: string;
|
|
156
|
+
save_card_details: number;
|
|
157
|
+
}>;
|
|
158
|
+
cartData: import("vue").ComputedRef<{
|
|
159
|
+
[x: string]: any;
|
|
160
|
+
preferences?: Record<string, any>[] | undefined;
|
|
161
|
+
outlets?: Record<string, any>[] | undefined;
|
|
162
|
+
deliverytype?: string | undefined;
|
|
163
|
+
order_no?: string | undefined;
|
|
164
|
+
publishableKey?: any;
|
|
165
|
+
calculations?: any;
|
|
166
|
+
shippingmethods?: any;
|
|
167
|
+
cart?: Record<string, import("../../stores/Checkout.js").CartItem> | undefined;
|
|
168
|
+
totals?: Record<string, any> | undefined;
|
|
169
|
+
}>;
|
|
170
|
+
AuthStore: import("vue").Ref<any, any>;
|
|
171
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
172
|
+
countries: any;
|
|
173
|
+
BillingDetailsForm: any;
|
|
174
|
+
DeliveryMethodForm: any;
|
|
175
|
+
ShippingDetailsForm: any;
|
|
176
|
+
ShippingMethodForm: any;
|
|
177
|
+
Calculations: any;
|
|
178
|
+
Order: any;
|
|
179
|
+
states: import("vue").Ref<never[], never[]>;
|
|
180
|
+
CreateAccount: any;
|
|
181
|
+
AuthorityToLeave: any;
|
|
182
|
+
totalPrice: import("vue").ComputedRef<any>;
|
|
183
|
+
deliveryMethods: import("vue").ComputedRef<any>;
|
|
184
|
+
getStates: import("vue").ComputedRef<never[]>;
|
|
185
|
+
shippingMethods: import("vue").ComputedRef<any>;
|
|
186
|
+
proceedtoNext: () => void;
|
|
187
|
+
proceedtoPrev: () => void;
|
|
188
|
+
showMessage: (messageText: string) => void;
|
|
189
|
+
handleSubmit: (url_cancel: string, url_success: string, url_booking: string) => Promise<false | undefined>;
|
|
190
|
+
shippingFormEnabled: import("vue").Ref<boolean, boolean>;
|
|
191
|
+
updateUserFieldsIfuserLogin: (sameasbilling?: boolean) => Promise<void>;
|
|
192
|
+
step_2: import("vue").Ref<boolean, boolean>;
|
|
193
|
+
step1Valid: import("vue").ComputedRef<boolean>;
|
|
194
|
+
step2Valid: import("vue").ComputedRef<boolean>;
|
|
195
|
+
PaymentMethods: any;
|
|
196
|
+
ipLocation: import("vue").Ref<any, any>;
|
|
197
|
+
};
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import { ref, computed, watch, onMounted, defineAsyncComponent } from "vue";
|
|
2
|
+
import { useCompanyProfile } from "../../stores/useCompanyProfile.js";
|
|
3
|
+
import { useCartStore } from "../../stores/Cart.js";
|
|
4
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
5
|
+
import { useCountry } from "../Extras/useCountry.js";
|
|
6
|
+
import { useRouter, useRoute } from "vue-router";
|
|
7
|
+
import { useAuthStore } from "../../stores/auth.js";
|
|
8
|
+
export default function() {
|
|
9
|
+
const router = useRouter();
|
|
10
|
+
const route = useRoute();
|
|
11
|
+
const {
|
|
12
|
+
user,
|
|
13
|
+
token,
|
|
14
|
+
isAuthenticated
|
|
15
|
+
} = useAuthStore();
|
|
16
|
+
const { profile } = useCompanyProfile();
|
|
17
|
+
const cartStore = useCartStore();
|
|
18
|
+
const companyCountryId = computed(() => profile?.data.country_id || "");
|
|
19
|
+
const checkoutStore = useCheckoutStore();
|
|
20
|
+
const AuthStore = ref();
|
|
21
|
+
const shippingFormEnabled = ref(true);
|
|
22
|
+
const isCustomer = ref(false);
|
|
23
|
+
const countries = useCountry().data;
|
|
24
|
+
const ipLocation = ref();
|
|
25
|
+
const cartData = computed(() => {
|
|
26
|
+
const cartItems = checkoutStore.config;
|
|
27
|
+
return cartItems;
|
|
28
|
+
});
|
|
29
|
+
const abndToken = cartStore.cart.abndToken;
|
|
30
|
+
const vouchercode = cartStore.cart.code;
|
|
31
|
+
const sessiondata = computed(() => checkoutStore.checkoutSession);
|
|
32
|
+
const inputData = ref({
|
|
33
|
+
deliverymethod: sessiondata.value.fields ? sessiondata.value.fields.deliverymethod : "",
|
|
34
|
+
billing_address: sessiondata.value.fields ? sessiondata.value.fields.billing_address : "",
|
|
35
|
+
billing_country: sessiondata.value.fields ? sessiondata.value.fields.billing_country : companyCountryId.value,
|
|
36
|
+
shippingasbilling: shippingFormEnabled.value,
|
|
37
|
+
isCustomer: isCustomer.value,
|
|
38
|
+
billing_state: sessiondata.value.fields ? sessiondata.value.fields.billing_state : "",
|
|
39
|
+
billing_suburb: sessiondata.value.fields ? sessiondata.value.fields.billing_suburb : "",
|
|
40
|
+
clientsceret: checkoutStore.publishableKey.clientsceret,
|
|
41
|
+
billing_postcode: sessiondata.value.fields ? sessiondata.value.fields.billing_postcode : void 0,
|
|
42
|
+
billing_mobile: sessiondata.value.fields ? sessiondata.value.fields.billing_mobile : "",
|
|
43
|
+
billing_firstname: sessiondata.value.fields ? sessiondata.value.fields.billing_firstname : "",
|
|
44
|
+
firstname: sessiondata.value.fields ? sessiondata.value.fields.firstname : "",
|
|
45
|
+
billing_middlename: sessiondata.value.fields ? sessiondata.value.fields.billing_middlename : "",
|
|
46
|
+
billing_lastname: sessiondata.value.fields ? sessiondata.value.fields.billing_lastname : "",
|
|
47
|
+
lastname: sessiondata.value.fields ? sessiondata.value.fields.lastname : "",
|
|
48
|
+
shipping_address: sessiondata.value.fields ? sessiondata.value.fields.shipping_address : "",
|
|
49
|
+
shippingmethod: sessiondata.value.fields ? sessiondata.value.fields.shippingmethod : "",
|
|
50
|
+
shipping_country: sessiondata.value.fields ? sessiondata.value.fields.shipping_country : companyCountryId.value,
|
|
51
|
+
shipping_state: sessiondata.value.fields ? sessiondata.value.fields.shipping_state : void 0,
|
|
52
|
+
shipping_suburb: sessiondata.value.fields ? sessiondata.value.fields.shipping_suburb : "",
|
|
53
|
+
shipping_postcode: sessiondata.value.fields ? sessiondata.value.fields.shipping_postcode : void 0,
|
|
54
|
+
shipping_mobile: sessiondata.value.fields ? sessiondata.value.fields.shipping_mobile : "",
|
|
55
|
+
shipping_firstname: sessiondata.value.fields ? sessiondata.value.fields.shipping_firstname : "",
|
|
56
|
+
shipping_middlename: sessiondata.value.fields ? sessiondata.value.fields.shipping_middlename : "",
|
|
57
|
+
shipping_lastname: sessiondata.value.fields ? sessiondata.value.fields.shipping_lastname : "",
|
|
58
|
+
vouchercode,
|
|
59
|
+
paymentmethod: "",
|
|
60
|
+
cart: cartData.value.items,
|
|
61
|
+
abndToken,
|
|
62
|
+
customertoken: "",
|
|
63
|
+
email: sessiondata.value.fields ? sessiondata.value.fields.email : "",
|
|
64
|
+
mobile: sessiondata.value.fields ? sessiondata.value.fields.mobile : "",
|
|
65
|
+
authoritytoleave: void 0,
|
|
66
|
+
register: "",
|
|
67
|
+
password: "",
|
|
68
|
+
password_confirmation: "",
|
|
69
|
+
passwordStrengthValue: "",
|
|
70
|
+
customernotes: "",
|
|
71
|
+
ewayKey: "",
|
|
72
|
+
eway_cardname: "",
|
|
73
|
+
eway_cardnumber: "",
|
|
74
|
+
eway_expirymonth: "",
|
|
75
|
+
eway_expiryyear: "",
|
|
76
|
+
eway_cvn: "",
|
|
77
|
+
till_cardname: "",
|
|
78
|
+
till_cardnumber: "",
|
|
79
|
+
till_cvn: "",
|
|
80
|
+
till_expirymonth: "",
|
|
81
|
+
till_expiryyear: "",
|
|
82
|
+
save_card_details: 0
|
|
83
|
+
});
|
|
84
|
+
const updateUserFieldsIfuserLogin = (async (sameasbilling = false) => {
|
|
85
|
+
if (isAuthenticated) {
|
|
86
|
+
const billingAddres = user.addresses?.filter((address) => address.billing == 1)[0];
|
|
87
|
+
const shippingAddres = user.addresses?.filter((address) => address.shipping == 1)[0];
|
|
88
|
+
inputData.value.billing_firstname = billingAddres.firstname;
|
|
89
|
+
inputData.value.billing_lastname = billingAddres.lastname;
|
|
90
|
+
inputData.value.email = user.email;
|
|
91
|
+
inputData.value.billing_mobile = user.mobile;
|
|
92
|
+
if (sameasbilling == true) {
|
|
93
|
+
} else {
|
|
94
|
+
if (billingAddres != void 0) {
|
|
95
|
+
inputData.value.billing_firstname = inputData.value.billing_firstname ? inputData.value.billing_firstname : billingAddres.firstname;
|
|
96
|
+
inputData.value.billing_lastname = inputData.value.billing_lastname ? inputData.value.billing_lastname : billingAddres.lastname;
|
|
97
|
+
inputData.value.billing_address = inputData.value.billing_address ? inputData.value.billing_address : billingAddres.address;
|
|
98
|
+
inputData.value.billing_postcode = inputData.value.billing_postcode ? inputData.value.billing_postcode : billingAddres.postcode;
|
|
99
|
+
inputData.value.billing_state = inputData.value.billing_state ? inputData.value.billing_state : billingAddres.state_id;
|
|
100
|
+
inputData.value.billing_country = inputData.value.billing_country ? inputData.value.billing_country : billingAddres.country_id;
|
|
101
|
+
inputData.value.billing_suburb = inputData.value.billing_suburb ? inputData.value.billing_suburb : billingAddres.suburb;
|
|
102
|
+
inputData.value.billing_mobile = inputData.value.billing_mobile ? inputData.value.billing_mobile : billingAddres.mobile;
|
|
103
|
+
}
|
|
104
|
+
if (shippingAddres != void 0) {
|
|
105
|
+
inputData.value.shipping_fullname = "";
|
|
106
|
+
inputData.value.shipping_firstname = "";
|
|
107
|
+
inputData.value.shipping_lastname = "";
|
|
108
|
+
inputData.value.shipping_address = "";
|
|
109
|
+
inputData.value.shipping_postcode = "";
|
|
110
|
+
inputData.value.shipping_state = "";
|
|
111
|
+
inputData.value.shipping_country = "";
|
|
112
|
+
inputData.value.shipping_suburb = "";
|
|
113
|
+
inputData.value.shipping_mobile = "";
|
|
114
|
+
inputData.value.shipping_fullname = shippingAddres.fullname;
|
|
115
|
+
inputData.value.shipping_firstname = shippingAddres.firstname;
|
|
116
|
+
inputData.value.shipping_lastname = shippingAddres.lastname;
|
|
117
|
+
inputData.value.shipping_address = shippingAddres.address;
|
|
118
|
+
inputData.value.shipping_postcode = shippingAddres.postcode;
|
|
119
|
+
inputData.value.shipping_state = shippingAddres.state_id;
|
|
120
|
+
inputData.value.shipping_country = shippingAddres.country_id;
|
|
121
|
+
inputData.value.shipping_suburb = shippingAddres.suburb;
|
|
122
|
+
inputData.value.shipping_mobile = shippingAddres.mobile;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
} else if (isAuthenticated && sameasbilling == true) {
|
|
126
|
+
inputData.value.shipping_firstname = inputData.value.billing_firstname ? inputData.value.billing_firstname : "";
|
|
127
|
+
inputData.value.shipping_lastname = inputData.value.billing_lastname ? inputData.value.billing_lastname : "";
|
|
128
|
+
inputData.value.shipping_address = inputData.value.billing_address ? inputData.value.billing_address : "";
|
|
129
|
+
inputData.value.shipping_postcode = inputData.value.billing_postcode ? inputData.value.billing_postcode : "";
|
|
130
|
+
inputData.value.shipping_state = inputData.value.billing_state ? inputData.value.billing_state : "";
|
|
131
|
+
inputData.value.shipping_country = inputData.value.billing_country ? inputData.value.billing_country : "";
|
|
132
|
+
inputData.value.shipping_suburb = inputData.value.billing_suburb ? inputData.value.billing_suburb : "";
|
|
133
|
+
inputData.value.shipping_mobile = inputData.value.billing_mobile ? inputData.value.billing_mobile : "";
|
|
134
|
+
} else {
|
|
135
|
+
inputData.value.shipping_fullname = "";
|
|
136
|
+
inputData.value.shipping_firstname = "";
|
|
137
|
+
inputData.value.shipping_lastname = "";
|
|
138
|
+
inputData.value.shipping_address = "";
|
|
139
|
+
inputData.value.shipping_postcode = "";
|
|
140
|
+
inputData.value.shipping_state = "";
|
|
141
|
+
inputData.value.shipping_country = "";
|
|
142
|
+
inputData.value.shipping_suburb = "";
|
|
143
|
+
inputData.value.shipping_mobile = "";
|
|
144
|
+
}
|
|
145
|
+
checkoutStore.saveToCheckoutSession(inputData.value);
|
|
146
|
+
});
|
|
147
|
+
onMounted(() => {
|
|
148
|
+
checkoutStore.getConfig();
|
|
149
|
+
updateUserFieldsIfuserLogin(inputData.value.shippingasbilling);
|
|
150
|
+
const cart = [];
|
|
151
|
+
cart.items = checkoutStore.config.cart;
|
|
152
|
+
let deliverymethods = checkoutStore.config.preferences;
|
|
153
|
+
let deliverymethod = false;
|
|
154
|
+
});
|
|
155
|
+
const totalPrice = computed(() => {
|
|
156
|
+
return checkoutStore.config ? checkoutStore.config?.calculations?.total : 0;
|
|
157
|
+
});
|
|
158
|
+
const deliveryMethods = computed(() => {
|
|
159
|
+
return checkoutStore.config?.preferences || [];
|
|
160
|
+
});
|
|
161
|
+
const states = ref([]);
|
|
162
|
+
const getStates = computed(() => {
|
|
163
|
+
if (countries?.value?.length > 0) {
|
|
164
|
+
const country = countries.value.find((country2) => country2.id == companyCountryId.value);
|
|
165
|
+
if (country) {
|
|
166
|
+
states.value = country.states;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return states.value;
|
|
170
|
+
});
|
|
171
|
+
watch(inputData.value, async (newData, oldValue) => {
|
|
172
|
+
});
|
|
173
|
+
const shippingMethods = computed(() => {
|
|
174
|
+
if (checkoutStore.config) {
|
|
175
|
+
return checkoutStore.config?.shippingmethods?.filter((method) => method.available == 1);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
watch(() => checkoutStore.config.shippingmethods, (newValue, oldValue) => {
|
|
179
|
+
if (shippingMethods?.value?.length == 1) {
|
|
180
|
+
inputData.value.shippingmethod = shippingMethods.value[0].id;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
const step_2 = ref(false);
|
|
184
|
+
const proceedtoNext = () => {
|
|
185
|
+
checkoutStore.saveToCheckoutSession(inputData.value);
|
|
186
|
+
step_2.value = true;
|
|
187
|
+
};
|
|
188
|
+
const step1Valid = computed(() => (inputData.value.register == false && inputData.value.password == "" && inputData.value.password_confirmation == "" || inputData.value.register == true && inputData.value.password != "" && inputData.value.password_confirmation != "" && inputData.value.password == inputData.value.password_confirmation && Number(inputData.value.passwordStrengthValue) > 80) && inputData.value.billing_firstname != "" && inputData.value.billing_lastname != "" && inputData.value.email != "" && inputData.value.billing_mobile != "" && inputData.value.billing_address != "" && inputData.value.billing_suburb != "" && inputData.value.billing_postcode != "" && inputData.value.billing_state != "");
|
|
189
|
+
const step2Valid = computed(() => step1Valid.value && inputData.value.paymentmethod != "");
|
|
190
|
+
const proceedtoPrev = () => {
|
|
191
|
+
step_2.value = false;
|
|
192
|
+
};
|
|
193
|
+
function showMessage(messageText) {
|
|
194
|
+
const messageContainer = document.querySelector("#payment-message");
|
|
195
|
+
if (messageContainer) {
|
|
196
|
+
const errorbody = messageContainer.querySelector(".alert-body");
|
|
197
|
+
if (errorbody) {
|
|
198
|
+
messageContainer.classList.remove("d-none");
|
|
199
|
+
errorbody.textContent = messageText;
|
|
200
|
+
setTimeout(() => {
|
|
201
|
+
messageContainer.classList.add("d-none");
|
|
202
|
+
messageContainer.textContent = "";
|
|
203
|
+
}, 14e3);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
const addLoading = () => {
|
|
208
|
+
const loadingDiv = document.createElement("div");
|
|
209
|
+
loadingDiv.className = "loading";
|
|
210
|
+
const spanElement = document.createElement("span");
|
|
211
|
+
loadingDiv.appendChild(spanElement);
|
|
212
|
+
const bodyElement = document.body;
|
|
213
|
+
bodyElement.insertBefore(loadingDiv, bodyElement.firstChild);
|
|
214
|
+
};
|
|
215
|
+
const removeLoading = () => {
|
|
216
|
+
if (document.querySelector(".loading")) {
|
|
217
|
+
document.querySelector(".loading").remove();
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
const CheckFlowrixPayment = ((inputData2, payment) => {
|
|
221
|
+
let status = {};
|
|
222
|
+
var data = {
|
|
223
|
+
card_holder: inputData2.till_cardname,
|
|
224
|
+
month: inputData2.till_expirymonth,
|
|
225
|
+
year: inputData2.till_expiryyear
|
|
226
|
+
};
|
|
227
|
+
payment.tokenize(
|
|
228
|
+
data,
|
|
229
|
+
//additional data, MUST include card_holder (or first_name & last_name), month and year
|
|
230
|
+
function(token2, cardData) {
|
|
231
|
+
inputData2.clientsceret = token2;
|
|
232
|
+
checkoutStore.publishableKey.clientsceret = token2;
|
|
233
|
+
checkoutStore.saveToCheckoutSession(inputData2);
|
|
234
|
+
if (token2 != "") {
|
|
235
|
+
status = {};
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
function(errors) {
|
|
239
|
+
status = errors;
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
return status;
|
|
243
|
+
});
|
|
244
|
+
const handleSubmit = async (url_cancel, url_success, url_booking) => {
|
|
245
|
+
try {
|
|
246
|
+
let paymenterror = {
|
|
247
|
+
"status": "Error",
|
|
248
|
+
"message": []
|
|
249
|
+
};
|
|
250
|
+
if (inputData.value.paymentmethod == "web-flowrix-pay" && inputData.value.customertoken == "") {
|
|
251
|
+
if (checkoutStore.PaymentErrors.length > 0) {
|
|
252
|
+
checkoutStore.PaymentErrors.forEach((error2) => {
|
|
253
|
+
paymenterror.message.push(error2.message);
|
|
254
|
+
});
|
|
255
|
+
checkoutStore.errorResponseData = paymenterror;
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (isAuthenticated) {
|
|
260
|
+
sessiondata.value.fields.firstname = inputData.value.billing_firstname;
|
|
261
|
+
sessiondata.value.fields.lastname = inputData.value.billing_lastname;
|
|
262
|
+
}
|
|
263
|
+
sessiondata.value.fields.mobile = inputData.value.billing_mobile ? inputData.value.billing_mobile : inputData.value.billing_phone;
|
|
264
|
+
addLoading();
|
|
265
|
+
inputData.value.clientsceret = checkoutStore?.publishableKey?.clientsceret;
|
|
266
|
+
sessiondata.value.fields.url_success = `${window.location.origin}${url_success}`;
|
|
267
|
+
sessiondata.value.fields.url_cancel = `${window.location.origin}${url_cancel}`;
|
|
268
|
+
if (inputData.value.paymentmethod == "web-eway") {
|
|
269
|
+
const cardnumber = eCrypt.encryptValue(sessiondata.value.fields.eway_cardnumber, inputData.value.ewayKey);
|
|
270
|
+
const eway_cvn = eCrypt.encryptValue(sessiondata.value.fields.eway_cvn, inputData.value.ewayKey);
|
|
271
|
+
sessiondata.value.fields.eway_cardnumber = cardnumber;
|
|
272
|
+
sessiondata.value.fields.eway_cvn = eway_cvn;
|
|
273
|
+
}
|
|
274
|
+
const chckoutResponse = await checkoutStore.submitCheckout();
|
|
275
|
+
if (chckoutResponse.status == "Success") {
|
|
276
|
+
if (inputData.value.paymentmethod == "web-stripe") {
|
|
277
|
+
const { stripe, elements } = await getStripeElements(
|
|
278
|
+
checkoutStore.publishableKey.key,
|
|
279
|
+
inputData.value.clientsceret
|
|
280
|
+
);
|
|
281
|
+
if (sessiondata.value.calculations.total > 0) {
|
|
282
|
+
console.log("chckoutResponse", sessiondata.value);
|
|
283
|
+
console.log("chckoutResponse", checkoutStore.responseData.booking ? `${window.location.origin}${url_booking}?calendar=${checkoutStore.responseData.calendar}&order_no=${checkoutStore.responseData.order_no}` : `${window.location.origin}${url_success}`);
|
|
284
|
+
const { error: error2 } = await stripe.confirmPayment({
|
|
285
|
+
elements,
|
|
286
|
+
confirmParams: {
|
|
287
|
+
// Make sure to change this to your payment completion page
|
|
288
|
+
return_url: checkoutStore.responseData.booking ? `${window.location.origin}${url_booking}?calendar=${checkoutStore.responseData.calendar}&order_no=${checkoutStore.responseData.order_no}` : `${window.location.origin}${url_success}`,
|
|
289
|
+
receipt_email: inputData.value.email
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
if (error2.type === "card_error" || error2.type === "validation_error") {
|
|
293
|
+
showMessage(error2.message);
|
|
294
|
+
} else {
|
|
295
|
+
}
|
|
296
|
+
} else {
|
|
297
|
+
showMessage(error.message);
|
|
298
|
+
}
|
|
299
|
+
} else if (chckoutResponse.data.url) {
|
|
300
|
+
var url = chckoutResponse.data.url;
|
|
301
|
+
} else {
|
|
302
|
+
window.location.href = url_success;
|
|
303
|
+
}
|
|
304
|
+
removeLoading();
|
|
305
|
+
} else if (checkoutStore.errorResponseData.status == "Error") {
|
|
306
|
+
removeLoading();
|
|
307
|
+
}
|
|
308
|
+
} catch (error2) {
|
|
309
|
+
removeLoading();
|
|
310
|
+
} finally {
|
|
311
|
+
removeLoading();
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
const BillingDetailsForm = defineAsyncComponent(
|
|
315
|
+
() => import("@/components/Checkout/Template01/BillingAddress.vue")
|
|
316
|
+
);
|
|
317
|
+
const DeliveryMethodForm = defineAsyncComponent(
|
|
318
|
+
() => import("@/components/Checkout/Template01/DeliveryMethod.vue")
|
|
319
|
+
);
|
|
320
|
+
const ShippingDetailsForm = defineAsyncComponent(
|
|
321
|
+
() => import("@/components/Checkout/Template01/ShippingAddress.vue")
|
|
322
|
+
);
|
|
323
|
+
const ShippingMethodForm = defineAsyncComponent(
|
|
324
|
+
() => import("@/components/Checkout/Template01/ShippingMethod.vue")
|
|
325
|
+
);
|
|
326
|
+
const Calculations = defineAsyncComponent(
|
|
327
|
+
() => import("@/components/Checkout/Template01/Calculations.vue")
|
|
328
|
+
);
|
|
329
|
+
const Order = defineAsyncComponent(
|
|
330
|
+
() => import("@/components/Checkout/Template01/Order.vue")
|
|
331
|
+
);
|
|
332
|
+
const AuthorityToLeave = defineAsyncComponent(
|
|
333
|
+
() => import("@/components/Checkout/Template01/AuthorityToLeave.vue")
|
|
334
|
+
);
|
|
335
|
+
const PaymentMethods = defineAsyncComponent(
|
|
336
|
+
() => import("@/components/Checkout/Template01/PaymentMethods/PaymentMethods.vue")
|
|
337
|
+
);
|
|
338
|
+
const CreateAccount = defineAsyncComponent(
|
|
339
|
+
() => import("@/components/Checkout/Template01/CreateAccount.vue")
|
|
340
|
+
);
|
|
341
|
+
return {
|
|
342
|
+
router,
|
|
343
|
+
route,
|
|
344
|
+
inputData,
|
|
345
|
+
cartData,
|
|
346
|
+
AuthStore,
|
|
347
|
+
checkoutStore,
|
|
348
|
+
countries,
|
|
349
|
+
BillingDetailsForm,
|
|
350
|
+
DeliveryMethodForm,
|
|
351
|
+
ShippingDetailsForm,
|
|
352
|
+
ShippingMethodForm,
|
|
353
|
+
Calculations,
|
|
354
|
+
Order,
|
|
355
|
+
states,
|
|
356
|
+
CreateAccount,
|
|
357
|
+
AuthorityToLeave,
|
|
358
|
+
totalPrice,
|
|
359
|
+
deliveryMethods,
|
|
360
|
+
getStates,
|
|
361
|
+
shippingMethods,
|
|
362
|
+
proceedtoNext,
|
|
363
|
+
proceedtoPrev,
|
|
364
|
+
showMessage,
|
|
365
|
+
handleSubmit,
|
|
366
|
+
shippingFormEnabled,
|
|
367
|
+
updateUserFieldsIfuserLogin,
|
|
368
|
+
step_2,
|
|
369
|
+
step1Valid,
|
|
370
|
+
step2Valid,
|
|
371
|
+
PaymentMethods,
|
|
372
|
+
ipLocation
|
|
373
|
+
};
|
|
374
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export default function (inputData: any): {
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
3
|
+
Countries: import("vue").Ref<never[], never[]>;
|
|
4
|
+
ChangeCountry: (billingfield: any) => Promise<void>;
|
|
5
|
+
States: import("vue").Ref<never[], never[]>;
|
|
6
|
+
getUserBillingAddresses: import("vue").ComputedRef<{
|
|
7
|
+
id: number;
|
|
8
|
+
fullname: string | null;
|
|
9
|
+
firstname: string;
|
|
10
|
+
middlename: string | null;
|
|
11
|
+
lastname: string;
|
|
12
|
+
address: string;
|
|
13
|
+
suburb: string;
|
|
14
|
+
state: string | null;
|
|
15
|
+
state_id: number | null;
|
|
16
|
+
country: string;
|
|
17
|
+
country_id: number;
|
|
18
|
+
postcode: string;
|
|
19
|
+
mobile: string;
|
|
20
|
+
shipping: number;
|
|
21
|
+
billing: number;
|
|
22
|
+
}[]>;
|
|
23
|
+
getPrimaryBillingAddress: import("vue").ComputedRef<{
|
|
24
|
+
id: number;
|
|
25
|
+
fullname: string | null;
|
|
26
|
+
firstname: string;
|
|
27
|
+
middlename: string | null;
|
|
28
|
+
lastname: string;
|
|
29
|
+
address: string;
|
|
30
|
+
suburb: string;
|
|
31
|
+
state: string | null;
|
|
32
|
+
state_id: number | null;
|
|
33
|
+
country: string;
|
|
34
|
+
country_id: number;
|
|
35
|
+
postcode: string;
|
|
36
|
+
mobile: string;
|
|
37
|
+
shipping: number;
|
|
38
|
+
billing: number;
|
|
39
|
+
} | null>;
|
|
40
|
+
fillBillingAddressFields: (billingAddress: any) => void;
|
|
41
|
+
handleBillingAddressSelect: (event: Event) => void;
|
|
42
|
+
updateBillingAddress: (billingfield: any) => void;
|
|
43
|
+
};
|