cloudcommerce 0.2.3 → 0.4.0
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/CHANGELOG.md +54 -0
- package/ecomplus-stores/monocard/functions/ssr/package.json +0 -2
- package/ecomplus-stores/tia-sonia/functions/ssr/package.json +0 -2
- package/package.json +6 -6
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +2 -2
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +2 -2
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/infinitepay/package.json +2 -2
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/CHANGELOG.md +1 -0
- package/packages/apps/melhor-envio/README.md +1 -0
- package/packages/apps/melhor-envio/events.js +1 -0
- package/packages/apps/melhor-envio/lib/functions-lib/database.d.ts +18 -0
- package/packages/apps/melhor-envio/lib/functions-lib/database.js +115 -0
- package/packages/apps/melhor-envio/lib/functions-lib/database.js.map +1 -0
- package/packages/apps/melhor-envio/lib/functions-lib/events-to-melhor-envio.d.ts +7 -0
- package/packages/apps/melhor-envio/lib/functions-lib/events-to-melhor-envio.js +112 -0
- package/packages/apps/melhor-envio/lib/functions-lib/events-to-melhor-envio.js.map +1 -0
- package/packages/apps/melhor-envio/lib/functions-lib/new-label.d.ts +42 -0
- package/packages/apps/melhor-envio/lib/functions-lib/new-label.js +185 -0
- package/packages/apps/melhor-envio/lib/functions-lib/new-label.js.map +1 -0
- package/packages/apps/melhor-envio/lib/functions-lib/order-is-valid.d.ts +5 -0
- package/packages/apps/melhor-envio/lib/functions-lib/order-is-valid.js +40 -0
- package/packages/apps/melhor-envio/lib/functions-lib/order-is-valid.js.map +1 -0
- package/packages/apps/melhor-envio/lib/functions-lib/tracking-codes.d.ts +2 -0
- package/packages/apps/melhor-envio/lib/functions-lib/tracking-codes.js +164 -0
- package/packages/apps/melhor-envio/lib/functions-lib/tracking-codes.js.map +1 -0
- package/packages/apps/melhor-envio/lib/index.d.ts +1 -0
- package/packages/apps/melhor-envio/lib/index.js +2 -0
- package/packages/apps/melhor-envio/lib/index.js.map +1 -0
- package/packages/apps/melhor-envio/lib/melhor-envio-events.d.ts +6 -0
- package/packages/apps/melhor-envio/lib/melhor-envio-events.js +17 -0
- package/packages/apps/melhor-envio/lib/melhor-envio-events.js.map +1 -0
- package/packages/apps/melhor-envio/lib/melhor-envio.d.ts +2 -0
- package/packages/apps/melhor-envio/lib/melhor-envio.js +6 -0
- package/packages/apps/melhor-envio/lib/melhor-envio.js.map +1 -0
- package/packages/apps/melhor-envio/lib-mjs/calculate-melhor-envio.mjs +341 -0
- package/packages/apps/melhor-envio/lib-mjs/functions/client-melhor-envio.mjs +14 -0
- package/packages/apps/melhor-envio/lib-mjs/functions/error-handling.mjs +62 -0
- package/packages/apps/melhor-envio/lib-mjs/functions/new-shipment.mjs +119 -0
- package/packages/apps/melhor-envio/package.json +36 -0
- package/packages/apps/melhor-envio/src/functions-lib/database.ts +140 -0
- package/packages/apps/melhor-envio/src/functions-lib/events-to-melhor-envio.ts +137 -0
- package/packages/apps/melhor-envio/src/functions-lib/new-label.ts +214 -0
- package/packages/apps/melhor-envio/src/functions-lib/order-is-valid.ts +51 -0
- package/packages/apps/melhor-envio/src/functions-lib/tracking-codes.ts +191 -0
- package/packages/apps/melhor-envio/src/index.ts +1 -0
- package/packages/apps/melhor-envio/src/melhor-envio-events.ts +24 -0
- package/packages/apps/melhor-envio/src/melhor-envio.ts +7 -0
- package/packages/apps/melhor-envio/tsconfig.json +6 -0
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/paghiper/package.json +3 -3
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +3 -3
- package/packages/events/lib/firebase.js +2 -0
- package/packages/events/lib/firebase.js.map +1 -1
- package/packages/events/package.json +2 -1
- package/packages/events/src/firebase.ts +2 -0
- package/packages/firebase/lib/config.d.ts +4 -0
- package/packages/firebase/lib/config.js +7 -0
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/firebase/src/config.ts +8 -0
- package/packages/i18n/lib/en_us/i19buyTogether.txt +1 -0
- package/packages/i18n/lib/en_us/i19buyTogetherWith.txt +1 -0
- package/packages/i18n/lib/en_us/i19report.txt +1 -0
- package/packages/i18n/lib/en_us/i19toggleMenu.txt +1 -0
- package/packages/i18n/lib/en_us/i19uponRequest.txt +1 -0
- package/packages/i18n/lib/en_us/i19usedPoints.txt +1 -0
- package/packages/i18n/lib/en_us.d.ts +6 -0
- package/packages/i18n/lib/en_us.js +6 -0
- package/packages/i18n/lib/en_us.js.map +1 -1
- package/packages/i18n/lib/pt_br/i19buyTogether.txt +1 -0
- package/packages/i18n/lib/pt_br/i19buyTogetherWith.txt +1 -0
- package/packages/i18n/lib/pt_br/i19report.txt +1 -0
- package/packages/i18n/lib/pt_br/i19toggleMenu.txt +1 -0
- package/packages/i18n/lib/pt_br/i19uponRequest.txt +1 -0
- package/packages/i18n/lib/pt_br/i19usedPoints.txt +1 -0
- package/packages/i18n/lib/pt_br.d.ts +6 -0
- package/packages/i18n/lib/pt_br.js +6 -0
- package/packages/i18n/lib/pt_br.js.map +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/i18n/src/en_us.ts +6 -0
- package/packages/i18n/src/pt_br.ts +6 -0
- package/packages/modules/lib/firebase/call-app-module.js +5 -0
- package/packages/modules/lib/firebase/call-app-module.js.map +1 -1
- package/packages/modules/package.json +3 -2
- package/packages/modules/src/firebase/call-app-module.ts +5 -0
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +3 -4
- package/packages/storefront/.eslintrc.cjs +1 -1
- package/packages/storefront/astro.config.mjs +8 -1
- package/packages/storefront/dist/client/_astro/PitchBar.103168e6.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.b75d44d6.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.vue_vue_type_script_setup_true_lang.054033ef.js +1 -0
- package/packages/storefront/dist/client/_astro/{ProductCard.6d8b6d86.js → ProductCard.9138ec25.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.65213f83.js +1 -0
- package/packages/storefront/dist/client/_astro/_...slug_.39c46f54.css +1 -0
- package/packages/storefront/dist/client/_astro/client.eba0daa7.js +1 -0
- package/packages/storefront/dist/client/_astro/index.0c833781.css +1 -0
- package/packages/storefront/dist/client/_astro/index.7577af70.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.dde776b4.js → modules-info.0c999f60.js} +1 -1
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.4da3640b.js +1 -0
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.0869e112.js +1 -0
- package/packages/storefront/dist/client/_astro/server.60de185d.css +1 -0
- package/packages/storefront/dist/client/fallback/index.html +12 -7
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/pages/{all.c27193d6.mjs → all.6379e666.mjs} +494 -373
- package/packages/storefront/dist/server/chunks/{prerender.89f63027.mjs → prerender.a1ec39e0.mjs} +0 -0
- package/packages/storefront/dist/server/entry.mjs +39 -4452
- package/packages/storefront/package.json +4 -5
- package/packages/storefront/src/lib/assets/base.css +16 -11
- package/packages/storefront/src/lib/components/Carousel.vue +52 -82
- package/packages/storefront/src/lib/components/Drawer.vue +97 -0
- package/packages/storefront/src/lib/components/ProductCard.vue +1 -1
- package/packages/storefront/src/lib/components/ShopHeader.vue +110 -0
- package/packages/storefront/src/lib/components/ShopSidenav.vue +26 -0
- package/packages/storefront/src/lib/components/globals/Fade.vue +10 -14
- package/packages/storefront/src/lib/composables/use-pitch-bar.ts +27 -0
- package/packages/storefront/src/lib/composables/use-prices.ts +4 -2
- package/packages/storefront/src/lib/composables/use-sticky-header.ts +111 -0
- package/packages/storefront/src/lib/layouts/BaseBody.astro +2 -0
- package/packages/storefront/src/lib/layouts/PagesHeader.astro +23 -17
- package/packages/storefront/tailwind.config.cjs +4 -0
- package/packages/storefront/uno.config.cjs +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/PitchBar.f3579a5b.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.8e5cead5.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.vue_vue_type_script_setup_true_lang.b8cbeb54.js +0 -1
- package/packages/storefront/dist/client/_astro/StickyHeader.7b0f3963.js +0 -1
- package/packages/storefront/dist/client/_astro/_...slug_.97285eba.css +0 -1
- package/packages/storefront/dist/client/_astro/client.3e777d4c.js +0 -1
- package/packages/storefront/dist/client/_astro/index.90df622b.css +0 -1
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.7cf33881.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.1a4c7407.js +0 -1
- package/packages/storefront/dist/client/_astro/server.4d9646d8.css +0 -1
- package/packages/storefront/src/lib/components/PitchBar.vue +0 -61
- package/packages/storefront/src/lib/components/Prices.vue +0 -176
- package/packages/storefront/src/lib/components/StickyHeader.vue +0 -56
- package/packages/storefront/src/lib/composables/use-component-variant.ts +0 -13
|
@@ -12,15 +12,14 @@ import 'node:stream';
|
|
|
12
12
|
import 'slash';
|
|
13
13
|
import { c as createAstro, a as createComponent, r as renderTemplate, b as addAttribute, d as renderComponent, u as unescapeHTML, F as Fragment, m as maybeRenderHead, e as renderSlot, f as renderHead, s as spreadAttributes } from '../astro.89bd9221.mjs';
|
|
14
14
|
import api from '@cloudcommerce/api';
|
|
15
|
-
import { reactive, computed, defineComponent, inject, mergeProps, useSSRContext, ref, watch, toRef, onMounted, onBeforeUnmount, provide, createVNode, resolveDynamicComponent, withCtx, renderSlot as renderSlot$1, unref, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList,
|
|
16
|
-
import { ssrRenderAttrs, ssrRenderSlot, ssrRenderClass, ssrRenderVNode, ssrRenderComponent, ssrRenderStyle, ssrRenderList,
|
|
15
|
+
import { reactive, computed, defineComponent, inject, mergeProps, useSSRContext, ref, watch, toRef, onMounted, onBeforeUnmount, provide, createVNode, resolveDynamicComponent, withCtx, renderSlot as renderSlot$1, unref, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, resolveComponent, withModifiers, toDisplayString, createTextVNode } from 'vue';
|
|
16
|
+
import { ssrRenderAttrs, ssrRenderSlot, ssrRenderClass, ssrRenderVNode, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrInterpolate } from 'vue/server-renderer';
|
|
17
17
|
import { img, price, formatMoney, onPromotion } from '@ecomplus/utils';
|
|
18
18
|
/* empty css */import { EventEmitter } from 'node:events';
|
|
19
19
|
import fs, { readFileSync } from 'node:fs';
|
|
20
20
|
import config from '@cloudcommerce/config';
|
|
21
21
|
import { resolve as resolve$1 } from 'path';
|
|
22
|
-
/* empty css */import '
|
|
23
|
-
import { useElementHover } from '@vueuse/core';
|
|
22
|
+
/* empty css */import { useScroll, useElementHover, useDebounceFn, useTimeout, promiseTimeout } from '@vueuse/core';
|
|
24
23
|
|
|
25
24
|
function isOutputFormat(value) {
|
|
26
25
|
return ["avif", "jpeg", "jpg", "png", "webp"].includes(value);
|
|
@@ -798,8 +797,10 @@ const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
798
797
|
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
799
798
|
Astro2.self = $$BaseBody;
|
|
800
799
|
return renderTemplate`${maybeRenderHead($$result)}<body>
|
|
800
|
+
<div id="teleported-top"></div>
|
|
801
801
|
${renderSlot($$result, $$slots["default"])}
|
|
802
802
|
${renderSlot($$result, $$slots["before-body-end"])}
|
|
803
|
+
<div id="teleported-bottom"></div>
|
|
803
804
|
</body>`;
|
|
804
805
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro");
|
|
805
806
|
|
|
@@ -993,9 +994,24 @@ const parseShippingPhrase = (phrase) => {
|
|
|
993
994
|
return parsePhrase(phrase, "calculate_shipping", "free_shipping_from_value");
|
|
994
995
|
};
|
|
995
996
|
|
|
997
|
+
const usePitchBar = (props) => {
|
|
998
|
+
const parsedContents = computed(() => {
|
|
999
|
+
return props.slides.map(({ html }) => {
|
|
1000
|
+
return parseShippingPhrase(html).value;
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
const countValidSlides = computed(() => {
|
|
1004
|
+
return parsedContents.value.filter((html) => html).length;
|
|
1005
|
+
});
|
|
1006
|
+
return {
|
|
1007
|
+
parsedContents,
|
|
1008
|
+
countValidSlides
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
|
|
996
1012
|
const carouselKey = Symbol("carousel");
|
|
997
1013
|
|
|
998
|
-
const _sfc_main$
|
|
1014
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
999
1015
|
__name: "CarouselControl",
|
|
1000
1016
|
__ssrInlineRender: true,
|
|
1001
1017
|
props: {
|
|
@@ -1017,14 +1033,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1017
1033
|
}
|
|
1018
1034
|
});
|
|
1019
1035
|
|
|
1020
|
-
const _sfc_setup$
|
|
1021
|
-
_sfc_main$
|
|
1036
|
+
const _sfc_setup$7 = _sfc_main$7.setup;
|
|
1037
|
+
_sfc_main$7.setup = (props, ctx) => {
|
|
1022
1038
|
const ssrContext = useSSRContext();
|
|
1023
1039
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CarouselControl.vue");
|
|
1024
|
-
return _sfc_setup$
|
|
1040
|
+
return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
1025
1041
|
};
|
|
1026
1042
|
|
|
1027
|
-
const _sfc_main$
|
|
1043
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1028
1044
|
__name: "Carousel",
|
|
1029
1045
|
__ssrInlineRender: true,
|
|
1030
1046
|
props: {
|
|
@@ -1033,50 +1049,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1033
1049
|
autoplay: null
|
|
1034
1050
|
},
|
|
1035
1051
|
emits: [
|
|
1036
|
-
"update:modelValue"
|
|
1037
|
-
"bound-left",
|
|
1038
|
-
"bound-right"
|
|
1052
|
+
"update:modelValue"
|
|
1039
1053
|
],
|
|
1040
1054
|
setup(__props, { emit }) {
|
|
1041
1055
|
const props = __props;
|
|
1042
|
-
const
|
|
1043
|
-
return Math.abs(v1 - v2) <= epsilon;
|
|
1044
|
-
};
|
|
1045
|
-
const currentPage = ref(props.modelValue - 1);
|
|
1056
|
+
const currentIndex = ref(props.modelValue - 1);
|
|
1046
1057
|
watch(toRef(props, "modelValue"), (modelValue) => {
|
|
1047
|
-
|
|
1058
|
+
currentIndex.value = modelValue - 1;
|
|
1048
1059
|
});
|
|
1049
|
-
watch(
|
|
1060
|
+
watch(currentIndex, (current, previous) => {
|
|
1050
1061
|
if (current !== previous) {
|
|
1051
1062
|
emit("update:modelValue", current + 1);
|
|
1052
1063
|
}
|
|
1053
1064
|
});
|
|
1054
1065
|
const wrapper = ref(null);
|
|
1055
|
-
const
|
|
1056
|
-
const
|
|
1066
|
+
const { x: currentPos, isScrolling, arrivedState } = useScroll(wrapper);
|
|
1067
|
+
const isBoundLeft = computed(() => arrivedState.left);
|
|
1068
|
+
const isBoundRight = computed(() => arrivedState.right);
|
|
1057
1069
|
const slidesWidth = ref([]);
|
|
1058
1070
|
const wrapperScrollWidth = ref(0);
|
|
1059
1071
|
const wrapperVisibleWidth = ref(0);
|
|
1060
|
-
const
|
|
1061
|
-
const maxPages = ref(0);
|
|
1062
|
-
ref(null);
|
|
1063
|
-
ref(null);
|
|
1064
|
-
const calcBounds = () => {
|
|
1065
|
-
const _isBoundLeft = approximatelyEqual(currentPos.value, 0, 5);
|
|
1066
|
-
const _isBoundRight = approximatelyEqual(
|
|
1067
|
-
wrapperScrollWidth.value - wrapperVisibleWidth.value,
|
|
1068
|
-
currentPos.value,
|
|
1069
|
-
5
|
|
1070
|
-
);
|
|
1071
|
-
if (_isBoundLeft) {
|
|
1072
|
-
emit("bound-left", true);
|
|
1073
|
-
}
|
|
1074
|
-
isBoundLeft.value = _isBoundLeft;
|
|
1075
|
-
if (_isBoundRight) {
|
|
1076
|
-
emit("bound-right", true);
|
|
1077
|
-
}
|
|
1078
|
-
isBoundRight.value = _isBoundRight;
|
|
1079
|
-
};
|
|
1072
|
+
const indexCount = ref(0);
|
|
1080
1073
|
const calcWrapperWidth = () => {
|
|
1081
1074
|
wrapperScrollWidth.value = wrapper.value.scrollWidth;
|
|
1082
1075
|
wrapperVisibleWidth.value = wrapper.value.offsetWidth;
|
|
@@ -1089,38 +1082,24 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1089
1082
|
}));
|
|
1090
1083
|
};
|
|
1091
1084
|
const calcNextWidth = (direction) => {
|
|
1092
|
-
const nextSlideIndex = direction > 0 ?
|
|
1093
|
-
const width = slidesWidth.value[nextSlideIndex]
|
|
1085
|
+
const nextSlideIndex = direction > 0 ? currentIndex.value : currentIndex.value + direction;
|
|
1086
|
+
const width = slidesWidth.value[nextSlideIndex]?.width || 0;
|
|
1094
1087
|
if (!width) {
|
|
1095
1088
|
return 0;
|
|
1096
1089
|
}
|
|
1097
1090
|
return width * direction;
|
|
1098
1091
|
};
|
|
1099
|
-
const
|
|
1100
|
-
const
|
|
1101
|
-
return
|
|
1092
|
+
const calcCurrentIndex = () => {
|
|
1093
|
+
const getCurrentIndex = slidesWidth.value.findIndex((slide) => {
|
|
1094
|
+
return Math.abs(slide.offsetLeft - currentPos.value) <= 5;
|
|
1102
1095
|
});
|
|
1103
|
-
if (
|
|
1104
|
-
|
|
1096
|
+
if (getCurrentIndex > -1) {
|
|
1097
|
+
currentIndex.value = getCurrentIndex || 0;
|
|
1105
1098
|
}
|
|
1106
1099
|
};
|
|
1107
|
-
const
|
|
1108
|
-
currentPos.value = wrapper.value.scrollLeft || 0;
|
|
1109
|
-
};
|
|
1110
|
-
const calcMaxPages = () => {
|
|
1100
|
+
const calcIndexCount = () => {
|
|
1111
1101
|
const maxPos = wrapperScrollWidth.value - wrapperVisibleWidth.value;
|
|
1112
|
-
|
|
1113
|
-
};
|
|
1114
|
-
const calcOnInit = () => {
|
|
1115
|
-
if (!wrapper.value) {
|
|
1116
|
-
return;
|
|
1117
|
-
}
|
|
1118
|
-
calcWrapperWidth();
|
|
1119
|
-
calcSlidesWidth();
|
|
1120
|
-
calcCurrentPosition();
|
|
1121
|
-
calcCurrentPage();
|
|
1122
|
-
calcBounds();
|
|
1123
|
-
calcMaxPages();
|
|
1102
|
+
indexCount.value = slidesWidth.value.findIndex(({ offsetLeft }) => offsetLeft >= maxPos - 5);
|
|
1124
1103
|
};
|
|
1125
1104
|
let autoplayTimer = null;
|
|
1126
1105
|
const restartAutoplay = () => {
|
|
@@ -1134,13 +1113,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1134
1113
|
const changeSlide = (direction) => {
|
|
1135
1114
|
if (direction < 0) {
|
|
1136
1115
|
if (isBoundLeft.value) {
|
|
1137
|
-
|
|
1138
|
-
|
|
1116
|
+
calcIndexCount();
|
|
1117
|
+
currentIndex.value = indexCount.value - 1;
|
|
1139
1118
|
changeSlide(1);
|
|
1140
1119
|
return;
|
|
1141
1120
|
}
|
|
1142
1121
|
} else if (isBoundRight.value) {
|
|
1143
|
-
|
|
1122
|
+
currentIndex.value = 1;
|
|
1144
1123
|
changeSlide(-1);
|
|
1145
1124
|
return;
|
|
1146
1125
|
}
|
|
@@ -1150,6 +1129,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1150
1129
|
restartAutoplay();
|
|
1151
1130
|
}
|
|
1152
1131
|
};
|
|
1132
|
+
watch(isScrolling, (_isScrolling) => {
|
|
1133
|
+
if (_isScrolling) {
|
|
1134
|
+
clearTimeout(autoplayTimer);
|
|
1135
|
+
} else {
|
|
1136
|
+
calcCurrentIndex();
|
|
1137
|
+
restartAutoplay();
|
|
1138
|
+
}
|
|
1139
|
+
});
|
|
1153
1140
|
const carousel = ref(null);
|
|
1154
1141
|
const isHovered = useElementHover(carousel);
|
|
1155
1142
|
watch(isHovered, (_isHovered) => {
|
|
@@ -1159,10 +1146,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1159
1146
|
restartAutoplay();
|
|
1160
1147
|
}
|
|
1161
1148
|
});
|
|
1149
|
+
const calcOnInit = () => {
|
|
1150
|
+
if (!wrapper.value) {
|
|
1151
|
+
return;
|
|
1152
|
+
}
|
|
1153
|
+
calcWrapperWidth();
|
|
1154
|
+
calcSlidesWidth();
|
|
1155
|
+
calcCurrentIndex();
|
|
1156
|
+
calcIndexCount();
|
|
1157
|
+
};
|
|
1158
|
+
useDebounceFn(calcOnInit, 400);
|
|
1162
1159
|
onMounted(() => {
|
|
1163
1160
|
calcOnInit();
|
|
1164
1161
|
});
|
|
1165
1162
|
onBeforeUnmount(() => {
|
|
1163
|
+
clearTimeout(autoplayTimer);
|
|
1166
1164
|
});
|
|
1167
1165
|
provide(carouselKey, {
|
|
1168
1166
|
autoplay: toRef(props, "autoplay"),
|
|
@@ -1192,8 +1190,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1192
1190
|
}),
|
|
1193
1191
|
_: 3
|
|
1194
1192
|
}), _parent);
|
|
1195
|
-
ssrRenderSlot(_ctx.$slots, "controls", {
|
|
1196
|
-
|
|
1193
|
+
ssrRenderSlot(_ctx.$slots, "controls", {
|
|
1194
|
+
changeSlide,
|
|
1195
|
+
isBoundLeft: unref(isBoundLeft),
|
|
1196
|
+
isBoundRight: unref(isBoundRight),
|
|
1197
|
+
currentPage: currentIndex.value + 1,
|
|
1198
|
+
pageCount: indexCount.value + 1
|
|
1199
|
+
}, () => {
|
|
1200
|
+
_push(ssrRenderComponent(_sfc_main$7, { direction: -1 }, {
|
|
1197
1201
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1198
1202
|
if (_push2) {
|
|
1199
1203
|
ssrRenderSlot(_ctx.$slots, "previous", {}, null, _push2, _parent2, _scopeId);
|
|
@@ -1205,7 +1209,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1205
1209
|
}),
|
|
1206
1210
|
_: 3
|
|
1207
1211
|
}, _parent));
|
|
1208
|
-
_push(ssrRenderComponent(_sfc_main$
|
|
1212
|
+
_push(ssrRenderComponent(_sfc_main$7, null, {
|
|
1209
1213
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1210
1214
|
if (_push2) {
|
|
1211
1215
|
ssrRenderSlot(_ctx.$slots, "next", {}, null, _push2, _parent2, _scopeId);
|
|
@@ -1223,14 +1227,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1223
1227
|
}
|
|
1224
1228
|
});
|
|
1225
1229
|
|
|
1226
|
-
const _sfc_setup$
|
|
1227
|
-
_sfc_main$
|
|
1230
|
+
const _sfc_setup$6 = _sfc_main$6.setup;
|
|
1231
|
+
_sfc_main$6.setup = (props, ctx) => {
|
|
1228
1232
|
const ssrContext = useSSRContext();
|
|
1229
1233
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Carousel.vue");
|
|
1230
|
-
return _sfc_setup$
|
|
1234
|
+
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
1231
1235
|
};
|
|
1232
1236
|
|
|
1233
|
-
const _sfc_main$
|
|
1237
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1234
1238
|
__name: "PitchBar",
|
|
1235
1239
|
__ssrInlineRender: true,
|
|
1236
1240
|
props: {
|
|
@@ -1238,39 +1242,32 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1238
1242
|
},
|
|
1239
1243
|
setup(__props) {
|
|
1240
1244
|
const props = __props;
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
});
|
|
1246
|
-
const countValidSlides = computed(() => {
|
|
1247
|
-
return parsedContents.value.filter((html) => html).length;
|
|
1248
|
-
});
|
|
1245
|
+
const {
|
|
1246
|
+
parsedContents,
|
|
1247
|
+
countValidSlides
|
|
1248
|
+
} = usePitchBar(props);
|
|
1249
1249
|
return (_ctx, _push, _parent, _attrs) => {
|
|
1250
|
-
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
1251
|
-
|
|
1252
|
-
class: "bg-base-100"
|
|
1253
|
-
}, _attrs))}><div class="container md:w-2/3 mx-auto px-3 py-1">`);
|
|
1254
|
-
_push(ssrRenderComponent(_sfc_main$4, {
|
|
1250
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "bg-base-100" }, _attrs))}><div class="container md:w-2/3 mx-auto px-3 py-1">`);
|
|
1251
|
+
_push(ssrRenderComponent(_sfc_main$6, {
|
|
1255
1252
|
autoplay: unref(countValidSlides) > 1 ? 7e3 : null
|
|
1256
1253
|
}, {
|
|
1257
1254
|
controls: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1258
1255
|
if (_push2) {
|
|
1259
1256
|
_push2(`<div style="${ssrRenderStyle(unref(countValidSlides) > 1 ? null : { display: "none" })}" class="text-xl leading-none text-base-400"${_scopeId}>`);
|
|
1260
|
-
_push2(ssrRenderComponent(_sfc_main$
|
|
1257
|
+
_push2(ssrRenderComponent(_sfc_main$7, {
|
|
1261
1258
|
direction: -1,
|
|
1262
1259
|
class: "pr-2 bg-base-100 hover:text-base-700"
|
|
1263
1260
|
}, null, _parent2, _scopeId));
|
|
1264
|
-
_push2(ssrRenderComponent(_sfc_main$
|
|
1261
|
+
_push2(ssrRenderComponent(_sfc_main$7, { class: "pl-2 bg-base-100 hover:text-base-700" }, null, _parent2, _scopeId));
|
|
1265
1262
|
_push2(`</div>`);
|
|
1266
1263
|
} else {
|
|
1267
1264
|
return [
|
|
1268
1265
|
withDirectives(createVNode("div", { class: "text-xl leading-none text-base-400" }, [
|
|
1269
|
-
createVNode(_sfc_main$
|
|
1266
|
+
createVNode(_sfc_main$7, {
|
|
1270
1267
|
direction: -1,
|
|
1271
1268
|
class: "pr-2 bg-base-100 hover:text-base-700"
|
|
1272
1269
|
}),
|
|
1273
|
-
createVNode(_sfc_main$
|
|
1270
|
+
createVNode(_sfc_main$7, { class: "pl-2 bg-base-100 hover:text-base-700" })
|
|
1274
1271
|
], 512), [
|
|
1275
1272
|
[vShow, unref(countValidSlides) > 1]
|
|
1276
1273
|
])
|
|
@@ -1285,26 +1282,22 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1285
1282
|
ssrRenderVNode(_push2, createVNode(resolveDynamicComponent(slide.href ? "ALink" : "span"), {
|
|
1286
1283
|
href: slide.href,
|
|
1287
1284
|
target: slide.target,
|
|
1288
|
-
class: slide.href ? "hover:underline" : null
|
|
1285
|
+
class: ["inline-block px-8", slide.href ? "hover:underline" : null]
|
|
1289
1286
|
}, {
|
|
1290
1287
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
1291
1288
|
if (_push3) {
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
}
|
|
1298
|
-
}, _push3, _parent3, _scopeId2);
|
|
1289
|
+
if (unref(parsedContents)[i]) {
|
|
1290
|
+
_push3(`<span class="prose text-sm text-base-800"${_scopeId2}>${unref(parsedContents)[i]}</span>`);
|
|
1291
|
+
} else {
|
|
1292
|
+
_push3(`<!---->`);
|
|
1293
|
+
}
|
|
1299
1294
|
} else {
|
|
1300
1295
|
return [
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
}, null, 8, ["innerHTML"])) : createCommentVNode("", true)
|
|
1307
|
-
])
|
|
1296
|
+
unref(parsedContents)[i] ? (openBlock(), createBlock("span", {
|
|
1297
|
+
key: 0,
|
|
1298
|
+
innerHTML: unref(parsedContents)[i],
|
|
1299
|
+
class: "prose text-sm text-base-800"
|
|
1300
|
+
}, null, 8, ["innerHTML"])) : createCommentVNode("", true)
|
|
1308
1301
|
];
|
|
1309
1302
|
}
|
|
1310
1303
|
}),
|
|
@@ -1320,16 +1313,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1320
1313
|
(openBlock(), createBlock(resolveDynamicComponent(slide.href ? "ALink" : "span"), {
|
|
1321
1314
|
href: slide.href,
|
|
1322
1315
|
target: slide.target,
|
|
1323
|
-
class: slide.href ? "hover:underline" : null
|
|
1316
|
+
class: ["inline-block px-8", slide.href ? "hover:underline" : null]
|
|
1324
1317
|
}, {
|
|
1325
1318
|
default: withCtx(() => [
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
}, null, 8, ["innerHTML"])) : createCommentVNode("", true)
|
|
1332
|
-
])
|
|
1319
|
+
unref(parsedContents)[i] ? (openBlock(), createBlock("span", {
|
|
1320
|
+
key: 0,
|
|
1321
|
+
innerHTML: unref(parsedContents)[i],
|
|
1322
|
+
class: "prose text-sm text-base-800"
|
|
1323
|
+
}, null, 8, ["innerHTML"])) : createCommentVNode("", true)
|
|
1333
1324
|
]),
|
|
1334
1325
|
_: 2
|
|
1335
1326
|
}, 1032, ["href", "target", "class"]))
|
|
@@ -1338,93 +1329,316 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1338
1329
|
];
|
|
1339
1330
|
}
|
|
1340
1331
|
}),
|
|
1341
|
-
_:
|
|
1332
|
+
_: 1
|
|
1342
1333
|
}, _parent));
|
|
1343
1334
|
_push(`</div></div>`);
|
|
1344
1335
|
};
|
|
1345
1336
|
}
|
|
1346
1337
|
});
|
|
1347
1338
|
|
|
1339
|
+
const _sfc_setup$5 = _sfc_main$5.setup;
|
|
1340
|
+
_sfc_main$5.setup = (props, ctx) => {
|
|
1341
|
+
const ssrContext = useSSRContext();
|
|
1342
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/PitchBar.vue");
|
|
1343
|
+
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
const i19myAccount = "Minha conta";
|
|
1347
|
+
const i19openCart = "Abrir carrinho";
|
|
1348
|
+
const i19searchProducts = "Buscar produtos";
|
|
1349
|
+
|
|
1350
|
+
const useStickyHeader = (props) => {
|
|
1351
|
+
const {
|
|
1352
|
+
header,
|
|
1353
|
+
canSetStyles,
|
|
1354
|
+
canCreateHeightDiv,
|
|
1355
|
+
isShownOnScrollDown
|
|
1356
|
+
} = {
|
|
1357
|
+
canSetStyles: true,
|
|
1358
|
+
canCreateHeightDiv: true,
|
|
1359
|
+
...props
|
|
1360
|
+
};
|
|
1361
|
+
const { ready, start } = useTimeout(100, { controls: true, immediate: false });
|
|
1362
|
+
const staticHeight = ref(0);
|
|
1363
|
+
const staticY = ref(0);
|
|
1364
|
+
const { y } = { y: ref(0) };
|
|
1365
|
+
const isSticky = computed(() => ready.value && y.value > staticY.value * 1.2);
|
|
1366
|
+
const transition = ref("none");
|
|
1367
|
+
watch(isSticky, async (_isSticky) => {
|
|
1368
|
+
if (canSetStyles) {
|
|
1369
|
+
header.value.style.position = _isSticky ? "sticky" : null;
|
|
1370
|
+
}
|
|
1371
|
+
if (!_isSticky) {
|
|
1372
|
+
start();
|
|
1373
|
+
transition.value = "none";
|
|
1374
|
+
} else {
|
|
1375
|
+
await promiseTimeout(300);
|
|
1376
|
+
transition.value = "opacity var(--transition-slow), transform var(--transition)";
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
const isScrollUp = ref(false);
|
|
1380
|
+
watch(y, (newY, oldY) => {
|
|
1381
|
+
isScrollUp.value = newY > 0 && newY < oldY;
|
|
1382
|
+
});
|
|
1383
|
+
return {
|
|
1384
|
+
staticHeight,
|
|
1385
|
+
staticY,
|
|
1386
|
+
isSticky,
|
|
1387
|
+
isScrollUp,
|
|
1388
|
+
transition
|
|
1389
|
+
};
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1393
|
+
__name: "Drawer",
|
|
1394
|
+
__ssrInlineRender: true,
|
|
1395
|
+
props: {
|
|
1396
|
+
modelValue: { type: Boolean, default: false },
|
|
1397
|
+
placement: { default: "start" },
|
|
1398
|
+
position: { default: "fixed" },
|
|
1399
|
+
hasCloseButton: { type: Boolean, default: true }
|
|
1400
|
+
},
|
|
1401
|
+
emits: [
|
|
1402
|
+
"update:modelValue"
|
|
1403
|
+
],
|
|
1404
|
+
setup(__props, { emit }) {
|
|
1405
|
+
const props = __props;
|
|
1406
|
+
const close = () => emit("update:modelValue", false);
|
|
1407
|
+
const drawer = ref(null);
|
|
1408
|
+
const outsideClickListener = (ev) => {
|
|
1409
|
+
if (!drawer.value?.contains(ev.target)) {
|
|
1410
|
+
close();
|
|
1411
|
+
}
|
|
1412
|
+
};
|
|
1413
|
+
const escClickListener = (ev) => {
|
|
1414
|
+
if (ev.key === "Escape") {
|
|
1415
|
+
close();
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
watch(toRef(props, "modelValue"), async (isOpen) => {
|
|
1419
|
+
if (isOpen) {
|
|
1420
|
+
document.body.style.overflow = "hidden";
|
|
1421
|
+
setTimeout(() => {
|
|
1422
|
+
document.addEventListener("click", outsideClickListener, { passive: true });
|
|
1423
|
+
document.addEventListener("keydown", escClickListener, { passive: true });
|
|
1424
|
+
}, 500);
|
|
1425
|
+
} else {
|
|
1426
|
+
document.body.style.overflow = null;
|
|
1427
|
+
document.removeEventListener("click", outsideClickListener);
|
|
1428
|
+
document.removeEventListener("keydown", escClickListener);
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1431
|
+
const slideTo = computed(() => {
|
|
1432
|
+
switch (props.placement) {
|
|
1433
|
+
case "start":
|
|
1434
|
+
return "left";
|
|
1435
|
+
case "end":
|
|
1436
|
+
return "right";
|
|
1437
|
+
case "top":
|
|
1438
|
+
return "up";
|
|
1439
|
+
default:
|
|
1440
|
+
return "down";
|
|
1441
|
+
}
|
|
1442
|
+
});
|
|
1443
|
+
const isFixed = computed(() => {
|
|
1444
|
+
return props.position === "fixed";
|
|
1445
|
+
});
|
|
1446
|
+
const isPlacementX = computed(() => {
|
|
1447
|
+
return props.placement === "start" || props.placement === "end";
|
|
1448
|
+
});
|
|
1449
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
1450
|
+
const _component_Fade = resolveComponent("Fade");
|
|
1451
|
+
_push(ssrRenderComponent(_component_Fade, mergeProps({
|
|
1452
|
+
slide: unref(slideTo),
|
|
1453
|
+
speed: "slow",
|
|
1454
|
+
"is-floating": ""
|
|
1455
|
+
}, _attrs), {
|
|
1456
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1457
|
+
if (_push2) {
|
|
1458
|
+
if (__props.modelValue) {
|
|
1459
|
+
_push2(`<dialog class="${ssrRenderClass([[
|
|
1460
|
+
__props.position,
|
|
1461
|
+
unref(isFixed) ? `top-0 left-0 ${unref(isPlacementX) ? "h-screen" : ""}` : null
|
|
1462
|
+
], "w-screen max-w-sm shadow p-0 m-0 z-50"])}"${ssrIncludeBooleanAttr(__props.modelValue) ? " open" : ""}${ssrRenderAttr("data-drawer", __props.placement)}${_scopeId}><div class="relative"${_scopeId}>`);
|
|
1463
|
+
if (__props.hasCloseButton) {
|
|
1464
|
+
_push2(`<button type="button"${ssrRenderAttr("aria-label", "Fechar")} class="${ssrRenderClass([__props.placement === "end" ? "left-2" : "right-2", "absolute top-2"])}" data-drawer-close${_scopeId}>`);
|
|
1465
|
+
ssrRenderSlot(_ctx.$slots, "close", {}, () => {
|
|
1466
|
+
_push2(`<i class="i-close text-base-400 text-3xl"${_scopeId}></i>`);
|
|
1467
|
+
}, _push2, _parent2, _scopeId);
|
|
1468
|
+
_push2(`</button>`);
|
|
1469
|
+
} else {
|
|
1470
|
+
_push2(`<!---->`);
|
|
1471
|
+
}
|
|
1472
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
|
|
1473
|
+
_push2(`</div></dialog>`);
|
|
1474
|
+
} else {
|
|
1475
|
+
_push2(`<!---->`);
|
|
1476
|
+
}
|
|
1477
|
+
} else {
|
|
1478
|
+
return [
|
|
1479
|
+
__props.modelValue ? (openBlock(), createBlock("dialog", {
|
|
1480
|
+
key: 0,
|
|
1481
|
+
ref_key: "drawer",
|
|
1482
|
+
ref: drawer,
|
|
1483
|
+
class: ["w-screen max-w-sm shadow p-0 m-0 z-50", [
|
|
1484
|
+
__props.position,
|
|
1485
|
+
unref(isFixed) ? `top-0 left-0 ${unref(isPlacementX) ? "h-screen" : ""}` : null
|
|
1486
|
+
]],
|
|
1487
|
+
open: __props.modelValue,
|
|
1488
|
+
"data-drawer": __props.placement
|
|
1489
|
+
}, [
|
|
1490
|
+
createVNode("div", { class: "relative" }, [
|
|
1491
|
+
__props.hasCloseButton ? (openBlock(), createBlock("button", {
|
|
1492
|
+
key: 0,
|
|
1493
|
+
type: "button",
|
|
1494
|
+
"aria-label": "Fechar",
|
|
1495
|
+
onClick: withModifiers(close, ["prevent"]),
|
|
1496
|
+
class: ["absolute top-2", __props.placement === "end" ? "left-2" : "right-2"],
|
|
1497
|
+
"data-drawer-close": ""
|
|
1498
|
+
}, [
|
|
1499
|
+
renderSlot$1(_ctx.$slots, "close", {}, () => [
|
|
1500
|
+
createVNode("i", { class: "i-close text-base-400 text-3xl" })
|
|
1501
|
+
])
|
|
1502
|
+
], 10, ["onClick"])) : createCommentVNode("", true),
|
|
1503
|
+
renderSlot$1(_ctx.$slots, "default")
|
|
1504
|
+
])
|
|
1505
|
+
], 10, ["open", "data-drawer"])) : createCommentVNode("", true)
|
|
1506
|
+
];
|
|
1507
|
+
}
|
|
1508
|
+
}),
|
|
1509
|
+
_: 3
|
|
1510
|
+
}, _parent));
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
});
|
|
1514
|
+
|
|
1515
|
+
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
1516
|
+
_sfc_main$4.setup = (props, ctx) => {
|
|
1517
|
+
const ssrContext = useSSRContext();
|
|
1518
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Drawer.vue");
|
|
1519
|
+
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
1520
|
+
};
|
|
1521
|
+
|
|
1522
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1523
|
+
__name: "ShopSidenav",
|
|
1524
|
+
__ssrInlineRender: true,
|
|
1525
|
+
props: {
|
|
1526
|
+
categories: null
|
|
1527
|
+
},
|
|
1528
|
+
setup(__props) {
|
|
1529
|
+
const props = __props;
|
|
1530
|
+
const mainCategories = props.categories.filter(({ slug, parent }) => {
|
|
1531
|
+
return slug && !parent;
|
|
1532
|
+
});
|
|
1533
|
+
return (_ctx, _push, _parent, _attrs) => {
|
|
1534
|
+
_push(`<aside${ssrRenderAttrs(mergeProps({ "data-sidenav": "" }, _attrs))}><nav class="py-5" data-sidenav-nav><ul><!--[-->`);
|
|
1535
|
+
ssrRenderList(unref(mainCategories), (mainCategory) => {
|
|
1536
|
+
_push(`<li><a${ssrRenderAttr("href", `/${mainCategory.slug}`)}>${ssrInterpolate(mainCategory.name)}</a></li>`);
|
|
1537
|
+
});
|
|
1538
|
+
_push(`<!--]--></ul></nav></aside>`);
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1541
|
+
});
|
|
1542
|
+
|
|
1348
1543
|
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
1349
1544
|
_sfc_main$3.setup = (props, ctx) => {
|
|
1350
1545
|
const ssrContext = useSSRContext();
|
|
1351
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/
|
|
1546
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/ShopSidenav.vue");
|
|
1352
1547
|
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
1353
1548
|
};
|
|
1354
1549
|
|
|
1355
1550
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1356
|
-
__name: "
|
|
1551
|
+
__name: "ShopHeader",
|
|
1357
1552
|
__ssrInlineRender: true,
|
|
1358
1553
|
props: {
|
|
1359
|
-
|
|
1360
|
-
logoAltHeading: { default: "h2" }
|
|
1554
|
+
categories: null
|
|
1361
1555
|
},
|
|
1362
1556
|
setup(__props) {
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1557
|
+
const buttons = ref({
|
|
1558
|
+
search: {
|
|
1559
|
+
icon: "i-search",
|
|
1560
|
+
onClick: () => {
|
|
1561
|
+
},
|
|
1562
|
+
label: i19searchProducts
|
|
1563
|
+
},
|
|
1564
|
+
account: {
|
|
1565
|
+
icon: "i-account",
|
|
1566
|
+
onClick: () => {
|
|
1567
|
+
},
|
|
1568
|
+
label: i19myAccount
|
|
1569
|
+
},
|
|
1570
|
+
cart: {
|
|
1571
|
+
icon: "i-shopping-cart",
|
|
1572
|
+
onClick: () => {
|
|
1573
|
+
},
|
|
1574
|
+
label: i19openCart
|
|
1575
|
+
}
|
|
1576
|
+
});
|
|
1577
|
+
const isSidenavOpen = ref(false);
|
|
1578
|
+
const header = ref(null);
|
|
1579
|
+
const {
|
|
1580
|
+
isSticky,
|
|
1581
|
+
staticHeight,
|
|
1582
|
+
staticY
|
|
1583
|
+
} = useStickyHeader({ header });
|
|
1584
|
+
const sidenavHeight = computed(() => {
|
|
1585
|
+
return isSticky.value ? staticHeight.value : staticY.value;
|
|
1586
|
+
});
|
|
1369
1587
|
return (_ctx, _push, _parent, _attrs) => {
|
|
1370
|
-
const _component_Fade = resolveComponent("Fade");
|
|
1371
1588
|
_push(`<header${ssrRenderAttrs(mergeProps({
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
_push(`<a href="/">`);
|
|
1381
|
-
ssrRenderVNode(_push, createVNode(resolveDynamicComponent(unref(logo).alt && __props.logoAltHeading || "span"), { class: "m-0" }, {
|
|
1382
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1383
|
-
if (_push2) {
|
|
1384
|
-
_push2(`<img${ssrRenderAttrs(unref(logo))}${_scopeId}>`);
|
|
1385
|
-
} else {
|
|
1386
|
-
return [
|
|
1387
|
-
createVNode("img", unref(logo), null, 16)
|
|
1388
|
-
];
|
|
1389
|
-
}
|
|
1390
|
-
}),
|
|
1391
|
-
_: 1
|
|
1392
|
-
}), _parent);
|
|
1393
|
-
_push(`</a>`);
|
|
1394
|
-
} else {
|
|
1395
|
-
_push(`<!---->`);
|
|
1396
|
-
}
|
|
1397
|
-
}, _push, _parent);
|
|
1398
|
-
_push(`<div class="flex items-center">`);
|
|
1399
|
-
ssrRenderSlot(_ctx.$slots, "actions", {}, () => {
|
|
1400
|
-
ssrRenderSlot(_ctx.$slots, "nav", {}, () => {
|
|
1401
|
-
_push(ssrRenderComponent(_component_Fade, {
|
|
1402
|
-
speed: "slow",
|
|
1403
|
-
slide: "down"
|
|
1404
|
-
}, {
|
|
1405
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1406
|
-
if (_push2) {
|
|
1407
|
-
if (fade.value) {
|
|
1408
|
-
_push2(`<div class="h-20 bg-primary w-20"${_scopeId}> Fadiiing </div>`);
|
|
1409
|
-
} else {
|
|
1410
|
-
_push2(`<!---->`);
|
|
1411
|
-
}
|
|
1412
|
-
} else {
|
|
1413
|
-
return [
|
|
1414
|
-
fade.value ? (openBlock(), createBlock("div", {
|
|
1415
|
-
key: 0,
|
|
1416
|
-
class: "h-20 bg-primary w-20"
|
|
1417
|
-
}, " Fadiiing ")) : createCommentVNode("", true)
|
|
1418
|
-
];
|
|
1419
|
-
}
|
|
1420
|
-
}),
|
|
1421
|
-
_: 1
|
|
1422
|
-
}, _parent));
|
|
1589
|
+
ref_key: "header",
|
|
1590
|
+
ref: header,
|
|
1591
|
+
class: ["top-0 z-50", unref(isSticky) ? "bg-white/80 backdrop-blur-md shadow py-2 md:py-3" : "bg-white py-3 sm:py-4 md:py-5"]
|
|
1592
|
+
}, _attrs))}><div class="container lg:max-w-7xl mx-auto px-1 lg:pl-3 grid grid-flow-col grid-cols-3 justify-between items-center md:grid-cols-none md:auto-cols-max">`);
|
|
1593
|
+
ssrRenderSlot(_ctx.$slots, "sidenav-toggle", {}, () => {
|
|
1594
|
+
_push(`<div class="md:hidden" data-sidenav-toggle><button class="px-2 my-1"${ssrRenderAttr("aria-label", "Abrir/fechar menu")}>`);
|
|
1595
|
+
ssrRenderSlot(_ctx.$slots, "sidenav-toggle-content", {}, () => {
|
|
1596
|
+
_push(`<i class="${ssrRenderClass([isSidenavOpen.value ? "i-close" : "i-menu", "text-base-500 text-3xl"])}"></i>`);
|
|
1423
1597
|
}, _push, _parent);
|
|
1424
|
-
|
|
1425
|
-
ssrRenderSlot(_ctx.$slots, "buttons", {}, null, _push, _parent);
|
|
1598
|
+
_push(`</button></div>`);
|
|
1426
1599
|
}, _push, _parent);
|
|
1427
|
-
_push
|
|
1600
|
+
ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
|
|
1601
|
+
ssrRenderSlot(_ctx.$slots, "nav", {}, null, _push, _parent);
|
|
1602
|
+
ssrRenderSlot(_ctx.$slots, "buttons", {}, () => {
|
|
1603
|
+
_push(`<div class="px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800" data-header-buttons><!--[-->`);
|
|
1604
|
+
ssrRenderList(buttons.value, ({ icon, onClick, label }, name) => {
|
|
1605
|
+
ssrRenderSlot(_ctx.$slots, "button", mergeProps({ key: name }, { name, icon, onClick }), () => {
|
|
1606
|
+
_push(`<button class="${ssrRenderClass(name === "account" ? "hidden sm:block" : null)}"${ssrRenderAttr("aria-label", label)}${ssrRenderAttr("data-header-button", name)}>`);
|
|
1607
|
+
ssrRenderSlot(_ctx.$slots, "button-content", { name, icon }, () => {
|
|
1608
|
+
_push(`<i class="${ssrRenderClass([icon, "hover:text-primary w-7 h-7 hover:scale-110 active:scale-125"])}"></i>`);
|
|
1609
|
+
}, _push, _parent);
|
|
1610
|
+
_push(`</button>`);
|
|
1611
|
+
}, _push, _parent);
|
|
1612
|
+
});
|
|
1613
|
+
_push(`<!--]--></div>`);
|
|
1614
|
+
}, _push, _parent);
|
|
1615
|
+
_push(`</div>`);
|
|
1616
|
+
_push(ssrRenderComponent(_sfc_main$4, {
|
|
1617
|
+
modelValue: isSidenavOpen.value,
|
|
1618
|
+
"onUpdate:modelValue": ($event) => isSidenavOpen.value = $event,
|
|
1619
|
+
"has-close-button": false,
|
|
1620
|
+
position: "absolute",
|
|
1621
|
+
class: "mt-3",
|
|
1622
|
+
style: { height: `calc(100vh - ${unref(sidenavHeight)}px)` }
|
|
1623
|
+
}, {
|
|
1624
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1625
|
+
if (_push2) {
|
|
1626
|
+
_push2(ssrRenderComponent(_sfc_main$3, {
|
|
1627
|
+
class: "pt-6",
|
|
1628
|
+
categories: __props.categories
|
|
1629
|
+
}, null, _parent2, _scopeId));
|
|
1630
|
+
} else {
|
|
1631
|
+
return [
|
|
1632
|
+
createVNode(_sfc_main$3, {
|
|
1633
|
+
class: "pt-6",
|
|
1634
|
+
categories: __props.categories
|
|
1635
|
+
}, null, 8, ["categories"])
|
|
1636
|
+
];
|
|
1637
|
+
}
|
|
1638
|
+
}),
|
|
1639
|
+
_: 1
|
|
1640
|
+
}, _parent));
|
|
1641
|
+
_push(`</header>`);
|
|
1428
1642
|
};
|
|
1429
1643
|
}
|
|
1430
1644
|
});
|
|
@@ -1432,7 +1646,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1432
1646
|
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
1433
1647
|
_sfc_main$2.setup = (props, ctx) => {
|
|
1434
1648
|
const ssrContext = useSSRContext();
|
|
1435
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/
|
|
1649
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/ShopHeader.vue");
|
|
1436
1650
|
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
1437
1651
|
};
|
|
1438
1652
|
|
|
@@ -1458,13 +1672,20 @@ const $$PagesHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1458
1672
|
html: header.marketing_stripe.text
|
|
1459
1673
|
}];
|
|
1460
1674
|
}
|
|
1461
|
-
const
|
|
1675
|
+
const shopHeader = {
|
|
1676
|
+
categories: apiState.categories
|
|
1677
|
+
};
|
|
1462
1678
|
const LogoHeading = Astro2.props.logoHeading || (isHomepage ? "h1" : "h2");
|
|
1463
1679
|
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": () => renderTemplate`${renderSlot($$result, $$slots["pitch-bar"], renderTemplate`
|
|
1464
|
-
${pitchBar.slides.length && renderTemplate`${renderComponent($$result, "PitchBar", _sfc_main$
|
|
1680
|
+
${pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result, "PitchBar", _sfc_main$5, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`}
|
|
1681
|
+
${pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result, "PitchBar", _sfc_main$5, { ...pitchBar })}`}
|
|
1465
1682
|
`)}${renderSlot($$result, $$slots["sticky-header"], renderTemplate`
|
|
1466
|
-
${renderComponent($$result, "
|
|
1467
|
-
${
|
|
1683
|
+
${renderComponent($$result, "ShopHeader", _sfc_main$2, { ...shopHeader, "client:load": true, "client:component-hydration": "load", "client:component-path": "@@sf/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": () => renderTemplate`${renderComponent($$result, "Fragment", Fragment, { "slot": "logo" }, { "default": () => renderTemplate`${renderSlot($$result, $$slots["logo"], renderTemplate`
|
|
1684
|
+
${maybeRenderHead($$result)}<a href="/">
|
|
1685
|
+
${renderComponent($$result, "LogoHeading", LogoHeading, {}, { "default": () => renderTemplate`${renderSlot($$result, $$slots["logo-picture"], renderTemplate`
|
|
1686
|
+
${renderComponent($$result, "Picture", $$Picture, { "src": header.logo || settings.logo, "alt": settings.name, "widths": [300], "sizes": "150px", "fetchpriority": "high", "class": "hover:drop-shadow-sm" })}
|
|
1687
|
+
`)}` })}
|
|
1688
|
+
</a>
|
|
1468
1689
|
`)}` })}` })}
|
|
1469
1690
|
`)}` })}`;
|
|
1470
1691
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/PagesHeader.astro");
|
|
@@ -1474,8 +1695,9 @@ const $$Pages = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1474
1695
|
const Astro2 = $$result.createAstro($$Astro$6, $$props, $$slots);
|
|
1475
1696
|
Astro2.self = $$Pages;
|
|
1476
1697
|
const { pageContext, title } = Astro2.props;
|
|
1698
|
+
const { settings } = pageContext;
|
|
1477
1699
|
return renderTemplate`${renderComponent($$result, "Base", $$Base, { "pageContext": pageContext, "title": title }, { "default": () => renderTemplate`${renderSlot($$result, $$slots["header"], renderTemplate`
|
|
1478
|
-
${renderComponent($$result, "Header", $$PagesHeader, { "pageContext": pageContext })}
|
|
1700
|
+
${renderComponent($$result, "Header", $$PagesHeader, { "pageContext": pageContext }, { "logo-picture": () => renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "slot": "logo-picture", "src": settings.logo, "alt": settings.name, "widths": [300], "sizes": "150px", "fetchpriority": "high", "class": "hover:drop-shadow-sm" })}` })}
|
|
1479
1701
|
`)}${renderSlot($$result, $$slots["default"])}` })}`;
|
|
1480
1702
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Pages.astro");
|
|
1481
1703
|
|
|
@@ -1631,18 +1853,6 @@ const usePrices = (props) => {
|
|
|
1631
1853
|
};
|
|
1632
1854
|
};
|
|
1633
1855
|
|
|
1634
|
-
const useComponentVariant = (props) => {
|
|
1635
|
-
return computed(() => {
|
|
1636
|
-
let variantName = "";
|
|
1637
|
-
Object.keys(props).forEach((prop) => {
|
|
1638
|
-
if (props[prop] === true) {
|
|
1639
|
-
variantName += ` ${prop.replace(/^(is|has)/, "")}`;
|
|
1640
|
-
}
|
|
1641
|
-
});
|
|
1642
|
-
return variantName.slice(1);
|
|
1643
|
-
});
|
|
1644
|
-
};
|
|
1645
|
-
|
|
1646
1856
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
1647
1857
|
__name: "Prices",
|
|
1648
1858
|
__ssrInlineRender: true,
|
|
@@ -1660,7 +1870,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1660
1870
|
},
|
|
1661
1871
|
setup(__props) {
|
|
1662
1872
|
const props = __props;
|
|
1663
|
-
const prices = usePrices(props);
|
|
1664
1873
|
const {
|
|
1665
1874
|
hasVariedPrices,
|
|
1666
1875
|
salePrice,
|
|
@@ -1672,223 +1881,135 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1672
1881
|
installmentValue,
|
|
1673
1882
|
priceWithDiscount,
|
|
1674
1883
|
discountLabel
|
|
1675
|
-
} =
|
|
1676
|
-
const componentVariant = useComponentVariant(props);
|
|
1884
|
+
} = usePrices(props);
|
|
1677
1885
|
return (_ctx, _push, _parent, _attrs) => {
|
|
1678
1886
|
const _component_Fade = resolveComponent("Fade");
|
|
1679
1887
|
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
1680
|
-
"
|
|
1681
|
-
|
|
1888
|
+
class: ["text-base-600", __props.isBig ? "text-lg" : null],
|
|
1889
|
+
"data-prices": ""
|
|
1682
1890
|
}, _attrs))}>`);
|
|
1683
1891
|
if (unref(comparePrice)) {
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
if (__props.isLiteral) {
|
|
1698
|
-
_push(`<small>${ssrInterpolate(` ${"Por"}`)}</small>`);
|
|
1699
|
-
} else {
|
|
1700
|
-
_push(`<!---->`);
|
|
1701
|
-
}
|
|
1702
|
-
}, _push, _parent);
|
|
1703
|
-
_push(`</span>`);
|
|
1704
|
-
}, _push, _parent);
|
|
1892
|
+
_push(`<span class="text-base-500 mr-1">`);
|
|
1893
|
+
if (__props.isLiteral) {
|
|
1894
|
+
_push(`<small>${ssrInterpolate(`${"De"} `)}</small>`);
|
|
1895
|
+
} else {
|
|
1896
|
+
_push(`<!---->`);
|
|
1897
|
+
}
|
|
1898
|
+
_push(`<s>${ssrInterpolate(_ctx.$money(unref(comparePrice)))}</s>`);
|
|
1899
|
+
if (__props.isLiteral) {
|
|
1900
|
+
_push(`<small>${ssrInterpolate(` ${"Por"}`)}</small>`);
|
|
1901
|
+
} else {
|
|
1902
|
+
_push(`<!---->`);
|
|
1903
|
+
}
|
|
1904
|
+
_push(`</span>`);
|
|
1705
1905
|
} else {
|
|
1706
1906
|
_push(`<!---->`);
|
|
1707
1907
|
}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
}
|
|
1716
|
-
}, _push, _parent);
|
|
1717
|
-
ssrRenderSlot(_ctx.$slots, "sale-value", { salePrice: unref(salePrice) }, () => {
|
|
1718
|
-
_push(`${ssrInterpolate(_ctx.$money(unref(salePrice)))}`);
|
|
1719
|
-
}, _push, _parent);
|
|
1720
|
-
ssrRenderSlot(_ctx.$slots, "sale-post", {}, null, _push, _parent);
|
|
1721
|
-
_push(`</strong>`);
|
|
1722
|
-
}, _push, _parent);
|
|
1908
|
+
_push(`<strong class="${ssrRenderClass([__props.isBig ? "text-5xl block" : null, "inline-block text-base-800"])}">`);
|
|
1909
|
+
if (unref(hasVariedPrices)) {
|
|
1910
|
+
_push(`<small>${ssrInterpolate(`${"A partir de"} `)}</small>`);
|
|
1911
|
+
} else {
|
|
1912
|
+
_push(`<!---->`);
|
|
1913
|
+
}
|
|
1914
|
+
_push(` ${ssrInterpolate(_ctx.$money(unref(salePrice)))}</strong>`);
|
|
1723
1915
|
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
1724
1916
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1725
1917
|
if (_push2) {
|
|
1726
|
-
if (unref(cashbackValue)) {
|
|
1727
|
-
|
|
1728
|
-
if (__props.hasCashback) {
|
|
1729
|
-
_push2(`<div data-prices-cashback class="relative z-10"${_scopeId}><span${ssrRenderAttr("data-tooltip", "Receba $1 de volta".replace("$1", _ctx.$percentage(unref(cashbackPercentage))))}${_scopeId}>`);
|
|
1730
|
-
ssrRenderSlot(_ctx.$slots, "cashback-pre", {}, () => {
|
|
1731
|
-
_push2(`<i class="i-cashback mr-1"${_scopeId}></i>`);
|
|
1732
|
-
}, _push2, _parent2, _scopeId);
|
|
1733
|
-
ssrRenderSlot(_ctx.$slots, "cashback-value", { salePrice: unref(salePrice), cashbackValue: unref(cashbackValue), cashbackPercentage: unref(cashbackPercentage) }, () => {
|
|
1734
|
-
_push2(`<span class="font-medium"${_scopeId}>${ssrInterpolate(_ctx.$money(unref(cashbackValue)))}</span>`);
|
|
1735
|
-
}, _push2, _parent2, _scopeId);
|
|
1736
|
-
ssrRenderSlot(_ctx.$slots, "cashback-post", {}, () => {
|
|
1737
|
-
_push2(`<small${_scopeId}> cashback</small>`);
|
|
1738
|
-
}, _push2, _parent2, _scopeId);
|
|
1739
|
-
_push2(`</span></div>`);
|
|
1740
|
-
} else {
|
|
1741
|
-
_push2(`<!---->`);
|
|
1742
|
-
}
|
|
1743
|
-
}, _push2, _parent2, _scopeId);
|
|
1918
|
+
if (unref(cashbackValue) && __props.hasCashback) {
|
|
1919
|
+
_push2(`<div class="relative z-10"${_scopeId}><span${ssrRenderAttr("data-tooltip", "Receba $1 de volta".replace("$1", _ctx.$percentage(unref(cashbackPercentage))))}${_scopeId}><i class="i-cashback mr-1"${_scopeId}></i><span class="font-medium"${_scopeId}>${ssrInterpolate(_ctx.$money(unref(cashbackValue)))}</span><small${_scopeId}> cashback</small></span></div>`);
|
|
1744
1920
|
} else {
|
|
1745
1921
|
_push2(`<!---->`);
|
|
1746
1922
|
}
|
|
1747
1923
|
} else {
|
|
1748
1924
|
return [
|
|
1749
|
-
unref(cashbackValue)
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1925
|
+
unref(cashbackValue) && __props.hasCashback ? (openBlock(), createBlock("div", {
|
|
1926
|
+
key: 0,
|
|
1927
|
+
class: "relative z-10"
|
|
1928
|
+
}, [
|
|
1929
|
+
createVNode("span", {
|
|
1930
|
+
"data-tooltip": "Receba $1 de volta".replace("$1", _ctx.$percentage(unref(cashbackPercentage)))
|
|
1754
1931
|
}, [
|
|
1755
|
-
createVNode("
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
]),
|
|
1761
|
-
renderSlot$1(_ctx.$slots, "cashback-value", { salePrice: unref(salePrice), cashbackValue: unref(cashbackValue), cashbackPercentage: unref(cashbackPercentage) }, () => [
|
|
1762
|
-
createVNode("span", { class: "font-medium" }, toDisplayString(_ctx.$money(unref(cashbackValue))), 1)
|
|
1763
|
-
]),
|
|
1764
|
-
renderSlot$1(_ctx.$slots, "cashback-post", {}, () => [
|
|
1765
|
-
createVNode("small", null, " cashback")
|
|
1766
|
-
])
|
|
1767
|
-
], 8, ["data-tooltip"])
|
|
1768
|
-
])) : createCommentVNode("", true)
|
|
1769
|
-
]) : createCommentVNode("", true)
|
|
1932
|
+
createVNode("i", { class: "i-cashback mr-1" }),
|
|
1933
|
+
createVNode("span", { class: "font-medium" }, toDisplayString(_ctx.$money(unref(cashbackValue))), 1),
|
|
1934
|
+
createVNode("small", null, " cashback")
|
|
1935
|
+
], 8, ["data-tooltip"])
|
|
1936
|
+
])) : createCommentVNode("", true)
|
|
1770
1937
|
];
|
|
1771
1938
|
}
|
|
1772
1939
|
}),
|
|
1773
|
-
_:
|
|
1940
|
+
_: 1
|
|
1774
1941
|
}, _parent));
|
|
1775
1942
|
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
1776
1943
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1777
1944
|
if (_push2) {
|
|
1778
|
-
if (unref(installmentValue)) {
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
ssrRenderSlot(_ctx.$slots, "installment-post", {}, () => {
|
|
1799
|
-
if (!unref(monthlyInterest) && __props.isLiteral) {
|
|
1800
|
-
_push2(`<small${_scopeId}>${ssrInterpolate("Sem juros")}</small>`);
|
|
1801
|
-
} else {
|
|
1802
|
-
_push2(`<!---->`);
|
|
1803
|
-
}
|
|
1804
|
-
}, _push2, _parent2, _scopeId);
|
|
1805
|
-
_push2(`</div>`);
|
|
1806
|
-
} else {
|
|
1807
|
-
_push2(`<!---->`);
|
|
1808
|
-
}
|
|
1809
|
-
}, _push2, _parent2, _scopeId);
|
|
1945
|
+
if (unref(installmentValue) && __props.hasPriceOptions) {
|
|
1946
|
+
_push2(`<div${_scopeId}>`);
|
|
1947
|
+
if (__props.isLiteral) {
|
|
1948
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(`${"Até"} `)}</small>`);
|
|
1949
|
+
} else {
|
|
1950
|
+
_push2(`<!---->`);
|
|
1951
|
+
}
|
|
1952
|
+
_push2(` ${ssrInterpolate(unref(installmentsNumber))}x `);
|
|
1953
|
+
if (__props.isLiteral) {
|
|
1954
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(` ${"De"} `)}</small>`);
|
|
1955
|
+
} else {
|
|
1956
|
+
_push2(`<!---->`);
|
|
1957
|
+
}
|
|
1958
|
+
_push2(`<span${_scopeId}>${ssrInterpolate(_ctx.$money(unref(installmentValue)))}</span>`);
|
|
1959
|
+
if (!unref(monthlyInterest) && __props.isLiteral) {
|
|
1960
|
+
_push2(`<small${_scopeId}>${ssrInterpolate("Sem juros")}</small>`);
|
|
1961
|
+
} else {
|
|
1962
|
+
_push2(`<!---->`);
|
|
1963
|
+
}
|
|
1964
|
+
_push2(`</div>`);
|
|
1810
1965
|
} else {
|
|
1811
1966
|
_push2(`<!---->`);
|
|
1812
1967
|
}
|
|
1813
1968
|
} else {
|
|
1814
1969
|
return [
|
|
1815
|
-
unref(installmentValue) ?
|
|
1816
|
-
__props.
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
]),
|
|
1823
|
-
renderSlot$1(_ctx.$slots, "installment-value", { salePrice: unref(salePrice), installmentValue: unref(installmentValue), installmentsNumber: unref(installmentsNumber), monthlyInterest: unref(monthlyInterest) }, () => [
|
|
1824
|
-
createTextVNode(toDisplayString(unref(installmentsNumber)) + "x ", 1),
|
|
1825
|
-
__props.isLiteral ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(` ${"De"} `))) : createCommentVNode("", true),
|
|
1826
|
-
createVNode("span", null, toDisplayString(_ctx.$money(unref(installmentValue))), 1)
|
|
1827
|
-
]),
|
|
1828
|
-
renderSlot$1(_ctx.$slots, "installment-post", {}, () => [
|
|
1829
|
-
!unref(monthlyInterest) && __props.isLiteral ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString("Sem juros"))) : createCommentVNode("", true)
|
|
1830
|
-
])
|
|
1831
|
-
])) : createCommentVNode("", true)
|
|
1832
|
-
]) : createCommentVNode("", true)
|
|
1970
|
+
unref(installmentValue) && __props.hasPriceOptions ? (openBlock(), createBlock("div", { key: 0 }, [
|
|
1971
|
+
__props.isLiteral ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(`${"Até"} `))) : createCommentVNode("", true),
|
|
1972
|
+
createTextVNode(" " + toDisplayString(unref(installmentsNumber)) + "x ", 1),
|
|
1973
|
+
__props.isLiteral ? (openBlock(), createBlock("small", { key: 1 }, toDisplayString(` ${"De"} `))) : createCommentVNode("", true),
|
|
1974
|
+
createVNode("span", null, toDisplayString(_ctx.$money(unref(installmentValue))), 1),
|
|
1975
|
+
!unref(monthlyInterest) && __props.isLiteral ? (openBlock(), createBlock("small", { key: 2 }, toDisplayString("Sem juros"))) : createCommentVNode("", true)
|
|
1976
|
+
])) : createCommentVNode("", true)
|
|
1833
1977
|
];
|
|
1834
1978
|
}
|
|
1835
1979
|
}),
|
|
1836
|
-
_:
|
|
1980
|
+
_: 1
|
|
1837
1981
|
}, _parent));
|
|
1838
1982
|
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
1839
1983
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1840
1984
|
if (_push2) {
|
|
1841
|
-
if (unref(priceWithDiscount) < unref(salePrice)) {
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
ssrRenderSlot(_ctx.$slots, "discount-post", {}, () => {
|
|
1856
|
-
if (unref(discountLabel)) {
|
|
1857
|
-
_push2(`<small${_scopeId}>${ssrInterpolate(` ${unref(discountLabel)}`)}</small>`);
|
|
1858
|
-
} else {
|
|
1859
|
-
_push2(`<!---->`);
|
|
1860
|
-
}
|
|
1861
|
-
}, _push2, _parent2, _scopeId);
|
|
1862
|
-
_push2(`</div>`);
|
|
1863
|
-
} else {
|
|
1864
|
-
_push2(`<!---->`);
|
|
1865
|
-
}
|
|
1866
|
-
}, _push2, _parent2, _scopeId);
|
|
1985
|
+
if (unref(priceWithDiscount) < unref(salePrice) && __props.hasPriceOptions) {
|
|
1986
|
+
_push2(`<div${_scopeId}>`);
|
|
1987
|
+
if (!unref(discountLabel)) {
|
|
1988
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(`${"A partir de"} `)}</small>`);
|
|
1989
|
+
} else {
|
|
1990
|
+
_push2(`<!---->`);
|
|
1991
|
+
}
|
|
1992
|
+
_push2(`<span${_scopeId}>${ssrInterpolate(_ctx.$money(unref(priceWithDiscount)))}</span>`);
|
|
1993
|
+
if (unref(discountLabel)) {
|
|
1994
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(` ${unref(discountLabel)}`)}</small>`);
|
|
1995
|
+
} else {
|
|
1996
|
+
_push2(`<!---->`);
|
|
1997
|
+
}
|
|
1998
|
+
_push2(`</div>`);
|
|
1867
1999
|
} else {
|
|
1868
2000
|
_push2(`<!---->`);
|
|
1869
2001
|
}
|
|
1870
2002
|
} else {
|
|
1871
2003
|
return [
|
|
1872
|
-
unref(priceWithDiscount) < unref(salePrice) ?
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
renderSlot$1(_ctx.$slots, "discount-pre", {}, () => [
|
|
1878
|
-
!unref(discountLabel) ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(`${"A partir de"} `))) : createCommentVNode("", true)
|
|
1879
|
-
]),
|
|
1880
|
-
renderSlot$1(_ctx.$slots, "discount-value", { salePrice: unref(salePrice), priceWithDiscount: unref(priceWithDiscount), discountLabel: unref(discountLabel) }, () => [
|
|
1881
|
-
createVNode("span", null, toDisplayString(_ctx.$money(unref(priceWithDiscount))), 1)
|
|
1882
|
-
]),
|
|
1883
|
-
renderSlot$1(_ctx.$slots, "discount-post", {}, () => [
|
|
1884
|
-
unref(discountLabel) ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(` ${unref(discountLabel)}`), 1)) : createCommentVNode("", true)
|
|
1885
|
-
])
|
|
1886
|
-
])) : createCommentVNode("", true)
|
|
1887
|
-
]) : createCommentVNode("", true)
|
|
2004
|
+
unref(priceWithDiscount) < unref(salePrice) && __props.hasPriceOptions ? (openBlock(), createBlock("div", { key: 0 }, [
|
|
2005
|
+
!unref(discountLabel) ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(`${"A partir de"} `))) : createCommentVNode("", true),
|
|
2006
|
+
createVNode("span", null, toDisplayString(_ctx.$money(unref(priceWithDiscount))), 1),
|
|
2007
|
+
unref(discountLabel) ? (openBlock(), createBlock("small", { key: 1 }, toDisplayString(` ${unref(discountLabel)}`), 1)) : createCommentVNode("", true)
|
|
2008
|
+
])) : createCommentVNode("", true)
|
|
1888
2009
|
];
|
|
1889
2010
|
}
|
|
1890
2011
|
}),
|
|
1891
|
-
_:
|
|
2012
|
+
_: 1
|
|
1892
2013
|
}, _parent));
|
|
1893
2014
|
_push(`</div>`);
|
|
1894
2015
|
};
|
|
@@ -1898,7 +2019,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1898
2019
|
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
1899
2020
|
_sfc_main$1.setup = (props, ctx) => {
|
|
1900
2021
|
const ssrContext = useSSRContext();
|
|
1901
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/
|
|
2022
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Prices.vue");
|
|
1902
2023
|
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
1903
2024
|
};
|
|
1904
2025
|
|
|
@@ -2068,7 +2189,7 @@ const $$Home = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
2068
2189
|
</label>
|
|
2069
2190
|
</div>
|
|
2070
2191
|
</div>
|
|
2071
|
-
${renderComponent($$result, "Prices", _sfc_main$1, { "price": 10, "client:load": true, "client:component-hydration": "load", "client:component-path": "
|
|
2192
|
+
${renderComponent($$result, "Prices", _sfc_main$1, { "price": 10, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/Prices.vue", "client:component-export": "default" })}
|
|
2072
2193
|
${renderComponent($$result, "ProductCard", _sfc_main, { "client:load": true, "client:component-hydration": "load", "client:component-path": "@@sf/components/ProductCard.vue", "client:component-export": "default" })}
|
|
2073
2194
|
</main>`;
|
|
2074
2195
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro");
|