flowrix 1.0.1-beta.8 → 1.0.1-beta.81
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 +1 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +94 -29
- package/dist/runtime/composables/Blog/useBlogIndex.d.ts +2 -5
- package/dist/runtime/composables/Brand/brand.js +2 -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 +15 -5
- package/dist/runtime/composables/Cart/useCartDetail.js +3 -0
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +2 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +40 -1
- package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +2 -2
- package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +3 -14
- package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +2 -2
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +84 -73
- package/dist/runtime/composables/Checkout/useCheckout.js +36 -28
- package/dist/runtime/composables/Checkout/{useBillingAddress.d.ts → useCheckoutBillingAddress.d.ts} +6 -6
- package/dist/runtime/composables/Checkout/{useBillingAddress.js → useCheckoutBillingAddress.js} +6 -1
- package/dist/runtime/composables/Checkout/{useShippingAddress.d.ts → useCheckoutShippingAddress.d.ts} +1 -1
- package/dist/runtime/composables/Checkout/{useShippingAddress.js → useCheckoutShippingAddress.js} +7 -2
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +7 -7
- package/dist/runtime/composables/Checkout/useCreateAccount.js +3 -1
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +2 -2
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +8 -7
- 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 +120 -11
- package/dist/runtime/composables/Customer/useRegister.js +311 -34
- 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/{useWishlists.d.ts → Customer/useWishlists.d.ts} +6 -19
- package/dist/runtime/composables/{useWishlists.js → Customer/useWishlists.js} +21 -29
- package/dist/runtime/composables/Extras/useCountry.d.ts +11 -6
- package/dist/runtime/composables/Extras/useCountry.js +5 -4
- package/dist/runtime/composables/Header/useHeader.d.ts +6 -20
- package/dist/runtime/composables/Header/useHeader.js +3 -2
- package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +1 -1
- package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -1
- 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 +1 -1
- package/dist/runtime/composables/Product/useService.js +0 -3
- package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +2 -2
- package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +2 -2
- package/dist/runtime/composables/index.d.ts +15 -12
- package/dist/runtime/composables/index.js +15 -12
- package/dist/runtime/composables/useAddresses.js +6 -6
- package/dist/runtime/composables/useCards.js +2 -2
- package/dist/runtime/composables/useLocation.d.ts +2 -12
- package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
- package/dist/runtime/composables/useQuotationCheckout.js +138 -0
- package/dist/runtime/middleware/flowrix.d.ts +5 -4
- package/dist/runtime/middleware/flowrix.js +41 -21
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/server/api/albums.js +1 -1
- package/dist/runtime/server/api/auth/forgot.js +1 -1
- package/dist/runtime/server/api/auth/login.js +5 -6
- package/dist/runtime/server/api/auth/logout.js +1 -1
- package/dist/runtime/server/api/auth/register.js +1 -1
- package/dist/runtime/server/api/auth/session.get.js +1 -1
- package/dist/runtime/server/api/auth/user/reset-password.js +1 -1
- package/dist/runtime/server/api/auth/user/session.js +1 -1
- package/dist/runtime/server/api/auth/user/verify-token.js +1 -1
- package/dist/runtime/server/api/banners.js +2 -2
- package/dist/runtime/server/api/brand/{[slug].js → [...slug].js} +17 -17
- 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.js +1 -1
- package/dist/runtime/server/api/cart/[slug]/update.js +1 -1
- 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.js +1 -1
- package/dist/runtime/server/api/cart/service/[slug]/add.js +1 -1
- package/dist/runtime/server/api/catalog/categories.js +5 -4
- package/dist/runtime/server/api/catalog/categoriesall.d.ts +3 -0
- package/dist/runtime/server/api/catalog/categoriesall.js +44 -0
- package/dist/runtime/server/api/catalog/featured.js +5 -4
- package/dist/runtime/server/api/catalog/samples.js +5 -4
- package/dist/runtime/server/api/catalog/search.js +5 -4
- package/dist/runtime/server/api/category/[...slug].js +18 -14
- package/dist/runtime/server/api/checkout/applyCoupon.js +1 -1
- package/dist/runtime/server/api/checkout/configs.d.ts +1 -1
- package/dist/runtime/server/api/checkout/configs.js +10 -11
- package/dist/runtime/server/api/checkout/countries.js +1 -1
- package/dist/runtime/server/api/checkout/paymentmethod.js +7 -7
- 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/{blog/[slug].js → cmspost/[...slug].js} +7 -9
- package/dist/runtime/server/api/{blog/blog.js → cmspost/all.js} +2 -2
- package/dist/runtime/server/api/company/profile.d.ts +1 -1
- package/dist/runtime/server/api/company/profile.js +9 -9
- package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +1 -1
- package/dist/runtime/server/api/contact-center/webforms/create.js +1 -1
- package/dist/runtime/server/api/countries.d.ts +2 -0
- package/dist/runtime/server/api/countries.js +35 -0
- package/dist/runtime/server/api/customer/address/add.js +1 -1
- package/dist/runtime/server/api/customer/address/delete.js +2 -2
- package/dist/runtime/server/api/customer/address/setshipping.js +1 -1
- package/dist/runtime/server/api/customer/address/update.js +1 -1
- package/dist/runtime/server/api/customer/cards/delete.js +2 -2
- package/dist/runtime/server/api/customer/cards/get.js +2 -2
- package/dist/runtime/server/api/customer/change-password.js +2 -2
- package/dist/runtime/server/api/customer/checkout.js +1 -1
- package/dist/runtime/server/api/customer/orders.js +2 -2
- package/dist/runtime/server/api/customer/profile/update.js +1 -1
- package/dist/runtime/server/api/customer/quotations.js +2 -2
- package/dist/runtime/server/api/customer/search.js +1 -1
- package/dist/runtime/server/api/customer/tax-invoice.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/add.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/createWishList.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/get.js +2 -2
- package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +1 -1
- package/dist/runtime/server/api/customer/wishlist/updateWishList.js +2 -2
- package/dist/runtime/server/api/featured.d.ts +2 -0
- package/dist/runtime/server/api/featured.js +16 -0
- package/dist/runtime/server/api/location.js +1 -1
- package/dist/runtime/server/api/nav/[id]/links.js +1 -1
- package/dist/runtime/server/api/page/{[slug].js → [...slug].js} +6 -8
- package/dist/runtime/server/api/product/[...slug].js +8 -5
- 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].js +5 -4
- package/dist/runtime/server/api/service/availability.js +1 -1
- package/dist/runtime/server/api/service/getall.d.ts +3 -0
- package/dist/runtime/server/api/service/getall.js +52 -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.js +1 -1
- package/dist/runtime/server/api/v2/[...slug].js +3 -1
- package/dist/runtime/server/api/webform.d.ts +3 -0
- package/dist/runtime/server/api/webform.js +16 -0
- package/dist/runtime/stores/Cart.d.ts +12 -0
- package/dist/runtime/stores/Cart.js +50 -16
- package/dist/runtime/stores/Checkout.d.ts +9 -15
- package/dist/runtime/stores/Checkout.js +19 -5
- package/dist/runtime/stores/Search.d.ts +1 -1
- package/dist/runtime/stores/Services.js +2 -2
- package/dist/runtime/stores/auth.d.ts +8 -11
- package/dist/runtime/stores/auth.js +390 -8
- package/dist/runtime/stores/countries.d.ts +1 -3
- package/dist/runtime/stores/countries.js +4 -8
- package/dist/runtime/stores/product/slug.d.ts +1 -17
- package/dist/runtime/stores/wishlists.d.ts +114 -6
- package/dist/runtime/stores/wishlists.js +209 -9
- package/dist/runtime/utils/api.js +9 -13
- package/dist/runtime/utils/htmlCache.d.ts +5 -0
- package/dist/runtime/utils/htmlCache.js +60 -0
- package/dist/types.d.mts +6 -2
- package/package.json +32 -20
- package/dist/runtime/composables/useAuth.d.ts +0 -45
- package/dist/runtime/composables/useAuth.js +0 -180
- package/dist/runtime/composables/useCountries.d.ts +0 -12
- package/dist/runtime/composables/useCountries.js +0 -50
- package/dist/runtime/composables/useOrders.d.ts +0 -21
- package/dist/runtime/composables/useOrders.js +0 -82
- package/dist/runtime/composables/useQuotations.d.ts +0 -14
- package/dist/runtime/composables/useQuotations.js +0 -50
- /package/dist/runtime/server/api/brand/{[slug].d.ts → [...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{blog/[slug].d.ts → cmspost/[...slug].d.ts} +0 -0
- /package/dist/runtime/server/api/{blog/blog.d.ts → cmspost/all.d.ts} +0 -0
- /package/dist/runtime/server/api/page/{[slug].d.ts → [...slug].d.ts} +0 -0
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
export default function (): {
|
|
2
|
-
router:
|
|
3
|
-
route:
|
|
2
|
+
router: import("vue-router").Router;
|
|
3
|
+
route: import("vue-router").RouteLocationNormalizedLoadedGeneric;
|
|
4
4
|
inputData: import("vue").Ref<{
|
|
5
|
-
deliverymethod:
|
|
6
|
-
billing_address:
|
|
5
|
+
deliverymethod: string | number | undefined;
|
|
6
|
+
billing_address: string | number | undefined;
|
|
7
7
|
billing_country: any;
|
|
8
8
|
shippingasbilling: boolean;
|
|
9
9
|
isCustomer: boolean;
|
|
10
|
-
billing_state:
|
|
11
|
-
billing_suburb:
|
|
10
|
+
billing_state: string | number | undefined;
|
|
11
|
+
billing_suburb: string | undefined;
|
|
12
12
|
clientsceret: any;
|
|
13
|
-
billing_postcode:
|
|
14
|
-
billing_mobile:
|
|
15
|
-
billing_firstname:
|
|
16
|
-
firstname:
|
|
17
|
-
billing_middlename:
|
|
18
|
-
billing_lastname:
|
|
19
|
-
lastname:
|
|
20
|
-
shipping_address:
|
|
21
|
-
shippingmethod:
|
|
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
22
|
shipping_country: any;
|
|
23
|
-
shipping_state:
|
|
24
|
-
shipping_suburb:
|
|
25
|
-
shipping_postcode:
|
|
26
|
-
shipping_mobile:
|
|
27
|
-
shipping_firstname:
|
|
28
|
-
shipping_middlename:
|
|
29
|
-
shipping_lastname:
|
|
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
30
|
vouchercode: any;
|
|
31
31
|
paymentmethod: string;
|
|
32
32
|
cart: any;
|
|
33
|
-
abndToken:
|
|
33
|
+
abndToken: string | undefined;
|
|
34
34
|
customertoken: string;
|
|
35
|
-
email:
|
|
36
|
-
mobile:
|
|
35
|
+
email: string | number | undefined;
|
|
36
|
+
mobile: string | number | undefined;
|
|
37
37
|
authoritytoleave: undefined;
|
|
38
38
|
register: string;
|
|
39
39
|
password: string;
|
|
@@ -53,38 +53,38 @@ export default function (): {
|
|
|
53
53
|
till_expiryyear: string;
|
|
54
54
|
save_card_details: number;
|
|
55
55
|
}, {
|
|
56
|
-
deliverymethod:
|
|
57
|
-
billing_address:
|
|
56
|
+
deliverymethod: string | number | undefined;
|
|
57
|
+
billing_address: string | number | undefined;
|
|
58
58
|
billing_country: any;
|
|
59
59
|
shippingasbilling: boolean;
|
|
60
60
|
isCustomer: boolean;
|
|
61
|
-
billing_state:
|
|
62
|
-
billing_suburb:
|
|
61
|
+
billing_state: string | number | undefined;
|
|
62
|
+
billing_suburb: string | undefined;
|
|
63
63
|
clientsceret: any;
|
|
64
|
-
billing_postcode:
|
|
65
|
-
billing_mobile:
|
|
66
|
-
billing_firstname:
|
|
67
|
-
firstname:
|
|
68
|
-
billing_middlename:
|
|
69
|
-
billing_lastname:
|
|
70
|
-
lastname:
|
|
71
|
-
shipping_address:
|
|
72
|
-
shippingmethod:
|
|
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
73
|
shipping_country: any;
|
|
74
|
-
shipping_state:
|
|
75
|
-
shipping_suburb:
|
|
76
|
-
shipping_postcode:
|
|
77
|
-
shipping_mobile:
|
|
78
|
-
shipping_firstname:
|
|
79
|
-
shipping_middlename:
|
|
80
|
-
shipping_lastname:
|
|
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
81
|
vouchercode: any;
|
|
82
82
|
paymentmethod: string;
|
|
83
83
|
cart: any;
|
|
84
|
-
abndToken:
|
|
84
|
+
abndToken: string | undefined;
|
|
85
85
|
customertoken: string;
|
|
86
|
-
email:
|
|
87
|
-
mobile:
|
|
86
|
+
email: string | number | undefined;
|
|
87
|
+
mobile: string | number | undefined;
|
|
88
88
|
authoritytoleave: undefined;
|
|
89
89
|
register: string;
|
|
90
90
|
password: string;
|
|
@@ -104,38 +104,38 @@ export default function (): {
|
|
|
104
104
|
till_expiryyear: string;
|
|
105
105
|
save_card_details: number;
|
|
106
106
|
} | {
|
|
107
|
-
deliverymethod:
|
|
108
|
-
billing_address:
|
|
107
|
+
deliverymethod: string | number | undefined;
|
|
108
|
+
billing_address: string | number | undefined;
|
|
109
109
|
billing_country: any;
|
|
110
110
|
shippingasbilling: boolean;
|
|
111
111
|
isCustomer: boolean;
|
|
112
|
-
billing_state:
|
|
113
|
-
billing_suburb:
|
|
112
|
+
billing_state: string | number | undefined;
|
|
113
|
+
billing_suburb: string | undefined;
|
|
114
114
|
clientsceret: any;
|
|
115
|
-
billing_postcode:
|
|
116
|
-
billing_mobile:
|
|
117
|
-
billing_firstname:
|
|
118
|
-
firstname:
|
|
119
|
-
billing_middlename:
|
|
120
|
-
billing_lastname:
|
|
121
|
-
lastname:
|
|
122
|
-
shipping_address:
|
|
123
|
-
shippingmethod:
|
|
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
124
|
shipping_country: any;
|
|
125
|
-
shipping_state:
|
|
126
|
-
shipping_suburb:
|
|
127
|
-
shipping_postcode:
|
|
128
|
-
shipping_mobile:
|
|
129
|
-
shipping_firstname:
|
|
130
|
-
shipping_middlename:
|
|
131
|
-
shipping_lastname:
|
|
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
132
|
vouchercode: any;
|
|
133
133
|
paymentmethod: string;
|
|
134
134
|
cart: any;
|
|
135
|
-
abndToken:
|
|
135
|
+
abndToken: string | undefined;
|
|
136
136
|
customertoken: string;
|
|
137
|
-
email:
|
|
138
|
-
mobile:
|
|
137
|
+
email: string | number | undefined;
|
|
138
|
+
mobile: string | number | undefined;
|
|
139
139
|
authoritytoleave: undefined;
|
|
140
140
|
register: string;
|
|
141
141
|
password: string;
|
|
@@ -155,9 +155,20 @@ export default function (): {
|
|
|
155
155
|
till_expiryyear: string;
|
|
156
156
|
save_card_details: number;
|
|
157
157
|
}>;
|
|
158
|
-
cartData: import("vue").ComputedRef<
|
|
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
|
+
}>;
|
|
159
170
|
AuthStore: import("vue").Ref<any, any>;
|
|
160
|
-
checkoutStore:
|
|
171
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
161
172
|
countries: any;
|
|
162
173
|
BillingDetailsForm: any;
|
|
163
174
|
DeliveryMethodForm: any;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
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";
|
|
2
8
|
export default function() {
|
|
3
9
|
const router = useRouter();
|
|
4
10
|
const route = useRoute();
|
|
5
11
|
const {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
user,
|
|
13
|
+
token,
|
|
14
|
+
isAuthenticated
|
|
15
|
+
} = useAuthStore();
|
|
9
16
|
const { profile } = useCompanyProfile();
|
|
10
17
|
const cartStore = useCartStore();
|
|
11
|
-
const companyCountryId = computed(() => profile?.
|
|
18
|
+
const companyCountryId = computed(() => profile?.data.country_id || "");
|
|
12
19
|
const checkoutStore = useCheckoutStore();
|
|
13
20
|
const AuthStore = ref();
|
|
14
21
|
const shippingFormEnabled = ref(true);
|
|
@@ -75,14 +82,13 @@ export default function() {
|
|
|
75
82
|
save_card_details: 0
|
|
76
83
|
});
|
|
77
84
|
const updateUserFieldsIfuserLogin = (async (sameasbilling = false) => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
const shippingAddres = LoggedInUser.value.addresses?.filter((address) => address.shipping == 1)[0];
|
|
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];
|
|
82
88
|
inputData.value.billing_firstname = billingAddres.firstname;
|
|
83
89
|
inputData.value.billing_lastname = billingAddres.lastname;
|
|
84
|
-
inputData.value.email =
|
|
85
|
-
inputData.value.billing_mobile =
|
|
90
|
+
inputData.value.email = user.email;
|
|
91
|
+
inputData.value.billing_mobile = user.mobile;
|
|
86
92
|
if (sameasbilling == true) {
|
|
87
93
|
} else {
|
|
88
94
|
if (billingAddres != void 0) {
|
|
@@ -116,7 +122,7 @@ export default function() {
|
|
|
116
122
|
inputData.value.shipping_mobile = shippingAddres.mobile;
|
|
117
123
|
}
|
|
118
124
|
}
|
|
119
|
-
} else if (
|
|
125
|
+
} else if (isAuthenticated.value && sameasbilling == true) {
|
|
120
126
|
inputData.value.shipping_firstname = inputData.value.billing_firstname ? inputData.value.billing_firstname : "";
|
|
121
127
|
inputData.value.shipping_lastname = inputData.value.billing_lastname ? inputData.value.billing_lastname : "";
|
|
122
128
|
inputData.value.shipping_address = inputData.value.billing_address ? inputData.value.billing_address : "";
|
|
@@ -166,7 +172,7 @@ export default function() {
|
|
|
166
172
|
});
|
|
167
173
|
const shippingMethods = computed(() => {
|
|
168
174
|
if (checkoutStore.config) {
|
|
169
|
-
return checkoutStore.config
|
|
175
|
+
return checkoutStore.config?.shippingmethods?.filter((method) => method.available == 1);
|
|
170
176
|
}
|
|
171
177
|
});
|
|
172
178
|
watch(() => checkoutStore.config.shippingmethods, (newValue, oldValue) => {
|
|
@@ -212,28 +218,28 @@ export default function() {
|
|
|
212
218
|
}
|
|
213
219
|
};
|
|
214
220
|
const CheckFlowrixPayment = ((inputData2, payment) => {
|
|
215
|
-
let
|
|
216
|
-
var
|
|
221
|
+
let status = {};
|
|
222
|
+
var data = {
|
|
217
223
|
card_holder: inputData2.till_cardname,
|
|
218
224
|
month: inputData2.till_expirymonth,
|
|
219
225
|
year: inputData2.till_expiryyear
|
|
220
226
|
};
|
|
221
227
|
payment.tokenize(
|
|
222
|
-
|
|
228
|
+
data,
|
|
223
229
|
//additional data, MUST include card_holder (or first_name & last_name), month and year
|
|
224
|
-
function(
|
|
225
|
-
inputData2.clientsceret =
|
|
226
|
-
checkoutStore.publishableKey.clientsceret =
|
|
230
|
+
function(token2, cardData) {
|
|
231
|
+
inputData2.clientsceret = token2;
|
|
232
|
+
checkoutStore.publishableKey.clientsceret = token2;
|
|
227
233
|
checkoutStore.saveToCheckoutSession(inputData2);
|
|
228
|
-
if (
|
|
229
|
-
|
|
234
|
+
if (token2 != "") {
|
|
235
|
+
status = {};
|
|
230
236
|
}
|
|
231
237
|
},
|
|
232
238
|
function(errors) {
|
|
233
|
-
|
|
239
|
+
status = errors;
|
|
234
240
|
}
|
|
235
241
|
);
|
|
236
|
-
return
|
|
242
|
+
return status;
|
|
237
243
|
});
|
|
238
244
|
const handleSubmit = async (url_cancel, url_success, url_booking) => {
|
|
239
245
|
try {
|
|
@@ -250,8 +256,7 @@ export default function() {
|
|
|
250
256
|
return false;
|
|
251
257
|
}
|
|
252
258
|
}
|
|
253
|
-
|
|
254
|
-
if (Object.keys(LoggedInUser).length == 0) {
|
|
259
|
+
if (isAuthenticated.value) {
|
|
255
260
|
sessiondata.value.fields.firstname = inputData.value.billing_firstname;
|
|
256
261
|
sessiondata.value.fields.lastname = inputData.value.billing_lastname;
|
|
257
262
|
}
|
|
@@ -266,14 +271,16 @@ export default function() {
|
|
|
266
271
|
sessiondata.value.fields.eway_cardnumber = cardnumber;
|
|
267
272
|
sessiondata.value.fields.eway_cvn = eway_cvn;
|
|
268
273
|
}
|
|
269
|
-
await checkoutStore.submitCheckout();
|
|
270
|
-
if (
|
|
274
|
+
const chckoutResponse = await checkoutStore.submitCheckout();
|
|
275
|
+
if (chckoutResponse.status == "Success") {
|
|
271
276
|
if (inputData.value.paymentmethod == "web-stripe") {
|
|
272
277
|
const { stripe, elements } = await getStripeElements(
|
|
273
278
|
checkoutStore.publishableKey.key,
|
|
274
279
|
inputData.value.clientsceret
|
|
275
280
|
);
|
|
276
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}`);
|
|
277
284
|
const { error: error2 } = await stripe.confirmPayment({
|
|
278
285
|
elements,
|
|
279
286
|
confirmParams: {
|
|
@@ -289,9 +296,10 @@ export default function() {
|
|
|
289
296
|
} else {
|
|
290
297
|
showMessage(error.message);
|
|
291
298
|
}
|
|
292
|
-
} else if (
|
|
293
|
-
var url =
|
|
299
|
+
} else if (chckoutResponse.data.url) {
|
|
300
|
+
var url = chckoutResponse.data.url;
|
|
294
301
|
} else {
|
|
302
|
+
window.location.href = url_success;
|
|
295
303
|
}
|
|
296
304
|
removeLoading();
|
|
297
305
|
} else if (checkoutStore.errorResponseData.status == "Error") {
|
package/dist/runtime/composables/Checkout/{useBillingAddress.d.ts → useCheckoutBillingAddress.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore:
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
3
3
|
passwordShow: import("vue").Ref<string, string>;
|
|
4
4
|
password: import("vue").Ref<string, string>;
|
|
5
5
|
password_confirmationShow: import("vue").Ref<string, string>;
|
|
@@ -7,11 +7,11 @@ export default function (inputData: any): {
|
|
|
7
7
|
UserAccount: import("vue").Ref<boolean, boolean>;
|
|
8
8
|
CheckUserAccount: (billingDetails: any, userEmail: string) => Promise<void>;
|
|
9
9
|
CheckingUserAccount: import("vue").Ref<boolean, boolean>;
|
|
10
|
-
passwordStrength:
|
|
11
|
-
passwordStrengthClass:
|
|
12
|
-
passwordStrengthValue:
|
|
13
|
-
passwordStrengthWidth:
|
|
14
|
-
passwordStrengthTextColor:
|
|
10
|
+
passwordStrength: import("vue").ComputedRef<"Password must be 8 characters" | "Strong" | "Medium" | "Weak">;
|
|
11
|
+
passwordStrengthClass: import("vue").ComputedRef<"bg-danger" | "bg-success" | "bg-warning">;
|
|
12
|
+
passwordStrengthValue: import("vue").ComputedRef<number>;
|
|
13
|
+
passwordStrengthWidth: import("vue").ComputedRef<string>;
|
|
14
|
+
passwordStrengthTextColor: import("vue").ComputedRef<"text-danger" | "text-success" | "text-black">;
|
|
15
15
|
UpdateStripe: (inputData: any) => Promise<void>;
|
|
16
16
|
Countries: import("vue").Ref<never[], never[]>;
|
|
17
17
|
ChangeCountry: (billingfield: any) => Promise<void>;
|
package/dist/runtime/composables/Checkout/{useBillingAddress.js → useCheckoutBillingAddress.js}
RENAMED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ref, computed, onMounted } from "vue";
|
|
2
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
3
|
+
import { useCountry } from "../Extras/useCountry.js";
|
|
4
|
+
import { useCompanyProfile } from "../../stores/useCompanyProfile.js";
|
|
5
|
+
import useStripe from "./PaymentMethods/useStripe.js";
|
|
6
|
+
import { usePasswordFormatter } from "../Extras/usePasswordFormatter.js";
|
|
2
7
|
export default function(inputData) {
|
|
3
8
|
const checkoutStore = useCheckoutStore();
|
|
4
9
|
const passwordShow = ref("password");
|
|
@@ -54,7 +59,7 @@ export default function(inputData) {
|
|
|
54
59
|
});
|
|
55
60
|
const UpdateStripe = (async (inputData2) => {
|
|
56
61
|
await checkoutStore.saveToCheckoutSession(inputData2);
|
|
57
|
-
const { getpaymentMethod } =
|
|
62
|
+
const { getpaymentMethod } = useStripe();
|
|
58
63
|
const totalPrice = computed(() => {
|
|
59
64
|
return checkoutStore.config ? checkoutStore.config.calculations.total : checkoutStore.config.total;
|
|
60
65
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore:
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
3
3
|
updateShippingAddress: (shippingfield: any) => void;
|
|
4
4
|
sameAsBilling: (sameasbilling: boolean | undefined, inputData: any) => Promise<void>;
|
|
5
5
|
UpdateStripe: (inputData: any) => Promise<void>;
|
package/dist/runtime/composables/Checkout/{useShippingAddress.js → useCheckoutShippingAddress.js}
RENAMED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { ref, computed, onMounted } from "vue";
|
|
2
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
3
|
+
import { useCountry } from "../Extras/useCountry.js";
|
|
4
|
+
import { useCompanyProfile } from "../../stores/useCompanyProfile.js";
|
|
5
|
+
import useStripe from "./PaymentMethods/useStripe.js";
|
|
6
|
+
import { useAuthStore } from "../../stores/auth.js";
|
|
2
7
|
export default function(inputData) {
|
|
3
8
|
const {
|
|
4
9
|
status,
|
|
@@ -11,7 +16,7 @@ export default function(inputData) {
|
|
|
11
16
|
signIn,
|
|
12
17
|
signOut,
|
|
13
18
|
refresh
|
|
14
|
-
} =
|
|
19
|
+
} = useAuthStore();
|
|
15
20
|
const AuthStore = ref();
|
|
16
21
|
const checkoutStore = useCheckoutStore();
|
|
17
22
|
const CountryData = useCountry().data;
|
|
@@ -103,7 +108,7 @@ export default function(inputData) {
|
|
|
103
108
|
});
|
|
104
109
|
const UpdateStripe = (async (inputData2) => {
|
|
105
110
|
await checkoutStore.saveToCheckoutSession(inputData2);
|
|
106
|
-
const { getpaymentMethod } =
|
|
111
|
+
const { getpaymentMethod } = useStripe();
|
|
107
112
|
const totalPrice = computed(() => {
|
|
108
113
|
return checkoutStore.config ? checkoutStore.config.calculations.total : checkoutStore.config.total;
|
|
109
114
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default function (): {
|
|
2
|
-
checkoutStore:
|
|
1
|
+
export default function (inputData: any): {
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
3
3
|
passwordShow: import("vue").Ref<string, string>;
|
|
4
4
|
password: import("vue").Ref<string, string>;
|
|
5
5
|
password_confirmationShow: import("vue").Ref<string, string>;
|
|
@@ -7,9 +7,9 @@ export default function (): {
|
|
|
7
7
|
UserAccount: import("vue").Ref<boolean, boolean>;
|
|
8
8
|
CheckUserAccount: (billingDetails: any, userEmail: string) => Promise<void>;
|
|
9
9
|
CheckingUserAccount: import("vue").Ref<boolean, boolean>;
|
|
10
|
-
passwordStrength:
|
|
11
|
-
passwordStrengthClass:
|
|
12
|
-
passwordStrengthValue:
|
|
13
|
-
passwordStrengthWidth:
|
|
14
|
-
passwordStrengthTextColor:
|
|
10
|
+
passwordStrength: import("vue").ComputedRef<"Password must be 8 characters" | "Strong" | "Medium" | "Weak">;
|
|
11
|
+
passwordStrengthClass: import("vue").ComputedRef<"bg-danger" | "bg-success" | "bg-warning">;
|
|
12
|
+
passwordStrengthValue: import("vue").ComputedRef<number>;
|
|
13
|
+
passwordStrengthWidth: import("vue").ComputedRef<string>;
|
|
14
|
+
passwordStrengthTextColor: import("vue").ComputedRef<"text-danger" | "text-success" | "text-black">;
|
|
15
15
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
-
|
|
2
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
3
|
+
import { usePasswordFormatter } from "../Extras/usePasswordFormatter.js";
|
|
4
|
+
export default function(inputData) {
|
|
3
5
|
const checkoutStore = useCheckoutStore();
|
|
4
6
|
const passwordShow = ref("password");
|
|
5
7
|
const password = ref("");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default function (): {
|
|
2
|
-
checkoutStore:
|
|
1
|
+
export default function (inputData: any): {
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
|
|
3
3
|
updateDeliveryMethod: (inputData: any) => Promise<void>;
|
|
4
4
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
2
|
+
import useStripe from "./PaymentMethods/useStripe.js";
|
|
3
|
+
export default function(inputData) {
|
|
3
4
|
const checkoutStore = useCheckoutStore();
|
|
4
|
-
const updateDeliveryMethod = (async (
|
|
5
|
-
await checkoutStore.saveToCheckoutSession(
|
|
6
|
-
const { getpaymentMethod } =
|
|
5
|
+
const updateDeliveryMethod = (async (inputData2) => {
|
|
6
|
+
await checkoutStore.saveToCheckoutSession(inputData2);
|
|
7
|
+
const { getpaymentMethod } = useStripe();
|
|
7
8
|
const totalPrice = checkoutStore.config ? checkoutStore.config.calculations.total : checkoutStore.config.total;
|
|
8
|
-
if (
|
|
9
|
-
getpaymentMethod("web-stripe",
|
|
9
|
+
if (inputData2.paymentmethod && inputData2.paymentmethod == "web-stripe") {
|
|
10
|
+
getpaymentMethod("web-stripe", inputData2, totalPrice);
|
|
10
11
|
}
|
|
11
12
|
const cart = [];
|
|
12
13
|
cart.items = checkoutStore.config.cart;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export interface BillingForm {
|
|
2
|
+
id: string | number;
|
|
3
|
+
firstname: string;
|
|
4
|
+
lastname: string;
|
|
5
|
+
saddress: string;
|
|
6
|
+
suburb: string;
|
|
7
|
+
state: string;
|
|
8
|
+
state_id: string | number;
|
|
9
|
+
country: string;
|
|
10
|
+
country_id: string | number;
|
|
11
|
+
postcode: string;
|
|
12
|
+
mobile: string;
|
|
13
|
+
shipping: string | number;
|
|
14
|
+
billing: string | number;
|
|
15
|
+
}
|
|
16
|
+
export declare function useBillingAddress(): {
|
|
17
|
+
billingForm: import("vue").Ref<{
|
|
18
|
+
id: string | number;
|
|
19
|
+
firstname: string;
|
|
20
|
+
lastname: string;
|
|
21
|
+
saddress: string;
|
|
22
|
+
suburb: string;
|
|
23
|
+
state: string;
|
|
24
|
+
state_id: string | number;
|
|
25
|
+
country: string;
|
|
26
|
+
country_id: string | number;
|
|
27
|
+
postcode: string;
|
|
28
|
+
mobile: string;
|
|
29
|
+
shipping: string | number;
|
|
30
|
+
billing: string | number;
|
|
31
|
+
}, BillingForm | {
|
|
32
|
+
id: string | number;
|
|
33
|
+
firstname: string;
|
|
34
|
+
lastname: string;
|
|
35
|
+
saddress: string;
|
|
36
|
+
suburb: string;
|
|
37
|
+
state: string;
|
|
38
|
+
state_id: string | number;
|
|
39
|
+
country: string;
|
|
40
|
+
country_id: string | number;
|
|
41
|
+
postcode: string;
|
|
42
|
+
mobile: string;
|
|
43
|
+
shipping: string | number;
|
|
44
|
+
billing: string | number;
|
|
45
|
+
}>;
|
|
46
|
+
successMessage: import("vue").Ref<string, string>;
|
|
47
|
+
errorMessage: import("vue").Ref<string, string>;
|
|
48
|
+
isEditing: import("vue").Ref<boolean, boolean>;
|
|
49
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
50
|
+
submitAddressReturn: import("vue").Ref<any, any>;
|
|
51
|
+
user: import("vue").ComputedRef<{
|
|
52
|
+
id: number;
|
|
53
|
+
fullname: string;
|
|
54
|
+
firstname: string;
|
|
55
|
+
lastname: string;
|
|
56
|
+
email: string;
|
|
57
|
+
avatar: string;
|
|
58
|
+
country_id: number | null;
|
|
59
|
+
country: {
|
|
60
|
+
id: number;
|
|
61
|
+
name: string;
|
|
62
|
+
emoji: string;
|
|
63
|
+
} | null;
|
|
64
|
+
state_id: number | null;
|
|
65
|
+
state: string | null;
|
|
66
|
+
suburb: string | null;
|
|
67
|
+
dob: string | null;
|
|
68
|
+
phone: string | null;
|
|
69
|
+
address: string | null;
|
|
70
|
+
mobile: string | null;
|
|
71
|
+
company: string | null;
|
|
72
|
+
addresses: {
|
|
73
|
+
id: number;
|
|
74
|
+
fullname: string | null;
|
|
75
|
+
firstname: string;
|
|
76
|
+
middlename: string | null;
|
|
77
|
+
lastname: string;
|
|
78
|
+
address: string;
|
|
79
|
+
suburb: string;
|
|
80
|
+
state: string | null;
|
|
81
|
+
state_id: number | null;
|
|
82
|
+
country: string;
|
|
83
|
+
country_id: number;
|
|
84
|
+
postcode: string;
|
|
85
|
+
mobile: string;
|
|
86
|
+
shipping: number;
|
|
87
|
+
billing: number;
|
|
88
|
+
}[];
|
|
89
|
+
created_at: string;
|
|
90
|
+
} | null>;
|
|
91
|
+
userBillingAddress: import("vue").ComputedRef<{
|
|
92
|
+
id: number;
|
|
93
|
+
fullname: string | null;
|
|
94
|
+
firstname: string;
|
|
95
|
+
middlename: string | null;
|
|
96
|
+
lastname: string;
|
|
97
|
+
address: string;
|
|
98
|
+
suburb: string;
|
|
99
|
+
state: string | null;
|
|
100
|
+
state_id: number | null;
|
|
101
|
+
country: string;
|
|
102
|
+
country_id: number;
|
|
103
|
+
postcode: string;
|
|
104
|
+
mobile: string;
|
|
105
|
+
shipping: number;
|
|
106
|
+
billing: number;
|
|
107
|
+
} | undefined>;
|
|
108
|
+
clearMessages: () => void;
|
|
109
|
+
cancelEdit: () => void;
|
|
110
|
+
submitAddress: () => Promise<void>;
|
|
111
|
+
resetForm: () => void;
|
|
112
|
+
};
|