cloudcommerce 0.19.0 → 0.20.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 +22 -0
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- 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/flash-courier/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/galaxpay/package.json +1 -1
- package/packages/apps/google-analytics/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +13 -19
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/firebase/serve-storefront.ts +13 -19
- package/packages/storefront/.eslintrc.cjs +1 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.eb156f18.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.9e290480.js +1 -0
- package/packages/storefront/dist/client/_astro/{ShopHeader.61f52cad.js → ShopHeader.0c884bbe.js} +3 -3
- package/packages/storefront/dist/client/_astro/_...slug_.c2da43fb.css +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{_...38dc610a.mjs → _...9e22b578.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{account@_@astro.691bc27d.mjs → account@_@astro.89e4cf60.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.59bf44fe.mjs → endpoint@_@js.f880a152.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{fallback@_@astro.c8a88451.mjs → fallback@_@astro.89538855.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{index@_@astro.d808b7a7.mjs → index@_@astro.548cf7ad.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{index@_@astro.d93b7b12.mjs → index@_@astro.56fdd6da.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.b5433bcf.mjs → _...slug_.astro.bde9380b.mjs} +8 -8
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.2c6d6e4a.mjs → endpoint.js.d4e37801.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{fallback.astro.09db7801.mjs → fallback.astro.e2e8a0e4.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{index.astro.753ff02c.mjs → index.astro.3760ebe3.mjs} +363 -255
- package/packages/storefront/dist/server/entry.mjs +8 -8
- package/packages/storefront/dist/server/renderers.mjs +1 -1
- package/packages/storefront/package.json +1 -1
- package/packages/storefront/src/lib/components/{Banner.astro → BannerPictures.astro} +13 -11
- package/packages/storefront/src/lib/composables/use-banner.ts +38 -0
- package/packages/storefront/src/lib/composables/use-hero-slider.ts +4 -18
- package/packages/storefront/src/lib/layouts/{main/use-page-sections.ts → use-page-main.ts} +59 -12
- package/packages/storefront/src/lib/ssr-context.ts +1 -1
- package/packages/storefront/src/lib/state/use-cms-preview.ts +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/HeroSlider.b2622951.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.f63b3dc2.js +0 -1
- package/packages/storefront/dist/client/_astro/_...slug_.c58d7d89.css +0 -1
- package/packages/storefront/src/lib/layouts/main/use-page-hero.ts +0 -47
|
@@ -1,51 +1,205 @@
|
|
|
1
1
|
import { c as createAstro, a as createComponent, r as renderTemplate, d as renderComponent, m as maybeRenderHead, b as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro.45d3047f.mjs';
|
|
2
|
-
import { b as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, c as CarouselControl, d as availableExtraDiscount, e as installmentsOption, f as discountOption, g as loyaltyPointsPrograms, h as addProductToCart, l as loadRouteContext, $ as $$PageHeader, a as $$Base } from './_...slug_.astro.
|
|
3
|
-
import { computed, useSSRContext, defineComponent, mergeProps,
|
|
4
|
-
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrRenderSlot, ssrRenderVNode, ssrInterpolate } from 'vue/server-renderer';
|
|
2
|
+
import { b as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, c as CarouselControl, d as availableExtraDiscount, e as installmentsOption, f as discountOption, g as loyaltyPointsPrograms, h as addProductToCart, l as loadRouteContext, $ as $$PageHeader, a as $$Base } from './_...slug_.astro.bde9380b.mjs';
|
|
3
|
+
import { ref, shallowReactive, computed, useSSRContext, defineComponent, mergeProps, createVNode, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, withDirectives, vShow, openBlock, createBlock, Fragment, renderList, resolveComponent, createCommentVNode, withModifiers, withAsyncContext } from 'vue';
|
|
5
4
|
import api from '@cloudcommerce/api';
|
|
6
5
|
import { inStock, price, name, img, onPromotion } from '@ecomplus/utils';
|
|
6
|
+
import { ssrRenderAttrs, ssrRenderVNode, ssrRenderSlot, ssrInterpolate, ssrRenderComponent, ssrRenderStyle, ssrRenderList, ssrRenderClass, ssrRenderAttr } from 'vue/server-renderer';
|
|
7
7
|
import { useElementHover, watchOnce } from '@vueuse/core';
|
|
8
8
|
|
|
9
|
+
const useProductShelf = (props) => {
|
|
10
|
+
const title = ref(props.title || "");
|
|
11
|
+
const titleLink = ref(props.titleLink || "");
|
|
12
|
+
const isFetching = ref(false);
|
|
13
|
+
let fetching = null;
|
|
14
|
+
const fetchError = ref(null);
|
|
15
|
+
const products = shallowReactive(props.products || []);
|
|
16
|
+
if (!props.products) {
|
|
17
|
+
isFetching.value = true;
|
|
18
|
+
fetching = (async () => {
|
|
19
|
+
let searchQuery = props.searchQuery || "";
|
|
20
|
+
let collection;
|
|
21
|
+
if (props.collectionId) {
|
|
22
|
+
try {
|
|
23
|
+
const { data } = await api.get(`collections/${props.collectionId}`);
|
|
24
|
+
collection = data;
|
|
25
|
+
} catch (err) {
|
|
26
|
+
console.error(err);
|
|
27
|
+
fetchError.value = err;
|
|
28
|
+
}
|
|
29
|
+
const productIds = collection?.products;
|
|
30
|
+
if (Array.isArray(productIds) && productIds.length) {
|
|
31
|
+
searchQuery += `&_id=${productIds.slice(0, 60).join(",")}`;
|
|
32
|
+
}
|
|
33
|
+
if (!title.value && title.value !== null && collection?.name) {
|
|
34
|
+
title.value = collection?.name;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const limit = props.limit || 24;
|
|
38
|
+
const offset = props.page ? (props.page - 1) * limit : 0;
|
|
39
|
+
let endpointQuery = `offset=${offset}&limit=${limit}`;
|
|
40
|
+
if (props.sort) {
|
|
41
|
+
endpointQuery += `&sort=${props.sort}`;
|
|
42
|
+
}
|
|
43
|
+
endpointQuery += searchQuery;
|
|
44
|
+
try {
|
|
45
|
+
const { data } = await api.get(`search/v1?${endpointQuery}`);
|
|
46
|
+
if (props.isShuffle) {
|
|
47
|
+
let m = data.result.filter((item) => {
|
|
48
|
+
return item.available && inStock(item);
|
|
49
|
+
}).length;
|
|
50
|
+
let t;
|
|
51
|
+
let i;
|
|
52
|
+
while (m) {
|
|
53
|
+
i = Math.floor(Math.random() * m--);
|
|
54
|
+
t = data.result[m];
|
|
55
|
+
data.result[m] = data.result[i];
|
|
56
|
+
data.result[i] = t;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
data.result.forEach((item) => products.push(item));
|
|
60
|
+
} catch (err) {
|
|
61
|
+
console.error(err);
|
|
62
|
+
fetchError.value = err;
|
|
63
|
+
}
|
|
64
|
+
isFetching.value = false;
|
|
65
|
+
})();
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
title,
|
|
69
|
+
titleLink,
|
|
70
|
+
isFetching,
|
|
71
|
+
fetching,
|
|
72
|
+
fetchError,
|
|
73
|
+
products
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const now = Date.now();
|
|
78
|
+
const parseBanners = (banners) => {
|
|
79
|
+
const validBanners = [];
|
|
80
|
+
banners.forEach(({
|
|
81
|
+
img,
|
|
82
|
+
start,
|
|
83
|
+
end,
|
|
84
|
+
mobile_img: mobileImg,
|
|
85
|
+
button_link: buttonLink,
|
|
86
|
+
button_text: buttonText,
|
|
87
|
+
...rest
|
|
88
|
+
}) => {
|
|
89
|
+
if (start && new Date(start).getTime() < now)
|
|
90
|
+
return;
|
|
91
|
+
if (end && new Date(end).getTime() > now)
|
|
92
|
+
return;
|
|
93
|
+
validBanners.push({
|
|
94
|
+
...rest,
|
|
95
|
+
img,
|
|
96
|
+
mobileImg,
|
|
97
|
+
buttonLink,
|
|
98
|
+
buttonText
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
return validBanners;
|
|
102
|
+
};
|
|
9
103
|
const usePageHero = async ({ routeContext }) => {
|
|
10
104
|
const { cmsContent } = routeContext;
|
|
11
105
|
const heroSlider = { slides: [] };
|
|
12
106
|
const heroContent = cmsContent?.hero;
|
|
13
107
|
if (heroContent) {
|
|
14
108
|
heroSlider.autoplay = heroContent.autoplay;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
109
|
+
if (heroContent.slides) {
|
|
110
|
+
heroSlider.slides = parseBanners(heroContent.slides);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return { heroSlider };
|
|
114
|
+
};
|
|
115
|
+
const usePageSections = async ({ routeContext }) => {
|
|
116
|
+
const sectionsContent = routeContext.cmsContent?.sections;
|
|
117
|
+
const sections = [];
|
|
118
|
+
if (sectionsContent) {
|
|
119
|
+
await Promise.all(sectionsContent.map(async ({ type, ...sectionContent }, index) => {
|
|
120
|
+
if (type === "product-shelf") {
|
|
121
|
+
const {
|
|
122
|
+
collection_id: collectionIdAndInfo,
|
|
123
|
+
headless: isHeadless,
|
|
124
|
+
shuffle: isShuffle,
|
|
125
|
+
...rest
|
|
126
|
+
} = sectionContent;
|
|
127
|
+
let { sort, title } = sectionContent;
|
|
128
|
+
switch (sort) {
|
|
129
|
+
case "offers":
|
|
130
|
+
sort = "-price_discount";
|
|
131
|
+
break;
|
|
132
|
+
case "news":
|
|
133
|
+
sort = "-_id";
|
|
134
|
+
break;
|
|
135
|
+
case "lowest_price":
|
|
136
|
+
sort = "price";
|
|
137
|
+
break;
|
|
138
|
+
case "highest_price":
|
|
139
|
+
sort = "-price";
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
let collectionId = null;
|
|
143
|
+
let searchQuery;
|
|
144
|
+
let titleLink;
|
|
145
|
+
if (collectionIdAndInfo) {
|
|
146
|
+
const [_id, resource, name, path] = collectionIdAndInfo.split(":");
|
|
147
|
+
collectionId = _id;
|
|
148
|
+
if (resource === "categories") {
|
|
149
|
+
searchQuery = `&categories._id=${_id}`;
|
|
150
|
+
} else if (resource === "brands") {
|
|
151
|
+
searchQuery = `&brands._id=${_id}`;
|
|
152
|
+
}
|
|
153
|
+
if (!title && title !== null && name) {
|
|
154
|
+
title = name;
|
|
155
|
+
}
|
|
156
|
+
titleLink = path;
|
|
157
|
+
}
|
|
158
|
+
const props = {
|
|
159
|
+
...rest,
|
|
160
|
+
collectionId,
|
|
161
|
+
searchQuery,
|
|
162
|
+
sort,
|
|
163
|
+
title: isHeadless ? null : title,
|
|
164
|
+
titleLink,
|
|
165
|
+
isShuffle
|
|
166
|
+
};
|
|
167
|
+
const { fetching, products } = useProductShelf(props);
|
|
168
|
+
await fetching;
|
|
169
|
+
sections[index] = {
|
|
170
|
+
type,
|
|
171
|
+
props: {
|
|
172
|
+
...rest,
|
|
173
|
+
collectionId,
|
|
174
|
+
searchQuery,
|
|
175
|
+
sort,
|
|
176
|
+
title: isHeadless ? null : title,
|
|
177
|
+
titleLink,
|
|
178
|
+
isShuffle,
|
|
179
|
+
products
|
|
180
|
+
}
|
|
181
|
+
};
|
|
30
182
|
return;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
183
|
+
}
|
|
184
|
+
if (type === "banners-grid") {
|
|
185
|
+
sections[index] = {
|
|
186
|
+
type,
|
|
187
|
+
props: {
|
|
188
|
+
banners: parseBanners(sectionContent.banners || [])
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
}));
|
|
39
193
|
}
|
|
40
194
|
return {
|
|
41
|
-
|
|
195
|
+
sections
|
|
42
196
|
};
|
|
43
197
|
};
|
|
44
198
|
|
|
45
|
-
const $$Astro$
|
|
46
|
-
const $$
|
|
47
|
-
const Astro2 = $$result.createAstro($$Astro$
|
|
48
|
-
Astro2.self = $$
|
|
199
|
+
const $$Astro$5 = createAstro("https://ecom2-demo.web.app");
|
|
200
|
+
const $$BannerPictures = createComponent(async ($$result, $$props, $$slots) => {
|
|
201
|
+
const Astro2 = $$result.createAstro($$Astro$5, $$props, $$slots);
|
|
202
|
+
Astro2.self = $$BannerPictures;
|
|
49
203
|
const {
|
|
50
204
|
img,
|
|
51
205
|
alt,
|
|
@@ -72,19 +226,37 @@ const $$Banner = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
72
226
|
if (!mobileWidths?.length) {
|
|
73
227
|
mobileWidths = [720, 856];
|
|
74
228
|
}
|
|
75
|
-
return renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": img, "alt": alt || "", "widths": widths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `${mobileImg ? "hidden md:block " : ""}mx-auto ${className}` })}
|
|
229
|
+
return renderTemplate`${img && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": img, "alt": alt || "", "widths": widths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `${mobileImg ? "hidden md:block " : ""}mx-auto ${className}` })}`}
|
|
76
230
|
${mobileImg && renderTemplate`${renderComponent($$result, "Picture", $$Picture, { "src": mobileImg, "alt": alt || "", "widths": mobileWidths, "fetchpriority": index === 0 ? "high" : "low", "loading": index === 0 ? "eager" : "lazy", "class": `md:hidden mx-auto ${mobileClass}` })}`}`;
|
|
77
|
-
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/
|
|
231
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/components/BannerPictures.astro");
|
|
232
|
+
|
|
233
|
+
const useBanner = (props) => {
|
|
234
|
+
const parsedTitle = computed(() => {
|
|
235
|
+
return props.title ? parseShippingPhrase(props.title).value : "";
|
|
236
|
+
});
|
|
237
|
+
const parsedSubtitle = computed(() => {
|
|
238
|
+
return props.subtitle ? parseShippingPhrase(props.subtitle).value : "";
|
|
239
|
+
});
|
|
240
|
+
const parsedButtonText = computed(() => {
|
|
241
|
+
return props.buttonText ? parseShippingPhrase(props.buttonText).value : "";
|
|
242
|
+
});
|
|
243
|
+
const hasHeader = computed(() => {
|
|
244
|
+
return Boolean(parsedTitle.value || parsedSubtitle.value || parsedButtonText.value);
|
|
245
|
+
});
|
|
246
|
+
return {
|
|
247
|
+
parsedTitle,
|
|
248
|
+
parsedSubtitle,
|
|
249
|
+
parsedButtonText,
|
|
250
|
+
hasHeader
|
|
251
|
+
};
|
|
252
|
+
};
|
|
78
253
|
|
|
79
254
|
const useHeroSlider = (props) => {
|
|
80
255
|
const parsedSlides = computed(() => {
|
|
81
256
|
return props.slides.map((slide) => {
|
|
82
|
-
const title = slide.title ? parseShippingPhrase(slide.title).value : "";
|
|
83
|
-
const subtitle = slide.subtitle ? parseShippingPhrase(slide.subtitle).value : "";
|
|
84
|
-
const buttonText = slide.buttonText ? parseShippingPhrase(slide.buttonText).value : "";
|
|
85
257
|
return {
|
|
86
258
|
...slide,
|
|
87
|
-
|
|
259
|
+
...useBanner(slide)
|
|
88
260
|
};
|
|
89
261
|
});
|
|
90
262
|
});
|
|
@@ -93,6 +265,108 @@ const useHeroSlider = (props) => {
|
|
|
93
265
|
};
|
|
94
266
|
};
|
|
95
267
|
|
|
268
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
269
|
+
__name: "Banner",
|
|
270
|
+
props: {
|
|
271
|
+
img: {},
|
|
272
|
+
alt: {},
|
|
273
|
+
mobileImg: {},
|
|
274
|
+
href: {},
|
|
275
|
+
title: {},
|
|
276
|
+
subtitle: {},
|
|
277
|
+
buttonLink: {},
|
|
278
|
+
buttonText: {},
|
|
279
|
+
headingTag: { default: "h3" }
|
|
280
|
+
},
|
|
281
|
+
setup(__props, { expose: __expose }) {
|
|
282
|
+
__expose();
|
|
283
|
+
const props = __props;
|
|
284
|
+
const {
|
|
285
|
+
hasHeader,
|
|
286
|
+
parsedTitle,
|
|
287
|
+
parsedSubtitle,
|
|
288
|
+
parsedButtonText
|
|
289
|
+
} = useBanner(props);
|
|
290
|
+
const __returned__ = { props, hasHeader, parsedTitle, parsedSubtitle, parsedButtonText };
|
|
291
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
292
|
+
return __returned__;
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
296
|
+
_push(`<div${ssrRenderAttrs(mergeProps({
|
|
297
|
+
class: ["mx-auto overflow-x-hidden", $setup.hasHeader ? "grid grid-cols-1 md:grid-cols-2 items-center" : null]
|
|
298
|
+
}, _attrs))}>`);
|
|
299
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.href ? "a-link" : "span"), {
|
|
300
|
+
href: $props.href,
|
|
301
|
+
class: $setup.hasHeader ? "basis-1/2 grow-0 md:order-last" : null
|
|
302
|
+
}, {
|
|
303
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
304
|
+
if (_push2) {
|
|
305
|
+
ssrRenderSlot(_ctx.$slots, "picture", {}, null, _push2, _parent2, _scopeId);
|
|
306
|
+
} else {
|
|
307
|
+
return [
|
|
308
|
+
renderSlot(_ctx.$slots, "picture")
|
|
309
|
+
];
|
|
310
|
+
}
|
|
311
|
+
}),
|
|
312
|
+
_: 3
|
|
313
|
+
}), _parent);
|
|
314
|
+
if ($setup.hasHeader) {
|
|
315
|
+
_push(`<div class="basis-1/2 grow-0 p-12 xl:ps-32 mb-3 md:mb-0">`);
|
|
316
|
+
if ($setup.parsedTitle) {
|
|
317
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.headingTag), { class: "ui-title mt-1" }, {
|
|
318
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
319
|
+
if (_push2) {
|
|
320
|
+
_push2(`${ssrInterpolate($setup.parsedTitle)}`);
|
|
321
|
+
} else {
|
|
322
|
+
return [
|
|
323
|
+
createTextVNode(toDisplayString($setup.parsedTitle), 1)
|
|
324
|
+
];
|
|
325
|
+
}
|
|
326
|
+
}),
|
|
327
|
+
_: 1
|
|
328
|
+
}), _parent);
|
|
329
|
+
} else {
|
|
330
|
+
_push(`<!---->`);
|
|
331
|
+
}
|
|
332
|
+
if ($setup.parsedSubtitle) {
|
|
333
|
+
_push(`<p class="text-lg mt-4 md:mt-6">${ssrInterpolate($setup.parsedSubtitle)}</p>`);
|
|
334
|
+
} else {
|
|
335
|
+
_push(`<!---->`);
|
|
336
|
+
}
|
|
337
|
+
if ($setup.parsedButtonText) {
|
|
338
|
+
ssrRenderVNode(_push, createVNode(resolveDynamicComponent($props.buttonLink ? "a-link" : "span"), {
|
|
339
|
+
href: $props.buttonLink,
|
|
340
|
+
class: "ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"
|
|
341
|
+
}, {
|
|
342
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
343
|
+
if (_push2) {
|
|
344
|
+
_push2(`${ssrInterpolate($setup.parsedButtonText)}`);
|
|
345
|
+
} else {
|
|
346
|
+
return [
|
|
347
|
+
createTextVNode(toDisplayString($setup.parsedButtonText), 1)
|
|
348
|
+
];
|
|
349
|
+
}
|
|
350
|
+
}),
|
|
351
|
+
_: 1
|
|
352
|
+
}), _parent);
|
|
353
|
+
} else {
|
|
354
|
+
_push(`<!---->`);
|
|
355
|
+
}
|
|
356
|
+
_push(`</div>`);
|
|
357
|
+
} else {
|
|
358
|
+
_push(`<!---->`);
|
|
359
|
+
}
|
|
360
|
+
_push(`</div>`);
|
|
361
|
+
}
|
|
362
|
+
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
363
|
+
_sfc_main$4.setup = (props, ctx) => {
|
|
364
|
+
const ssrContext = useSSRContext();
|
|
365
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/Banner.vue");
|
|
366
|
+
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
367
|
+
};
|
|
368
|
+
const Banner = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["ssrRender", _sfc_ssrRender$4]]);
|
|
369
|
+
|
|
96
370
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
97
371
|
__name: "HeroSlider",
|
|
98
372
|
props: {
|
|
@@ -103,7 +377,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
103
377
|
__expose();
|
|
104
378
|
const props = __props;
|
|
105
379
|
const { parsedSlides } = useHeroSlider(props);
|
|
106
|
-
const __returned__ = { props, parsedSlides, Carousel, CarouselControl };
|
|
380
|
+
const __returned__ = { props, parsedSlides, Carousel, CarouselControl, Banner };
|
|
107
381
|
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
108
382
|
return __returned__;
|
|
109
383
|
}
|
|
@@ -175,38 +449,20 @@ function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
175
449
|
if (_push2) {
|
|
176
450
|
_push2(`<!--[-->`);
|
|
177
451
|
ssrRenderList($setup.parsedSlides, (slide, i) => {
|
|
178
|
-
_push2(`<li class="shrink-0 basis-full"${_scopeId}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}),
|
|
193
|
-
_: 2
|
|
194
|
-
}), _parent2, _scopeId);
|
|
195
|
-
if (slide.subtitle) {
|
|
196
|
-
_push2(`<p class="text-lg mt-4 md:mt-6"${_scopeId}>${ssrInterpolate(slide.subtitle)}</p>`);
|
|
197
|
-
} else {
|
|
198
|
-
_push2(`<!---->`);
|
|
199
|
-
}
|
|
200
|
-
if (slide.buttonText) {
|
|
201
|
-
_push2(`<a${ssrRenderAttr("href", slide.buttonLink)} class="ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"${_scopeId}>${ssrInterpolate(slide.buttonText)}</a>`);
|
|
202
|
-
} else {
|
|
203
|
-
_push2(`<!---->`);
|
|
204
|
-
}
|
|
205
|
-
_push2(`</div>`);
|
|
206
|
-
} else {
|
|
207
|
-
_push2(`<!---->`);
|
|
208
|
-
}
|
|
209
|
-
_push2(`</div></li>`);
|
|
452
|
+
_push2(`<li class="shrink-0 basis-full"${_scopeId}>`);
|
|
453
|
+
_push2(ssrRenderComponent($setup["Banner"], mergeProps({ ...slide, headingTag: i === 0 ? "h2" : "h3" }, { class: "w-screen max-w-screen-2xl" }), {
|
|
454
|
+
picture: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
455
|
+
if (_push3) {
|
|
456
|
+
ssrRenderSlot(_ctx.$slots, `picture-${i}`, {}, null, _push3, _parent3, _scopeId2);
|
|
457
|
+
} else {
|
|
458
|
+
return [
|
|
459
|
+
renderSlot(_ctx.$slots, `picture-${i}`)
|
|
460
|
+
];
|
|
461
|
+
}
|
|
462
|
+
}),
|
|
463
|
+
_: 2
|
|
464
|
+
}, _parent2, _scopeId));
|
|
465
|
+
_push2(`</li>`);
|
|
210
466
|
});
|
|
211
467
|
_push2(`<!--]-->`);
|
|
212
468
|
} else {
|
|
@@ -216,36 +472,12 @@ function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
216
472
|
key: i,
|
|
217
473
|
class: "shrink-0 basis-full"
|
|
218
474
|
}, [
|
|
219
|
-
createVNode("
|
|
220
|
-
|
|
221
|
-
}, [
|
|
222
|
-
createVNode("a", {
|
|
223
|
-
href: slide.href,
|
|
224
|
-
class: slide.hasHeader ? "basis-1/2 grow-0 md:order-last" : null
|
|
225
|
-
}, [
|
|
475
|
+
createVNode($setup["Banner"], mergeProps({ ...slide, headingTag: i === 0 ? "h2" : "h3" }, { class: "w-screen max-w-screen-2xl" }), {
|
|
476
|
+
picture: withCtx(() => [
|
|
226
477
|
renderSlot(_ctx.$slots, `picture-${i}`)
|
|
227
|
-
]
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
class: "basis-1/2 grow-0 p-12 xl:ps-32 mb-3 md:mb-0"
|
|
231
|
-
}, [
|
|
232
|
-
(openBlock(), createBlock(resolveDynamicComponent(i === 0 ? "h2" : "h3"), { class: "ui-title mt-1" }, {
|
|
233
|
-
default: withCtx(() => [
|
|
234
|
-
createTextVNode(toDisplayString(slide.title), 1)
|
|
235
|
-
]),
|
|
236
|
-
_: 2
|
|
237
|
-
}, 1024)),
|
|
238
|
-
slide.subtitle ? (openBlock(), createBlock("p", {
|
|
239
|
-
key: 0,
|
|
240
|
-
class: "text-lg mt-4 md:mt-6"
|
|
241
|
-
}, toDisplayString(slide.subtitle), 1)) : createCommentVNode("", true),
|
|
242
|
-
slide.buttonText ? (openBlock(), createBlock("a", {
|
|
243
|
-
key: 1,
|
|
244
|
-
href: slide.buttonLink,
|
|
245
|
-
class: "ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"
|
|
246
|
-
}, toDisplayString(slide.buttonText), 9, ["href"])) : createCommentVNode("", true)
|
|
247
|
-
])) : createCommentVNode("", true)
|
|
248
|
-
], 2)
|
|
478
|
+
]),
|
|
479
|
+
_: 2
|
|
480
|
+
}, 1040)
|
|
249
481
|
]);
|
|
250
482
|
}), 128))
|
|
251
483
|
];
|
|
@@ -263,148 +495,19 @@ _sfc_main$3.setup = (props, ctx) => {
|
|
|
263
495
|
};
|
|
264
496
|
const HeroSlider = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$3]]);
|
|
265
497
|
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
try {
|
|
280
|
-
const { data } = await api.get(`collections/${props.collectionId}`);
|
|
281
|
-
collection = data;
|
|
282
|
-
} catch (err) {
|
|
283
|
-
console.error(err);
|
|
284
|
-
fetchError.value = err;
|
|
285
|
-
}
|
|
286
|
-
const productIds = collection?.products;
|
|
287
|
-
if (Array.isArray(productIds) && productIds.length) {
|
|
288
|
-
searchQuery += `&_id=${productIds.slice(0, 60).join(",")}`;
|
|
289
|
-
}
|
|
290
|
-
if (!title.value && title.value !== null && collection?.name) {
|
|
291
|
-
title.value = collection?.name;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
const limit = props.limit || 24;
|
|
295
|
-
const offset = props.page ? (props.page - 1) * limit : 0;
|
|
296
|
-
let endpointQuery = `offset=${offset}&limit=${limit}`;
|
|
297
|
-
if (props.sort) {
|
|
298
|
-
endpointQuery += `&sort=${props.sort}`;
|
|
299
|
-
}
|
|
300
|
-
endpointQuery += searchQuery;
|
|
301
|
-
try {
|
|
302
|
-
const { data } = await api.get(`search/v1?${endpointQuery}`);
|
|
303
|
-
if (props.isShuffle) {
|
|
304
|
-
let m = data.result.filter((item) => {
|
|
305
|
-
return item.available && inStock(item);
|
|
306
|
-
}).length;
|
|
307
|
-
let t;
|
|
308
|
-
let i;
|
|
309
|
-
while (m) {
|
|
310
|
-
i = Math.floor(Math.random() * m--);
|
|
311
|
-
t = data.result[m];
|
|
312
|
-
data.result[m] = data.result[i];
|
|
313
|
-
data.result[i] = t;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
data.result.forEach((item) => products.push(item));
|
|
317
|
-
} catch (err) {
|
|
318
|
-
console.error(err);
|
|
319
|
-
fetchError.value = err;
|
|
320
|
-
}
|
|
321
|
-
isFetching.value = false;
|
|
322
|
-
})();
|
|
323
|
-
}
|
|
324
|
-
return {
|
|
325
|
-
title,
|
|
326
|
-
titleLink,
|
|
327
|
-
isFetching,
|
|
328
|
-
fetching,
|
|
329
|
-
fetchError,
|
|
330
|
-
products
|
|
331
|
-
};
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
const usePageSections = async ({ routeContext }) => {
|
|
335
|
-
const sectionsContent = routeContext.cmsContent?.sections;
|
|
336
|
-
const sections = [];
|
|
337
|
-
if (sectionsContent) {
|
|
338
|
-
await Promise.all(sectionsContent.map(async ({ type, ...sectionContent }) => {
|
|
339
|
-
if (type === "product-shelf") {
|
|
340
|
-
const {
|
|
341
|
-
collection_id: collectionIdAndInfo,
|
|
342
|
-
headless: isHeadless,
|
|
343
|
-
shuffle: isShuffle,
|
|
344
|
-
...rest
|
|
345
|
-
} = sectionContent;
|
|
346
|
-
let { sort, title } = sectionContent;
|
|
347
|
-
switch (sort) {
|
|
348
|
-
case "offers":
|
|
349
|
-
sort = "-price_discount";
|
|
350
|
-
break;
|
|
351
|
-
case "news":
|
|
352
|
-
sort = "-_id";
|
|
353
|
-
break;
|
|
354
|
-
case "lowest_price":
|
|
355
|
-
sort = "price";
|
|
356
|
-
break;
|
|
357
|
-
case "highest_price":
|
|
358
|
-
sort = "-price";
|
|
359
|
-
break;
|
|
360
|
-
}
|
|
361
|
-
let collectionId = null;
|
|
362
|
-
let searchQuery;
|
|
363
|
-
let titleLink;
|
|
364
|
-
if (collectionIdAndInfo) {
|
|
365
|
-
const [_id, resource, name, path] = collectionIdAndInfo.split(":");
|
|
366
|
-
collectionId = _id;
|
|
367
|
-
if (resource === "categories") {
|
|
368
|
-
searchQuery = `&categories._id=${_id}`;
|
|
369
|
-
} else if (resource === "brands") {
|
|
370
|
-
searchQuery = `&brands._id=${_id}`;
|
|
371
|
-
}
|
|
372
|
-
if (!title && title !== null && name) {
|
|
373
|
-
title = name;
|
|
374
|
-
}
|
|
375
|
-
titleLink = path;
|
|
376
|
-
}
|
|
377
|
-
const props = {
|
|
378
|
-
...rest,
|
|
379
|
-
collectionId,
|
|
380
|
-
searchQuery,
|
|
381
|
-
sort,
|
|
382
|
-
title: isHeadless ? null : title,
|
|
383
|
-
titleLink,
|
|
384
|
-
isShuffle
|
|
385
|
-
};
|
|
386
|
-
const { fetching, products } = useProductShelf(props);
|
|
387
|
-
await fetching;
|
|
388
|
-
sections.push({
|
|
389
|
-
type,
|
|
390
|
-
props: {
|
|
391
|
-
...rest,
|
|
392
|
-
collectionId,
|
|
393
|
-
searchQuery,
|
|
394
|
-
sort,
|
|
395
|
-
title: isHeadless ? null : title,
|
|
396
|
-
titleLink,
|
|
397
|
-
isShuffle,
|
|
398
|
-
products
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
}));
|
|
403
|
-
}
|
|
404
|
-
return {
|
|
405
|
-
sections
|
|
406
|
-
};
|
|
407
|
-
};
|
|
498
|
+
const $$Astro$4 = createAstro("https://ecom2-demo.web.app");
|
|
499
|
+
const $$BannersGrid = createComponent(async ($$result, $$props, $$slots) => {
|
|
500
|
+
const Astro2 = $$result.createAstro($$Astro$4, $$props, $$slots);
|
|
501
|
+
Astro2.self = $$BannersGrid;
|
|
502
|
+
const { banners } = Astro2.props;
|
|
503
|
+
return renderTemplate`${maybeRenderHead()}<section class="ui-section">
|
|
504
|
+
<ul class="flex flex-wrap lg:flex-nowrap gap-4">
|
|
505
|
+
${banners.map((banner) => renderTemplate`<li class="lg:flex-1 [&_img]:w-full [&_img]:object-cover">
|
|
506
|
+
${renderComponent($$result, "Banner", Banner, { ...banner }, { "picture": ($$result2) => renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { ...banner, "slot": "picture" })}` })}
|
|
507
|
+
</li>`)}
|
|
508
|
+
</ul>
|
|
509
|
+
</section>`;
|
|
510
|
+
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/components/BannersGrid.astro");
|
|
408
511
|
|
|
409
512
|
const useProductCard = (props) => {
|
|
410
513
|
const isFetching = ref(false);
|
|
@@ -911,7 +1014,7 @@ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
911
1014
|
}
|
|
912
1015
|
_push2(`</div>`);
|
|
913
1016
|
if ($setup.isActive && !$setup.hasVariations) {
|
|
914
|
-
_push2(`<button class="ui-btn-sm ui-btn-primary
|
|
1017
|
+
_push2(`<button class="uno-3suct9 ui-btn-sm ui-btn-primary"${_scopeId}><i class="i-plus-20-solid mr-0.5"${_scopeId}></i> ${ssrInterpolate("Adicionar ao carrinho")}</button>`);
|
|
915
1018
|
} else {
|
|
916
1019
|
_push2(`<!---->`);
|
|
917
1020
|
}
|
|
@@ -968,7 +1071,7 @@ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
968
1071
|
]),
|
|
969
1072
|
$setup.isActive && !$setup.hasVariations ? (openBlock(), createBlock("button", {
|
|
970
1073
|
key: 0,
|
|
971
|
-
class: "ui-btn-sm ui-btn-primary
|
|
1074
|
+
class: "uno-3suct9 ui-btn-sm ui-btn-primary",
|
|
972
1075
|
onClick: withModifiers(($event) => $setup.addProductToCart($setup.product), ["prevent"])
|
|
973
1076
|
}, [
|
|
974
1077
|
createVNode("i", { class: "i-plus-20-solid mr-0.5" }),
|
|
@@ -1023,11 +1126,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1023
1126
|
});
|
|
1024
1127
|
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
1025
1128
|
const _component_ALink = resolveComponent("ALink");
|
|
1026
|
-
_push(`<section${ssrRenderAttrs(mergeProps({ class: "
|
|
1129
|
+
_push(`<section${ssrRenderAttrs(mergeProps({ class: "ui-section" }, _attrs))}>`);
|
|
1027
1130
|
if ($setup.title) {
|
|
1028
|
-
_push(`<h2>`);
|
|
1131
|
+
_push(`<div class="max-w-prose mx-auto text-center mb-2"><h2 class="ui-text-brand text-3xl">`);
|
|
1029
1132
|
if ($setup.titleLink) {
|
|
1030
|
-
_push(ssrRenderComponent(_component_ALink, {
|
|
1133
|
+
_push(ssrRenderComponent(_component_ALink, {
|
|
1134
|
+
href: $setup.titleLink,
|
|
1135
|
+
class: "ui-link"
|
|
1136
|
+
}, {
|
|
1031
1137
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1032
1138
|
if (_push2) {
|
|
1033
1139
|
_push2(`${ssrInterpolate($setup.title)}`);
|
|
@@ -1040,30 +1146,30 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
|
|
|
1040
1146
|
_: 1
|
|
1041
1147
|
}, _parent));
|
|
1042
1148
|
} else {
|
|
1043
|
-
_push(
|
|
1149
|
+
_push(`<span class="text-base-700">${ssrInterpolate($setup.title)}</span>`);
|
|
1044
1150
|
}
|
|
1045
|
-
_push(`</h2>`);
|
|
1151
|
+
_push(`</h2></div>`);
|
|
1046
1152
|
} else {
|
|
1047
1153
|
_push(`<!---->`);
|
|
1048
1154
|
}
|
|
1049
1155
|
_push(ssrRenderComponent($setup["Carousel"], { class: "group/shelf" }, {
|
|
1050
1156
|
controls: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
1051
1157
|
if (_push2) {
|
|
1052
|
-
_push2(`<div style="${ssrRenderStyle($setup.products.length > 2 ? null : { display: "none" })}" class="text-3xl lg:text-
|
|
1158
|
+
_push2(`<div style="${ssrRenderStyle($setup.products.length > 2 ? null : { display: "none" })}" class="text-3xl lg:text-2xl leading-none text-primary lg:opacity-0 group-hover/shelf:opacity-90 transition-opacity"${_scopeId}>`);
|
|
1053
1159
|
_push2(ssrRenderComponent($setup["CarouselControl"], {
|
|
1054
|
-
class: "!top-1/2
|
|
1160
|
+
class: "!top-1/2 !-left-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5",
|
|
1055
1161
|
"is-prev": ""
|
|
1056
1162
|
}, null, _parent2, _scopeId));
|
|
1057
|
-
_push2(ssrRenderComponent($setup["CarouselControl"], { class: "!top-1/2
|
|
1163
|
+
_push2(ssrRenderComponent($setup["CarouselControl"], { class: "!top-1/2 !-right-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5" }, null, _parent2, _scopeId));
|
|
1058
1164
|
_push2(`</div>`);
|
|
1059
1165
|
} else {
|
|
1060
1166
|
return [
|
|
1061
|
-
withDirectives(createVNode("div", { class: "text-3xl lg:text-
|
|
1167
|
+
withDirectives(createVNode("div", { class: "text-3xl lg:text-2xl leading-none text-primary lg:opacity-0 group-hover/shelf:opacity-90 transition-opacity" }, [
|
|
1062
1168
|
createVNode($setup["CarouselControl"], {
|
|
1063
|
-
class: "!top-1/2
|
|
1169
|
+
class: "!top-1/2 !-left-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5",
|
|
1064
1170
|
"is-prev": ""
|
|
1065
1171
|
}),
|
|
1066
|
-
createVNode($setup["CarouselControl"], { class: "!top-1/2
|
|
1172
|
+
createVNode($setup["CarouselControl"], { class: "!top-1/2 !-right-4 w-12 h-12 bg-transparent lg:bg-white/80 lg:hover:bg-primary-300/60 rounded-full lg:shadow-sm lg:ring-1 ring-black/5" })
|
|
1067
1173
|
], 512), [
|
|
1068
1174
|
[vShow, $setup.products.length > 2]
|
|
1069
1175
|
])
|
|
@@ -1115,6 +1221,8 @@ const $$Sections = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1115
1221
|
switch (type) {
|
|
1116
1222
|
case "product-shelf":
|
|
1117
1223
|
return renderTemplate`${renderComponent($$result, "ProductShelf", ProductShelf, { ...props, "client:visible": true, "client:component-hydration": "visible", "client:component-path": "~/components/ProductShelf.vue", "client:component-export": "default" })}`;
|
|
1224
|
+
case "banners-grid":
|
|
1225
|
+
return renderTemplate`${renderComponent($$result, "BannersGrid", $$BannersGrid, { ...props })}`;
|
|
1118
1226
|
default:
|
|
1119
1227
|
return renderTemplate`<div${addAttribute(type, "data-section")}></div>`;
|
|
1120
1228
|
}
|
|
@@ -1130,7 +1238,7 @@ const $$Home = createComponent(async ($$result, $$props, $$slots) => {
|
|
|
1130
1238
|
const { heroSlider } = await usePageHero({ routeContext });
|
|
1131
1239
|
const heroSlides = heroSlider.slides;
|
|
1132
1240
|
return renderTemplate`${maybeRenderHead()}<main>
|
|
1133
|
-
${heroSlider.slides.length && renderTemplate`${renderComponent($$result, "HeroSlider", HeroSlider, { ...heroSlider, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/HeroSlider.vue", "client:component-export": "default" }, { "picture-0": ($$result2) => renderTemplate`${heroSlides[0] && renderTemplate`${renderComponent($$result2, "
|
|
1241
|
+
${heroSlider.slides.length && renderTemplate`${renderComponent($$result, "HeroSlider", HeroSlider, { ...heroSlider, "client:load": true, "client:component-hydration": "load", "client:component-path": "~/components/HeroSlider.vue", "client:component-export": "default" }, { "picture-0": ($$result2) => renderTemplate`${heroSlides[0] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-0", ...heroSlides[0], "index": 0 })}`}`, "picture-1": ($$result2) => renderTemplate`${heroSlides[1] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-1", ...heroSlides[1], "index": 1 })}`}`, "picture-2": ($$result2) => renderTemplate`${heroSlides[2] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-2", ...heroSlides[2], "index": 2 })}`}`, "picture-3": ($$result2) => renderTemplate`${heroSlides[3] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-3", ...heroSlides[3], "index": 3 })}`}`, "picture-4": ($$result2) => renderTemplate`${heroSlides[4] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-4", ...heroSlides[4], "index": 4 })}`}`, "picture-5": ($$result2) => renderTemplate`${heroSlides[5] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-5", ...heroSlides[5], "index": 5 })}`}`, "picture-6": ($$result2) => renderTemplate`${heroSlides[6] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-6", ...heroSlides[6], "index": 6 })}`}`, "picture-7": ($$result2) => renderTemplate`${heroSlides[7] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-7", ...heroSlides[7], "index": 7 })}`}`, "picture-8": ($$result2) => renderTemplate`${heroSlides[8] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-8", ...heroSlides[8], "index": 8 })}`}`, "picture-9": ($$result2) => renderTemplate`${heroSlides[9] && renderTemplate`${renderComponent($$result2, "BannerPictures", $$BannerPictures, { "slot": "picture-9", ...heroSlides[9], "index": 9 })}`}` })}`}
|
|
1134
1242
|
${renderComponent($$result, "Sections", $$Sections, {})}
|
|
1135
1243
|
</main>`;
|
|
1136
1244
|
}, "/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/main/Home.astro");
|