cloudcommerce 0.6.3 → 0.6.5
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 +24 -0
- package/action.yml +57 -1
- package/package.json +1 -1
- package/packages/api/lib/types/carts.d.ts +72 -20
- package/packages/api/lib/types/orders.d.ts +72 -20
- package/packages/api/lib/types/products.d.ts +82 -11
- package/packages/api/package.json +1 -1
- package/packages/api/src/types/carts.d.ts +72 -20
- package/packages/api/src/types/orders.d.ts +72 -20
- package/packages/api/src/types/products.d.ts +82 -11
- 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 +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/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/lib/firebase/serve-storefront.js +3 -2
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/firebase/serve-storefront.ts +3 -2
- package/packages/storefront/dist/client/_astro/PitchBar.96fed383.js +1 -0
- package/packages/storefront/dist/client/_astro/{Prices.2bd87845.js → Prices.036ad2b4.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductCard.48f0f5ba.js → ProductCard.69751e12.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.4a8ce417.js +4 -0
- package/packages/storefront/dist/client/_astro/{_...slug_.a594715c.css → _...slug_.25a09a96.css} +1 -1
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.be244611.js +1 -0
- package/packages/storefront/dist/client/_astro/client.bc16bf93.js +1 -0
- package/packages/storefront/dist/client/_astro/{format-money.060d67ef.js → format-money.e57ae2ab.js} +1 -1
- package/packages/storefront/dist/client/_astro/index.248ccd97.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.01f8d523.js → modules-info.8540ba60.js} +1 -1
- package/packages/storefront/dist/client/_astro/runtime-dom.esm-bundler.be3a98cd.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.f15e2c35.mjs → all.9ad006f8.mjs} +125 -59
- package/packages/storefront/dist/server/entry.mjs +70 -36
- 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 +5 -1
- package/packages/storefront/src/lib/components/globals/AImg.vue +55 -0
- package/packages/storefront/src/lib/components/globals/Fade.vue +23 -18
- package/packages/storefront/src/lib/layouts/BaseHead.astro +3 -1
- package/packages/storefront/src/lib/pages/_vue.ts +2 -0
- package/packages/storefront/src/vue-globals.d.ts +1 -0
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/PitchBar.5ced676e.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.05d64cc8.js +0 -4
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.43eaff51.js +0 -1
- package/packages/storefront/dist/client/_astro/client.79615b8a.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/packages/storefront/dist/client/fallback/index.html +0 -79
- package/packages/storefront/dist/server/chunks/prerender.2527d85d.mjs +0 -2
|
@@ -802,17 +802,20 @@ export interface Products {
|
|
|
802
802
|
*
|
|
803
803
|
* @maxItems 50
|
|
804
804
|
*/
|
|
805
|
-
pictures?:
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
805
|
+
pictures?: {
|
|
806
|
+
/**
|
|
807
|
+
* Picture ID (ObjectID) [auto]
|
|
808
|
+
*/
|
|
809
|
+
_id?: string;
|
|
810
|
+
/**
|
|
811
|
+
* Tag to identify object, use only lowercase letters, digits and underscore
|
|
812
|
+
*/
|
|
813
|
+
tag?: string;
|
|
814
|
+
normal?: PictureSize;
|
|
815
|
+
big?: PictureSize1;
|
|
816
|
+
zoom?: PictureSize2;
|
|
817
|
+
small?: PictureSize3;
|
|
818
|
+
}[];
|
|
816
819
|
/**
|
|
817
820
|
* List of videos related to your product
|
|
818
821
|
*
|
|
@@ -1351,3 +1354,71 @@ export interface Products {
|
|
|
1351
1354
|
*/
|
|
1352
1355
|
notes?: string;
|
|
1353
1356
|
}
|
|
1357
|
+
/**
|
|
1358
|
+
* Default image size variant
|
|
1359
|
+
*/
|
|
1360
|
+
export interface PictureSize {
|
|
1361
|
+
/**
|
|
1362
|
+
* Image link
|
|
1363
|
+
*/
|
|
1364
|
+
url: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
1367
|
+
*/
|
|
1368
|
+
size?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
1371
|
+
*/
|
|
1372
|
+
alt?: string;
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Image big size variant
|
|
1376
|
+
*/
|
|
1377
|
+
export interface PictureSize1 {
|
|
1378
|
+
/**
|
|
1379
|
+
* Image link
|
|
1380
|
+
*/
|
|
1381
|
+
url: string;
|
|
1382
|
+
/**
|
|
1383
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
1384
|
+
*/
|
|
1385
|
+
size?: string;
|
|
1386
|
+
/**
|
|
1387
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
1388
|
+
*/
|
|
1389
|
+
alt?: string;
|
|
1390
|
+
}
|
|
1391
|
+
/**
|
|
1392
|
+
* Image zoom size variant
|
|
1393
|
+
*/
|
|
1394
|
+
export interface PictureSize2 {
|
|
1395
|
+
/**
|
|
1396
|
+
* Image link
|
|
1397
|
+
*/
|
|
1398
|
+
url: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
1401
|
+
*/
|
|
1402
|
+
size?: string;
|
|
1403
|
+
/**
|
|
1404
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
1405
|
+
*/
|
|
1406
|
+
alt?: string;
|
|
1407
|
+
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Image small size variant
|
|
1410
|
+
*/
|
|
1411
|
+
export interface PictureSize3 {
|
|
1412
|
+
/**
|
|
1413
|
+
* Image link
|
|
1414
|
+
*/
|
|
1415
|
+
url: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* Image size (width x height) in px, such as 100x50 (100px width, 50px height)
|
|
1418
|
+
*/
|
|
1419
|
+
size?: string;
|
|
1420
|
+
/**
|
|
1421
|
+
* Alternative text, HTML alt tag (important for SEO)
|
|
1422
|
+
*/
|
|
1423
|
+
alt?: string;
|
|
1424
|
+
}
|
package/packages/cli/lib/cli.js
CHANGED
|
@@ -45,7 +45,7 @@ export default async () => {
|
|
|
45
45
|
return opts;
|
|
46
46
|
}, '');
|
|
47
47
|
const $firebase = (cmd) => {
|
|
48
|
-
if (cmd === 'deploy') {
|
|
48
|
+
if (cmd === 'deploy' && !options) {
|
|
49
49
|
return $`firebase --project=${projectId} ${cmd}${options} --force`;
|
|
50
50
|
}
|
|
51
51
|
return $`firebase --project=${projectId} ${cmd}${options}`;
|
package/packages/cli/src/cli.ts
CHANGED
|
@@ -59,7 +59,7 @@ export default async () => {
|
|
|
59
59
|
return opts;
|
|
60
60
|
}, '');
|
|
61
61
|
const $firebase = (cmd: string) => {
|
|
62
|
-
if (cmd === 'deploy') {
|
|
62
|
+
if (cmd === 'deploy' && !options) {
|
|
63
63
|
return $`firebase --project=${projectId} ${cmd}${options} --force`;
|
|
64
64
|
}
|
|
65
65
|
return $`firebase --project=${projectId} ${cmd}${options}`;
|
|
@@ -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,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AW,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
|
},
|
|
@@ -34,6 +34,7 @@ export default (req, res) => {
|
|
|
34
34
|
global.ssr_handler(req, res, async (err) => {
|
|
35
35
|
if (err) {
|
|
36
36
|
res.set('X-SSR-Error', err.message);
|
|
37
|
+
res.set('X-SSR-Error-Stack', err.stack);
|
|
37
38
|
fallback(err);
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
@@ -42,8 +43,8 @@ export default (req, res) => {
|
|
|
42
43
|
const data = await readFile(local);
|
|
43
44
|
setStatusAndCache(200, 'public, max-age=60, s-maxage=600')
|
|
44
45
|
.send(data);
|
|
45
|
-
} catch {
|
|
46
|
-
fallback(
|
|
46
|
+
} catch (e) {
|
|
47
|
+
fallback(e, 404);
|
|
47
48
|
}
|
|
48
49
|
});
|
|
49
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-storefront.js","sourceRoot":"","sources":["../../src/firebase/serve-storefront.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAC5C,MAAM,OAAO,GAAG,mBAAmB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACrD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/E,eAAe,CAAC,GAAY,EAAE,GAAa,EAAE,EAAE;IAC7C,GAAG,CAAC,GAAG,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;IAC7C,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAEhE,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,YAAoB,EAAE,EAAE;QACjE,OAAO,GAAG,C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any) => {
|
|
42
42
|
if (err) {
|
|
43
43
|
res.set('X-SSR-Error', err.message);
|
|
44
|
+
res.set('X-SSR-Error-Stack', err.stack);
|
|
44
45
|
fallback(err);
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
@@ -49,8 +50,8 @@ export default (req: Request, res: Response) => {
|
|
|
49
50
|
const data = await readFile(local);
|
|
50
51
|
setStatusAndCache(200, 'public, max-age=60, s-maxage=600')
|
|
51
52
|
.send(data);
|
|
52
|
-
} catch {
|
|
53
|
-
fallback(
|
|
53
|
+
} catch (e) {
|
|
54
|
+
fallback(e, 404);
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as G}from"./runtime-dom.esm-bundler.be3a98cd.js";import{p as J}from"./modules-info.8540ba60.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.be244611.js";import{u as le,a as ie,b as ue}from"./index.248ccd97.js";/* empty css */import"./session-utm.72684b84.js";import"./idle-callback.889bf0ea.js";import"./format-money.e57ae2ab.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.8540ba60.js";import{g,c as S}from"./format-money.e57ae2ab.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.be244611.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.69751e12.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import d from"./Prices.
|
|
1
|
+
import d from"./Prices.036ad2b4.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.be244611.js";import"./modules-info.8540ba60.js";import"./session-utm.72684b84.js";import"./idle-callback.889bf0ea.js";import"./format-money.e57ae2ab.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};
|