cloudcommerce 0.4.0 → 0.5.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/.github/renovate.json +1 -1
- package/CHANGELOG.md +42 -0
- package/action.yml +1 -2
- package/package.json +10 -10
- 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 +3 -3
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +2 -2
- package/packages/apps/frenet/package.json +3 -3
- package/packages/apps/galaxpay/package.json +3 -3
- package/packages/apps/google-analytics/package.json +3 -3
- package/packages/apps/infinitepay/lib/ip-create-transaction.js +1 -1
- package/packages/apps/infinitepay/lib/ip-create-transaction.js.map +1 -1
- package/packages/apps/infinitepay/package.json +3 -3
- package/packages/apps/infinitepay/src/ip-create-transaction.ts +1 -1
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +3 -3
- package/packages/apps/mercadopago/package.json +3 -3
- package/packages/apps/pagarme/package.json +4 -4
- package/packages/apps/paghiper/package.json +3 -3
- package/packages/apps/pix/package.json +3 -3
- package/packages/apps/tiny-erp/package.json +3 -3
- package/packages/apps/webhooks/CHANGELOG.md +1 -0
- package/packages/apps/webhooks/README.md +1 -0
- package/packages/apps/webhooks/lib/app-webhooks.js +9 -0
- package/packages/apps/webhooks/lib/app-webhooks.js.map +1 -0
- package/packages/apps/webhooks/lib/events-to-webhooks-app.js +127 -0
- package/packages/apps/webhooks/lib/events-to-webhooks-app.js.map +1 -0
- package/packages/apps/webhooks/lib/index.js +2 -0
- package/packages/apps/webhooks/lib/index.js.map +1 -0
- package/packages/apps/webhooks/package.json +32 -0
- package/packages/apps/webhooks/src/app-webhooks.ts +14 -0
- package/packages/apps/webhooks/src/events-to-webhooks-app.ts +178 -0
- package/packages/apps/webhooks/src/index.ts +1 -0
- package/packages/apps/webhooks/tsconfig.json +3 -0
- package/packages/cli/lib/setup-gcloud.js +120 -20
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +1 -1
- package/packages/cli/src/setup-gcloud.ts +146 -21
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/emails/tests/assets/order.json +1 -1
- package/packages/events/lib/firebase.js +2 -0
- package/packages/events/lib/firebase.js.map +1 -1
- package/packages/events/package.json +3 -2
- package/packages/events/src/firebase.ts +2 -0
- package/packages/firebase/lib/config.d.ts +4 -0
- package/packages/firebase/lib/config.js +10 -1
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/lib/handlers/check-store-events.js +13 -4
- package/packages/firebase/lib/handlers/check-store-events.js.map +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/firebase/src/config.ts +10 -7
- package/packages/firebase/src/handlers/check-store-events.ts +14 -4
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/checkout.js +7 -4
- package/packages/modules/lib/firebase/checkout.js.map +1 -1
- package/packages/modules/package.json +3 -3
- package/packages/modules/schemas/@checkout.cjs +0 -5
- package/packages/modules/schemas/create_transaction.cjs +6 -1
- package/packages/modules/src/firebase/checkout.ts +7 -4
- package/packages/passport/package.json +2 -2
- package/packages/ssr/package.json +7 -7
- package/packages/storefront/config/storefront.cms.cjs +31 -5
- package/packages/storefront/config/storefront.cms.mjs +31 -5
- package/packages/storefront/dist/client/_astro/PitchBar.df2672ff.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.99fa99bf.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductCard.a322c854.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.abd6dec6.js +1 -0
- package/packages/storefront/dist/client/_astro/_...slug_.648728f3.css +1 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.e6f0b936.js +1 -0
- package/packages/storefront/dist/client/_astro/client.e6b58b55.js +1 -0
- package/packages/storefront/dist/client/_astro/index.5dd878ac.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.e8935203.js +1 -0
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.e8b26f2c.js +1 -0
- package/packages/storefront/dist/client/fallback/index.html +12 -11
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{astro.89bd9221.mjs → astro.7d9d5f6e.mjs} +957 -850
- package/packages/storefront/dist/server/chunks/pages/{all.6379e666.mjs → all.ba8f4b85.mjs} +771 -627
- package/packages/storefront/dist/server/chunks/{prerender.a1ec39e0.mjs → prerender.8cd4ad42.mjs} +0 -0
- package/packages/storefront/dist/server/entry.mjs +113 -53
- package/packages/storefront/package.json +16 -16
- package/packages/storefront/src/lib/assets/base.css +6 -0
- package/packages/storefront/src/lib/cms.d.ts +25 -0
- package/packages/storefront/src/lib/components/Drawer.vue +10 -1
- package/packages/storefront/src/lib/composables/use-shop-header.ts +79 -0
- package/packages/storefront/src/lib/layouts/Base.astro +4 -5
- package/packages/storefront/src/lib/layouts/BaseBody.astro +3 -2
- package/packages/storefront/src/lib/layouts/BaseHead.astro +7 -7
- package/packages/storefront/src/lib/layouts/PagesHeader.astro +5 -23
- package/packages/storefront/src/lib/ssr-context.ts +3 -4
- package/packages/storefront/src/lib/state/modules-info.ts +1 -1
- package/packages/storefront/tailwind.config.cjs +0 -4
- package/packages/types/index.ts +8 -0
- package/packages/types/modules/@checkout:params.d.ts +1 -5
- package/packages/types/modules/apply_discount:params.d.ts +1 -1
- package/packages/types/modules/apply_discount:response.d.ts +1 -1
- package/packages/types/modules/calculate_shipping:params.d.ts +1 -1
- package/packages/types/modules/calculate_shipping:response.d.ts +1 -1
- package/packages/types/modules/create_transaction:params.d.ts +6 -2
- package/packages/types/modules/create_transaction:response.d.ts +1 -1
- package/packages/types/modules/list_payments:params.d.ts +1 -1
- package/packages/types/modules/list_payments:response.d.ts +1 -1
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +3 -3
- package/packages/storefront/dist/client/_astro/PitchBar.103168e6.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.b75d44d6.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.vue_vue_type_script_setup_true_lang.054033ef.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductCard.9138ec25.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.65213f83.js +0 -1
- package/packages/storefront/dist/client/_astro/_...slug_.39c46f54.css +0 -1
- package/packages/storefront/dist/client/_astro/client.eba0daa7.js +0 -1
- package/packages/storefront/dist/client/_astro/index.7577af70.js +0 -1
- package/packages/storefront/dist/client/_astro/modules-info.0c999f60.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-core.esm-bundler.4da3640b.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.0869e112.js +0 -1
- package/packages/storefront/src/lib/components/ShopHeader.vue +0 -110
- package/packages/storefront/src/lib/components/ShopSidenav.vue +0 -26
- package/packages/storefront/src/lib/types/cms-code.d.ts +0 -5
- package/packages/storefront/src/lib/types/cms-contacts.d.ts +0 -5
- package/packages/storefront/src/lib/types/cms-header.d.ts +0 -5
- package/packages/storefront/src/lib/types/cms-settings.d.ts +0 -8
- package/packages/storefront/src/lib/types/cms-social.d.ts +0 -5
|
@@ -9,18 +9,25 @@ import 'node:os';
|
|
|
9
9
|
import sizeOf from 'image-size';
|
|
10
10
|
import 'magic-string';
|
|
11
11
|
import 'node:stream';
|
|
12
|
-
import '
|
|
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';
|
|
12
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, b as addAttribute, u as unescapeHTML, m as maybeRenderHead, d as renderSlot, e as renderComponent, f as renderHead, F as Fragment, s as spreadAttributes } from '../astro.7d9d5f6e.mjs';
|
|
14
13
|
import api from '@cloudcommerce/api';
|
|
15
|
-
import { reactive, computed, defineComponent, inject,
|
|
16
|
-
import { ssrRenderAttrs, ssrRenderSlot, ssrRenderClass, ssrRenderVNode, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrInterpolate } from 'vue/server-renderer';
|
|
14
|
+
import { reactive, computed, defineComponent, inject, useSSRContext, mergeProps, ref, watch, toRef, onMounted, onBeforeUnmount, provide, createVNode, resolveDynamicComponent, withCtx, renderSlot as renderSlot$1, withDirectives, vShow, openBlock, createBlock, createCommentVNode, Fragment as Fragment$1, renderList, resolveComponent, withModifiers, Teleport, toDisplayString, createTextVNode } from 'vue';
|
|
17
15
|
import { img, price, formatMoney, onPromotion } from '@ecomplus/utils';
|
|
16
|
+
import { ssrRenderAttrs, ssrRenderSlot, ssrRenderClass, ssrRenderVNode, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr, ssrRenderTeleport, ssrInterpolate } from 'vue/server-renderer';
|
|
18
17
|
/* empty css */import { EventEmitter } from 'node:events';
|
|
19
18
|
import fs, { readFileSync } from 'node:fs';
|
|
20
19
|
import config from '@cloudcommerce/config';
|
|
21
20
|
import { resolve as resolve$1 } from 'path';
|
|
22
21
|
/* empty css */import { useScroll, useElementHover, useDebounceFn, useTimeout, promiseTimeout } from '@vueuse/core';
|
|
23
22
|
|
|
23
|
+
const _export_sfc = (sfc, props) => {
|
|
24
|
+
const target = sfc.__vccOpts || sfc;
|
|
25
|
+
for (const [key, val] of props) {
|
|
26
|
+
target[key] = val;
|
|
27
|
+
}
|
|
28
|
+
return target;
|
|
29
|
+
};
|
|
30
|
+
|
|
24
31
|
function isOutputFormat(value) {
|
|
25
32
|
return ["avif", "jpeg", "jpg", "png", "webp"].includes(value);
|
|
26
33
|
}
|
|
@@ -243,12 +250,38 @@ const getCMS = () => {
|
|
|
243
250
|
const dirContent = resolve(baseDir, 'content');
|
|
244
251
|
|
|
245
252
|
const cms = (filename) => {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
// MUST be sync for 'settings'
|
|
254
|
+
// Async with other content to support external CMS integration
|
|
255
|
+
const loadLocal = () => {
|
|
256
|
+
if (filename.endsWith('/')) {
|
|
257
|
+
const dirColl = resolve(dirContent, filename);
|
|
258
|
+
return new Promise((resolve) => {
|
|
259
|
+
const slugs = fs.existsSync(dirColl)
|
|
260
|
+
? fs.readdirSync(dirColl).map((file) => file.replace('.json', ''))
|
|
261
|
+
: [];
|
|
262
|
+
resolve(slugs);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
const filepath = resolve(dirContent, `${filename}.json`);
|
|
266
|
+
const content = fs.existsSync(filepath)
|
|
267
|
+
? JSON.parse(fs.readFileSync(filepath, 'utf8'))
|
|
268
|
+
: null;
|
|
269
|
+
return filename === 'settings'
|
|
270
|
+
? content
|
|
271
|
+
: new Promise((resolve) => { resolve(content); });
|
|
272
|
+
};
|
|
273
|
+
const handler = globalThis.storefront_cms_handler;
|
|
274
|
+
if (typeof handler === 'function') {
|
|
275
|
+
try {
|
|
276
|
+
const content = handler({ dirContent, filename, loadLocal });
|
|
277
|
+
if (content) {
|
|
278
|
+
return content;
|
|
279
|
+
}
|
|
280
|
+
} catch {
|
|
281
|
+
//
|
|
282
|
+
}
|
|
249
283
|
}
|
|
250
|
-
|
|
251
|
-
return JSON.parse(fs.readFileSync(filepath, 'utf8'));
|
|
284
|
+
return loadLocal();
|
|
252
285
|
};
|
|
253
286
|
|
|
254
287
|
let settings;
|
|
@@ -363,7 +396,7 @@ const loadPageContext = async (Astro, {
|
|
|
363
396
|
];
|
|
364
397
|
if (slug) {
|
|
365
398
|
if (cmsCollection) {
|
|
366
|
-
cmsContent = config.cms(`${cmsCollection}/${slug}`);
|
|
399
|
+
cmsContent = await config.cms(`${cmsCollection}/${slug}`);
|
|
367
400
|
} else {
|
|
368
401
|
apiFetchings[0] = api.get(`slugs/${slug}`, apiOptions);
|
|
369
402
|
}
|
|
@@ -421,7 +454,7 @@ const loadPageContext = async (Astro, {
|
|
|
421
454
|
return pageContext;
|
|
422
455
|
};
|
|
423
456
|
|
|
424
|
-
const pwaInfo =
|
|
457
|
+
const pwaInfo = undefined;
|
|
425
458
|
|
|
426
459
|
function isRemoteImage(src) {
|
|
427
460
|
return /^(https?:)?\/\//.test(src);
|
|
@@ -568,7 +601,7 @@ async function getPicture(params) {
|
|
|
568
601
|
throw new Error("[@astrojs/image] `src` is required");
|
|
569
602
|
}
|
|
570
603
|
if (!widths || !Array.isArray(widths)) {
|
|
571
|
-
throw new Error("[@astrojs/image] at least one `width` is required");
|
|
604
|
+
throw new Error("[@astrojs/image] at least one `width` is required. ex: `widths={[100]}`");
|
|
572
605
|
}
|
|
573
606
|
const aspectRatio = await resolveAspectRatio(params);
|
|
574
607
|
if (!aspectRatio) {
|
|
@@ -685,7 +718,7 @@ const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
685
718
|
isLowResolution: true
|
|
686
719
|
})).src : "/favicon.ico";
|
|
687
720
|
const canonicalUrl = new URL(Astro2.url.pathname, Astro2.site || `https://${domain}`);
|
|
688
|
-
const
|
|
721
|
+
const cmsMetatags = await cms("metatags");
|
|
689
722
|
const ogLocale = lang.length === 2 ? lang : lang.substring(0, 2) + lang.slice(3).toUpperCase();
|
|
690
723
|
let ogImage;
|
|
691
724
|
if (apiDoc) {
|
|
@@ -693,8 +726,8 @@ const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
693
726
|
ogImage = picture && picture.url;
|
|
694
727
|
}
|
|
695
728
|
if (!ogImage) {
|
|
696
|
-
if (
|
|
697
|
-
ogImage =
|
|
729
|
+
if (cmsMetatags?.og_image) {
|
|
730
|
+
ogImage = cmsMetatags.og_image.charAt(0) === "/" ? `https://${domain}${cmsMetatags.og_image}` : cmsMetatags.og_image;
|
|
698
731
|
}
|
|
699
732
|
} else {
|
|
700
733
|
ogImage = ogImage.replace(/(\w+\.)?(ecoms\d)\.com/i, "$2-nyc3.nyc3.cdn.digitaloceanspaces.com");
|
|
@@ -718,11 +751,11 @@ const $$BaseHead = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
718
751
|
<meta property="og:type" content="website">
|
|
719
752
|
<meta property="og:locale"${addAttribute(ogLocale, "content")}>
|
|
720
753
|
${ogImage && renderTemplate`<meta property="og:image"${addAttribute(ogImage, "content")}>`}
|
|
721
|
-
${
|
|
754
|
+
${cmsMetatags?.fb_app_id && renderTemplate`<meta property="fb:app_id"${addAttribute(cmsMetatags.fb_app_id, "content")}>`}
|
|
722
755
|
<meta name="twitter:card" content="summary">
|
|
723
|
-
${
|
|
756
|
+
${cmsMetatags?.twitter_username && renderTemplate`<meta name="twitter:site"${addAttribute(cmsMetatags.twitter_username, "content")}>`}
|
|
724
757
|
<meta name="ecom-store-id"${addAttribute(String(storeId), "content")}>
|
|
725
|
-
${pwaInfo
|
|
758
|
+
${pwaInfo }
|
|
726
759
|
`;
|
|
727
760
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseHead.astro");
|
|
728
761
|
|
|
@@ -797,10 +830,11 @@ const $$BaseBody = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
797
830
|
const Astro2 = $$result.createAstro($$Astro$e, $$props, $$slots);
|
|
798
831
|
Astro2.self = $$BaseBody;
|
|
799
832
|
return renderTemplate`${maybeRenderHead($$result)}<body>
|
|
800
|
-
<div id="teleported-
|
|
833
|
+
<div id="teleported-overlap" class="relative z-50"></div>
|
|
834
|
+
<div id="teleported-top" class="relative z-0"></div>
|
|
801
835
|
${renderSlot($$result, $$slots["default"])}
|
|
802
836
|
${renderSlot($$result, $$slots["before-body-end"])}
|
|
803
|
-
<div id="teleported-bottom"></div>
|
|
837
|
+
<div id="teleported-bottom" class="relative z-0"></div>
|
|
804
838
|
</body>`;
|
|
805
839
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/BaseBody.astro");
|
|
806
840
|
|
|
@@ -810,16 +844,16 @@ const $$Base$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
810
844
|
Astro2.self = $$Base$1;
|
|
811
845
|
const { pageContext, title } = Astro2.props;
|
|
812
846
|
const { cms } = pageContext;
|
|
813
|
-
const cmsCustomCode = cms("code");
|
|
847
|
+
const cmsCustomCode = await cms("code");
|
|
814
848
|
return renderTemplate`<head>
|
|
815
849
|
${renderComponent($$result, "BaseHead", $$BaseHead, { "pageContext": pageContext, "title": title })}
|
|
816
850
|
${renderComponent($$result, "BaseStateJson", $$BaseStateJson, { "pageContext": pageContext })}
|
|
817
|
-
${cmsCustomCode
|
|
818
|
-
${cmsCustomCode
|
|
851
|
+
${cmsCustomCode?.css && renderTemplate`<style>{cmsCustomCode.css}</style>`}
|
|
852
|
+
${cmsCustomCode?.html_head && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(cmsCustomCode.html_head)}` })}`}
|
|
819
853
|
${renderSlot($$result, $$slots["base-head-scripts"])}
|
|
820
854
|
${renderSlot($$result, $$slots["before-head-end"])}
|
|
821
855
|
${renderHead($$result)}</head>
|
|
822
|
-
${renderComponent($$result, "BaseBody", $$BaseBody, { "pageContext": pageContext }, { "default": () => renderTemplate`${renderSlot($$
|
|
856
|
+
${renderComponent($$result, "BaseBody", $$BaseBody, { "pageContext": pageContext }, { "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["default"])}${cmsCustomCode?.html_body && renderTemplate`${renderComponent($$result2, "Fragment", Fragment, {}, { "default": ($$result3) => renderTemplate`${unescapeHTML(cmsCustomCode.html_body)}` })}`}${renderSlot($$result2, $$slots["base-body-scripts"])}${renderSlot($$result2, $$slots["before-body-end"])}` })}`;
|
|
823
857
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/layouts/Base.astro");
|
|
824
858
|
|
|
825
859
|
var __freeze = Object.freeze;
|
|
@@ -838,7 +872,7 @@ const $$Base = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
838
872
|
const Astro2 = $$result.createAstro($$Astro$b, $$props, $$slots);
|
|
839
873
|
Astro2.self = $$Base;
|
|
840
874
|
const { pageContext, title } = Astro2.props;
|
|
841
|
-
return renderTemplate`${renderComponent($$result, "Base", $$Base$1, { "pageContext": pageContext, "title": title }, { "before-head-end": () => renderTemplate`${renderComponent($$
|
|
875
|
+
return renderTemplate`${renderComponent($$result, "Base", $$Base$1, { "pageContext": pageContext, "title": title }, { "before-head-end": ($$result2) => renderTemplate`${renderComponent($$result2, "InlineScripts", $$InlineScripts, { "slot": "before-head-end" })}`, "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["default"])}` })}`;
|
|
842
876
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Base.astro");
|
|
843
877
|
|
|
844
878
|
const $$Astro$a = createAstro("https://ecom2-002.web.app");
|
|
@@ -888,7 +922,7 @@ const $$Picture$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
888
922
|
delete image.height;
|
|
889
923
|
return renderTemplate`${maybeRenderHead($$result)}<picture>
|
|
890
924
|
${sources.map((attrs2) => renderTemplate`<source${spreadAttributes(attrs2)}${addAttribute(sizes, "sizes")}>`)}
|
|
891
|
-
<img${spreadAttributes(image)}${addAttribute(loading, "loading")}${addAttribute(decoding, "decoding")}${
|
|
925
|
+
<img${spreadAttributes(image)}${addAttribute(loading, "loading")}${addAttribute(decoding, "decoding")}${spreadAttributes(attrs)}>
|
|
892
926
|
</picture>`;
|
|
893
927
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/node_modules/@astrojs/image/components/Picture.astro");
|
|
894
928
|
|
|
@@ -977,7 +1011,7 @@ loadingGlobalInfoPreset.then((modulesInfoPreset) => {
|
|
|
977
1011
|
});
|
|
978
1012
|
const parsePhrase = (phrase, modName, varName, formatValue = formatMoney) => {
|
|
979
1013
|
return computed(() => {
|
|
980
|
-
const searchString = `{
|
|
1014
|
+
const searchString = `{${varName}}`;
|
|
981
1015
|
const index = phrase.indexOf(searchString);
|
|
982
1016
|
if (index > -1) {
|
|
983
1017
|
const fieldValue = modulesInfo[modName][varName];
|
|
@@ -1011,38 +1045,40 @@ const usePitchBar = (props) => {
|
|
|
1011
1045
|
|
|
1012
1046
|
const carouselKey = Symbol("carousel");
|
|
1013
1047
|
|
|
1014
|
-
const _sfc_main$
|
|
1048
|
+
const _sfc_main$8 = defineComponent({
|
|
1015
1049
|
__name: "CarouselControl",
|
|
1016
|
-
__ssrInlineRender: true,
|
|
1017
1050
|
props: {
|
|
1018
1051
|
direction: { default: 1 }
|
|
1019
1052
|
},
|
|
1020
|
-
setup(__props) {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
"data-carousel-control": __props.direction > 0 ? "next" : "previous"
|
|
1027
|
-
}, _attrs))}>`);
|
|
1028
|
-
ssrRenderSlot(_ctx.$slots, "default", {}, () => {
|
|
1029
|
-
_push(`<i class="${ssrRenderClass([__props.direction > 0 ? "i-chevron-right" : "i-chevron-left", "m-0"])}"></i>`);
|
|
1030
|
-
}, _push, _parent);
|
|
1031
|
-
_push(`</button>`);
|
|
1032
|
-
};
|
|
1053
|
+
setup(__props, { expose }) {
|
|
1054
|
+
expose();
|
|
1055
|
+
const { changeSlide } = inject(carouselKey);
|
|
1056
|
+
const __returned__ = { changeSlide };
|
|
1057
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1058
|
+
return __returned__;
|
|
1033
1059
|
}
|
|
1034
1060
|
});
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1061
|
+
function _sfc_ssrRender$8(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1062
|
+
_push(`<button${ssrRenderAttrs(mergeProps({
|
|
1063
|
+
type: "button",
|
|
1064
|
+
"aria-label": $props.direction > 0 ? "Pr\xF3ximo" : "Anterior",
|
|
1065
|
+
"data-carousel-control": $props.direction > 0 ? "next" : "previous"
|
|
1066
|
+
}, _attrs))}>`);
|
|
1067
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, () => {
|
|
1068
|
+
_push(`<i class="${ssrRenderClass([$props.direction > 0 ? "i-chevron-right" : "i-chevron-left", "m-0"])}"></i>`);
|
|
1069
|
+
}, _push, _parent);
|
|
1070
|
+
_push(`</button>`);
|
|
1071
|
+
}
|
|
1072
|
+
const _sfc_setup$8 = _sfc_main$8.setup;
|
|
1073
|
+
_sfc_main$8.setup = (props, ctx) => {
|
|
1038
1074
|
const ssrContext = useSSRContext();
|
|
1039
1075
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CarouselControl.vue");
|
|
1040
|
-
return _sfc_setup$
|
|
1076
|
+
return _sfc_setup$8 ? _sfc_setup$8(props, ctx) : void 0;
|
|
1041
1077
|
};
|
|
1078
|
+
const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["ssrRender", _sfc_ssrRender$8]]);
|
|
1042
1079
|
|
|
1043
|
-
const _sfc_main$
|
|
1080
|
+
const _sfc_main$7 = defineComponent({
|
|
1044
1081
|
__name: "Carousel",
|
|
1045
|
-
__ssrInlineRender: true,
|
|
1046
1082
|
props: {
|
|
1047
1083
|
as: { default: "ul" },
|
|
1048
1084
|
modelValue: { default: 1 },
|
|
@@ -1051,7 +1087,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1051
1087
|
emits: [
|
|
1052
1088
|
"update:modelValue"
|
|
1053
1089
|
],
|
|
1054
|
-
setup(__props, { emit }) {
|
|
1090
|
+
setup(__props, { expose, emit }) {
|
|
1091
|
+
expose();
|
|
1055
1092
|
const props = __props;
|
|
1056
1093
|
const currentIndex = ref(props.modelValue - 1);
|
|
1057
1094
|
watch(toRef(props, "modelValue"), (modelValue) => {
|
|
@@ -1155,7 +1192,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1155
1192
|
calcCurrentIndex();
|
|
1156
1193
|
calcIndexCount();
|
|
1157
1194
|
};
|
|
1158
|
-
useDebounceFn(calcOnInit, 400);
|
|
1195
|
+
const onResize = useDebounceFn(calcOnInit, 400);
|
|
1159
1196
|
onMounted(() => {
|
|
1160
1197
|
calcOnInit();
|
|
1161
1198
|
});
|
|
@@ -1168,184 +1205,188 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1168
1205
|
isBoundLeft,
|
|
1169
1206
|
isBoundRight
|
|
1170
1207
|
});
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
ref_key: "wrapper",
|
|
1179
|
-
ref: wrapper,
|
|
1180
|
-
"data-carousel-wrapper": ""
|
|
1181
|
-
}, {
|
|
1182
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1183
|
-
if (_push2) {
|
|
1184
|
-
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
|
|
1185
|
-
} else {
|
|
1186
|
-
return [
|
|
1187
|
-
renderSlot$1(_ctx.$slots, "default")
|
|
1188
|
-
];
|
|
1189
|
-
}
|
|
1190
|
-
}),
|
|
1191
|
-
_: 3
|
|
1192
|
-
}), _parent);
|
|
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 }, {
|
|
1201
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1202
|
-
if (_push2) {
|
|
1203
|
-
ssrRenderSlot(_ctx.$slots, "previous", {}, null, _push2, _parent2, _scopeId);
|
|
1204
|
-
} else {
|
|
1205
|
-
return [
|
|
1206
|
-
renderSlot$1(_ctx.$slots, "previous")
|
|
1207
|
-
];
|
|
1208
|
-
}
|
|
1209
|
-
}),
|
|
1210
|
-
_: 3
|
|
1211
|
-
}, _parent));
|
|
1212
|
-
_push(ssrRenderComponent(_sfc_main$7, null, {
|
|
1213
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1214
|
-
if (_push2) {
|
|
1215
|
-
ssrRenderSlot(_ctx.$slots, "next", {}, null, _push2, _parent2, _scopeId);
|
|
1216
|
-
} else {
|
|
1217
|
-
return [
|
|
1218
|
-
renderSlot$1(_ctx.$slots, "next")
|
|
1219
|
-
];
|
|
1220
|
-
}
|
|
1221
|
-
}),
|
|
1222
|
-
_: 3
|
|
1223
|
-
}, _parent));
|
|
1224
|
-
}, _push, _parent);
|
|
1225
|
-
_push(`</div>`);
|
|
1226
|
-
};
|
|
1208
|
+
const __returned__ = { props, emit, currentIndex, wrapper, currentPos, isScrolling, arrivedState, isBoundLeft, isBoundRight, slidesWidth, wrapperScrollWidth, wrapperVisibleWidth, indexCount, calcWrapperWidth, calcSlidesWidth, calcNextWidth, calcCurrentIndex, calcIndexCount, get autoplayTimer() {
|
|
1209
|
+
return autoplayTimer;
|
|
1210
|
+
}, set autoplayTimer(v) {
|
|
1211
|
+
autoplayTimer = v;
|
|
1212
|
+
}, restartAutoplay, changeSlide, carousel, isHovered, calcOnInit, onResize, CarouselControl };
|
|
1213
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1214
|
+
return __returned__;
|
|
1227
1215
|
}
|
|
1228
1216
|
});
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1217
|
+
function _sfc_ssrRender$7(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1218
|
+
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
1219
|
+
ref: "carousel",
|
|
1220
|
+
"data-carousel": ""
|
|
1221
|
+
}, _attrs))}>`);
|
|
1222
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), {
|
|
1223
|
+
ref: "wrapper",
|
|
1224
|
+
"data-carousel-wrapper": ""
|
|
1225
|
+
}, {
|
|
1226
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1227
|
+
if (_push2) {
|
|
1228
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
|
|
1229
|
+
} else {
|
|
1230
|
+
return [
|
|
1231
|
+
renderSlot$1(_ctx.$slots, "default")
|
|
1232
|
+
];
|
|
1233
|
+
}
|
|
1234
|
+
}),
|
|
1235
|
+
_: 3
|
|
1236
|
+
}), _parent);
|
|
1237
|
+
ssrRenderSlot(_ctx.$slots, "controls", {
|
|
1238
|
+
changeSlide: $setup.changeSlide,
|
|
1239
|
+
isBoundLeft: $setup.isBoundLeft,
|
|
1240
|
+
isBoundRight: $setup.isBoundRight,
|
|
1241
|
+
currentPage: $setup.currentIndex + 1,
|
|
1242
|
+
pageCount: $setup.indexCount + 1
|
|
1243
|
+
}, () => {
|
|
1244
|
+
_push(ssrRenderComponent($setup["CarouselControl"], { direction: -1 }, {
|
|
1245
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1246
|
+
if (_push2) {
|
|
1247
|
+
ssrRenderSlot(_ctx.$slots, "previous", {}, null, _push2, _parent2, _scopeId);
|
|
1248
|
+
} else {
|
|
1249
|
+
return [
|
|
1250
|
+
renderSlot$1(_ctx.$slots, "previous")
|
|
1251
|
+
];
|
|
1252
|
+
}
|
|
1253
|
+
}),
|
|
1254
|
+
_: 3
|
|
1255
|
+
}, _parent));
|
|
1256
|
+
_push(ssrRenderComponent($setup["CarouselControl"], null, {
|
|
1257
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1258
|
+
if (_push2) {
|
|
1259
|
+
ssrRenderSlot(_ctx.$slots, "next", {}, null, _push2, _parent2, _scopeId);
|
|
1260
|
+
} else {
|
|
1261
|
+
return [
|
|
1262
|
+
renderSlot$1(_ctx.$slots, "next")
|
|
1263
|
+
];
|
|
1264
|
+
}
|
|
1265
|
+
}),
|
|
1266
|
+
_: 3
|
|
1267
|
+
}, _parent));
|
|
1268
|
+
}, _push, _parent);
|
|
1269
|
+
_push(`</div>`);
|
|
1270
|
+
}
|
|
1271
|
+
const _sfc_setup$7 = _sfc_main$7.setup;
|
|
1272
|
+
_sfc_main$7.setup = (props, ctx) => {
|
|
1232
1273
|
const ssrContext = useSSRContext();
|
|
1233
1274
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Carousel.vue");
|
|
1234
|
-
return _sfc_setup$
|
|
1275
|
+
return _sfc_setup$7 ? _sfc_setup$7(props, ctx) : void 0;
|
|
1235
1276
|
};
|
|
1277
|
+
const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["ssrRender", _sfc_ssrRender$7]]);
|
|
1236
1278
|
|
|
1237
|
-
const _sfc_main$
|
|
1279
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1238
1280
|
__name: "PitchBar",
|
|
1239
|
-
__ssrInlineRender: true,
|
|
1240
1281
|
props: {
|
|
1241
1282
|
slides: null
|
|
1242
1283
|
},
|
|
1243
|
-
setup(__props) {
|
|
1284
|
+
setup(__props, { expose }) {
|
|
1285
|
+
expose();
|
|
1244
1286
|
const props = __props;
|
|
1245
1287
|
const {
|
|
1246
1288
|
parsedContents,
|
|
1247
1289
|
countValidSlides
|
|
1248
1290
|
} = usePitchBar(props);
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1291
|
+
const __returned__ = { props, parsedContents, countValidSlides, Carousel, CarouselControl };
|
|
1292
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1293
|
+
return __returned__;
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
function _sfc_ssrRender$6(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1297
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "bg-base-100 relative z-1" }, _attrs))}><div class="container md:w-2/3 mx-auto px-3 py-1">`);
|
|
1298
|
+
_push(ssrRenderComponent($setup["Carousel"], {
|
|
1299
|
+
autoplay: $setup.countValidSlides > 1 ? 7e3 : null
|
|
1300
|
+
}, {
|
|
1301
|
+
controls: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1302
|
+
if (_push2) {
|
|
1303
|
+
_push2(`<div style="${ssrRenderStyle($setup.countValidSlides > 1 ? null : { display: "none" })}" class="text-xl leading-none text-base-400"${_scopeId}>`);
|
|
1304
|
+
_push2(ssrRenderComponent($setup["CarouselControl"], {
|
|
1305
|
+
direction: -1,
|
|
1306
|
+
class: "pr-2 bg-base-100 hover:text-base-700"
|
|
1307
|
+
}, null, _parent2, _scopeId));
|
|
1308
|
+
_push2(ssrRenderComponent($setup["CarouselControl"], { class: "pl-2 bg-base-100 hover:text-base-700" }, null, _parent2, _scopeId));
|
|
1309
|
+
_push2(`</div>`);
|
|
1310
|
+
} else {
|
|
1311
|
+
return [
|
|
1312
|
+
withDirectives(createVNode("div", { class: "text-xl leading-none text-base-400" }, [
|
|
1313
|
+
createVNode($setup["CarouselControl"], {
|
|
1258
1314
|
direction: -1,
|
|
1259
1315
|
class: "pr-2 bg-base-100 hover:text-base-700"
|
|
1260
|
-
},
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1316
|
+
}),
|
|
1317
|
+
createVNode($setup["CarouselControl"], { class: "pl-2 bg-base-100 hover:text-base-700" })
|
|
1318
|
+
], 512), [
|
|
1319
|
+
[vShow, $setup.countValidSlides > 1]
|
|
1320
|
+
])
|
|
1321
|
+
];
|
|
1322
|
+
}
|
|
1323
|
+
}),
|
|
1324
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1325
|
+
if (_push2) {
|
|
1326
|
+
_push2(`<!--[-->`);
|
|
1327
|
+
ssrRenderList($props.slides, (slide, i) => {
|
|
1328
|
+
_push2(`<li${_scopeId}>`);
|
|
1329
|
+
ssrRenderVNode(_push2, createVNode(resolveDynamicComponent(slide.href ? "ALink" : "span"), {
|
|
1330
|
+
href: slide.href,
|
|
1331
|
+
target: slide.target,
|
|
1332
|
+
class: ["inline-block px-8", slide.href ? "hover:underline" : null]
|
|
1333
|
+
}, {
|
|
1334
|
+
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
1335
|
+
if (_push3) {
|
|
1336
|
+
if ($setup.parsedContents[i]) {
|
|
1337
|
+
_push3(`<span class="prose text-sm text-base-800"${_scopeId2}>${$setup.parsedContents[i]}</span>`);
|
|
1338
|
+
} else {
|
|
1339
|
+
_push3(`<!---->`);
|
|
1340
|
+
}
|
|
1341
|
+
} else {
|
|
1342
|
+
return [
|
|
1343
|
+
$setup.parsedContents[i] ? (openBlock(), createBlock("span", {
|
|
1344
|
+
key: 0,
|
|
1345
|
+
innerHTML: $setup.parsedContents[i],
|
|
1346
|
+
class: "prose text-sm text-base-800"
|
|
1347
|
+
}, null, 8, ["innerHTML"])) : createCommentVNode("", true)
|
|
1348
|
+
];
|
|
1349
|
+
}
|
|
1350
|
+
}),
|
|
1351
|
+
_: 2
|
|
1352
|
+
}), _parent2, _scopeId);
|
|
1353
|
+
_push2(`</li>`);
|
|
1354
|
+
});
|
|
1355
|
+
_push2(`<!--]-->`);
|
|
1356
|
+
} else {
|
|
1357
|
+
return [
|
|
1358
|
+
(openBlock(true), createBlock(Fragment$1, null, renderList($props.slides, (slide, i) => {
|
|
1359
|
+
return openBlock(), createBlock("li", { key: i }, [
|
|
1360
|
+
(openBlock(), createBlock(resolveDynamicComponent(slide.href ? "ALink" : "span"), {
|
|
1283
1361
|
href: slide.href,
|
|
1284
1362
|
target: slide.target,
|
|
1285
1363
|
class: ["inline-block px-8", slide.href ? "hover:underline" : null]
|
|
1286
1364
|
}, {
|
|
1287
|
-
default: withCtx((
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
} else {
|
|
1295
|
-
return [
|
|
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)
|
|
1301
|
-
];
|
|
1302
|
-
}
|
|
1303
|
-
}),
|
|
1365
|
+
default: withCtx(() => [
|
|
1366
|
+
$setup.parsedContents[i] ? (openBlock(), createBlock("span", {
|
|
1367
|
+
key: 0,
|
|
1368
|
+
innerHTML: $setup.parsedContents[i],
|
|
1369
|
+
class: "prose text-sm text-base-800"
|
|
1370
|
+
}, null, 8, ["innerHTML"])) : createCommentVNode("", true)
|
|
1371
|
+
]),
|
|
1304
1372
|
_: 2
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
}, {
|
|
1318
|
-
default: withCtx(() => [
|
|
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)
|
|
1324
|
-
]),
|
|
1325
|
-
_: 2
|
|
1326
|
-
}, 1032, ["href", "target", "class"]))
|
|
1327
|
-
]);
|
|
1328
|
-
}), 128))
|
|
1329
|
-
];
|
|
1330
|
-
}
|
|
1331
|
-
}),
|
|
1332
|
-
_: 1
|
|
1333
|
-
}, _parent));
|
|
1334
|
-
_push(`</div></div>`);
|
|
1335
|
-
};
|
|
1336
|
-
}
|
|
1337
|
-
});
|
|
1338
|
-
|
|
1339
|
-
const _sfc_setup$5 = _sfc_main$5.setup;
|
|
1340
|
-
_sfc_main$5.setup = (props, ctx) => {
|
|
1373
|
+
}, 1032, ["href", "target", "class"]))
|
|
1374
|
+
]);
|
|
1375
|
+
}), 128))
|
|
1376
|
+
];
|
|
1377
|
+
}
|
|
1378
|
+
}),
|
|
1379
|
+
_: 1
|
|
1380
|
+
}, _parent));
|
|
1381
|
+
_push(`</div></div>`);
|
|
1382
|
+
}
|
|
1383
|
+
const _sfc_setup$6 = _sfc_main$6.setup;
|
|
1384
|
+
_sfc_main$6.setup = (props, ctx) => {
|
|
1341
1385
|
const ssrContext = useSSRContext();
|
|
1342
1386
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/PitchBar.vue");
|
|
1343
|
-
return _sfc_setup$
|
|
1387
|
+
return _sfc_setup$6 ? _sfc_setup$6(props, ctx) : void 0;
|
|
1344
1388
|
};
|
|
1345
|
-
|
|
1346
|
-
const i19myAccount = "Minha conta";
|
|
1347
|
-
const i19openCart = "Abrir carrinho";
|
|
1348
|
-
const i19searchProducts = "Buscar produtos";
|
|
1389
|
+
const PitchBar = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["ssrRender", _sfc_ssrRender$6]]);
|
|
1349
1390
|
|
|
1350
1391
|
const useStickyHeader = (props) => {
|
|
1351
1392
|
const {
|
|
@@ -1389,9 +1430,58 @@ const useStickyHeader = (props) => {
|
|
|
1389
1430
|
};
|
|
1390
1431
|
};
|
|
1391
1432
|
|
|
1392
|
-
const
|
|
1433
|
+
const filterMainCategories = (categories) => {
|
|
1434
|
+
return categories.filter(({ slug, parent }) => {
|
|
1435
|
+
return slug && !parent;
|
|
1436
|
+
});
|
|
1437
|
+
};
|
|
1438
|
+
const filterSubcategories = (categories, parentCategory) => {
|
|
1439
|
+
return categories.filter(({ slug, parent }) => {
|
|
1440
|
+
if (slug && parent) {
|
|
1441
|
+
return parent._id === parentCategory._id || parent.slug && parent.slug === parentCategory.slug;
|
|
1442
|
+
}
|
|
1443
|
+
return false;
|
|
1444
|
+
});
|
|
1445
|
+
};
|
|
1446
|
+
const useShopHeader = (props) => {
|
|
1447
|
+
const { header } = props;
|
|
1448
|
+
const {
|
|
1449
|
+
isSticky,
|
|
1450
|
+
staticHeight,
|
|
1451
|
+
staticY
|
|
1452
|
+
} = useStickyHeader({ header });
|
|
1453
|
+
const positionY = computed(() => {
|
|
1454
|
+
return isSticky.value ? header.value.offsetHeight : staticY.value;
|
|
1455
|
+
});
|
|
1456
|
+
const mainCategories = filterMainCategories(props.categories);
|
|
1457
|
+
const getSubcategories = (parentCategory) => {
|
|
1458
|
+
return filterSubcategories(props.categories, parentCategory);
|
|
1459
|
+
};
|
|
1460
|
+
const getCategoryTree = (parentCategory) => {
|
|
1461
|
+
return {
|
|
1462
|
+
...parentCategory,
|
|
1463
|
+
subcategories: getSubcategories(parentCategory).map((subcategory) => {
|
|
1464
|
+
return getCategoryTree(subcategory);
|
|
1465
|
+
})
|
|
1466
|
+
};
|
|
1467
|
+
};
|
|
1468
|
+
const categoryTrees = mainCategories.map(getCategoryTree);
|
|
1469
|
+
const isSidenavOpen = ref(false);
|
|
1470
|
+
return {
|
|
1471
|
+
isSticky,
|
|
1472
|
+
staticHeight,
|
|
1473
|
+
staticY,
|
|
1474
|
+
positionY,
|
|
1475
|
+
mainCategories,
|
|
1476
|
+
getSubcategories,
|
|
1477
|
+
getCategoryTree,
|
|
1478
|
+
categoryTrees,
|
|
1479
|
+
isSidenavOpen
|
|
1480
|
+
};
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
const _sfc_main$5 = defineComponent({
|
|
1393
1484
|
__name: "Drawer",
|
|
1394
|
-
__ssrInlineRender: true,
|
|
1395
1485
|
props: {
|
|
1396
1486
|
modelValue: { type: Boolean, default: false },
|
|
1397
1487
|
placement: { default: "start" },
|
|
@@ -1401,7 +1491,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1401
1491
|
emits: [
|
|
1402
1492
|
"update:modelValue"
|
|
1403
1493
|
],
|
|
1404
|
-
setup(__props, { emit }) {
|
|
1494
|
+
setup(__props, { expose, emit }) {
|
|
1495
|
+
expose();
|
|
1405
1496
|
const props = __props;
|
|
1406
1497
|
const close = () => emit("update:modelValue", false);
|
|
1407
1498
|
const drawer = ref(null);
|
|
@@ -1446,209 +1537,264 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1446
1537
|
const isPlacementX = computed(() => {
|
|
1447
1538
|
return props.placement === "start" || props.placement === "end";
|
|
1448
1539
|
});
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
} else {
|
|
1475
|
-
_push2(`<!---->`);
|
|
1476
|
-
}
|
|
1540
|
+
const __returned__ = { props, emit, close, drawer, outsideClickListener, escClickListener, slideTo, isFixed, isPlacementX };
|
|
1541
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1542
|
+
return __returned__;
|
|
1543
|
+
}
|
|
1544
|
+
});
|
|
1545
|
+
function _sfc_ssrRender$5(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1546
|
+
const _component_Fade = resolveComponent("Fade");
|
|
1547
|
+
_push(ssrRenderComponent(_component_Fade, mergeProps({
|
|
1548
|
+
slide: $setup.slideTo,
|
|
1549
|
+
speed: "slow",
|
|
1550
|
+
"is-floating": ""
|
|
1551
|
+
}, _attrs), {
|
|
1552
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1553
|
+
if (_push2) {
|
|
1554
|
+
if ($props.modelValue) {
|
|
1555
|
+
_push2(`<dialog class="${ssrRenderClass([[
|
|
1556
|
+
$props.position,
|
|
1557
|
+
$setup.isFixed ? `top-0 left-0 ${$setup.isPlacementX ? "h-screen" : ""}` : null
|
|
1558
|
+
], "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 h-full"${_scopeId}>`);
|
|
1559
|
+
if ($props.hasCloseButton) {
|
|
1560
|
+
_push2(`<button type="button"${ssrRenderAttr("aria-label", "Fechar")} class="${ssrRenderClass([$props.placement === "end" ? "left-2" : "right-2", "absolute top-2"])}" data-drawer-close${_scopeId}>`);
|
|
1561
|
+
ssrRenderSlot(_ctx.$slots, "close", {}, () => {
|
|
1562
|
+
_push2(`<i class="i-close text-base-400 text-3xl"${_scopeId}></i>`);
|
|
1563
|
+
}, _push2, _parent2, _scopeId);
|
|
1564
|
+
_push2(`</button>`);
|
|
1477
1565
|
} else {
|
|
1478
|
-
|
|
1479
|
-
|
|
1566
|
+
_push2(`<!---->`);
|
|
1567
|
+
}
|
|
1568
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId);
|
|
1569
|
+
_push2(`</div>`);
|
|
1570
|
+
ssrRenderTeleport(_push2, (_push3) => {
|
|
1571
|
+
_push3(ssrRenderComponent(_component_Fade, null, {
|
|
1572
|
+
default: withCtx((_2, _push4, _parent3, _scopeId2) => {
|
|
1573
|
+
if (_push4) {
|
|
1574
|
+
if ($props.modelValue) {
|
|
1575
|
+
_push4(`<div class="fixed top-0 left-0 w-screen h-screen bg-black/50 z-40" data-drawer-backdrop${_scopeId2}></div>`);
|
|
1576
|
+
} else {
|
|
1577
|
+
_push4(`<!---->`);
|
|
1578
|
+
}
|
|
1579
|
+
} else {
|
|
1580
|
+
return [
|
|
1581
|
+
$props.modelValue ? (openBlock(), createBlock("div", {
|
|
1582
|
+
key: 0,
|
|
1583
|
+
class: "fixed top-0 left-0 w-screen h-screen bg-black/50 z-40",
|
|
1584
|
+
"data-drawer-backdrop": ""
|
|
1585
|
+
})) : createCommentVNode("", true)
|
|
1586
|
+
];
|
|
1587
|
+
}
|
|
1588
|
+
}),
|
|
1589
|
+
_: 1
|
|
1590
|
+
}, _parent2, _scopeId));
|
|
1591
|
+
}, "#teleported-top", false, _parent2);
|
|
1592
|
+
_push2(`</dialog>`);
|
|
1593
|
+
} else {
|
|
1594
|
+
_push2(`<!---->`);
|
|
1595
|
+
}
|
|
1596
|
+
} else {
|
|
1597
|
+
return [
|
|
1598
|
+
$props.modelValue ? (openBlock(), createBlock("dialog", {
|
|
1599
|
+
key: 0,
|
|
1600
|
+
ref: "drawer",
|
|
1601
|
+
class: ["w-screen max-w-sm shadow p-0 m-0 z-50", [
|
|
1602
|
+
$props.position,
|
|
1603
|
+
$setup.isFixed ? `top-0 left-0 ${$setup.isPlacementX ? "h-screen" : ""}` : null
|
|
1604
|
+
]],
|
|
1605
|
+
open: $props.modelValue,
|
|
1606
|
+
"data-drawer": $props.placement
|
|
1607
|
+
}, [
|
|
1608
|
+
createVNode("div", { class: "relative h-full" }, [
|
|
1609
|
+
$props.hasCloseButton ? (openBlock(), createBlock("button", {
|
|
1480
1610
|
key: 0,
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
]],
|
|
1487
|
-
open: __props.modelValue,
|
|
1488
|
-
"data-drawer": __props.placement
|
|
1611
|
+
type: "button",
|
|
1612
|
+
"aria-label": "Fechar",
|
|
1613
|
+
onClick: withModifiers($setup.close, ["prevent"]),
|
|
1614
|
+
class: ["absolute top-2", $props.placement === "end" ? "left-2" : "right-2"],
|
|
1615
|
+
"data-drawer-close": ""
|
|
1489
1616
|
}, [
|
|
1490
|
-
|
|
1491
|
-
|
|
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")
|
|
1617
|
+
renderSlot$1(_ctx.$slots, "close", {}, () => [
|
|
1618
|
+
createVNode("i", { class: "i-close text-base-400 text-3xl" })
|
|
1504
1619
|
])
|
|
1505
|
-
], 10, ["
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1620
|
+
], 10, ["onClick"])) : createCommentVNode("", true),
|
|
1621
|
+
renderSlot$1(_ctx.$slots, "default")
|
|
1622
|
+
]),
|
|
1623
|
+
(openBlock(), createBlock(Teleport, { to: "#teleported-top" }, [
|
|
1624
|
+
createVNode(_component_Fade, null, {
|
|
1625
|
+
default: withCtx(() => [
|
|
1626
|
+
$props.modelValue ? (openBlock(), createBlock("div", {
|
|
1627
|
+
key: 0,
|
|
1628
|
+
class: "fixed top-0 left-0 w-screen h-screen bg-black/50 z-40",
|
|
1629
|
+
"data-drawer-backdrop": ""
|
|
1630
|
+
})) : createCommentVNode("", true)
|
|
1631
|
+
]),
|
|
1632
|
+
_: 1
|
|
1633
|
+
})
|
|
1634
|
+
]))
|
|
1635
|
+
], 10, ["open", "data-drawer"])) : createCommentVNode("", true)
|
|
1636
|
+
];
|
|
1637
|
+
}
|
|
1638
|
+
}),
|
|
1639
|
+
_: 3
|
|
1640
|
+
}, _parent));
|
|
1641
|
+
}
|
|
1642
|
+
const _sfc_setup$5 = _sfc_main$5.setup;
|
|
1643
|
+
_sfc_main$5.setup = (props, ctx) => {
|
|
1644
|
+
const ssrContext = useSSRContext();
|
|
1645
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/Drawer.vue");
|
|
1646
|
+
return _sfc_setup$5 ? _sfc_setup$5(props, ctx) : void 0;
|
|
1647
|
+
};
|
|
1648
|
+
const Drawer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["ssrRender", _sfc_ssrRender$5]]);
|
|
1649
|
+
|
|
1650
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1651
|
+
__name: "ShopSidenavCategory",
|
|
1652
|
+
props: {
|
|
1653
|
+
categoryTree: null
|
|
1654
|
+
},
|
|
1655
|
+
setup(__props, { expose }) {
|
|
1656
|
+
expose();
|
|
1657
|
+
const isOpen = ref(false);
|
|
1658
|
+
const isFaded = ref(true);
|
|
1659
|
+
watch(isOpen, (_isOpen) => {
|
|
1660
|
+
if (_isOpen) {
|
|
1661
|
+
setTimeout(() => {
|
|
1662
|
+
isFaded.value = false;
|
|
1663
|
+
}, 25);
|
|
1664
|
+
} else {
|
|
1665
|
+
isFaded.value = true;
|
|
1666
|
+
}
|
|
1667
|
+
});
|
|
1668
|
+
const __returned__ = { isOpen, isFaded };
|
|
1669
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1670
|
+
return __returned__;
|
|
1512
1671
|
}
|
|
1513
1672
|
});
|
|
1514
|
-
|
|
1673
|
+
function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1674
|
+
const _component_ShopSidenavCategory = resolveComponent("ShopSidenavCategory", true);
|
|
1675
|
+
_push(`<li${ssrRenderAttrs(mergeProps({ class: "text-lg text-base-800" }, _attrs))}>`);
|
|
1676
|
+
if ($props.categoryTree.subcategories.length) {
|
|
1677
|
+
_push(`<details class="bg-white overflow-y-auto overflow-x-hidden z-10 open:absolute open:top-0 open:left-0 open:w-full open:h-full"><summary class="${ssrRenderClass([$setup.isOpen ? "bg-base-100" : null, "cursor-pointer list-none px-6 py-3 active:bg-base-100 transition-colors"])}"><i class="${ssrRenderClass(!$setup.isOpen ? "i-arrow-right float-right mb-0 mt-1 text-xl text-base-500" : "i-arrow-left text-lg")}"></i>`);
|
|
1678
|
+
if (!$setup.isOpen && $props.categoryTree.icon) {
|
|
1679
|
+
_push(`<img loading="lazy"${ssrRenderAttr("src", $props.categoryTree.icon.url)} class="w-auto h-5 inline mr-3">`);
|
|
1680
|
+
} else {
|
|
1681
|
+
_push(`<!---->`);
|
|
1682
|
+
}
|
|
1683
|
+
_push(`<h3 class="${ssrRenderClass([$setup.isOpen ? "ml-4 text-base" : null, "inline"])}">${ssrInterpolate($props.categoryTree.name)}</h3></summary><ul class="${ssrRenderClass([$setup.isFaded ? "opacity-20" : "opacity-100", "mt-2 transition-opacity"])}" tabindex="-1"><!--[-->`);
|
|
1684
|
+
ssrRenderList($props.categoryTree.subcategories, (subcategoryTree) => {
|
|
1685
|
+
_push(ssrRenderComponent(_component_ShopSidenavCategory, {
|
|
1686
|
+
key: subcategoryTree._id,
|
|
1687
|
+
"category-tree": subcategoryTree
|
|
1688
|
+
}, null, _parent));
|
|
1689
|
+
});
|
|
1690
|
+
_push(`<!--]--><li><a${ssrRenderAttr("href", `/${$props.categoryTree.slug}`)} class="block px-6 py-3 text-base underline active:bg-base-200">${ssrInterpolate("Ver toda a categoria $1".replace("$1", $props.categoryTree.name))}</a></li></ul></details>`);
|
|
1691
|
+
} else {
|
|
1692
|
+
_push(`<a${ssrRenderAttr("href", `/${$props.categoryTree.slug}`)} class="block px-6 py-3 active:bg-base-200">`);
|
|
1693
|
+
if (!$setup.isOpen && $props.categoryTree.icon) {
|
|
1694
|
+
_push(`<img loading="lazy"${ssrRenderAttr("src", $props.categoryTree.icon.url)} class="w-auto h-5 inline mr-3">`);
|
|
1695
|
+
} else {
|
|
1696
|
+
_push(`<!---->`);
|
|
1697
|
+
}
|
|
1698
|
+
_push(`<h3 class="inline">${ssrInterpolate($props.categoryTree.name)}</h3></a>`);
|
|
1699
|
+
}
|
|
1700
|
+
_push(`</li>`);
|
|
1701
|
+
}
|
|
1515
1702
|
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
1516
1703
|
_sfc_main$4.setup = (props, ctx) => {
|
|
1517
1704
|
const ssrContext = useSSRContext();
|
|
1518
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/
|
|
1705
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenavCategory.vue");
|
|
1519
1706
|
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
1520
1707
|
};
|
|
1708
|
+
const ShopSidenavCategory = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["ssrRender", _sfc_ssrRender$4]]);
|
|
1521
1709
|
|
|
1522
1710
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1523
1711
|
__name: "ShopSidenav",
|
|
1524
|
-
__ssrInlineRender: true,
|
|
1525
1712
|
props: {
|
|
1526
|
-
|
|
1713
|
+
categoryTrees: null
|
|
1527
1714
|
},
|
|
1528
|
-
setup(__props) {
|
|
1529
|
-
|
|
1530
|
-
const
|
|
1531
|
-
|
|
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
|
-
};
|
|
1715
|
+
setup(__props, { expose }) {
|
|
1716
|
+
expose();
|
|
1717
|
+
const __returned__ = { ShopSidenavCategory };
|
|
1718
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1719
|
+
return __returned__;
|
|
1540
1720
|
}
|
|
1541
1721
|
});
|
|
1542
|
-
|
|
1722
|
+
function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1723
|
+
_push(`<aside${ssrRenderAttrs(mergeProps({ class: "flex flex-col h-full" }, _attrs))}><nav class="py-4 grow"><ul class="relative h-full"><!--[-->`);
|
|
1724
|
+
ssrRenderList($props.categoryTrees, (categoryTree) => {
|
|
1725
|
+
_push(ssrRenderComponent($setup["ShopSidenavCategory"], {
|
|
1726
|
+
key: categoryTree._id,
|
|
1727
|
+
"category-tree": categoryTree
|
|
1728
|
+
}, null, _parent));
|
|
1729
|
+
});
|
|
1730
|
+
_push(`<!--]--></ul></nav></aside>`);
|
|
1731
|
+
}
|
|
1543
1732
|
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
1544
1733
|
_sfc_main$3.setup = (props, ctx) => {
|
|
1545
1734
|
const ssrContext = useSSRContext();
|
|
1546
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/
|
|
1735
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopSidenav.vue");
|
|
1547
1736
|
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
1548
1737
|
};
|
|
1738
|
+
const ShopSidenav = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$3]]);
|
|
1549
1739
|
|
|
1550
1740
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1551
1741
|
__name: "ShopHeader",
|
|
1552
|
-
__ssrInlineRender: true,
|
|
1553
1742
|
props: {
|
|
1554
1743
|
categories: null
|
|
1555
1744
|
},
|
|
1556
|
-
setup(__props) {
|
|
1557
|
-
|
|
1558
|
-
|
|
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);
|
|
1745
|
+
setup(__props, { expose }) {
|
|
1746
|
+
expose();
|
|
1747
|
+
const props = __props;
|
|
1578
1748
|
const header = ref(null);
|
|
1579
1749
|
const {
|
|
1580
1750
|
isSticky,
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
});
|
|
1587
|
-
return
|
|
1588
|
-
_push(`<header${ssrRenderAttrs(mergeProps({
|
|
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>`);
|
|
1597
|
-
}, _push, _parent);
|
|
1598
|
-
_push(`</button></div>`);
|
|
1599
|
-
}, _push, _parent);
|
|
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>`);
|
|
1642
|
-
};
|
|
1751
|
+
positionY,
|
|
1752
|
+
categoryTrees,
|
|
1753
|
+
isSidenavOpen
|
|
1754
|
+
} = useShopHeader({ ...props, header });
|
|
1755
|
+
const __returned__ = { props, header, isSticky, positionY, categoryTrees, isSidenavOpen, Drawer, ShopSidenav };
|
|
1756
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
1757
|
+
return __returned__;
|
|
1643
1758
|
}
|
|
1644
1759
|
});
|
|
1645
|
-
|
|
1760
|
+
function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1761
|
+
_push(`<header${ssrRenderAttrs(mergeProps({
|
|
1762
|
+
ref: "header",
|
|
1763
|
+
class: ["top-0 z-50 transition-colors", [
|
|
1764
|
+
$setup.isSticky && !$setup.isSidenavOpen ? "bg-white/80" : "bg-white",
|
|
1765
|
+
$setup.isSticky ? "backdrop-blur-md shadow py-2 md:py-3" : "py-3 sm:py-4 md:py-5"
|
|
1766
|
+
]]
|
|
1767
|
+
}, _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"><div class="md:hidden"><button class="px-2 my-1"${ssrRenderAttr("aria-label", "Abrir/fechar menu")}><i class="${ssrRenderClass([$setup.isSidenavOpen ? "i-close" : "i-menu", "text-base-500 text-3xl"])}"></i></button></div>`);
|
|
1768
|
+
ssrRenderSlot(_ctx.$slots, "logo", {}, null, _push, _parent);
|
|
1769
|
+
_push(`<nav class="hidden md:block"></nav><div class="px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800"><button${ssrRenderAttr("aria-label", "Buscar produtos")}><i class="i-search w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button class="hidden sm:block"${ssrRenderAttr("aria-label", "Minha conta")}><i class="i-account w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button><button${ssrRenderAttr("aria-label", "Abrir carrinho")}><i class="i-shopping-cart w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button></div></div>`);
|
|
1770
|
+
_push(ssrRenderComponent($setup["Drawer"], {
|
|
1771
|
+
modelValue: $setup.isSidenavOpen,
|
|
1772
|
+
"onUpdate:modelValue": ($event) => $setup.isSidenavOpen = $event,
|
|
1773
|
+
"has-close-button": false,
|
|
1774
|
+
position: "absolute",
|
|
1775
|
+
class: "mt-3 -z-1",
|
|
1776
|
+
style: { height: `calc(100vh - ${$setup.positionY}px + .5rem)` }
|
|
1777
|
+
}, {
|
|
1778
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1779
|
+
if (_push2) {
|
|
1780
|
+
_push2(ssrRenderComponent($setup["ShopSidenav"], mergeProps({ class: "bg-white pt-6" }, { categoryTrees: $setup.categoryTrees }), null, _parent2, _scopeId));
|
|
1781
|
+
} else {
|
|
1782
|
+
return [
|
|
1783
|
+
createVNode($setup["ShopSidenav"], mergeProps({ class: "bg-white pt-6" }, { categoryTrees: $setup.categoryTrees }), null, 16)
|
|
1784
|
+
];
|
|
1785
|
+
}
|
|
1786
|
+
}),
|
|
1787
|
+
_: 1
|
|
1788
|
+
}, _parent));
|
|
1789
|
+
_push(`</header>`);
|
|
1790
|
+
}
|
|
1646
1791
|
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
1647
1792
|
_sfc_main$2.setup = (props, ctx) => {
|
|
1648
1793
|
const ssrContext = useSSRContext();
|
|
1649
|
-
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/
|
|
1794
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/ShopHeader.vue");
|
|
1650
1795
|
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
1651
1796
|
};
|
|
1797
|
+
const ShopHeader = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
|
|
1652
1798
|
|
|
1653
1799
|
const $$Astro$7 = createAstro("https://ecom2-002.web.app");
|
|
1654
1800
|
const $$PagesHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -1658,33 +1804,25 @@ const $$PagesHeader = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1658
1804
|
pageContext: {
|
|
1659
1805
|
isHomepage,
|
|
1660
1806
|
apiState,
|
|
1661
|
-
settings,
|
|
1662
1807
|
cms
|
|
1663
1808
|
}
|
|
1664
1809
|
} = Astro2.props;
|
|
1665
|
-
const
|
|
1810
|
+
const cmsHeader = await cms("header");
|
|
1666
1811
|
const pitchBar = { slides: [] };
|
|
1667
|
-
if (
|
|
1668
|
-
pitchBar.slides =
|
|
1669
|
-
} else if (header.marketing_stripe) {
|
|
1670
|
-
pitchBar.slides = [{
|
|
1671
|
-
href: header.marketing_stripe.link,
|
|
1672
|
-
html: header.marketing_stripe.text
|
|
1673
|
-
}];
|
|
1812
|
+
if (cmsHeader?.pitch_bar) {
|
|
1813
|
+
pitchBar.slides = cmsHeader.pitch_bar;
|
|
1674
1814
|
}
|
|
1675
1815
|
const shopHeader = {
|
|
1676
1816
|
categories: apiState.categories
|
|
1677
1817
|
};
|
|
1678
1818
|
const LogoHeading = Astro2.props.logoHeading || (isHomepage ? "h1" : "h2");
|
|
1679
|
-
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": () => renderTemplate`${renderSlot($$
|
|
1680
|
-
${pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$
|
|
1681
|
-
${pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$
|
|
1682
|
-
`)}${renderSlot($$
|
|
1683
|
-
${renderComponent($$
|
|
1684
|
-
${maybeRenderHead($$
|
|
1685
|
-
${renderComponent($$
|
|
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
|
-
`)}` })}
|
|
1819
|
+
return renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["pitch-bar"], renderTemplate`
|
|
1820
|
+
${pitchBar.slides.length > 1 && renderTemplate`${renderComponent($$result2, "PitchBar", PitchBar, { ...pitchBar, "client:idle": true, "client:component-hydration": "idle", "client:component-path": "~/components/PitchBar.vue", "client:component-export": "default" })}`}
|
|
1821
|
+
${pitchBar.slides.length === 1 && renderTemplate`${renderComponent($$result2, "PitchBar", PitchBar, { ...pitchBar })}`}
|
|
1822
|
+
`)}${renderSlot($$result2, $$slots["sticky-header"], renderTemplate`
|
|
1823
|
+
${renderComponent($$result2, "ShopHeader", ShopHeader, { ...shopHeader, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/ShopHeader.vue", "client:component-export": "default" }, { "logo": ($$result3) => renderTemplate`${renderComponent($$result3, "Fragment", Fragment, { "slot": "logo" }, { "default": ($$result4) => renderTemplate`${renderSlot($$result4, $$slots["logo"], renderTemplate`
|
|
1824
|
+
${maybeRenderHead($$result4)}<a href="/">
|
|
1825
|
+
${renderComponent($$result4, "LogoHeading", LogoHeading, {}, { "default": ($$result5) => renderTemplate`${renderSlot($$result5, $$slots["logo-picture"])}` })}
|
|
1688
1826
|
</a>
|
|
1689
1827
|
`)}` })}` })}
|
|
1690
1828
|
`)}` })}`;
|
|
@@ -1696,9 +1834,9 @@ const $$Pages = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1696
1834
|
Astro2.self = $$Pages;
|
|
1697
1835
|
const { pageContext, title } = Astro2.props;
|
|
1698
1836
|
const { settings } = pageContext;
|
|
1699
|
-
return renderTemplate`${renderComponent($$result, "Base", $$Base, { "pageContext": pageContext, "title": title }, { "default": () => renderTemplate`${renderSlot($$
|
|
1700
|
-
${renderComponent($$
|
|
1701
|
-
`)}${renderSlot($$
|
|
1837
|
+
return renderTemplate`${renderComponent($$result, "Base", $$Base, { "pageContext": pageContext, "title": title }, { "default": ($$result2) => renderTemplate`${renderSlot($$result2, $$slots["header"], renderTemplate`
|
|
1838
|
+
${renderComponent($$result2, "Header", $$PagesHeader, { "pageContext": pageContext }, { "logo-picture": ($$result3) => renderTemplate`${renderComponent($$result3, "Picture", $$Picture, { "slot": "logo-picture", "src": settings.logo, "alt": settings.name, "widths": [300], "sizes": "150px", "fetchpriority": "high", "class": "hover:drop-shadow-sm" })}` })}
|
|
1839
|
+
`)}${renderSlot($$result2, $$slots["default"])}` })}`;
|
|
1702
1840
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/layouts/Pages.astro");
|
|
1703
1841
|
|
|
1704
1842
|
const getPriceWithDiscount = (price, discount) => {
|
|
@@ -1853,9 +1991,8 @@ const usePrices = (props) => {
|
|
|
1853
1991
|
};
|
|
1854
1992
|
};
|
|
1855
1993
|
|
|
1856
|
-
const _sfc_main$1 =
|
|
1994
|
+
const _sfc_main$1 = defineComponent({
|
|
1857
1995
|
__name: "Prices",
|
|
1858
|
-
__ssrInlineRender: true,
|
|
1859
1996
|
props: {
|
|
1860
1997
|
product: null,
|
|
1861
1998
|
price: null,
|
|
@@ -1868,7 +2005,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1868
2005
|
hasCashback: { type: Boolean, default: true },
|
|
1869
2006
|
hasPriceOptions: { type: Boolean, default: true }
|
|
1870
2007
|
},
|
|
1871
|
-
setup(__props) {
|
|
2008
|
+
setup(__props, { expose }) {
|
|
2009
|
+
expose();
|
|
1872
2010
|
const props = __props;
|
|
1873
2011
|
const {
|
|
1874
2012
|
hasVariedPrices,
|
|
@@ -1882,267 +2020,273 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1882
2020
|
priceWithDiscount,
|
|
1883
2021
|
discountLabel
|
|
1884
2022
|
} = usePrices(props);
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
2023
|
+
const __returned__ = { props, hasVariedPrices, salePrice, comparePrice, cashbackPercentage, cashbackValue, installmentsNumber, monthlyInterest, installmentValue, priceWithDiscount, discountLabel };
|
|
2024
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
2025
|
+
return __returned__;
|
|
2026
|
+
}
|
|
2027
|
+
});
|
|
2028
|
+
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2029
|
+
const _component_Fade = resolveComponent("Fade");
|
|
2030
|
+
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
2031
|
+
class: ["text-base-600", $props.isBig ? "text-lg" : null],
|
|
2032
|
+
"data-prices": ""
|
|
2033
|
+
}, _attrs))}>`);
|
|
2034
|
+
if ($setup.comparePrice) {
|
|
2035
|
+
_push(`<span class="text-base-500 mr-1">`);
|
|
2036
|
+
if ($props.isLiteral) {
|
|
2037
|
+
_push(`<small>${ssrInterpolate(`${"De"} `)}</small>`);
|
|
2038
|
+
} else {
|
|
2039
|
+
_push(`<!---->`);
|
|
2040
|
+
}
|
|
2041
|
+
_push(`<s>${ssrInterpolate(_ctx.$money($setup.comparePrice))}</s>`);
|
|
2042
|
+
if ($props.isLiteral) {
|
|
2043
|
+
_push(`<small>${ssrInterpolate(` ${"Por"}`)}</small>`);
|
|
2044
|
+
} else {
|
|
2045
|
+
_push(`<!---->`);
|
|
2046
|
+
}
|
|
2047
|
+
_push(`</span>`);
|
|
2048
|
+
} else {
|
|
2049
|
+
_push(`<!---->`);
|
|
2050
|
+
}
|
|
2051
|
+
_push(`<strong class="${ssrRenderClass([$props.isBig ? "text-5xl block" : null, "inline-block text-base-800"])}">`);
|
|
2052
|
+
if ($setup.hasVariedPrices) {
|
|
2053
|
+
_push(`<small>${ssrInterpolate(`${"A partir de"} `)}</small>`);
|
|
2054
|
+
} else {
|
|
2055
|
+
_push(`<!---->`);
|
|
2056
|
+
}
|
|
2057
|
+
_push(` ${ssrInterpolate(_ctx.$money($setup.salePrice))}</strong>`);
|
|
2058
|
+
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
2059
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2060
|
+
if (_push2) {
|
|
2061
|
+
if ($setup.cashbackValue && $props.hasCashback) {
|
|
2062
|
+
_push2(`<div class="relative z-10"${_scopeId}><span${ssrRenderAttr("data-tooltip", "Receba $1 de volta".replace("$1", _ctx.$percentage($setup.cashbackPercentage)))}${_scopeId}><i class="i-cashback mr-1"${_scopeId}></i><span class="font-medium"${_scopeId}>${ssrInterpolate(_ctx.$money($setup.cashbackValue))}</span><small${_scopeId}> cashback</small></span></div>`);
|
|
1901
2063
|
} else {
|
|
1902
|
-
|
|
2064
|
+
_push2(`<!---->`);
|
|
1903
2065
|
}
|
|
1904
|
-
_push(`</span>`);
|
|
1905
|
-
} else {
|
|
1906
|
-
_push(`<!---->`);
|
|
1907
|
-
}
|
|
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
2066
|
} else {
|
|
1912
|
-
|
|
2067
|
+
return [
|
|
2068
|
+
$setup.cashbackValue && $props.hasCashback ? (openBlock(), createBlock("div", {
|
|
2069
|
+
key: 0,
|
|
2070
|
+
class: "relative z-10"
|
|
2071
|
+
}, [
|
|
2072
|
+
createVNode("span", {
|
|
2073
|
+
"data-tooltip": "Receba $1 de volta".replace("$1", _ctx.$percentage($setup.cashbackPercentage))
|
|
2074
|
+
}, [
|
|
2075
|
+
createVNode("i", { class: "i-cashback mr-1" }),
|
|
2076
|
+
createVNode("span", { class: "font-medium" }, toDisplayString(_ctx.$money($setup.cashbackValue)), 1),
|
|
2077
|
+
createVNode("small", null, " cashback")
|
|
2078
|
+
], 8, ["data-tooltip"])
|
|
2079
|
+
])) : createCommentVNode("", true)
|
|
2080
|
+
];
|
|
1913
2081
|
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
2082
|
+
}),
|
|
2083
|
+
_: 1
|
|
2084
|
+
}, _parent));
|
|
2085
|
+
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
2086
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2087
|
+
if (_push2) {
|
|
2088
|
+
if ($setup.installmentValue && $props.hasPriceOptions) {
|
|
2089
|
+
_push2(`<div${_scopeId}>`);
|
|
2090
|
+
if ($props.isLiteral) {
|
|
2091
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(`${"At\xE9"} `)}</small>`);
|
|
1923
2092
|
} else {
|
|
1924
|
-
|
|
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)))
|
|
1931
|
-
}, [
|
|
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)
|
|
1937
|
-
];
|
|
2093
|
+
_push2(`<!---->`);
|
|
1938
2094
|
}
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
1943
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1944
|
-
if (_push2) {
|
|
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>`);
|
|
1965
|
-
} else {
|
|
1966
|
-
_push2(`<!---->`);
|
|
1967
|
-
}
|
|
2095
|
+
_push2(` ${ssrInterpolate($setup.installmentsNumber)}x `);
|
|
2096
|
+
if ($props.isLiteral) {
|
|
2097
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(` ${"De"} `)}</small>`);
|
|
1968
2098
|
} else {
|
|
1969
|
-
|
|
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)
|
|
1977
|
-
];
|
|
2099
|
+
_push2(`<!---->`);
|
|
1978
2100
|
}
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
1983
|
-
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1984
|
-
if (_push2) {
|
|
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>`);
|
|
1999
|
-
} else {
|
|
2000
|
-
_push2(`<!---->`);
|
|
2001
|
-
}
|
|
2101
|
+
_push2(`<span${_scopeId}>${ssrInterpolate(_ctx.$money($setup.installmentValue))}</span>`);
|
|
2102
|
+
if (!$setup.monthlyInterest && $props.isLiteral) {
|
|
2103
|
+
_push2(`<small${_scopeId}>${ssrInterpolate("Sem juros")}</small>`);
|
|
2002
2104
|
} else {
|
|
2003
|
-
|
|
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)
|
|
2009
|
-
];
|
|
2105
|
+
_push2(`<!---->`);
|
|
2010
2106
|
}
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2107
|
+
_push2(`</div>`);
|
|
2108
|
+
} else {
|
|
2109
|
+
_push2(`<!---->`);
|
|
2110
|
+
}
|
|
2111
|
+
} else {
|
|
2112
|
+
return [
|
|
2113
|
+
$setup.installmentValue && $props.hasPriceOptions ? (openBlock(), createBlock("div", { key: 0 }, [
|
|
2114
|
+
$props.isLiteral ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(`${"At\xE9"} `))) : createCommentVNode("", true),
|
|
2115
|
+
createTextVNode(" " + toDisplayString($setup.installmentsNumber) + "x ", 1),
|
|
2116
|
+
$props.isLiteral ? (openBlock(), createBlock("small", { key: 1 }, toDisplayString(` ${"De"} `))) : createCommentVNode("", true),
|
|
2117
|
+
createVNode("span", null, toDisplayString(_ctx.$money($setup.installmentValue)), 1),
|
|
2118
|
+
!$setup.monthlyInterest && $props.isLiteral ? (openBlock(), createBlock("small", { key: 2 }, toDisplayString("Sem juros"))) : createCommentVNode("", true)
|
|
2119
|
+
])) : createCommentVNode("", true)
|
|
2120
|
+
];
|
|
2121
|
+
}
|
|
2122
|
+
}),
|
|
2123
|
+
_: 1
|
|
2124
|
+
}, _parent));
|
|
2125
|
+
_push(ssrRenderComponent(_component_Fade, { slide: "down" }, {
|
|
2126
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2127
|
+
if (_push2) {
|
|
2128
|
+
if ($setup.priceWithDiscount < $setup.salePrice && $props.hasPriceOptions) {
|
|
2129
|
+
_push2(`<div${_scopeId}>`);
|
|
2130
|
+
if (!$setup.discountLabel) {
|
|
2131
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(`${"A partir de"} `)}</small>`);
|
|
2132
|
+
} else {
|
|
2133
|
+
_push2(`<!---->`);
|
|
2134
|
+
}
|
|
2135
|
+
_push2(`<span${_scopeId}>${ssrInterpolate(_ctx.$money($setup.priceWithDiscount))}</span>`);
|
|
2136
|
+
if ($setup.discountLabel) {
|
|
2137
|
+
_push2(`<small${_scopeId}>${ssrInterpolate(` ${$setup.discountLabel}`)}</small>`);
|
|
2138
|
+
} else {
|
|
2139
|
+
_push2(`<!---->`);
|
|
2140
|
+
}
|
|
2141
|
+
_push2(`</div>`);
|
|
2142
|
+
} else {
|
|
2143
|
+
_push2(`<!---->`);
|
|
2144
|
+
}
|
|
2145
|
+
} else {
|
|
2146
|
+
return [
|
|
2147
|
+
$setup.priceWithDiscount < $setup.salePrice && $props.hasPriceOptions ? (openBlock(), createBlock("div", { key: 0 }, [
|
|
2148
|
+
!$setup.discountLabel ? (openBlock(), createBlock("small", { key: 0 }, toDisplayString(`${"A partir de"} `))) : createCommentVNode("", true),
|
|
2149
|
+
createVNode("span", null, toDisplayString(_ctx.$money($setup.priceWithDiscount)), 1),
|
|
2150
|
+
$setup.discountLabel ? (openBlock(), createBlock("small", { key: 1 }, toDisplayString(` ${$setup.discountLabel}`), 1)) : createCommentVNode("", true)
|
|
2151
|
+
])) : createCommentVNode("", true)
|
|
2152
|
+
];
|
|
2153
|
+
}
|
|
2154
|
+
}),
|
|
2155
|
+
_: 1
|
|
2156
|
+
}, _parent));
|
|
2157
|
+
_push(`</div>`);
|
|
2158
|
+
}
|
|
2019
2159
|
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
2020
2160
|
_sfc_main$1.setup = (props, ctx) => {
|
|
2021
2161
|
const ssrContext = useSSRContext();
|
|
2022
2162
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Prices.vue");
|
|
2023
2163
|
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
2024
2164
|
};
|
|
2165
|
+
const Prices = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
|
|
2025
2166
|
|
|
2026
|
-
const _sfc_main =
|
|
2167
|
+
const _sfc_main = defineComponent({
|
|
2027
2168
|
__name: "ProductCard",
|
|
2028
|
-
__ssrInlineRender: true,
|
|
2029
2169
|
props: {
|
|
2030
2170
|
as: { default: "div" }
|
|
2031
2171
|
},
|
|
2032
|
-
setup(__props) {
|
|
2172
|
+
setup(__props, { expose }) {
|
|
2173
|
+
expose();
|
|
2033
2174
|
const price = ref(12);
|
|
2034
2175
|
const isBig = ref(false);
|
|
2035
2176
|
setTimeout(() => {
|
|
2036
2177
|
price.value = 8;
|
|
2037
2178
|
isBig.value = true;
|
|
2038
2179
|
}, 5e3);
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
if (_push2) {
|
|
2043
|
-
_push2(ssrRenderComponent(_sfc_main$1, null, {
|
|
2044
|
-
default: withCtx(({ salePrice }, _push3, _parent3, _scopeId2) => {
|
|
2045
|
-
if (_push3) {
|
|
2046
|
-
_push3(` ProductCard ${ssrInterpolate(salePrice)}`);
|
|
2047
|
-
} else {
|
|
2048
|
-
return [
|
|
2049
|
-
createTextVNode(" ProductCard " + toDisplayString(salePrice), 1)
|
|
2050
|
-
];
|
|
2051
|
-
}
|
|
2052
|
-
}),
|
|
2053
|
-
_: 1
|
|
2054
|
-
}, _parent2, _scopeId));
|
|
2055
|
-
_push2(ssrRenderComponent(_sfc_main$1, {
|
|
2056
|
-
product: { price: price.value }
|
|
2057
|
-
}, null, _parent2, _scopeId));
|
|
2058
|
-
_push2(ssrRenderComponent(_sfc_main$1, {
|
|
2059
|
-
price: 12,
|
|
2060
|
-
"base-price": 17
|
|
2061
|
-
}, null, _parent2, _scopeId));
|
|
2062
|
-
_push2(ssrRenderComponent(_sfc_main$1, {
|
|
2063
|
-
price: 12,
|
|
2064
|
-
"base-price": 16,
|
|
2065
|
-
"is-literal": true
|
|
2066
|
-
}, null, _parent2, _scopeId));
|
|
2067
|
-
_push2(ssrRenderComponent(_sfc_main$1, {
|
|
2068
|
-
price: 12,
|
|
2069
|
-
"is-big": isBig.value
|
|
2070
|
-
}, null, _parent2, _scopeId));
|
|
2071
|
-
_push2(ssrRenderComponent(_sfc_main$1, {
|
|
2072
|
-
price: 14,
|
|
2073
|
-
"base-price": 18,
|
|
2074
|
-
"is-big": isBig.value,
|
|
2075
|
-
"is-literal": true
|
|
2076
|
-
}, null, _parent2, _scopeId));
|
|
2077
|
-
_push2(ssrRenderComponent(_sfc_main$1, {
|
|
2078
|
-
price: 12,
|
|
2079
|
-
"base-price": 16
|
|
2080
|
-
}, {
|
|
2081
|
-
"compare-value": withCtx(({ comparePrice }, _push3, _parent3, _scopeId2) => {
|
|
2082
|
-
if (_push3) {
|
|
2083
|
-
_push3(` x${ssrInterpolate(comparePrice)}`);
|
|
2084
|
-
} else {
|
|
2085
|
-
return [
|
|
2086
|
-
createTextVNode(" x" + toDisplayString(comparePrice), 1)
|
|
2087
|
-
];
|
|
2088
|
-
}
|
|
2089
|
-
}),
|
|
2090
|
-
_: 1
|
|
2091
|
-
}, _parent2, _scopeId));
|
|
2092
|
-
} else {
|
|
2093
|
-
return [
|
|
2094
|
-
createVNode(_sfc_main$1, null, {
|
|
2095
|
-
default: withCtx(({ salePrice }) => [
|
|
2096
|
-
createTextVNode(" ProductCard " + toDisplayString(salePrice), 1)
|
|
2097
|
-
]),
|
|
2098
|
-
_: 1
|
|
2099
|
-
}),
|
|
2100
|
-
createVNode(_sfc_main$1, {
|
|
2101
|
-
product: { price: price.value }
|
|
2102
|
-
}, null, 8, ["product"]),
|
|
2103
|
-
createVNode(_sfc_main$1, {
|
|
2104
|
-
price: 12,
|
|
2105
|
-
"base-price": 17
|
|
2106
|
-
}),
|
|
2107
|
-
createVNode(_sfc_main$1, {
|
|
2108
|
-
price: 12,
|
|
2109
|
-
"base-price": 16,
|
|
2110
|
-
"is-literal": true
|
|
2111
|
-
}),
|
|
2112
|
-
createVNode(_sfc_main$1, {
|
|
2113
|
-
price: 12,
|
|
2114
|
-
"is-big": isBig.value
|
|
2115
|
-
}, null, 8, ["is-big"]),
|
|
2116
|
-
createVNode(_sfc_main$1, {
|
|
2117
|
-
price: 14,
|
|
2118
|
-
"base-price": 18,
|
|
2119
|
-
"is-big": isBig.value,
|
|
2120
|
-
"is-literal": true
|
|
2121
|
-
}, null, 8, ["is-big"]),
|
|
2122
|
-
createVNode(_sfc_main$1, {
|
|
2123
|
-
price: 12,
|
|
2124
|
-
"base-price": 16
|
|
2125
|
-
}, {
|
|
2126
|
-
"compare-value": withCtx(({ comparePrice }) => [
|
|
2127
|
-
createTextVNode(" x" + toDisplayString(comparePrice), 1)
|
|
2128
|
-
]),
|
|
2129
|
-
_: 1
|
|
2130
|
-
})
|
|
2131
|
-
];
|
|
2132
|
-
}
|
|
2133
|
-
}),
|
|
2134
|
-
_: 1
|
|
2135
|
-
}), _parent);
|
|
2136
|
-
};
|
|
2180
|
+
const __returned__ = { price, isBig, Prices };
|
|
2181
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
2182
|
+
return __returned__;
|
|
2137
2183
|
}
|
|
2138
2184
|
});
|
|
2139
|
-
|
|
2185
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
2186
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.as), _attrs, {
|
|
2187
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
2188
|
+
if (_push2) {
|
|
2189
|
+
_push2(ssrRenderComponent($setup["Prices"], null, {
|
|
2190
|
+
default: withCtx(({ salePrice }, _push3, _parent3, _scopeId2) => {
|
|
2191
|
+
if (_push3) {
|
|
2192
|
+
_push3(` ProductCard ${ssrInterpolate(salePrice)}`);
|
|
2193
|
+
} else {
|
|
2194
|
+
return [
|
|
2195
|
+
createTextVNode(" ProductCard " + toDisplayString(salePrice), 1)
|
|
2196
|
+
];
|
|
2197
|
+
}
|
|
2198
|
+
}),
|
|
2199
|
+
_: 1
|
|
2200
|
+
}, _parent2, _scopeId));
|
|
2201
|
+
_push2(ssrRenderComponent($setup["Prices"], {
|
|
2202
|
+
product: { price: $setup.price }
|
|
2203
|
+
}, null, _parent2, _scopeId));
|
|
2204
|
+
_push2(ssrRenderComponent($setup["Prices"], {
|
|
2205
|
+
price: 12,
|
|
2206
|
+
"base-price": 17
|
|
2207
|
+
}, null, _parent2, _scopeId));
|
|
2208
|
+
_push2(ssrRenderComponent($setup["Prices"], {
|
|
2209
|
+
price: 12,
|
|
2210
|
+
"base-price": 16,
|
|
2211
|
+
"is-literal": true
|
|
2212
|
+
}, null, _parent2, _scopeId));
|
|
2213
|
+
_push2(ssrRenderComponent($setup["Prices"], {
|
|
2214
|
+
price: 12,
|
|
2215
|
+
"is-big": $setup.isBig
|
|
2216
|
+
}, null, _parent2, _scopeId));
|
|
2217
|
+
_push2(ssrRenderComponent($setup["Prices"], {
|
|
2218
|
+
price: 14,
|
|
2219
|
+
"base-price": 18,
|
|
2220
|
+
"is-big": $setup.isBig,
|
|
2221
|
+
"is-literal": true
|
|
2222
|
+
}, null, _parent2, _scopeId));
|
|
2223
|
+
_push2(ssrRenderComponent($setup["Prices"], {
|
|
2224
|
+
price: 12,
|
|
2225
|
+
"base-price": 16
|
|
2226
|
+
}, {
|
|
2227
|
+
"compare-value": withCtx(({ comparePrice }, _push3, _parent3, _scopeId2) => {
|
|
2228
|
+
if (_push3) {
|
|
2229
|
+
_push3(` x${ssrInterpolate(comparePrice)}`);
|
|
2230
|
+
} else {
|
|
2231
|
+
return [
|
|
2232
|
+
createTextVNode(" x" + toDisplayString(comparePrice), 1)
|
|
2233
|
+
];
|
|
2234
|
+
}
|
|
2235
|
+
}),
|
|
2236
|
+
_: 1
|
|
2237
|
+
}, _parent2, _scopeId));
|
|
2238
|
+
} else {
|
|
2239
|
+
return [
|
|
2240
|
+
createVNode($setup["Prices"], null, {
|
|
2241
|
+
default: withCtx(({ salePrice }) => [
|
|
2242
|
+
createTextVNode(" ProductCard " + toDisplayString(salePrice), 1)
|
|
2243
|
+
]),
|
|
2244
|
+
_: 1
|
|
2245
|
+
}),
|
|
2246
|
+
createVNode($setup["Prices"], {
|
|
2247
|
+
product: { price: $setup.price }
|
|
2248
|
+
}, null, 8, ["product"]),
|
|
2249
|
+
createVNode($setup["Prices"], {
|
|
2250
|
+
price: 12,
|
|
2251
|
+
"base-price": 17
|
|
2252
|
+
}),
|
|
2253
|
+
createVNode($setup["Prices"], {
|
|
2254
|
+
price: 12,
|
|
2255
|
+
"base-price": 16,
|
|
2256
|
+
"is-literal": true
|
|
2257
|
+
}),
|
|
2258
|
+
createVNode($setup["Prices"], {
|
|
2259
|
+
price: 12,
|
|
2260
|
+
"is-big": $setup.isBig
|
|
2261
|
+
}, null, 8, ["is-big"]),
|
|
2262
|
+
createVNode($setup["Prices"], {
|
|
2263
|
+
price: 14,
|
|
2264
|
+
"base-price": 18,
|
|
2265
|
+
"is-big": $setup.isBig,
|
|
2266
|
+
"is-literal": true
|
|
2267
|
+
}, null, 8, ["is-big"]),
|
|
2268
|
+
createVNode($setup["Prices"], {
|
|
2269
|
+
price: 12,
|
|
2270
|
+
"base-price": 16
|
|
2271
|
+
}, {
|
|
2272
|
+
"compare-value": withCtx(({ comparePrice }) => [
|
|
2273
|
+
createTextVNode(" x" + toDisplayString(comparePrice), 1)
|
|
2274
|
+
]),
|
|
2275
|
+
_: 1
|
|
2276
|
+
})
|
|
2277
|
+
];
|
|
2278
|
+
}
|
|
2279
|
+
}),
|
|
2280
|
+
_: 1
|
|
2281
|
+
}), _parent);
|
|
2282
|
+
}
|
|
2140
2283
|
const _sfc_setup = _sfc_main.setup;
|
|
2141
2284
|
_sfc_main.setup = (props, ctx) => {
|
|
2142
2285
|
const ssrContext = useSSRContext();
|
|
2143
2286
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/ProductCard.vue");
|
|
2144
2287
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
2145
2288
|
};
|
|
2289
|
+
const ProductCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
2146
2290
|
|
|
2147
2291
|
const $$Astro$5 = createAstro("https://ecom2-002.web.app");
|
|
2148
2292
|
const $$Home = createComponent(async ($$result, $$props, $$slots) => {
|
|
@@ -2189,8 +2333,8 @@ const $$Home = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
2189
2333
|
</label>
|
|
2190
2334
|
</div>
|
|
2191
2335
|
</div>
|
|
2192
|
-
${renderComponent($$result, "Prices",
|
|
2193
|
-
${renderComponent($$result, "ProductCard",
|
|
2336
|
+
${renderComponent($$result, "Prices", Prices, { "price": 10, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/Prices.vue", "client:component-export": "default" })}
|
|
2337
|
+
${renderComponent($$result, "ProductCard", ProductCard, { "client:load": true, "client:component-hydration": "load", "client:component-path": "@@sf/components/ProductCard.vue", "client:component-export": "default" })}
|
|
2194
2338
|
</main>`;
|
|
2195
2339
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro");
|
|
2196
2340
|
|
|
@@ -2209,8 +2353,8 @@ const $$Index$1 = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
2209
2353
|
loadError = err;
|
|
2210
2354
|
}
|
|
2211
2355
|
return renderTemplate`<html${addAttribute(pageContext?.lang.replace("_", "-"), "lang")}>
|
|
2212
|
-
${pageContext && renderTemplate`${renderComponent($$result, "PagesLayout", $$Pages, { "pageContext": pageContext }, { "default": () => renderTemplate`${renderComponent($$
|
|
2213
|
-
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": () => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
|
|
2356
|
+
${pageContext && renderTemplate`${renderComponent($$result, "PagesLayout", $$Pages, { "pageContext": pageContext }, { "default": ($$result2) => renderTemplate`${renderComponent($$result2, "HomeMain", $$Home, { "pageContext": pageContext })}` })}`}
|
|
2357
|
+
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
|
|
2214
2358
|
</html>`;
|
|
2215
2359
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro");
|
|
2216
2360
|
|
|
@@ -2297,8 +2441,8 @@ const $$ = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
2297
2441
|
loadError = err;
|
|
2298
2442
|
}
|
|
2299
2443
|
return renderTemplate`<html${addAttribute(pageContext?.lang.replace("_", "-"), "lang")}>
|
|
2300
|
-
${pageContext && renderTemplate`${renderComponent($$result, "PagesLayout", $$Pages, { "pageContext": pageContext }, { "default": () => renderTemplate`${renderComponent($$
|
|
2301
|
-
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": () => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
|
|
2444
|
+
${pageContext && renderTemplate`${renderComponent($$result, "PagesLayout", $$Pages, { "pageContext": pageContext }, { "default": ($$result2) => renderTemplate`${renderComponent($$result2, "WildcardMain", $$Wildcard, { "pageContext": pageContext })}` })}`}
|
|
2445
|
+
${loadError && renderTemplate`${renderComponent($$result, "Fragment", Fragment, {}, { "default": ($$result2) => renderTemplate`${unescapeHTML(loadError.responseHTML)}` })}`}
|
|
2302
2446
|
</html>`;
|
|
2303
2447
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro");
|
|
2304
2448
|
|
|
@@ -2313,4 +2457,4 @@ const _page5 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
2313
2457
|
url: $$url
|
|
2314
2458
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2315
2459
|
|
|
2316
|
-
export { $$Pages as $,
|
|
2460
|
+
export { $$Pages as $, _export_sfc as _, _page0 as a, _page1 as b, _page3 as c, _page4 as d, _page5 as e, loadPageContext as l };
|