cloudcommerce 2.0.0 → 2.0.2
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 +17 -0
- package/ecomplus-stores/barra-doce/conf/firebase.json +7 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/astro.config.mjs +18 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/3.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/4.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/5.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/dos.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/uno.md +24 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.md +9 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.md +20 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.md +9 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/brands.json +16 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/categories.json +16 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/collections.json +16 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/home.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/search.json +7 -0
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +10 -9
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +24 -10
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/BannersGrid.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/BlogPosts.vue +88 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.vue +49 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CheckoutPage.vue +14 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Collapse.vue +4 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ContentEntry.vue +23 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/DocBanners.vue +26 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/FooterStamps.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ImagesGallery.vue +5 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/LoginForm.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PageTitle.vue +43 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Pagination.vue +67 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +3 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +4 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +34 -18
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductSpecifications.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchFilters.vue +122 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +97 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchShowcase.vue +169 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +10 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +64 -64
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SkuSelector.vue +7 -7
- package/ecomplus-stores/barra-doce/functions/ssr/src/env.d.ts +4 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/Base.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +4 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Fallback.astro +28 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Main.astro +26 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/content/Hero.astro +33 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/{Sections.astro → content/Sections.astro} +29 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +35 -8
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +6 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +24 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/blog/[page].astro +71 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/blog/_blog-pages.ts +9 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/~fallback.astro +9 -2
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/package.json +9 -9
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-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 +2 -2
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/package.json +3 -3
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +3 -3
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/pagarme-v5/package.json +2 -2
- package/packages/apps/paghiper/package.json +2 -2
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/apps/webhooks/package.json +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/eslint/package.json +3 -3
- 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 +2 -2
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +3 -3
- package/packages/storefront/config/astro/context-directive.mjs +16 -2
- package/packages/storefront/config/astro/index.d.ts +3 -1
- package/packages/storefront/package.json +6 -6
- package/packages/storefront/src/lib/components/SharedData.astro +1 -1
- package/packages/storefront/src/lib/composables/use-shared-data.ts +2 -1
- package/packages/storefront/src/lib/composables/use-sku-selector.ts +11 -7
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/blog/.gitkeep +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.json +0 -11
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +0 -11
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.json +0 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.astro +0 -44
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +0 -37
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Wildcard.astro +0 -18
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +0 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-mercadopago",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
|
|
6
6
|
"main": "lib/mercadopago.js",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
|
-
"axios": "^1.6.
|
|
29
|
+
"axios": "^1.6.5",
|
|
30
30
|
"firebase-admin": "^12.0.0",
|
|
31
31
|
"firebase-functions": "^4.6.0"
|
|
32
32
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pagarme",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Pagar.me",
|
|
6
6
|
"main": "lib/pagarme.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.5",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0",
|
|
31
31
|
"pagarme": "^4.33.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pagarme-v5",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Pagar.me API v5 with recurring payments",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
29
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
30
|
-
"axios": "^1.6.
|
|
30
|
+
"axios": "^1.6.5",
|
|
31
31
|
"firebase-admin": "^12.0.0",
|
|
32
32
|
"firebase-functions": "^4.6.0"
|
|
33
33
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-paghiper",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate PagHiper",
|
|
6
6
|
"main": "lib/paghiper.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.5",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pix",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Pix API (Bacen)",
|
|
6
6
|
"main": "lib/pix.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.5",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-tiny-erp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Tiny ERP",
|
|
6
6
|
"main": "lib/tiny-erp.js",
|
|
7
7
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
24
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
25
|
-
"axios": "^1.6.
|
|
25
|
+
"axios": "^1.6.5",
|
|
26
26
|
"firebase-admin": "^12.0.0",
|
|
27
27
|
"firebase-functions": "^4.6.0",
|
|
28
28
|
"form-data": "4.0.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-webhooks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for general order webhooks",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
|
-
"axios": "^1.6.
|
|
24
|
+
"axios": "^1.6.5",
|
|
25
25
|
"firebase-admin": "^12.0.0",
|
|
26
26
|
"firebase-functions": "^4.6.0"
|
|
27
27
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/emails",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce email sender",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@cloudcommerce/firebase": "workspace:*",
|
|
26
|
-
"axios": "^1.6.
|
|
26
|
+
"axios": "^1.6.5",
|
|
27
27
|
"ejs": "^3.1.9",
|
|
28
28
|
"nodemailer": "^6.9.8"
|
|
29
29
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/eslint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce ESLint config",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"build": "echo '@ecomplus/eslint'"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
23
|
-
"@typescript-eslint/parser": "^6.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
|
23
|
+
"@typescript-eslint/parser": "^6.18.0",
|
|
24
24
|
"eslint": "^8.56.0",
|
|
25
25
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
26
26
|
"eslint-plugin-import": "^2.29.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/modules",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce modules API",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
7
7
|
"exports": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
48
48
|
"ajv": "^8.12.0",
|
|
49
49
|
"ajv-formats": "^2.1.1",
|
|
50
|
-
"axios": "^1.6.
|
|
50
|
+
"axios": "^1.6.5",
|
|
51
51
|
"firebase-admin": "^12.0.0",
|
|
52
52
|
"firebase-functions": "^4.6.0",
|
|
53
53
|
"source-map-support": "^0.5.21"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/ssr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront SSR",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"@cloudcommerce/i18n": "workspace:*",
|
|
33
33
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
34
34
|
"@vueuse/core": "10.7.1",
|
|
35
|
-
"astro": "4.1.
|
|
35
|
+
"astro": "4.1.1",
|
|
36
36
|
"astro-capo": "^0.0.1",
|
|
37
|
-
"axios": "^1.6.
|
|
37
|
+
"axios": "^1.6.5",
|
|
38
38
|
"firebase-admin": "^12.0.0",
|
|
39
39
|
"firebase-functions": "^4.6.0",
|
|
40
40
|
"mitt": "^3.0.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hydrate on context script executed (`$storefront.apiContext` ready)
|
|
3
|
-
* Check event emits at BaseHead.astro
|
|
3
|
+
* Check event emits at BaseHead.astro and use-shared-data.ts
|
|
4
4
|
* @type {import('astro').ClientDirective}
|
|
5
5
|
*/
|
|
6
6
|
export default (load, opts) => {
|
|
@@ -9,7 +9,21 @@ export default (load, opts) => {
|
|
|
9
9
|
await hydrate();
|
|
10
10
|
};
|
|
11
11
|
const next = () => {
|
|
12
|
-
|
|
12
|
+
const arrOpts = Array.isArray(opts.value) ? opts.value : [opts.value];
|
|
13
|
+
for (let i = 0; i < arrOpts.length; i++) {
|
|
14
|
+
if (typeof arrOpts[i] === 'string' && arrOpts[i].startsWith('data:')) {
|
|
15
|
+
const field = arrOpts[i].substring(5);
|
|
16
|
+
if (!window.$storefront?.data?.[field]) {
|
|
17
|
+
window.addEventListener(
|
|
18
|
+
`storefront:data:${field}`,
|
|
19
|
+
next,
|
|
20
|
+
{ once: true },
|
|
21
|
+
);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (arrOpts.includes('idle')) {
|
|
13
27
|
if (typeof window.requestIdleCallback === 'function') {
|
|
14
28
|
setTimeout(() => window.requestIdleCallback(hy), 9);
|
|
15
29
|
return;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import 'astro';
|
|
3
3
|
|
|
4
|
+
type ClientContextOption = 'idle' | `data:${string}`;
|
|
5
|
+
|
|
4
6
|
declare module 'astro' {
|
|
5
7
|
interface AstroClientDirectives {
|
|
6
|
-
'client:context'?: boolean |
|
|
8
|
+
'client:context'?: boolean | ClientContextOption | ClientContextOption[];
|
|
7
9
|
}
|
|
8
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@astrojs/node": "7.0.4",
|
|
33
|
-
"@astrojs/vue": "4.0.
|
|
33
|
+
"@astrojs/vue": "4.0.8",
|
|
34
34
|
"@cloudcommerce/api": "workspace:*",
|
|
35
35
|
"@cloudcommerce/config": "workspace:*",
|
|
36
36
|
"@cloudcommerce/i18n": "workspace:*",
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
"@types/gtag.js": "^0.0.18",
|
|
43
43
|
"@vite-pwa/astro": "^0.2.0",
|
|
44
44
|
"@vueuse/core": "10.7.1",
|
|
45
|
-
"astro": "4.1.
|
|
45
|
+
"astro": "4.1.1",
|
|
46
46
|
"astro-capo": "^0.0.1",
|
|
47
47
|
"chroma-js": "^2.4.2",
|
|
48
48
|
"dotenv": "^16.3.1",
|
|
49
49
|
"firebase": "^10.7.1",
|
|
50
|
-
"image-size": "^1.1.
|
|
50
|
+
"image-size": "^1.1.1",
|
|
51
51
|
"mime": "^3.0.0",
|
|
52
52
|
"mitt": "^3.0.1",
|
|
53
53
|
"semver": "^7.5.4",
|
|
54
54
|
"sharp": "^0.33.1",
|
|
55
|
-
"tailwindcss": "^3.4.
|
|
55
|
+
"tailwindcss": "^3.4.1",
|
|
56
56
|
"unocss": "^0.58.3",
|
|
57
57
|
"unplugin-auto-import": "^0.17.3",
|
|
58
|
-
"vite": "^5.0.
|
|
58
|
+
"vite": "^5.0.11",
|
|
59
59
|
"vite-plugin-pwa": "^0.17.4",
|
|
60
60
|
"vue": "^3.4.5",
|
|
61
61
|
"wade": "0.3.3",
|
|
@@ -38,7 +38,8 @@ const useSharedData = async <T extends string = string>(props: Props<T>) => {
|
|
|
38
38
|
return {
|
|
39
39
|
value,
|
|
40
40
|
getInlineClientJS: () => `
|
|
41
|
-
window.$storefront.data['${field}'] = ${JSON.stringify(value)}
|
|
41
|
+
window.$storefront.data['${field}'] = ${JSON.stringify(value)};
|
|
42
|
+
window.dispatchEvent(new Event('storefront:data:${field}'));`,
|
|
42
43
|
};
|
|
43
44
|
};
|
|
44
45
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResourceId, Products } from '@cloudcommerce/api/types';
|
|
1
|
+
import type { ResourceId, Products, Grids } from '@cloudcommerce/api/types';
|
|
2
2
|
import {
|
|
3
3
|
ref,
|
|
4
4
|
computed,
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
watch,
|
|
8
8
|
toRef,
|
|
9
9
|
} from 'vue';
|
|
10
|
-
import api from '@cloudcommerce/api';
|
|
11
10
|
import {
|
|
12
11
|
specValueByText as getSpecValueByText,
|
|
13
12
|
specTextValue as getSpecTextValue,
|
|
@@ -18,14 +17,19 @@ import {
|
|
|
18
17
|
export interface Props {
|
|
19
18
|
variations: Exclude<Products['variations'], undefined>;
|
|
20
19
|
variationId?: ResourceId | null;
|
|
20
|
+
grids?: Array<Partial<Grids>>;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const useSkuSelector = (props: Props) => {
|
|
24
|
-
const grids = shallowReactive(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
const grids = shallowReactive(
|
|
25
|
+
props.grids
|
|
26
|
+
|| globalThis.$storefront.data.grids
|
|
27
|
+
|| [],
|
|
28
|
+
);
|
|
29
|
+
if (!grids.length && !import.meta.env.SSR) {
|
|
30
|
+
window.addEventListener('storefront:data:data', () => {
|
|
31
|
+
globalThis.$storefront.data.grids?.forEach((grid) => grids.push(grid));
|
|
32
|
+
}, { once: true });
|
|
29
33
|
}
|
|
30
34
|
const variationsGrids = reactive<Record<string, string[]>>({});
|
|
31
35
|
const activeVariationsGrids = reactive<Record<string, string[]>>({});
|
|
File without changes
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import {
|
|
3
|
-
type Props as UseBreadcrumbsProps,
|
|
4
|
-
useBreadcrumbs,
|
|
5
|
-
} from '@@sf/composables/use-breadcrumbs';
|
|
6
|
-
|
|
7
|
-
export interface Props extends UseBreadcrumbsProps {}
|
|
8
|
-
|
|
9
|
-
const { breadcrumbs, inlineJSONLd } = await useBreadcrumbs(Astro.props);
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
{breadcrumbs.length > 0 &&
|
|
13
|
-
<section class={`ui-section-slim ${breadcrumbs.length > 1 ? '' : 'hidden lg:block'}`}>
|
|
14
|
-
<nav aria-label="Breadcrumb" class="w-full overflow-hidden text-lg md:text-sm">
|
|
15
|
-
<ol class="flex items-center gap-1 text-base-600">
|
|
16
|
-
<li>
|
|
17
|
-
<a href="/" class="hover:text-primary">
|
|
18
|
-
<span class="sr-only"> Home </span>
|
|
19
|
-
<i class="i-home"></i>
|
|
20
|
-
</a>
|
|
21
|
-
</li>
|
|
22
|
-
{breadcrumbs.map(({ name, link }, i) =>
|
|
23
|
-
<>
|
|
24
|
-
{i + 1 < breadcrumbs.length
|
|
25
|
-
? <li class="text-base-300">
|
|
26
|
-
<i class="i-chevron-right"></i>
|
|
27
|
-
</li>
|
|
28
|
-
<li class="whitespace-nowrap">
|
|
29
|
-
<a href={link} class="hover:text-primary">{name}</a>
|
|
30
|
-
</li>
|
|
31
|
-
: <li class="hidden lg:block text-base-300">
|
|
32
|
-
<i class="i-chevron-right"></i>
|
|
33
|
-
</li>
|
|
34
|
-
<li class="hidden lg:block whitespace-nowrap overflow-hidden text-ellipsis">
|
|
35
|
-
<span class="text-base-500">{name}</span>
|
|
36
|
-
</li>
|
|
37
|
-
}
|
|
38
|
-
</>
|
|
39
|
-
)}
|
|
40
|
-
</ol>
|
|
41
|
-
</nav>
|
|
42
|
-
{inlineJSONLd && <script type="application/ld+json" set:html={inlineJSONLd} />}
|
|
43
|
-
</section>
|
|
44
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { usePageHero } from '@@sf/layouts/use-page-main';
|
|
3
|
-
import BannerPictures from '@@sf/components/BannerPictures.astro';
|
|
4
|
-
import HeroSlider from '~/components/HeroSlider.vue';
|
|
5
|
-
import Sections from '~/main/Sections.astro';
|
|
6
|
-
|
|
7
|
-
const { routeContext } = Astro.locals;
|
|
8
|
-
const { heroSlider } = await usePageHero({ routeContext });
|
|
9
|
-
const heroSlides = heroSlider.slides;
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<main>
|
|
13
|
-
{heroSlider.slides.length &&
|
|
14
|
-
<HeroSlider {...heroSlider} client:idle>
|
|
15
|
-
{heroSlides[0] && <BannerPictures
|
|
16
|
-
slot="picture-0" {...heroSlides[0]} index={0}
|
|
17
|
-
widths={[640, 856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
|
|
18
|
-
{heroSlides[1] && <BannerPictures
|
|
19
|
-
slot="picture-1" {...heroSlides[1]} index={1}
|
|
20
|
-
widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
|
|
21
|
-
{heroSlides[2] && <BannerPictures
|
|
22
|
-
slot="picture-2" {...heroSlides[2]} index={2}
|
|
23
|
-
widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
|
|
24
|
-
{heroSlides[3] && <BannerPictures
|
|
25
|
-
slot="picture-3" {...heroSlides[3]} index={3}
|
|
26
|
-
widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
|
|
27
|
-
{heroSlides[4] && <BannerPictures
|
|
28
|
-
slot="picture-4" {...heroSlides[4]} index={4}
|
|
29
|
-
widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
|
|
30
|
-
{heroSlides[5] && <BannerPictures
|
|
31
|
-
slot="picture-5" {...heroSlides[5]} index={5}
|
|
32
|
-
widths={[856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
|
|
33
|
-
<!-- https://github.com/withastro/astro/issues/5066#issuecomment-1277998365 -->
|
|
34
|
-
</HeroSlider>
|
|
35
|
-
}
|
|
36
|
-
<Sections />
|
|
37
|
-
</main>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import api from '@cloudcommerce/api';
|
|
3
|
-
import SharedData from '@@sf/components/SharedData.astro';
|
|
4
|
-
import Sections from '~/main/Sections.astro';
|
|
5
|
-
|
|
6
|
-
const { fetchingApiContext } = Astro.locals.routeContext;
|
|
7
|
-
const [
|
|
8
|
-
{ data: { result: grids } },
|
|
9
|
-
] = await Promise.all([
|
|
10
|
-
api.get('grids'),
|
|
11
|
-
fetchingApiContext,
|
|
12
|
-
]);
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<main>
|
|
16
|
-
<SharedData field="grids" value={grids} />
|
|
17
|
-
<Sections />
|
|
18
|
-
</main>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import loadRouteContext, { type RouteContext } from '@@sf/ssr-context';
|
|
3
|
-
import BaseHead from '@@sf/layouts/BaseHead.astro';
|
|
4
|
-
import Base from '~/layouts/Base.astro';
|
|
5
|
-
import PageHeader from '~/layouts/PageHeader.astro';
|
|
6
|
-
import PageFooter from '~/layouts/PageFooter.astro';
|
|
7
|
-
import HomeMain from '~/main/Home.astro';
|
|
8
|
-
|
|
9
|
-
let routeContext: RouteContext | undefined;
|
|
10
|
-
let loadError: any;
|
|
11
|
-
try {
|
|
12
|
-
routeContext = await loadRouteContext(Astro);
|
|
13
|
-
} catch (err: any) {
|
|
14
|
-
if (err.astroResponse) {
|
|
15
|
-
return err.astroResponse;
|
|
16
|
-
}
|
|
17
|
-
loadError = err;
|
|
18
|
-
}
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
<!DOCTYPE html>
|
|
22
|
-
<html lang={routeContext?.lang.replace('_', '-')}>
|
|
23
|
-
{routeContext &&
|
|
24
|
-
<Base>
|
|
25
|
-
<BaseHead slot="base-head" />
|
|
26
|
-
<PageHeader />
|
|
27
|
-
<HomeMain />
|
|
28
|
-
<PageFooter />
|
|
29
|
-
</Base>
|
|
30
|
-
}
|
|
31
|
-
{loadError && <Fragment set:html={loadError.responseHTML} />}
|
|
32
|
-
</html>
|