flowrix 1.0.1-beta.152 → 1.0.1-beta.154
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/DynamicComponents/SubscriptionForm.d.vue.ts +3 -0
- package/dist/runtime/components/DynamicComponents/SubscriptionForm.vue +60 -0
- package/dist/runtime/components/DynamicComponents/SubscriptionForm.vue.d.ts +3 -0
- package/dist/runtime/components/DynamicComponents/WebForm.d.vue.ts +7 -0
- package/dist/runtime/components/DynamicComponents/WebForm.vue +115 -0
- package/dist/runtime/components/DynamicComponents/WebForm.vue.d.ts +7 -0
- package/dist/runtime/components/Pages/dynamic.d.vue.ts +7 -0
- package/dist/runtime/components/Pages/dynamic.vue +124 -0
- package/dist/runtime/components/Pages/dynamic.vue.d.ts +7 -0
- package/dist/runtime/components/Pages/index.d.vue.ts +7 -0
- package/dist/runtime/components/Pages/index.vue +214 -0
- package/dist/runtime/components/Pages/index.vue.d.ts +7 -0
- package/dist/runtime/components/{product → Product}/Dynamic.vue +3 -3
- package/dist/runtime/components/{product → Product}/index.vue +1 -3
- package/dist/runtime/components/Types/brand/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/brand/index.vue +12 -0
- package/dist/runtime/components/Types/brand/index.vue.d.ts +6 -0
- package/dist/runtime/components/Types/category/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/category/index.vue +50 -0
- package/dist/runtime/components/Types/category/index.vue.d.ts +6 -0
- package/dist/runtime/components/Types/dynamic.d.vue.ts +7 -0
- package/dist/runtime/components/Types/dynamic.vue +160 -0
- package/dist/runtime/components/Types/dynamic.vue.d.ts +7 -0
- package/dist/runtime/components/Types/page/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/page/index.vue +51 -0
- package/dist/runtime/components/Types/page/index.vue.d.ts +6 -0
- package/dist/runtime/components/Types/post/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/post/index.vue +51 -0
- package/dist/runtime/components/Types/post/index.vue.d.ts +6 -0
- package/dist/runtime/components/Types/product/index.d.vue.ts +6 -0
- package/dist/runtime/components/Types/product/index.vue +10 -0
- package/dist/runtime/components/Types/product/index.vue.d.ts +6 -0
- package/dist/runtime/composables/Checkout/useCheckout.js +8 -0
- package/dist/runtime/composables/Product/useQuickView.js +3 -4
- package/dist/runtime/pages/flowrix-default.vue +24 -9
- package/dist/runtime/plugins/bootstrap.client.d.ts +1 -0
- package/dist/runtime/plugins/bootstrap.client.js +2 -7
- package/dist/runtime/server/api/quickview/[slug].js +5 -3
- package/dist/runtime/stores/Checkout.js +8 -5
- package/package.json +2 -1
- /package/dist/runtime/components/{product → Product}/AddToCart.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/AddToCart.vue +0 -0
- /package/dist/runtime/components/{product → Product}/AddToCart.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/AddtoCartSample.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/AddtoCartSample.vue +0 -0
- /package/dist/runtime/components/{product → Product}/AddtoCartSample.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Badges.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Badges.vue +0 -0
- /package/dist/runtime/components/{product → Product}/Badges.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Description.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Description.vue +0 -0
- /package/dist/runtime/components/{product → Product}/Description.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Dynamic.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Dynamic.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Gallery.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/Gallery.vue +0 -0
- /package/dist/runtime/components/{product → Product}/Gallery.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/PopUpCart.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/PopUpCart.vue +0 -0
- /package/dist/runtime/components/{product → Product}/PopUpCart.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/ProductInfo.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/ProductInfo.vue +0 -0
- /package/dist/runtime/components/{product → Product}/ProductInfo.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/RequiredPopUp.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/RequiredPopUp.vue +0 -0
- /package/dist/runtime/components/{product → Product}/RequiredPopUp.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/bundleProduct/Bundle.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/bundleProduct/Bundle.vue +0 -0
- /package/dist/runtime/components/{product → Product}/bundleProduct/Bundle.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/bundleProduct/index.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/bundleProduct/index.vue +0 -0
- /package/dist/runtime/components/{product → Product}/bundleProduct/index.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AddtoCartSample.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AddtoCartSample.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AddtoCartSample.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Attributes.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Attributes.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Attributes.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/drop-down.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/drop-down.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/drop-down.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-collection.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-collection.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-collection.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-colors.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-colors.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-colors.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-values.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-values.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/multi-values.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/style.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/style.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/style.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/swatch.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/swatch.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/AttributeType/swatch.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/PopupContent/Popup.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/PopupContent/Popup.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/PopupContent/Popup.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/SingleAttribute.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/SingleAttribute.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/SingleAttribute.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/SingleSlide.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/SingleSlide.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/SingleSlide.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/SingleSlidemagnifier.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/button.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/button.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/button.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/dropdown.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/dropdown.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/dropdown.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/dropdownWithIcon.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/dropdownWithIcon.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/height.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/height.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/height.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/imageBox.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/imageBox.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/imageBox.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/imageBoxWithMagnifier.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/message.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/message.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/message.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/number.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/number.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/number.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/orderSample/button.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/orderSample/button.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/orderSample/button.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/radio.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/radio.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/radio.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/slider.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/slider.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/slider.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/sliderWithMagnifier.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/sliderWithMagnifier.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/subheight.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/subheight.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/subheight.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/subwidth.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/subwidth.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/subwidth.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/swatch.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/swatch.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/swatch.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/text.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/text.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/text.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/width.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/width.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/AttributesComponents/Styles/width.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/ConfirmPopup.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/ConfirmPopup.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/ConfirmPopup.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/RequiredPopUp.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/RequiredPopUp.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/RequiredPopUp.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Reviews.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Reviews.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Reviews.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/SingleStep.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/SingleStep.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/SingleStep.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Steps.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Steps.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/Steps.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/index.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/index.vue +0 -0
- /package/dist/runtime/components/{product → Product}/customProduct/index.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/index.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/index.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/ProductVariation.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/ProductVariation.vue +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/ProductVariation.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/SampleDetails.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/SampleDetails.vue +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/SampleDetails.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/SampleFeatures.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/SampleFeatures.vue +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/SampleFeatures.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/index.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/index.vue +0 -0
- /package/dist/runtime/components/{product → Product}/sampleProduct/index.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/simpleProduct/ProductVariation.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/simpleProduct/ProductVariation.vue +0 -0
- /package/dist/runtime/components/{product → Product}/simpleProduct/ProductVariation.vue.d.ts +0 -0
- /package/dist/runtime/components/{product → Product}/simpleProduct/index.d.vue.ts +0 -0
- /package/dist/runtime/components/{product → Product}/simpleProduct/index.vue +0 -0
- /package/dist/runtime/components/{product → Product}/simpleProduct/index.vue.d.ts +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
4
|
+
import { useHead } from "#app";
|
|
5
|
+
const route = useRoute();
|
|
6
|
+
const slug = route.params.slug || "home";
|
|
7
|
+
const DynamicComponent = defineAsyncComponent(() => import("../dynamic.vue"));
|
|
8
|
+
const { data: fetchData, error } = await useFetch(`/api/category/${slug}`, {});
|
|
9
|
+
defineProps({
|
|
10
|
+
data: { type: null, required: true }
|
|
11
|
+
});
|
|
12
|
+
const fullPath = ((fullUrl = "") => {
|
|
13
|
+
if (process.server) {
|
|
14
|
+
const headers = useRequestHeaders();
|
|
15
|
+
const protocol = headers["x-forwarded-proto"] || "http";
|
|
16
|
+
const host = headers.host || "localhost";
|
|
17
|
+
fullUrl = `${protocol}://${host}${route.fullPath}`;
|
|
18
|
+
} else {
|
|
19
|
+
fullUrl = `${window.location.origin}${route.fullPath}`;
|
|
20
|
+
}
|
|
21
|
+
return fullUrl;
|
|
22
|
+
});
|
|
23
|
+
useHead({
|
|
24
|
+
title: fetchData.value?.data?.meta_title || "",
|
|
25
|
+
meta: [
|
|
26
|
+
{
|
|
27
|
+
name: "description",
|
|
28
|
+
content: fetchData.value?.data?.meta_description || ""
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "og:title",
|
|
32
|
+
content: fetchData.value?.data?.meta_title || ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "og:description",
|
|
36
|
+
content: fetchData.value?.data?.meta_description || ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "og:url",
|
|
40
|
+
content: fullPath()
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<div class="post-wraper">
|
|
48
|
+
<DynamicComponent :data="data.content"/>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: 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,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
data?: any;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
data?: any;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, onMounted, nextTick, defineAsyncComponent } from "vue";
|
|
3
|
+
import { createApp, h } from "vue";
|
|
4
|
+
import { useRoute } from "vue-router";
|
|
5
|
+
import { useHead } from "#app";
|
|
6
|
+
const route = useRoute();
|
|
7
|
+
const slug = route.params.slug || "";
|
|
8
|
+
const { data } = defineProps(["data"]);
|
|
9
|
+
const grapeContainer = ref(null);
|
|
10
|
+
const WebForm = defineAsyncComponent(
|
|
11
|
+
() => import("../DynamicComponents/WebForm.vue")
|
|
12
|
+
);
|
|
13
|
+
const SubscriptionForm = defineAsyncComponent(
|
|
14
|
+
() => import("../DynamicComponents/SubscriptionForm.vue")
|
|
15
|
+
);
|
|
16
|
+
onMounted(async () => {
|
|
17
|
+
await nextTick();
|
|
18
|
+
const container = grapeContainer.value;
|
|
19
|
+
if (!container) return;
|
|
20
|
+
container.innerHTML = data?.html || '<div class="container text-center fs-4">No content Found</div>';
|
|
21
|
+
const formDivs = container.querySelectorAll("div[form_id]");
|
|
22
|
+
formDivs.forEach((el) => {
|
|
23
|
+
const formId = el.getAttribute("form_id");
|
|
24
|
+
if (!formId) return;
|
|
25
|
+
const mountEl = document.createElement("div");
|
|
26
|
+
el.replaceWith(mountEl);
|
|
27
|
+
createApp({
|
|
28
|
+
render() {
|
|
29
|
+
return h(WebForm, {
|
|
30
|
+
form_id: formId
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}).mount(mountEl);
|
|
34
|
+
});
|
|
35
|
+
const subscriptionForms = container.querySelectorAll("[subscription_form], .orix-subscription-form");
|
|
36
|
+
subscriptionForms.forEach((el) => {
|
|
37
|
+
const mountEl = document.createElement("div");
|
|
38
|
+
el.replaceWith(mountEl);
|
|
39
|
+
createApp({
|
|
40
|
+
render() {
|
|
41
|
+
return h(SubscriptionForm);
|
|
42
|
+
}
|
|
43
|
+
}).mount(mountEl);
|
|
44
|
+
});
|
|
45
|
+
const scripts = container.querySelectorAll("script");
|
|
46
|
+
console.log("scripts", scripts);
|
|
47
|
+
scripts.forEach((oldScript) => {
|
|
48
|
+
const newScript = document.createElement("script");
|
|
49
|
+
for (const attr of oldScript.attributes) {
|
|
50
|
+
newScript.setAttribute(attr.name, attr.value);
|
|
51
|
+
}
|
|
52
|
+
newScript.textContent = oldScript.textContent;
|
|
53
|
+
oldScript.parentNode?.replaceChild(newScript, oldScript);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
onMounted(async () => {
|
|
57
|
+
await nextTick();
|
|
58
|
+
const sections = document.querySelectorAll("[id]");
|
|
59
|
+
let activeLink = null;
|
|
60
|
+
const observer = new IntersectionObserver(
|
|
61
|
+
(entries) => {
|
|
62
|
+
entries.forEach((entry) => {
|
|
63
|
+
if (!entry.isIntersecting) return;
|
|
64
|
+
const id = entry.target.id;
|
|
65
|
+
const link = document.querySelector(`a[href="#${id}"]`);
|
|
66
|
+
if (!link) return;
|
|
67
|
+
if (activeLink && activeLink !== link) {
|
|
68
|
+
activeLink.style.backgroundColor = "";
|
|
69
|
+
activeLink.style.color = "";
|
|
70
|
+
}
|
|
71
|
+
link.style.backgroundColor = "rgb(0, 82, 137)";
|
|
72
|
+
link.style.color = "#ffffff";
|
|
73
|
+
activeLink = link;
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
threshold: 0.4
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
sections.forEach((section) => observer.observe(section));
|
|
81
|
+
});
|
|
82
|
+
function scopeCss(css, scope = ".dynamicContent") {
|
|
83
|
+
return css.replace(
|
|
84
|
+
/(^|})\s*([^@}{]+)\s*\{/g,
|
|
85
|
+
(match, brace, selector) => {
|
|
86
|
+
if (selector.trim().startsWith("@")) {
|
|
87
|
+
return `${brace} ${selector} {`;
|
|
88
|
+
}
|
|
89
|
+
const scopedSelector = selector.split(",").map((sel) => {
|
|
90
|
+
sel = sel.trim();
|
|
91
|
+
if (sel.startsWith(scope)) return sel;
|
|
92
|
+
sel = sel.replace(/^body\b/, "").replace(/^html\b/, "").replace(/^\*/, "").trim();
|
|
93
|
+
return sel ? `${scope} ${sel}` : scope;
|
|
94
|
+
}).join(", ");
|
|
95
|
+
return `${brace} ${scopedSelector} {`;
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
useHead(() => {
|
|
100
|
+
const css = data?.css || "";
|
|
101
|
+
const globalcss = data?.globalstyles?.globalCSS || "";
|
|
102
|
+
if (!css) return {};
|
|
103
|
+
return {
|
|
104
|
+
style: [
|
|
105
|
+
{
|
|
106
|
+
innerHTML: scopeCss(css),
|
|
107
|
+
id: "scoped-css",
|
|
108
|
+
type: "text/css",
|
|
109
|
+
tagPosition: "bodyClose"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
innerHTML: globalcss,
|
|
113
|
+
id: "global-css",
|
|
114
|
+
type: "text/css",
|
|
115
|
+
tagPosition: "bodyClose"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<template>
|
|
123
|
+
<div class="dynamicContent">
|
|
124
|
+
<div ref="grapeContainer"></div>
|
|
125
|
+
</div>
|
|
126
|
+
</template>
|
|
127
|
+
|
|
128
|
+
<style scoped>
|
|
129
|
+
:deep() .gjs-cell {
|
|
130
|
+
flex-grow: unset !important;
|
|
131
|
+
flex-basis: unset !important;
|
|
132
|
+
}
|
|
133
|
+
:deep() .accordion-button:not(.collapsed) {
|
|
134
|
+
background: none !important;
|
|
135
|
+
background-color: none !important;
|
|
136
|
+
color: unset !important;
|
|
137
|
+
font-weight: 500 !important;
|
|
138
|
+
}
|
|
139
|
+
:deep() .accordion-button:focus {
|
|
140
|
+
outline: none !important;
|
|
141
|
+
box-shadow: none !important;
|
|
142
|
+
}
|
|
143
|
+
:deep() .accordion-item {
|
|
144
|
+
margin: 20px 0;
|
|
145
|
+
border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color) !important;
|
|
146
|
+
}
|
|
147
|
+
:deep() .accordion-header {
|
|
148
|
+
border-bottom: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color) !important;
|
|
149
|
+
}
|
|
150
|
+
:deep() {
|
|
151
|
+
/* Scroll offset for anchor links - prevents content from hiding behind fixed header */
|
|
152
|
+
}
|
|
153
|
+
:deep() [id] {
|
|
154
|
+
scroll-margin-top: 150px;
|
|
155
|
+
}
|
|
156
|
+
</style>
|
|
157
|
+
|
|
158
|
+
<style>
|
|
159
|
+
.dynamicContent .accordion .accordion-button.collapsed{background-color:unset!important}.dynamicContent .accordion .accordion-button:not(.collapsed){background-color:unset!important;box-shadow:unset!important;color:unset!important;font-weight:500!important}
|
|
160
|
+
</style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
2
|
+
data?: any;
|
|
3
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
4
|
+
data?: any;
|
|
5
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: 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,51 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
4
|
+
import { useHead } from "#app";
|
|
5
|
+
const route = useRoute();
|
|
6
|
+
const slug = route.params.slug || "home";
|
|
7
|
+
const DynamicComponent = defineAsyncComponent(() => import("../dynamic.vue"));
|
|
8
|
+
const { data: fetchData, error } = await useFetch(`/api/page/${slug}`, {});
|
|
9
|
+
defineProps({
|
|
10
|
+
data: { type: null, required: true }
|
|
11
|
+
});
|
|
12
|
+
const fullPath = ((fullUrl = "") => {
|
|
13
|
+
if (process.server) {
|
|
14
|
+
const headers = useRequestHeaders();
|
|
15
|
+
const protocol = headers["x-forwarded-proto"] || "http";
|
|
16
|
+
const host = headers.host || "localhost";
|
|
17
|
+
fullUrl = `${protocol}://${host}${route.fullPath}`;
|
|
18
|
+
} else {
|
|
19
|
+
fullUrl = `${window.location.origin}${route.fullPath}`;
|
|
20
|
+
}
|
|
21
|
+
return fullUrl;
|
|
22
|
+
});
|
|
23
|
+
useHead({
|
|
24
|
+
title: fetchData.value?.data?.meta_title || pageData?.data?.meta_title,
|
|
25
|
+
meta: [
|
|
26
|
+
{
|
|
27
|
+
name: "description",
|
|
28
|
+
content: fetchData.value?.data?.meta_description || pageData?.data?.meta_description
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "og:title",
|
|
32
|
+
content: fetchData.value?.data?.meta_title || pageData?.data?.meta_title
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "og:description",
|
|
36
|
+
content: fetchData.value?.data?.meta_description || pageData?.data?.meta_description
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "og:url",
|
|
40
|
+
content: fullPath()
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<!-- <pre>{{ fetchData.data.content }}</pre> -->
|
|
48
|
+
<div class="page-wraper">
|
|
49
|
+
<DynamicComponent :data="fetchData.data.content"/>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: 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,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: 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,51 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
import { useRoute } from "vue-router";
|
|
4
|
+
import { useHead } from "#app";
|
|
5
|
+
const route = useRoute();
|
|
6
|
+
const slug = route.params.slug || "home";
|
|
7
|
+
const DynamicComponent = defineAsyncComponent(() => import("../dynamic.vue"));
|
|
8
|
+
const { data: fetchData, error } = await useFetch(`/api/cmspost/${slug}`, {});
|
|
9
|
+
defineProps({
|
|
10
|
+
data: { type: null, required: true }
|
|
11
|
+
});
|
|
12
|
+
const fullPath = ((fullUrl = "") => {
|
|
13
|
+
if (process.server) {
|
|
14
|
+
const headers = useRequestHeaders();
|
|
15
|
+
const protocol = headers["x-forwarded-proto"] || "http";
|
|
16
|
+
const host = headers.host || "localhost";
|
|
17
|
+
fullUrl = `${protocol}://${host}${route.fullPath}`;
|
|
18
|
+
} else {
|
|
19
|
+
fullUrl = `${window.location.origin}${route.fullPath}`;
|
|
20
|
+
}
|
|
21
|
+
return fullUrl;
|
|
22
|
+
});
|
|
23
|
+
useHead({
|
|
24
|
+
title: fetchData.value?.data?.meta_title || "",
|
|
25
|
+
meta: [
|
|
26
|
+
{
|
|
27
|
+
name: "description",
|
|
28
|
+
content: fetchData.value?.data?.meta_description || ""
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: "og:title",
|
|
32
|
+
content: fetchData.value?.data?.meta_title || ""
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "og:description",
|
|
36
|
+
content: fetchData.value?.data?.meta_description || ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "og:url",
|
|
40
|
+
content: fullPath()
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<!-- <pre>{{ fetchData.data.content }}</pre> -->
|
|
48
|
+
<div class="post-wraper">
|
|
49
|
+
<DynamicComponent :data="fetchData.data.content"/>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: 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,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: 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,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
data: 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;
|
|
@@ -31,6 +31,9 @@ export default function() {
|
|
|
31
31
|
const cartItems = checkoutStore.config;
|
|
32
32
|
return cartItems;
|
|
33
33
|
});
|
|
34
|
+
const quote_number = computed(() => route.query?.quote_number || "");
|
|
35
|
+
const quote_expires = computed(() => route.query?.expires || "");
|
|
36
|
+
const quote_signature = computed(() => route.query?.signature || "");
|
|
34
37
|
const abndToken = cartStore.cart.abndToken;
|
|
35
38
|
const vouchercode = cartStore.cart.code;
|
|
36
39
|
const sessiondata = computed(() => checkoutStore.checkoutSession);
|
|
@@ -86,6 +89,11 @@ export default function() {
|
|
|
86
89
|
till_expiryyear: "",
|
|
87
90
|
save_card_details: 0
|
|
88
91
|
});
|
|
92
|
+
if (quote_number.value != "" && quote_expires.value != "" && quote_signature.value != "") {
|
|
93
|
+
inputData.value.quote_number = quote_number.value || "";
|
|
94
|
+
inputData.value.expires = quote_expires.value || "";
|
|
95
|
+
inputData.value.signature = quote_signature.value || "";
|
|
96
|
+
}
|
|
89
97
|
const updateUserFieldsIfuserLogin = (async (sameasbilling = false) => {
|
|
90
98
|
if (isAuthenticated) {
|
|
91
99
|
const billingAddres = user?.addresses?.filter((address) => address.billing == 1)[0];
|
|
@@ -4,8 +4,6 @@ export const useQuickView = (slug) => {
|
|
|
4
4
|
const { data, error, refresh, execute, pending } = useFetch(
|
|
5
5
|
`/api/quickview/${slug}`,
|
|
6
6
|
{
|
|
7
|
-
method: "POST",
|
|
8
|
-
body: { slug },
|
|
9
7
|
lazy: true,
|
|
10
8
|
server: false,
|
|
11
9
|
default: () => null
|
|
@@ -20,8 +18,9 @@ export const useQuickView = (slug) => {
|
|
|
20
18
|
};
|
|
21
19
|
};
|
|
22
20
|
export const useSendQuickValues = async (attributes, slug) => {
|
|
21
|
+
let query = {};
|
|
22
|
+
query["body"] = attributes;
|
|
23
23
|
return await $fetch(`/api/quickview/${slug}`, {
|
|
24
|
-
|
|
25
|
-
body: attributes
|
|
24
|
+
query
|
|
26
25
|
});
|
|
27
26
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useRoute } from "vue-router";
|
|
3
|
-
import { defineAsyncComponent } from "vue";
|
|
3
|
+
import { defineAsyncComponent, computed } from "vue";
|
|
4
|
+
const DynamicContent = defineAsyncComponent(() => import("../components/Types/dynamic.vue"));
|
|
4
5
|
const route = useRoute();
|
|
5
6
|
const slug = route.params.slug || "home";
|
|
6
|
-
const { data, error
|
|
7
|
+
const { data, error } = await useFetch(`/api/v2/${slug}`);
|
|
7
8
|
const redirectPage = (async (redirectData) => {
|
|
8
9
|
return navigateTo(`/${redirectData.target}`, { redirectCode: redirectData.status_code || 404 });
|
|
9
10
|
});
|
|
@@ -21,6 +22,15 @@ useHead({
|
|
|
21
22
|
}
|
|
22
23
|
]
|
|
23
24
|
});
|
|
25
|
+
const DynamicComponent = computed(() => {
|
|
26
|
+
const type = data.value?.data?.type;
|
|
27
|
+
if (!type || type === "redirect") {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return defineAsyncComponent(
|
|
31
|
+
() => import(`../components/Types/${type}/index.vue`).catch(() => import("./404.vue"))
|
|
32
|
+
);
|
|
33
|
+
});
|
|
24
34
|
const NotFoundComponent = defineAsyncComponent(async () => {
|
|
25
35
|
const project404 = import.meta.glob("~/pages/404.vue");
|
|
26
36
|
const projectKey = "/pages/404.vue";
|
|
@@ -39,11 +49,16 @@ const NotFoundComponent = defineAsyncComponent(async () => {
|
|
|
39
49
|
</script>
|
|
40
50
|
|
|
41
51
|
<template>
|
|
42
|
-
<template v-if="data">
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
</
|
|
52
|
+
<template v-if="data && DynamicComponent">
|
|
53
|
+
<component :is="DynamicComponent" :data="data?.data" />
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else>
|
|
56
|
+
<ClientOnly>
|
|
57
|
+
<NotFoundComponent/>
|
|
58
|
+
</ClientOnly>
|
|
59
|
+
</template>
|
|
49
60
|
</template>
|
|
61
|
+
|
|
62
|
+
<style>
|
|
63
|
+
body,html{margin:0;padding:0}
|
|
64
|
+
</style>
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { defineNuxtPlugin } from "#app";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return {
|
|
5
|
-
provide: {
|
|
6
|
-
bootstrap
|
|
7
|
-
}
|
|
8
|
-
};
|
|
2
|
+
import "bootstrap/dist/js/bootstrap.bundle.min.js";
|
|
3
|
+
export default defineNuxtPlugin(() => {
|
|
9
4
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { defineEventHandler, getRouterParam,
|
|
1
|
+
import { defineEventHandler, getRouterParam, getQuery } from "h3";
|
|
2
2
|
import { flowrixApi } from "../../../middleware/flowrix.js";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
export default defineEventHandler(async (event) => {
|
|
5
5
|
const slug = getRouterParam(event, "slug");
|
|
6
|
-
|
|
6
|
+
let query = getQuery(event);
|
|
7
|
+
let body = query.body;
|
|
8
|
+
console.log(body, JSON.stringify(body));
|
|
7
9
|
const config = useRuntimeConfig();
|
|
8
10
|
const rawCookies = event.req.headers.cookie || "";
|
|
9
11
|
const apiConfig = {
|
|
@@ -14,7 +16,7 @@ export default defineEventHandler(async (event) => {
|
|
|
14
16
|
headers: {
|
|
15
17
|
"x-api-secret": apiConfig?.FLOWRIX_API_SECRET || ""
|
|
16
18
|
},
|
|
17
|
-
body
|
|
19
|
+
body
|
|
18
20
|
};
|
|
19
21
|
const quickview = await flowrixApi.post(`quickview/${slug}`, apiConfig, options);
|
|
20
22
|
return quickview;
|
|
@@ -31,11 +31,14 @@ export const useCheckoutStore = defineStore("checkout", {
|
|
|
31
31
|
async paymentMethods(formData) {
|
|
32
32
|
try {
|
|
33
33
|
const sessionData = JSON.parse(localStorage.getItem("Checkout")) || {};
|
|
34
|
-
const apiUrl =
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
const apiUrl = `checkout/paymentmethod`;
|
|
35
|
+
const config = useRuntimeConfig();
|
|
36
|
+
const rawCookies = document.cookie;
|
|
37
|
+
const apiConfig = {
|
|
38
|
+
...config,
|
|
39
|
+
cookies: rawCookies
|
|
40
|
+
};
|
|
41
|
+
const response = await flowrixApi.post(apiUrl, config, { body: formData });
|
|
39
42
|
if (response?.data) {
|
|
40
43
|
this.publishableKey = response.data;
|
|
41
44
|
const cart = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowrix",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.154",
|
|
4
4
|
"description": "Plug-and-play Nuxt eCommerce cart powered by FLOWRiX. Subscription required.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@pinia/nuxt": "0.7.0",
|
|
45
45
|
"@stripe/stripe-js": "8.2.0",
|
|
46
46
|
"@vueuse/nuxt": "14.0.0",
|
|
47
|
+
"bootstrap": "^5.3.8",
|
|
47
48
|
"defu": "^6.1.4",
|
|
48
49
|
"nuxt-swiper": "2.0.1",
|
|
49
50
|
"nuxt-toast": "1.4.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|