flowrix 1.0.1-beta.9 → 1.0.1-beta.91

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.
Files changed (231) hide show
  1. package/dist/module.d.mts +1 -6
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +103 -34
  4. package/dist/runtime/composables/Blog/useBlogIndex.d.ts +2 -5
  5. package/dist/runtime/composables/Brand/brand.js +2 -0
  6. package/dist/runtime/composables/Cart/useCart.d.ts +40 -0
  7. package/dist/runtime/composables/Cart/useCart.js +10 -0
  8. package/dist/runtime/composables/Cart/useCartDetail.d.ts +15 -5
  9. package/dist/runtime/composables/Cart/useCartDetail.js +3 -0
  10. package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +40 -1
  11. package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +2 -2
  12. package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +40 -1
  13. package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +2 -2
  14. package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +3 -14
  15. package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +2 -2
  16. package/dist/runtime/composables/Checkout/useCheckout.d.ts +84 -73
  17. package/dist/runtime/composables/Checkout/useCheckout.js +81 -34
  18. package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +43 -0
  19. package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.js +84 -0
  20. package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +55 -0
  21. package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.js +196 -0
  22. package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +7 -7
  23. package/dist/runtime/composables/Checkout/useCreateAccount.js +3 -1
  24. package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +2 -2
  25. package/dist/runtime/composables/Checkout/useDeliveryMethod.js +8 -7
  26. package/dist/runtime/composables/Customer/useBillingAddress.d.ts +112 -0
  27. package/dist/runtime/composables/Customer/useBillingAddress.js +93 -0
  28. package/dist/runtime/composables/Customer/useLogin.d.ts +9 -0
  29. package/dist/runtime/composables/Customer/useLogin.js +34 -0
  30. package/dist/runtime/composables/Customer/useOrders.d.ts +29 -0
  31. package/dist/runtime/composables/Customer/useOrders.js +56 -0
  32. package/dist/runtime/composables/Customer/usePasswordReset.d.ts +26 -0
  33. package/dist/runtime/composables/Customer/usePasswordReset.js +258 -0
  34. package/dist/runtime/composables/Customer/useProfile.d.ts +75 -0
  35. package/dist/runtime/composables/Customer/useProfile.js +106 -0
  36. package/dist/runtime/composables/Customer/useQuotations.d.ts +32 -0
  37. package/dist/runtime/composables/Customer/useQuotations.js +40 -0
  38. package/dist/runtime/composables/Customer/useRegister.d.ts +120 -11
  39. package/dist/runtime/composables/Customer/useRegister.js +311 -34
  40. package/dist/runtime/composables/Customer/useShippingAddress.d.ts +121 -0
  41. package/dist/runtime/composables/Customer/useShippingAddress.js +145 -0
  42. package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +21 -0
  43. package/dist/runtime/composables/Customer/useUpdatePassword.js +94 -0
  44. package/dist/runtime/composables/Customer/useUserCards.d.ts +22 -0
  45. package/dist/runtime/composables/Customer/useUserCards.js +65 -0
  46. package/dist/runtime/composables/{useWishlists.d.ts → Customer/useWishlists.d.ts} +6 -19
  47. package/dist/runtime/composables/{useWishlists.js → Customer/useWishlists.js} +21 -29
  48. package/dist/runtime/composables/Extras/useCountry.d.ts +11 -6
  49. package/dist/runtime/composables/Extras/useCountry.js +5 -4
  50. package/dist/runtime/composables/Header/useHeader.d.ts +6 -20
  51. package/dist/runtime/composables/Header/useHeader.js +3 -2
  52. package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +1 -1
  53. package/dist/runtime/composables/Product/useProductComponent.js +2 -0
  54. package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -1
  55. package/dist/runtime/composables/Product/useQuickView.d.ts +8 -0
  56. package/dist/runtime/composables/Product/useQuickView.js +27 -0
  57. package/dist/runtime/composables/Product/useService.d.ts +1 -1
  58. package/dist/runtime/composables/Product/useService.js +0 -3
  59. package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +2 -2
  60. package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +2 -2
  61. package/dist/runtime/composables/index.d.ts +16 -12
  62. package/dist/runtime/composables/index.js +16 -12
  63. package/dist/runtime/composables/useAddresses.js +6 -6
  64. package/dist/runtime/composables/useCards.js +2 -2
  65. package/dist/runtime/composables/useDataLayer.js +2 -1
  66. package/dist/runtime/composables/useLocation.d.ts +2 -12
  67. package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
  68. package/dist/runtime/composables/useQuotationCheckout.js +138 -0
  69. package/dist/runtime/middleware/flowrix.d.ts +5 -4
  70. package/dist/runtime/middleware/flowrix.js +41 -21
  71. package/dist/runtime/pages/flowrix-default.d.vue.ts +3 -0
  72. package/dist/runtime/pages/flowrix-default.vue +34 -0
  73. package/dist/runtime/pages/flowrix-default.vue.d.ts +3 -0
  74. package/dist/runtime/plugin.d.ts +1 -1
  75. package/dist/runtime/server/api/albums.d.ts +1 -0
  76. package/dist/runtime/server/api/albums.js +38 -12
  77. package/dist/runtime/server/api/auth/forgot.js +1 -1
  78. package/dist/runtime/server/api/auth/login.js +5 -6
  79. package/dist/runtime/server/api/auth/logout.js +1 -1
  80. package/dist/runtime/server/api/auth/register.js +1 -1
  81. package/dist/runtime/server/api/auth/session.get.js +1 -1
  82. package/dist/runtime/server/api/auth/user/reset-password.js +1 -1
  83. package/dist/runtime/server/api/auth/user/session.js +1 -1
  84. package/dist/runtime/server/api/auth/user/verify-token.js +1 -1
  85. package/dist/runtime/server/api/banners.js +15 -12
  86. package/dist/runtime/server/api/brand/[...slug].js +55 -0
  87. package/dist/runtime/server/api/brand/index.d.ts +3 -0
  88. package/dist/runtime/server/api/brand/index.js +49 -0
  89. package/dist/runtime/server/api/cache/[...slug].delete.d.ts +2 -0
  90. package/dist/runtime/server/api/cache/[...slug].delete.js +40 -0
  91. package/dist/runtime/server/api/cache/clean.get.d.ts +5 -0
  92. package/dist/runtime/server/api/cache/clean.get.js +16 -0
  93. package/dist/runtime/server/api/cart/[slug]/add.d.ts +1 -1
  94. package/dist/runtime/server/api/cart/[slug]/add.js +11 -11
  95. package/dist/runtime/server/api/cart/[slug]/update.d.ts +1 -1
  96. package/dist/runtime/server/api/cart/[slug]/update.js +11 -11
  97. package/dist/runtime/server/api/{blog/blog.d.ts → cart/related.d.ts} +0 -1
  98. package/dist/runtime/server/api/cart/related.js +21 -0
  99. package/dist/runtime/server/api/cart/remove.js +1 -1
  100. package/dist/runtime/server/api/cart/service/[slug]/add.d.ts +1 -1
  101. package/dist/runtime/server/api/cart/service/[slug]/add.js +12 -12
  102. package/dist/runtime/server/api/catalog/brands.d.ts +3 -0
  103. package/dist/runtime/server/api/catalog/brands.js +49 -0
  104. package/dist/runtime/server/api/catalog/categories.js +22 -16
  105. package/dist/runtime/server/api/catalog/categoriesall.d.ts +3 -0
  106. package/dist/runtime/server/api/catalog/categoriesall.js +49 -0
  107. package/dist/runtime/server/api/catalog/featured.js +22 -14
  108. package/dist/runtime/server/api/catalog/posts.d.ts +3 -0
  109. package/dist/runtime/server/api/catalog/posts.js +49 -0
  110. package/dist/runtime/server/api/catalog/samples.js +22 -16
  111. package/dist/runtime/server/api/catalog/search.js +21 -15
  112. package/dist/runtime/server/api/category/[...slug].js +22 -16
  113. package/dist/runtime/server/api/checkout/applyCoupon.d.ts +1 -1
  114. package/dist/runtime/server/api/checkout/applyCoupon.js +13 -13
  115. package/dist/runtime/server/api/checkout/configs.d.ts +1 -1
  116. package/dist/runtime/server/api/checkout/configs.js +11 -11
  117. package/dist/runtime/server/api/checkout/countries.d.ts +1 -1
  118. package/dist/runtime/server/api/checkout/countries.js +5 -9
  119. package/dist/runtime/server/api/checkout/paymentmethod.d.ts +1 -1
  120. package/dist/runtime/server/api/checkout/paymentmethod.js +16 -11
  121. package/dist/runtime/server/api/checkout/quotation/[slug].d.ts +2 -0
  122. package/dist/runtime/server/api/checkout/quotation/[slug].js +21 -0
  123. package/dist/runtime/server/api/checkout/quotation/guest/[slug].d.ts +2 -0
  124. package/dist/runtime/server/api/checkout/quotation/guest/[slug].js +37 -0
  125. package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +2 -0
  126. package/dist/runtime/server/api/checkout/quotation/guest/customer.js +21 -0
  127. package/dist/runtime/server/api/checkout/quotation/submit/[slug].d.ts +2 -0
  128. package/dist/runtime/server/api/checkout/quotation/submit/[slug].js +23 -0
  129. package/dist/runtime/server/api/{blog/[slug].js → cmspost/[...slug].js} +19 -18
  130. package/dist/runtime/server/api/cmspost/all.d.ts +3 -0
  131. package/dist/runtime/server/api/cmspost/all.js +49 -0
  132. package/dist/runtime/server/api/company/profile.d.ts +1 -1
  133. package/dist/runtime/server/api/company/profile.js +9 -9
  134. package/dist/runtime/server/api/contact-center/webforms/[id]/details.d.ts +1 -1
  135. package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +48 -15
  136. package/dist/runtime/server/api/contact-center/webforms/create.d.ts +1 -1
  137. package/dist/runtime/server/api/contact-center/webforms/create.js +10 -10
  138. package/dist/runtime/server/api/countries.d.ts +2 -0
  139. package/dist/runtime/server/api/countries.js +42 -0
  140. package/dist/runtime/server/api/customer/address/add.js +1 -1
  141. package/dist/runtime/server/api/customer/address/delete.js +2 -2
  142. package/dist/runtime/server/api/customer/address/setshipping.js +1 -1
  143. package/dist/runtime/server/api/customer/address/update.js +1 -1
  144. package/dist/runtime/server/api/customer/cards/delete.js +2 -2
  145. package/dist/runtime/server/api/customer/cards/get.js +2 -2
  146. package/dist/runtime/server/api/customer/change-password.js +2 -2
  147. package/dist/runtime/server/api/customer/checkout.js +1 -1
  148. package/dist/runtime/server/api/customer/orders.js +2 -2
  149. package/dist/runtime/server/api/customer/profile/update.js +1 -1
  150. package/dist/runtime/server/api/customer/quotations.js +2 -2
  151. package/dist/runtime/server/api/customer/search.js +1 -1
  152. package/dist/runtime/server/api/customer/tax-invoice.js +1 -1
  153. package/dist/runtime/server/api/customer/wishlist/add.js +1 -1
  154. package/dist/runtime/server/api/customer/wishlist/createWishList.js +1 -1
  155. package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +1 -1
  156. package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +1 -1
  157. package/dist/runtime/server/api/customer/wishlist/get.js +2 -2
  158. package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +1 -1
  159. package/dist/runtime/server/api/customer/wishlist/updateWishList.js +2 -2
  160. package/dist/runtime/server/api/featured.d.ts +3 -0
  161. package/dist/runtime/server/api/featured.js +49 -0
  162. package/dist/runtime/server/api/generate/robots.get.d.ts +2 -0
  163. package/dist/runtime/server/api/generate/robots.get.js +20 -0
  164. package/dist/runtime/server/api/generate/sitemap.get.d.ts +2 -0
  165. package/dist/runtime/server/api/generate/sitemap.get.js +32 -0
  166. package/dist/runtime/server/api/location.d.ts +1 -1
  167. package/dist/runtime/server/api/location.js +20 -12
  168. package/dist/runtime/server/api/nav/[id]/links.d.ts +1 -0
  169. package/dist/runtime/server/api/nav/[id]/links.js +48 -14
  170. package/dist/runtime/server/api/page/{[slug].js → [...slug].js} +18 -17
  171. package/dist/runtime/server/api/product/[...slug].js +23 -9
  172. package/dist/runtime/server/api/{v2/[...slug].d.ts → quickview/[slug].d.ts} +0 -1
  173. package/dist/runtime/server/api/quickview/[slug].js +17 -0
  174. package/dist/runtime/server/api/reviews.d.ts +2 -0
  175. package/dist/runtime/server/api/reviews.js +18 -0
  176. package/dist/runtime/server/api/samples.d.ts +3 -0
  177. package/dist/runtime/server/api/samples.js +50 -0
  178. package/dist/runtime/server/api/search.d.ts +3 -0
  179. package/dist/runtime/server/api/search.js +50 -0
  180. package/dist/runtime/server/api/service/[slug].js +17 -13
  181. package/dist/runtime/server/api/service/availability.d.ts +1 -1
  182. package/dist/runtime/server/api/service/availability.js +11 -13
  183. package/dist/runtime/server/api/service/getall.d.ts +3 -0
  184. package/dist/runtime/server/api/service/getall.js +55 -0
  185. package/dist/runtime/server/api/shop.d.ts +3 -0
  186. package/dist/runtime/server/api/shop.js +50 -0
  187. package/dist/runtime/server/api/subscribe.d.ts +1 -1
  188. package/dist/runtime/server/api/subscribe.js +19 -14
  189. package/dist/runtime/server/api/v2/[...slug].get.d.ts +2 -0
  190. package/dist/runtime/server/api/v2/[...slug].get.js +16 -0
  191. package/dist/runtime/server/api/webform.d.ts +3 -0
  192. package/dist/runtime/server/api/webform.js +52 -0
  193. package/dist/runtime/server/tsconfig.json +3 -3
  194. package/dist/runtime/stores/Cart.d.ts +12 -0
  195. package/dist/runtime/stores/Cart.js +56 -19
  196. package/dist/runtime/stores/Checkout.d.ts +9 -15
  197. package/dist/runtime/stores/Checkout.js +19 -24
  198. package/dist/runtime/stores/Search.d.ts +1 -1
  199. package/dist/runtime/stores/Services.js +2 -2
  200. package/dist/runtime/stores/auth.d.ts +8 -11
  201. package/dist/runtime/stores/auth.js +390 -8
  202. package/dist/runtime/stores/countries.d.ts +1 -3
  203. package/dist/runtime/stores/countries.js +4 -8
  204. package/dist/runtime/stores/product/slug.d.ts +1 -17
  205. package/dist/runtime/stores/wishlists.d.ts +114 -6
  206. package/dist/runtime/stores/wishlists.js +209 -9
  207. package/dist/runtime/utils/api.js +9 -13
  208. package/dist/runtime/utils/htmlCache.d.ts +2 -2
  209. package/dist/runtime/utils/htmlCache.js +23 -13
  210. package/dist/types.d.mts +6 -2
  211. package/package.json +30 -20
  212. package/dist/runtime/composables/Checkout/useBillingAddress.d.ts +0 -19
  213. package/dist/runtime/composables/Checkout/useBillingAddress.js +0 -82
  214. package/dist/runtime/composables/Checkout/useShippingAddress.d.ts +0 -9
  215. package/dist/runtime/composables/Checkout/useShippingAddress.js +0 -121
  216. package/dist/runtime/composables/useAuth.d.ts +0 -45
  217. package/dist/runtime/composables/useAuth.js +0 -180
  218. package/dist/runtime/composables/useCountries.d.ts +0 -12
  219. package/dist/runtime/composables/useCountries.js +0 -50
  220. package/dist/runtime/composables/useOrders.d.ts +0 -21
  221. package/dist/runtime/composables/useOrders.js +0 -82
  222. package/dist/runtime/composables/useQuotations.d.ts +0 -14
  223. package/dist/runtime/composables/useQuotations.js +0 -50
  224. package/dist/runtime/plugins/fullReload.client.d.ts +0 -2
  225. package/dist/runtime/plugins/fullReload.client.js +0 -10
  226. package/dist/runtime/server/api/blog/blog.js +0 -17
  227. package/dist/runtime/server/api/brand/[slug].js +0 -58
  228. package/dist/runtime/server/api/v2/[...slug].js +0 -9
  229. /package/dist/runtime/server/api/brand/{[slug].d.ts → [...slug].d.ts} +0 -0
  230. /package/dist/runtime/server/api/{blog/[slug].d.ts → cmspost/[...slug].d.ts} +0 -0
  231. /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: any;
3
- route: any;
2
+ router: import("vue-router").Router;
3
+ route: import("vue-router").RouteLocationNormalizedLoadedGeneric;
4
4
  inputData: import("vue").Ref<{
5
- deliverymethod: any;
6
- billing_address: any;
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: any;
11
- billing_suburb: any;
10
+ billing_state: string | number | undefined;
11
+ billing_suburb: string | undefined;
12
12
  clientsceret: any;
13
- billing_postcode: any;
14
- billing_mobile: any;
15
- billing_firstname: any;
16
- firstname: any;
17
- billing_middlename: any;
18
- billing_lastname: any;
19
- lastname: any;
20
- shipping_address: any;
21
- shippingmethod: 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
22
  shipping_country: any;
23
- shipping_state: any;
24
- shipping_suburb: any;
25
- shipping_postcode: any;
26
- shipping_mobile: any;
27
- shipping_firstname: any;
28
- shipping_middlename: any;
29
- shipping_lastname: 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
30
  vouchercode: any;
31
31
  paymentmethod: string;
32
32
  cart: any;
33
- abndToken: any;
33
+ abndToken: string | undefined;
34
34
  customertoken: string;
35
- email: any;
36
- mobile: any;
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: any;
57
- billing_address: any;
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: any;
62
- billing_suburb: any;
61
+ billing_state: string | number | undefined;
62
+ billing_suburb: string | undefined;
63
63
  clientsceret: any;
64
- billing_postcode: any;
65
- billing_mobile: any;
66
- billing_firstname: any;
67
- firstname: any;
68
- billing_middlename: any;
69
- billing_lastname: any;
70
- lastname: any;
71
- shipping_address: any;
72
- shippingmethod: 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
73
  shipping_country: any;
74
- shipping_state: any;
75
- shipping_suburb: any;
76
- shipping_postcode: any;
77
- shipping_mobile: any;
78
- shipping_firstname: any;
79
- shipping_middlename: any;
80
- shipping_lastname: 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
81
  vouchercode: any;
82
82
  paymentmethod: string;
83
83
  cart: any;
84
- abndToken: any;
84
+ abndToken: string | undefined;
85
85
  customertoken: string;
86
- email: any;
87
- mobile: any;
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: any;
108
- billing_address: any;
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: any;
113
- billing_suburb: any;
112
+ billing_state: string | number | undefined;
113
+ billing_suburb: string | undefined;
114
114
  clientsceret: any;
115
- billing_postcode: any;
116
- billing_mobile: any;
117
- billing_firstname: any;
118
- firstname: any;
119
- billing_middlename: any;
120
- billing_lastname: any;
121
- lastname: any;
122
- shipping_address: any;
123
- shippingmethod: 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
124
  shipping_country: any;
125
- shipping_state: any;
126
- shipping_suburb: any;
127
- shipping_postcode: any;
128
- shipping_mobile: any;
129
- shipping_firstname: any;
130
- shipping_middlename: any;
131
- shipping_lastname: 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
132
  vouchercode: any;
133
133
  paymentmethod: string;
134
134
  cart: any;
135
- abndToken: any;
135
+ abndToken: string | undefined;
136
136
  customertoken: string;
137
- email: any;
138
- mobile: any;
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<any>;
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: any;
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,24 @@
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 { GTM_begin_checkout, GTM_add_shipping_info, GTM_add_payment_info } from "../../composables/useDataLayer.js";
5
+ import { META_begin_checkout, META_add_shipping_info, META_add_payment_info } from "../../composables/useMetaLayer.js";
6
+ import { TikTok_begin_checkout, TikTok_add_payment_info } from "../../composables/useTikTokDatalayer.js";
7
+ import { useCheckoutStore } from "../../stores/Checkout.js";
8
+ import { useCountry } from "../Extras/useCountry.js";
9
+ import { useRouter, useRoute } from "vue-router";
10
+ import { useAuthStore } from "../../stores/auth.js";
2
11
  export default function() {
3
12
  const router = useRouter();
4
13
  const route = useRoute();
5
14
  const {
6
- status,
7
- data
8
- } = useAuth();
15
+ user,
16
+ token,
17
+ isAuthenticated
18
+ } = useAuthStore();
9
19
  const { profile } = useCompanyProfile();
10
20
  const cartStore = useCartStore();
11
- const companyCountryId = computed(() => profile?.value?.country_id || 235);
21
+ const companyCountryId = computed(() => profile?.data.country_id || "");
12
22
  const checkoutStore = useCheckoutStore();
13
23
  const AuthStore = ref();
14
24
  const shippingFormEnabled = ref(true);
@@ -75,14 +85,13 @@ export default function() {
75
85
  save_card_details: 0
76
86
  });
77
87
  const updateUserFieldsIfuserLogin = (async (sameasbilling = false) => {
78
- const LoggedInUser = data;
79
- if (Object.keys(LoggedInUser).length > 0 && LoggedInUser.value !== void 0) {
80
- const billingAddres = LoggedInUser.value.addresses?.filter((address) => address.billing == 1)[0];
81
- const shippingAddres = LoggedInUser.value.addresses?.filter((address) => address.shipping == 1)[0];
88
+ if (isAuthenticated) {
89
+ const billingAddres = user.addresses?.filter((address) => address.billing == 1)[0];
90
+ const shippingAddres = user.addresses?.filter((address) => address.shipping == 1)[0];
82
91
  inputData.value.billing_firstname = billingAddres.firstname;
83
92
  inputData.value.billing_lastname = billingAddres.lastname;
84
- inputData.value.email = LoggedInUser.value.email;
85
- inputData.value.billing_mobile = LoggedInUser.value.mobile;
93
+ inputData.value.email = user.email;
94
+ inputData.value.billing_mobile = user.mobile;
86
95
  if (sameasbilling == true) {
87
96
  } else {
88
97
  if (billingAddres != void 0) {
@@ -116,7 +125,7 @@ export default function() {
116
125
  inputData.value.shipping_mobile = shippingAddres.mobile;
117
126
  }
118
127
  }
119
- } else if (Object.keys(LoggedInUser).length == 0 && sameasbilling == true) {
128
+ } else if (isAuthenticated && sameasbilling == true) {
120
129
  inputData.value.shipping_firstname = inputData.value.billing_firstname ? inputData.value.billing_firstname : "";
121
130
  inputData.value.shipping_lastname = inputData.value.billing_lastname ? inputData.value.billing_lastname : "";
122
131
  inputData.value.shipping_address = inputData.value.billing_address ? inputData.value.billing_address : "";
@@ -141,10 +150,51 @@ export default function() {
141
150
  onMounted(() => {
142
151
  checkoutStore.getConfig();
143
152
  updateUserFieldsIfuserLogin(inputData.value.shippingasbilling);
144
- const cart = [];
145
- cart.items = checkoutStore.config.cart;
153
+ const cartInfo = [];
154
+ cartInfo.items = checkoutStore.config.cartInfo;
155
+ cartInfo.totals = checkoutStore?.config?.calculations ? checkoutStore?.config?.calculations : "";
156
+ let shippingmethods = checkoutStore.config.shippingmethods;
157
+ let shipping_method = shippingmethods.filter((method) => method.selected == true)[0];
146
158
  let deliverymethods = checkoutStore.config.preferences;
147
159
  let deliverymethod = false;
160
+ let delivery_method = deliverymethods.filter((method) => method.selected == true)[0];
161
+ if (delivery_method) {
162
+ if (delivery_method.id == 1) {
163
+ if (shipping_method) {
164
+ GTM_add_shipping_info(cartStore?.cart, shipping_method);
165
+ META_add_shipping_info(cartStore?.cart, shipping_method);
166
+ }
167
+ } else if (delivery_method.id == 2) {
168
+ shipping_method = {
169
+ "id": 0,
170
+ "title": "Click and Collect",
171
+ "details": "",
172
+ "available": 1,
173
+ "price": 0,
174
+ "selected": true
175
+ };
176
+ GTM_add_shipping_info(cartStore?.cart, shipping_method);
177
+ META_add_shipping_info(cartStore?.cart, shipping_method);
178
+ }
179
+ }
180
+ if (cartStore?.cart) {
181
+ GTM_begin_checkout(cartStore?.cart);
182
+ META_begin_checkout(cartStore?.cart);
183
+ TikTok_begin_checkout(cartStore?.cart);
184
+ GTM_add_payment_info(cartStore?.cart, inputData.value.paymentmethod);
185
+ META_add_payment_info(cartStore?.cart, inputData.value.paymentmethod);
186
+ TikTok_add_payment_info(cartStore?.cart, inputData.value.paymentmethod);
187
+ }
188
+ });
189
+ watch(() => cartStore?.cart, (newCartData) => {
190
+ if (newCartData) {
191
+ GTM_begin_checkout(newCartData);
192
+ META_begin_checkout(newCartData);
193
+ TikTok_begin_checkout(newCartData);
194
+ GTM_add_payment_info(cartStore?.cart, inputData.value.paymentmethod);
195
+ META_add_payment_info(cartStore?.cart, inputData.value.paymentmethod);
196
+ TikTok_add_payment_info(cartStore?.cart, inputData.value.paymentmethod);
197
+ }
148
198
  });
149
199
  const totalPrice = computed(() => {
150
200
  return checkoutStore.config ? checkoutStore.config?.calculations?.total : 0;
@@ -162,11 +212,11 @@ export default function() {
162
212
  }
163
213
  return states.value;
164
214
  });
165
- watch(inputData.value, async (newData, oldValue) => {
215
+ watch(() => inputData.value, async (newData, oldValue) => {
166
216
  });
167
217
  const shippingMethods = computed(() => {
168
218
  if (checkoutStore.config) {
169
- return checkoutStore.config.shippingmethods.filter((method) => method.available == 1);
219
+ return checkoutStore.config?.shippingmethods?.filter((method) => method.available == 1);
170
220
  }
171
221
  });
172
222
  watch(() => checkoutStore.config.shippingmethods, (newValue, oldValue) => {
@@ -212,28 +262,27 @@ export default function() {
212
262
  }
213
263
  };
214
264
  const CheckFlowrixPayment = ((inputData2, payment) => {
215
- let status2 = {};
216
- var data2 = {
265
+ let status = {};
266
+ var data = {
217
267
  card_holder: inputData2.till_cardname,
218
268
  month: inputData2.till_expirymonth,
219
269
  year: inputData2.till_expiryyear
220
270
  };
221
271
  payment.tokenize(
222
- data2,
223
- //additional data, MUST include card_holder (or first_name & last_name), month and year
224
- function(token, cardData) {
225
- inputData2.clientsceret = token;
226
- checkoutStore.publishableKey.clientsceret = token;
272
+ data,
273
+ function(token2, cardData) {
274
+ inputData2.clientsceret = token2;
275
+ checkoutStore.publishableKey.clientsceret = token2;
227
276
  checkoutStore.saveToCheckoutSession(inputData2);
228
- if (token != "") {
229
- status2 = {};
277
+ if (token2 != "") {
278
+ status = {};
230
279
  }
231
280
  },
232
281
  function(errors) {
233
- status2 = errors;
282
+ status = errors;
234
283
  }
235
284
  );
236
- return status2;
285
+ return status;
237
286
  });
238
287
  const handleSubmit = async (url_cancel, url_success, url_booking) => {
239
288
  try {
@@ -250,8 +299,7 @@ export default function() {
250
299
  return false;
251
300
  }
252
301
  }
253
- const LoggedInUser = "";
254
- if (Object.keys(LoggedInUser).length == 0) {
302
+ if (isAuthenticated) {
255
303
  sessiondata.value.fields.firstname = inputData.value.billing_firstname;
256
304
  sessiondata.value.fields.lastname = inputData.value.billing_lastname;
257
305
  }
@@ -266,8 +314,8 @@ export default function() {
266
314
  sessiondata.value.fields.eway_cardnumber = cardnumber;
267
315
  sessiondata.value.fields.eway_cvn = eway_cvn;
268
316
  }
269
- await checkoutStore.submitCheckout();
270
- if (checkoutStore.errorResponseData.status != "Error") {
317
+ const chckoutResponse = await checkoutStore.submitCheckout();
318
+ if (chckoutResponse.status == "Success") {
271
319
  if (inputData.value.paymentmethod == "web-stripe") {
272
320
  const { stripe, elements } = await getStripeElements(
273
321
  checkoutStore.publishableKey.key,
@@ -277,21 +325,20 @@ export default function() {
277
325
  const { error: error2 } = await stripe.confirmPayment({
278
326
  elements,
279
327
  confirmParams: {
280
- // Make sure to change this to your payment completion page
281
328
  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}`,
282
329
  receipt_email: inputData.value.email
283
330
  }
284
331
  });
285
332
  if (error2.type === "card_error" || error2.type === "validation_error") {
286
333
  showMessage(error2.message);
287
- } else {
288
334
  }
289
335
  } else {
290
336
  showMessage(error.message);
291
337
  }
292
- } else if (checkoutStore.response.data.url) {
293
- var url = checkoutStore.response.data.url;
338
+ } else if (chckoutResponse.data.url) {
339
+ var url = chckoutResponse.data.url;
294
340
  } else {
341
+ window.location.href = url_success;
295
342
  }
296
343
  removeLoading();
297
344
  } else if (checkoutStore.errorResponseData.status == "Error") {
@@ -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
+ };
@@ -0,0 +1,84 @@
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 { useAuthStore } from "../../stores/auth.js";
6
+ export default function(inputData) {
7
+ const checkoutStore = useCheckoutStore();
8
+ const authStore = useAuthStore();
9
+ const CountryData = useCountry().data;
10
+ const States = ref([]);
11
+ const Countries = ref([]);
12
+ const getUserBillingAddresses = computed(() => {
13
+ if (!authStore.user || !authStore.user.addresses) return [];
14
+ return authStore.user.addresses.filter((address) => address.billing === 1);
15
+ });
16
+ const getPrimaryBillingAddress = computed(() => {
17
+ const billingAddresses = getUserBillingAddresses.value;
18
+ return billingAddresses.length > 0 ? billingAddresses[0] : null;
19
+ });
20
+ const GetStates = async (countryID) => {
21
+ return States.value;
22
+ };
23
+ onMounted(() => {
24
+ GetStates(inputData.billing_country);
25
+ if (authStore.isAuthenticated && getPrimaryBillingAddress.value) {
26
+ const billingAddr = getPrimaryBillingAddress.value;
27
+ inputData.billing_firstname = billingAddr.firstname || "";
28
+ inputData.billing_lastname = billingAddr.lastname || "";
29
+ inputData.billing_fullname = billingAddr.fullname || "";
30
+ inputData.billing_address = billingAddr.address || "";
31
+ inputData.billing_suburb = billingAddr.suburb || "";
32
+ inputData.billing_state = billingAddr.state_id || "";
33
+ inputData.billing_country = billingAddr.country_id || "";
34
+ inputData.billing_postcode = billingAddr.postcode || "";
35
+ inputData.billing_mobile = billingAddr.mobile || "";
36
+ inputData.billing_address_id = billingAddr.id || "";
37
+ updateBillingAddress(inputData);
38
+ }
39
+ });
40
+ const ChangeCountry = async (billingfield) => {
41
+ if (billingfield.billing_country == void 0) {
42
+ billingfield.billing_country = useCompanyProfile().profile.country_id;
43
+ }
44
+ let newstates = await GetStates(billingfield.billing_country);
45
+ checkoutStore.saveToCheckoutSession(billingfield);
46
+ };
47
+ const fillBillingAddressFields = (billingAddress) => {
48
+ if (!billingAddress) return;
49
+ inputData.billing_firstname = billingAddress.firstname || "";
50
+ inputData.billing_lastname = billingAddress.lastname || "";
51
+ inputData.billing_fullname = billingAddress.fullname || "";
52
+ inputData.billing_address = billingAddress.address || "";
53
+ inputData.billing_suburb = billingAddress.suburb || "";
54
+ inputData.billing_state = billingAddress.state_id || "";
55
+ inputData.billing_country = billingAddress.country_id || "";
56
+ inputData.billing_postcode = billingAddress.postcode || "";
57
+ inputData.billing_mobile = billingAddress.mobile || "";
58
+ inputData.billing_address_id = billingAddress.id || "";
59
+ updateBillingAddress(inputData);
60
+ };
61
+ const updateBillingAddress = ((billingfield) => {
62
+ checkoutStore.saveToCheckoutSession(billingfield);
63
+ });
64
+ const handleBillingAddressSelect = (event) => {
65
+ const selectedAddressId = event.target.value;
66
+ if (selectedAddressId) {
67
+ const selectedAddress = getUserBillingAddresses.value.find((addr) => addr.id == parseInt(selectedAddressId));
68
+ if (selectedAddress) {
69
+ fillBillingAddressFields(selectedAddress);
70
+ }
71
+ }
72
+ };
73
+ return {
74
+ checkoutStore,
75
+ Countries,
76
+ ChangeCountry,
77
+ States,
78
+ getUserBillingAddresses,
79
+ getPrimaryBillingAddress,
80
+ fillBillingAddressFields,
81
+ handleBillingAddressSelect,
82
+ updateBillingAddress
83
+ };
84
+ }
@@ -0,0 +1,55 @@
1
+ export default function (inputData: any): {
2
+ checkoutStore: import("pinia").Store<"checkout", import("../../stores/Checkout.js").CheckoutState, {}, {}>;
3
+ updateShippingAddress: (shippingfield: any) => void;
4
+ sameAsBilling: (sameasbilling: boolean | undefined, inputData: any) => Promise<void>;
5
+ UpdateStripe: (inputData: any) => Promise<void>;
6
+ Countries: import("vue").ComputedRef<any>;
7
+ ChangeCountry: (shippingfield: any) => Promise<void>;
8
+ States: import("vue").Ref<never[], never[]>;
9
+ getUserShippingAddresses: import("vue").ComputedRef<{
10
+ id: number;
11
+ fullname: string | null;
12
+ firstname: string;
13
+ middlename: string | null;
14
+ lastname: string;
15
+ address: string;
16
+ suburb: string;
17
+ state: string | null;
18
+ state_id: number | null;
19
+ country: string;
20
+ country_id: number;
21
+ postcode: string;
22
+ mobile: string;
23
+ shipping: number;
24
+ billing: number;
25
+ }[]>;
26
+ getPrimaryShippingAddress: import("vue").ComputedRef<{
27
+ id: number;
28
+ fullname: string | null;
29
+ firstname: string;
30
+ middlename: string | null;
31
+ lastname: string;
32
+ address: string;
33
+ suburb: string;
34
+ state: string | null;
35
+ state_id: number | null;
36
+ country: string;
37
+ country_id: number;
38
+ postcode: string;
39
+ mobile: string;
40
+ shipping: number;
41
+ billing: number;
42
+ } | null>;
43
+ passwordShow: import("vue").Ref<string, string>;
44
+ password: import("vue").Ref<string, string>;
45
+ password_confirmationShow: import("vue").Ref<string, string>;
46
+ updateBillingAddress: (billingfield: any) => void;
47
+ UserAccount: import("vue").Ref<boolean, boolean>;
48
+ CheckUserAccount: (billingDetails: any, userEmail: string) => Promise<void>;
49
+ CheckingUserAccount: import("vue").Ref<boolean, boolean>;
50
+ passwordStrength: import("vue").ComputedRef<"Password must be 8 characters" | "Strong" | "Medium" | "Weak">;
51
+ passwordStrengthClass: import("vue").ComputedRef<"bg-danger" | "bg-success" | "bg-warning">;
52
+ passwordStrengthValue: import("vue").ComputedRef<number>;
53
+ passwordStrengthWidth: import("vue").ComputedRef<string>;
54
+ passwordStrengthTextColor: import("vue").ComputedRef<"text-danger" | "text-success" | "text-black">;
55
+ };