flowrix 1.0.1-beta.147 → 1.0.1-beta.149

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 (192) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/SampleProductCard.d.vue.ts +13 -0
  3. package/dist/runtime/components/SampleProductCard.vue +362 -0
  4. package/dist/runtime/components/SampleProductCard.vue.d.ts +13 -0
  5. package/dist/runtime/components/WishList/dropdown.d.vue.ts +9 -0
  6. package/dist/runtime/components/WishList/dropdown.vue +417 -0
  7. package/dist/runtime/components/WishList/dropdown.vue.d.ts +9 -0
  8. package/dist/runtime/components/WishList/modal.d.vue.ts +13 -0
  9. package/dist/runtime/components/WishList/modal.vue +229 -0
  10. package/dist/runtime/components/WishList/modal.vue.d.ts +13 -0
  11. package/dist/runtime/components/product/AddToCart.d.vue.ts +15 -0
  12. package/dist/runtime/components/product/AddToCart.vue +176 -0
  13. package/dist/runtime/components/product/AddToCart.vue.d.ts +15 -0
  14. package/dist/runtime/components/product/AddtoCartSample.d.vue.ts +6 -0
  15. package/dist/runtime/components/product/AddtoCartSample.vue +110 -0
  16. package/dist/runtime/components/product/AddtoCartSample.vue.d.ts +6 -0
  17. package/dist/runtime/components/product/Badges.d.vue.ts +13 -0
  18. package/dist/runtime/components/product/Badges.vue +84 -0
  19. package/dist/runtime/components/product/Badges.vue.d.ts +13 -0
  20. package/dist/runtime/components/product/Description.d.vue.ts +9 -0
  21. package/dist/runtime/components/product/Description.vue +96 -0
  22. package/dist/runtime/components/product/Description.vue.d.ts +9 -0
  23. package/dist/runtime/components/product/Dynamic.d.vue.ts +9 -0
  24. package/dist/runtime/components/product/Dynamic.vue +136 -0
  25. package/dist/runtime/components/product/Dynamic.vue.d.ts +9 -0
  26. package/dist/runtime/components/product/Gallery.d.vue.ts +11 -0
  27. package/dist/runtime/components/product/Gallery.vue +133 -0
  28. package/dist/runtime/components/product/Gallery.vue.d.ts +11 -0
  29. package/dist/runtime/components/product/PopUpCart.d.vue.ts +11 -0
  30. package/dist/runtime/components/product/PopUpCart.vue +155 -0
  31. package/dist/runtime/components/product/PopUpCart.vue.d.ts +11 -0
  32. package/dist/runtime/components/product/ProductInfo.d.vue.ts +7 -0
  33. package/dist/runtime/components/product/ProductInfo.vue +105 -0
  34. package/dist/runtime/components/product/ProductInfo.vue.d.ts +7 -0
  35. package/dist/runtime/components/product/RequiredPopUp.d.vue.ts +9 -0
  36. package/dist/runtime/components/product/RequiredPopUp.vue +57 -0
  37. package/dist/runtime/components/product/RequiredPopUp.vue.d.ts +9 -0
  38. package/dist/runtime/components/product/bundleProduct/Bundle.d.vue.ts +13 -0
  39. package/dist/runtime/components/product/bundleProduct/Bundle.vue +35 -0
  40. package/dist/runtime/components/product/bundleProduct/Bundle.vue.d.ts +13 -0
  41. package/dist/runtime/components/product/bundleProduct/index.d.vue.ts +8 -0
  42. package/dist/runtime/components/product/bundleProduct/index.vue +32 -0
  43. package/dist/runtime/components/product/bundleProduct/index.vue.d.ts +8 -0
  44. package/dist/runtime/components/product/customProduct/AddtoCartSample.d.vue.ts +6 -0
  45. package/dist/runtime/components/product/customProduct/AddtoCartSample.vue +101 -0
  46. package/dist/runtime/components/product/customProduct/AddtoCartSample.vue.d.ts +6 -0
  47. package/dist/runtime/components/product/customProduct/Attributes.d.vue.ts +9 -0
  48. package/dist/runtime/components/product/customProduct/Attributes.vue +12 -0
  49. package/dist/runtime/components/product/customProduct/Attributes.vue.d.ts +9 -0
  50. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.d.vue.ts +13 -0
  51. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue +11 -0
  52. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue.d.ts +13 -0
  53. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.d.vue.ts +3 -0
  54. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue +253 -0
  55. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue.d.ts +3 -0
  56. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.d.vue.ts +3 -0
  57. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue +253 -0
  58. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue.d.ts +3 -0
  59. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.d.vue.ts +3 -0
  60. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue +214 -0
  61. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue.d.ts +3 -0
  62. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.d.vue.ts +13 -0
  63. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue +9 -0
  64. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue.d.ts +13 -0
  65. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.d.vue.ts +13 -0
  66. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue +9 -0
  67. package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue.d.ts +13 -0
  68. package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.d.vue.ts +9 -0
  69. package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue +133 -0
  70. package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue.d.ts +9 -0
  71. package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.d.vue.ts +11 -0
  72. package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue +35 -0
  73. package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue.d.ts +11 -0
  74. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.d.vue.ts +13 -0
  75. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue +134 -0
  76. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue.d.ts +13 -0
  77. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.d.vue.ts +15 -0
  78. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue +138 -0
  79. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue.d.ts +15 -0
  80. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.d.vue.ts +11 -0
  81. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue +149 -0
  82. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue.d.ts +11 -0
  83. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.d.vue.ts +11 -0
  84. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue +82 -0
  85. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue.d.ts +11 -0
  86. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.d.vue.ts +11 -0
  87. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue +108 -0
  88. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue.d.ts +11 -0
  89. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.d.vue.ts +11 -0
  90. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue +104 -0
  91. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue.d.ts +11 -0
  92. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.d.vue.ts +11 -0
  93. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue +87 -0
  94. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue.d.ts +11 -0
  95. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.d.vue.ts +11 -0
  96. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue +219 -0
  97. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue.d.ts +11 -0
  98. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.d.vue.ts +11 -0
  99. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue +36 -0
  100. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue.d.ts +11 -0
  101. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.d.vue.ts +11 -0
  102. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue +45 -0
  103. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue.d.ts +11 -0
  104. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.d.vue.ts +13 -0
  105. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue +48 -0
  106. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue.d.ts +13 -0
  107. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.d.vue.ts +11 -0
  108. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue +154 -0
  109. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue.d.ts +11 -0
  110. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.d.vue.ts +11 -0
  111. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue +111 -0
  112. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue.d.ts +11 -0
  113. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.d.vue.ts +11 -0
  114. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue +269 -0
  115. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue.d.ts +11 -0
  116. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.d.vue.ts +11 -0
  117. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue +63 -0
  118. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue.d.ts +11 -0
  119. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.d.vue.ts +11 -0
  120. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue +63 -0
  121. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue.d.ts +11 -0
  122. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.d.vue.ts +11 -0
  123. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue +220 -0
  124. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue.d.ts +11 -0
  125. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.d.vue.ts +11 -0
  126. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue +47 -0
  127. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue.d.ts +11 -0
  128. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.d.vue.ts +11 -0
  129. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue +91 -0
  130. package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue.d.ts +11 -0
  131. package/dist/runtime/components/product/customProduct/ConfirmPopup.d.vue.ts +9 -0
  132. package/dist/runtime/components/product/customProduct/ConfirmPopup.vue +25 -0
  133. package/dist/runtime/components/product/customProduct/ConfirmPopup.vue.d.ts +9 -0
  134. package/dist/runtime/components/product/customProduct/RequiredPopUp.d.vue.ts +9 -0
  135. package/dist/runtime/components/product/customProduct/RequiredPopUp.vue +49 -0
  136. package/dist/runtime/components/product/customProduct/RequiredPopUp.vue.d.ts +9 -0
  137. package/dist/runtime/components/product/customProduct/Reviews.d.vue.ts +7 -0
  138. package/dist/runtime/components/product/customProduct/Reviews.vue +25 -0
  139. package/dist/runtime/components/product/customProduct/Reviews.vue.d.ts +7 -0
  140. package/dist/runtime/components/product/customProduct/SingleStep.d.vue.ts +11 -0
  141. package/dist/runtime/components/product/customProduct/SingleStep.vue +11 -0
  142. package/dist/runtime/components/product/customProduct/SingleStep.vue.d.ts +11 -0
  143. package/dist/runtime/components/product/customProduct/Steps.d.vue.ts +9 -0
  144. package/dist/runtime/components/product/customProduct/Steps.vue +221 -0
  145. package/dist/runtime/components/product/customProduct/Steps.vue.d.ts +9 -0
  146. package/dist/runtime/components/product/customProduct/index.d.vue.ts +9 -0
  147. package/dist/runtime/components/product/customProduct/index.vue +272 -0
  148. package/dist/runtime/components/product/customProduct/index.vue.d.ts +9 -0
  149. package/dist/runtime/components/product/index.d.vue.ts +8 -0
  150. package/dist/runtime/components/product/index.vue +90 -0
  151. package/dist/runtime/components/product/index.vue.d.ts +8 -0
  152. package/dist/runtime/components/product/sampleProduct/ProductVariation.d.vue.ts +11 -0
  153. package/dist/runtime/components/product/sampleProduct/ProductVariation.vue +61 -0
  154. package/dist/runtime/components/product/sampleProduct/ProductVariation.vue.d.ts +11 -0
  155. package/dist/runtime/components/product/sampleProduct/SampleDetails.d.vue.ts +7 -0
  156. package/dist/runtime/components/product/sampleProduct/SampleDetails.vue +74 -0
  157. package/dist/runtime/components/product/sampleProduct/SampleDetails.vue.d.ts +7 -0
  158. package/dist/runtime/components/product/sampleProduct/SampleFeatures.d.vue.ts +9 -0
  159. package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue +63 -0
  160. package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue.d.ts +9 -0
  161. package/dist/runtime/components/product/sampleProduct/index.d.vue.ts +8 -0
  162. package/dist/runtime/components/product/sampleProduct/index.vue +64 -0
  163. package/dist/runtime/components/product/sampleProduct/index.vue.d.ts +8 -0
  164. package/dist/runtime/components/product/simpleProduct/ProductVariation.d.vue.ts +11 -0
  165. package/dist/runtime/components/product/simpleProduct/ProductVariation.vue +61 -0
  166. package/dist/runtime/components/product/simpleProduct/ProductVariation.vue.d.ts +11 -0
  167. package/dist/runtime/components/product/simpleProduct/index.d.vue.ts +8 -0
  168. package/dist/runtime/components/product/simpleProduct/index.vue +34 -0
  169. package/dist/runtime/components/product/simpleProduct/index.vue.d.ts +8 -0
  170. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.d.ts +3 -0
  171. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.js +20 -0
  172. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.d.ts +70 -0
  173. package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.js +63 -0
  174. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.d.ts +74 -0
  175. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.js +107 -0
  176. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.d.ts +159 -0
  177. package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.js +2079 -0
  178. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.d.ts +4 -0
  179. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.js +27 -0
  180. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.d.ts +68 -0
  181. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.js +21 -0
  182. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.d.ts +67 -0
  183. package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.js +15 -0
  184. package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.d.ts +88 -0
  185. package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.js +72 -0
  186. package/dist/runtime/composables/index.d.ts +8 -0
  187. package/dist/runtime/composables/index.js +8 -0
  188. package/dist/runtime/pages/flowrix-default.vue +15 -6
  189. package/dist/runtime/plugins/bootstrap.client.d.ts +2 -0
  190. package/dist/runtime/plugins/bootstrap.client.js +9 -0
  191. package/dist/runtime/server/api/cart/related.js +15 -2
  192. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ product?: any;
6
+ from?: any;
7
+ service?: any;
8
+ quantity?: any;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const __VLS_props: {
11
+ readonly product?: any;
12
+ readonly from?: any;
13
+ readonly service?: any;
14
+ readonly quantity?: any;
15
+ };
@@ -0,0 +1,176 @@
1
+ <script setup>
2
+ const { from, product, service, quantity } = defineProps(["from", "product", "service", "quantity"]);
3
+ import PopUp from "./PopUpCart.vue";
4
+ import RequiredPopUp from "./RequiredPopUp.vue";
5
+ const route = useRoute();
6
+ const RequiredValidation = ref([]);
7
+ const queryParameters = route.query ? route.query : null;
8
+ let productId = queryParameters?.customize ? queryParameters.customize : null;
9
+ const newProduct = queryParameters?.copy ? productId = "" : productId = productId;
10
+ const showError = ref(false);
11
+ const ErrorMessage = ref("");
12
+ const open = ref(false);
13
+ const isLoading = ref(false);
14
+ const closeerrorModal = () => {
15
+ showError.value = false;
16
+ ErrorMessage.value = "";
17
+ };
18
+ const price_span = ref("");
19
+ const getFormData = () => {
20
+ const customProductForm = document.querySelector(".customproductform");
21
+ const form = customProductForm;
22
+ if (form) {
23
+ const formData = new FormData(form);
24
+ const formObject = {};
25
+ const visibleFields = Array.from(formData.entries()).filter(([key]) => {
26
+ const element = form.querySelector(`[name="${key}"]`);
27
+ if (element.required == true && element.value == "") {
28
+ let Ename = element.getAttribute("data-label");
29
+ let Evalidation = element.getAttribute("data-validation");
30
+ let Relemnt = [{ name: Ename, validation: Evalidation }];
31
+ RequiredValidation.value = [...RequiredValidation.value, ...Relemnt];
32
+ }
33
+ const parentElement = element.closest(".single-attribute") ? element.closest(".single-attribute") : element;
34
+ return parentElement;
35
+ });
36
+ visibleFields.forEach(([key, value]) => {
37
+ formObject[key] = value;
38
+ });
39
+ return formObject;
40
+ }
41
+ };
42
+ const proQuantity = ref(1);
43
+ const addToCart = async (product2, productId2) => {
44
+ isLoading.value = true;
45
+ RequiredValidation.value = [];
46
+ let DontCheckError = 0;
47
+ price_span.value = document.querySelector(".product-details .price_span") ? document.querySelector(".product-details .price_span").innerHTML : 0;
48
+ try {
49
+ var mainwidthelement = document.querySelector(".mainwidthInput");
50
+ if (mainwidthelement) {
51
+ var maintitle = mainwidthelement.getAttribute("data-title");
52
+ var mainwidth = parseInt(mainwidthelement.value);
53
+ var subwidths = document.querySelectorAll(".subWidthInput");
54
+ if (mainwidth && subwidths.length > 0) {
55
+ DontCheckError = subwidths.length;
56
+ var allfieldsum = 0;
57
+ var title = "";
58
+ subwidths.forEach((subwidth, index) => {
59
+ var grandparent = subwidth.parentElement.parentElement.parentElement.parentElement;
60
+ const grandparentStyle = window.getComputedStyle(grandparent);
61
+ if (grandparentStyle.display === "none") {
62
+ DontCheckError = DontCheckError - 1;
63
+ } else {
64
+ allfieldsum = parseInt(allfieldsum) + parseInt(subwidth.value);
65
+ title += index == 0 ? "" : " + ";
66
+ title += subwidth.getAttribute("data-title");
67
+ }
68
+ });
69
+ if (DontCheckError > 0) {
70
+ if (allfieldsum != mainwidth) {
71
+ showError.value = true;
72
+ ErrorMessage.value = `The total ${maintitle} must be equal to ${title}.`;
73
+ return false;
74
+ }
75
+ }
76
+ }
77
+ }
78
+ var mainheightelement = document.querySelector(".mainHeightInput");
79
+ if (mainheightelement) {
80
+ var maintitlehieght = mainheightelement.getAttribute("data-title");
81
+ var mainheight = parseInt(mainheightelement.value);
82
+ var subheight = document.querySelectorAll(".subHeightInput");
83
+ if (mainheight && subheight.length > 0) {
84
+ DontCheckError = subwidths.length;
85
+ var allfieldsum = 0;
86
+ var title = "";
87
+ subheight.forEach((subwidth, index) => {
88
+ var grandparent = subwidth.parentElement.parentElement.parentElement.parentElement;
89
+ const heightgrandparentStyle = window.getComputedStyle(grandparent);
90
+ if (heightgrandparentStyle.display === "none") {
91
+ DontCheckError = DontCheckError - 1;
92
+ } else {
93
+ allfieldsum = parseInt(allfieldsum) + parseInt(subwidth.value);
94
+ title += index == 0 ? "" : " + ";
95
+ title += subwidth.getAttribute("data-title");
96
+ }
97
+ });
98
+ if (DontCheckError > 0) {
99
+ if (allfieldsum != mainheight) {
100
+ showError.value = true;
101
+ ErrorMessage.value = `The total ${maintitlehieght} must be equal to ${title} ${maintitlehieght}.`;
102
+ return false;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ const formData = getFormData();
108
+ const cartItems = useCartStore().cart.items;
109
+ let qty = quantity;
110
+ if (productId2 && cartItems != void 0 && Object.values(cartItems).length > 0) {
111
+ const cartItem = Object.values(cartItems).filter((item) => item.rowId == productId2)[0];
112
+ qty = cartItem.qty;
113
+ proQuantity.value = qty;
114
+ }
115
+ if (RequiredValidation.value.length > 0) {
116
+ return false;
117
+ }
118
+ await useCartStore().addToCart(product2, qty, formData, newProduct);
119
+ if (useCartStore().addedResponse == "success") {
120
+ open.value = true;
121
+ }
122
+ } catch (error) {
123
+ console.error("Error in addToCart:", error);
124
+ } finally {
125
+ isLoading.value = false;
126
+ }
127
+ };
128
+ const closeModal = () => {
129
+ open.value = false;
130
+ RequiredValidation.value = [];
131
+ };
132
+ </script>
133
+
134
+ <template>
135
+ <button
136
+ type="button"
137
+ class="btn btn-primary add-to-cart-btn position-relative"
138
+ id="ihy7hw"
139
+ data-gjs-type="add-to-cart-button"
140
+ @click="addToCart(product, productId)"
141
+ :disabled="isLoading"
142
+ >
143
+ <div
144
+ id="iaol9y"
145
+ data-gjs-type="text"
146
+ :class="{ 'opacity-0': isLoading }"
147
+ >
148
+ <span v-if="productId">Update to Cart</span>
149
+ <span v-else>Add to Cart</span>
150
+ </div>
151
+
152
+ <LoadingSpinner
153
+ v-if="isLoading"
154
+ :show="isLoading"
155
+ size="sm"
156
+ spinner-variant="light"
157
+ text-variant="white"
158
+ text="Loading..."
159
+ />
160
+ </button>
161
+ <div class="error-popup-modal" v-if="showError == true">
162
+ <div class="error-body">
163
+ <p class="text-danger text-wrap">{{ ErrorMessage }}</p>
164
+ <span @click="closeerrorModal" class="btn btn-primary py-0 px-3">Close</span>
165
+ </div>
166
+ </div>
167
+ <Teleport to="#teleports">
168
+ <div class="modals">
169
+ <PopUp v-if="open" @some-event="closeModal" :proQuantity="proQuantity" :productData="product"
170
+ :price="price_span" />
171
+ </div>
172
+ <div v-if="RequiredValidation.length > 0">
173
+ <RequiredPopUp @closeRequried="closeModal" :fields="RequiredValidation" />
174
+ </div>
175
+ </Teleport>
176
+ </template>
@@ -0,0 +1,15 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ product?: any;
6
+ from?: any;
7
+ service?: any;
8
+ quantity?: any;
9
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const __VLS_props: {
11
+ readonly product?: any;
12
+ readonly from?: any;
13
+ readonly service?: any;
14
+ readonly quantity?: any;
15
+ };
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ samples: Array<any>;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,110 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ samples: { type: Array, required: true }
4
+ });
5
+ import PopUpCart from "./PopUpCart.vue";
6
+ const samplesData = ref(props.samples || []);
7
+ const flattenedValues = ref([]);
8
+ watch(samplesData, (newVal) => {
9
+ if (newVal && newVal.length > 0) {
10
+ flattenedValues.value = newVal.flatMap(
11
+ (item) => item.attributeInfo?.values ? Object.values(item.attributeInfo.values) : []
12
+ );
13
+ } else {
14
+ flattenedValues.value = [];
15
+ }
16
+ }, { immediate: true });
17
+ const checkInCart = ((product2) => {
18
+ let cartItems = useCartStore().cart.items;
19
+ if (cartItems) {
20
+ for (const key in cartItems) {
21
+ if (cartItems[key].slug === product2.slug) {
22
+ return false;
23
+ }
24
+ }
25
+ }
26
+ return true;
27
+ });
28
+ const open = ref(false);
29
+ const isAddingToCart = ref(false);
30
+ const price_span = ref("");
31
+ const product = ref(null);
32
+ const addToCart = async (samples, qty) => {
33
+ if (!samples) return;
34
+ isAddingToCart.value = true;
35
+ try {
36
+ for (const sample of Object.values(samples)) {
37
+ if (sample) {
38
+ let productToAdd = { slug: sample };
39
+ if (checkInCart(productToAdd)) {
40
+ await useCartStore().addToCart(productToAdd, 1);
41
+ if (useCartStore().addedResponse === "success") {
42
+ product.value = productToAdd;
43
+ open.value = true;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ } finally {
49
+ isAddingToCart.value = false;
50
+ }
51
+ };
52
+ const removeFromCart = async (productId, product2) => {
53
+ await useCartStore().removeFromCart(productId, product2);
54
+ };
55
+ const closeModal = () => {
56
+ open.value = false;
57
+ };
58
+ const orderSampleButtonDisabled = computed(() => {
59
+ const currentScriptSamples = props.samples;
60
+ if (!currentScriptSamples || Object.keys(currentScriptSamples).length === 0) {
61
+ return true;
62
+ }
63
+ const samplesArray = Object.values(currentScriptSamples);
64
+ if (samplesArray.length === 0) {
65
+ return true;
66
+ }
67
+ for (const sample of samplesArray) {
68
+ if (sample) {
69
+ const productToCheck = { slug: sample };
70
+ if (checkInCart(productToCheck)) {
71
+ return false;
72
+ }
73
+ }
74
+ }
75
+ return true;
76
+ });
77
+ </script>
78
+
79
+ <template>
80
+ <div class="text-center">
81
+ <button type="button" v-if="orderSampleButtonDisabled == false" @click="addToCart(samples, 1)"
82
+ class="btn btn-primary order-sample-btn text-center fw-semibold d-block w-100 rounded-pill py-2 position-relative"
83
+ id="i5n8mj" :disabled="isAddingToCart">
84
+ <div id="i0aidl" :class="{ 'opacity-0': isAddingToCart }">
85
+ <span v-if="!isAddingToCart">Order Free Sample</span>
86
+ <span v-else>Processing...</span>
87
+ </div>
88
+
89
+ <span v-if="isAddingToCart"
90
+ class="spinner-border spinner-border-sm position-absolute top-50 start-50 translate-middle"
91
+ role="status" aria-hidden="true"></span>
92
+ </button>
93
+ <button type="button" v-else :disabled="orderSampleButtonDisabled == true"
94
+ class="btn btn-outline-primary fw-semibold d-block w-100 rounded-pill py-2">
95
+ <i class="text-secondary">
96
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
97
+ <path fill="currentColor" fill-rule="evenodd"
98
+ d="M7 7c0-2.762 2.238-5 5-5s5 2.238 5 5v3h.4c.88 0 1.6.72 1.6 1.6v7c0 1.32-1.08 2.4-2.4 2.4H7.4C6.08 21 5 19.92 5 18.6v-7c0-.88.72-1.6 1.6-1.6H7zm8 0v3H9V7c0-1.658 1.342-3 3-3s3 1.342 3 3m-3 5.25a1.75 1.75 0 0 0-.75 3.332V18a.75.75 0 0 0 1.5 0v-2.418A1.75 1.75 0 0 0 12 12.25"
99
+ clip-rule="evenodd" />
100
+ </svg>
101
+ </i>
102
+ SAMPLE ALREADY IN YOUR BASKET
103
+ </button>
104
+ </div>
105
+ <Teleport to="#teleports">
106
+ <div v-if="open" class="modals">
107
+ <PopUpCart @some-event="closeModal" :productData="flattenedValues[0]" :price="price_span" />
108
+ </div>
109
+ </Teleport>
110
+ </template>
@@ -0,0 +1,6 @@
1
+ type __VLS_Props = {
2
+ samples: Array<any>;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ productData: {
3
+ type: ObjectConstructor;
4
+ required: true;
5
+ };
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
+ productData: {
8
+ type: ObjectConstructor;
9
+ required: true;
10
+ };
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,84 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ productData: {
4
+ type: Object,
5
+ required: true
6
+ }
7
+ });
8
+ </script>
9
+
10
+ <template>
11
+ <div class="badges">
12
+ <template v-for="(badge, index) in productData.badges">
13
+ <div class="single-badge" :class="badge.position" v-if="badge.image">
14
+ <img :src="badge.image" width="100%" />
15
+ </div>
16
+ </template>
17
+ </div>
18
+ </template>
19
+
20
+ <style scoped>
21
+ .badges {
22
+ position: absolute;
23
+ z-index: 9;
24
+ top: 0px;
25
+ left: 0px;
26
+ width: calc(100% - 15px);
27
+ height: calc(100% - 10px);
28
+ user-select: none;
29
+ pointer-events: none;
30
+ }
31
+ .badges .single-badge {
32
+ width: 100px;
33
+ }
34
+ .badges .single-badge.top-left {
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+ }
39
+ .badges .single-badge.top-right {
40
+ position: absolute;
41
+ top: 0;
42
+ right: 0;
43
+ }
44
+ .badges .single-badge.top-center {
45
+ position: absolute;
46
+ top: 0;
47
+ left: 50%;
48
+ transform: translateX(-50%);
49
+ }
50
+ .badges .single-badge.middle-left {
51
+ position: absolute;
52
+ top: 50%;
53
+ left: 0;
54
+ transform: translateY(-50%);
55
+ }
56
+ .badges .single-badge.middle-right {
57
+ position: absolute;
58
+ top: 50%;
59
+ right: 0;
60
+ transform: translateY(-50%);
61
+ }
62
+ .badges .single-badge.middle-center {
63
+ position: absolute;
64
+ top: 50%;
65
+ left: 50%;
66
+ transform: translate(-50%, -50%);
67
+ }
68
+ .badges .single-badge.bottom-left {
69
+ position: absolute;
70
+ bottom: 0;
71
+ left: 0;
72
+ }
73
+ .badges .single-badge.bottom-right {
74
+ position: absolute;
75
+ bottom: 0;
76
+ right: 0;
77
+ }
78
+ .badges .single-badge.bottom-center {
79
+ position: absolute;
80
+ bottom: 0;
81
+ left: 50%;
82
+ transform: translateX(-50%);
83
+ }
84
+ </style>
@@ -0,0 +1,13 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ productData: {
3
+ type: ObjectConstructor;
4
+ required: true;
5
+ };
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
7
+ productData: {
8
+ type: ObjectConstructor;
9
+ required: true;
10
+ };
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,9 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ product?: any;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ declare const __VLS_props: {
8
+ readonly product?: any;
9
+ };
@@ -0,0 +1,96 @@
1
+ <script setup>
2
+ import { ref, onMounted, onUnmounted } from "vue";
3
+ defineProps(["product"]);
4
+ const isMobile = ref(false);
5
+ const checkMobile = () => {
6
+ isMobile.value = window.innerWidth < 768;
7
+ };
8
+ onMounted(() => {
9
+ checkMobile();
10
+ window.addEventListener("resize", checkMobile);
11
+ });
12
+ onUnmounted(() => {
13
+ window.removeEventListener("resize", checkMobile);
14
+ });
15
+ </script>
16
+
17
+ <template>
18
+ <div class="accordion mt-5" id="accordionDescription">
19
+ <div class="accordion-item" v-if="product && product.description">
20
+ <h2 class="accordion-header">
21
+ <button
22
+ class="accordion-button"
23
+ :class="{ 'collapsed': !isMobile }"
24
+ type="button"
25
+ data-bs-toggle="collapse"
26
+ data-bs-target="#flush-collapseOne"
27
+ :aria-expanded="isMobile"
28
+ aria-controls="flush-collapseOne">
29
+ Product Details
30
+ </button>
31
+ </h2>
32
+ <div
33
+ id="flush-collapseOne"
34
+ class="accordion-collapse collapse"
35
+ :class="{ 'show': isMobile }"
36
+ data-bs-parent="#accordionDescription">
37
+ <div class="accordion-body" v-html="product.description"></div>
38
+ </div>
39
+ </div>
40
+ <div class="accordion-item" v-if="product && product.specs && product.specs.length > 0">
41
+ <h2 class="accordion-header">
42
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
43
+ data-bs-target="#flush-collapseTwo" aria-expanded="false" aria-controls="flush-collapseTwo">
44
+ Manufacturing & Delivery
45
+ </button>
46
+ </h2>
47
+ <div id="flush-collapseTwo" class="accordion-collapse collapse" data-bs-parent="#accordionDescription">
48
+ <div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the
49
+ <code>.accordion-flush</code> class. This is the second item's accordion body. Let's imagine this
50
+ being filled with some actual content.
51
+ </div>
52
+ </div>
53
+ </div>
54
+ <div class="accordion-item" v-if="product && product.instructions && product.instructions.length > 0">
55
+ <h2 class="accordion-header">
56
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
57
+ data-bs-target="#flush-collapseThree" aria-expanded="false" aria-controls="flush-collapseThree">
58
+ Measuring Guide
59
+ </button>
60
+ </h2>
61
+ <div id="flush-collapseThree" class="accordion-collapse collapse" data-bs-parent="#accordionDescription">
62
+ <div class="accordion-body">
63
+ <ul class="list-group list-group-flush">
64
+ <li class="list-group-item p-0" v-for="items in product.instructions" :key="items.id">
65
+ <a :href="items.file" target="_blank">{{ items.title }}</a>
66
+ <div v-html="items.description"></div>
67
+ </li>
68
+ </ul>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </template>
74
+
75
+ <style scoped>
76
+ .accordion-item {
77
+ margin-bottom: 20px;
78
+ border-radius: 10px;
79
+ }
80
+ .accordion-item:not(:first-of-type) {
81
+ border-top: 1px solid #dee2e6;
82
+ }
83
+ .accordion-item .accordion-button {
84
+ border-radius: 10px !important;
85
+ font-weight: 600;
86
+ }
87
+ .accordion-item .accordion-button:focus {
88
+ box-shadow: unset;
89
+ }
90
+ .accordion-item .accordion-button:not(.collapsed) {
91
+ background: none;
92
+ box-shadow: unset;
93
+ border-bottom: 1px solid #ddd;
94
+ border-radius: 0 !important;
95
+ }
96
+ </style>
@@ -0,0 +1,9 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
4
+ $props: Partial<typeof __VLS_props>;
5
+ product?: any;
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ declare const __VLS_props: {
8
+ readonly product?: any;
9
+ };
@@ -0,0 +1,9 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{
2
+ product?: any;
3
+ data?: any;
4
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
5
+ product?: any;
6
+ data?: any;
7
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;