cloudcommerce 0.33.0 → 0.33.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/.github/workflows/test-apps.yml +2 -2
- package/CHANGELOG.md +37 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barra-doce/.github/workflows/build-and-deploy.yml +1 -1
- package/ecomplus-stores/barra-doce/.github/workflows/calibreapp-image-actions.yml +1 -1
- package/ecomplus-stores/barra-doce/.vscode/settings.json +3 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/home.json +20 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/products.json +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +4 -1
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +9 -8
- package/ecomplus-stores/barra-doce/functions/ssr/public/robots.txt +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +15 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +5 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountPage.vue +62 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +6 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.astro +44 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartItem.vue +11 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +16 -13
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CheckoutPage.vue +33 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Collapse.vue +19 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/DocDescription.vue +28 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/FooterStamps.vue +62 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +14 -9
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ImagesGallery.vue +151 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/LoginForm.vue +107 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +6 -8
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +22 -22
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +122 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +10 -12
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductSpecifications.vue +42 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +7 -58
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +33 -34
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +5 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +19 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +10 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenavCategory.vue +9 -10
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SkuSelector.vue +58 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +3 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +1 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +1 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Sections.astro +25 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Wildcard.astro +12 -12
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +2 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/_vue.ts +17 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +34 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +62 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +0 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/~fallback.astro +0 -2
- package/ecomplus-stores/barra-doce/functions/ssr/tailwind.config.cjs +0 -1
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/monocard/.editorconfig +13 -0
- package/ecomplus-stores/monocard/.eslintrc.cjs +1 -1
- package/ecomplus-stores/monocard/.vscode/settings.json +5 -1
- package/ecomplus-stores/monocard/functions/many/package.json +3 -3
- package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/terms.json +1 -1
- package/ecomplus-stores/monocard/functions/ssr/content/pages/home.json +1 -44
- package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +2 -1
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +4 -1
- package/ecomplus-stores/monocard/functions/ssr/package.json +8 -7
- package/ecomplus-stores/monocard/functions/ssr/public/robots.txt +2 -4
- package/ecomplus-stores/monocard/functions/ssr/src/assets/style.css +7 -2
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +16 -14
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountPage.vue +62 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/Banner.vue +3 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/Breadcrumbs.astro +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/CartItem.vue +11 -11
- package/ecomplus-stores/monocard/functions/ssr/src/components/CartSidebar.vue +16 -13
- package/ecomplus-stores/monocard/functions/ssr/src/components/CheckoutPage.vue +33 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/Collapse.vue +19 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.vue +3 -8
- package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +73 -79
- package/ecomplus-stores/monocard/functions/ssr/src/components/FooterStamps.vue +63 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ImagesGallery.vue +154 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/LoginForm.vue +107 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +1 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +21 -22
- package/ecomplus-stores/monocard/functions/ssr/src/components/PitchBar.vue +7 -7
- package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +3 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductCard.vue +24 -24
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductDetails.vue +122 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductShelf.vue +11 -11
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductSpecifications.vue +42 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/SearchModal.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopFooter.vue +10 -62
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +25 -31
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +8 -8
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +10 -11
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +9 -10
- package/ecomplus-stores/monocard/functions/ssr/src/components/SkuSelector.vue +58 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageFooter.astro +4 -3
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +2 -1
- package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +18 -4
- package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +10 -1
- package/ecomplus-stores/monocard/functions/ssr/src/pages/app/account.astro +34 -0
- package/ecomplus-stores/monocard/functions/ssr/src/pages/app/index.astro +62 -0
- package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +0 -5
- package/ecomplus-stores/monocard/functions/ssr/src/pages/~fallback.astro +0 -2
- package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +0 -1
- package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/monocard/package.json +2 -2
- package/package.json +7 -7
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +3 -3
- 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 +3 -3
- package/packages/apps/flash-courier/package.json +2 -2
- 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 +2 -2
- 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 +3 -3
- 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 +4 -4
- package/packages/eslint/package.json +4 -4
- 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 +2 -2
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/storefront/client.d.ts +3 -0
- package/packages/storefront/config/astro/context-directive.mjs +2 -2
- package/packages/storefront/package.json +9 -7
- package/packages/storefront/src/analytics/event-to-fbq.ts +82 -0
- package/packages/storefront/src/analytics/event-to-ttq.ts +15 -0
- package/packages/storefront/src/helpers/afetch.ts +20 -8
- package/packages/storefront/src/helpers/sf-utils.ts +15 -0
- package/packages/storefront/src/lib/components/Carousel.vue +19 -14
- package/packages/storefront/src/lib/composables/use-product-card.ts +12 -0
- package/packages/storefront/src/lib/layouts/Base.astro +1 -0
- package/packages/storefront/src/lib/layouts/BaseHead.astro +9 -2
- package/packages/storefront/src/lib/scripts/push-analytics-events.ts +88 -0
- package/packages/storefront/src/lib/scripts/session-utm.ts +16 -6
- package/packages/storefront/src/lib/scripts/vbeta-app.ts +4 -0
- package/packages/storefront/src/lib/ssr-context.ts +2 -2
- package/packages/storefront/src/lib/state/shopping-cart.ts +35 -2
- package/packages/storefront/src/lib/state/use-analytics.ts +283 -0
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/logo.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/Checkout.astro +0 -0
- package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/contato.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/fluxo.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Checkout.astro +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pagarme",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.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.2",
|
|
29
29
|
"firebase-admin": "^11.11.0",
|
|
30
30
|
"firebase-functions": "^4.5.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": "0.33.
|
|
4
|
+
"version": "0.33.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,9 +27,9 @@
|
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
29
|
"@ecomplus/utils": "1.5.0-rc.5",
|
|
30
|
-
"axios": "^1.
|
|
30
|
+
"axios": "^1.6.2",
|
|
31
31
|
"firebase-admin": "^11.11.0",
|
|
32
|
-
"firebase-functions": "^4.
|
|
32
|
+
"firebase-functions": "^4.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@cloudcommerce/test-base": "workspace:*",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-paghiper",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.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.2",
|
|
29
29
|
"firebase-admin": "^11.11.0",
|
|
30
30
|
"firebase-functions": "^4.5.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pix",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.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.2",
|
|
29
29
|
"firebase-admin": "^11.11.0",
|
|
30
30
|
"firebase-functions": "^4.5.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-tiny-erp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.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.5",
|
|
25
|
-
"axios": "^1.6.
|
|
25
|
+
"axios": "^1.6.2",
|
|
26
26
|
"firebase-admin": "^11.11.0",
|
|
27
27
|
"firebase-functions": "^4.5.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": "0.33.
|
|
4
|
+
"version": "0.33.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.2",
|
|
25
25
|
"firebase-admin": "^11.11.0",
|
|
26
26
|
"firebase-functions": "^4.5.0"
|
|
27
27
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/emails",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.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,13 +23,13 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@cloudcommerce/firebase": "workspace:*",
|
|
26
|
-
"axios": "^1.6.
|
|
26
|
+
"axios": "^1.6.2",
|
|
27
27
|
"ejs": "^3.1.9",
|
|
28
28
|
"nodemailer": "^6.9.7"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@cloudcommerce/types": "workspace:*",
|
|
32
|
-
"@types/ejs": "^3.1.
|
|
33
|
-
"@types/nodemailer": "^6.4.
|
|
32
|
+
"@types/ejs": "^3.1.5",
|
|
33
|
+
"@types/nodemailer": "^6.4.14"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/eslint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce ESLint config",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"build": "echo '@ecomplus/eslint'"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
23
|
-
"@typescript-eslint/parser": "^6.
|
|
24
|
-
"eslint": "^8.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
|
23
|
+
"@typescript-eslint/parser": "^6.12.0",
|
|
24
|
+
"eslint": "^8.54.0",
|
|
25
25
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
26
26
|
"eslint-plugin-import": "^2.29.0",
|
|
27
27
|
"eslint-plugin-tailwindcss": "3.13.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/firebase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce on Firebase",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@cloudcommerce/api": "workspace:*",
|
|
33
33
|
"@cloudcommerce/config": "workspace:*",
|
|
34
|
-
"@google-cloud/pubsub": "^4.0.
|
|
34
|
+
"@google-cloud/pubsub": "^4.0.7",
|
|
35
35
|
"firebase-admin": "^11.11.0",
|
|
36
36
|
"firebase-functions": "^4.5.0",
|
|
37
37
|
"source-map-support": "^0.5.21"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/modules",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.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.5",
|
|
48
48
|
"ajv": "^8.12.0",
|
|
49
49
|
"ajv-formats": "^2.1.1",
|
|
50
|
-
"axios": "^1.6.
|
|
50
|
+
"axios": "^1.6.2",
|
|
51
51
|
"firebase-admin": "^11.11.0",
|
|
52
52
|
"firebase-functions": "^4.5.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": "0.33.
|
|
4
|
+
"version": "0.33.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront SSR",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@cloudcommerce/firebase": "workspace:*",
|
|
31
31
|
"@cloudcommerce/i18n": "workspace:*",
|
|
32
32
|
"@ecomplus/utils": "1.5.0-rc.5",
|
|
33
|
-
"@vueuse/core": "10.
|
|
33
|
+
"@vueuse/core": "10.6.1",
|
|
34
34
|
"astro": "2.10.15",
|
|
35
35
|
"astro-capo": "^0.0.1",
|
|
36
36
|
"firebase-admin": "^11.11.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="./src/vue-globals" />
|
|
2
2
|
/// <reference types="./.auto-imports" />
|
|
3
|
+
/// <reference types="gtag.js" />
|
|
3
4
|
|
|
4
5
|
type DocCleanupFields = 'body_html'
|
|
5
6
|
| 'body_text'
|
|
@@ -29,3 +30,5 @@ interface Window {
|
|
|
29
30
|
};
|
|
30
31
|
$isCmsPreview?: boolean;
|
|
31
32
|
}
|
|
33
|
+
|
|
34
|
+
declare module 'gtag.js';
|
|
@@ -23,9 +23,9 @@ export default (load, opts) => {
|
|
|
23
23
|
if (window._firstLoadContextId === id && window._emitedContextId === id) {
|
|
24
24
|
console.log('[ctx] first load');
|
|
25
25
|
next();
|
|
26
|
-
|
|
26
|
+
document.addEventListener('astro:beforeload', () => {
|
|
27
27
|
delete window._firstLoadContextId;
|
|
28
|
-
},
|
|
28
|
+
}, { once: true });
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
window.addEventListener('storefront:apiContext', next, { once: true });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.2",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -39,23 +39,25 @@
|
|
|
39
39
|
"@fastify/deepmerge": "^1.3.0",
|
|
40
40
|
"@iconify-json/fa6-brands": "^1.1.13",
|
|
41
41
|
"@iconify-json/heroicons": "^1.1.13",
|
|
42
|
-
"@iconify-json/logos": "^1.1.
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
42
|
+
"@iconify-json/logos": "^1.1.38",
|
|
43
|
+
"@types/gtag.js": "^0.0.18",
|
|
44
|
+
"@vite-pwa/astro": "^0.1.5",
|
|
45
|
+
"@vueuse/core": "10.6.1",
|
|
45
46
|
"astro": "2.10.15",
|
|
46
47
|
"astro-capo": "^0.0.1",
|
|
47
48
|
"chroma-js": "^2.4.2",
|
|
48
49
|
"dotenv": "^16.3.1",
|
|
49
|
-
"firebase": "^10.
|
|
50
|
+
"firebase": "^10.6.0",
|
|
50
51
|
"image-size": "^1.0.2",
|
|
51
52
|
"mime": "^3.0.0",
|
|
53
|
+
"mitt": "^3.0.1",
|
|
52
54
|
"semver": "^7.5.4",
|
|
53
55
|
"sharp": "^0.32.6",
|
|
54
56
|
"tailwindcss": "^3.3.5",
|
|
55
|
-
"unocss": "^0.57.
|
|
57
|
+
"unocss": "^0.57.6",
|
|
56
58
|
"unplugin-auto-import": "^0.16.7",
|
|
57
59
|
"vite": "^4.5.0",
|
|
58
|
-
"vite-plugin-pwa": "^0.
|
|
60
|
+
"vite-plugin-pwa": "^0.17.0",
|
|
59
61
|
"vue": "^3.3.8"
|
|
60
62
|
},
|
|
61
63
|
"devDependencies": {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { GtagEventMessage } from '@@sf/state/use-analytics';
|
|
2
|
+
|
|
3
|
+
const pageContentState = {
|
|
4
|
+
waiting: Promise.resolve(),
|
|
5
|
+
params: {
|
|
6
|
+
content_ids: [] as string[],
|
|
7
|
+
content_name: '',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const parseGtagItem = (
|
|
12
|
+
item: Exclude<Gtag.EventParams['items'], undefined>[0],
|
|
13
|
+
currency = 'BRL',
|
|
14
|
+
isCartEvent = false,
|
|
15
|
+
) => {
|
|
16
|
+
const params: Record<string, any> = {
|
|
17
|
+
currency,
|
|
18
|
+
content_category: item.item_category,
|
|
19
|
+
content_name: item.item_name,
|
|
20
|
+
value: item.price,
|
|
21
|
+
content_type: 'product',
|
|
22
|
+
};
|
|
23
|
+
if (isCartEvent) {
|
|
24
|
+
params.contents = [{
|
|
25
|
+
id: item.item_id,
|
|
26
|
+
quantity: item.quantity,
|
|
27
|
+
}];
|
|
28
|
+
} else {
|
|
29
|
+
params.content_ids = [item.item_id];
|
|
30
|
+
}
|
|
31
|
+
return params;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// https://developers.facebook.com/docs/meta-pixel/reference#standard-events
|
|
35
|
+
export const parseGtagToFbq = async ({ event }: GtagEventMessage) => {
|
|
36
|
+
if (event.name === 'page_view') {
|
|
37
|
+
pageContentState.waiting = new Promise((resolve) => {
|
|
38
|
+
setTimeout(resolve, 110);
|
|
39
|
+
});
|
|
40
|
+
pageContentState.params.content_name = event.params.page_title;
|
|
41
|
+
return [{ name: 'PageView' }];
|
|
42
|
+
}
|
|
43
|
+
const { items, currency } = event.params;
|
|
44
|
+
if (event.name === 'view_item' && items) {
|
|
45
|
+
const firstItem = items[0];
|
|
46
|
+
if (firstItem) {
|
|
47
|
+
if (firstItem.item_list_id === 'product-page') {
|
|
48
|
+
return [{
|
|
49
|
+
name: 'ViewContent',
|
|
50
|
+
params: parseGtagItem(firstItem, currency),
|
|
51
|
+
}];
|
|
52
|
+
}
|
|
53
|
+
items.forEach(({ item_id: id }) => {
|
|
54
|
+
pageContentState.params.content_ids.push(id as string);
|
|
55
|
+
});
|
|
56
|
+
if (pageContentState.params.content_ids.length > items.length) {
|
|
57
|
+
return [{ name: null }];
|
|
58
|
+
}
|
|
59
|
+
await pageContentState.waiting;
|
|
60
|
+
return [{
|
|
61
|
+
name: 'ViewContent',
|
|
62
|
+
params: {
|
|
63
|
+
...pageContentState.params,
|
|
64
|
+
content_type: 'product',
|
|
65
|
+
},
|
|
66
|
+
}];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if ((event.name === 'add_to_cart' || event.name === 'remove_from_cart') && items) {
|
|
70
|
+
const isAdd = event.name === 'add_to_cart';
|
|
71
|
+
return items.map((item) => ({
|
|
72
|
+
name: 'AddToCart',
|
|
73
|
+
params: parseGtagItem({
|
|
74
|
+
...item,
|
|
75
|
+
quantity: isAdd ? (item.quantity || 1) : -(item.quantity || 1),
|
|
76
|
+
}, currency, true),
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
return [{ name: null }];
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default parseGtagToFbq;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GtagEventMessage } from '@@sf/state/use-analytics';
|
|
2
|
+
|
|
3
|
+
export const parseGtagToTtq = (event: GtagEventMessage['event']) => {
|
|
4
|
+
let name = '';
|
|
5
|
+
const params: Record<string, any> = {};
|
|
6
|
+
switch (event.name) {
|
|
7
|
+
case 'page_view':
|
|
8
|
+
name = 'PageView';
|
|
9
|
+
break;
|
|
10
|
+
default:
|
|
11
|
+
}
|
|
12
|
+
return { name, params };
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default parseGtagToTtq;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
type FetchParams = Parameters<typeof fetch>;
|
|
2
|
+
type RequestInit = Exclude<FetchParams[1], undefined>;
|
|
3
|
+
type BodyInit = RequestInit['body'] | Record<string, any> | Array<any>;
|
|
2
4
|
|
|
3
|
-
const afetch = (
|
|
5
|
+
const afetch = (
|
|
6
|
+
url: FetchParams[0],
|
|
7
|
+
init?: Omit<RequestInit, 'body'> & { body?: BodyInit },
|
|
8
|
+
timeout = 10000,
|
|
9
|
+
) => {
|
|
4
10
|
let abortController: AbortController | undefined;
|
|
5
11
|
let timer: NodeJS.Timeout | undefined;
|
|
6
12
|
if (timeout) {
|
|
@@ -9,16 +15,22 @@ const afetch = (url: FetchParams[0], init?: FetchParams[1], timeout = 10000) =>
|
|
|
9
15
|
(abortController as AbortController).abort();
|
|
10
16
|
}, timeout);
|
|
11
17
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
init.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
let body: RequestInit['body'];
|
|
19
|
+
if (init?.body) {
|
|
20
|
+
if (typeof init.body === 'object') {
|
|
21
|
+
body = JSON.stringify(init.body);
|
|
22
|
+
init.headers = {
|
|
23
|
+
...init.headers,
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
'Content-Length': body.length.toString(),
|
|
26
|
+
};
|
|
27
|
+
} else {
|
|
28
|
+
body = init.body;
|
|
29
|
+
}
|
|
19
30
|
}
|
|
20
31
|
const promise = fetch(url, {
|
|
21
32
|
...init,
|
|
33
|
+
body,
|
|
22
34
|
signal: abortController?.signal,
|
|
23
35
|
});
|
|
24
36
|
promise.finally(() => {
|
|
@@ -10,3 +10,18 @@ export const requestIdleCallback = (fn: (...args: any[]) => any, fallbackMs = 30
|
|
|
10
10
|
setTimeout(fn, fallbackMs);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
+
|
|
14
|
+
export const slugify = (str: string) => {
|
|
15
|
+
return str
|
|
16
|
+
.toLowerCase()
|
|
17
|
+
.trim()
|
|
18
|
+
.replace(/[ÁáÃãÂâÀà]/g, 'a')
|
|
19
|
+
.replace(/[Éé]/g, 'e')
|
|
20
|
+
.replace(/[Íí]/g, 'i')
|
|
21
|
+
.replace(/[ÓóÔô]/g, 'o')
|
|
22
|
+
.replace(/[Úú]/g, 'u')
|
|
23
|
+
.replace(/[Çç]/g, 'c')
|
|
24
|
+
.replace(/[\W\r\n]/gm, '-')
|
|
25
|
+
.replace(/-{2,}/g, '-')
|
|
26
|
+
.replace(/(^-)|(-$)/g, '');
|
|
27
|
+
};
|
|
@@ -127,24 +127,29 @@ const changeSlide = (step: number, isPageScroll: boolean = true) => {
|
|
|
127
127
|
if (slideSizes.value.length < 2) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
130
|
+
let nextOffset = -1;
|
|
131
|
+
if (currentPos.value + wrapperVisibleSize.value >= wrapperScrollSize.value) {
|
|
132
|
+
nextOffset = 0;
|
|
133
|
+
} else {
|
|
134
|
+
if (isPageScroll && (step === 1 || step === -1)) {
|
|
135
|
+
let pageStep = 0;
|
|
136
|
+
let pageStepSize = 0;
|
|
137
|
+
for (let i = activeIndex.value; i < slideSizes.value.length; i++) {
|
|
138
|
+
const { size } = slideSizes.value[i] || {};
|
|
139
|
+
if (size) {
|
|
140
|
+
pageStep += 1;
|
|
141
|
+
pageStepSize += size;
|
|
142
|
+
if (pageStepSize + size * 0.75 >= wrapperVisibleSize.value) {
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
140
145
|
}
|
|
141
146
|
}
|
|
147
|
+
if (pageStep) {
|
|
148
|
+
step = step > 0 ? pageStep : -pageStep;
|
|
149
|
+
}
|
|
142
150
|
}
|
|
143
|
-
|
|
144
|
-
step = step > 0 ? pageStep : -pageStep;
|
|
145
|
-
}
|
|
151
|
+
nextOffset = calcNextOffset(step);
|
|
146
152
|
}
|
|
147
|
-
const nextOffset = calcNextOffset(step);
|
|
148
153
|
wrapper.value?.scrollTo({
|
|
149
154
|
[isX ? 'left' : 'top']: nextOffset,
|
|
150
155
|
behavior: 'smooth',
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
inStock as checkInStock,
|
|
9
9
|
onPromotion as checkOnPromotion,
|
|
10
10
|
} from '@ecomplus/utils';
|
|
11
|
+
import { slugify } from '@@sf/sf-lib';
|
|
12
|
+
import { emitGtagEvent, getGtagItem } from '@@sf/state/use-analytics';
|
|
11
13
|
|
|
12
14
|
type PictureSize = { url: string; alt?: string; size?: string };
|
|
13
15
|
|
|
@@ -16,6 +18,8 @@ export type ProductItem = Products | SearchItem;
|
|
|
16
18
|
export type Props = {
|
|
17
19
|
product?: ProductItem;
|
|
18
20
|
productId?: Products['_id'];
|
|
21
|
+
listName?: string;
|
|
22
|
+
listId?: string;
|
|
19
23
|
} & ({ product: ProductItem } | { productId: Products['_id'] });
|
|
20
24
|
|
|
21
25
|
const useProductCard = <T extends ProductItem | undefined = undefined>(props: Props) => {
|
|
@@ -82,6 +86,14 @@ const useProductCard = <T extends ProductItem | undefined = undefined>(props: Pr
|
|
|
82
86
|
if ((product as SearchItem).has_variations) return true;
|
|
83
87
|
return Boolean(product.variations?.length);
|
|
84
88
|
});
|
|
89
|
+
emitGtagEvent('view_item', {
|
|
90
|
+
value: isActive.value ? product.price : 0,
|
|
91
|
+
items: [{
|
|
92
|
+
...getGtagItem(product),
|
|
93
|
+
item_list_name: props.listName,
|
|
94
|
+
item_list_id: props.listId || (props.listName && slugify(props.listName)),
|
|
95
|
+
}],
|
|
96
|
+
});
|
|
85
97
|
|
|
86
98
|
return {
|
|
87
99
|
isFetching,
|
|
@@ -20,6 +20,7 @@ const { customCode } = await getContent('layout');
|
|
|
20
20
|
{customCode?.htmlBody && <Fragment set:html={customCode.htmlBody} />}
|
|
21
21
|
<slot name="base-body-scripts">
|
|
22
22
|
<script src="../scripts/session-utm"></script>
|
|
23
|
+
<script src="../scripts/push-analytics-events"></script>
|
|
23
24
|
</slot>
|
|
24
25
|
<slot name="before-body-end" />
|
|
25
26
|
</BaseBody>
|
|
@@ -38,8 +38,15 @@ if (fetchingApiContext) {
|
|
|
38
38
|
|
|
39
39
|
const apiDoc = apiContext.doc;
|
|
40
40
|
const state: Record<string, any> = apiDoc || cmsContent || {};
|
|
41
|
-
const title = state.meta_title ||
|
|
42
|
-
|
|
41
|
+
const title = state.meta_title ||
|
|
42
|
+
state.metaTitle ||
|
|
43
|
+
(state.name && `${state.name} | ${settings.name}`) ||
|
|
44
|
+
(state.title && `${state.title} | ${settings.name}`) ||
|
|
45
|
+
settings.name;
|
|
46
|
+
const description = state.meta_description ||
|
|
47
|
+
state.metaDescription ||
|
|
48
|
+
state.short_description ||
|
|
49
|
+
settings.description;
|
|
43
50
|
const favicon = settings.icon ? getIconUrl(32) : '/favicon.ico';
|
|
44
51
|
const shortcutIcon = settings.icon ? getIconUrl(192) : null;
|
|
45
52
|
const canonicalUrl = new URL(Astro.url.pathname, Astro.site || `https://${domain}`);
|