flowrix 1.0.1-beta.14 → 1.0.1-beta.140

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 (276) hide show
  1. package/dist/module.d.mts +1 -6
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +175 -29
  4. package/dist/runtime/composables/Blog/useBlogIndex.d.ts +2 -5
  5. package/dist/runtime/composables/Blog/useBlogSingle.js +2 -4
  6. package/dist/runtime/composables/Brand/brand.d.ts +1 -1
  7. package/dist/runtime/composables/Brand/brand.js +30 -2
  8. package/dist/runtime/composables/Cart/useCart.d.ts +40 -0
  9. package/dist/runtime/composables/Cart/useCart.js +10 -0
  10. package/dist/runtime/composables/Cart/useCartComponent.d.ts +1 -0
  11. package/dist/runtime/composables/Cart/useCartComponent.js +11 -0
  12. package/dist/runtime/composables/Cart/useCartDetail.d.ts +15 -5
  13. package/dist/runtime/composables/Cart/useCartDetail.js +3 -0
  14. package/dist/runtime/composables/Category/useCategoryIndex.d.ts +25 -32
  15. package/dist/runtime/composables/Category/useCategoryIndex.js +63 -44
  16. package/dist/runtime/composables/Checkout/PaymentMethods/useDirectDeposit.js +8 -0
  17. package/dist/runtime/composables/Checkout/PaymentMethods/useEway.js +16 -6
  18. package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.d.ts +40 -1
  19. package/dist/runtime/composables/Checkout/PaymentMethods/useFlowrixpay.js +10 -2
  20. package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.d.ts +40 -1
  21. package/dist/runtime/composables/Checkout/PaymentMethods/useOpayo.js +10 -2
  22. package/dist/runtime/composables/Checkout/PaymentMethods/usePaymentMethods.js +3 -14
  23. package/dist/runtime/composables/Checkout/PaymentMethods/usePaypal.js +8 -0
  24. package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.d.ts +2 -2
  25. package/dist/runtime/composables/Checkout/PaymentMethods/useStripe.js +8 -0
  26. package/dist/runtime/composables/Checkout/PaymentMethods/useZippay.js +8 -0
  27. package/dist/runtime/composables/Checkout/useCheckout.d.ts +85 -73
  28. package/dist/runtime/composables/Checkout/useCheckout.js +84 -53
  29. package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.d.ts +43 -0
  30. package/dist/runtime/composables/Checkout/useCheckoutBillingAddress.js +84 -0
  31. package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.d.ts +55 -0
  32. package/dist/runtime/composables/Checkout/useCheckoutShippingAddress.js +196 -0
  33. package/dist/runtime/composables/Checkout/useCreateAccount.d.ts +7 -7
  34. package/dist/runtime/composables/Checkout/useCreateAccount.js +3 -1
  35. package/dist/runtime/composables/Checkout/useDeliveryMethod.d.ts +2 -2
  36. package/dist/runtime/composables/Checkout/useDeliveryMethod.js +18 -11
  37. package/dist/runtime/composables/Customer/useBillingAddress.d.ts +112 -0
  38. package/dist/runtime/composables/Customer/useBillingAddress.js +93 -0
  39. package/dist/runtime/composables/Customer/useLogin.d.ts +9 -0
  40. package/dist/runtime/composables/Customer/useLogin.js +34 -0
  41. package/dist/runtime/composables/Customer/useOrders.d.ts +29 -0
  42. package/dist/runtime/composables/Customer/useOrders.js +56 -0
  43. package/dist/runtime/composables/Customer/usePasswordReset.d.ts +26 -0
  44. package/dist/runtime/composables/Customer/usePasswordReset.js +258 -0
  45. package/dist/runtime/composables/Customer/useProfile.d.ts +75 -0
  46. package/dist/runtime/composables/Customer/useProfile.js +106 -0
  47. package/dist/runtime/composables/Customer/useQuotations.d.ts +32 -0
  48. package/dist/runtime/composables/Customer/useQuotations.js +40 -0
  49. package/dist/runtime/composables/Customer/useRegister.d.ts +121 -13
  50. package/dist/runtime/composables/Customer/useRegister.js +310 -35
  51. package/dist/runtime/composables/Customer/useShippingAddress.d.ts +121 -0
  52. package/dist/runtime/composables/Customer/useShippingAddress.js +145 -0
  53. package/dist/runtime/composables/Customer/useUpdatePassword.d.ts +21 -0
  54. package/dist/runtime/composables/Customer/useUpdatePassword.js +130 -0
  55. package/dist/runtime/composables/Customer/useUserCards.d.ts +22 -0
  56. package/dist/runtime/composables/Customer/useUserCards.js +65 -0
  57. package/dist/runtime/composables/{useWishlists.d.ts → Customer/useWishlists.d.ts} +7 -20
  58. package/dist/runtime/composables/{useWishlists.js → Customer/useWishlists.js} +21 -30
  59. package/dist/runtime/composables/Extras/useCountry.d.ts +11 -6
  60. package/dist/runtime/composables/Extras/useCountry.js +5 -4
  61. package/dist/runtime/composables/Footer/useFooter.d.ts +4 -4
  62. package/dist/runtime/composables/Footer/useFooter.js +12 -8
  63. package/dist/runtime/composables/Header/useHeader.d.ts +6 -20
  64. package/dist/runtime/composables/Header/useHeader.js +3 -2
  65. package/dist/runtime/composables/Product/CustomProduct/useCustomeScript.js +4 -5
  66. package/dist/runtime/composables/Product/CustomProduct/useSteps.d.ts +1 -1
  67. package/dist/runtime/composables/Product/useProductComponent.js +110 -0
  68. package/dist/runtime/composables/Product/useProductSlug.d.ts +8 -1
  69. package/dist/runtime/composables/Product/useQuickView.d.ts +8 -0
  70. package/dist/runtime/composables/Product/useQuickView.js +27 -0
  71. package/dist/runtime/composables/Product/useService.d.ts +42 -15
  72. package/dist/runtime/composables/Product/useService.js +137 -48
  73. package/dist/runtime/composables/Samples/useSamples.d.ts +5 -6
  74. package/dist/runtime/composables/Samples/useSamples.js +19 -15
  75. package/dist/runtime/composables/SideBar/Filters/useFilters.d.ts +2 -2
  76. package/dist/runtime/composables/SideBar/Filters/useSorting.d.ts +2 -2
  77. package/dist/runtime/composables/index.d.ts +18 -12
  78. package/dist/runtime/composables/index.js +18 -12
  79. package/dist/runtime/composables/useAddresses.js +6 -6
  80. package/dist/runtime/composables/useApp.d.ts +1 -0
  81. package/dist/runtime/composables/useApp.js +88 -0
  82. package/dist/runtime/composables/useCards.js +2 -2
  83. package/dist/runtime/composables/useDataLayer.js +1 -1
  84. package/dist/runtime/composables/useDotDigital.d.ts +3 -0
  85. package/dist/runtime/composables/useDotDigital.js +122 -0
  86. package/dist/runtime/composables/useLocation.d.ts +61 -19
  87. package/dist/runtime/composables/useLocation.js +353 -25
  88. package/dist/runtime/composables/useMetaLayer.js +11 -11
  89. package/dist/runtime/composables/useQuotationCheckout.d.ts +78 -0
  90. package/dist/runtime/composables/useQuotationCheckout.js +137 -0
  91. package/dist/runtime/composables/useSubscriptions.d.ts +17 -10
  92. package/dist/runtime/composables/useSubscriptions.js +68 -33
  93. package/dist/runtime/composables/useTikTokDatalayer.js +7 -7
  94. package/dist/runtime/composables/useWebforms.d.ts +38 -9
  95. package/dist/runtime/composables/useWebforms.js +93 -60
  96. package/dist/runtime/middleware/flowrix.d.ts +5 -4
  97. package/dist/runtime/middleware/flowrix.js +40 -22
  98. package/dist/runtime/pages/404.d.vue.ts +3 -0
  99. package/dist/runtime/pages/404.vue +6 -0
  100. package/dist/runtime/pages/404.vue.d.ts +3 -0
  101. package/dist/runtime/pages/flowrix-default.d.vue.ts +3 -0
  102. package/dist/runtime/pages/flowrix-default.vue +42 -0
  103. package/dist/runtime/pages/flowrix-default.vue.d.ts +3 -0
  104. package/dist/runtime/plugin.d.ts +1 -1
  105. package/dist/runtime/plugin.js +14 -1
  106. package/dist/runtime/plugins/router.d.ts +2 -0
  107. package/dist/runtime/plugins/router.js +11 -0
  108. package/dist/runtime/server/api/albums.d.ts +1 -0
  109. package/dist/runtime/server/api/albums.js +35 -7
  110. package/dist/runtime/server/api/auth/forgot.js +1 -2
  111. package/dist/runtime/server/api/auth/login.d.ts +7 -0
  112. package/dist/runtime/server/api/auth/login.js +4 -16
  113. package/dist/runtime/server/api/auth/logout.js +1 -2
  114. package/dist/runtime/server/api/auth/register.js +1 -2
  115. package/dist/runtime/server/api/auth/session.get.js +1 -3
  116. package/dist/runtime/server/api/auth/user/reset-password.js +1 -2
  117. package/dist/runtime/server/api/auth/user/session.js +1 -2
  118. package/dist/runtime/server/api/auth/user/verify-token.js +1 -2
  119. package/dist/runtime/server/api/banners.js +20 -15
  120. package/dist/runtime/server/api/brand/[...slug].js +55 -0
  121. package/dist/runtime/server/api/brand/index.d.ts +3 -0
  122. package/dist/runtime/server/api/brand/index.js +46 -0
  123. package/dist/runtime/server/api/cache/[...slug].delete.d.ts +4 -1
  124. package/dist/runtime/server/api/cache/[...slug].delete.js +4 -7
  125. package/dist/runtime/server/api/cache/clean.get.d.ts +5 -0
  126. package/dist/runtime/server/api/cache/clean.get.js +4 -7
  127. package/dist/runtime/server/api/cart/[slug]/add.d.ts +1 -1
  128. package/dist/runtime/server/api/cart/[slug]/add.js +11 -11
  129. package/dist/runtime/server/api/cart/[slug]/update.d.ts +1 -1
  130. package/dist/runtime/server/api/cart/[slug]/update.js +11 -11
  131. package/dist/runtime/server/api/{v2/[...slug].d.ts → cart/related.d.ts} +0 -1
  132. package/dist/runtime/server/api/cart/related.js +21 -0
  133. package/dist/runtime/server/api/cart/remove.d.ts +1 -1
  134. package/dist/runtime/server/api/cart/remove.js +10 -10
  135. package/dist/runtime/server/api/cart/service/[slug]/add.d.ts +1 -1
  136. package/dist/runtime/server/api/cart/service/[slug]/add.js +12 -12
  137. package/dist/runtime/server/api/catalog/brands.d.ts +3 -0
  138. package/dist/runtime/server/api/catalog/brands.js +52 -0
  139. package/dist/runtime/server/api/catalog/categories.js +28 -19
  140. package/dist/runtime/server/api/catalog/categoriesall.d.ts +3 -0
  141. package/dist/runtime/server/api/catalog/categoriesall.js +52 -0
  142. package/dist/runtime/server/api/catalog/featured.js +28 -17
  143. package/dist/runtime/server/api/catalog/posts.d.ts +3 -0
  144. package/dist/runtime/server/api/catalog/posts.js +52 -0
  145. package/dist/runtime/server/api/catalog/samples.js +28 -19
  146. package/dist/runtime/server/api/catalog/search.js +28 -19
  147. package/dist/runtime/server/api/category/[...slug].js +31 -20
  148. package/dist/runtime/server/api/check-404.d.ts +4 -0
  149. package/dist/runtime/server/api/check-404.js +8 -0
  150. package/dist/runtime/server/api/checkout/applyCoupon.d.ts +1 -1
  151. package/dist/runtime/server/api/checkout/applyCoupon.js +13 -13
  152. package/dist/runtime/server/api/checkout/configs.d.ts +1 -1
  153. package/dist/runtime/server/api/checkout/configs.js +11 -11
  154. package/dist/runtime/server/api/checkout/countries.d.ts +1 -1
  155. package/dist/runtime/server/api/checkout/countries.js +5 -9
  156. package/dist/runtime/server/api/checkout/paymentmethod.d.ts +1 -1
  157. package/dist/runtime/server/api/checkout/paymentmethod.js +16 -11
  158. package/dist/runtime/server/api/{blog/blog.d.ts → checkout/quotation/[slug].d.ts} +0 -1
  159. package/dist/runtime/server/api/checkout/quotation/[slug].js +20 -0
  160. package/dist/runtime/server/api/checkout/quotation/guest/[slug].d.ts +2 -0
  161. package/dist/runtime/server/api/checkout/quotation/guest/[slug].js +35 -0
  162. package/dist/runtime/server/api/checkout/quotation/guest/customer.d.ts +2 -0
  163. package/dist/runtime/server/api/checkout/quotation/guest/customer.js +20 -0
  164. package/dist/runtime/server/api/checkout/quotation/submit/[slug].d.ts +2 -0
  165. package/dist/runtime/server/api/checkout/quotation/submit/[slug].js +22 -0
  166. package/dist/runtime/server/api/checkvariables.d.ts +3 -0
  167. package/dist/runtime/server/api/checkvariables.js +37 -0
  168. package/dist/runtime/server/api/cmspost/[...slug].js +54 -0
  169. package/dist/runtime/server/api/cmspost/all.d.ts +3 -0
  170. package/dist/runtime/server/api/cmspost/all.js +52 -0
  171. package/dist/runtime/server/api/company/profile.d.ts +1 -1
  172. package/dist/runtime/server/api/company/profile.js +12 -7
  173. package/dist/runtime/server/api/contact-center/webforms/[id]/details.d.ts +1 -1
  174. package/dist/runtime/server/api/contact-center/webforms/[id]/details.js +50 -15
  175. package/dist/runtime/server/api/contact-center/webforms/create.d.ts +1 -1
  176. package/dist/runtime/server/api/contact-center/webforms/create.js +13 -9
  177. package/dist/runtime/server/api/countries.d.ts +2 -0
  178. package/dist/runtime/server/api/countries.js +44 -0
  179. package/dist/runtime/server/api/customer/address/add.js +1 -2
  180. package/dist/runtime/server/api/customer/address/delete.js +2 -3
  181. package/dist/runtime/server/api/customer/address/setshipping.js +1 -2
  182. package/dist/runtime/server/api/customer/address/update.js +1 -2
  183. package/dist/runtime/server/api/customer/cards/delete.js +2 -3
  184. package/dist/runtime/server/api/customer/cards/get.js +2 -3
  185. package/dist/runtime/server/api/customer/change-password.js +2 -3
  186. package/dist/runtime/server/api/customer/checkout.js +1 -2
  187. package/dist/runtime/server/api/customer/orders.js +2 -3
  188. package/dist/runtime/server/api/customer/profile/update.js +1 -2
  189. package/dist/runtime/server/api/customer/quotations.js +2 -3
  190. package/dist/runtime/server/api/customer/search.js +1 -2
  191. package/dist/runtime/server/api/customer/tax-invoice.js +1 -2
  192. package/dist/runtime/server/api/customer/wishlist/add.js +1 -2
  193. package/dist/runtime/server/api/customer/wishlist/createWishList.js +1 -2
  194. package/dist/runtime/server/api/customer/wishlist/deleteFromWishList.js +1 -2
  195. package/dist/runtime/server/api/customer/wishlist/deleteWishList.js +1 -2
  196. package/dist/runtime/server/api/customer/wishlist/get.js +2 -3
  197. package/dist/runtime/server/api/customer/wishlist/getWishListItems.js +1 -2
  198. package/dist/runtime/server/api/customer/wishlist/updateWishList.js +2 -3
  199. package/dist/runtime/server/api/featured.d.ts +3 -0
  200. package/dist/runtime/server/api/featured.js +52 -0
  201. package/dist/runtime/server/api/generate/robots.get.d.ts +2 -0
  202. package/dist/runtime/server/api/generate/robots.get.js +20 -0
  203. package/dist/runtime/server/api/generate/sitemap.get.d.ts +2 -0
  204. package/dist/runtime/server/api/generate/sitemap.get.js +32 -0
  205. package/dist/runtime/server/api/location.d.ts +1 -1
  206. package/dist/runtime/server/api/location.js +24 -12
  207. package/dist/runtime/server/api/nav/[id]/links.d.ts +1 -0
  208. package/dist/runtime/server/api/nav/[id]/links.js +46 -10
  209. package/dist/runtime/server/api/page/[...slug].js +54 -0
  210. package/dist/runtime/server/api/product/[...slug].js +28 -13
  211. package/dist/runtime/server/api/quickview/[slug].d.ts +2 -0
  212. package/dist/runtime/server/api/quickview/[slug].js +21 -0
  213. package/dist/runtime/server/api/reviews.d.ts +2 -0
  214. package/dist/runtime/server/api/reviews.js +23 -0
  215. package/dist/runtime/server/api/samples.d.ts +3 -0
  216. package/dist/runtime/server/api/samples.js +53 -0
  217. package/dist/runtime/server/api/search.d.ts +3 -0
  218. package/dist/runtime/server/api/search.js +53 -0
  219. package/dist/runtime/server/api/service/[slug].js +22 -16
  220. package/dist/runtime/server/api/service/availability.d.ts +1 -1
  221. package/dist/runtime/server/api/service/availability.js +14 -12
  222. package/dist/runtime/server/api/service/getall.d.ts +3 -0
  223. package/dist/runtime/server/api/service/getall.js +57 -0
  224. package/dist/runtime/server/api/shop.d.ts +3 -0
  225. package/dist/runtime/server/api/shop.js +53 -0
  226. package/dist/runtime/server/api/subscribe.d.ts +1 -1
  227. package/dist/runtime/server/api/subscribe.js +23 -14
  228. package/dist/runtime/server/api/v2/[...slug].get.d.ts +2 -0
  229. package/dist/runtime/server/api/v2/[...slug].get.js +32 -0
  230. package/dist/runtime/server/api/webform.d.ts +3 -0
  231. package/dist/runtime/server/api/webform.js +54 -0
  232. package/dist/runtime/server/tsconfig.json +3 -3
  233. package/dist/runtime/stores/Cart.d.ts +12 -0
  234. package/dist/runtime/stores/Cart.js +62 -17
  235. package/dist/runtime/stores/Checkout.d.ts +9 -15
  236. package/dist/runtime/stores/Checkout.js +38 -45
  237. package/dist/runtime/stores/IpLocation.d.ts +95 -4
  238. package/dist/runtime/stores/IpLocation.js +93 -15
  239. package/dist/runtime/stores/Search.d.ts +1 -1
  240. package/dist/runtime/stores/Services.d.ts +5 -0
  241. package/dist/runtime/stores/Services.js +59 -8
  242. package/dist/runtime/stores/auth.d.ts +8 -11
  243. package/dist/runtime/stores/auth.js +385 -8
  244. package/dist/runtime/stores/countries.d.ts +1 -3
  245. package/dist/runtime/stores/countries.js +4 -8
  246. package/dist/runtime/stores/product/README.md +6 -6
  247. package/dist/runtime/stores/product/slug.d.ts +1 -17
  248. package/dist/runtime/stores/webforms.d.ts +24 -9
  249. package/dist/runtime/stores/webforms.js +105 -5
  250. package/dist/runtime/stores/wishlists.d.ts +125 -8
  251. package/dist/runtime/stores/wishlists.js +212 -20
  252. package/dist/runtime/utils/api.js +7 -13
  253. package/dist/runtime/utils/htmlCache.d.ts +2 -2
  254. package/dist/runtime/utils/htmlCache.js +23 -13
  255. package/dist/types.d.mts +6 -2
  256. package/package.json +16 -5
  257. package/dist/runtime/composables/Checkout/useBillingAddress.d.ts +0 -19
  258. package/dist/runtime/composables/Checkout/useBillingAddress.js +0 -82
  259. package/dist/runtime/composables/Checkout/useShippingAddress.d.ts +0 -9
  260. package/dist/runtime/composables/Checkout/useShippingAddress.js +0 -121
  261. package/dist/runtime/composables/useAuth.d.ts +0 -45
  262. package/dist/runtime/composables/useAuth.js +0 -180
  263. package/dist/runtime/composables/useCountries.d.ts +0 -12
  264. package/dist/runtime/composables/useCountries.js +0 -50
  265. package/dist/runtime/composables/useOrders.d.ts +0 -21
  266. package/dist/runtime/composables/useOrders.js +0 -82
  267. package/dist/runtime/composables/useQuotations.d.ts +0 -14
  268. package/dist/runtime/composables/useQuotations.js +0 -50
  269. package/dist/runtime/server/api/blog/[slug].js +0 -51
  270. package/dist/runtime/server/api/blog/blog.js +0 -17
  271. package/dist/runtime/server/api/brand/[slug].js +0 -58
  272. package/dist/runtime/server/api/page/[slug].js +0 -51
  273. package/dist/runtime/server/api/v2/[...slug].js +0 -9
  274. /package/dist/runtime/server/api/brand/{[slug].d.ts → [...slug].d.ts} +0 -0
  275. /package/dist/runtime/server/api/{blog/[slug].d.ts → cmspost/[...slug].d.ts} +0 -0
  276. /package/dist/runtime/server/api/page/{[slug].d.ts → [...slug].d.ts} +0 -0
@@ -1,49 +1,70 @@
1
- import { useRoute, useFetch } from "#imports";
2
- import { watch, computed } from "vue";
3
- export const useCategoryIndex = (props) => {
1
+ import { useHead, useRoute, useAsyncData } from "#imports";
2
+ import { computed } from "vue";
3
+ export const useCategoryIndex = (props, ProductTypes = []) => {
4
4
  const route = useRoute();
5
5
  const slug = route.params.slug;
6
- const { data: catData, error, pending, refresh } = useFetch(`/api/category/${slug}`, {
7
- method: "GET",
8
- query: route.query
9
- });
10
- watch(catData, (newData) => {
11
- }, { immediate: true });
12
- watch(
13
- () => [route.path, route.query],
14
- async () => {
15
- pending.value = true;
16
- const response = await useFetch(`/api/category/${slug}`, {
17
- method: "GET",
18
- query: route.query
19
- });
20
- catData.value = response.data.value;
21
- pending.value = false;
22
- },
23
- { deep: true }
6
+ let query = {
7
+ ...route.query
8
+ };
9
+ if (ProductTypes.includes("parentsonly")) {
10
+ query.parentsonly = "true";
11
+ }
12
+ if (ProductTypes.includes("directproducts")) {
13
+ query.directproducts = "true";
14
+ }
15
+ if (ProductTypes.includes("custom")) {
16
+ query.custom = "true";
17
+ }
18
+ if (ProductTypes.includes("simple")) {
19
+ query.simple = "true";
20
+ }
21
+ if (ProductTypes.includes("bundle")) {
22
+ query.bundle = "true";
23
+ }
24
+ if (ProductTypes.includes("sample")) {
25
+ query.sample = "true";
26
+ }
27
+ query.ProductTypes = ["custom", "simple", "bundle", "sample"];
28
+ const { data: catData, pending, error, refresh } = useAsyncData(
29
+ `category-${slug}-${JSON.stringify(route.query)}`,
30
+ () => $fetch(`/api/category/${slug}`, { query })
24
31
  );
32
+ const meta = computed(() => {
33
+ const category = catData.value?.category || {};
34
+ return {
35
+ title: category.meta_title || category.name || "",
36
+ description: category.meta_description || "",
37
+ robots: category.robots || "index,follow"
38
+ };
39
+ });
40
+ useHead(() => ({
41
+ title: `${meta.value.title}`,
42
+ meta: [
43
+ { name: "robots", content: meta.value.robots },
44
+ { name: "description", content: meta.value.description }
45
+ ]
46
+ }));
25
47
  const transformedApiData = computed(() => {
26
- if (catData.value && catData.value.status === "Success") {
27
- return {
28
- status: catData.value.status,
29
- message: catData.value.message,
30
- data: {
31
- template: catData.value.data?.category?.template || "default",
32
- type: catData.value.data?.type || "category",
33
- record: {
34
- category: catData.value.data?.category || {},
35
- products: catData.value.data?.products || {},
36
- brands: catData.value.data?.brands || [],
37
- filter_values: catData.value.data?.filter_values || [],
38
- filters: catData.value.data?.filters || [],
39
- categories: catData.value.data?.categories || [],
40
- prices: catData.value.data?.prices || {},
41
- breadcrumb: catData.value.data?.breadcrumb || ""
42
- }
48
+ const d = catData.value?.data;
49
+ if (!d) return null;
50
+ return {
51
+ status: catData.value.status,
52
+ message: catData.value.message,
53
+ data: {
54
+ template: d.category?.template || "default",
55
+ type: d.type || "category",
56
+ record: {
57
+ category: d.category || {},
58
+ products: d.products || {},
59
+ brands: d.brands || [],
60
+ filter_values: d.filter_values || [],
61
+ filters: d.filters || [],
62
+ categories: d.categories || [],
63
+ prices: d.prices || {},
64
+ breadcrumb: d.breadcrumb || ""
43
65
  }
44
- };
45
- }
46
- return null;
66
+ }
67
+ };
47
68
  });
48
69
  const renderData = computed(() => transformedApiData.value || props.data);
49
70
  const getSelectedTemplate = (templateComponents) => {
@@ -52,13 +73,11 @@ export const useCategoryIndex = (props) => {
52
73
  });
53
74
  };
54
75
  return {
55
- // State
56
76
  catData,
57
- error,
58
77
  pending,
78
+ error,
59
79
  transformedApiData,
60
80
  renderData,
61
- // Methods
62
81
  refresh,
63
82
  getSelectedTemplate
64
83
  };
@@ -1,4 +1,8 @@
1
1
  import { useCheckoutStore } from "../../../stores/Checkout.js";
2
+ import { useCartStore } from "../../../stores/Cart.js";
3
+ import { GTM_add_payment_info } from "../../useDataLayer.js";
4
+ import { META_add_payment_info } from "../../useMetaLayer.js";
5
+ import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
2
6
  export default function() {
3
7
  const checkoutStore = useCheckoutStore();
4
8
  const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
@@ -12,6 +16,10 @@ export default function() {
12
16
  });
13
17
  }
14
18
  checkoutStore.saveToCheckoutSession(inputData);
19
+ const cartData = useCartStore().cart;
20
+ GTM_add_payment_info(cartData, "Direct Deposit");
21
+ META_add_payment_info(cartData, "Direct Deposit");
22
+ TikTok_add_payment_info(cartData, "Direct Deposit");
15
23
  } catch (error) {
16
24
  console.log("Error", error);
17
25
  }
@@ -1,24 +1,32 @@
1
1
  import { useCheckoutStore } from "../../../stores/Checkout.js";
2
+ import { useCartStore } from "../../../stores/Cart.js";
3
+ import { GTM_add_payment_info } from "../../useDataLayer.js";
4
+ import { META_add_payment_info } from "../../useMetaLayer.js";
5
+ import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
2
6
  export default function() {
3
7
  const checkoutStore = useCheckoutStore();
4
- const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
8
+ const getpaymentMethod = async (paymentMethod, inputData2, totalPrice) => {
5
9
  try {
6
- inputData.paymentmethod = paymentMethod;
10
+ inputData2.paymentmethod = paymentMethod;
7
11
  const newPrice = parseFloat(totalPrice);
8
12
  if (paymentMethod == "web-eway") {
9
13
  await checkoutStore.paymentMethods({
10
14
  paymentmethod: paymentMethod,
11
15
  total: newPrice
12
16
  });
13
- inputData.ewayKey = checkoutStore.publishableKey.key;
17
+ inputData2.ewayKey = checkoutStore.publishableKey.key;
14
18
  }
15
- checkoutStore.saveToCheckoutSession(inputData);
19
+ checkoutStore.saveToCheckoutSession(inputData2);
20
+ const cartData = useCartStore().cart;
21
+ GTM_add_payment_info(cartData, "Eway");
22
+ META_add_payment_info(cartData, "Eway");
23
+ TikTok_add_payment_info(cartData, "Eway");
16
24
  } catch (error) {
17
25
  console.log("Error", error);
18
26
  }
19
27
  };
20
- function saveToCheckoutSession(inputData) {
21
- checkoutStore.saveToCheckoutSession(inputData);
28
+ function saveToCheckoutSession(inputData2) {
29
+ checkoutStore.saveToCheckoutSession(inputData2);
22
30
  }
23
31
  function eWayCardValidations() {
24
32
  const e = document.getElementById("EWAY_CARDNUMBER");
@@ -70,6 +78,8 @@ export default function() {
70
78
  }
71
79
  }
72
80
  e.value = finalValue;
81
+ inputData.ewaeway_expiryyearyKey = finalValue;
82
+ checkoutStore.saveToCheckoutSession(inputData);
73
83
  });
74
84
  const ChangeCard = ((token = "") => {
75
85
  checkoutStore.checkoutSession.fields.eway_cvn = "";
@@ -6,7 +6,46 @@ declare global {
6
6
  }
7
7
  export default function (): {
8
8
  checkoutStore: any;
9
- user: import("vue").ComputedRef<import("../../../stores/index.js").User | null>;
9
+ user: {
10
+ id: number;
11
+ fullname: string;
12
+ firstname: string;
13
+ lastname: string;
14
+ email: string;
15
+ avatar: string;
16
+ country_id: number | null;
17
+ country: {
18
+ id: number;
19
+ name: string;
20
+ emoji: string;
21
+ } | null;
22
+ state_id: number | null;
23
+ state: string | null;
24
+ suburb: string | null;
25
+ dob: string | null;
26
+ phone: string | null;
27
+ address: string | null;
28
+ mobile: string | null;
29
+ company: string | null;
30
+ addresses: {
31
+ id: number;
32
+ fullname: string | null;
33
+ firstname: string;
34
+ middlename: string | null;
35
+ lastname: string;
36
+ address: string;
37
+ suburb: string;
38
+ state: string | null;
39
+ state_id: number | null;
40
+ country: string;
41
+ country_id: number;
42
+ postcode: string;
43
+ mobile: string;
44
+ shipping: number;
45
+ billing: number;
46
+ }[];
47
+ created_at: string;
48
+ } | null;
10
49
  ChangeCard: (token?: string) => void;
11
50
  getpaymentMethod: (paymentMethod: string, inputData: any, totalPrice: string) => Promise<void>;
12
51
  saveToCheckoutSession: (inputData: any) => void;
@@ -1,8 +1,12 @@
1
1
  import { useCheckoutStore } from "../../../stores/Checkout.js";
2
- import { useAuth } from "../../useAuth.js";
2
+ import { useAuthStore } from "../../../stores/auth.js";
3
+ import { useCartStore } from "../../../stores/Cart.js";
4
+ import { GTM_add_payment_info } from "../../useDataLayer.js";
5
+ import { META_add_payment_info } from "../../useMetaLayer.js";
6
+ import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
3
7
  export default function() {
4
8
  const checkoutStore = useCheckoutStore();
5
- const { user } = useAuth();
9
+ const { user } = useAuthStore();
6
10
  const payment = new PaymentJs();
7
11
  const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
8
12
  try {
@@ -113,6 +117,10 @@ export default function() {
113
117
  });
114
118
  }
115
119
  checkoutStore.saveToCheckoutSession(inputData);
120
+ const cartData = useCartStore().cart;
121
+ GTM_add_payment_info(cartData, "Flowrix Pay");
122
+ META_add_payment_info(cartData, "Flowrix Pay");
123
+ TikTok_add_payment_info(cartData, "Flowrix Pay");
116
124
  } catch (error) {
117
125
  console.log("Error", error);
118
126
  }
@@ -5,5 +5,44 @@ export default function (): {
5
5
  opayoMonthValidations: (inputData: any) => void;
6
6
  opayoYearValidations: () => void;
7
7
  ChangeCard: (token?: string) => void;
8
- user: import("vue").ComputedRef<import("../../../stores/index.js").User | null>;
8
+ user: {
9
+ id: number;
10
+ fullname: string;
11
+ firstname: string;
12
+ lastname: string;
13
+ email: string;
14
+ avatar: string;
15
+ country_id: number | null;
16
+ country: {
17
+ id: number;
18
+ name: string;
19
+ emoji: string;
20
+ } | null;
21
+ state_id: number | null;
22
+ state: string | null;
23
+ suburb: string | null;
24
+ dob: string | null;
25
+ phone: string | null;
26
+ address: string | null;
27
+ mobile: string | null;
28
+ company: string | null;
29
+ addresses: {
30
+ id: number;
31
+ fullname: string | null;
32
+ firstname: string;
33
+ middlename: string | null;
34
+ lastname: string;
35
+ address: string;
36
+ suburb: string;
37
+ state: string | null;
38
+ state_id: number | null;
39
+ country: string;
40
+ country_id: number;
41
+ postcode: string;
42
+ mobile: string;
43
+ shipping: number;
44
+ billing: number;
45
+ }[];
46
+ created_at: string;
47
+ } | null;
9
48
  };
@@ -1,8 +1,12 @@
1
1
  import { useCheckoutStore } from "../../../stores/Checkout.js";
2
- import { useAuth } from "../../useAuth.js";
2
+ import { useAuthStore } from "../../../stores/auth.js";
3
+ import { useCartStore } from "../../../stores/Cart.js";
4
+ import { GTM_add_payment_info } from "../../useDataLayer.js";
5
+ import { META_add_payment_info } from "../../useMetaLayer.js";
6
+ import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
3
7
  export default function() {
4
8
  const checkoutStore = useCheckoutStore();
5
- const { user } = useAuth();
9
+ const { user } = useAuthStore();
6
10
  const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
7
11
  try {
8
12
  inputData.paymentmethod = paymentMethod;
@@ -15,6 +19,10 @@ export default function() {
15
19
  inputData.opayoKey = checkoutStore.publishableKey.key;
16
20
  }
17
21
  checkoutStore.saveToCheckoutSession(inputData);
22
+ const cartData = useCartStore().cart;
23
+ GTM_add_payment_info(cartData, "Opayo");
24
+ META_add_payment_info(cartData, "Opayo");
25
+ TikTok_add_payment_info(cartData, "Opayo");
18
26
  } catch (error) {
19
27
  console.log("Error", error);
20
28
  }
@@ -22,20 +22,9 @@ export default function() {
22
22
  const Zippay = defineAsyncComponent(
23
23
  () => import("@/components/Checkout/Template01/PaymentMethods/Zippay.vue")
24
24
  );
25
- const components = import.meta.glob("@/components/Checkout/Template01/PaymentMethods/*.vue");
26
- const Opayo = defineAsyncComponent({
27
- loader: async () => {
28
- const path = "/src/components/Checkout/Template01/PaymentMethods/Opayo.vue";
29
- if (components[path]) {
30
- return components[path]();
31
- } else {
32
- console.warn("Opayo.vue not found. Skipping import or loading fallback.");
33
- return Promise.resolve({
34
- template: "<div>Payment method not available.</div>"
35
- });
36
- }
37
- }
38
- });
25
+ const Opayo = defineAsyncComponent(
26
+ () => import("@/components/Checkout/Template01/PaymentMethods/Opayo.vue")
27
+ );
39
28
  function getPaymentComponent(methodKey) {
40
29
  switch (methodKey) {
41
30
  case "web-eway":
@@ -1,4 +1,8 @@
1
1
  import { useCheckoutStore } from "../../../stores/Checkout.js";
2
+ import { useCartStore } from "../../../stores/Cart.js";
3
+ import { GTM_add_payment_info } from "../../useDataLayer.js";
4
+ import { META_add_payment_info } from "../../useMetaLayer.js";
5
+ import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
2
6
  export default function() {
3
7
  const checkoutStore = useCheckoutStore();
4
8
  const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
@@ -12,6 +16,10 @@ export default function() {
12
16
  });
13
17
  }
14
18
  checkoutStore.saveToCheckoutSession(inputData);
19
+ const cartData = useCartStore().cart;
20
+ GTM_add_payment_info(cartData, "Paypal");
21
+ META_add_payment_info(cartData, "Paypal");
22
+ TikTok_add_payment_info(cartData, "Paypal");
15
23
  } catch (error) {
16
24
  console.log("Error", error);
17
25
  }
@@ -2,6 +2,6 @@ export default function (): {
2
2
  getpaymentMethod: (paymentMethod: string, inputData: any, totalPrice: string) => Promise<void>;
3
3
  };
4
4
  export declare const getStripeElements: (publishableKey: string, clientSecret: string) => Promise<{
5
- stripe: any;
6
- elements: any;
5
+ stripe: null;
6
+ elements: null;
7
7
  }>;
@@ -1,5 +1,9 @@
1
1
  import { loadStripe } from "@stripe/stripe-js";
2
2
  import { useCheckoutStore } from "../../../stores/Checkout.js";
3
+ import { useCartStore } from "../../../stores/Cart.js";
4
+ import { GTM_add_payment_info } from "../../useDataLayer.js";
5
+ import { META_add_payment_info } from "../../useMetaLayer.js";
6
+ import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
3
7
  let stripe = null;
4
8
  let elements = null;
5
9
  export default function() {
@@ -26,6 +30,10 @@ export default function() {
26
30
  cardElement.mount("#card-element");
27
31
  }
28
32
  checkoutStore.saveToCheckoutSession(inputData);
33
+ const cartData = useCartStore().cart;
34
+ GTM_add_payment_info(cartData, "Stripe");
35
+ META_add_payment_info(cartData, "Stripe");
36
+ TikTok_add_payment_info(cartData, "Stripe");
29
37
  } catch (error) {
30
38
  console.log("Error", error);
31
39
  }
@@ -1,4 +1,8 @@
1
1
  import { useCheckoutStore } from "../../../stores/Checkout.js";
2
+ import { useCartStore } from "../../../stores/Cart.js";
3
+ import { GTM_add_payment_info } from "../../useDataLayer.js";
4
+ import { META_add_payment_info } from "../../useMetaLayer.js";
5
+ import { TikTok_add_payment_info } from "../../useTikTokDatalayer.js";
2
6
  export default function() {
3
7
  const checkoutStore = useCheckoutStore();
4
8
  const getpaymentMethod = async (paymentMethod, inputData, totalPrice) => {
@@ -12,6 +16,10 @@ export default function() {
12
16
  });
13
17
  }
14
18
  checkoutStore.saveToCheckoutSession(inputData);
19
+ const cartData = useCartStore().cart;
20
+ GTM_add_payment_info(cartData, "Zippay");
21
+ META_add_payment_info(cartData, "Zippay");
22
+ TikTok_add_payment_info(cartData, "Zippay");
15
23
  } catch (error) {
16
24
  console.log("Error", error);
17
25
  }
@@ -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;
@@ -183,4 +194,5 @@ export default function (): {
183
194
  step2Valid: import("vue").ComputedRef<boolean>;
184
195
  PaymentMethods: any;
185
196
  ipLocation: import("vue").Ref<any, any>;
197
+ isAuthenticated: false;
186
198
  };