cloudcommerce 0.22.2 → 0.22.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/.eslintrc.cjs +1 -1
- package/CHANGELOG.md +20 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +1 -0
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +1 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +88 -48
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +21 -13
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +7 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +10 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +1 -0
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +1 -1
- package/ecomplus-stores/iluminim/.ecomplus.cd.json +5 -0
- package/ecomplus-stores/iluminim/functions/many/package.json +3 -3
- package/ecomplus-stores/iluminim/functions/ssr/package.json +6 -6
- package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +1 -1
- package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +1 -5
- package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +6 -2
- package/ecomplus-stores/iluminim/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/iluminim/package.json +1 -1
- package/package.json +7 -11
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +2 -2
- 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/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 +2 -2
- 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 +2 -2
- package/packages/eslint/CHANGELOG.md +1 -0
- package/packages/eslint/README.md +1 -0
- package/packages/eslint/package.json +29 -0
- package/packages/eslint/storefront.eslintrc.cjs +28 -0
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +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 +4 -5
- package/packages/ssr/src/firebase/serve-storefront.ts +3 -2
- package/packages/storefront/.eslintrc.cjs +1 -26
- package/packages/storefront/dist/client/_astro/{Carousel.62c97a79.js → Carousel.8af656b5.js} +1 -1
- package/packages/storefront/dist/client/_astro/{HeroSlider.cea1f361.js → HeroSlider.8a040a33.js} +1 -1
- package/packages/storefront/dist/client/_astro/{PitchBar.ed85833a.js → PitchBar.ab0c501e.js} +1 -1
- package/packages/storefront/dist/client/_astro/{ProductShelf.35614736.js → ProductShelf.6351b57b.js} +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.cfab20c7.js +4 -0
- package/packages/storefront/dist/client/_astro/{firebase-app.84207480.js → firebase-app.1df8af9a.js} +5 -5
- package/packages/storefront/dist/client/_astro/index.7eac5494.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/chunks/{_...fac94758.mjs → _...1b951f6c.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{account@_@astro.460623ee.mjs → account@_@astro.f6aec583.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{astro.e0968ba7.mjs → astro.b875de26.mjs} +1119 -1226
- package/packages/storefront/dist/server/chunks/{endpoint@_@js.35380ea5.mjs → endpoint@_@js.5834ad4e.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{fallback@_@astro.dbc26d2d.mjs → fallback@_@astro.069ddb54.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.c91e679e.mjs → index@_@astro.37e61ebe.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/{index@_@astro.fec107b9.mjs → index@_@astro.485287a1.mjs} +3 -3
- package/packages/storefront/dist/server/chunks/pages/{_...slug_.astro.2e2d4770.mjs → _...slug_.astro.95bf4c3b.mjs} +48 -47
- package/packages/storefront/dist/server/chunks/pages/{account.astro.0003ca94.mjs → account.astro.4b8c2471.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{endpoint.js.6f0f4ede.mjs → endpoint.js.bd1232b7.mjs} +1 -1
- package/packages/storefront/dist/server/chunks/pages/{fallback.astro.fc8bc7e7.mjs → fallback.astro.b52164bc.mjs} +2 -2
- package/packages/storefront/dist/server/chunks/pages/{index.astro.03adcc55.mjs → index.astro.98167846.mjs} +2 -2
- package/packages/storefront/dist/server/entry.mjs +9 -9
- package/packages/storefront/dist/server/renderers.mjs +2 -2
- package/packages/storefront/package.json +8 -7
- package/packages/storefront/src/lib/components/SharedData.astro +7 -8
- package/packages/storefront/src/lib/composables/use-shared-data.ts +18 -0
- package/packages/storefront/src/lib/composables/use-shop-header.ts +8 -7
- package/packages/storefront/src/lib/composables/use-sticky-header.ts +1 -1
- package/packages/storefront/src/lib/layouts/use-page-header.ts +0 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/_astro/ShopHeader.dbe9c1f1.js +0 -4
- package/packages/storefront/dist/client/_astro/index.b93f3d06.js +0 -1
- /package/packages/{storefront/.base.eslintrc.cjs → eslint/base.eslintrc.cjs} +0 -0
package/.eslintrc.cjs
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
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.22.4](https://github.com/ecomplus/cloud-commerce/compare/v0.22.3...v0.22.4) (2023-08-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **deps:** Update non-major dependencies ([#201](https://github.com/ecomplus/cloud-commerce/issues/201)) ([0dc474b](https://github.com/ecomplus/cloud-commerce/commit/0dc474bae93f18be8498a94f189db465cadccbca))
|
|
11
|
+
* **storefront:** Update Astro to v2.9.6 ([#200](https://github.com/ecomplus/cloud-commerce/issues/200)) ([dd42847](https://github.com/ecomplus/cloud-commerce/commit/dd42847fe3f9d5990bf9a6c25f8366c4c43eee96))
|
|
12
|
+
|
|
13
|
+
### [0.22.3](https://github.com/ecomplus/cloud-commerce/compare/v0.22.2...v0.22.3) (2023-07-26)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **storefront:** New `useSharedData` composable to make easier setting data before components SSR ([60cdcf0](https://github.com/ecomplus/cloud-commerce/commit/60cdcf0b3315366c39ef5b481eac53dcfea8bff1))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **storefront:** Update `useShopHeader` to ensure global data is used on function runtime ([abaaad0](https://github.com/ecomplus/cloud-commerce/commit/abaaad0961924995bbb556074f8778e55c34f7b8))
|
|
24
|
+
|
|
5
25
|
### [0.22.2](https://github.com/ecomplus/cloud-commerce/compare/v0.22.1...v0.22.2) (2023-07-26)
|
|
6
26
|
|
|
7
27
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.22.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.22.
|
|
20
|
-
"@cloudcommerce/passport": "^0.22.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.22.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.22.3",
|
|
20
|
+
"@cloudcommerce/passport": "^0.22.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.22.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.22.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.22.
|
|
20
|
+
"@cloudcommerce/api": "^0.22.3",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.22.3",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.22.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudcommerce/i18n": "^0.22.
|
|
26
|
-
"@cloudcommerce/storefront": "^0.22.
|
|
27
|
-
"@cloudcommerce/types": "^0.22.
|
|
25
|
+
"@cloudcommerce/i18n": "^0.22.3",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.22.3",
|
|
27
|
+
"@cloudcommerce/types": "^0.22.3",
|
|
28
28
|
"@fontsource/croissant-one": "^5.0.5",
|
|
29
29
|
"@iconify-json/mingcute": "^1.1.7"
|
|
30
30
|
}
|
|
@@ -36,7 +36,7 @@ a, button, button > * {
|
|
|
36
36
|
hover:secondary ring-secondary/30;
|
|
37
37
|
}
|
|
38
38
|
.ui-btn-contrast {
|
|
39
|
-
@apply bg-white text-primary hover:bg-primary-100 ring-white/30;
|
|
39
|
+
@apply bg-white text-primary-600 hover:bg-primary-100 ring-white/30;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.ui-text-brand, .ui-title {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
? 'lg:col-span-3 sm:order-last [&_img]:max-w-full sm:[&_img]:max-w-none'
|
|
13
13
|
+ ' [&_img]:aspect-video sm:[&_img]:aspect-[2.5] [&_img]:object-cover'
|
|
14
14
|
: '[&_img]:max-w-full'"
|
|
15
|
+
class="md:[clip-path:polygon(6%_0,100%_0,100%_100%,0_100%)]"
|
|
15
16
|
>
|
|
16
17
|
<slot name="picture" />
|
|
17
18
|
</component>
|
|
@@ -66,10 +66,11 @@
|
|
|
66
66
|
</component>
|
|
67
67
|
<button
|
|
68
68
|
v-if="isActive && !hasVariations"
|
|
69
|
-
class="absolute -top-12 left-1/2 -ml-7 w-14 h-14 lg:left-4 lg:ml-0
|
|
69
|
+
class="absolute -top-12 left-1/2 -ml-7 w-14 h-14 lg:-top-13 lg:left-4 lg:ml-0
|
|
70
70
|
primary opacity-75 hover:opacity-100
|
|
71
71
|
rounded-full text-3xl leading-none p-2 z-10"
|
|
72
72
|
@click.prevent="addProductToCart(product)"
|
|
73
|
+
:aria-label="$t.i19addToCart"
|
|
73
74
|
>
|
|
74
75
|
<i class="i-shopping-bag-3-line"></i>
|
|
75
76
|
</button>
|
|
@@ -8,59 +8,97 @@
|
|
|
8
8
|
]"
|
|
9
9
|
>
|
|
10
10
|
<div class="container 2xl:max-w-7xl
|
|
11
|
-
mx-auto px-1 lg:pr-3 lg:pl-5 xl:pr-7 xl:pl-9 2xl:pr-0 2xl:pl-2
|
|
12
|
-
flex
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class="px-2 my-1"
|
|
17
|
-
:aria-label="$t.i19toggleMenu"
|
|
18
|
-
@click="isSidenavOpen = !isSidenavOpen"
|
|
11
|
+
mx-auto px-1 lg:pr-3 lg:pl-5 xl:pr-7 xl:pl-9 2xl:pr-0 2xl:pl-2">
|
|
12
|
+
<div class="flex justify-between items-center">
|
|
13
|
+
<div
|
|
14
|
+
class="basis-1/4 lg:basis-auto lg:me-5"
|
|
15
|
+
:class="!isSticky ? 'lg:hidden' : null"
|
|
19
16
|
>
|
|
20
|
-
<
|
|
21
|
-
class="
|
|
22
|
-
:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</div>
|
|
26
|
-
<slot name="logo" />
|
|
27
|
-
<ShopHeaderMenu class="hidden lg:block" v-bind="{ inlineMenuTrees }" />
|
|
28
|
-
<div class="basis-1/4 px-2 flex justify-end items-center gap-3 lg:gap-4">
|
|
29
|
-
<button
|
|
30
|
-
:aria-label="$t.i19searchProducts"
|
|
31
|
-
@click="isSearchOpen = !isSearchOpen"
|
|
32
|
-
>
|
|
33
|
-
<i class="i-search-3-line w-7 h-7
|
|
34
|
-
text-base-700 hover:text-primary hover:scale-110 active:scale-125"></i>
|
|
35
|
-
</button>
|
|
36
|
-
<AccountMenu
|
|
37
|
-
class="hidden sm:block"
|
|
38
|
-
:aria-label="$t.i19myAccount"
|
|
39
|
-
:service-links="serviceLinks"
|
|
40
|
-
>
|
|
41
|
-
<template #button="{ open }">
|
|
17
|
+
<button
|
|
18
|
+
class="px-2 my-1"
|
|
19
|
+
:aria-label="$t.i19toggleMenu"
|
|
20
|
+
@click="isSidenavOpen = !isSidenavOpen"
|
|
21
|
+
>
|
|
42
22
|
<i
|
|
43
|
-
class="
|
|
44
|
-
|
|
45
|
-
:class="open ? 'text-base-800 scale-110' : null"
|
|
23
|
+
class="text-base-600 text-3xl"
|
|
24
|
+
:class="isSidenavOpen ? 'i-close' : 'i-menu-line'"
|
|
46
25
|
></i>
|
|
47
|
-
</
|
|
48
|
-
</
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
26
|
+
</button>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="lg:grow" :class="isSticky ? '[&_img]:max-w-[170px]' : null">
|
|
29
|
+
<slot name="logo" />
|
|
30
|
+
</div>
|
|
31
|
+
<div class="basis-1/4 px-2 flex justify-end items-center gap-3 lg:gap-4">
|
|
32
|
+
<form
|
|
33
|
+
action="/search"
|
|
34
|
+
method="get"
|
|
35
|
+
class="hidden lg:block w-[400px] relative mb-1"
|
|
36
|
+
@submit.prevent="searchTerm
|
|
37
|
+
? (isSearchOpen = !isSearchOpen)
|
|
38
|
+
: searchInput?.focus()"
|
|
39
|
+
>
|
|
40
|
+
<label for="HeaderSearch" class="sr-only">
|
|
41
|
+
{{ $t.i19searchProducts }}
|
|
42
|
+
</label>
|
|
43
|
+
<input
|
|
44
|
+
ref="searchInput"
|
|
45
|
+
type="search"
|
|
46
|
+
id="HeaderSearch"
|
|
47
|
+
name="term"
|
|
48
|
+
v-model="searchTerm"
|
|
49
|
+
:placeholder="$t.i19searchProducts"
|
|
50
|
+
class="w-full rounded-md py-2.5 pe-10 sm:text-sm
|
|
51
|
+
bg-gradient-to-br from-secondary-50/10 to-secondary-50/80
|
|
52
|
+
border-secondary-200 shadow-sm"
|
|
53
|
+
/>
|
|
54
|
+
<span class="absolute inset-y-0 end-0 px-1 grid place-content-center">
|
|
55
|
+
<button
|
|
56
|
+
type="submit"
|
|
57
|
+
class="p-1 text-2xl text-secondary-600 hover:text-primary"
|
|
58
|
+
>
|
|
59
|
+
<span class="sr-only">{{ $t.i19search }}</span>
|
|
60
|
+
<i class="i-search-3-line"></i>
|
|
61
|
+
</button>
|
|
62
|
+
</span>
|
|
63
|
+
</form>
|
|
64
|
+
<button
|
|
65
|
+
:aria-label="$t.i19searchProducts"
|
|
66
|
+
@click="isSearchOpen = !isSearchOpen"
|
|
67
|
+
class="lg:hidden"
|
|
68
|
+
>
|
|
69
|
+
<i class="i-search-3-line w-7 h-7
|
|
70
|
+
text-base-700 hover:text-primary hover:scale-110 active:scale-125"></i>
|
|
71
|
+
</button>
|
|
72
|
+
<AccountMenu :service-links="serviceLinks" class="hidden sm:block">
|
|
73
|
+
<template #button="{ open }">
|
|
74
|
+
<i
|
|
75
|
+
class="i-user-2-line w-7 h-7
|
|
76
|
+
text-base-600 hover:text-primary hover:scale-110 active:scale-125"
|
|
77
|
+
:class="open ? 'text-base-800 scale-110' : null"
|
|
78
|
+
></i>
|
|
79
|
+
</template>
|
|
80
|
+
</AccountMenu>
|
|
81
|
+
<button
|
|
82
|
+
:aria-label="$t.i19openCart"
|
|
83
|
+
@click="isCartOpen = !isCartOpen"
|
|
84
|
+
class="relative group text-primary-500"
|
|
59
85
|
>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
86
|
+
<i class="i-shopping-bag-3-fill w-7 h-7 group-hover:text-primary
|
|
87
|
+
group-hover:scale-110 group-active:scale-125"></i>
|
|
88
|
+
<span
|
|
89
|
+
v-if="delayedTotalItems"
|
|
90
|
+
class="ui-badge-pill-sm absolute -top-1 -right-1.5"
|
|
91
|
+
>
|
|
92
|
+
{{ delayedTotalItems }}
|
|
93
|
+
</span>
|
|
94
|
+
</button>
|
|
95
|
+
</div>
|
|
63
96
|
</div>
|
|
97
|
+
<ShopHeaderMenu
|
|
98
|
+
v-show="!isSticky"
|
|
99
|
+
v-bind="{ inlineMenuTrees }"
|
|
100
|
+
class="hidden lg:block px-3 2xl:px-8 mt-3"
|
|
101
|
+
/>
|
|
64
102
|
</div>
|
|
65
103
|
<Drawer
|
|
66
104
|
v-model="isSidenavOpen"
|
|
@@ -124,6 +162,8 @@ const isSearchOpen = ref(false);
|
|
|
124
162
|
const isCartOpen = ref(false);
|
|
125
163
|
const isMounted = ref(false);
|
|
126
164
|
const delayedTotalItems = ref(0);
|
|
165
|
+
const searchTerm = ref('');
|
|
166
|
+
const searchInput = ref<HTMLElement | null>(null);
|
|
127
167
|
onMounted(() => {
|
|
128
168
|
isMounted.value = true;
|
|
129
169
|
watch(totalItems, (newTotalItems, prevTotalItems) => {
|
|
@@ -1,18 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav>
|
|
3
3
|
<ul
|
|
4
|
-
class="flex
|
|
4
|
+
class="flex justify-between gap-1.5 text-base-700"
|
|
5
5
|
:class="inlineMenuTrees.length < 7 ? 'text-base' : 'text-sm'"
|
|
6
6
|
>
|
|
7
7
|
<li v-for="(categoryTree, i) in inlineMenuTrees" :key="i">
|
|
8
8
|
<ShopHeaderSubmenu
|
|
9
9
|
v-if="categoryTree.subcategories.length"
|
|
10
10
|
:category-tree="categoryTree"
|
|
11
|
+
:class="[
|
|
12
|
+
i < 4 ? '[&_.Popover]:translate-x-0 [&_.Popover]:-left-2' : null,
|
|
13
|
+
i > 3 ? '[&_.Popover]:text-right [&_.Popover]:-right-2' : null,
|
|
14
|
+
]"
|
|
11
15
|
>
|
|
12
16
|
<template #button="{ open }">
|
|
13
17
|
<span class="hover:text-primary group">
|
|
18
|
+
<span class="hidden lg:inline text-secondary-500">
|
|
19
|
+
<i v-if="categoryTree.slug.includes('confeitar')"
|
|
20
|
+
class="i-cupcake-line me-1"></i>
|
|
21
|
+
<i v-else-if="categoryTree.slug.includes('cortadores')"
|
|
22
|
+
class="i-scissors-2-line me-1"></i>
|
|
23
|
+
<i v-else-if="categoryTree.slug.includes('panificacao')"
|
|
24
|
+
class="i-bread-line me-1"></i>
|
|
25
|
+
<i v-else-if="categoryTree.slug.includes('embalagens')"
|
|
26
|
+
class="i-package-2-line me-1"></i>
|
|
27
|
+
<i v-else-if="categoryTree.slug.includes('chocolate')"
|
|
28
|
+
class="i-cookie-man-line me-1"></i>
|
|
29
|
+
<i v-else-if="categoryTree.slug.includes('ingredientes')"
|
|
30
|
+
class="i-drop-line me-1"></i>
|
|
31
|
+
</span>
|
|
14
32
|
<h3
|
|
15
|
-
class="group-hover:underline inline"
|
|
33
|
+
class="group-hover:underline inline tracking-tight"
|
|
16
34
|
:class="[
|
|
17
35
|
inlineMenuTrees.length < 7 ? 'decoration-2' : null,
|
|
18
36
|
open ? 'underline' : null,
|
|
@@ -20,12 +38,6 @@
|
|
|
20
38
|
>
|
|
21
39
|
{{ categoryTree.name }}
|
|
22
40
|
</h3>
|
|
23
|
-
<i
|
|
24
|
-
v-if="hasOneLevelSubcategories"
|
|
25
|
-
class="i-down-line ml-1 transition-transform
|
|
26
|
-
text-base-400 group-hover:text-primary-subtle"
|
|
27
|
-
:class="open ? 'rotate-180' : null"
|
|
28
|
-
></i>
|
|
29
41
|
</span>
|
|
30
42
|
</template>
|
|
31
43
|
</ShopHeaderSubmenu>
|
|
@@ -44,15 +56,11 @@
|
|
|
44
56
|
|
|
45
57
|
<script setup lang="ts">
|
|
46
58
|
import type { CategoryTree } from '@@sf/composables/use-shop-header';
|
|
47
|
-
import { computed } from 'vue';
|
|
48
59
|
import ShopHeaderSubmenu from '~/components/ShopHeaderSubmenu.vue';
|
|
49
60
|
|
|
50
61
|
export interface Props {
|
|
51
62
|
inlineMenuTrees: CategoryTree[];
|
|
52
63
|
}
|
|
53
64
|
|
|
54
|
-
|
|
55
|
-
const hasOneLevelSubcategories = computed(() => {
|
|
56
|
-
return !!props.inlineMenuTrees.find(({ subcategories }) => !subcategories.length);
|
|
57
|
-
});
|
|
65
|
+
defineProps<Props>();
|
|
58
66
|
</script>
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<div class="relative">
|
|
7
7
|
<Fade>
|
|
8
8
|
<PopoverPanel
|
|
9
|
-
class="absolute z-20 top-3
|
|
10
|
-
px-
|
|
9
|
+
class="Popover absolute z-20 top-3 !transform
|
|
10
|
+
px-7 py-5 rounded backdrop-blur-md shadow bg-white/80
|
|
11
11
|
text-base text-base-700"
|
|
12
|
-
:class="countMenuCols === 1 ? 'w-
|
|
12
|
+
:class="countMenuCols === 1 ? 'w-auto'
|
|
13
13
|
: countMenuCols === 2 ? `w-screen ${(categoryPicture ? 'max-w-lg' : 'max-w-sm')}`
|
|
14
14
|
: countMenuCols === 3 ? `w-screen ${(categoryPicture ? 'max-w-xl' : 'max-w-md')}`
|
|
15
15
|
: countMenuCols < 6 ? 'w-screen max-w-3xl' : 'w-screen max-w-5xl'"
|
|
@@ -19,10 +19,12 @@
|
|
|
19
19
|
<li
|
|
20
20
|
v-for="(subcategory, i) in subcategoryLinks"
|
|
21
21
|
:key="`link-${i}`"
|
|
22
|
-
|
|
22
|
+
class="text-sm mb-2"
|
|
23
23
|
>
|
|
24
24
|
<a :href="`/${subcategory.slug}`" class="hover:text-primary">
|
|
25
|
-
<h3
|
|
25
|
+
<h3 :class="countMenuCols === 1 ? 'whitespace-nowrap' : null">
|
|
26
|
+
{{ subcategory.name }}
|
|
27
|
+
</h3>
|
|
26
28
|
</a>
|
|
27
29
|
</li>
|
|
28
30
|
</ul>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import usePageHeader from '@@sf/layouts/use-page-header';
|
|
3
|
-
import
|
|
3
|
+
import useSharedData from '@@sf/composables/use-shared-data';
|
|
4
4
|
import Picture from '@@sf/components/Picture.astro';
|
|
5
5
|
import PitchBar from '~/components/PitchBar.vue';
|
|
6
6
|
import ShopHeader from '~/components/ShopHeader.vue';
|
|
@@ -12,25 +12,29 @@ const {
|
|
|
12
12
|
pitchBar,
|
|
13
13
|
shopHeader: { categories, ...shopHeader },
|
|
14
14
|
} = await usePageHeader({ routeContext });
|
|
15
|
+
const { inlineClientJS } = useSharedData({
|
|
16
|
+
field: 'categories',
|
|
17
|
+
value: categories?.map(({ _id, ...c }) => c),
|
|
18
|
+
});
|
|
15
19
|
---
|
|
16
20
|
|
|
17
21
|
<slot name="pitch-bar">
|
|
18
22
|
{pitchBar.slides.length > 1 && <PitchBar {...pitchBar} client:idle />}
|
|
19
23
|
{pitchBar.slides.length === 1 && <PitchBar {...pitchBar} />}
|
|
20
24
|
</slot>
|
|
21
|
-
<
|
|
25
|
+
<script is:inline set:html={inlineClientJS} />
|
|
22
26
|
<ShopHeader {...shopHeader} client:load>
|
|
23
27
|
<Fragment slot="logo">
|
|
24
|
-
<a href="/">
|
|
25
|
-
<LogoHeading>
|
|
28
|
+
<a href="/" class="inline-block">
|
|
29
|
+
<LogoHeading class="inline-block">
|
|
26
30
|
<Picture
|
|
27
31
|
slot="logo-picture"
|
|
28
32
|
src={settings.logo}
|
|
29
33
|
alt={settings.name}
|
|
30
|
-
widths={[
|
|
34
|
+
widths={[280, 400]}
|
|
31
35
|
fetchpriority="high"
|
|
32
36
|
loading="eager"
|
|
33
|
-
class="hover:drop-shadow-sm max-w-[
|
|
37
|
+
class="hover:drop-shadow-sm max-w-[140px] md:max-w-[200px] mx-auto md:mx-none"
|
|
34
38
|
/>
|
|
35
39
|
</LogoHeading>
|
|
36
40
|
</a>
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.22.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.22.
|
|
20
|
-
"@cloudcommerce/modules": "^0.22.
|
|
18
|
+
"@cloudcommerce/events": "^0.22.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.22.3",
|
|
20
|
+
"@cloudcommerce/modules": "^0.22.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"trigger": "64bffc6b5e6069037072e98d",
|
|
3
|
+
"resource": "products",
|
|
4
|
+
"slug": "fita_led_verde_5050_1_metros,kit_20_luminaria_plafon_25w_led_embutir_branco_frio,luminaria_arandela_led_8w_sobrepor_branco_quente_preto,luminaria_arandela_led_18w_interna_branco_quente,kit_5_lampada_led_dicroica_65w_gu10_branco_quente_or_inmetro,kit_10_luminaria_arandela_led_5w_sobrepor_tartaruga_branco_quente_preto,kit_20_5050_smd_modulo_3led_impermeavel_12v_branco_frio"
|
|
5
|
+
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.22.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.22.
|
|
20
|
-
"@cloudcommerce/passport": "^0.22.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.22.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.22.3",
|
|
20
|
+
"@cloudcommerce/passport": "^0.22.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.22.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.22.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.22.
|
|
20
|
+
"@cloudcommerce/api": "^0.22.3",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.22.3",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.22.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@cloudcommerce/i18n": "^0.22.
|
|
26
|
-
"@cloudcommerce/storefront": "^0.22.
|
|
27
|
-
"@cloudcommerce/types": "^0.22.
|
|
25
|
+
"@cloudcommerce/i18n": "^0.22.3",
|
|
26
|
+
"@cloudcommerce/storefront": "^0.22.3",
|
|
27
|
+
"@cloudcommerce/types": "^0.22.3",
|
|
28
28
|
"@fontsource-variable/heebo": "^5.0.5",
|
|
29
29
|
"@iconify-json/carbon": "^1.1.18"
|
|
30
30
|
}
|
|
@@ -34,11 +34,7 @@
|
|
|
34
34
|
<i class="i-magnifying-glass w-7 h-7
|
|
35
35
|
hover:text-primary hover:scale-110 active:scale-125"></i>
|
|
36
36
|
</button>
|
|
37
|
-
<AccountMenu
|
|
38
|
-
class="hidden sm:block"
|
|
39
|
-
:aria-label="$t.i19myAccount"
|
|
40
|
-
:service-links="serviceLinks"
|
|
41
|
-
>
|
|
37
|
+
<AccountMenu :service-links="serviceLinks" class="hidden sm:block">
|
|
42
38
|
<template #button="{ open }">
|
|
43
39
|
<i
|
|
44
40
|
class="i-user-circle w-7 h-7
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import usePageHeader from '@@sf/layouts/use-page-header';
|
|
3
|
-
import
|
|
3
|
+
import useSharedData from '@@sf/composables/use-shared-data';
|
|
4
4
|
import Picture from '@@sf/components/Picture.astro';
|
|
5
5
|
import PitchBar from '~/components/PitchBar.vue';
|
|
6
6
|
import ShopHeader from '~/components/ShopHeader.vue';
|
|
@@ -12,13 +12,17 @@ const {
|
|
|
12
12
|
pitchBar,
|
|
13
13
|
shopHeader: { categories, ...shopHeader },
|
|
14
14
|
} = await usePageHeader({ routeContext });
|
|
15
|
+
const { inlineClientJS } = useSharedData({
|
|
16
|
+
field: 'categories',
|
|
17
|
+
value: categories?.map(({ _id, ...c }) => c),
|
|
18
|
+
});
|
|
15
19
|
---
|
|
16
20
|
|
|
17
21
|
<slot name="pitch-bar">
|
|
18
22
|
{pitchBar.slides.length > 1 && <PitchBar {...pitchBar} client:idle />}
|
|
19
23
|
{pitchBar.slides.length === 1 && <PitchBar {...pitchBar} />}
|
|
20
24
|
</slot>
|
|
21
|
-
<
|
|
25
|
+
<script is:inline set:html={inlineClientJS} />
|
|
22
26
|
<ShopHeader {...shopHeader} client:load>
|
|
23
27
|
<Fragment slot="logo">
|
|
24
28
|
<a href="/">
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.22.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.22.
|
|
20
|
-
"@cloudcommerce/modules": "^0.22.
|
|
18
|
+
"@cloudcommerce/events": "^0.22.3",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.22.3",
|
|
20
|
+
"@cloudcommerce/modules": "^0.22.3"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.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,22 +19,18 @@
|
|
|
19
19
|
"@commitlint/cli": "^17.6.7",
|
|
20
20
|
"@commitlint/config-conventional": "^17.6.7",
|
|
21
21
|
"@commitlint/rules": "^17.6.7",
|
|
22
|
-
"@types/node": "^18.17.
|
|
23
|
-
"
|
|
24
|
-
"@typescript-eslint/parser": "^6.1.0",
|
|
25
|
-
"eslint": "^8.45.0",
|
|
26
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
27
|
-
"eslint-plugin-import": "^2.27.5",
|
|
28
|
-
"eslint-plugin-vue": "^9.15.1",
|
|
22
|
+
"@types/node": "^18.17.1",
|
|
23
|
+
"eslint": "^8.46.0",
|
|
29
24
|
"husky": "^8.0.3",
|
|
30
25
|
"standard-version": "^9.5.0",
|
|
31
26
|
"ts-node": "^10.9.1",
|
|
32
|
-
"turbo": "^1.10.
|
|
27
|
+
"turbo": "^1.10.12",
|
|
33
28
|
"typescript": "~5.0.4",
|
|
34
29
|
"uglify-js": "^3.17.4",
|
|
35
|
-
"vite": "^4.4.
|
|
30
|
+
"vite": "^4.4.7",
|
|
36
31
|
"vitest": "^0.33.0",
|
|
37
|
-
"zx": "^7.2.3"
|
|
32
|
+
"zx": "^7.2.3",
|
|
33
|
+
"@cloudcommerce/eslint": "0.22.4"
|
|
38
34
|
},
|
|
39
35
|
"scripts": {
|
|
40
36
|
"fix-install": "bash scripts/pre-install.sh && pnpm i",
|