cloudcommerce 0.22.3 → 0.23.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/.eslintrc.cjs +1 -1
- package/CHANGELOG.md +26 -0
- package/ecomplus-stores/barra-doce/.eslintrc.cjs +1 -1
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/.eslintrc.cjs +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +1 -0
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +1 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +3 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +4 -8
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +5 -1
- package/ecomplus-stores/iluminim/.ecomplus.cd.json +3 -3
- package/ecomplus-stores/iluminim/.eslintrc.cjs +1 -1
- package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +1 -1
- package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
- package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductCard.vue +5 -5
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +1 -5
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +1 -1
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +5 -1
- package/package.json +7 -11
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/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 +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 +2 -2
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/lib/build.js +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/build.ts +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/eslint/CHANGELOG.md +1 -0
- package/packages/eslint/README.md +1 -0
- package/packages/eslint/package.json +29 -0
- package/packages/eslint/storefront.eslintrc.cjs +28 -0
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- 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 +2 -2
- package/packages/ssr/package.json +4 -5
- package/packages/ssr/src/firebase/serve-storefront.ts +2 -2
- package/packages/storefront/.eslintrc.cjs +1 -26
- package/packages/storefront/config/storefront.cms.js +1 -1
- package/packages/storefront/dist/client/_astro/Carousel.6824b5e2.js +1 -0
- package/packages/storefront/dist/client/_astro/{HeroSlider.cea1f361.js → HeroSlider.794b113c.js} +1 -1
- package/packages/storefront/dist/client/_astro/{PitchBar.ed85833a.js → PitchBar.a0503ba1.js} +1 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.7fca4465.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.fe08e043.js +4 -0
- package/packages/storefront/dist/client/_astro/{_...slug_.c13e0486.css → _...slug_.caa8cb90.css} +1 -1
- package/packages/storefront/dist/client/_astro/{firebase-app.84207480.js → firebase-app.1df8af9a.js} +5 -5
- package/packages/storefront/dist/client/_astro/index.c723d38d.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{_...75363048.mjs → _...e1758019.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{account@_@astro.12fbe243.mjs → account@_@astro.f568e384.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{astro.e0968ba7.mjs → astro.b875de26.mjs} +1119 -1226
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.67b66d0a.mjs → endpoint@_@js.32b9ab50.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{fallback@_@astro.0a6656b6.mjs → fallback@_@astro.4d902266.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.a4c9c84e.mjs → index@_@astro.2072e1c3.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.df499bf2.mjs → index@_@astro.a80337aa.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.a71c9334.mjs → _...slug_.astro.7c69d6fe.mjs} +50 -43
- package/packages/storefront/dist/server/chunks/pages/{account.astro.0003ca94.mjs → account.astro.4b8c2471.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.085dadb5.mjs → endpoint.js.64061d33.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{fallback.astro.055cb7df.mjs → fallback.astro.f225bb85.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{index.astro.abc34f72.mjs → index.astro.a972914a.mjs} +5 -8
- package/packages/storefront/dist/server/entry.mjs +9 -9
- package/packages/storefront/dist/server/renderers.mjs +2 -2
- package/packages/storefront/package.json +8 -7
- package/packages/storefront/src/helpers/sf-utils.ts +12 -0
- package/packages/storefront/src/lib/components/Carousel.vue +17 -5
- package/packages/storefront/src/lib/components/CarouselControl.vue +1 -1
- package/packages/storefront/src/lib/components/SocialNetworkIcon.vue +1 -1
- package/packages/storefront/src/lib/components/SocialNetworkLink.vue +1 -3
- package/packages/storefront/src/lib/composables/use-cart-item.ts +46 -0
- package/packages/storefront/src/lib/layouts/use-page-header.ts +0 -1
- package/packages/storefront/src/lib/sf-lib.ts +7 -0
- package/packages/storefront/src/lib/state/customer-session.ts +1 -1
- package/packages/storefront/src/lib/state/modules-info.ts +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/Carousel.62c97a79.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.35614736.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.1c27e68e.js +0 -4
- package/packages/storefront/dist/client/_astro/index.b93f3d06.js +0 -1
- package/packages/storefront/src/helpers/idle-callback.ts +0 -9
- package/packages/storefront/src/lib/components/_injection-keys.ts +0 -11
- /package/packages/{storefront/.base.eslintrc.cjs → eslint/base.eslintrc.cjs} +0 -0
- /package/packages/storefront/src/{lib → helpers}/browser-env.ts +0 -0
- /package/packages/storefront/src/{lib → helpers}/server-data.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.b875de26.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,7 +14,7 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.7c69d6fe.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
19
|
import 'node:path';
|
|
20
20
|
import 'node:url';
|
|
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
|
|
|
29
29
|
/* empty css */import '@vueuse/core';
|
|
30
30
|
import '@headlessui/vue';
|
|
31
31
|
|
|
32
|
-
const page = () => import('./pages/endpoint.js.
|
|
32
|
+
const page = () => import('./pages/endpoint.js.64061d33.mjs').then(n => n.e);
|
|
33
33
|
|
|
34
34
|
export { page };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.b875de26.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,7 +14,7 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.7c69d6fe.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
19
|
import 'node:path';
|
|
20
20
|
import 'node:url';
|
|
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
|
|
|
29
29
|
/* empty css */import '@vueuse/core';
|
|
30
30
|
import '@headlessui/vue';
|
|
31
31
|
|
|
32
|
-
const page = () => import('./pages/fallback.astro.
|
|
32
|
+
const page = () => import('./pages/fallback.astro.f225bb85.mjs');
|
|
33
33
|
|
|
34
34
|
export { page };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.b875de26.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,7 +14,7 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.7c69d6fe.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
19
|
import 'node:path';
|
|
20
20
|
import 'node:url';
|
|
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
|
|
|
29
29
|
/* empty css */import '@vueuse/core';
|
|
30
30
|
import '@headlessui/vue';
|
|
31
31
|
|
|
32
|
-
const page = () => import('./pages/index.astro.
|
|
32
|
+
const page = () => import('./pages/index.astro.a972914a.mjs').then(n => n.i);
|
|
33
33
|
|
|
34
34
|
export { page };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.b875de26.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,7 +14,7 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.7c69d6fe.mjs';
|
|
18
18
|
import 'node:fs/promises';
|
|
19
19
|
import 'node:path';
|
|
20
20
|
import 'node:url';
|
|
@@ -29,6 +29,6 @@ import '@cloudcommerce/config';
|
|
|
29
29
|
/* empty css */import '@vueuse/core';
|
|
30
30
|
import '@headlessui/vue';
|
|
31
31
|
|
|
32
|
-
const page = () => import('./pages/index.astro.
|
|
32
|
+
const page = () => import('./pages/index.astro.a972914a.mjs').then(n => n.a);
|
|
33
33
|
|
|
34
34
|
export { page };
|
|
@@ -8,7 +8,7 @@ import sizeOf from 'image-size';
|
|
|
8
8
|
import 'magic-string';
|
|
9
9
|
import mime from 'mime';
|
|
10
10
|
import 'node:stream';
|
|
11
|
-
import { c as createAstro, a as createComponent, r as renderTemplate, u as unescapeHTML, b as renderComponent, d as addAttribute, F as Fragment, m as maybeRenderHead, s as spreadAttributes, e as renderSlot, f as renderHead } from '../astro.
|
|
11
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, u as unescapeHTML, b as renderComponent, d as addAttribute, F as Fragment, m as maybeRenderHead, s as spreadAttributes, e as renderSlot, f as renderHead } from '../astro.b875de26.mjs';
|
|
12
12
|
import api from '@cloudcommerce/api';
|
|
13
13
|
import { EventEmitter } from 'node:events';
|
|
14
14
|
import fs from 'node:fs';
|
|
@@ -186,7 +186,7 @@ global.__storefrontCMS = (fs, resolvePath) => {
|
|
|
186
186
|
|
|
187
187
|
let settings;
|
|
188
188
|
try {
|
|
189
|
-
settings = getContent('settings');
|
|
189
|
+
settings = getContent('settings') || {};
|
|
190
190
|
} catch (e) {
|
|
191
191
|
settings = {};
|
|
192
192
|
}
|
|
@@ -601,7 +601,7 @@ async function getImage(transform) {
|
|
|
601
601
|
}
|
|
602
602
|
let loader = (_a = globalThis.astroImage) == null ? void 0 : _a.loader;
|
|
603
603
|
if (!loader) {
|
|
604
|
-
const { default: mod } = await import('./endpoint.js.
|
|
604
|
+
const { default: mod } = await import('./endpoint.js.64061d33.mjs').then(n => n.s).catch(() => {
|
|
605
605
|
throw new Error(
|
|
606
606
|
"[@astrojs/image] Builtin image loader not found. (Did you remember to add the integration to your Astro config?)"
|
|
607
607
|
);
|
|
@@ -983,6 +983,34 @@ const loadingGlobalInfoPreset = new Promise((resolve) => {
|
|
|
983
983
|
}
|
|
984
984
|
});
|
|
985
985
|
|
|
986
|
+
let userAgent;
|
|
987
|
+
{
|
|
988
|
+
userAgent = "";
|
|
989
|
+
}
|
|
990
|
+
userAgent.includes("Safari") && !userAgent.includes("Chrome");
|
|
991
|
+
const isIOS = /iPad|iPhone|iPod/.test(userAgent) && !window.MSStream;
|
|
992
|
+
const isMobile = isIOS || /Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
|
|
993
|
+
|
|
994
|
+
const {
|
|
995
|
+
settings,
|
|
996
|
+
apiContext
|
|
997
|
+
} = globalThis.$storefront;
|
|
998
|
+
const networkNames = [
|
|
999
|
+
"whatsapp",
|
|
1000
|
+
"instagram",
|
|
1001
|
+
"facebook",
|
|
1002
|
+
"twitter",
|
|
1003
|
+
"youtube",
|
|
1004
|
+
"tiktok",
|
|
1005
|
+
"pinterest"
|
|
1006
|
+
];
|
|
1007
|
+
const socialNetworks = {};
|
|
1008
|
+
networkNames.forEach((network) => {
|
|
1009
|
+
if (settings[network]) {
|
|
1010
|
+
socialNetworks[network] = settings[network];
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
|
|
986
1014
|
const emptyInfo = {
|
|
987
1015
|
list_payments: {},
|
|
988
1016
|
calculate_shipping: {},
|
|
@@ -1070,7 +1098,6 @@ const usePageHeader = async ({ routeContext, listedCategoryFields }) => {
|
|
|
1070
1098
|
fields: listedCategoryFields || [
|
|
1071
1099
|
"name",
|
|
1072
1100
|
"slug",
|
|
1073
|
-
"parent.name",
|
|
1074
1101
|
"parent.slug",
|
|
1075
1102
|
"icon.url",
|
|
1076
1103
|
"icon.size",
|
|
@@ -1104,8 +1131,6 @@ window.$storefront.data['${field}'] = ${JSON.stringify(value)};`
|
|
|
1104
1131
|
};
|
|
1105
1132
|
};
|
|
1106
1133
|
|
|
1107
|
-
const carouselKey = Symbol("carousel");
|
|
1108
|
-
|
|
1109
1134
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
1110
1135
|
__name: "CarouselControl",
|
|
1111
1136
|
props: {
|
|
@@ -1139,6 +1164,7 @@ _sfc_main$e.setup = (props, ctx) => {
|
|
|
1139
1164
|
};
|
|
1140
1165
|
const CarouselControl = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["ssrRender", _sfc_ssrRender$e]]);
|
|
1141
1166
|
|
|
1167
|
+
const carouselKey = Symbol("carousel");
|
|
1142
1168
|
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
1143
1169
|
__name: "Carousel",
|
|
1144
1170
|
props: {
|
|
@@ -1152,10 +1178,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1152
1178
|
setup(__props, { expose: __expose, emit }) {
|
|
1153
1179
|
__expose();
|
|
1154
1180
|
const props = __props;
|
|
1155
|
-
const currentIndex = ref(
|
|
1181
|
+
const currentIndex = ref(0);
|
|
1156
1182
|
watch(toRef(props, "modelValue"), (modelValue) => {
|
|
1157
1183
|
currentIndex.value = modelValue - 1;
|
|
1158
|
-
});
|
|
1184
|
+
}, { immediate: true });
|
|
1159
1185
|
watch(currentIndex, (current, previous) => {
|
|
1160
1186
|
if (current !== previous) {
|
|
1161
1187
|
emit("update:modelValue", current + 1);
|
|
@@ -1294,7 +1320,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1294
1320
|
isBoundLeft,
|
|
1295
1321
|
isBoundRight
|
|
1296
1322
|
});
|
|
1297
|
-
const __returned__ = { props, emit, currentIndex, wrapper, currentPos, isScrolling, arrivedState, isBoundLeft, isBoundRight, slidesWidth, wrapperScrollWidth, wrapperVisibleWidth, indexCount, calcWrapperWidth, calcSlidesWidth, calcNextOffsetLeft, calcCurrentIndex, calcIndexCount, get autoplayTimer() {
|
|
1323
|
+
const __returned__ = { carouselKey, props, emit, currentIndex, wrapper, currentPos, isScrolling, arrivedState, isBoundLeft, isBoundRight, slidesWidth, wrapperScrollWidth, wrapperVisibleWidth, indexCount, calcWrapperWidth, calcSlidesWidth, calcNextOffsetLeft, calcCurrentIndex, calcIndexCount, get autoplayTimer() {
|
|
1298
1324
|
return autoplayTimer;
|
|
1299
1325
|
}, set autoplayTimer(v) {
|
|
1300
1326
|
autoplayTimer = v;
|
|
@@ -1993,26 +2019,6 @@ const initializeFirebaseAuth = (canWaitIdle = !window.location.pathname.startsWi
|
|
|
1993
2019
|
return;
|
|
1994
2020
|
};
|
|
1995
2021
|
|
|
1996
|
-
const {
|
|
1997
|
-
settings,
|
|
1998
|
-
apiContext
|
|
1999
|
-
} = globalThis.$storefront;
|
|
2000
|
-
const networkNames = [
|
|
2001
|
-
"whatsapp",
|
|
2002
|
-
"instagram",
|
|
2003
|
-
"facebook",
|
|
2004
|
-
"twitter",
|
|
2005
|
-
"youtube",
|
|
2006
|
-
"tiktok",
|
|
2007
|
-
"pinterest"
|
|
2008
|
-
];
|
|
2009
|
-
const socialNetworks = {};
|
|
2010
|
-
networkNames.forEach((network) => {
|
|
2011
|
-
if (settings[network]) {
|
|
2012
|
-
socialNetworks[network] = settings[network];
|
|
2013
|
-
}
|
|
2014
|
-
});
|
|
2015
|
-
|
|
2016
2022
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
2017
2023
|
__name: "AccountLink",
|
|
2018
2024
|
props: {
|
|
@@ -2061,14 +2067,6 @@ _sfc_main$a.setup = (props, ctx) => {
|
|
|
2061
2067
|
};
|
|
2062
2068
|
const AccountLink = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["ssrRender", _sfc_ssrRender$a]]);
|
|
2063
2069
|
|
|
2064
|
-
let userAgent;
|
|
2065
|
-
{
|
|
2066
|
-
userAgent = "";
|
|
2067
|
-
}
|
|
2068
|
-
userAgent.includes("Safari") && !userAgent.includes("Chrome");
|
|
2069
|
-
const isIOS = /iPad|iPhone|iPod/.test(userAgent) && !window.MSStream;
|
|
2070
|
-
const isMobile = isIOS || /Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
|
|
2071
|
-
|
|
2072
2070
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
2073
2071
|
__name: "SocialNetworkIcon",
|
|
2074
2072
|
props: {
|
|
@@ -2804,7 +2802,10 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
2804
2802
|
} else {
|
|
2805
2803
|
_push2(`<!---->`);
|
|
2806
2804
|
}
|
|
2807
|
-
_push2(ssrRenderComponent($setup["MenuButton"], {
|
|
2805
|
+
_push2(ssrRenderComponent($setup["MenuButton"], {
|
|
2806
|
+
class: "outline-none",
|
|
2807
|
+
"aria-label": "Minha conta"
|
|
2808
|
+
}, {
|
|
2808
2809
|
default: withCtx((_, _push3, _parent3, _scopeId2) => {
|
|
2809
2810
|
if (_push3) {
|
|
2810
2811
|
ssrRenderSlot(_ctx.$slots, "button", { open }, null, _push3, _parent3, _scopeId2);
|
|
@@ -3252,7 +3253,10 @@ function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3252
3253
|
createTextVNode(toDisplayString($setup.initializeFirebaseAuth()), 1)
|
|
3253
3254
|
])
|
|
3254
3255
|
])) : createCommentVNode("", true),
|
|
3255
|
-
createVNode($setup["MenuButton"], {
|
|
3256
|
+
createVNode($setup["MenuButton"], {
|
|
3257
|
+
class: "outline-none",
|
|
3258
|
+
"aria-label": "Minha conta"
|
|
3259
|
+
}, {
|
|
3256
3260
|
default: withCtx(() => [
|
|
3257
3261
|
renderSlot$1(_ctx.$slots, "button", { open })
|
|
3258
3262
|
]),
|
|
@@ -3415,7 +3419,11 @@ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
3415
3419
|
} else {
|
|
3416
3420
|
_push(`<!---->`);
|
|
3417
3421
|
}
|
|
3418
|
-
_push(
|
|
3422
|
+
_push(`<ul class="p-5"><!--[-->`);
|
|
3423
|
+
ssrRenderList($setup.shoppingCart.items, (item, i) => {
|
|
3424
|
+
_push(`<li></li>`);
|
|
3425
|
+
});
|
|
3426
|
+
_push(`<!--]--></ul></article><footer class="p-5 shadow"></footer></aside>`);
|
|
3419
3427
|
}
|
|
3420
3428
|
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
3421
3429
|
_sfc_main$1.setup = (props, ctx) => {
|
|
@@ -3475,9 +3483,8 @@ function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $op
|
|
|
3475
3483
|
_push(ssrRenderComponent($setup["ShopHeaderMenu"], mergeProps({ class: "hidden lg:block" }, { inlineMenuTrees: $setup.inlineMenuTrees }), null, _parent));
|
|
3476
3484
|
_push(`<div class="basis-1/4 px-2 flex justify-end items-center gap-3 lg:gap-4 text-base-800"><button${ssrRenderAttr("aria-label", "Buscar produtos")}><i class="i-magnifying-glass w-7 h-7 hover:text-primary hover:scale-110 active:scale-125"></i></button>`);
|
|
3477
3485
|
_push(ssrRenderComponent($setup["AccountMenu"], {
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
"service-links": $props.serviceLinks
|
|
3486
|
+
"service-links": $props.serviceLinks,
|
|
3487
|
+
class: "hidden sm:block"
|
|
3481
3488
|
}, {
|
|
3482
3489
|
button: withCtx(({ open }, _push2, _parent2, _scopeId) => {
|
|
3483
3490
|
if (_push2) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createAstro, a as createComponent, r as renderTemplate } from '../astro.
|
|
1
|
+
import { c as createAstro, a as createComponent, r as renderTemplate } from '../astro.b875de26.mjs';
|
|
2
2
|
import 'path-to-regexp';
|
|
3
3
|
import 'cookie';
|
|
4
4
|
import '@astrojs/internal-helpers/path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import mime from 'mime';
|
|
2
2
|
import sharp$1 from 'sharp';
|
|
3
|
-
import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.
|
|
3
|
+
import { B as BaseSSRService, i as isOutputFormatSupportsAlpha } from './_...slug_.astro.7c69d6fe.mjs';
|
|
4
4
|
|
|
5
5
|
class SharpService extends BaseSSRService {
|
|
6
6
|
async transform(inputBuffer, transform) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.
|
|
2
|
-
import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.
|
|
1
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, m as maybeRenderHead, d as addAttribute, b as renderComponent } from '../astro.b875de26.mjs';
|
|
2
|
+
import { l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.7c69d6fe.mjs';
|
|
3
3
|
import 'path-to-regexp';
|
|
4
4
|
import 'cookie';
|
|
5
5
|
import '@astrojs/internal-helpers/path';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createAstro, a as createComponent, r as renderTemplate, b as renderComponent, m as maybeRenderHead, d as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro.
|
|
2
|
-
import { c as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, d as CarouselControl, e as availableExtraDiscount, f as installmentsOption, g as discountOption, h as loyaltyPointsPrograms, j as addProductToCart, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.
|
|
1
|
+
import { c as createAstro, a as createComponent, r as renderTemplate, b as renderComponent, m as maybeRenderHead, d as addAttribute, u as unescapeHTML, F as Fragment$1 } from '../astro.b875de26.mjs';
|
|
2
|
+
import { c as $$Picture, p as parseShippingPhrase, _ as _export_sfc, C as Carousel, d as CarouselControl, e as availableExtraDiscount, f as installmentsOption, g as discountOption, h as loyaltyPointsPrograms, j as addProductToCart, l as loadRouteContext, $ as $$BaseHead, a as $$PageHeader, b as $$Base } from './_...slug_.astro.7c69d6fe.mjs';
|
|
3
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';
|
|
4
4
|
import api from '@cloudcommerce/api';
|
|
5
5
|
import { inStock, price, name, img, onPromotion } from '@ecomplus/utils';
|
|
@@ -921,10 +921,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
921
921
|
isActive,
|
|
922
922
|
discountPercentage,
|
|
923
923
|
hasVariations
|
|
924
|
-
} = useProductCard(
|
|
925
|
-
product: props.product,
|
|
926
|
-
productId: props.productId
|
|
927
|
-
});
|
|
924
|
+
} = useProductCard(props);
|
|
928
925
|
const card = ref(null);
|
|
929
926
|
const isHovered = useElementHover(card);
|
|
930
927
|
const wasHoveredOnce = ref(false);
|
|
@@ -1006,7 +1003,7 @@ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
1006
1003
|
}
|
|
1007
1004
|
_push2(`</div>`);
|
|
1008
1005
|
if ($setup.isActive && !$setup.hasVariations) {
|
|
1009
|
-
_push2(`<button class="uno-3suct9 ui-btn-sm ui-btn-primary"${_scopeId}><
|
|
1006
|
+
_push2(`<button class="uno-3suct9 ui-btn-sm ui-btn-primary"${_scopeId}><span class="inline-block h-4 w-4 leading-none text-base text-center bg-on-primary text-primary opacity-80 rounded-full mr-1"${_scopeId}> + </span> ${ssrInterpolate("Adicionar ao carrinho")}</button>`);
|
|
1010
1007
|
} else {
|
|
1011
1008
|
_push2(`<!---->`);
|
|
1012
1009
|
}
|
|
@@ -1066,7 +1063,7 @@ function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $
|
|
|
1066
1063
|
class: "uno-3suct9 ui-btn-sm ui-btn-primary",
|
|
1067
1064
|
onClick: withModifiers(($event) => $setup.addProductToCart($setup.product), ["prevent"])
|
|
1068
1065
|
}, [
|
|
1069
|
-
createVNode("
|
|
1066
|
+
createVNode("span", { class: "inline-block h-4 w-4 leading-none text-base text-center bg-on-primary text-primary opacity-80 rounded-full mr-1" }, " + "),
|
|
1070
1067
|
createTextVNode(" " + toDisplayString("Adicionar ao carrinho"))
|
|
1071
1068
|
], 8, ["onClick"])) : createCommentVNode("", true)
|
|
1072
1069
|
])
|
|
@@ -3,7 +3,7 @@ import { webcrypto } from 'node:crypto';
|
|
|
3
3
|
import { ByteLengthQueuingStrategy, CountQueuingStrategy, ReadableByteStreamController, ReadableStream, ReadableStreamBYOBReader, ReadableStreamBYOBRequest, ReadableStreamDefaultController, ReadableStreamDefaultReader, TransformStream, WritableStream, WritableStreamDefaultController, WritableStreamDefaultWriter } from 'node:stream/web';
|
|
4
4
|
import { File, FormData, Headers, Request, Response, fetch } from 'undici';
|
|
5
5
|
import { setTimeout as setTimeout$1, clearTimeout as clearTimeout$1 } from 'node:timers';
|
|
6
|
-
import { N as NodeApp, g as deserializeManifest } from './chunks/astro.
|
|
6
|
+
import { N as NodeApp, g as deserializeManifest } from './chunks/astro.b875de26.mjs';
|
|
7
7
|
import { Readable } from 'stream';
|
|
8
8
|
import https from 'https';
|
|
9
9
|
import path from 'path';
|
|
@@ -26,7 +26,7 @@ import 'html-escaper';
|
|
|
26
26
|
import 'vue';
|
|
27
27
|
import 'vue/server-renderer';
|
|
28
28
|
import '@ecomplus/utils';
|
|
29
|
-
import './chunks/pages/_...slug_.astro.
|
|
29
|
+
import './chunks/pages/_...slug_.astro.7c69d6fe.mjs';
|
|
30
30
|
import 'node:fs/promises';
|
|
31
31
|
import 'node:path';
|
|
32
32
|
import 'node:url';
|
|
@@ -2825,13 +2825,13 @@ const adapter = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
2825
2825
|
start
|
|
2826
2826
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
2827
2827
|
|
|
2828
|
-
const _page0 = () => import('./chunks/endpoint@_@js.
|
|
2829
|
-
const _page1 = () => import('./chunks/index@_@astro.
|
|
2830
|
-
const _page2 = () => import('./chunks/fallback@_@astro.
|
|
2831
|
-
const _page3 = () => import('./chunks/index@_@astro.
|
|
2832
|
-
const _page4 = () => import('./chunks/account@_@astro.
|
|
2833
|
-
const _page5 = () => import('./chunks/_...
|
|
2834
|
-
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.
|
|
2828
|
+
const _page0 = () => import('./chunks/endpoint@_@js.32b9ab50.mjs');
|
|
2829
|
+
const _page1 = () => import('./chunks/index@_@astro.2072e1c3.mjs');
|
|
2830
|
+
const _page2 = () => import('./chunks/fallback@_@astro.4d902266.mjs');
|
|
2831
|
+
const _page3 = () => import('./chunks/index@_@astro.a80337aa.mjs');
|
|
2832
|
+
const _page4 = () => import('./chunks/account@_@astro.f568e384.mjs');
|
|
2833
|
+
const _page5 = () => import('./chunks/_...e1758019.mjs');const pageMap = new Map([["../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.6_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js", _page0],["src/pages/index.astro", _page1],["src/pages/fallback.astro", _page2],["src/pages/app/index.astro", _page3],["src/pages/app/account.astro", _page4],["src/pages/[...slug].astro", _page5]]);
|
|
2834
|
+
const _manifest = Object.assign(deserializeManifest({"adapterName":"@astrojs/node","routes":[{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"type":"endpoint","route":"/_image","pattern":"^\\/_image$","segments":[[{"content":"_image","dynamic":false,"spread":false}]],"params":[],"component":"../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.6_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint.js","pathname":"/_image","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.caa8cb90.css"}],"routeData":{"route":"/","type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.caa8cb90.css"}],"routeData":{"route":"/fallback","type":"page","pattern":"^\\/fallback\\/?$","segments":[[{"content":"fallback","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/fallback.astro","pathname":"/fallback","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app","type":"page","pattern":"^\\/app\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/index.astro","pathname":"/app","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[],"styles":[],"routeData":{"route":"/app/account","type":"page","pattern":"^\\/app\\/account\\/?$","segments":[[{"content":"app","dynamic":false,"spread":false}],[{"content":"account","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/app/account.astro","pathname":"/app/account","prerender":false,"_meta":{"trailingSlash":"ignore"}}},{"file":"","links":[],"scripts":[{"type":"external","value":"/_astro/hoisted.572313d6.js"}],"styles":[{"type":"external","src":"/_astro/_...slug_.caa8cb90.css"}],"routeData":{"route":"/[...slug]","type":"page","pattern":"^(?:\\/(.*?))?\\/?$","segments":[[{"content":"...slug","dynamic":true,"spread":true}]],"params":["...slug"],"component":"src/pages/[...slug].astro","prerender":false,"_meta":{"trailingSlash":"ignore"}}}],"site":"https://ecom2-demo.web.app","base":"/","compressHTML":false,"markdown":{"drafts":false,"syntaxHighlight":"shiki","shikiConfig":{"langs":[],"theme":"github-dark","wrap":false},"remarkPlugins":[],"rehypePlugins":[],"remarkRehype":{},"gfm":true,"smartypants":true},"componentMetadata":[["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/[...slug].astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/fallback.astro",{"propagation":"none","containsHead":true}],["/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/pages/index.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var r=(i,c,n)=>{let s=async()=>{await(await i())()},t=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t.disconnect(),s();break}});for(let e of n.children)t.observe(e)};(self.Astro||(self.Astro={})).visible=r;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000@astrojs-ssr-virtual-entry":"_@astrojs-ssr-virtual-entry.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000empty-middleware":"_empty-middleware.mjs","/src/pages/app/account.astro":"chunks/pages/account.astro.4b8c2471.mjs","/src/pages/fallback.astro":"chunks/pages/fallback.astro.f225bb85.mjs","\u0000@astro-page:../../node_modules/.pnpm/@astrojs+image@0.17.2_astro@2.9.6_sharp@0.32.4/node_modules/@astrojs/image/dist/endpoint@_@js":"chunks/endpoint@_@js.32b9ab50.mjs","\u0000@astro-page:src/pages/index@_@astro":"chunks/index@_@astro.2072e1c3.mjs","\u0000@astro-page:src/pages/fallback@_@astro":"chunks/fallback@_@astro.4d902266.mjs","\u0000@astro-page:src/pages/app/index@_@astro":"chunks/index@_@astro.a80337aa.mjs","\u0000@astro-page:src/pages/app/account@_@astro":"chunks/account@_@astro.f568e384.mjs","\u0000@astro-page:src/pages/[...slug]@_@astro":"chunks/_...e1758019.mjs","~/components/PitchBar.vue":"_astro/PitchBar.a0503ba1.js","/astro/hoisted.js?q=0":"_astro/hoisted.572313d6.js","~/components/ProductShelf.vue":"_astro/ProductShelf.7fca4465.js","~/components/HeroSlider.vue":"_astro/HeroSlider.794b113c.js","@astrojs/vue/client.js":"_astro/client.0fb6b44e.js","/home/leo/code/ecomplus/cloud-commerce/node_modules/workbox-window/build/workbox-window.prod.es5.mjs":"_astro/workbox-window.prod.es5.a7b12eab.js","~/components/ShopHeader.vue":"_astro/ShopHeader.fe08e043.js","/home/leo/code/ecomplus/cloud-commerce/packages/storefront/src/lib/scripts/firebase-app.ts":"_astro/firebase-app.1df8af9a.js","astro:scripts/before-hydration.js":""},"assets":["/_astro/_...slug_.caa8cb90.css","/manifest.webmanifest","/robots.txt","/sw.js","/workbox-5e0bf4e4.js","/_astro/Carousel.6824b5e2.js","/_astro/HeroSlider.794b113c.js","/_astro/PitchBar.a0503ba1.js","/_astro/ProductShelf.7fca4465.js","/_astro/ShopHeader.fe08e043.js","/_astro/_plugin-vue_export-helper.4cb7dd76.js","/_astro/api.4984c5be.js","/_astro/client.0fb6b44e.js","/_astro/firebase-app.1df8af9a.js","/_astro/hoisted.572313d6.js","/_astro/img.abbe849f.js","/_astro/index.c723d38d.js","/_astro/preload-helper.cf010ec4.js","/_astro/session-utm.744b0db3.js","/_astro/workbox-window.prod.es5.a7b12eab.js","/img/icon.png","/img/large-icon.png","/img/uploads/banner2.webp","/img/uploads/ecom-icon.png","/img/uploads/headphone.webp","/img/uploads/logo.png","/img/uploads/og-image.png","/img/uploads/passion.webp","/img/uploads/rect8589.png","/img/uploads/rect859.png","/img/uploads/rect89.webp"]}), {
|
|
2835
2835
|
pageMap,
|
|
2836
2836
|
renderers,
|
|
2837
2837
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as server_default } from './chunks/astro.
|
|
1
|
+
import { h as server_default } from './chunks/astro.b875de26.mjs';
|
|
2
2
|
import { useSSRContext, defineComponent, computed, mergeProps, h, createSSRApp } from 'vue';
|
|
3
3
|
import { ssrRenderSlotInner, ssrRenderAttrs, ssrRenderSlot, renderToString } from 'vue/server-renderer';
|
|
4
4
|
import { img, imgSizes, i18n, formatMoney } from '@ecomplus/utils';
|
|
5
|
-
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.
|
|
5
|
+
import { _ as _export_sfc } from './chunks/pages/_...slug_.astro.7c69d6fe.mjs';
|
|
6
6
|
import 'path-to-regexp';
|
|
7
7
|
import 'cookie';
|
|
8
8
|
import '@astrojs/internal-helpers/path';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.23.0",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -37,27 +37,28 @@
|
|
|
37
37
|
"@cloudcommerce/i18n": "workspace:*",
|
|
38
38
|
"@ecomplus/utils": "1.5.0-rc.5",
|
|
39
39
|
"@fastify/deepmerge": "^1.3.0",
|
|
40
|
-
"@headlessui/vue": "^1.7.
|
|
40
|
+
"@headlessui/vue": "^1.7.15",
|
|
41
41
|
"@iconify-json/fa6-brands": "^1.1.11",
|
|
42
42
|
"@iconify-json/heroicons": "^1.1.11",
|
|
43
43
|
"@iconify-json/logos": "^1.1.33",
|
|
44
44
|
"@vite-pwa/astro": "^0.1.1",
|
|
45
|
-
"@vueuse/core": "10.
|
|
46
|
-
"astro": "2.9.
|
|
45
|
+
"@vueuse/core": "10.3.0",
|
|
46
|
+
"astro": "2.9.6",
|
|
47
47
|
"chroma-js": "^2.4.2",
|
|
48
48
|
"dotenv": "^16.3.1",
|
|
49
|
-
"firebase": "^
|
|
49
|
+
"firebase": "^10.1.0",
|
|
50
50
|
"image-size": "^1.0.2",
|
|
51
51
|
"mime": "^3.0.0",
|
|
52
52
|
"semver": "^7.5.4",
|
|
53
53
|
"sharp": "^0.32.4",
|
|
54
54
|
"tailwindcss": "^3.3.3",
|
|
55
|
-
"unocss": "^0.
|
|
56
|
-
"vite": "^4.4.
|
|
55
|
+
"unocss": "^0.54.1",
|
|
56
|
+
"vite": "^4.4.7",
|
|
57
57
|
"vite-plugin-pwa": "^0.16.4",
|
|
58
58
|
"vue": "^3.3.4"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
+
"@cloudcommerce/eslint": "workspace:^",
|
|
61
62
|
"@cloudcommerce/types": "workspace:*"
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
let id = -1;
|
|
2
|
+
|
|
3
|
+
/* eslint-disable-next-line no-plusplus */
|
|
4
|
+
export const useId = () => String(++id);
|
|
5
|
+
|
|
6
|
+
export const requestIdleCallback = (fn: (...args: any[]) => any, fallbackMs = 300) => {
|
|
7
|
+
if (typeof window.requestIdleCallback === 'function') {
|
|
8
|
+
window.requestIdleCallback(fn);
|
|
9
|
+
} else {
|
|
10
|
+
setTimeout(fn, fallbackMs);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
<script
|
|
2
|
-
/* REFERENCE: https://github.com/bartdominiak/vue-snap */
|
|
1
|
+
<script lang="ts">
|
|
3
2
|
import {
|
|
3
|
+
type Ref,
|
|
4
|
+
type InjectionKey,
|
|
4
5
|
onMounted,
|
|
5
6
|
onBeforeUnmount,
|
|
6
7
|
ref,
|
|
@@ -11,9 +12,20 @@ import {
|
|
|
11
12
|
provide,
|
|
12
13
|
} from 'vue';
|
|
13
14
|
import { useDebounceFn, useElementHover, useScroll } from '@vueuse/core';
|
|
14
|
-
import { carouselKey } from '@@sf/components/_injection-keys';
|
|
15
15
|
import CarouselControl from '@@sf/components/CarouselControl.vue';
|
|
16
16
|
|
|
17
|
+
export type CarouselInject = {
|
|
18
|
+
autoplay: Ref<number | undefined>,
|
|
19
|
+
changeSlide: (direction: number, isPageScroll?: boolean) => void,
|
|
20
|
+
isBoundLeft: Ref<boolean>,
|
|
21
|
+
isBoundRight: Ref<boolean>,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const carouselKey = Symbol('carousel') as InjectionKey<CarouselInject>;
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
/* REFERENCE: https://github.com/bartdominiak/vue-snap */
|
|
17
29
|
export interface Props {
|
|
18
30
|
as?: string;
|
|
19
31
|
modelValue?: number;
|
|
@@ -27,10 +39,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
27
39
|
const emit = defineEmits([
|
|
28
40
|
'update:modelValue',
|
|
29
41
|
]);
|
|
30
|
-
const currentIndex = ref(
|
|
42
|
+
const currentIndex = ref(0);
|
|
31
43
|
watch(toRef(props, 'modelValue'), (modelValue) => {
|
|
32
44
|
currentIndex.value = modelValue - 1;
|
|
33
|
-
});
|
|
45
|
+
}, { immediate: true });
|
|
34
46
|
watch(currentIndex, (current, previous) => {
|
|
35
47
|
if (current !== previous) {
|
|
36
48
|
emit('update:modelValue', current + 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject } from 'vue';
|
|
3
|
-
import { type CarouselInject, carouselKey } from '@@sf/components/
|
|
3
|
+
import { type CarouselInject, carouselKey } from '@@sf/components/Carousel.vue';
|
|
4
4
|
|
|
5
5
|
export interface Props {
|
|
6
6
|
isPrev?: boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type
|
|
2
|
+
import { type NetworkName, isMobile, socialNetworks } from '@@sf/sf-lib';
|
|
3
3
|
import { computed } from 'vue';
|
|
4
|
-
import { isMobile } from '@@sf/browser-env';
|
|
5
|
-
import { socialNetworks } from '@@sf/server-data';
|
|
6
4
|
import SocialNetworkIcon from '@@sf/components/SocialNetworkIcon.vue';
|
|
7
5
|
|
|
8
6
|
export interface Props {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Carts } from '@cloudcommerce/api/types';
|
|
2
|
+
import type { ProductItem } from '@@sf/composables/use-product-card';
|
|
3
|
+
import { computed, shallowReactive, watch } from 'vue';
|
|
4
|
+
import { name as getName, img as getImg } from '@ecomplus/utils';
|
|
5
|
+
import { parseProduct } from '@@sf/state/shopping-cart';
|
|
6
|
+
|
|
7
|
+
export type CartItem = Carts['items'][0];
|
|
8
|
+
|
|
9
|
+
export type Props = {
|
|
10
|
+
item?: CartItem;
|
|
11
|
+
product?: ProductItem;
|
|
12
|
+
pictureSize?: string;
|
|
13
|
+
} & ({ item: CartItem } | { product: ProductItem });
|
|
14
|
+
|
|
15
|
+
export const useCartItem = (props: Props) => {
|
|
16
|
+
const cartItem = shallowReactive({} as CartItem);
|
|
17
|
+
watch(props, () => {
|
|
18
|
+
if (props.item) {
|
|
19
|
+
Object.assign(cartItem, props.item);
|
|
20
|
+
} else if (props.product) {
|
|
21
|
+
Object.assign(cartItem, parseProduct(props.product));
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
immediate: true,
|
|
25
|
+
});
|
|
26
|
+
const title = computed(() => {
|
|
27
|
+
return getName(cartItem);
|
|
28
|
+
});
|
|
29
|
+
const image = computed(() => {
|
|
30
|
+
if (cartItem.picture) {
|
|
31
|
+
return getImg(cartItem.picture, undefined, props.pictureSize || 'small');
|
|
32
|
+
}
|
|
33
|
+
return undefined;
|
|
34
|
+
});
|
|
35
|
+
const finalPrice = computed(() => {
|
|
36
|
+
return cartItem.final_price || cartItem.price;
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
cartItem,
|
|
40
|
+
title,
|
|
41
|
+
image,
|
|
42
|
+
finalPrice,
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default useCartItem;
|