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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/SampleProductCard.d.vue.ts +13 -0
- package/dist/runtime/components/SampleProductCard.vue +362 -0
- package/dist/runtime/components/SampleProductCard.vue.d.ts +13 -0
- package/dist/runtime/components/WishList/dropdown.d.vue.ts +9 -0
- package/dist/runtime/components/WishList/dropdown.vue +417 -0
- package/dist/runtime/components/WishList/dropdown.vue.d.ts +9 -0
- package/dist/runtime/components/WishList/modal.d.vue.ts +13 -0
- package/dist/runtime/components/WishList/modal.vue +229 -0
- package/dist/runtime/components/WishList/modal.vue.d.ts +13 -0
- package/dist/runtime/components/product/AddToCart.d.vue.ts +15 -0
- package/dist/runtime/components/product/AddToCart.vue +176 -0
- package/dist/runtime/components/product/AddToCart.vue.d.ts +15 -0
- package/dist/runtime/components/product/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/product/AddtoCartSample.vue +110 -0
- package/dist/runtime/components/product/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/product/Badges.d.vue.ts +13 -0
- package/dist/runtime/components/product/Badges.vue +84 -0
- package/dist/runtime/components/product/Badges.vue.d.ts +13 -0
- package/dist/runtime/components/product/Description.d.vue.ts +9 -0
- package/dist/runtime/components/product/Description.vue +96 -0
- package/dist/runtime/components/product/Description.vue.d.ts +9 -0
- package/dist/runtime/components/product/Dynamic.d.vue.ts +9 -0
- package/dist/runtime/components/product/Dynamic.vue +136 -0
- package/dist/runtime/components/product/Dynamic.vue.d.ts +9 -0
- package/dist/runtime/components/product/Gallery.d.vue.ts +11 -0
- package/dist/runtime/components/product/Gallery.vue +133 -0
- package/dist/runtime/components/product/Gallery.vue.d.ts +11 -0
- package/dist/runtime/components/product/PopUpCart.d.vue.ts +11 -0
- package/dist/runtime/components/product/PopUpCart.vue +155 -0
- package/dist/runtime/components/product/PopUpCart.vue.d.ts +11 -0
- package/dist/runtime/components/product/ProductInfo.d.vue.ts +7 -0
- package/dist/runtime/components/product/ProductInfo.vue +105 -0
- package/dist/runtime/components/product/ProductInfo.vue.d.ts +7 -0
- package/dist/runtime/components/product/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/product/RequiredPopUp.vue +57 -0
- package/dist/runtime/components/product/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.d.vue.ts +13 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.vue +35 -0
- package/dist/runtime/components/product/bundleProduct/Bundle.vue.d.ts +13 -0
- package/dist/runtime/components/product/bundleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/bundleProduct/index.vue +32 -0
- package/dist/runtime/components/product/bundleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.d.vue.ts +6 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.vue +101 -0
- package/dist/runtime/components/product/customProduct/AddtoCartSample.vue.d.ts +6 -0
- package/dist/runtime/components/product/customProduct/Attributes.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/Attributes.vue +12 -0
- package/dist/runtime/components/product/customProduct/Attributes.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/drop-down.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue +253 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-collection.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue +253 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-colors.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.d.vue.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue +214 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/multi-values.vue.d.ts +3 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/style.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/AttributeType/swatch.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue +133 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/PopupContent/Popup.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue +35 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/SingleAttribute.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue +134 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlide.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.d.vue.ts +15 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue +138 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue.d.ts +15 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue +149 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/button.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue +82 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdown.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue +108 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue +104 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/height.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue +87 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBox.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue +219 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue +36 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/message.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue +45 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/number.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.d.vue.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue +48 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/orderSample/button.vue.d.ts +13 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue +154 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/radio.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue +111 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/slider.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue +269 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue +63 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subheight.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue +63 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/subwidth.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue +220 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue +47 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue +91 -0
- package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.vue +25 -0
- package/dist/runtime/components/product/customProduct/ConfirmPopup.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.vue +49 -0
- package/dist/runtime/components/product/customProduct/RequiredPopUp.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/Reviews.d.vue.ts +7 -0
- package/dist/runtime/components/product/customProduct/Reviews.vue +25 -0
- package/dist/runtime/components/product/customProduct/Reviews.vue.d.ts +7 -0
- package/dist/runtime/components/product/customProduct/SingleStep.d.vue.ts +11 -0
- package/dist/runtime/components/product/customProduct/SingleStep.vue +11 -0
- package/dist/runtime/components/product/customProduct/SingleStep.vue.d.ts +11 -0
- package/dist/runtime/components/product/customProduct/Steps.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/Steps.vue +221 -0
- package/dist/runtime/components/product/customProduct/Steps.vue.d.ts +9 -0
- package/dist/runtime/components/product/customProduct/index.d.vue.ts +9 -0
- package/dist/runtime/components/product/customProduct/index.vue +272 -0
- package/dist/runtime/components/product/customProduct/index.vue.d.ts +9 -0
- package/dist/runtime/components/product/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/index.vue +90 -0
- package/dist/runtime/components/product/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.d.vue.ts +11 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/product/sampleProduct/ProductVariation.vue.d.ts +11 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.d.vue.ts +7 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.vue +74 -0
- package/dist/runtime/components/product/sampleProduct/SampleDetails.vue.d.ts +7 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.d.vue.ts +9 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue +63 -0
- package/dist/runtime/components/product/sampleProduct/SampleFeatures.vue.d.ts +9 -0
- package/dist/runtime/components/product/sampleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/sampleProduct/index.vue +64 -0
- package/dist/runtime/components/product/sampleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.d.vue.ts +11 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.vue +61 -0
- package/dist/runtime/components/product/simpleProduct/ProductVariation.vue.d.ts +11 -0
- package/dist/runtime/components/product/simpleProduct/index.d.vue.ts +8 -0
- package/dist/runtime/components/product/simpleProduct/index.vue +34 -0
- package/dist/runtime/components/product/simpleProduct/index.vue.d.ts +8 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.d.ts +3 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributeTypeDynamic.js +20 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.d.ts +70 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useAttributesDynamic.js +63 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.d.ts +74 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomProductDynamic.js +107 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.d.ts +159 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useCustomeScriptDynamic.js +2079 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.d.ts +4 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleAttributeDynamic.js +27 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.d.ts +68 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleStepDynamic.js +21 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.d.ts +67 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useSingleValueDynamic.js +15 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.d.ts +88 -0
- package/dist/runtime/composables/Product/CustomProductDynamic/useStepsDynamic.js +72 -0
- package/dist/runtime/composables/index.d.ts +8 -0
- package/dist/runtime/composables/index.js +8 -0
- package/dist/runtime/pages/flowrix-default.vue +15 -6
- package/dist/runtime/plugins/bootstrap.client.d.ts +2 -0
- package/dist/runtime/plugins/bootstrap.client.js +9 -0
- package/dist/runtime/server/api/cart/related.js +15 -2
- package/package.json +1 -1
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import contentPopup from "../PopupContent/Popup.vue";
|
|
3
|
+
import orderSample from "./orderSample/button.vue";
|
|
4
|
+
const CustomScript = useCustomeScriptDynamic();
|
|
5
|
+
const { attribute, group } = defineProps({ "attribute": Object, "group": Object });
|
|
6
|
+
const { script } = useSingleValue(attribute);
|
|
7
|
+
const SelecteValue = ref(0);
|
|
8
|
+
const SelectedItem = attribute.values.find((i) => i.selected === true);
|
|
9
|
+
if (SelectedItem) {
|
|
10
|
+
SelecteValue.value = SelectedItem.id;
|
|
11
|
+
}
|
|
12
|
+
const ChangeValue = ((value, item) => {
|
|
13
|
+
const aid = attribute.id;
|
|
14
|
+
const gid = group.id;
|
|
15
|
+
const vid = value;
|
|
16
|
+
CustomScript.SelectedOptions = { aid, gid, vid };
|
|
17
|
+
CustomScript.initprocess();
|
|
18
|
+
if (attribute.typeLabel == "swatch") {
|
|
19
|
+
GTM_select_item_color(attribute, item, group);
|
|
20
|
+
}
|
|
21
|
+
if (attribute.typeLabel == "style") {
|
|
22
|
+
GTM_select_item_collection(attribute, item, group);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const colorspopupShow = ref(false);
|
|
26
|
+
const colorspopupParent = ref(0);
|
|
27
|
+
const activeImageId = ref(0);
|
|
28
|
+
const showColorLargeImage = ((index, Parent) => {
|
|
29
|
+
colorspopupShow.value = true;
|
|
30
|
+
colorspopupParent.value = Parent;
|
|
31
|
+
activeImageId.value = index;
|
|
32
|
+
setTimeout(function() {
|
|
33
|
+
let colorimages = document.querySelector(".colors-images");
|
|
34
|
+
let images = colorimages.querySelectorAll(".colors-image");
|
|
35
|
+
images.forEach((image) => {
|
|
36
|
+
image.style.display = "none";
|
|
37
|
+
image.classList.remove("active");
|
|
38
|
+
});
|
|
39
|
+
let colorimage = colorimages.querySelector(".ColorImageIndex_" + index);
|
|
40
|
+
colorimage.style.display = "block";
|
|
41
|
+
colorimage.classList.add("active");
|
|
42
|
+
}, 500);
|
|
43
|
+
});
|
|
44
|
+
const closecolorspopup = (() => {
|
|
45
|
+
colorspopupShow.value = false;
|
|
46
|
+
activeImageId.value = 0;
|
|
47
|
+
});
|
|
48
|
+
const NextColorImage = (() => {
|
|
49
|
+
let colorimages = document.querySelector(".colors-images");
|
|
50
|
+
let curentImage = colorimages.querySelector(".colors-image.active");
|
|
51
|
+
let children = colorimages.querySelectorAll(".colors-image");
|
|
52
|
+
let firstChild = children[0];
|
|
53
|
+
if (curentImage.nextSibling != null && curentImage.nextSibling.classList != void 0 && Object.values(curentImage.nextSibling.classList).indexOf("colors-image") > -1) {
|
|
54
|
+
curentImage.style.display = "none";
|
|
55
|
+
curentImage.classList.remove("active");
|
|
56
|
+
curentImage.nextSibling.style.display = "block";
|
|
57
|
+
curentImage.nextSibling.classList.add("active");
|
|
58
|
+
const nextImageClass = Array.from(curentImage.nextSibling.classList).find((c) => c.startsWith("ColorImageIndex_"));
|
|
59
|
+
if (nextImageClass) {
|
|
60
|
+
activeImageId.value = parseInt(nextImageClass.replace("ColorImageIndex_", ""));
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
curentImage.style.display = "none";
|
|
64
|
+
curentImage.classList.remove("active");
|
|
65
|
+
firstChild.style.display = "block";
|
|
66
|
+
firstChild.classList.add("active");
|
|
67
|
+
const firstImageClass = Array.from(firstChild.classList).find((c) => c.startsWith("ColorImageIndex_"));
|
|
68
|
+
if (firstImageClass) {
|
|
69
|
+
activeImageId.value = parseInt(firstImageClass.replace("ColorImageIndex_", ""));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const PrevColorImage = (() => {
|
|
74
|
+
let colorimages = document.querySelector(".colors-images");
|
|
75
|
+
let curentImage = colorimages.querySelector(".colors-image.active");
|
|
76
|
+
let children = colorimages.querySelectorAll(".colors-image");
|
|
77
|
+
let lastChild = children[children.length - 1];
|
|
78
|
+
if (curentImage.previousSibling != null && curentImage.previousSibling.classList != void 0 && Object.values(curentImage.previousSibling.classList).indexOf("colors-image") > -1) {
|
|
79
|
+
curentImage.style.display = "none";
|
|
80
|
+
curentImage.classList.remove("active");
|
|
81
|
+
curentImage.previousSibling.style.display = "block";
|
|
82
|
+
curentImage.previousSibling.classList.add("active");
|
|
83
|
+
const prevImageClass = Array.from(curentImage.previousSibling.classList).find((c) => c.startsWith("ColorImageIndex_"));
|
|
84
|
+
if (prevImageClass) {
|
|
85
|
+
activeImageId.value = parseInt(prevImageClass.replace("ColorImageIndex_", ""));
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
curentImage.style.display = "none";
|
|
89
|
+
curentImage.classList.remove("active");
|
|
90
|
+
lastChild.style.display = "block";
|
|
91
|
+
lastChild.classList.add("active");
|
|
92
|
+
const lastImageClass = Array.from(lastChild.classList).find((c) => c.startsWith("ColorImageIndex_"));
|
|
93
|
+
if (lastImageClass) {
|
|
94
|
+
activeImageId.value = parseInt(lastImageClass.replace("ColorImageIndex_", ""));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
const get_itemsByParent = ((items, parent) => {
|
|
99
|
+
return items.filter((item) => item.parent === parent);
|
|
100
|
+
});
|
|
101
|
+
const swatchimagesSrcset = ((swatchImage) => {
|
|
102
|
+
var swatchImage = swatchImage;
|
|
103
|
+
let swatchImage150 = swatchImage.replace(/.webp/gi, "150.webp");
|
|
104
|
+
let swatchImage320 = swatchImage.replace(/.webp/gi, "320.webp");
|
|
105
|
+
let swatchImage640 = swatchImage.replace(/.webp/gi, "640.webp");
|
|
106
|
+
let swatchImage1024 = swatchImage.replace(/.webp/gi, "1024.webp");
|
|
107
|
+
return swatchImage150;
|
|
108
|
+
});
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<template>
|
|
112
|
+
<div class="swatch-attribute-wrapper swatch-style-1 row">
|
|
113
|
+
<div class="col-md-4">
|
|
114
|
+
<label class="attribute-label">
|
|
115
|
+
{{ attribute.title }}
|
|
116
|
+
<span v-if="attribute.required" class="text-danger">*</span>
|
|
117
|
+
<contentPopup :attribute="attribute" />
|
|
118
|
+
</label>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="col-md-8">
|
|
121
|
+
<div class="row g-2 attribute-values">
|
|
122
|
+
<div class="col-4" v-for="(item, index) in attribute.values" :key="item.id">
|
|
123
|
+
<div class="value-item position-relative h-100">
|
|
124
|
+
<input
|
|
125
|
+
class="swatchInput position-absolute w-100 h-100"
|
|
126
|
+
v-model="selectedValue"
|
|
127
|
+
:data-label="attribute.title"
|
|
128
|
+
@change="ChangeValue(item.id, item)"
|
|
129
|
+
:data-attributevalue="attribute.parent"
|
|
130
|
+
:required="attribute.required"
|
|
131
|
+
:data-child="item.parent"
|
|
132
|
+
:value="item.id"
|
|
133
|
+
:data-value="item.id"
|
|
134
|
+
type="radio"
|
|
135
|
+
:name="`swatch_attribute_${attribute.id}`"
|
|
136
|
+
:id="`swatch_attr_${attribute.id}_${item.id}`"
|
|
137
|
+
:checked="selectedValue === item.id"
|
|
138
|
+
/>
|
|
139
|
+
<label
|
|
140
|
+
class="value-label border h-100 d-flex flex-column align-items-center justify-content-center p-2"
|
|
141
|
+
:for="`swatch_attr_${attribute.id}_${item.id}`">
|
|
142
|
+
|
|
143
|
+
<!-- Image container with magnifier icon -->
|
|
144
|
+
<div class="image-container position-relative w-100 mb-2">
|
|
145
|
+
<!-- Magnifier icon for zoom (visible on desktop) -->
|
|
146
|
+
<svg
|
|
147
|
+
@click.stop="showColorLargeImage(item.id, item.parent)"
|
|
148
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
149
|
+
width="25"
|
|
150
|
+
height="25"
|
|
151
|
+
viewBox="0 0 512 512"
|
|
152
|
+
class="magnifier-icon position-absolute p-1 d-none d-md-block">
|
|
153
|
+
<path fill="currentColor"
|
|
154
|
+
d="M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208M208 352a144 144 0 1 0 0-288a144 144 0 1 0 0 288" />
|
|
155
|
+
</svg>
|
|
156
|
+
|
|
157
|
+
<!-- Image or color swatch display -->
|
|
158
|
+
<img v-if="item.swatch"
|
|
159
|
+
:src="swatchimagesSrcset(item.swatch)"
|
|
160
|
+
class="w-100 h-100 object-fit-contain"
|
|
161
|
+
width="100%" />
|
|
162
|
+
<div v-else-if="item.iconcolor"
|
|
163
|
+
class="swatch-iconcolor w-100 h-100"
|
|
164
|
+
:style="{ backgroundColor: item.iconcolor }"></div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<!-- Title and order sample -->
|
|
168
|
+
<span class="value-title text-center">{{ item.title }}</span>
|
|
169
|
+
<orderSample :attribute="attribute" :item="item" :group="group" />
|
|
170
|
+
</label>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<!-- Magnifier Modal/Popup -->
|
|
177
|
+
<div class="colorspopup" :class="{ 'active': magnifierShow }" v-if="magnifierShow">
|
|
178
|
+
<div class="modal-dialog modal-dialog-centered modal-lg">
|
|
179
|
+
<div class="modal-content">
|
|
180
|
+
<button @click="closeMagnifier()" type="button" class="btn-close" aria-label="Close"></button>
|
|
181
|
+
|
|
182
|
+
<div class="modal-body colors-images">
|
|
183
|
+
<div
|
|
184
|
+
v-for="(item, index) in itemsByParent"
|
|
185
|
+
:key="index"
|
|
186
|
+
:class="['colors-image', `ColorImageIndex_${item.id}`, { 'highlighted': item.id === activeImageId }]">
|
|
187
|
+
|
|
188
|
+
<!-- Large image or color display -->
|
|
189
|
+
<img v-if="item.swatch" :src="getLargeImageUrl(item)" width="100%">
|
|
190
|
+
<div v-else-if="item.iconcolor"
|
|
191
|
+
:style="{ backgroundColor: item.iconcolor }"
|
|
192
|
+
class="item-iconcolor"></div>
|
|
193
|
+
|
|
194
|
+
<!-- Image title -->
|
|
195
|
+
<div class="text-center mt-2">
|
|
196
|
+
<div class="h3 fw-bold image-title">{{ item.title }}</div>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<!-- Navigation buttons -->
|
|
202
|
+
<div class="colorImagesNav">
|
|
203
|
+
<button @click="prevImage()" type="button">
|
|
204
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24">
|
|
205
|
+
<path fill="currentColor"
|
|
206
|
+
d="m10.8 12l3.9 3.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-4.6-4.6q-.15-.15-.212-.325T8.425 12t.063-.375t.212-.325l4.6-4.6q.275-.275.7-.275t.7.275t.275.7t-.275.7z" />
|
|
207
|
+
</svg>
|
|
208
|
+
</button>
|
|
209
|
+
<button @click="nextImage()" type="button">
|
|
210
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24">
|
|
211
|
+
<path fill="currentColor"
|
|
212
|
+
d="M12.6 12L8.7 8.1q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.6 4.6q.15.15.213.325t.062.375t-.062.375t-.213.325l-4.6 4.6q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7z" />
|
|
213
|
+
</svg>
|
|
214
|
+
</button>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</template>
|
package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/swatch.vue.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
attribute?: Record<string, any> | undefined;
|
|
6
|
+
group?: Record<string, any> | undefined;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly attribute?: Record<string, any> | undefined;
|
|
10
|
+
readonly group?: Record<string, any> | undefined;
|
|
11
|
+
};
|
package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.d.vue.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
attribute?: any;
|
|
6
|
+
group?: any;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly attribute?: any;
|
|
10
|
+
readonly group?: any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineProps, ref } from "vue";
|
|
3
|
+
import contentPopup from "../PopupContent/Popup.vue";
|
|
4
|
+
const CustomScript = useCustomeScriptDynamic();
|
|
5
|
+
const { attribute, group } = defineProps(["attribute", "group"]);
|
|
6
|
+
const { script } = useSingleValue(attribute);
|
|
7
|
+
const SelecteValue = ref(attribute.value);
|
|
8
|
+
const ChangeValue = ((value) => {
|
|
9
|
+
const emojiRegex = /[\p{Emoji_Presentation}\p{Extended_Pictographic}]|&#\d+;/gu;
|
|
10
|
+
value = value.replace(emojiRegex, "");
|
|
11
|
+
SelecteValue.value = value;
|
|
12
|
+
const aid = attribute.id;
|
|
13
|
+
const gid = group.id;
|
|
14
|
+
const vid = value;
|
|
15
|
+
CustomScript.SelectedOptions = { aid, gid, vid };
|
|
16
|
+
CustomScript.initprocess();
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<div id="i3g6pg" class="text-attribute-wrapper">
|
|
22
|
+
<div id="isw7vv" class="text-attribute-wrapper label-top">
|
|
23
|
+
|
|
24
|
+
<label id="i2ocof" class="attribute-label">
|
|
25
|
+
Text
|
|
26
|
+
<span id="inumny" class="required-mark">*</span>
|
|
27
|
+
</label>
|
|
28
|
+
|
|
29
|
+
<div id="itcvde" class="input-group">
|
|
30
|
+
|
|
31
|
+
<span id="ixrpwf" class="input-icon d-none">
|
|
32
|
+
<img id="iuj7gz" alt="Text" width="25">
|
|
33
|
+
</span>
|
|
34
|
+
|
|
35
|
+
<input
|
|
36
|
+
id="attribute_text_value"
|
|
37
|
+
type="text"
|
|
38
|
+
name="attribute_id[text]"
|
|
39
|
+
placeholder="Enter text"
|
|
40
|
+
required="required"
|
|
41
|
+
class="text-input"
|
|
42
|
+
>
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/text.vue.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
attribute?: any;
|
|
6
|
+
group?: any;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly attribute?: any;
|
|
10
|
+
readonly group?: any;
|
|
11
|
+
};
|
package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.d.vue.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof props>;
|
|
5
|
+
attribute?: Record<string, any> | undefined;
|
|
6
|
+
group?: Record<string, any> | undefined;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const props: {
|
|
9
|
+
readonly attribute?: Record<string, any> | undefined;
|
|
10
|
+
readonly group?: Record<string, any> | undefined;
|
|
11
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineProps, ref, defineAsyncComponent, onMounted, watch } from "vue";
|
|
3
|
+
import contentPopup from "../PopupContent/Popup.vue";
|
|
4
|
+
const CustomScript = useCustomScript();
|
|
5
|
+
const props = defineProps({ "attribute": Object, "group": Object });
|
|
6
|
+
const { script } = useSingleValue(props.attribute);
|
|
7
|
+
const SelecteValue = ref(props.attribute.value);
|
|
8
|
+
const correctValue = ref(true);
|
|
9
|
+
const userModified = ref(false);
|
|
10
|
+
const ChangeValue = ((value) => {
|
|
11
|
+
SelecteValue.value = Math.floor(Number(value));
|
|
12
|
+
value = Math.floor(Number(value));
|
|
13
|
+
correctValue.value = true;
|
|
14
|
+
if (SelecteValue.value < props.attribute.min) {
|
|
15
|
+
correctValue.value = false;
|
|
16
|
+
} else if (SelecteValue.value > props.attribute.max) {
|
|
17
|
+
correctValue.value = false;
|
|
18
|
+
} else {
|
|
19
|
+
const aid = props.attribute.id;
|
|
20
|
+
const gid = props.group.id;
|
|
21
|
+
const vid = value;
|
|
22
|
+
CustomScript.SelectedOptions = { aid, gid, vid };
|
|
23
|
+
CustomScript.initprocess();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const getDefaultValue = () => {
|
|
27
|
+
return props.attribute.value;
|
|
28
|
+
};
|
|
29
|
+
const handleBlur = () => {
|
|
30
|
+
if (!SelecteValue.value || SelecteValue.value.trim() === "") {
|
|
31
|
+
if (!userModified.value || SelecteValue.value === "") {
|
|
32
|
+
SelecteValue.value = getDefaultValue();
|
|
33
|
+
const realValue = props.attribute.value;
|
|
34
|
+
ChangeValue(realValue);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const onInputFocus = () => {
|
|
39
|
+
userModified.value = true;
|
|
40
|
+
if (SelecteValue.value == getDefaultValue()) {
|
|
41
|
+
SelecteValue.value = "";
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
SelecteValue.value = getDefaultValue();
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<div data-gjs-type="product-attribute-width" class="width-attribute-wrapper" :class="{ 'gjs-selected': false }">
|
|
51
|
+
<div class="width-attribute-wrapper label-top row align-items-center">
|
|
52
|
+
<div class="col-md-4">
|
|
53
|
+
<label class="attribute-label">
|
|
54
|
+
{{ attribute.title }}
|
|
55
|
+
<span v-if="attribute.required" class="required-mark text-danger">*</span>
|
|
56
|
+
<contentPopup :attribute="attribute" />
|
|
57
|
+
</label>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="col-md-8">
|
|
60
|
+
<small class="min-max-text" :class="{ 'd-none': !attribute.min && !attribute.max }">
|
|
61
|
+
Min {{ attribute.min }}mm. Max {{ attribute.max }}mm
|
|
62
|
+
</small>
|
|
63
|
+
<div class="input-group d-flex align-items-stretch">
|
|
64
|
+
<span class="input-icon" :class="{ 'd-none': !attribute.swatch }">
|
|
65
|
+
<span class="input-group-text h-100">
|
|
66
|
+
<img :src="attribute.swatch" :alt="attribute.title" width="28">
|
|
67
|
+
</span>
|
|
68
|
+
</span>
|
|
69
|
+
<input :id="`attribute_${attribute.id}_value`" type="text" :name="`attribute_id[${attribute.id}]`"
|
|
70
|
+
:placeholder="attribute.placeholder || '1000'" :required="attribute.required"
|
|
71
|
+
class="width-input form-control mainwidthInput" :data-label="attribute.title" v-model="SelecteValue"
|
|
72
|
+
@change="ChangeValue(SelecteValue)" @focus="onInputFocus" @blur="handleBlur"
|
|
73
|
+
:data-attributevalue="attribute.parent" :data-child="attribute.parent" :data-value="attribute.id"
|
|
74
|
+
:data-title="attribute.title" onkeypress="return event.charCode >= 48 && event.charCode <= 57"
|
|
75
|
+
oninput="this.value = this.value.replace(/[^0-9]/g, '')"
|
|
76
|
+
:class="{ 'text-muted': !userModified && SelecteValue == getDefaultValue() }" />
|
|
77
|
+
<span class="input-unit input-group-append">
|
|
78
|
+
<span class="input-group-text h-100">mm</span>
|
|
79
|
+
</span>
|
|
80
|
+
</div>
|
|
81
|
+
<p v-if="correctValue == false" class="error-message text-danger small d-flex justify-content-end mt-1">
|
|
82
|
+
Should be greater than {{ attribute.min }}mm and less than {{ attribute.max }}mm
|
|
83
|
+
</p>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<style scoped>
|
|
90
|
+
.text-muted{opacity:.8}
|
|
91
|
+
</style>
|
package/dist/runtime/components/product/customProduct/AttributesComponents/Styles/width.vue.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
4
|
+
$props: Partial<typeof props>;
|
|
5
|
+
attribute?: Record<string, any> | undefined;
|
|
6
|
+
group?: Record<string, any> | undefined;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const props: {
|
|
9
|
+
readonly attribute?: Record<string, any> | undefined;
|
|
10
|
+
readonly group?: Record<string, any> | undefined;
|
|
11
|
+
};
|
|
@@ -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
|
+
message?: 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 message?: any;
|
|
9
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const { message } = defineProps(["message"]);
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="confirmPopup">
|
|
7
|
+
<div class="confirmPopup_body overflow-hidden pb-4 rounded-4 p-0">
|
|
8
|
+
<div class="bg-secondary py-3 px-4 text-white fs-3 mb-4">With this selection following selections will be changed Control Type:</div>
|
|
9
|
+
<ul class="px-4">
|
|
10
|
+
<li class="d-flex align-items-center gap-3" v-for="msg in message">
|
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M4 12h12.25L11 6.75l.66-.75l6.5 6.5l-6.5 6.5l-.66-.75L16.25 13H4z"/></svg>
|
|
12
|
+
{{msg}}
|
|
13
|
+
</li>
|
|
14
|
+
</ul>
|
|
15
|
+
<div class="popupbuttons mt-5 gap-5 d-flex justify-content-center align-items-center">
|
|
16
|
+
<span id="ChangeAttributeNo" class="seconday-btn">Cancele</span>
|
|
17
|
+
<button id="ChangeAttributeYes" class="orange-btn">Confirm</button>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
.confirmPopup{align-items:center;background:rgba(0,0,0,.11);display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:9999999}.confirmPopup .confirmPopup_body{background:#fff;width:40%}
|
|
25
|
+
</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
|
+
message?: 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 message?: any;
|
|
9
|
+
};
|
|
@@ -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
|
+
fields?: 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 fields?: any;
|
|
9
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const { fields } = defineProps(["fields"]);
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div>
|
|
7
|
+
<div class="modals modal">
|
|
8
|
+
<div class="modal-dialog modal-sm modal-dialog-centered opacity-100">
|
|
9
|
+
<div class="modal-content">
|
|
10
|
+
<div class="modal-header">
|
|
11
|
+
<h4 class="modal-title text-start fs-4 fw-bold">Please provide the missing information before adding to the cart.</h4>
|
|
12
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" @click="$emit('closeRequried')" aria-label="Close"></button>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="modal-body">
|
|
15
|
+
<p class="text-danger text-start" v-for="(field,key) in fields">{{ key+1 }}) <b>{{ field.name }}</b></p>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="modal-footer">
|
|
18
|
+
<button type="button" class="btn btn-secondary btn-lg text-white" @click="$emit('closeRequried')" data-bs-dismiss="modal">Close</button>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<style scoped>
|
|
27
|
+
.modal {
|
|
28
|
+
z-index: 9999909999;
|
|
29
|
+
background-color: rgba(51, 51, 51, 0.55);
|
|
30
|
+
width: 100vw;
|
|
31
|
+
height: 100vh;
|
|
32
|
+
display: flex;
|
|
33
|
+
}
|
|
34
|
+
.modal .modal-dialog {
|
|
35
|
+
max-width: 700px;
|
|
36
|
+
width: 50%;
|
|
37
|
+
}
|
|
38
|
+
.modal .modal-dialog .image {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 88px;
|
|
41
|
+
object-fit: cover;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media only screen and (max-width: 768px) {
|
|
45
|
+
.modal-dialog {
|
|
46
|
+
width: 100% !important;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</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
|
+
fields?: 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 fields?: any;
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
reviews?: any;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
reviews?: any;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps(["reviews"]);
|
|
3
|
+
const reviewCount = computed(() => {
|
|
4
|
+
return props.reviews?.length || 0;
|
|
5
|
+
});
|
|
6
|
+
const averageRating = computed(() => {
|
|
7
|
+
if (!props.reviews || props.reviews.length === 0) return 0;
|
|
8
|
+
const sum = props.reviews.reduce((acc, review) => acc + (review.rating || 0), 0);
|
|
9
|
+
const average = sum / props.reviews.length;
|
|
10
|
+
return average.toFixed(1);
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="d-flex flex-row-reverse justify-content-end d-xl-block gap-1 mt-4 mt-xl-0">
|
|
16
|
+
<div class="review-from">{{ averageRating }} from</div>
|
|
17
|
+
<a href="#reviews" class="reviews-count d-block order-first order-xl-last text-decoration-none">{{ reviewCount }} Reviews</a>
|
|
18
|
+
<span v-for="n in 5" :key="n" class="text-secondary">
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
20
|
+
<path fill="currentColor"
|
|
21
|
+
d="m7.325 18.923l1.24-5.313l-4.123-3.572l5.431-.47L12 4.557l2.127 5.01l5.43.47l-4.123 3.572l1.241 5.313L12 16.102z" />
|
|
22
|
+
</svg>
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
reviews?: any;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
reviews?: any;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
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?: Record<string, any> | undefined;
|
|
6
|
+
group?: Record<string, any> | undefined;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly product?: Record<string, any> | undefined;
|
|
10
|
+
readonly group?: Record<string, any> | undefined;
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineProps } from "vue";
|
|
3
|
+
const { group, product } = defineProps({ "group": Object, "product": Object });
|
|
4
|
+
const { useCustomScript, SingleAttribute } = useSingleStepDynamic(group, product.template);
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<template v-for="attribute in group.attributes">
|
|
9
|
+
<component :is="SingleAttribute" :product :group="group" :attribute="attribute" />
|
|
10
|
+
</template>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
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?: Record<string, any> | undefined;
|
|
6
|
+
group?: Record<string, any> | undefined;
|
|
7
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
declare const __VLS_props: {
|
|
9
|
+
readonly product?: Record<string, any> | undefined;
|
|
10
|
+
readonly group?: Record<string, any> | undefined;
|
|
11
|
+
};
|
|
@@ -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?: Record<string, any> | undefined;
|
|
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?: Record<string, any> | undefined;
|
|
9
|
+
};
|