cloudcommerce 0.26.2 → 0.26.4
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 +26 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/index.js +0 -1
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +8 -8
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartItem.vue +64 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +38 -7
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +2 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +8 -4
- 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/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/package.json +8 -8
- package/ecomplus-stores/iluminim/functions/ssr/src/components/CartItem.vue +64 -0
- package/ecomplus-stores/iluminim/functions/ssr/src/components/CartSidebar.vue +37 -6
- package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +2 -3
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +6 -2
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +2 -2
- package/package.json +3 -3
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/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 +2 -2
- package/packages/apps/fb-conversions/package.json +1 -1
- package/packages/apps/flash-courier/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/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/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +1 -1
- package/packages/eslint/package.json +3 -3
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/i18n/package.json +1 -1
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js +2 -2
- package/packages/modules/lib/firebase/functions-checkout/request-to-module.js.map +1 -1
- package/packages/modules/lib/firebase/functions-checkout/utils.js +21 -9
- package/packages/modules/lib/firebase/functions-checkout/utils.js.map +1 -1
- package/packages/modules/package.json +2 -2
- package/packages/modules/schemas/@checkout.cjs +0 -1
- package/packages/modules/src/firebase/functions-checkout/request-to-module.ts +2 -2
- package/packages/modules/src/firebase/functions-checkout/utils.ts +23 -9
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/storefront/astro.config.mjs +33 -23
- package/packages/storefront/dist/client/_astro/{Carousel.926668f2.js → Carousel.9ad2e1dc.js} +1 -1
- package/packages/storefront/dist/client/_astro/CartSidebar.a6c6a885.js +1 -0
- package/packages/storefront/dist/client/_astro/{HeroSlider.1f0524aa.js → HeroSlider.ee1e6200.js} +1 -1
- package/packages/storefront/dist/client/_astro/{PitchBar.7407eeaf.js → PitchBar.6111676e.js} +1 -1
- package/packages/storefront/dist/client/_astro/{Prices.562a32ab.js → Prices.04ff8fce.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductShelf.763cd2ca.js → ProductShelf.085721d6.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ShopHeader.126900a6.js → ShopHeader.7e485e35.js} +2 -2
- package/packages/storefront/dist/client/_astro/_...slug_.b693913e.css +1 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.93857bfb.js → firebase-app.8c541cce.js} +3 -3
- package/packages/storefront/dist/client/_astro/hoisted.85fdcf03.js +1 -0
- package/packages/storefront/dist/client/_astro/index.ea57babe.js +1 -0
- package/packages/storefront/dist/client/_astro/{modules-info.48980668.js → modules-info.e5d77bf3.js} +1 -1
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{CartSidebar.2b555408.mjs → CartSidebar.41b20543.mjs} +8 -7
- package/packages/storefront/dist/server/chunks/{SearchModal.f418e188.mjs → SearchModal.5f5e6a15.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{_...d32bcc0c.mjs → _...4a2548d2.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{account@_@astro.0106855f.mjs → account@_@astro.204fba92.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{astro.bb5b7191.mjs → astro.708269c6.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.35807882.mjs → endpoint@_@js.11be892a.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.477f5af1.mjs → index@_@astro.19e0f502.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.e5a61d6e.mjs → index@_@astro.b37a6ac9.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.fd8a229f.mjs → _...slug_.astro.36e8882b.mjs} +45 -17
- package/packages/storefront/dist/server/chunks/pages/{account.astro.3b21bff8.mjs → account.astro.32e7e6ef.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.247079ba.mjs → endpoint.js.f7a896a1.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{index.astro.dab642f5.mjs → index.astro.3145bd93.mjs} +166 -17
- package/packages/storefront/dist/server/chunks/pages/{~fallback.astro.7630c0d6.mjs → ~fallback.astro.ba4c2475.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/{~fallback@_@astro.65227dd7.mjs → ~fallback@_@astro.6bb4c4b4.mjs} +3 -3
- package/packages/storefront/dist/server/entry.mjs +9 -9
- package/packages/storefront/dist/server/renderers.mjs +2 -2
- package/packages/storefront/package.json +6 -6
- package/packages/storefront/src/lib/layouts/BaseHead.astro +6 -2
- package/packages/test-base/package.json +1 -1
- package/packages/types/modules/@checkout:params.d.ts +1 -1
- package/packages/types/package.json +1 -1
- package/pnpm-workspace.yaml +0 -2
- package/ecomplus-stores/iluminim/.ecomplus.cd.json +0 -5
- package/packages/storefront/dist/client/_astro/CartSidebar.eadba34f.js +0 -1
- package/packages/storefront/dist/client/_astro/_...slug_.36cd433d.css +0 -1
- package/packages/storefront/dist/client/_astro/hoisted.572313d6.js +0 -1
- package/packages/storefront/dist/client/_astro/index.709ac149.js +0 -1
- /package/packages/storefront/dist/client/{workbox-5e0bf4e4.js → workbox-1b331600.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
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.26.4](https://github.com/ecomplus/cloud-commerce/compare/v0.26.3...v0.26.4) (2023-09-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **storefront:** Enabling Astro (v2 experimental) `viewTransitions` on all pages by default ([561c40d](https://github.com/ecomplus/cloud-commerce/commit/561c40d18e6e442ffc400e1c32197d0c26dd90c9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **storefront:** Fixing SW navigate fallback and cache strategies ([1198a94](https://github.com/ecomplus/cloud-commerce/commit/1198a94b22347ea99a41d9d6d7efee31f67201a1))
|
|
16
|
+
* **storefront:** Update SW for immutable (365d) cache for js/css hashed chunks ([1e631f4](https://github.com/ecomplus/cloud-commerce/commit/1e631f4ba21c309b1c71d32478e9fad507a0b723))
|
|
17
|
+
|
|
18
|
+
### [0.26.3](https://github.com/ecomplus/cloud-commerce/compare/v0.26.2...v0.26.3) (2023-09-08)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **modules:** Checkout accepting undefined discount app id for multiple discount apps ([8c6984a](https://github.com/ecomplus/cloud-commerce/commit/8c6984a719b0b3b942ef6f4b50797beb818ebe07))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **deps:** Update non-major dependencies ([#228](https://github.com/ecomplus/cloud-commerce/issues/228)) ([0aa35ea](https://github.com/ecomplus/cloud-commerce/commit/0aa35ea0fe8bbc11cc291e2266a70a646e32444b))
|
|
29
|
+
* **modules:** Better handling multiple results (apps) for apply discounts ([4f9126b](https://github.com/ecomplus/cloud-commerce/commit/4f9126b362d40cc87d633bde012271ac15c5bb31))
|
|
30
|
+
|
|
5
31
|
### [0.26.2](https://github.com/ecomplus/cloud-commerce/compare/v0.26.1...v0.26.2) (2023-08-28)
|
|
6
32
|
|
|
7
33
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.26.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
20
|
-
"@cloudcommerce/passport": "^0.26.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.26.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.26.3",
|
|
20
|
+
"@cloudcommerce/passport": "^0.26.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.26.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.26.
|
|
20
|
+
"@cloudcommerce/api": "^0.26.3",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.26.3",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.26.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudcommerce/i18n": "^0.26.
|
|
26
|
-
"@cloudcommerce/storefront": "^0.26.
|
|
27
|
-
"@cloudcommerce/types": "^0.26.
|
|
28
|
-
"@fontsource/croissant-one": "^5.0.
|
|
29
|
-
"@iconify-json/mingcute": "^1.1.
|
|
25
|
+
"@cloudcommerce/i18n": "^0.26.3",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.26.3",
|
|
27
|
+
"@cloudcommerce/types": "^0.26.3",
|
|
28
|
+
"@fontsource/croissant-one": "^5.0.9",
|
|
29
|
+
"@iconify-json/mingcute": "^1.1.9"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article class="relative bg-white shadow-sm">
|
|
3
|
+
<ALink :href="link" class="flex items-center gap-5 p-4 group">
|
|
4
|
+
<AImg
|
|
5
|
+
v-if="image"
|
|
6
|
+
:picture="image"
|
|
7
|
+
:alt="title"
|
|
8
|
+
class="w-20 h-20 object-cover"
|
|
9
|
+
/>
|
|
10
|
+
<p class="py-2 flex-auto text-sm text-base-700
|
|
11
|
+
group-hover:text-base-900 group-hover:underline">
|
|
12
|
+
{{ title }}
|
|
13
|
+
</p>
|
|
14
|
+
</ALink>
|
|
15
|
+
<button
|
|
16
|
+
v-if="cartItem._id"
|
|
17
|
+
@click.stop="removeCartItem(cartItem._id)"
|
|
18
|
+
class="absolute top-0 right-0 p-2 opacity-70 hover:opacity-100"
|
|
19
|
+
:aria-label="$t.i19remove"
|
|
20
|
+
>
|
|
21
|
+
<span class="w-5 h-5 text-sm leading-none flex flex-col justify-center
|
|
22
|
+
rounded-full border-3 text-danger-800 border-danger-700/30">
|
|
23
|
+
<i class="i-close my-0 mx-auto"></i>
|
|
24
|
+
</span>
|
|
25
|
+
</button>
|
|
26
|
+
<div class="flex justify-between items-center border-t-2 border-base-100">
|
|
27
|
+
<div class="border-r-2 border-base-100">
|
|
28
|
+
<QuantitySelector
|
|
29
|
+
v-model="cartItem.quantity"
|
|
30
|
+
:min="cartItem.min_quantity"
|
|
31
|
+
:max="cartItem.max_quantity"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
<Prices
|
|
35
|
+
:base-price="cartItem.base_price"
|
|
36
|
+
:price="finalPrice"
|
|
37
|
+
:has-cashback="false"
|
|
38
|
+
:has-price-options="false"
|
|
39
|
+
class="px-4 py-2.5 text-[95%] text-right"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</article>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup lang="ts">
|
|
46
|
+
import { removeCartItem } from '@@sf/state/shopping-cart';
|
|
47
|
+
import {
|
|
48
|
+
type Props as UseCartItemProps,
|
|
49
|
+
useCartItem,
|
|
50
|
+
} from '@@sf/composables/use-cart-item';
|
|
51
|
+
import QuantitySelector from '@@sf/components/QuantitySelector.vue';
|
|
52
|
+
import Prices from '~/components/Prices.vue';
|
|
53
|
+
|
|
54
|
+
export type Props = UseCartItemProps;
|
|
55
|
+
|
|
56
|
+
const props = defineProps<Props>();
|
|
57
|
+
const {
|
|
58
|
+
cartItem,
|
|
59
|
+
title,
|
|
60
|
+
link,
|
|
61
|
+
image,
|
|
62
|
+
finalPrice,
|
|
63
|
+
} = useCartItem(props);
|
|
64
|
+
</script>
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<aside class="flex flex-col h-
|
|
3
|
-
<header class="px-6 py-4 flex justify-end items-center gap-3
|
|
2
|
+
<aside class="flex flex-col h-screen bg-white">
|
|
3
|
+
<header class="px-6 py-4 flex justify-end items-center gap-3
|
|
4
|
+
shadow ring-1 ring-black/5 z-10">
|
|
4
5
|
<span class="text-right text-base text-base-600 font-medium">
|
|
5
6
|
{{ $t.i19myShoppingCart }}
|
|
6
7
|
</span>
|
|
7
|
-
<span class="
|
|
8
|
-
|
|
8
|
+
<span class="min-w-[3rem] text-right">
|
|
9
|
+
<span class="ui-badge-pill-lg">
|
|
10
|
+
{{ totalItems }}
|
|
11
|
+
</span>
|
|
9
12
|
</span>
|
|
10
13
|
</header>
|
|
11
|
-
<article class="grow
|
|
14
|
+
<article class="grow overflow-y-auto bg-base-50">
|
|
12
15
|
<div v-if="freeShippingFromValue" class="text-sm text-center">
|
|
13
16
|
<div
|
|
14
17
|
v-if="freeShippingFromValue > shoppingCart.subtotal"
|
|
@@ -19,12 +22,35 @@
|
|
|
19
22
|
<strong class="lowercase">{{ $t.i19freeShipping }}</strong>
|
|
20
23
|
</div>
|
|
21
24
|
<div v-else class="p-3 bg-success-50 text-success-800">
|
|
22
|
-
<i class="text-success-900 i-check
|
|
25
|
+
<i class="text-success-900 i-check mr-1"></i>
|
|
23
26
|
{{ $t.i19freeShippingFrom }} {{ $money(freeShippingFromValue) }}
|
|
24
27
|
</div>
|
|
25
28
|
</div>
|
|
29
|
+
<ul class="px-4 pt-4 pb-2">
|
|
30
|
+
<li v-for="(item, i) in shoppingCart.items" :key="i">
|
|
31
|
+
<CartItem :item="item" class="mb-3" />
|
|
32
|
+
</li>
|
|
33
|
+
</ul>
|
|
26
34
|
</article>
|
|
27
|
-
<footer class="
|
|
35
|
+
<footer class="px-5 pt-4 pb-3 ring-2 ring-black/5 z-10">
|
|
36
|
+
<div class="grid grid-cols-5 gap-3 items-center text-right">
|
|
37
|
+
<div class="col-span-2">
|
|
38
|
+
{{ $t.i19subtotal }}
|
|
39
|
+
</div>
|
|
40
|
+
<Prices :price="shoppingCart.subtotal" class="col-span-3 text-lg" />
|
|
41
|
+
</div>
|
|
42
|
+
<CheckoutLink class="ui-btn-lg ui-btn-primary w-full text-right my-2.5">
|
|
43
|
+
<i class="i-check mr-2"></i>
|
|
44
|
+
{{ $t.i19checkout }}
|
|
45
|
+
</CheckoutLink>
|
|
46
|
+
<a
|
|
47
|
+
href="#"
|
|
48
|
+
@click.prevent="emit('close')"
|
|
49
|
+
class="ui-link text-base-500 hover:text-base-700 text-sm"
|
|
50
|
+
>
|
|
51
|
+
<i class="i-arrow-left mr-1"></i>
|
|
52
|
+
{{ $t.i19continueShopping }}
|
|
53
|
+
</a>
|
|
28
54
|
</footer>
|
|
29
55
|
</aside>
|
|
30
56
|
</template>
|
|
@@ -32,4 +58,9 @@
|
|
|
32
58
|
<script setup lang="ts">
|
|
33
59
|
import { freeShippingFromValue } from '@@sf/state/modules-info';
|
|
34
60
|
import { shoppingCart, totalItems } from '@@sf/state/shopping-cart';
|
|
61
|
+
import CheckoutLink from '@@sf/components/CheckoutLink.vue';
|
|
62
|
+
import Prices from '~/components/Prices.vue';
|
|
63
|
+
import CartItem from '~/components/CartItem.vue';
|
|
64
|
+
|
|
65
|
+
const emit = defineEmits(['close']);
|
|
35
66
|
</script>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="text-base-600
|
|
4
|
-
[&>div]:[font-size:90%] [&_small]:
|
|
4
|
+
[&>div]:[font-size:90%] [&_small]:[font-size:92%] [&_small]:lowercase"
|
|
5
5
|
:class="isBig ? 'text-lg' : null"
|
|
6
|
-
data-prices
|
|
7
6
|
>
|
|
8
7
|
<span v-if="comparePrice" class="text-base-500 mr-1 [font-size:87%]">
|
|
9
8
|
<small v-if="isLiteral">
|
|
@@ -46,7 +45,7 @@
|
|
|
46
45
|
</small>
|
|
47
46
|
<span>{{ $money(installmentValue) }}</span>
|
|
48
47
|
<small v-if="!monthlyInterest && isLiteral">
|
|
49
|
-
{{ $t.i19interestFree }}
|
|
48
|
+
{{ ` ${$t.i19interestFree}` }}
|
|
50
49
|
</small>
|
|
51
50
|
</div>
|
|
52
51
|
</Fade>
|
|
@@ -183,15 +183,19 @@ watchOnce(isCartOpen, () => {
|
|
|
183
183
|
});
|
|
184
184
|
const isMounted = ref(false);
|
|
185
185
|
const delayedTotalItems = ref(0);
|
|
186
|
-
const searchTerm = ref('');
|
|
187
|
-
const searchInput = ref<HTMLElement | null>(null);
|
|
188
186
|
onMounted(() => {
|
|
189
187
|
isMounted.value = true;
|
|
190
188
|
watch(totalItems, (newTotalItems, prevTotalItems) => {
|
|
191
|
-
if (
|
|
192
|
-
|
|
189
|
+
if (typeof prevTotalItems === 'number') {
|
|
190
|
+
if (prevTotalItems < newTotalItems) {
|
|
191
|
+
isCartOpen.value = true;
|
|
192
|
+
} else if (prevTotalItems && !newTotalItems) {
|
|
193
|
+
isCartOpen.value = false;
|
|
194
|
+
}
|
|
193
195
|
}
|
|
194
196
|
delayedTotalItems.value = newTotalItems;
|
|
195
197
|
}, { immediate: true });
|
|
196
198
|
});
|
|
199
|
+
const searchTerm = ref('');
|
|
200
|
+
const searchInput = ref<HTMLElement | null>(null);
|
|
197
201
|
</script>
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.26.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
20
|
-
"@cloudcommerce/modules": "^0.26.
|
|
18
|
+
"@cloudcommerce/events": "^0.26.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.26.3",
|
|
20
|
+
"@cloudcommerce/modules": "^0.26.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cloudcommerce/cli": "^0.26.
|
|
26
|
+
"@cloudcommerce/cli": "^0.26.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudcommerce/eslint": "^0.26.
|
|
29
|
+
"@cloudcommerce/eslint": "^0.26.3"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.26.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
20
|
-
"@cloudcommerce/passport": "^0.26.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.26.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.26.3",
|
|
20
|
+
"@cloudcommerce/passport": "^0.26.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.26.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.26.
|
|
20
|
+
"@cloudcommerce/api": "^0.26.3",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.26.3",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.26.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudcommerce/i18n": "^0.26.
|
|
26
|
-
"@cloudcommerce/storefront": "^0.26.
|
|
27
|
-
"@cloudcommerce/types": "^0.26.
|
|
28
|
-
"@fontsource-variable/heebo": "^5.0.
|
|
29
|
-
"@iconify-json/carbon": "^1.1.
|
|
25
|
+
"@cloudcommerce/i18n": "^0.26.3",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.26.3",
|
|
27
|
+
"@cloudcommerce/types": "^0.26.3",
|
|
28
|
+
"@fontsource-variable/heebo": "^5.0.8",
|
|
29
|
+
"@iconify-json/carbon": "^1.1.20"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article class="relative bg-white shadow-sm">
|
|
3
|
+
<ALink :href="link" class="flex items-center gap-5 p-4 group">
|
|
4
|
+
<AImg
|
|
5
|
+
v-if="image"
|
|
6
|
+
:picture="image"
|
|
7
|
+
:alt="title"
|
|
8
|
+
class="w-20 h-20 object-cover"
|
|
9
|
+
/>
|
|
10
|
+
<p class="py-2 flex-auto text-sm text-base-700
|
|
11
|
+
group-hover:text-base-900 group-hover:underline">
|
|
12
|
+
{{ title }}
|
|
13
|
+
</p>
|
|
14
|
+
</ALink>
|
|
15
|
+
<button
|
|
16
|
+
v-if="cartItem._id"
|
|
17
|
+
@click.stop="removeCartItem(cartItem._id)"
|
|
18
|
+
class="absolute top-0 right-0 p-2 opacity-70 hover:opacity-100"
|
|
19
|
+
:aria-label="$t.i19remove"
|
|
20
|
+
>
|
|
21
|
+
<span class="w-5 h-5 text-sm leading-none flex flex-col justify-center
|
|
22
|
+
rounded-full border-3 text-danger-800 border-danger-700/30">
|
|
23
|
+
<i class="i-close my-0 mx-auto"></i>
|
|
24
|
+
</span>
|
|
25
|
+
</button>
|
|
26
|
+
<div class="flex justify-between items-center border-t-2 border-base-100">
|
|
27
|
+
<div class="border-r-2 border-base-100">
|
|
28
|
+
<QuantitySelector
|
|
29
|
+
v-model="cartItem.quantity"
|
|
30
|
+
:min="cartItem.min_quantity"
|
|
31
|
+
:max="cartItem.max_quantity"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
<Prices
|
|
35
|
+
:base-price="cartItem.base_price"
|
|
36
|
+
:price="finalPrice"
|
|
37
|
+
:has-cashback="false"
|
|
38
|
+
:has-price-options="false"
|
|
39
|
+
class="px-4 py-2.5 text-[95%] text-right"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</article>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup lang="ts">
|
|
46
|
+
import { removeCartItem } from '@@sf/state/shopping-cart';
|
|
47
|
+
import {
|
|
48
|
+
type Props as UseCartItemProps,
|
|
49
|
+
useCartItem,
|
|
50
|
+
} from '@@sf/composables/use-cart-item';
|
|
51
|
+
import QuantitySelector from '@@sf/components/QuantitySelector.vue';
|
|
52
|
+
import Prices from '~/components/Prices.vue';
|
|
53
|
+
|
|
54
|
+
export type Props = UseCartItemProps;
|
|
55
|
+
|
|
56
|
+
const props = defineProps<Props>();
|
|
57
|
+
const {
|
|
58
|
+
cartItem,
|
|
59
|
+
title,
|
|
60
|
+
link,
|
|
61
|
+
image,
|
|
62
|
+
finalPrice,
|
|
63
|
+
} = useCartItem(props);
|
|
64
|
+
</script>
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<aside class="flex flex-col h-
|
|
3
|
-
<header class="px-6 py-4 flex justify-end items-center gap-3
|
|
2
|
+
<aside class="flex flex-col h-screen bg-white">
|
|
3
|
+
<header class="px-6 py-4 flex justify-end items-center gap-3
|
|
4
|
+
shadow ring-1 ring-black/5 z-10">
|
|
4
5
|
<span class="text-right text-base text-base-600 font-medium">
|
|
5
6
|
{{ $t.i19myShoppingCart }}
|
|
6
7
|
</span>
|
|
7
|
-
<span class="
|
|
8
|
-
|
|
8
|
+
<span class="min-w-[3rem] text-right">
|
|
9
|
+
<span class="ui-badge-pill-lg">
|
|
10
|
+
{{ totalItems }}
|
|
11
|
+
</span>
|
|
9
12
|
</span>
|
|
10
13
|
</header>
|
|
11
|
-
<article class="grow
|
|
14
|
+
<article class="grow overflow-y-auto bg-base-50">
|
|
12
15
|
<div v-if="freeShippingFromValue" class="text-sm text-center">
|
|
13
16
|
<div
|
|
14
17
|
v-if="freeShippingFromValue > shoppingCart.subtotal"
|
|
@@ -23,8 +26,31 @@
|
|
|
23
26
|
{{ $t.i19freeShippingFrom }} {{ $money(freeShippingFromValue) }}
|
|
24
27
|
</div>
|
|
25
28
|
</div>
|
|
29
|
+
<ul class="px-4 pt-4 pb-2">
|
|
30
|
+
<li v-for="(item, i) in shoppingCart.items" :key="i">
|
|
31
|
+
<CartItem :item="item" class="mb-3" />
|
|
32
|
+
</li>
|
|
33
|
+
</ul>
|
|
26
34
|
</article>
|
|
27
|
-
<footer class="
|
|
35
|
+
<footer class="px-5 pt-4 pb-3 ring-2 ring-black/5 z-10">
|
|
36
|
+
<div class="grid grid-cols-5 gap-3 items-center text-right">
|
|
37
|
+
<div class="col-span-2">
|
|
38
|
+
{{ $t.i19subtotal }}
|
|
39
|
+
</div>
|
|
40
|
+
<Prices :price="shoppingCart.subtotal" class="col-span-3 text-lg" />
|
|
41
|
+
</div>
|
|
42
|
+
<CheckoutLink class="ui-btn-lg ui-btn-primary w-full text-right my-2.5">
|
|
43
|
+
<i class="i-check mr-2"></i>
|
|
44
|
+
{{ $t.i19checkout }}
|
|
45
|
+
</CheckoutLink>
|
|
46
|
+
<a
|
|
47
|
+
href="#"
|
|
48
|
+
@click.prevent="emit('close')"
|
|
49
|
+
class="ui-link text-base-500 hover:text-base-700 text-sm"
|
|
50
|
+
>
|
|
51
|
+
<i class="i-arrow-left mr-1"></i>
|
|
52
|
+
{{ $t.i19continueShopping }}
|
|
53
|
+
</a>
|
|
28
54
|
</footer>
|
|
29
55
|
</aside>
|
|
30
56
|
</template>
|
|
@@ -32,4 +58,9 @@
|
|
|
32
58
|
<script setup lang="ts">
|
|
33
59
|
import { freeShippingFromValue } from '@@sf/state/modules-info';
|
|
34
60
|
import { shoppingCart, totalItems } from '@@sf/state/shopping-cart';
|
|
61
|
+
import CheckoutLink from '@@sf/components/CheckoutLink.vue';
|
|
62
|
+
import Prices from '~/components/Prices.vue';
|
|
63
|
+
import CartItem from '~/components/CartItem.vue';
|
|
64
|
+
|
|
65
|
+
const emit = defineEmits(['close']);
|
|
35
66
|
</script>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="text-base-600
|
|
4
|
-
[&>div]:[font-size:90%] [&_small]:
|
|
4
|
+
[&>div]:[font-size:90%] [&_small]:[font-size:92%] [&_small]:lowercase"
|
|
5
5
|
:class="isBig ? 'text-lg' : null"
|
|
6
|
-
data-prices
|
|
7
6
|
>
|
|
8
7
|
<span v-if="comparePrice" class="text-base-500 mr-1 [font-size:87%]">
|
|
9
8
|
<small v-if="isLiteral">
|
|
@@ -46,7 +45,7 @@
|
|
|
46
45
|
</small>
|
|
47
46
|
<span>{{ $money(installmentValue) }}</span>
|
|
48
47
|
<small v-if="!monthlyInterest && isLiteral">
|
|
49
|
-
{{ $t.i19interestFree }}
|
|
48
|
+
{{ ` ${$t.i19interestFree}` }}
|
|
50
49
|
</small>
|
|
51
50
|
</div>
|
|
52
51
|
</Fade>
|
|
@@ -145,8 +145,12 @@ const delayedTotalItems = ref(0);
|
|
|
145
145
|
onMounted(() => {
|
|
146
146
|
isMounted.value = true;
|
|
147
147
|
watch(totalItems, (newTotalItems, prevTotalItems) => {
|
|
148
|
-
if (
|
|
149
|
-
|
|
148
|
+
if (typeof prevTotalItems === 'number') {
|
|
149
|
+
if (prevTotalItems < newTotalItems) {
|
|
150
|
+
isCartOpen.value = true;
|
|
151
|
+
} else if (prevTotalItems && !newTotalItems) {
|
|
152
|
+
isCartOpen.value = false;
|
|
153
|
+
}
|
|
150
154
|
}
|
|
151
155
|
delayedTotalItems.value = newTotalItems;
|
|
152
156
|
}, { immediate: true });
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.26.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.26.
|
|
20
|
-
"@cloudcommerce/modules": "^0.26.
|
|
18
|
+
"@cloudcommerce/events": "^0.26.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.26.3",
|
|
20
|
+
"@cloudcommerce/modules": "^0.26.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cloudcommerce/cli": "^0.26.
|
|
26
|
+
"@cloudcommerce/cli": "^0.26.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudcommerce/eslint": "^0.26.
|
|
29
|
+
"@cloudcommerce/eslint": "^0.26.3"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.4",
|
|
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>",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@commitlint/cli": "^17.7.1",
|
|
20
20
|
"@commitlint/config-conventional": "^17.7.0",
|
|
21
21
|
"@commitlint/rules": "^17.7.0",
|
|
22
|
-
"@types/node": "^18.17.
|
|
22
|
+
"@types/node": "^18.17.14",
|
|
23
23
|
"eslint": "^8.48.0",
|
|
24
24
|
"husky": "^8.0.3",
|
|
25
25
|
"standard-version": "^9.5.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vite": "^4.4.9",
|
|
31
31
|
"vitest": "^0.34.3",
|
|
32
32
|
"zx": "^7.2.3",
|
|
33
|
-
"@cloudcommerce/eslint": "0.26.
|
|
33
|
+
"@cloudcommerce/eslint": "0.26.4"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"fix-install": "bash scripts/pre-install.sh && pnpm i",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-emails",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.26.
|
|
4
|
+
"version": "0.26.4",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce default transactional email app",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/emails": "workspace:*",
|
|
24
24
|
"@cloudcommerce/firebase": "workspace:*",
|
|
25
|
-
"@ecomplus/transactional-mails": "^2.0.
|
|
25
|
+
"@ecomplus/transactional-mails": "^2.0.2",
|
|
26
26
|
"firebase-admin": "^11.10.1",
|
|
27
27
|
"firebase-functions": "^4.4.1"
|
|
28
28
|
},
|