flowrix 1.0.1-beta.26 → 1.0.1-beta.27
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.json +1 -1
- package/dist/runtime/composables/Cart/useCartDetail.d.ts +15 -5
- package/dist/runtime/composables/Cart/useCartDetail.js +3 -0
- package/dist/runtime/composables/Checkout/useBillingAddress.d.ts +14 -6
- package/dist/runtime/composables/Checkout/useBillingAddress.js +6 -1
- package/dist/runtime/composables/Checkout/useCheckout.d.ts +92 -73
- package/dist/runtime/composables/Checkout/useCheckout.js +6 -0
- package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +14 -6
- package/dist/runtime/composables/Checkout/useCreateAccount.js +2 -0
- package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +9 -1
- package/dist/runtime/composables/Checkout/useDeliveryMethod.js +3 -2
- package/dist/runtime/composables/Checkout/useShippingAddress.d.ts +9 -1
- package/dist/runtime/composables/Checkout/useShippingAddress.js +5 -1
- package/dist/runtime/stores/Checkout.d.ts +8 -6
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface Product {
|
|
1
|
+
export interface Product {
|
|
2
2
|
name: string;
|
|
3
3
|
height?: number;
|
|
4
4
|
width?: number;
|
|
@@ -32,18 +32,28 @@ interface Product {
|
|
|
32
32
|
per_order_pricing: number;
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
interface CartDetailProps {
|
|
35
|
+
export interface CartDetailProps {
|
|
36
36
|
items: Record<string, Product>;
|
|
37
37
|
}
|
|
38
38
|
export declare const useCartDetail: (props: CartDetailProps) => {
|
|
39
39
|
productAccordionStates: import("vue").Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
40
40
|
cartItems: import("vue").ComputedRef<Record<string, Product>>;
|
|
41
|
-
companyProfile:
|
|
42
|
-
checkoutData: import("vue").ComputedRef<
|
|
41
|
+
companyProfile: null;
|
|
42
|
+
checkoutData: import("vue").ComputedRef<{
|
|
43
|
+
[x: string]: any;
|
|
44
|
+
preferences?: Record<string, any>[] | undefined;
|
|
45
|
+
outlets?: Record<string, any>[] | undefined;
|
|
46
|
+
deliverytype?: string | undefined;
|
|
47
|
+
order_no?: string | undefined;
|
|
48
|
+
publishableKey?: any;
|
|
49
|
+
calculations?: any;
|
|
50
|
+
shippingmethods?: any;
|
|
51
|
+
cart?: Record<string, import("../../stores/Checkout.js").CartItem> | undefined;
|
|
52
|
+
totals?: Record<string, any> | undefined;
|
|
53
|
+
}>;
|
|
43
54
|
removeFromCartMiddleware: (productId: string, product: Product) => Promise<void>;
|
|
44
55
|
updateQuantityMiddleware: (product: Product, qty: number) => Promise<void>;
|
|
45
56
|
toggleAccordion: (rowId: string) => void;
|
|
46
57
|
dvidedsummary: (sammarydata: any[]) => any[][];
|
|
47
58
|
swatchimagesSrcset: (swatchImage: string) => string;
|
|
48
59
|
};
|
|
49
|
-
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { onMounted, ref, computed } from "vue";
|
|
2
|
+
import { useCartStore } from "../../stores/Cart.js";
|
|
3
|
+
import { useCompanyProfile } from "../../stores/useCompanyProfile.js";
|
|
4
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
2
5
|
export const useCartDetail = (props) => {
|
|
3
6
|
const cartStore = useCartStore();
|
|
4
7
|
const { profile: companyProfile } = useCompanyProfile();
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore:
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/index.js").CheckoutState, {}, {
|
|
3
|
+
resetState(): void;
|
|
4
|
+
paymentMethods(formData: any): Promise<any>;
|
|
5
|
+
getConfig(): Promise<void>;
|
|
6
|
+
submitCheckout(): Promise<any>;
|
|
7
|
+
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
+
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
+
saveToCheckoutSession(fieldsData: import("../../stores/index.js").FieldData): Promise<void>;
|
|
10
|
+
}>;
|
|
3
11
|
passwordShow: import("vue").Ref<string, string>;
|
|
4
12
|
password: import("vue").Ref<string, string>;
|
|
5
13
|
password_confirmationShow: import("vue").Ref<string, string>;
|
|
@@ -7,11 +15,11 @@ export default function (inputData: any): {
|
|
|
7
15
|
UserAccount: import("vue").Ref<boolean, boolean>;
|
|
8
16
|
CheckUserAccount: (billingDetails: any, userEmail: string) => Promise<void>;
|
|
9
17
|
CheckingUserAccount: import("vue").Ref<boolean, boolean>;
|
|
10
|
-
passwordStrength:
|
|
11
|
-
passwordStrengthClass:
|
|
12
|
-
passwordStrengthValue:
|
|
13
|
-
passwordStrengthWidth:
|
|
14
|
-
passwordStrengthTextColor:
|
|
18
|
+
passwordStrength: import("vue").ComputedRef<"Password must be 8 characters" | "Strong" | "Medium" | "Weak">;
|
|
19
|
+
passwordStrengthClass: import("vue").ComputedRef<"bg-danger" | "bg-success" | "bg-warning">;
|
|
20
|
+
passwordStrengthValue: import("vue").ComputedRef<number>;
|
|
21
|
+
passwordStrengthWidth: import("vue").ComputedRef<string>;
|
|
22
|
+
passwordStrengthTextColor: import("vue").ComputedRef<"text-danger" | "text-success" | "text-black">;
|
|
15
23
|
UpdateStripe: (inputData: any) => Promise<void>;
|
|
16
24
|
Countries: import("vue").Ref<never[], never[]>;
|
|
17
25
|
ChangeCountry: (billingfield: any) => Promise<void>;
|
|
@@ -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,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,28 @@ 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/index.js").CheckoutState, {}, {
|
|
172
|
+
resetState(): void;
|
|
173
|
+
paymentMethods(formData: any): Promise<any>;
|
|
174
|
+
getConfig(): Promise<void>;
|
|
175
|
+
submitCheckout(): Promise<any>;
|
|
176
|
+
confirmPayment(checkoutId: string): Promise<void>;
|
|
177
|
+
CheckUserAccount(email: string): Promise<any>;
|
|
178
|
+
saveToCheckoutSession(fieldsData: import("../../stores/index.js").FieldData): Promise<void>;
|
|
179
|
+
}>;
|
|
161
180
|
countries: any;
|
|
162
181
|
BillingDetailsForm: any;
|
|
163
182
|
DeliveryMethodForm: any;
|
|
@@ -1,4 +1,10 @@
|
|
|
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 { useAuth } from "../useAuth.js";
|
|
2
8
|
export default function() {
|
|
3
9
|
const router = useRouter();
|
|
4
10
|
const route = useRoute();
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export default function (): {
|
|
2
|
-
checkoutStore:
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/index.js").CheckoutState, {}, {
|
|
3
|
+
resetState(): void;
|
|
4
|
+
paymentMethods(formData: any): Promise<any>;
|
|
5
|
+
getConfig(): Promise<void>;
|
|
6
|
+
submitCheckout(): Promise<any>;
|
|
7
|
+
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
+
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
+
saveToCheckoutSession(fieldsData: import("../../stores/index.js").FieldData): Promise<void>;
|
|
10
|
+
}>;
|
|
3
11
|
passwordShow: import("vue").Ref<string, string>;
|
|
4
12
|
password: import("vue").Ref<string, string>;
|
|
5
13
|
password_confirmationShow: import("vue").Ref<string, string>;
|
|
@@ -7,9 +15,9 @@ export default function (): {
|
|
|
7
15
|
UserAccount: import("vue").Ref<boolean, boolean>;
|
|
8
16
|
CheckUserAccount: (billingDetails: any, userEmail: string) => Promise<void>;
|
|
9
17
|
CheckingUserAccount: import("vue").Ref<boolean, boolean>;
|
|
10
|
-
passwordStrength:
|
|
11
|
-
passwordStrengthClass:
|
|
12
|
-
passwordStrengthValue:
|
|
13
|
-
passwordStrengthWidth:
|
|
14
|
-
passwordStrengthTextColor:
|
|
18
|
+
passwordStrength: import("vue").ComputedRef<"Password must be 8 characters" | "Strong" | "Medium" | "Weak">;
|
|
19
|
+
passwordStrengthClass: import("vue").ComputedRef<"bg-danger" | "bg-success" | "bg-warning">;
|
|
20
|
+
passwordStrengthValue: import("vue").ComputedRef<number>;
|
|
21
|
+
passwordStrengthWidth: import("vue").ComputedRef<string>;
|
|
22
|
+
passwordStrengthTextColor: import("vue").ComputedRef<"text-danger" | "text-success" | "text-black">;
|
|
15
23
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
3
|
+
import { usePasswordFormatter } from "../Extras/usePasswordFormatter.js";
|
|
2
4
|
export default function() {
|
|
3
5
|
const checkoutStore = useCheckoutStore();
|
|
4
6
|
const passwordShow = ref("password");
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export default function (): {
|
|
2
|
-
checkoutStore:
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/index.js").CheckoutState, {}, {
|
|
3
|
+
resetState(): void;
|
|
4
|
+
paymentMethods(formData: any): Promise<any>;
|
|
5
|
+
getConfig(): Promise<void>;
|
|
6
|
+
submitCheckout(): Promise<any>;
|
|
7
|
+
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
+
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
+
saveToCheckoutSession(fieldsData: import("../../stores/index.js").FieldData): Promise<void>;
|
|
10
|
+
}>;
|
|
3
11
|
updateDeliveryMethod: (inputData: any) => Promise<void>;
|
|
4
12
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useCheckoutStore } from "../../stores/Checkout.js";
|
|
2
|
+
import useStripe from "./PaymentMethods/useStripe.js";
|
|
2
3
|
export default function() {
|
|
3
4
|
const checkoutStore = useCheckoutStore();
|
|
4
5
|
const updateDeliveryMethod = (async (inputData) => {
|
|
5
6
|
await checkoutStore.saveToCheckoutSession(inputData);
|
|
6
|
-
const { getpaymentMethod } =
|
|
7
|
+
const { getpaymentMethod } = useStripe();
|
|
7
8
|
const totalPrice = checkoutStore.config ? checkoutStore.config.calculations.total : checkoutStore.config.total;
|
|
8
9
|
if (inputData.paymentmethod && inputData.paymentmethod == "web-stripe") {
|
|
9
10
|
getpaymentMethod("web-stripe", inputData, totalPrice);
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export default function (inputData: any): {
|
|
2
|
-
checkoutStore:
|
|
2
|
+
checkoutStore: import("pinia").Store<"checkout", import("../../stores/index.js").CheckoutState, {}, {
|
|
3
|
+
resetState(): void;
|
|
4
|
+
paymentMethods(formData: any): Promise<any>;
|
|
5
|
+
getConfig(): Promise<void>;
|
|
6
|
+
submitCheckout(): Promise<any>;
|
|
7
|
+
confirmPayment(checkoutId: string): Promise<void>;
|
|
8
|
+
CheckUserAccount(email: string): Promise<any>;
|
|
9
|
+
saveToCheckoutSession(fieldsData: import("../../stores/index.js").FieldData): Promise<void>;
|
|
10
|
+
}>;
|
|
3
11
|
updateShippingAddress: (shippingfield: any) => void;
|
|
4
12
|
sameAsBilling: (sameasbilling: boolean | undefined, inputData: any) => Promise<void>;
|
|
5
13
|
UpdateStripe: (inputData: any) => Promise<void>;
|
|
@@ -1,4 +1,8 @@
|
|
|
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";
|
|
2
6
|
export default function(inputData) {
|
|
3
7
|
const {
|
|
4
8
|
status,
|
|
@@ -103,7 +107,7 @@ export default function(inputData) {
|
|
|
103
107
|
});
|
|
104
108
|
const UpdateStripe = (async (inputData2) => {
|
|
105
109
|
await checkoutStore.saveToCheckoutSession(inputData2);
|
|
106
|
-
const { getpaymentMethod } =
|
|
110
|
+
const { getpaymentMethod } = useStripe();
|
|
107
111
|
const totalPrice = computed(() => {
|
|
108
112
|
return checkoutStore.config ? checkoutStore.config.calculations.total : checkoutStore.config.total;
|
|
109
113
|
});
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
interface PreferenceData {
|
|
1
|
+
export interface PreferenceData {
|
|
2
2
|
fields?: Record<string, any>;
|
|
3
3
|
deliverytype?: string;
|
|
4
4
|
order_no?: string;
|
|
5
5
|
publishableKey?: any;
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}
|
|
8
|
-
interface CartItem {
|
|
8
|
+
export interface CartItem {
|
|
9
9
|
fields?: Record<string, any>;
|
|
10
10
|
deliverytype?: string;
|
|
11
11
|
order_no?: string;
|
|
12
12
|
publishableKey?: any;
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
15
|
+
export interface Country {
|
|
16
|
+
id: number | string;
|
|
17
|
+
}
|
|
18
|
+
export interface ConfigData {
|
|
16
19
|
preferences?: Record<string, any>[];
|
|
17
20
|
outlets?: Record<string, any>[];
|
|
18
21
|
deliverytype?: string;
|
|
@@ -24,7 +27,7 @@ interface ConfigData {
|
|
|
24
27
|
totals?: Record<string, any>;
|
|
25
28
|
[key: string]: any;
|
|
26
29
|
}
|
|
27
|
-
interface FieldData {
|
|
30
|
+
export interface FieldData {
|
|
28
31
|
billing_state?: number | string;
|
|
29
32
|
billing_firstname?: string | number;
|
|
30
33
|
firstname?: string | number;
|
|
@@ -58,7 +61,7 @@ interface FieldData {
|
|
|
58
61
|
quotation_no?: string;
|
|
59
62
|
[key: string]: any;
|
|
60
63
|
}
|
|
61
|
-
interface CheckoutState {
|
|
64
|
+
export interface CheckoutState {
|
|
62
65
|
publishableKey: Record<string, any>;
|
|
63
66
|
responseData: any[];
|
|
64
67
|
config: ConfigData;
|
|
@@ -82,4 +85,3 @@ export declare const useCheckoutStore: import("pinia").StoreDefinition<"checkout
|
|
|
82
85
|
CheckUserAccount(email: string): Promise<any>;
|
|
83
86
|
saveToCheckoutSession(fieldsData: FieldData): Promise<void>;
|
|
84
87
|
}>;
|
|
85
|
-
export {};
|