cloudcommerce 0.6.4 → 0.6.6
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 +19 -0
- package/action.yml +53 -1
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/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/infinitepay/package.json +1 -1
- package/packages/apps/jadlog/package.json +1 -1
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/melhor-envio/package.json +1 -1
- package/packages/apps/mercadopago/package.json +1 -1
- package/packages/apps/pagarme/package.json +1 -1
- package/packages/apps/paghiper/package.json +1 -1
- package/packages/apps/pix/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/apps/webhooks/package.json +1 -1
- package/packages/cli/lib/cli.js +9 -8
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +9 -8
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/firebase/lib/config.d.ts +1 -1
- package/packages/firebase/lib/config.js +1 -1
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/storefront/dist/client/_astro/PitchBar.fae93937.js +1 -0
- package/packages/storefront/dist/client/_astro/{Prices.2bd87845.js → Prices.c3513660.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductCard.48f0f5ba.js → ProductCard.943cd687.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.5b3abae3.js +4 -0
- package/packages/storefront/dist/client/_astro/{_...slug_.cd49465e.css → _...slug_.86768317.css} +1 -1
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.a7457a61.js +1 -0
- package/packages/storefront/dist/client/_astro/client.e1250adc.js +1 -0
- package/packages/storefront/dist/client/_astro/{format-money.060d67ef.js → format-money.6379f63c.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.769c6acb.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.01f8d523.js → modules-info.fbf28964.js} +1 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.4e28b902.js +1 -0
- package/packages/storefront/dist/client/_astro/server.1bc2fa51.css +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/pages/{all.7f368e08.mjs → all.226fa45f.mjs} +128 -80
- package/packages/storefront/dist/server/entry.mjs +20 -28
- package/packages/storefront/package.json +2 -2
- package/packages/storefront/src/lib/components/Carousel.vue +11 -26
- package/packages/storefront/src/lib/components/CarouselControl.vue +2 -1
- package/packages/storefront/src/lib/components/Drawer.vue +11 -3
- package/packages/storefront/src/lib/components/globals/AImg.vue +4 -2
- package/packages/storefront/src/lib/components/globals/Fade.vue +23 -18
- package/packages/storefront/src/lib/composables/use-shop-header.ts +1 -3
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/PitchBar.b3636d56.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.44e0873d.js +0 -4
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.43eaff51.js +0 -1
- package/packages/storefront/dist/client/_astro/client.14d15518.js +0 -1
- package/packages/storefront/dist/client/_astro/index.3243538d.js +0 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.cb4db78a.js +0 -1
- package/packages/storefront/dist/client/_astro/server.60de185d.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.6.6](https://github.com/ecomplus/cloud-commerce/compare/v0.6.5...v0.6.6) (2023-02-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **cli:** Fix passing deploy options to command arguments with zx ([46e838f](https://github.com/ecomplus/cloud-commerce/commit/46e838ff9bf59116c05329e188a6661275f95493))
|
|
11
|
+
* **cli:** Prevent passing --only and --codebase args as true ([9266111](https://github.com/ecomplus/cloud-commerce/commit/92661117b1842d6e7dfa74d507426343d5c920b4))
|
|
12
|
+
* **storefront:** Fix `Drawer` vertical placement slide and handle scrollbar width ([7c6b916](https://github.com/ecomplus/cloud-commerce/commit/7c6b91602597274d962887951824590cef4ced28))
|
|
13
|
+
|
|
14
|
+
### [0.6.5](https://github.com/ecomplus/cloud-commerce/compare/v0.6.4...v0.6.5) (2023-02-24)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **cli:** Do not deploy with `--force` if other options passed ([5cda086](https://github.com/ecomplus/cloud-commerce/commit/5cda086c8e96f59fb0828a4c655041b5308342ca))
|
|
20
|
+
* **firebase:** Update config `ssrFunctionOptions` to 1GiB runtime by default ([f337537](https://github.com/ecomplus/cloud-commerce/commit/f3375370800d6a63b5f815674cb9796e3ac01e01))
|
|
21
|
+
* **storefront:** Global `Fade` transition component should not have scoped CSS ([cf57779](https://github.com/ecomplus/cloud-commerce/commit/cf57779437c3509aeec2b90dadbaf1dd55f3d45e))
|
|
22
|
+
* **storefront:** Reset `Carousel` scroll on window resize ([f66e883](https://github.com/ecomplus/cloud-commerce/commit/f66e883638ea3aab684810704093594776a37142))
|
|
23
|
+
|
|
5
24
|
### [0.6.4](https://github.com/ecomplus/cloud-commerce/compare/v0.6.3...v0.6.4) (2023-02-22)
|
|
6
25
|
|
|
7
26
|
|
package/action.yml
CHANGED
|
@@ -16,6 +16,8 @@ inputs:
|
|
|
16
16
|
required: true
|
|
17
17
|
ecom-store-id:
|
|
18
18
|
description: 'Store ID if not defined in config.json'
|
|
19
|
+
deploy-codebase:
|
|
20
|
+
description: 'Specific Firebase Functions codebase for partial deploy'
|
|
19
21
|
mail-sender:
|
|
20
22
|
description: 'Emails: sender email'
|
|
21
23
|
mail-sender-name:
|
|
@@ -71,11 +73,50 @@ runs:
|
|
|
71
73
|
done
|
|
72
74
|
echo "ecom_store_id=${ECOM_STORE_ID:-$(cat config.json | jq -r '.storeId')}" >> $GITHUB_ENV
|
|
73
75
|
|
|
76
|
+
- uses: dorny/paths-filter@v2.11.1
|
|
77
|
+
id: changes
|
|
78
|
+
with:
|
|
79
|
+
filters: |
|
|
80
|
+
core:
|
|
81
|
+
- 'functions/core/**'
|
|
82
|
+
events:
|
|
83
|
+
- 'functions/events/**'
|
|
84
|
+
modules:
|
|
85
|
+
- 'functions/modules/**'
|
|
86
|
+
passport:
|
|
87
|
+
- 'functions/passport/**'
|
|
88
|
+
ssr:
|
|
89
|
+
- 'functions/ssr/**'
|
|
90
|
+
|
|
91
|
+
- if: steps.changes.outputs.core != 'true' && steps.changes.outputs.events != 'true'
|
|
92
|
+
shell: bash
|
|
93
|
+
env:
|
|
94
|
+
DEPLOY_CODEBASE: ${{ inputs.deploy-codebase }}
|
|
95
|
+
CHS_MODULES: ${{ steps.changes.outputs.modules }}
|
|
96
|
+
CHS_PASSPORT: ${{ steps.changes.outputs.passport }}
|
|
97
|
+
CHS_SSR: ${{ steps.changes.outputs.ssr }}
|
|
98
|
+
run: |
|
|
99
|
+
if [ -z "$DEPLOY_CODEBASE" ]; then
|
|
100
|
+
if [ $CHS_SSR == 'true' ]; then
|
|
101
|
+
if [ $CHS_MODULES != 'true' ] && [ $CHS_PASSPORT != 'true' ]; then
|
|
102
|
+
deploy_codebase="ssr"
|
|
103
|
+
fi
|
|
104
|
+
elif [ $CHS_MODULES == 'true' ] && [ $CHS_PASSPORT != 'true' ]; then
|
|
105
|
+
deploy_codebase="modules"
|
|
106
|
+
elif [ $CHS_MODULES != 'true' ] && [ $CHS_PASSPORT == 'true' ]; then
|
|
107
|
+
deploy_codebase="passport"
|
|
108
|
+
fi
|
|
109
|
+
else
|
|
110
|
+
deploy_codebase=$DEPLOY_CODEBASE
|
|
111
|
+
fi
|
|
112
|
+
echo "deploy_codebase=$deploy_codebase" >> $GITHUB_ENV
|
|
113
|
+
|
|
74
114
|
- if: github.event_name == 'push'
|
|
75
115
|
name: Deploy to Firebase live
|
|
76
116
|
shell: bash
|
|
77
117
|
env:
|
|
78
118
|
ECOM_STORE_ID: ${{ env.ecom_store_id }}
|
|
119
|
+
DEPLOY_CODEBASE: ${{ env.deploy_codebase }}
|
|
79
120
|
GITHUB_TOKEN: ${{ inputs.github-token }}
|
|
80
121
|
FIREBASE_SERVICE_ACCOUNT: ${{ inputs.firebase-service-account }}
|
|
81
122
|
ECOM_AUTHENTICATION_ID: ${{ inputs.ecom-authentication-id }}
|
|
@@ -100,6 +141,7 @@ runs:
|
|
|
100
141
|
ECOM_API_KEY=$ECOM_API_KEY
|
|
101
142
|
ECOM_STORE_ID=$ECOM_STORE_ID
|
|
102
143
|
GITHUB_TOKEN=$GITHUB_TOKEN
|
|
144
|
+
DEPLOY_CODEBASE=$DEPLOY_CODEBASE
|
|
103
145
|
MAIL_SENDER=$MAIL_SENDER
|
|
104
146
|
MAIL_SENDER_NAME=$MAIL_SENDER_NAME
|
|
105
147
|
MAIL_REPLY_TO=$MAIL_REPLY_TO
|
|
@@ -113,7 +155,17 @@ runs:
|
|
|
113
155
|
GALAXPAY_PARTNER_HASH=$GALAXPAY_PARTNER_HASH
|
|
114
156
|
DATAFRETE_OPERATOR_TOKEN=$DATAFRETE_OPERATOR_TOKEN
|
|
115
157
|
" > functions/.env
|
|
116
|
-
|
|
158
|
+
if [ -z "$DEPLOY_CODEBASE" ]; then
|
|
159
|
+
GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npm run deploy
|
|
160
|
+
else
|
|
161
|
+
if [ $DEPLOY_CODEBASE == "ssr" ]; then
|
|
162
|
+
GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npm run deploy -- \
|
|
163
|
+
--only functions:$DEPLOY_CODEBASE,hosting
|
|
164
|
+
else
|
|
165
|
+
GOOGLE_APPLICATION_CREDENTIALS=$GAC_FILENAME npm run deploy -- \
|
|
166
|
+
--only functions:$DEPLOY_CODEBASE
|
|
167
|
+
fi
|
|
168
|
+
fi
|
|
117
169
|
|
|
118
170
|
- if: github.event_name == 'pull_request'
|
|
119
171
|
shell: bash
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.6",
|
|
5
5
|
"description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
|
|
6
6
|
"main": "packages/api/lib/index.js",
|
|
7
7
|
"author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
|
package/packages/cli/lib/cli.js
CHANGED
|
@@ -37,18 +37,19 @@ if (projectId) {
|
|
|
37
37
|
|
|
38
38
|
export default async () => {
|
|
39
39
|
await fs.copy(path.join(__dirname, '..', 'config'), pwd);
|
|
40
|
-
const options =
|
|
40
|
+
const options = [];
|
|
41
|
+
Object.keys(argv).forEach((key) => {
|
|
41
42
|
if (key !== '_' && argv[key] !== false) {
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
if (argv[key] !== true || (key !== 'codebase' && key !== 'only')) {
|
|
44
|
+
options.push(`--${key}`, argv[key]);
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
|
-
|
|
46
|
-
}, '');
|
|
47
|
+
});
|
|
47
48
|
const $firebase = (cmd) => {
|
|
48
|
-
if (cmd === 'deploy') {
|
|
49
|
-
return $`firebase --project=${projectId} ${cmd}
|
|
49
|
+
if (cmd === 'deploy' && !options.length) {
|
|
50
|
+
return $`firebase --project=${projectId} ${cmd} --force`;
|
|
50
51
|
}
|
|
51
|
-
return $`firebase --project=${projectId} ${cmd}${options}`;
|
|
52
|
+
return $`firebase --project=${projectId} ${cmd} ${options}`;
|
|
52
53
|
};
|
|
53
54
|
if (argv._.includes('serve')) {
|
|
54
55
|
await build();
|
package/packages/cli/src/cli.ts
CHANGED
|
@@ -51,18 +51,19 @@ if (projectId) {
|
|
|
51
51
|
export default async () => {
|
|
52
52
|
await fs.copy(path.join(__dirname, '..', 'config'), pwd);
|
|
53
53
|
|
|
54
|
-
const options =
|
|
54
|
+
const options: string[] = [];
|
|
55
|
+
Object.keys(argv).forEach((key) => {
|
|
55
56
|
if (key !== '_' && argv[key] !== false) {
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
if (argv[key] !== true || (key !== 'codebase' && key !== 'only')) {
|
|
58
|
+
options.push(`--${key}`, argv[key]);
|
|
59
|
+
}
|
|
58
60
|
}
|
|
59
|
-
|
|
60
|
-
}, '');
|
|
61
|
+
});
|
|
61
62
|
const $firebase = (cmd: string) => {
|
|
62
|
-
if (cmd === 'deploy') {
|
|
63
|
-
return $`firebase --project=${projectId} ${cmd}
|
|
63
|
+
if (cmd === 'deploy' && !options.length) {
|
|
64
|
+
return $`firebase --project=${projectId} ${cmd} --force`;
|
|
64
65
|
}
|
|
65
|
-
return $`firebase --project=${projectId} ${cmd}${options}`;
|
|
66
|
+
return $`firebase --project=${projectId} ${cmd} ${options}`;
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
if (argv._.includes('serve')) {
|
|
@@ -54,7 +54,7 @@ const mergeConfig = {
|
|
|
54
54
|
},
|
|
55
55
|
ssrFunctionOptions: {
|
|
56
56
|
region: SSR_DEPLOY_REGION || 'us-central1',
|
|
57
|
-
memory: SSR_DEPLOY_MEMORY || '
|
|
57
|
+
memory: SSR_DEPLOY_MEMORY || '1GiB',
|
|
58
58
|
timeoutSeconds: SSR_DEPLOY_TIMEOUT_SECONDS ? Number(SSR_DEPLOY_TIMEOUT_SECONDS) : 10,
|
|
59
59
|
minInstances: SSR_DEPLOY_MIN_INSTANCES ? Number(SSR_DEPLOY_MIN_INSTANCES) : 0,
|
|
60
60
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,MAAsB,MAAM,uBAAuB,CAAC;AAE3D,MAAM,aAAa,GAAmB;IACpC,qBAAqB;IACrB,cAAc;IACd,mBAAmB;IACnB,sBAAsB;CACvB,CAAC;AACF,MAAM,YAAY,GAAmB;IACnC,YAAY;IACZ,qBAAqB;CACtB,CAAC;AACF,MAAM,cAAc,GAAmB;IACrC,kBAAkB;CACnB,CAAC;AACF,MAAM,mBAAmB,GAAmB;IAC1C,YAAY;IACZ,qBAAqB;CACtB,CAAC;AACF,MAAM,YAAY,GAAmB;IACnC,YAAY;CACb,CAAC;AACF,MAAM,mBAAmB,GAAmB;IAC1C,YAAY;IACZ,mBAAmB;CACpB,CAAC;AACF,MAAM,qBAAqB,GAAmB;IAC5C,qBAAqB;CACtB,CAAC;AACF,MAAM,iBAAiB,GAAmB;IACxC,qBAAqB;CACtB,CAAC;AACF,MAAM,iBAAiB,GAAmB;IACxC,sBAAsB;IACtB,qBAAqB;IACrB,eAAe;CAChB,CAAC;AAEF,MAAM,EACJ,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,EAC1B,wBAAwB,GACzB,GAAG,OAAO,CAAC,GAAG,CAAC;AAEhB,IAAI,eAAe,GAAG,iBAAiB,IAAI,U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I;SACZ;QACD,MAAM,EAAE;YACN,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,YAAY;SACrB;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,aAAa;SACtB;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;SACd;QACD,MAAM,EAAE;YACN,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,YAAY;SACrB;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM;SACd;QACD,GAAG,EAAE;YACH,KAAK,EAAE,MAAM;SACd;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;SACd;QACD,MAAM,EAAE;YACN,KAAK,EAAE,MAAM;SACd;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,cAAc;SACvB;QACD,aAAa,EAAE;YACb,KAAK,EAAE,MAAM;SACd;QACD,aAAa,EAAE;YACb,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,mBAAmB;SAC5B;QACD,aAAa,EAAE;YACb,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,mBAAmB;SAC5B;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM;SACd;QACD,eAAe,EAAE;YACf,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,qBAAqB;SAC9B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,IAAI;SACZ;QACD,WAAW,EAAE;YACX,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,iBAAiB;SAC1B;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,iBAAiB;SAC1B;KACF;IACD,WAAW;CACZ,CAAC;AACF,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAExB,eAAe,MAId,CAAC"}
|
|
@@ -63,7 +63,7 @@ const mergeConfig = {
|
|
|
63
63
|
},
|
|
64
64
|
ssrFunctionOptions: {
|
|
65
65
|
region: SSR_DEPLOY_REGION || 'us-central1',
|
|
66
|
-
memory: (SSR_DEPLOY_MEMORY as '
|
|
66
|
+
memory: (SSR_DEPLOY_MEMORY as '256MiB' | '512MiB' | '1GiB' | '2GiB') || '1GiB',
|
|
67
67
|
timeoutSeconds: SSR_DEPLOY_TIMEOUT_SECONDS ? Number(SSR_DEPLOY_TIMEOUT_SECONDS) : 10,
|
|
68
68
|
minInstances: SSR_DEPLOY_MIN_INSTANCES ? Number(SSR_DEPLOY_MIN_INSTANCES) : 0,
|
|
69
69
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as G}from"./runtime-dom.esm-bundler.4e28b902.js";import{p as J}from"./modules-info.fbf28964.js";import{c as g,d as R,_ as j,m as Q,o as u,a as p,p as x,e as I,n as z,j as d,q as C,s as D,u as X,v as Y,x as Z,y as ee,k as $,w as v,l as q,g as b,z as te,A as ae,B as oe,F as re,C as se,b as ne}from"./_plugin-vue_export-helper.a7457a61.js";import{u as le,a as ie,b as ue}from"./index.769c6acb.js";/* empty css */import"./session-utm.72684b84.js";import"./idle-callback.889bf0ea.js";import"./format-money.6379f63c.js";const ce=r=>{const s=g(()=>r.slides.map(({html:e})=>J(e).value)),a=g(()=>s.value.filter(e=>e).length);return{parsedContents:s,countValidSlides:a}},K=Symbol("carousel"),de=R({__name:"CarouselControl",props:{direction:{default:1}},setup(r,{expose:s}){s();const{changeSlide:a}=Q(K),e={changeSlide:a};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}}),fe=["aria-label","data-carousel-control"];function pe(r,s,a,e,n,o){return u(),p("button",{type:"button","aria-label":a.direction>0?"Próximo":"Anterior",onClick:s[0]||(s[0]=i=>e.changeSlide(a.direction)),class:z(["group absolute top-0",a.direction>0?"right-0":"left-0"]),"data-carousel-control":a.direction>0?"next":"previous"},[x(r.$slots,"default",{},()=>[I("i",{class:z(["m-0",a.direction>0?"i-chevron-right group-active:translate-x-1":"i-chevron-left group-active:-translate-x-1"])},null,2)])],10,fe)}const U=j(de,[["render",pe]]),ve=R({__name:"Carousel",props:{as:{default:"ul"},modelValue:{default:1},autoplay:null},emits:["update:modelValue"],setup(r,{expose:s,emit:a}){s();const e=r,n=d(e.modelValue-1);C(D(e,"modelValue"),t=>{n.value=t-1}),C(n,(t,l)=>{t!==l&&a("update:modelValue",t+1)});const o=d(null),{x:i,isScrolling:f,arrivedState:S}=le(o),y=g(()=>S.left),w=g(()=>S.right),h=d([]),B=d(0),L=d(0),P=d(0),A=()=>{B.value=o.value.scrollWidth,L.value=o.value.offsetWidth},E=()=>{const t=[...o.value.children];h.value=t.map(l=>({offsetLeft:l.offsetLeft,width:l.offsetWidth}))},N=t=>{const l=t>0?n.value:n.value+t,O=h.value[l]?.width||0;return O?O*t:0},V=()=>{const t=h.value.findIndex(l=>Math.abs(l.offsetLeft-i.value)<=5);t>-1&&(n.value=t||0)},k=()=>{const t=B.value-L.value;P.value=h.value.findIndex(({offsetLeft:l})=>l>=t-5)};let c=null;const m=()=>{e.autoplay&&(clearTimeout(c),c=setTimeout(()=>{_(1)},e.autoplay))},_=t=>{if(t<0){if(y.value){k(),n.value=P.value-1,_(1);return}}else if(w.value){n.value=1,_(-1);return}const l=N(t);l&&(o.value.scrollBy({left:l,behavior:"smooth"}),m())};C(f,t=>{t?clearTimeout(c):(V(),m())});const F=d(null),H=ie(F);C(H,t=>{t?clearTimeout(c):m()});const T=()=>{o.value&&(A(),E(),V(),k())},W=ue(()=>{o.value.scrollLeft=0,T()},400);X(()=>{T(),Y(()=>{[...o.value.children].forEach(t=>{t.setAttribute("tabindex","0")})}),m(),window.addEventListener("resize",W)}),Z(()=>{window.removeEventListener("resize",W),clearTimeout(c)}),ee(K,{autoplay:D(e,"autoplay"),changeSlide:_,isBoundLeft:y,isBoundRight:w});const M={props:e,emit:a,currentIndex:n,wrapper:o,currentPos:i,isScrolling:f,arrivedState:S,isBoundLeft:y,isBoundRight:w,slidesWidth:h,wrapperScrollWidth:B,wrapperVisibleWidth:L,indexCount:P,calcWrapperWidth:A,calcSlidesWidth:E,calcNextWidth:N,calcCurrentIndex:V,calcIndexCount:k,get autoplayTimer(){return c},set autoplayTimer(t){c=t},restartAutoplay:m,changeSlide:_,carousel:F,isHovered:H,calcOnInit:T,onResize:W,CarouselControl:U};return Object.defineProperty(M,"__isScriptSetup",{enumerable:!1,value:!0}),M}}),he={ref:"carousel",class:"relative","data-carousel":""};function me(r,s,a,e,n,o){return u(),p("div",he,[(u(),$(q(a.as),{ref:"wrapper",class:"flex overflow-x-scroll overflow-y-hidden list-none m-0 p-0","data-carousel-wrapper":""},{default:v(()=>[x(r.$slots,"default")]),_:3},512)),x(r.$slots,"controls",te(ae({changeSlide:e.changeSlide,isBoundLeft:e.isBoundLeft,isBoundRight:e.isBoundRight,currentPage:e.currentIndex+1,pageCount:e.indexCount+1})),()=>[b(e.CarouselControl,{direction:-1},{default:v(()=>[x(r.$slots,"previous")]),_:3}),b(e.CarouselControl,null,{default:v(()=>[x(r.$slots,"next")]),_:3})])],512)}const _e=j(ve,[["render",me]]),xe=R({__name:"PitchBar",props:{slides:null},setup(r,{expose:s}){s();const a=r,{parsedContents:e,countValidSlides:n}=ce(a),o={props:a,parsedContents:e,countValidSlides:n,Carousel:_e,CarouselControl:U};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}}),be={class:"bg-base-100 relative z-1"},Ce={class:"container md:w-2/3 mx-auto px-3 py-1"},ge=["innerHTML"],Se={class:"text-xl leading-none text-base-400"};function ye(r,s,a,e,n,o){return u(),p("div",be,[I("div",Ce,[b(e.Carousel,{autoplay:e.countValidSlides>1?7e3:null},{controls:v(()=>[oe(I("div",Se,[b(e.CarouselControl,{direction:-1,class:"pr-2 bg-base-100 hover:text-base-700"}),b(e.CarouselControl,{class:"pl-2 bg-base-100 hover:text-base-700"})],512),[[G,e.countValidSlides>1]])]),default:v(()=>[(u(!0),p(re,null,se(a.slides,(i,f)=>(u(),p("li",{key:f,class:"shrink-0 basis-full h-full text-center"},[(u(),$(q(i.href?"ALink":"span"),{href:i.href,target:i.target,class:z(["inline-block px-8",i.href?"hover:underline":null])},{default:v(()=>[e.parsedContents[f]?(u(),p("span",{key:0,innerHTML:e.parsedContents[f],class:"prose text-sm text-base-800"},null,8,ge)):ne("",!0)]),_:2},1032,["href","target","class"]))]))),128))]),_:1},8,["autoplay"])])])}const Ie=j(xe,[["render",ye]]);export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as k}from"./modules-info.
|
|
1
|
+
import{m as k}from"./modules-info.fbf28964.js";import{g,c as S}from"./format-money.6379f63c.js";import{c as a,d as M,_ as T,a as i,t as o,b as u,e as h,f as C,n as I,g as L,w as D,r as z,o as l}from"./_plugin-vue_export-helper.a7457a61.js";/* empty css */import"./session-utm.72684b84.js";import"./idle-callback.889bf0ea.js";const j=(n,c)=>{const{type:s,value:t}=c;let r;return t?(s==="percentage"?r=n*((100-t)/100):r=n-t,r>0?r:0):n},E=n=>{const c=a(()=>n.product||{price:n.price||0,base_price:n.basePrice}),s=a(()=>{const{variations:e}=c.value;if(e){const d=g(c.value);for(let v=0;v<e.length;v++)if(g({...c.value,...e[v]})>d)return!0}return!1}),t=a(()=>k.apply_discount.available_extra_discount),r=a(()=>{const e=g(c.value),d=t.value;return d&&(!d.min_amount||e>d.min_amount)?j(e,d):e}),f=a(()=>{if(S(c.value))return c.value.base_price;const e=g(c.value);return e>r.value?e:0}),m=a(()=>n.installmentsOption||k.list_payments.installments_option||{max_number:1}),b=a(()=>{if(m.value.max_number<=1)return 1;const e=m.value.min_installment||5,d=Math.round(r.value/e);return Math.min(d,m.value.max_number)}),y=a(()=>m.value.monthly_interest||0),V=a(()=>{if(b.value>=2){if(!y.value)return r.value/b.value;const e=y.value/100;return r.value*e/(1-(1+e)**-b.value)}return 0}),p=a(()=>{const e=n.discountOption||k.list_payments.discount_option;return e&&(!e.min_amount||e.min_amount<=r.value)&&(!n.isAmountTotal||e.apply_at==="total")?e:{}}),x=a(()=>{const{label:e}=p.value;return e?e.includes(" ")?e:`via ${e}`:""}),O=a(()=>j(r.value,p.value)),_=a(()=>{if(n.loyaltyPointsProgram)return n.loyaltyPointsProgram;const e=k.list_payments.loyalty_points_programs;if(e){const d=Object.keys(e);for(let v=0;v<d.length;v++){const P=e[d[v]];if(P&&P.earn_percentage>0)return P}}return{ratio:0}}),W=a(()=>_.value.min_subtotal_to_earn||0),w=a(()=>_.value.name||""),N=a(()=>_.value.earn_percentage||0),B=a(()=>N.value*_.value.ratio),A=a(()=>B.value>=1?r.value*(B.value/100):0);return{hasVariedPrices:s,salePrice:r,comparePrice:f,installmentsObject:m,installmentsNumber:b,monthlyInterest:y,installmentValue:V,discountObject:p,discountLabel:x,priceWithDiscount:O,pointsProgramObject:_,pointsMinPrice:W,pointsProgramName:w,earnPointsPercentage:N,cashbackPercentage:B,cashbackValue:A}},F=M({__name:"Prices",props:{product:null,price:null,basePrice:null,isAmountTotal:{type:Boolean},installmentsOption:null,discountOption:null,isBig:{type:Boolean},isLiteral:{type:Boolean},hasCashback:{type:Boolean,default:!0},hasPriceOptions:{type:Boolean,default:!0}},setup(n,{expose:c}){c();const s=n,{hasVariedPrices:t,salePrice:r,comparePrice:f,cashbackPercentage:m,cashbackValue:b,installmentsNumber:y,monthlyInterest:V,installmentValue:p,priceWithDiscount:x,discountLabel:O}=E(s),_={props:s,hasVariedPrices:t,salePrice:r,comparePrice:f,cashbackPercentage:m,cashbackValue:b,installmentsNumber:y,monthlyInterest:V,installmentValue:p,priceWithDiscount:x,discountLabel:O};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),R={key:0,class:"text-base-500 mr-1"},q={key:0},G={key:1},H={key:0},J={key:0,class:"relative z-10"},K=["data-tooltip"],Q=h("i",{class:"i-cashback mr-1"},null,-1),U={class:"font-medium"},X=h("small",null," cashback",-1),Y={key:0},Z={key:0},$={key:1},ee={key:2},te={key:0},ne={key:0},ae={key:1};function se(n,c,s,t,r,f){const m=z("Fade");return l(),i("div",{class:I(["text-base-600",s.isBig?"text-lg":null]),"data-prices":""},[t.comparePrice?(l(),i("span",R,[s.isLiteral?(l(),i("small",q,o("De "))):u("",!0),h("s",null,o(n.$money(t.comparePrice)),1),s.isLiteral?(l(),i("small",G,o(" Por"))):u("",!0)])):u("",!0),h("strong",{class:I(["inline-block text-base-800",s.isBig?"text-5xl block":null])},[t.hasVariedPrices?(l(),i("small",H,o("A partir de "))):u("",!0),C(" "+o(n.$money(t.salePrice)),1)],2),L(m,{slide:"down"},{default:D(()=>[t.cashbackValue&&s.hasCashback?(l(),i("div",J,[h("span",{"data-tooltip":"Receba $1 de volta".replace("$1",n.$percentage(t.cashbackPercentage))},[Q,h("span",U,o(n.$money(t.cashbackValue)),1),X],8,K)])):u("",!0)]),_:1}),L(m,{slide:"down"},{default:D(()=>[t.installmentValue&&s.hasPriceOptions?(l(),i("div",Y,[s.isLiteral?(l(),i("small",Z,o("Até "))):u("",!0),C(" "+o(t.installmentsNumber)+"x ",1),s.isLiteral?(l(),i("small",$,o(" De "))):u("",!0),h("span",null,o(n.$money(t.installmentValue)),1),!t.monthlyInterest&&s.isLiteral?(l(),i("small",ee,o("Sem juros"))):u("",!0)])):u("",!0)]),_:1}),L(m,{slide:"down"},{default:D(()=>[t.priceWithDiscount<t.salePrice&&s.hasPriceOptions?(l(),i("div",te,[t.discountLabel?u("",!0):(l(),i("small",ne,o("A partir de "))),h("span",null,o(n.$money(t.priceWithDiscount)),1),t.discountLabel?(l(),i("small",ae,o(` ${t.discountLabel}`),1)):u("",!0)])):u("",!0)]),_:1})],2)}const me=T(F,[["render",se]]);export{me as default};
|
package/packages/storefront/dist/client/_astro/{ProductCard.48f0f5ba.js → ProductCard.943cd687.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import d from"./Prices.
|
|
1
|
+
import d from"./Prices.c3513660.js";import{d as _,_ as u,j as o,k as m,w as a,l as f,o as P,g as r,f as l,t as n}from"./_plugin-vue_export-helper.a7457a61.js";import"./modules-info.fbf28964.js";import"./session-utm.72684b84.js";import"./idle-callback.889bf0ea.js";import"./format-money.6379f63c.js";/* empty css */const b=_({__name:"ProductCard",props:{as:{default:"div"}},setup(p,{expose:s}){s();const i=o(12),e=o(!1);setTimeout(()=>{i.value=8,e.value=!0},5e3);const c={price:i,isBig:e,Prices:d};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function g(p,s,i,e,c,v){return P(),m(f(i.as),null,{default:a(()=>[r(e.Prices,null,{default:a(({salePrice:t})=>[l(" ProductCard "+n(t),1)]),_:1}),r(e.Prices,{product:{price:e.price}},null,8,["product"]),r(e.Prices,{price:12,"base-price":17}),r(e.Prices,{price:12,"base-price":16,"is-literal":!0}),r(e.Prices,{price:12,"is-big":e.isBig},null,8,["is-big"]),r(e.Prices,{price:14,"base-price":18,"is-big":e.isBig,"is-literal":!0},null,8,["is-big"]),r(e.Prices,{price:12,"base-price":16},{"compare-value":a(({comparePrice:t})=>[l(" x"+n(t),1)]),_:1})]),_:1})}const j=u(b,[["render",g]]);export{j as default};
|