cloudcommerce 0.24.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test-e2e.yml +2 -2
- package/CHANGELOG.md +43 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barra-doce/.idx/dev.nix +24 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/contato.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/trocas.json +11 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/layout.json +30 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +7 -7
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +149 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +68 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +2 -0
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/iluminim/.idx/dev.nix +24 -0
- package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +11 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +30 -0
- package/ecomplus-stores/iluminim/functions/ssr/package.json +7 -7
- package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +149 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +2 -2
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +68 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +2 -0
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +2 -2
- package/ecomplus-stores/monocard/.idx/dev.nix +24 -0
- package/ecomplus-stores/monocard/functions/ssr/package.json +1 -1
- package/ecomplus-stores/tia-sonia/.idx/dev.nix +24 -0
- package/package.json +6 -6
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +5 -3
- package/packages/apps/correios/tests/calculate-shipping.test.mjs +45 -0
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +4 -2
- package/packages/apps/custom-shipping/tests/calculate-shipping.test.mjs +37 -0
- 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 +2 -2
- 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 +4 -2
- package/packages/apps/loyalty-points/tests/1-list-payments.test.mjs +37 -0
- package/packages/apps/loyalty-points/tests/2-create-transaction.test.mjs +41 -0
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +5 -3
- package/packages/apps/mercadopago/tests/1-list-payments.test.mjs +37 -0
- package/packages/apps/mercadopago/tests/2-create-transaction.test.mjs +42 -0
- package/packages/apps/pagarme/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/lib/cli.js +5 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +5 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/eslint/package.json +5 -5
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/lib/en_us/i19allProducts.txt +1 -0
- package/packages/i18n/lib/en_us/i19institutional.txt +1 -0
- package/packages/i18n/lib/en_us.d.ts +2 -0
- package/packages/i18n/lib/en_us.js +2 -0
- package/packages/i18n/lib/en_us.js.map +1 -1
- package/packages/i18n/lib/pt_br/i19allProducts.txt +1 -0
- package/packages/i18n/lib/pt_br/i19institutional.txt +1 -0
- package/packages/i18n/lib/pt_br.d.ts +2 -0
- package/packages/i18n/lib/pt_br.js +2 -0
- package/packages/i18n/lib/pt_br.js.map +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/i18n/src/en_us.ts +2 -0
- package/packages/i18n/src/pt_br.ts +2 -0
- package/packages/modules/package.json +4 -3
- package/packages/modules/tests/modules.test.mjs +7 -8
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/firebase/serve-storefront.js +44 -33
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/package.json +6 -6
- package/packages/ssr/src/firebase/serve-storefront.ts +45 -34
- package/packages/storefront/config/storefront.cms.js +3 -1
- package/packages/storefront/config/storefront.config.mjs +8 -2
- package/packages/storefront/dist/client/_astro/{Carousel.63d511ab.js → Carousel.926668f2.js} +1 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.eadba34f.js +1 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.1f0524aa.js +1 -0
- package/packages/storefront/dist/client/_astro/PitchBar.7407eeaf.js +1 -0
- package/packages/storefront/dist/client/_astro/Prices.562a32ab.js +1 -0
- package/packages/storefront/dist/client/_astro/ProductShelf.763cd2ca.js +1 -0
- package/packages/storefront/dist/client/_astro/SearchModal.cffd4c2d.js +1 -0
- package/packages/storefront/dist/client/_astro/ShopHeader.126900a6.js +4 -0
- package/packages/storefront/dist/client/_astro/_...slug_.36cd433d.css +1 -0
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.ee681fa8.js +1 -0
- package/packages/storefront/dist/client/_astro/api.a2eda23e.js +1 -0
- package/packages/storefront/dist/client/_astro/client.e6d9439a.js +1 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.1df8af9a.js → firebase-app.93857bfb.js} +121 -91
- package/packages/storefront/dist/client/_astro/format-money.923559cc.js +1 -0
- package/packages/storefront/dist/client/_astro/img.ec6ba316.js +1 -0
- package/packages/storefront/dist/client/_astro/index.709ac149.js +1 -0
- package/packages/storefront/dist/client/_astro/modules-info.48980668.js +1 -0
- package/packages/storefront/dist/client/manifest.webmanifest +1 -1
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/CartSidebar.2b555408.mjs +393 -0
- package/packages/storefront/dist/server/chunks/SearchModal.f418e188.mjs +44 -0
- package/packages/storefront/dist/server/chunks/_...d32bcc0c.mjs +35 -0
- package/packages/storefront/dist/server/chunks/{account@_@astro.a02ffb0b.mjs → account@_@astro.0106855f.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{astro.a7611b51.mjs → astro.bb5b7191.mjs} +141 -91
- package/packages/storefront/dist/server/chunks/{_...5323ec5a.mjs → endpoint@_@js.35807882.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.d898498a.mjs → index@_@astro.477f5af1.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/{index@_@astro.42c693b9.mjs → index@_@astro.e5a61d6e.mjs} +12 -4
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.0f33557e.mjs → _...slug_.astro.fd8a229f.mjs} +673 -937
- package/packages/storefront/dist/server/chunks/pages/{account.astro.9325adb2.mjs → account.astro.3b21bff8.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/endpoint.js.247079ba.mjs +119 -0
- package/packages/storefront/dist/server/chunks/pages/{index.astro.0f31fa39.mjs → index.astro.dab642f5.mjs} +605 -58
- package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.bd93f01e.mjs → ~fallback.astro.7630c0d6.mjs} +25 -7
- package/packages/storefront/dist/server/chunks/{~fallback@_@astro.d17419ae.mjs → ~fallback@_@astro.65227dd7.mjs} +12 -4
- package/packages/storefront/dist/server/entry.mjs +28 -11
- package/packages/storefront/dist/server/manifest.webmanifest +1 -1
- package/packages/storefront/dist/server/renderers.mjs +80 -25
- package/packages/storefront/package.json +9 -8
- package/packages/storefront/src/helpers/server-data.ts +14 -17
- package/packages/storefront/src/images/use-ssr-picture.ts +18 -3
- package/packages/storefront/src/lib/components/BannerPictures.astro +4 -4
- package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +2 -2
- package/packages/storefront/src/lib/components/SharedData.astro +1 -1
- package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -3
- package/packages/storefront/src/lib/content.d.ts +36 -2
- package/packages/storefront/src/lib/layouts/Base.astro +3 -2
- package/packages/storefront/src/lib/layouts/use-page-main.ts +2 -2
- package/packages/storefront/src/lib/ssr-context.ts +1 -1
- package/packages/test-base/CHANGELOG.md +1 -0
- package/packages/test-base/README.md +7 -0
- package/packages/test-base/lib/endpoints.js +23 -0
- package/packages/test-base/lib/endpoints.js.map +1 -0
- package/packages/test-base/lib/index.js +4 -0
- package/packages/test-base/lib/index.js.map +1 -0
- package/packages/test-base/lib/playloads.js +14 -0
- package/packages/test-base/lib/playloads.js.map +1 -0
- package/packages/test-base/package.json +28 -0
- package/packages/test-base/payloads/calculate-shipping.json +37 -0
- package/packages/test-base/payloads/create-transaction.json +116 -0
- package/packages/test-base/payloads/list-payments.json +125 -0
- package/packages/test-base/src/endpoints.ts +37 -0
- package/packages/test-base/src/index.ts +3 -0
- package/packages/test-base/src/playloads.ts +24 -0
- package/packages/test-base/tsconfig.json +3 -0
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/.gitkeep +0 -0
- package/packages/storefront/dist/client/_astro/HeroSlider.8d2ea532.js +0 -1
- package/packages/storefront/dist/client/_astro/PitchBar.c2a2ad79.js +0 -1
- package/packages/storefront/dist/client/_astro/Prices.8572765c.js +0 -1
- package/packages/storefront/dist/client/_astro/ProductShelf.4a105932.js +0 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.2400b065.js +0 -4
- package/packages/storefront/dist/client/_astro/_...slug_.a786e016.css +0 -1
- package/packages/storefront/dist/client/_astro/_plugin-vue_export-helper.48e557ba.js +0 -1
- package/packages/storefront/dist/client/_astro/client.9dbf6b61.js +0 -1
- package/packages/storefront/dist/client/_astro/ecom-icon_CDmhA.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Z27EX9f.png +0 -0
- package/packages/storefront/dist/client/_astro/ecom-icon_Zo1CLq.png +0 -0
- package/packages/storefront/dist/client/_astro/headphone_22qtrt.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_247ud8.avif +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1hoMcQ.webp +0 -0
- package/packages/storefront/dist/client/_astro/headphone_Z1j5MXv.webp +0 -0
- package/packages/storefront/dist/client/_astro/img.7def76a1.js +0 -1
- package/packages/storefront/dist/client/_astro/index.c0c35ead.js +0 -1
- package/packages/storefront/dist/client/_astro/logo_144owC.webp +0 -0
- package/packages/storefront/dist/client/_astro/logo_1ug3XF.png +0 -0
- package/packages/storefront/dist/client/_astro/logo_Z1EIN1I.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_29BEzB.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_2sykkb.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_HYj6i.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_Z18ANwS.avif +0 -0
- package/packages/storefront/dist/client/_astro/passion_ZK2FPz.webp +0 -0
- package/packages/storefront/dist/client/_astro/passion_pVNbE.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1EUYOa.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1Sqf3x.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_1VeSii.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_2wFECM.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_7mg8W.png +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Kv492.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1DNkkN.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Z1IS4wy.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect8589_Zt4vbx.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1Bqr36.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_1pj5UP.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_2dVuzq.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_HaXay.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z100iy0.png +0 -0
- package/packages/storefront/dist/client/_astro/rect859_Z2i1RBz.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_ZMRWqJ.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect859_mPQHw.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect859_xyq7d.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_1DkX0O.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_2uIqYp.avif +0 -0
- package/packages/storefront/dist/client/_astro/rect89_Z1rGPGT.webp +0 -0
- package/packages/storefront/dist/client/_astro/rect89_ZAjmIj.avif +0 -0
- package/packages/storefront/dist/client/~fallback.html +0 -98
- package/packages/storefront/dist/client/~index.html +0 -134
- package/packages/storefront/dist/server/images.dist.csv +0 -38
- package/packages/storefront/dist/server/images.src.csv +0 -11
- package/packages/storefront/dist/server/stylesheets.csv +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N as f,a0 as o}from"./_plugin-vue_export-helper.ee681fa8.js";const s=(r,t=o.get("currency"),e=o.get("lang"))=>{if(typeof r=="object"?r!==null&&(r=f(r)):typeof r=="string"&&(r=parseFloat(r)),t)try{return r.toLocaleString(e.replace("_","-"),{style:"currency",currency:t})}catch(c){console.error(c)}const n=(t||o.get("currency_symbol"))+" ";return typeof r=="number"?n+r:""},y=s;export{y as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a1 as g,a0 as i}from"./_plugin-vue_export-helper.ee681fa8.js";const m=(e,a=i.get("lang"))=>{if(typeof e=="object"&&e!==null){const f=Object.keys(e)[0];if(/^[a-z]{2}(_[a-z]{2})?$/.test(f))return e[a]||e[g]||e[f];{const l=Array.isArray(e)?[]:{};for(const r in e)e[r]!==void 0&&(l[r]=m(e[r],a));return l}}return e},A=m,u=(e,a,f)=>{if(f||(f=i.get("default_img_size")||"normal"),e){let{pictures:l,picture:r}=e;r||l||(Array.isArray(e)?l=e:r=e),Array.isArray(l)&&(r=a&&l.filter(s=>s._id===a)[0]||l[0]);let n;if(typeof r=="object"&&r!==null){if(n=r[f],n&&n.url)return n;let s;switch(f){case"small":s=["normal","big"];break;case"normal":s=["big","zoom","small"];break;case"big":s=["zoom","normal"];break;case"zoom":s=["big"];break;default:s=["big","zoom","normal","small"]}for(let t=0;t<s.length;t++){const o=s[t];if(r[o]&&r[o].url)return r[o]}for(const t in r)if(r[t]&&r[t].url)return r[t]}}},c=u;export{c as g,A as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j,E as Z,c as D,R as ee,i as S,U as te,V as re,W as oe,P as k}from"./_plugin-vue_export-helper.ee681fa8.js";let E;E=navigator.userAgent,document.body?document.body.offsetWidth:window.screen.width;E.includes("Safari")&&E.includes("Chrome");const ne=/iPad|iPhone|iPod/.test(E)&&!window.MSStream,je=ne||/Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(E),se=["whatsapp","instagram","facebook","twitter","youtube","tiktok","pinterest","threads"],ie={},le=()=>{const{settings:e}=globalThis.$storefront;se.forEach(t=>{e[t]&&(ie[t]=e[t])})};le();let ae=-1;const Ie=()=>String(++ae),Ae=(e,t=300)=>{typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e):setTimeout(e,t)};function Y(e){return re()?(oe(e),!0):!1}function w(e){return typeof e=="function"?e():ee(e)}const z=typeof window<"u",_=()=>{};function I(e,t){function r(...o){return new Promise((n,s)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(n).catch(s)})}return r}const ue=e=>e();function G(e,t={}){let r,o,n=_;const s=u=>{clearTimeout(u),n(),n=_};return u=>{const c=w(e),l=w(t.maxWait);return r&&s(r),c<=0||l!==void 0&&l<=0?(o&&(s(o),o=null),Promise.resolve(u())):new Promise((f,p)=>{n=t.rejectOnCancel?p:f,l&&!o&&(o=setTimeout(()=>{r&&s(r),o=null,f(u())},l)),r=setTimeout(()=>{o&&s(o),o=null,f(u())},c)})}}function ce(e,t=!0,r=!0,o=!1){let n=0,s,i=!0,u=_,c;const l=()=>{s&&(clearTimeout(s),s=void 0,u(),u=_)};return p=>{const d=w(e),h=Date.now()-n,g=()=>c=p();return l(),d<=0?(n=Date.now(),g()):(h>d&&(r||!i)?(n=Date.now(),g()):t&&(c=new Promise((y,m)=>{u=o?m:y,s=setTimeout(()=>{n=Date.now(),i=!0,y(g()),l()},Math.max(0,d-h))})),!r&&!s&&(s=setTimeout(()=>i=!0,d)),i=!1,c)}}function Fe(e,t=!1,r="Timeout"){return new Promise((o,n)=>{setTimeout(t?()=>n(r):o,e)})}function fe(e,t=200,r={}){return I(G(t,r),e)}function pe(e,t=200,r=!1,o=!0,n=!1){return I(ce(t,r,o,n),e)}function de(e,t,r={}){const{immediate:o=!0}=r,n=S(!1);let s=null;function i(){s&&(clearTimeout(s),s=null)}function u(){n.value=!1,i()}function c(...l){i(),n.value=!0,s=setTimeout(()=>{n.value=!1,s=null,e(...l)},w(t))}return o&&(n.value=!0,z&&c()),Y(u),{isPending:te(n),start:c,stop:u}}var me=Object.defineProperty,N=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,q=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,he=(e,t)=>{for(var r in t||(t={}))ve.call(t,r)&&q(e,r,t[r]);if(N)for(var r of N(t))we.call(t,r)&&q(e,r,t[r]);return e};function We(e=1e3,t={}){const{controls:r=!1,callback:o}=t,n=de(o??_,e,t),s=D(()=>!n.isPending.value);return r?he({ready:s},n):s}var B=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,ye=(e,t)=>{var r={};for(var o in e)be.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&B)for(var o of B(e))t.indexOf(o)<0&&_e.call(e,o)&&(r[o]=e[o]);return r};function Oe(e,t,r={}){const o=r,{eventFilter:n=ue}=o,s=ye(o,["eventFilter"]);return j(e,I(n,t),s)}var ge=Object.defineProperty,Pe=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Se=(e,t)=>{for(var r in t||(t={}))J.call(t,r)&&X(e,r,t[r]);if($)for(var r of $(t))K.call(t,r)&&X(e,r,t[r]);return e},Ee=(e,t)=>Pe(e,Te(t)),$e=(e,t)=>{var r={};for(var o in e)J.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&$)for(var o of $(e))t.indexOf(o)<0&&K.call(e,o)&&(r[o]=e[o]);return r};function Le(e,t,r={}){const o=r,{debounce:n=0,maxWait:s=void 0}=o,i=$e(o,["debounce","maxWait"]);return Oe(e,t,Ee(Se({},i),{eventFilter:G(n,{maxWait:s})}))}function Me(e,t,r){const o=j(e,(...n)=>(Z(()=>o()),t(...n)),r)}function xe(e){const t=w(e);return t?.$el??t}const A=z?window:void 0;function x(...e){let t,r,o,n;if(typeof e[0]=="string"||Array.isArray(e[0])?([r,o,n]=e,t=A):[t,r,o,n]=e,!t)return _;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(f=>f()),s.length=0},u=(f,p,d,h)=>(f.addEventListener(p,d,h),()=>f.removeEventListener(p,d,h)),c=j(()=>[xe(t),w(n)],([f,p])=>{i(),f&&s.push(...r.flatMap(d=>o.map(h=>u(f,d,h,p))))},{immediate:!0,flush:"post"}),l=()=>{c(),i()};return Y(l),l}function Ce(e,t={}){const{delayEnter:r=0,delayLeave:o=0,window:n=A}=t,s=S(!1);let i;const u=c=>{const l=c?r:o;i&&(clearTimeout(i),i=void 0),l?i=setTimeout(()=>s.value=c,l):s.value=c};return n&&(x(e,"mouseenter",()=>u(!0),{passive:!0}),x(e,"mouseleave",()=>u(!1),{passive:!0})),s}const U=1;function Re(e,t={}){const{throttle:r=0,idle:o=200,onStop:n=_,onScroll:s=_,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:u={capture:!1,passive:!0},behavior:c="auto",window:l=A}=t,f=S(0),p=S(0),d=D({get(){return f.value},set(a){g(a,void 0)}}),h=D({get(){return p.value},set(a){g(void 0,a)}});function g(a,v){if(!l)return;const P=w(e);P&&(P instanceof Document?l.document.body:P)?.scrollTo({top:w(v)??h.value,left:w(a)??d.value,behavior:w(c)})}const y=S(!1),m=k({left:!0,right:!1,top:!0,bottom:!1}),b=k({left:!1,right:!1,top:!1,bottom:!1}),F=a=>{y.value&&(y.value=!1,b.left=!1,b.right=!1,b.top=!1,b.bottom=!1,n(a))},Q=fe(F,r+o),W=a=>{if(!l)return;const v=a.document?a.document.documentElement:a.documentElement??a,{display:P,flexDirection:M}=getComputedStyle(v),T=v.scrollLeft;b.left=T<f.value,b.right=T>f.value;const C=Math.abs(T)<=0+(i.left||0),R=Math.abs(T)+v.clientWidth>=v.scrollWidth-(i.right||0)-U;P==="flex"&&M==="row-reverse"?(m.left=R,m.right=C):(m.left=C,m.right=R),f.value=T;let O=v.scrollTop;a===l.document&&!O&&(O=l.document.body.scrollTop),b.top=O<p.value,b.bottom=O>p.value;const H=Math.abs(O)<=0+(i.top||0),V=Math.abs(O)+v.clientHeight>=v.scrollHeight-(i.bottom||0)-U;P==="flex"&&M==="column-reverse"?(m.top=V,m.bottom=H):(m.top=H,m.bottom=V),p.value=O},L=a=>{if(!l)return;const v=a.target.documentElement??a.target;W(v),y.value=!0,Q(a),s(a)};return x(e,"scroll",r?pe(L,r,!0,!1):L,u),x(e,"scrollend",F,u),{x:d,y:h,isScrolling:y,arrivedState:m,directions:b,measure(){const a=w(e);l&&a&&W(a)}}}export{Re as a,fe as b,Me as c,Ce as d,Ie as e,je as i,Fe as p,Ae as r,ie as s,We as u,Le as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as h,u as y}from"./session-utm.744b0db3.js";import{r as b}from"./index.709ac149.js";import{P as d,c as f}from"./_plugin-vue_export-helper.ee681fa8.js";import{f as v}from"./format-money.923559cc.js";const O=(o,a,p=1e4)=>{let n,r;p&&(n=new AbortController,r=setTimeout(()=>{n.abort()},p)),a?.body&&typeof a.body=="object"&&(a.body=JSON.stringify(a.body),a.headers={...a.headers,"Content-Type":"application/json","Content-Length":a.body.length.toString()});const l=fetch(o,{...a,signal:n?.signal});return l.finally(()=>{r&&clearTimeout(r)}),l},I={list_payments:{},calculate_shipping:{},apply_discount:{}},i=d(I);h.then(o=>{Object.assign(i,o)});{const o="MODULES_INFO",a=sessionStorage.getItem(o);if(a)try{const n=JSON.parse(a);n.__timestamp>=Date.now()-1e3*60*5?(delete n.__timestamp,Object.assign(i,n)):sessionStorage.removeItem(o)}catch{sessionStorage.removeItem(o)}b(()=>{const n=[];["list_payments","calculate_shipping"].forEach(r=>{Object.keys(i[r]).length||n.push({modName:r})}),Object.keys(y).length&&n.push({modName:"apply_discount",reqOptions:{method:"post",body:{utm:y}}}),n.forEach(({modName:r,reqOptions:l})=>{O(`/api/modules/${r}`,l).then(async m=>{if(m.ok){const s={};i[r]=s;const{result:_}=await m.json();Array.isArray(_)&&_.forEach(({error:g,response:c})=>{if(!g){let e,t;switch(r){case"calculate_shipping":e="free_shipping_from_value",t=c[e],typeof t=="number"&&(s[e]===void 0||t<s[e])&&(s[e]=t);break;case"list_payments":e="installments_option",t=c[e],t&&(!s[e]||t.monthly_interest<s[e].monthly_interest||t.max_number>s[e].max_number)&&(s[e]=t),e="discount_option",t=c[e],t&&(!s[e]||t.value>s[e].value)&&c.payment_gateways.forEach(({discount:u})=>{u&&u.apply_at!=="freight"&&u.value===t.value&&(s[e]={apply_at:u.apply_at,...t})}),e="loyalty_points_programs",t=c[e],t&&(s[e]={...s[e],...t});break;default:e="available_extra_discount",t=c[e],t&&(!s[e]||t.value>s[e].value)&&(s[e]=t)}}}),sessionStorage.setItem(o,JSON.stringify({...i,__timestamp:Date.now()}))}}).catch(console.error)})})}const E=f(()=>i.calculate_shipping.free_shipping_from_value),P=f(()=>i.list_payments.installments_option),C=f(()=>i.list_payments.discount_option),D=f(()=>i.list_payments.loyalty_points_programs),J=f(()=>i.apply_discount.available_extra_discount),S=(o,a,p,n=v)=>f(()=>{const r=`{${p}}`,l=o.indexOf(r);if(l>-1){const m=i[a][p];if(m){const s=n(m);return o.substring(0,l)+s+o.substring(l+r.length)}return""}return o}),T=o=>S(o,"calculate_shipping","free_shipping_from_value");export{J as a,C as d,E as f,P as i,D as l,T as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"E-Com Plus demoStore","short_name":"E-Com Plus demoStore","start_url":"/","display":"standalone","background_color":"#f5f6fa","lang":"en","scope":"/","description":"
|
|
1
|
+
{"name":"E-Com Plus demoStore","short_name":"E-Com Plus demoStore","start_url":"/","display":"standalone","background_color":"#f5f6fa","lang":"en","scope":"/","description":"E-Com Plus é a plataforma de e-commerce API-first desenhada para modelos de negócio e experiências de compra únicas. Flexibilidade do código aberto com facilidade de SaaS para que você comece rápido, venda do seu jeito e escale sem limitações.","theme_color":"#37003c","crossorigin":"use-credentials","icons":[{"src":"/_image?f=png&w=192&h=192&href=%2Fimg%2Fuploads%2Fecom-icon.png&V=_","sizes":"192x192","type":"image/png"},{"src":"/_image?f=png&w=512&h=512&href=%2Fimg%2Fuploads%2Fecom-icon.png&V=_","sizes":"512x512","type":"image/png"},{"src":"/img/uploads/ecom-icon.png","sizes":"512x512","type":"image/png","purpose":"any maskable"}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let a={};const l=e=>r(e,o),t={module:{uri:o},exports:a,require:l};s[o]=Promise.all(n.map((e=>t[e]||l(e)))).then((e=>(i(...e),a)))}}define(["./workbox-5e0bf4e4"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.
|
|
1
|
+
if(!self.define){let e,s={};const r=(r,n)=>(r=new URL(r+".js",n).href,s[r]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=s,document.head.appendChild(e)}else e=r,importScripts(r),s()})).then((()=>{let e=s[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(n,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(s[o])return;let a={};const l=e=>r(e,o),t={module:{uri:o},exports:a,require:l};s[o]=Promise.all(n.map((e=>t[e]||l(e)))).then((e=>(i(...e),a)))}}define(["./workbox-5e0bf4e4"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"_astro/_...slug_.36cd433d.css",revision:null},{url:"_astro/_plugin-vue_export-helper.ee681fa8.js",revision:null},{url:"_astro/api.a2eda23e.js",revision:null},{url:"_astro/Carousel.926668f2.js",revision:null},{url:"_astro/CartSidebar.eadba34f.js",revision:null},{url:"_astro/client.e6d9439a.js",revision:null},{url:"_astro/firebase-app.93857bfb.js",revision:null},{url:"_astro/format-money.923559cc.js",revision:null},{url:"_astro/HeroSlider.1f0524aa.js",revision:null},{url:"_astro/hoisted.572313d6.js",revision:null},{url:"_astro/img.ec6ba316.js",revision:null},{url:"_astro/index.709ac149.js",revision:null},{url:"_astro/modules-info.48980668.js",revision:null},{url:"_astro/PitchBar.7407eeaf.js",revision:null},{url:"_astro/preload-helper.cf010ec4.js",revision:null},{url:"_astro/Prices.562a32ab.js",revision:null},{url:"_astro/ProductShelf.763cd2ca.js",revision:null},{url:"_astro/SearchModal.cffd4c2d.js",revision:null},{url:"_astro/session-utm.744b0db3.js",revision:null},{url:"_astro/ShopHeader.126900a6.js",revision:null},{url:"_astro/workbox-window.prod.es5.a7b12eab.js",revision:null},{url:"manifest.webmanifest",revision:"2930406ba567d8de217e352cbe071939"}],{ignoreURLParametersMatching:[/.*/]}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/404"))),e.registerRoute(/^\/$/,new e.NetworkFirst,"GET"),e.registerRoute(/\/((?!(?:admin|assets|img)(\/|$))[^.]+)(\.(?!js|css|xml|txt|png|jpg|jpeg|webp|avif|svg|gif)[^.]+)*$/,new e.NetworkFirst({cacheName:"pages",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/assets\//,new e.StaleWhileRevalidate({cacheName:"assets",plugins:[]}),"GET"),e.registerRoute(/^\/_image$/,new e.StaleWhileRevalidate({cacheName:"optim-images",plugins:[new e.ExpirationPlugin({maxEntries:50,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^\/img\/uploads\/.*\.(?:png|jpg|jpeg|webp|avif|svg|gif)$/,new e.StaleWhileRevalidate({cacheName:"cms-images",plugins:[new e.ExpirationPlugin({maxEntries:20,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/ecomplus\.io/,new e.NetworkFirst({cacheName:"store-api",plugins:[new e.ExpirationPlugin({maxEntries:50,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/normal\//,new e.CacheFirst({cacheName:"product-thumbnails",plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:2592e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/^https:\/\/(((\w+\.)?ecoms\d)|(ecom[\w-]+(\.\w+)*\.digitaloceanspaces))\.com.*\/imgs\/big\//,new e.CacheFirst({cacheName:"product-pictures",plugins:[new e.ExpirationPlugin({maxEntries:10,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET")}));
|
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { defineComponent, computed, useSSRContext, mergeProps, inject, ref, provide, withCtx, renderSlot, resolveComponent, openBlock, createBlock, createCommentVNode, createVNode, toDisplayString, createTextVNode } from 'vue';
|
|
2
|
+
import { _ as _export_sfc, k as parseProduct, u as useId, r as removeCartItem, m as freeShippingFromValue, n as shoppingCart, t as totalItems } from './pages/_...slug_.astro.fd8a229f.mjs';
|
|
3
|
+
import { ssrRenderAttrs, ssrRenderSlot, ssrRenderAttr, ssrInterpolate, ssrIncludeBooleanAttr, ssrRenderComponent, ssrRenderList } from 'vue/server-renderer';
|
|
4
|
+
import { P as Prices } from './pages/index.astro.dab642f5.mjs';
|
|
5
|
+
import { name, img } from '@ecomplus/utils';
|
|
6
|
+
import 'kleur/colors';
|
|
7
|
+
import 'node:fs/promises';
|
|
8
|
+
import 'node:path';
|
|
9
|
+
import 'node:url';
|
|
10
|
+
import 'http-cache-semantics';
|
|
11
|
+
import 'node:os';
|
|
12
|
+
import 'image-size';
|
|
13
|
+
import 'magic-string';
|
|
14
|
+
import 'mime';
|
|
15
|
+
import 'node:stream';
|
|
16
|
+
import './astro.bb5b7191.mjs';
|
|
17
|
+
import 'path-to-regexp';
|
|
18
|
+
import 'cookie';
|
|
19
|
+
import '@astrojs/internal-helpers/path';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'node:http';
|
|
22
|
+
import 'node:tls';
|
|
23
|
+
import 'string-width';
|
|
24
|
+
import 'html-escaper';
|
|
25
|
+
import '@cloudcommerce/api';
|
|
26
|
+
import 'node:events';
|
|
27
|
+
import '@cloudcommerce/config';
|
|
28
|
+
import 'ultrahtml';
|
|
29
|
+
/* empty css */import '@vueuse/core';
|
|
30
|
+
import '@headlessui/vue';
|
|
31
|
+
|
|
32
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
33
|
+
__name: "CheckoutLink",
|
|
34
|
+
props: {
|
|
35
|
+
to: { default: "cart" },
|
|
36
|
+
cartUrl: { default: globalThis.$storefront.settings.cart_url || "/app/#/cart" },
|
|
37
|
+
checkoutUrl: { default: globalThis.$storefront.settings.checkout_url || "/app/#/checkout" }
|
|
38
|
+
},
|
|
39
|
+
setup(__props, { expose: __expose }) {
|
|
40
|
+
__expose();
|
|
41
|
+
const props = __props;
|
|
42
|
+
const href = computed(() => {
|
|
43
|
+
if (props.to === "cart")
|
|
44
|
+
return props.cartUrl;
|
|
45
|
+
return props.checkoutUrl;
|
|
46
|
+
});
|
|
47
|
+
const __returned__ = { props, href };
|
|
48
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
49
|
+
return __returned__;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
function _sfc_ssrRender$4(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
53
|
+
_push(`<a${ssrRenderAttrs(mergeProps({ href: $setup.href }, _attrs))}>`);
|
|
54
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
|
55
|
+
_push(`</a>`);
|
|
56
|
+
}
|
|
57
|
+
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
58
|
+
_sfc_main$4.setup = (props, ctx) => {
|
|
59
|
+
const ssrContext = useSSRContext();
|
|
60
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/CheckoutLink.vue");
|
|
61
|
+
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
62
|
+
};
|
|
63
|
+
const CheckoutLink = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["ssrRender", _sfc_ssrRender$4]]);
|
|
64
|
+
|
|
65
|
+
const useCartItem = (props) => {
|
|
66
|
+
const parsedItem = computed(() => {
|
|
67
|
+
return !props.item && props.product ? parseProduct(props.product) : null;
|
|
68
|
+
});
|
|
69
|
+
const cartItem = computed(() => {
|
|
70
|
+
return props.item || parsedItem.value;
|
|
71
|
+
});
|
|
72
|
+
const title = computed(() => {
|
|
73
|
+
return name(cartItem.value);
|
|
74
|
+
});
|
|
75
|
+
const link = computed(() => {
|
|
76
|
+
const { slug } = cartItem.value;
|
|
77
|
+
if (typeof slug === "string") {
|
|
78
|
+
return `/${slug}`;
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
});
|
|
82
|
+
const image = computed(() => {
|
|
83
|
+
if (cartItem.value.picture) {
|
|
84
|
+
return img(cartItem.value.picture, void 0, props.pictureSize || "small");
|
|
85
|
+
}
|
|
86
|
+
return void 0;
|
|
87
|
+
});
|
|
88
|
+
const finalPrice = computed(() => {
|
|
89
|
+
return cartItem.value.final_price || cartItem.value.price;
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
cartItem,
|
|
93
|
+
title,
|
|
94
|
+
link,
|
|
95
|
+
image,
|
|
96
|
+
finalPrice
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
101
|
+
__name: "QuantitySelectorControl",
|
|
102
|
+
props: {
|
|
103
|
+
isMinus: { type: Boolean }
|
|
104
|
+
},
|
|
105
|
+
setup(__props, { expose: __expose }) {
|
|
106
|
+
__expose();
|
|
107
|
+
const {
|
|
108
|
+
value,
|
|
109
|
+
isBoundMin,
|
|
110
|
+
isBoundMax
|
|
111
|
+
} = inject(quantitySelectorKey);
|
|
112
|
+
const __returned__ = { value, isBoundMin, isBoundMax };
|
|
113
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
114
|
+
return __returned__;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
function _sfc_ssrRender$3(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
118
|
+
_push(`<button${ssrRenderAttrs(mergeProps({
|
|
119
|
+
type: "button",
|
|
120
|
+
class: "w-10 h-12 text-xl leading-12 enabled:text-primary enabled:hover:bg-primary-100/70 disabled:opacity-40",
|
|
121
|
+
"data-quantity-selector-control": $props.isMinus ? "minus" : "plus",
|
|
122
|
+
"aria-label": $props.isMinus ? "Menos" : "Mais",
|
|
123
|
+
disabled: $props.isMinus ? $setup.isBoundMin : $setup.isBoundMax
|
|
124
|
+
}, _attrs))}>`);
|
|
125
|
+
ssrRenderSlot(_ctx.$slots, "default", {}, () => {
|
|
126
|
+
if ($props.isMinus) {
|
|
127
|
+
_push(`<!--[-->\u2212<!--]-->`);
|
|
128
|
+
} else {
|
|
129
|
+
_push(`<!--[-->+<!--]-->`);
|
|
130
|
+
}
|
|
131
|
+
}, _push, _parent);
|
|
132
|
+
_push(`</button>`);
|
|
133
|
+
}
|
|
134
|
+
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
135
|
+
_sfc_main$3.setup = (props, ctx) => {
|
|
136
|
+
const ssrContext = useSSRContext();
|
|
137
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/QuantitySelectorControl.vue");
|
|
138
|
+
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
139
|
+
};
|
|
140
|
+
const QuantitySelectorControl = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["ssrRender", _sfc_ssrRender$3]]);
|
|
141
|
+
|
|
142
|
+
const quantitySelectorKey = Symbol("quantitySelector");
|
|
143
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
144
|
+
__name: "QuantitySelector",
|
|
145
|
+
props: {
|
|
146
|
+
modelValue: { default: 1 },
|
|
147
|
+
min: { default: 1 },
|
|
148
|
+
max: {},
|
|
149
|
+
step: {},
|
|
150
|
+
disabled: { type: Boolean },
|
|
151
|
+
readonly: { type: Boolean }
|
|
152
|
+
},
|
|
153
|
+
emits: ["update:modelValue"],
|
|
154
|
+
setup(__props, { expose: __expose, emit }) {
|
|
155
|
+
__expose();
|
|
156
|
+
const props = __props;
|
|
157
|
+
const input = ref(null);
|
|
158
|
+
const inputId = `NInput${useId()}`;
|
|
159
|
+
const value = computed({
|
|
160
|
+
get() {
|
|
161
|
+
return props.modelValue;
|
|
162
|
+
},
|
|
163
|
+
set(_value) {
|
|
164
|
+
if (_value < props.min) {
|
|
165
|
+
_value = props.min;
|
|
166
|
+
input.value.value = `${_value}`;
|
|
167
|
+
}
|
|
168
|
+
if (props.max && _value > props.max) {
|
|
169
|
+
_value = props.max;
|
|
170
|
+
input.value.value = `${_value}`;
|
|
171
|
+
}
|
|
172
|
+
emit("update:modelValue", _value);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
const isBoundMin = computed(() => {
|
|
176
|
+
return props.min >= value.value;
|
|
177
|
+
});
|
|
178
|
+
const isBoundMax = computed(() => {
|
|
179
|
+
return props.max <= value.value;
|
|
180
|
+
});
|
|
181
|
+
provide(quantitySelectorKey, {
|
|
182
|
+
value,
|
|
183
|
+
isBoundMin,
|
|
184
|
+
isBoundMax
|
|
185
|
+
});
|
|
186
|
+
const __returned__ = { quantitySelectorKey, props, emit, input, inputId, value, isBoundMin, isBoundMax, QuantitySelectorControl };
|
|
187
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
188
|
+
return __returned__;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
function _sfc_ssrRender$2(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
192
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ "data-quantity-selector": "" }, _attrs))}>`);
|
|
193
|
+
ssrRenderSlot(_ctx.$slots, "label", { inputId: $setup.inputId, value: $setup.value }, () => {
|
|
194
|
+
_push(`<label${ssrRenderAttr("for", $setup.inputId)} class="sr-only">${ssrInterpolate("Quantidade")}</label>`);
|
|
195
|
+
}, _push, _parent);
|
|
196
|
+
_push(`<div class="flex items-center"><input type="number"${ssrRenderAttr("id", $setup.inputId)}${ssrRenderAttr("value", $setup.value)}${ssrRenderAttr("min", $props.min)}${ssrRenderAttr("max", $props.max)}${ssrRenderAttr("step", $props.step)}${ssrIncludeBooleanAttr($props.disabled) ? " disabled" : ""}${ssrIncludeBooleanAttr($props.readonly) ? " readonly" : ""} class="h-12 w-14 px-2 text-lg border-transparent text-center [-moz-appearance:_textfield] [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none">`);
|
|
197
|
+
ssrRenderSlot(_ctx.$slots, "controls", { value: $setup.value, isBoundMin: $setup.isBoundMin, isBoundMax: $setup.isBoundMax }, () => {
|
|
198
|
+
_push(ssrRenderComponent($setup["QuantitySelectorControl"], {
|
|
199
|
+
"is-minus": "",
|
|
200
|
+
class: "order-first"
|
|
201
|
+
}, {
|
|
202
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
203
|
+
if (_push2) {
|
|
204
|
+
ssrRenderSlot(_ctx.$slots, "minus", {}, null, _push2, _parent2, _scopeId);
|
|
205
|
+
} else {
|
|
206
|
+
return [
|
|
207
|
+
renderSlot(_ctx.$slots, "minus")
|
|
208
|
+
];
|
|
209
|
+
}
|
|
210
|
+
}),
|
|
211
|
+
_: 3
|
|
212
|
+
}, _parent));
|
|
213
|
+
_push(ssrRenderComponent($setup["QuantitySelectorControl"], { class: "order-last" }, {
|
|
214
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
215
|
+
if (_push2) {
|
|
216
|
+
ssrRenderSlot(_ctx.$slots, "plus", {}, null, _push2, _parent2, _scopeId);
|
|
217
|
+
} else {
|
|
218
|
+
return [
|
|
219
|
+
renderSlot(_ctx.$slots, "plus")
|
|
220
|
+
];
|
|
221
|
+
}
|
|
222
|
+
}),
|
|
223
|
+
_: 3
|
|
224
|
+
}, _parent));
|
|
225
|
+
}, _push, _parent);
|
|
226
|
+
_push(`</div></div>`);
|
|
227
|
+
}
|
|
228
|
+
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
229
|
+
_sfc_main$2.setup = (props, ctx) => {
|
|
230
|
+
const ssrContext = useSSRContext();
|
|
231
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/lib/components/QuantitySelector.vue");
|
|
232
|
+
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
233
|
+
};
|
|
234
|
+
const QuantitySelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender$2]]);
|
|
235
|
+
|
|
236
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
237
|
+
__name: "CartItem",
|
|
238
|
+
props: {
|
|
239
|
+
item: {},
|
|
240
|
+
product: {},
|
|
241
|
+
pictureSize: {}
|
|
242
|
+
},
|
|
243
|
+
setup(__props, { expose: __expose }) {
|
|
244
|
+
__expose();
|
|
245
|
+
const props = __props;
|
|
246
|
+
const {
|
|
247
|
+
cartItem,
|
|
248
|
+
title,
|
|
249
|
+
link,
|
|
250
|
+
image,
|
|
251
|
+
finalPrice
|
|
252
|
+
} = useCartItem(props);
|
|
253
|
+
const __returned__ = { props, cartItem, title, link, image, finalPrice, get removeCartItem() {
|
|
254
|
+
return removeCartItem;
|
|
255
|
+
}, QuantitySelector, Prices };
|
|
256
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
257
|
+
return __returned__;
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
function _sfc_ssrRender$1(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
261
|
+
const _component_ALink = resolveComponent("ALink");
|
|
262
|
+
const _component_AImg = resolveComponent("AImg");
|
|
263
|
+
_push(`<article${ssrRenderAttrs(mergeProps({ class: "relative bg-white shadow-sm" }, _attrs))}>`);
|
|
264
|
+
_push(ssrRenderComponent(_component_ALink, {
|
|
265
|
+
href: $setup.link,
|
|
266
|
+
class: "flex items-center gap-5 p-4 group"
|
|
267
|
+
}, {
|
|
268
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
269
|
+
if (_push2) {
|
|
270
|
+
if ($setup.image) {
|
|
271
|
+
_push2(ssrRenderComponent(_component_AImg, {
|
|
272
|
+
picture: $setup.image,
|
|
273
|
+
alt: $setup.title,
|
|
274
|
+
class: "w-20 h-20 object-cover"
|
|
275
|
+
}, null, _parent2, _scopeId));
|
|
276
|
+
} else {
|
|
277
|
+
_push2(`<!---->`);
|
|
278
|
+
}
|
|
279
|
+
_push2(`<p class="py-2 flex-auto text-sm text-base-700 group-hover:text-base-900 group-hover:underline"${_scopeId}>${ssrInterpolate($setup.title)}</p>`);
|
|
280
|
+
} else {
|
|
281
|
+
return [
|
|
282
|
+
$setup.image ? (openBlock(), createBlock(_component_AImg, {
|
|
283
|
+
key: 0,
|
|
284
|
+
picture: $setup.image,
|
|
285
|
+
alt: $setup.title,
|
|
286
|
+
class: "w-20 h-20 object-cover"
|
|
287
|
+
}, null, 8, ["picture", "alt"])) : createCommentVNode("", true),
|
|
288
|
+
createVNode("p", { class: "py-2 flex-auto text-sm text-base-700 group-hover:text-base-900 group-hover:underline" }, toDisplayString($setup.title), 1)
|
|
289
|
+
];
|
|
290
|
+
}
|
|
291
|
+
}),
|
|
292
|
+
_: 1
|
|
293
|
+
}, _parent));
|
|
294
|
+
if ($setup.cartItem._id) {
|
|
295
|
+
_push(`<button class="absolute top-0 right-0 p-2 opacity-70 hover:opacity-100"${ssrRenderAttr("aria-label", "Remover")}><span class="w-5 h-5 text-sm leading-none flex flex-col justify-center rounded-full border-3 text-danger-800 border-danger-700/30"><i class="i-close my-0 mx-auto"></i></span></button>`);
|
|
296
|
+
} else {
|
|
297
|
+
_push(`<!---->`);
|
|
298
|
+
}
|
|
299
|
+
_push(`<div class="flex justify-between items-center border-t-2 border-base-100"><div class="border-r-2 border-base-100">`);
|
|
300
|
+
_push(ssrRenderComponent($setup["QuantitySelector"], {
|
|
301
|
+
modelValue: $setup.cartItem.quantity,
|
|
302
|
+
"onUpdate:modelValue": ($event) => $setup.cartItem.quantity = $event,
|
|
303
|
+
min: $setup.cartItem.min_quantity,
|
|
304
|
+
max: $setup.cartItem.max_quantity
|
|
305
|
+
}, null, _parent));
|
|
306
|
+
_push(`</div>`);
|
|
307
|
+
_push(ssrRenderComponent($setup["Prices"], {
|
|
308
|
+
"base-price": $setup.cartItem.base_price,
|
|
309
|
+
price: $setup.finalPrice,
|
|
310
|
+
class: "px-4 py-2.5 text-[95%]"
|
|
311
|
+
}, null, _parent));
|
|
312
|
+
_push(`</div></article>`);
|
|
313
|
+
}
|
|
314
|
+
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
315
|
+
_sfc_main$1.setup = (props, ctx) => {
|
|
316
|
+
const ssrContext = useSSRContext();
|
|
317
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/CartItem.vue");
|
|
318
|
+
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
319
|
+
};
|
|
320
|
+
const CartItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["ssrRender", _sfc_ssrRender$1]]);
|
|
321
|
+
|
|
322
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
323
|
+
__name: "CartSidebar",
|
|
324
|
+
emits: ["close"],
|
|
325
|
+
setup(__props, { expose: __expose, emit }) {
|
|
326
|
+
__expose();
|
|
327
|
+
const __returned__ = { emit, get freeShippingFromValue() {
|
|
328
|
+
return freeShippingFromValue;
|
|
329
|
+
}, get shoppingCart() {
|
|
330
|
+
return shoppingCart;
|
|
331
|
+
}, get totalItems() {
|
|
332
|
+
return totalItems;
|
|
333
|
+
}, CheckoutLink, Prices, CartItem };
|
|
334
|
+
Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
|
|
335
|
+
return __returned__;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
|
|
339
|
+
_push(`<aside${ssrRenderAttrs(mergeProps({ class: "flex flex-col h-screen bg-white" }, _attrs))}><header class="px-6 py-4 flex justify-end items-center gap-3 shadow ring-1 ring-black/5 z-10"><span class="text-right text-base text-base-600 font-medium">${ssrInterpolate("Meu carrinho de compras")}</span><span class="min-w-[3rem] text-right"><span class="ui-badge-pill-lg">${ssrInterpolate($setup.totalItems)}</span></span></header><article class="grow overflow-y-auto bg-base-50">`);
|
|
340
|
+
if ($setup.freeShippingFromValue) {
|
|
341
|
+
_push(`<div class="text-sm text-center">`);
|
|
342
|
+
if ($setup.freeShippingFromValue > $setup.shoppingCart.subtotal) {
|
|
343
|
+
_push(`<div class="p-3 secondary-subtle">${ssrInterpolate("Adicione $1 para ganhar".replace(
|
|
344
|
+
"$1",
|
|
345
|
+
_ctx.$money($setup.freeShippingFromValue - $setup.shoppingCart.subtotal)
|
|
346
|
+
))} <strong class="lowercase">${ssrInterpolate("Frete gr\xE1tis")}</strong></div>`);
|
|
347
|
+
} else {
|
|
348
|
+
_push(`<div class="p-3 bg-success-50 text-success-800"><i class="text-success-900 i-check mr-1"></i> ${ssrInterpolate("Frete gr\xE1tis a partir de")} ${ssrInterpolate(_ctx.$money($setup.freeShippingFromValue))}</div>`);
|
|
349
|
+
}
|
|
350
|
+
_push(`</div>`);
|
|
351
|
+
} else {
|
|
352
|
+
_push(`<!---->`);
|
|
353
|
+
}
|
|
354
|
+
_push(`<ul class="px-4 pt-4 pb-2"><!--[-->`);
|
|
355
|
+
ssrRenderList($setup.shoppingCart.items, (item, i) => {
|
|
356
|
+
_push(`<li>`);
|
|
357
|
+
_push(ssrRenderComponent($setup["CartItem"], {
|
|
358
|
+
item,
|
|
359
|
+
class: "mb-3"
|
|
360
|
+
}, null, _parent));
|
|
361
|
+
_push(`</li>`);
|
|
362
|
+
});
|
|
363
|
+
_push(`<!--]--></ul></article><footer class="px-5 pt-4 pb-3 ring-2 ring-black/5 z-10"><div class="grid grid-cols-2 gap-3 items-center text-right"><div>${ssrInterpolate("Subtotal")}</div>`);
|
|
364
|
+
_push(ssrRenderComponent($setup["Prices"], {
|
|
365
|
+
price: $setup.shoppingCart.subtotal,
|
|
366
|
+
"is-literal": true,
|
|
367
|
+
class: "text-lg"
|
|
368
|
+
}, null, _parent));
|
|
369
|
+
_push(`</div>`);
|
|
370
|
+
_push(ssrRenderComponent($setup["CheckoutLink"], { class: "ui-btn-lg ui-btn-primary w-full text-right my-2.5" }, {
|
|
371
|
+
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
372
|
+
if (_push2) {
|
|
373
|
+
_push2(`<i class="i-check mr-2"${_scopeId}></i> ${ssrInterpolate("Finalizar compra")}`);
|
|
374
|
+
} else {
|
|
375
|
+
return [
|
|
376
|
+
createVNode("i", { class: "i-check mr-2" }),
|
|
377
|
+
createTextVNode(" " + toDisplayString("Finalizar compra"))
|
|
378
|
+
];
|
|
379
|
+
}
|
|
380
|
+
}),
|
|
381
|
+
_: 1
|
|
382
|
+
}, _parent));
|
|
383
|
+
_push(`<a href="#" class="ui-link text-base-500 hover:text-base-700 text-sm"><i class="i-arrow-left mr-1"></i> ${ssrInterpolate("Continuar comprando")}</a></footer></aside>`);
|
|
384
|
+
}
|
|
385
|
+
const _sfc_setup = _sfc_main.setup;
|
|
386
|
+
_sfc_main.setup = (props, ctx) => {
|
|
387
|
+
const ssrContext = useSSRContext();
|
|
388
|
+
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("src/components/CartSidebar.vue");
|
|
389
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
390
|
+
};
|
|
391
|
+
const CartSidebar = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
|
392
|
+
|
|
393
|
+
export { CartSidebar as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { mergeProps, useSSRContext } from 'vue';
|
|
2
|
+
import { ssrRenderAttrs } from 'vue/server-renderer';
|
|
3
|
+
import { _ as _export_sfc } from './pages/_...slug_.astro.fd8a229f.mjs';
|
|
4
|
+
import 'kleur/colors';
|
|
5
|
+
import 'node:fs/promises';
|
|
6
|
+
import 'node:path';
|
|
7
|
+
import 'node:url';
|
|
8
|
+
import 'http-cache-semantics';
|
|
9
|
+
import 'node:os';
|
|
10
|
+
import 'image-size';
|
|
11
|
+
import 'magic-string';
|
|
12
|
+
import 'mime';
|
|
13
|
+
import 'node:stream';
|
|
14
|
+
import './astro.bb5b7191.mjs';
|
|
15
|
+
import 'path-to-regexp';
|
|
16
|
+
import 'cookie';
|
|
17
|
+
import '@astrojs/internal-helpers/path';
|
|
18
|
+
import 'node:fs';
|
|
19
|
+
import 'node:http';
|
|
20
|
+
import 'node:tls';
|
|
21
|
+
import 'string-width';
|
|
22
|
+
import 'html-escaper';
|
|
23
|
+
import '@cloudcommerce/api';
|
|
24
|
+
import 'node:events';
|
|
25
|
+
import '@cloudcommerce/config';
|
|
26
|
+
import '@ecomplus/utils';
|
|
27
|
+
import 'ultrahtml';
|
|
28
|
+
/* empty css */import '@vueuse/core';
|
|
29
|
+
import '@headlessui/vue';
|
|
30
|
+
|
|
31
|
+
const _sfc_main = {};
|
|
32
|
+
|
|
33
|
+
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
|
|
34
|
+
_push(`<div${ssrRenderAttrs(mergeProps({ class: "w-full h-40 bg-base-300" }, _attrs))}></div>`);
|
|
35
|
+
}
|
|
36
|
+
const _sfc_setup = _sfc_main.setup;
|
|
37
|
+
_sfc_main.setup = (props, ctx) => {
|
|
38
|
+
const ssrContext = useSSRContext()
|
|
39
|
+
;(ssrContext.modules || (ssrContext.modules = new Set())).add("src/components/SearchModal.vue");
|
|
40
|
+
return _sfc_setup ? _sfc_setup(props, ctx) : undefined
|
|
41
|
+
};
|
|
42
|
+
const SearchModal = /*#__PURE__*/_export_sfc(_sfc_main, [['ssrRender',_sfc_ssrRender]]);
|
|
43
|
+
|
|
44
|
+
export { SearchModal as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export { renderers } from '../renderers.mjs';
|
|
2
|
+
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
+
import './astro.bb5b7191.mjs';
|
|
4
|
+
import 'path-to-regexp';
|
|
5
|
+
import 'cookie';
|
|
6
|
+
import '@astrojs/internal-helpers/path';
|
|
7
|
+
import 'kleur/colors';
|
|
8
|
+
import 'node:fs';
|
|
9
|
+
import 'node:http';
|
|
10
|
+
import 'node:tls';
|
|
11
|
+
import 'mime';
|
|
12
|
+
import 'string-width';
|
|
13
|
+
import 'html-escaper';
|
|
14
|
+
import 'vue';
|
|
15
|
+
import 'vue/server-renderer';
|
|
16
|
+
import '@ecomplus/utils';
|
|
17
|
+
import './pages/_...slug_.astro.fd8a229f.mjs';
|
|
18
|
+
import 'node:fs/promises';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:url';
|
|
21
|
+
import 'http-cache-semantics';
|
|
22
|
+
import 'node:os';
|
|
23
|
+
import 'image-size';
|
|
24
|
+
import 'magic-string';
|
|
25
|
+
import 'node:stream';
|
|
26
|
+
import '@cloudcommerce/api';
|
|
27
|
+
import 'node:events';
|
|
28
|
+
import '@cloudcommerce/config';
|
|
29
|
+
import 'ultrahtml';
|
|
30
|
+
/* empty css */import '@vueuse/core';
|
|
31
|
+
import '@headlessui/vue';
|
|
32
|
+
|
|
33
|
+
const page = () => import('./pages/_...slug_.astro.fd8a229f.mjs').then(n => n.o);
|
|
34
|
+
|
|
35
|
+
export { page };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { renderers } from '../renderers.mjs';
|
|
2
2
|
export { onRequest } from '../_empty-middleware.mjs';
|
|
3
|
-
import './astro.
|
|
3
|
+
import './astro.bb5b7191.mjs';
|
|
4
4
|
import 'path-to-regexp';
|
|
5
5
|
import 'cookie';
|
|
6
6
|
import '@astrojs/internal-helpers/path';
|
|
@@ -14,14 +14,22 @@ import 'html-escaper';
|
|
|
14
14
|
import 'vue';
|
|
15
15
|
import 'vue/server-renderer';
|
|
16
16
|
import '@ecomplus/utils';
|
|
17
|
-
import './pages/_...slug_.astro.
|
|
17
|
+
import './pages/_...slug_.astro.fd8a229f.mjs';
|
|
18
|
+
import 'node:fs/promises';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:url';
|
|
21
|
+
import 'http-cache-semantics';
|
|
22
|
+
import 'node:os';
|
|
23
|
+
import 'image-size';
|
|
24
|
+
import 'magic-string';
|
|
25
|
+
import 'node:stream';
|
|
18
26
|
import '@cloudcommerce/api';
|
|
19
27
|
import 'node:events';
|
|
20
|
-
import 'node:path';
|
|
21
28
|
import '@cloudcommerce/config';
|
|
29
|
+
import 'ultrahtml';
|
|
22
30
|
/* empty css */import '@vueuse/core';
|
|
23
31
|
import '@headlessui/vue';
|
|
24
32
|
|
|
25
|
-
const page = () => import('./pages/account.astro.
|
|
33
|
+
const page = () => import('./pages/account.astro.3b21bff8.mjs');
|
|
26
34
|
|
|
27
35
|
export { page };
|