cloudcommerce 2.6.0 → 2.6.2
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/.vscode/settings.json +4 -1
- package/CHANGELOG.md +18 -0
- package/ecomplus-stores/barradoce/.devcontainer/devcontainer.json +10 -4
- package/ecomplus-stores/barradoce/.vscode/settings.json +3 -0
- package/ecomplus-stores/barradoce/functions/many/package.json +3 -3
- package/ecomplus-stores/barradoce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barradoce/functions/ssr/src/components/CartSidebar.vue +11 -11
- package/ecomplus-stores/barradoce/functions/ssr/src/components/ProductDetails.vue +23 -13
- package/ecomplus-stores/barradoce/functions/ssr/src/components/SearchModal.vue +9 -6
- package/ecomplus-stores/barradoce/functions/ssr/src/components/SearchShowcase.vue +19 -17
- package/ecomplus-stores/barradoce/functions/ssr/src/components/ShippingCalculator.vue +10 -10
- package/ecomplus-stores/barradoce/functions/ssr/src/main/content/Sections.astro +3 -0
- package/ecomplus-stores/barradoce/functions/ssr/src/state/midd-search-engine.ts +19 -0
- package/ecomplus-stores/barradoce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barradoce/package.json +2 -2
- package/ecomplus-stores/barradoce/tailwind.config.cjs +5 -3
- package/package.json +2 -2
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-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 +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/mandae/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/pagarme-v5/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 +1 -1
- 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/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/lib/lib/cron-ssr-save-views.js +21 -16
- package/packages/ssr/lib/lib/cron-ssr-save-views.js.map +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/ssr/src/lib/cron-ssr-save-views.ts +27 -20
- package/packages/storefront/package.json +1 -1
- package/packages/storefront/src/lib/composables/use-search-modal.ts +3 -1
- package/packages/storefront/src/lib/composables/use-search-showcase.ts +2 -1
- package/packages/storefront/src/lib/layouts/BaseHead.astro +2 -1
- package/packages/storefront/src/lib/layouts/use-page-main.ts +9 -5
- package/packages/storefront/src/lib/state/search-engine.ts +21 -11
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/src/lib/scripts/experimental-web-ide.ts +0 -29
- package/packages/storefront/src/web-ide/webcontainer.ts +0 -104
package/.vscode/settings.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"editor.tabSize": 2,
|
|
3
|
+
"files.eol": "\n",
|
|
4
|
+
"files.insertFinalNewline": true,
|
|
2
5
|
"editor.quickSuggestions": {
|
|
3
6
|
"strings": true
|
|
4
7
|
},
|
|
@@ -16,7 +19,7 @@
|
|
|
16
19
|
"tailwindCSS.experimental.configFile": {
|
|
17
20
|
"packages/storefront/tailwind.config.cjs": "packages/**",
|
|
18
21
|
"store/functions/ssr/tailwind.config.cjs": "store/**",
|
|
19
|
-
"ecomplus-stores/
|
|
22
|
+
"ecomplus-stores/barradoce/functions/ssr/tailwind.config.cjs": "ecomplus-stores/barradoce/**"
|
|
20
23
|
},
|
|
21
24
|
"typescript.tsdk": "node_modules/typescript/lib",
|
|
22
25
|
"eslint.validate": [
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
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
|
+
### [2.6.2](https://github.com/ecomplus/cloud-commerce/compare/v2.6.1...v2.6.2) (2024-02-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **ssr:** Ensure cache refresh req is sent after CDN cache purge on cron save views ([943f001](https://github.com/ecomplus/cloud-commerce/commit/943f00128e618354b84fd203db071b6245351281))
|
|
11
|
+
|
|
12
|
+
### [2.6.1](https://github.com/ecomplus/cloud-commerce/compare/v2.6.0...v2.6.1) (2024-02-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **storefront:** Add `searchEngine` as custom prop of SSR `usePageSections` composable ([74f3078](https://github.com/ecomplus/cloud-commerce/commit/74f307807406d30a891990c5a6da44d125e8e9dc))
|
|
18
|
+
* **storefront:** Better handle search engine middlewares passing search options object ([daf2084](https://github.com/ecomplus/cloud-commerce/commit/daf2084203561402ef72493d7840c7081eabac6e))
|
|
19
|
+
* **storefront:** New optional `searchEngine` on search modal and showcase composables ([65c6e21](https://github.com/ecomplus/cloud-commerce/commit/65c6e21b3503227be2cb11d6c40558d480b0f72e))
|
|
20
|
+
* **storefront:** Only sync middlewares (no promises) for `SearchEngine` fetch ([4fa8965](https://github.com/ecomplus/cloud-commerce/commit/4fa89658c409b90203ac76f8ee54cfbefdca44a3))
|
|
21
|
+
* **storefront:** Properly support `SearchEngine` extendability with new `addMiddleware` method ([0142368](https://github.com/ecomplus/cloud-commerce/commit/01423686f3c915da63a3e476521d7cf275d67dd0))
|
|
22
|
+
|
|
5
23
|
## [2.6.0](https://github.com/ecomplus/cloud-commerce/compare/v2.5.1...v2.6.0) (2024-02-22)
|
|
6
24
|
|
|
7
25
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"postCreateCommand": "npm i && npm i --prefix=functions/ssr",
|
|
3
3
|
"waitFor": "postCreateCommand",
|
|
4
4
|
"portsAttributes": {
|
|
5
|
-
"
|
|
5
|
+
"4321": {
|
|
6
6
|
"label": "Application",
|
|
7
7
|
"onAutoForward": "openPreview"
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
"forwardPorts": [
|
|
11
|
-
|
|
11
|
+
4321
|
|
12
12
|
],
|
|
13
13
|
"postAttachCommand": {
|
|
14
14
|
"Server": "npm run dev"
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"customizations": {
|
|
17
17
|
"codespaces": {
|
|
18
18
|
"openFiles": [
|
|
19
|
-
"functions/ssr/src/
|
|
19
|
+
"functions/ssr/src/components/ShopHeader.vue",
|
|
20
|
+
"functions/ssr/src/components/ProductCard.vue"
|
|
20
21
|
]
|
|
21
22
|
},
|
|
22
23
|
"vscode": {
|
|
@@ -24,7 +25,12 @@
|
|
|
24
25
|
"astro-build.astro-vscode",
|
|
25
26
|
"vue.volar",
|
|
26
27
|
"bradlc.vscode-tailwindcss"
|
|
27
|
-
]
|
|
28
|
+
],
|
|
29
|
+
"settings": {
|
|
30
|
+
"files.autoSave": "afterDelay",
|
|
31
|
+
"files.autoSaveDelay": 5000,
|
|
32
|
+
"files.autoSaveWhenNoErrors": true
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
}
|
|
30
36
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^2.
|
|
19
|
-
"@cloudcommerce/firebase": "^2.
|
|
20
|
-
"@cloudcommerce/passport": "^2.
|
|
18
|
+
"@cloudcommerce/feeds": "^2.6.1",
|
|
19
|
+
"@cloudcommerce/firebase": "^2.6.1",
|
|
20
|
+
"@cloudcommerce/passport": "^2.6.1"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@cloudcommerce/api": "^2.
|
|
23
|
-
"@cloudcommerce/firebase": "^2.
|
|
24
|
-
"@cloudcommerce/ssr": "^2.
|
|
22
|
+
"@cloudcommerce/api": "^2.6.1",
|
|
23
|
+
"@cloudcommerce/firebase": "^2.6.1",
|
|
24
|
+
"@cloudcommerce/ssr": "^2.6.1",
|
|
25
25
|
"@headlessui/vue": "^1.7.18",
|
|
26
26
|
"micromark": "^4.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudcommerce/i18n": "^2.
|
|
30
|
-
"@cloudcommerce/storefront": "^2.
|
|
31
|
-
"@cloudcommerce/types": "^2.
|
|
29
|
+
"@cloudcommerce/i18n": "^2.6.1",
|
|
30
|
+
"@cloudcommerce/storefront": "^2.6.1",
|
|
31
|
+
"@cloudcommerce/types": "^2.6.1",
|
|
32
32
|
"@iconify-json/mingcute": "^1.1.16",
|
|
33
33
|
"photoswipe": "^5.4.3"
|
|
34
34
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<aside class="flex h-screen flex-col bg-white">
|
|
3
3
|
<header class="z-10 flex items-center justify-end gap-3
|
|
4
4
|
px-6 py-4 shadow ring-1 ring-black/5">
|
|
5
|
-
<span class="text-
|
|
5
|
+
<span class="text-right text-base font-medium text-base-600">
|
|
6
6
|
{{ $t.i19myShoppingCart }}
|
|
7
7
|
</span>
|
|
8
8
|
<span class="min-w-[3rem] text-right">
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
</span>
|
|
12
12
|
</span>
|
|
13
13
|
</header>
|
|
14
|
-
<article class="
|
|
14
|
+
<article class="grow overflow-y-auto bg-base-50">
|
|
15
15
|
<div v-if="freeShippingFromValue" class="text-center text-sm">
|
|
16
16
|
<div
|
|
17
17
|
v-if="freeShippingFromValue > shoppingCart.subtotal"
|
|
18
|
-
class="secondary-subtle
|
|
18
|
+
class="p-3 secondary-subtle"
|
|
19
19
|
>
|
|
20
20
|
{{ $t.i19add$1ToEarn.replace('$1',
|
|
21
21
|
$money(freeShippingFromValue - shoppingCart.subtotal)) }}
|
|
22
22
|
<strong class="lowercase">{{ $t.i19freeShipping }}</strong>
|
|
23
23
|
</div>
|
|
24
|
-
<div v-else class="bg-success-50 text-success-800
|
|
25
|
-
<i class="text-success-900 i-check
|
|
24
|
+
<div v-else class="bg-success-50 p-3 text-success-800">
|
|
25
|
+
<i class="mr-1 text-success-900 i-check"></i>
|
|
26
26
|
{{ $t.i19freeShippingFrom }} {{ $money(freeShippingFromValue) }}
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
<div v-if="!hasShippingCalculator" class="my-2.5 text-right">
|
|
43
43
|
<a
|
|
44
44
|
href="#"
|
|
45
|
-
class="
|
|
45
|
+
class="text-base-700 decoration-base-300 ui-link"
|
|
46
46
|
@click.prevent.stop="hasShippingCalculator = true"
|
|
47
47
|
>
|
|
48
48
|
{{ $t.i19calculateShipping }}
|
|
49
|
-
<i class="i-truck
|
|
49
|
+
<i class="ml-1 text-base-500 i-truck-line"></i>
|
|
50
50
|
</a>
|
|
51
51
|
</div>
|
|
52
52
|
<Fade slide="down">
|
|
@@ -59,17 +59,17 @@
|
|
|
59
59
|
</Fade>
|
|
60
60
|
<CheckoutLink
|
|
61
61
|
to="checkout"
|
|
62
|
-
class="
|
|
62
|
+
class="my-2.5 w-full text-right ui-btn-lg ui-btn-primary"
|
|
63
63
|
>
|
|
64
|
-
<i class="i-check
|
|
64
|
+
<i class="mr-2 i-check"></i>
|
|
65
65
|
{{ $t.i19checkout }}
|
|
66
66
|
</CheckoutLink>
|
|
67
67
|
<a
|
|
68
68
|
href="#"
|
|
69
69
|
@click.prevent="emit('close')"
|
|
70
|
-
class="text-base-500 ui-link hover:text-base-700
|
|
70
|
+
class="text-sm text-base-500 ui-link hover:text-base-700"
|
|
71
71
|
>
|
|
72
|
-
<i class="i-arrow-right-line
|
|
72
|
+
<i class="mr-1 rotate-180 i-arrow-right-line"></i>
|
|
73
73
|
{{ $t.i19continueShopping }}
|
|
74
74
|
</a>
|
|
75
75
|
</footer>
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="
|
|
3
|
-
|
|
2
|
+
<section class="relative grid grid-cols-1 items-start gap-x-5
|
|
3
|
+
ui-section lg:grid-cols-4 lg:gap-x-4 2xl:gap-x-6">
|
|
4
4
|
<div class="w-full lg:col-span-3">
|
|
5
5
|
<template v-if="product.pictures?.length">
|
|
6
6
|
<ImagesGallery :pictures="product.pictures" class="mb-5" />
|
|
7
7
|
</template>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="
|
|
10
|
-
|
|
11
|
-
<
|
|
9
|
+
<div class="top-0 pt-4 transition-transform
|
|
10
|
+
lg:sticky lg:pb-4 lg:sticky-header:translate-y-24">
|
|
11
|
+
<ul class="flax-wrap mb-3 flex gap-2">
|
|
12
|
+
<li class="flex items-center gap-1 py-1 font-normal ui-badge-pill">
|
|
13
|
+
<i class="m-0 text-secondary-700 i-arrow-path-rounded-square-16-solid"></i>
|
|
14
|
+
<span class="whitespace-nowrap text-sm">devolução grátis</span>
|
|
15
|
+
</li>
|
|
16
|
+
<li class="flex items-center gap-1 py-1 font-normal ui-badge-pill">
|
|
17
|
+
<i class="m-0 text-secondary-700 i-building-storefront-solid"></i>
|
|
18
|
+
<span class="whitespace-nowrap text-sm">desde 1984</span>
|
|
19
|
+
</li>
|
|
20
|
+
</ul>
|
|
21
|
+
<h1 class="text-lg text-base-600 ui-text-brand">
|
|
12
22
|
{{ title }}
|
|
13
23
|
</h1>
|
|
14
24
|
<div v-if="isActive" class="mt-5">
|
|
@@ -20,9 +30,9 @@
|
|
|
20
30
|
class="my-4"
|
|
21
31
|
/>
|
|
22
32
|
<Fade slide="down">
|
|
23
|
-
<div v-if="hasSkuSelectionAlert" class="ui-alert
|
|
33
|
+
<div v-if="hasSkuSelectionAlert" class="inline-block ui-alert">
|
|
24
34
|
{{ $t.i19selectVariationMsg }}
|
|
25
|
-
<i class="
|
|
35
|
+
<i class="ml-1 -rotate-90 i-arrow-right-line"></i>
|
|
26
36
|
</div>
|
|
27
37
|
</Fade>
|
|
28
38
|
<div class="mt-5 flex flex-wrap items-center gap-x-4 gap-y-2
|
|
@@ -31,11 +41,11 @@
|
|
|
31
41
|
v-model="quantity"
|
|
32
42
|
:min="product.min_quantity"
|
|
33
43
|
:max="product.quantity"
|
|
34
|
-
class="border-base-100
|
|
44
|
+
class="rounded border-base-100 md:mr-5
|
|
35
45
|
lg:mb-2 lg:mr-auto lg:border-2"
|
|
36
46
|
/>
|
|
37
47
|
<CheckoutLink
|
|
38
|
-
class="ui-btn-lg ui-btn-primary
|
|
48
|
+
class="grow text-center ui-btn-lg ui-btn-primary"
|
|
39
49
|
to="checkout"
|
|
40
50
|
:cart-item="{
|
|
41
51
|
product_id: product._id,
|
|
@@ -45,19 +55,19 @@
|
|
|
45
55
|
:data-tooltip="!isSkuSelected ? $t.i19chooseProductDetailsToBuy : null"
|
|
46
56
|
@click="checkVariation"
|
|
47
57
|
>
|
|
48
|
-
<i class="i-chevron-double-right
|
|
58
|
+
<i class="mr-1 i-chevron-double-right"></i>
|
|
49
59
|
{{ $t.i19buy }}
|
|
50
60
|
</CheckoutLink>
|
|
51
61
|
<button
|
|
52
|
-
class="ui-btn-lg ui-btn-contrast
|
|
62
|
+
class="grow ui-btn-lg ui-btn-contrast"
|
|
53
63
|
@click.prevent="addToCart"
|
|
54
64
|
:data-tooltip="!isSkuSelected ? $t.i19chooseProductDetailsToBuy : null"
|
|
55
65
|
>
|
|
56
66
|
{{ $t.i19addToCart }}
|
|
57
67
|
</button>
|
|
58
68
|
</div>
|
|
59
|
-
<div class="
|
|
60
|
-
|
|
69
|
+
<div class="mt-6 rounded border-2
|
|
70
|
+
border-base-50 border-t-secondary-100 p-4 lg:mt-4">
|
|
61
71
|
<ShippingCalculator
|
|
62
72
|
:shipped-items="[{ ...product, quantity }]"
|
|
63
73
|
has-label
|
|
@@ -36,21 +36,21 @@
|
|
|
36
36
|
<section
|
|
37
37
|
v-if="!isFetching
|
|
38
38
|
&& (searchHistory.length || productCount > products.length)"
|
|
39
|
-
class="
|
|
40
|
-
|
|
39
|
+
class="grid grid-cols-1 items-center gap-4
|
|
40
|
+
bg-base-100/80 p-4 backdrop-blur-md
|
|
41
41
|
md:grid-cols-2 md:rounded-b lg:mt-5 lg:grid-cols-3 lg:rounded"
|
|
42
42
|
>
|
|
43
43
|
<div class="flex items-center justify-end gap-4 md:order-2">
|
|
44
44
|
<p
|
|
45
45
|
v-if="productCount > 1"
|
|
46
|
-
class="text-
|
|
46
|
+
class="text-right text-sm lowercase text-base-900"
|
|
47
47
|
>
|
|
48
48
|
<strong>{{ productCount }}</strong> {{ $t.i19itemsFound }}
|
|
49
49
|
</p>
|
|
50
50
|
<a
|
|
51
51
|
v-if="productCount > products.length"
|
|
52
52
|
:href="getSearchUrl(term)"
|
|
53
|
-
class="
|
|
53
|
+
class="w-auto whitespace-nowrap text-center ui-btn ui-btn-primary"
|
|
54
54
|
>
|
|
55
55
|
{{ $t.i19seeAll }}
|
|
56
56
|
</a>
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
>
|
|
66
66
|
<a
|
|
67
67
|
:href="getSearchUrl(term)"
|
|
68
|
-
class="text-base-700 ui-link
|
|
68
|
+
class="text-sm font-normal text-base-700 ui-link"
|
|
69
69
|
>
|
|
70
70
|
{{ term }}
|
|
71
71
|
</a>
|
|
72
72
|
</li>
|
|
73
73
|
<template #previous>
|
|
74
|
-
<i class="i-clock
|
|
74
|
+
<i class="m-0 i-clock" :aria-label="$t.i19searchAgain"></i>
|
|
75
75
|
</template>
|
|
76
76
|
</Carousel>
|
|
77
77
|
</nav>
|
|
@@ -88,15 +88,18 @@ import {
|
|
|
88
88
|
} from '@@sf/composables/use-search-modal';
|
|
89
89
|
import { getSearchUrl } from '@@sf/sf-lib';
|
|
90
90
|
import ProductShelf from '~/components/ProductShelf.vue';
|
|
91
|
+
import middSearchEngine from '~/state/midd-search-engine';
|
|
91
92
|
|
|
92
93
|
export interface Props extends UseSearchModalProps {}
|
|
93
94
|
|
|
94
95
|
const props = defineProps<Props>();
|
|
95
96
|
const {
|
|
96
97
|
searchHistory,
|
|
98
|
+
searchEngine,
|
|
97
99
|
isFetching,
|
|
98
100
|
products,
|
|
99
101
|
productCount,
|
|
100
102
|
linkHits,
|
|
101
103
|
} = useSearchModal(props);
|
|
104
|
+
middSearchEngine(searchEngine);
|
|
102
105
|
</script>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section
|
|
3
3
|
v-if="searchTerm"
|
|
4
|
-
class="
|
|
4
|
+
class="px-6 text-center text-xl lowercase text-base-700 ui-section-slim"
|
|
5
5
|
:class="hasFiltersBar ? 'relative z-[14] -mb-4' : 'mb-0'"
|
|
6
6
|
>
|
|
7
7
|
{{ $t.i19searchingFor }}
|
|
8
|
-
<h1 class="
|
|
8
|
+
<h1 class="inline font-bold italic text-base-800">
|
|
9
9
|
{{ searchTerm }}
|
|
10
10
|
</h1>
|
|
11
11
|
</section>
|
|
12
12
|
<div
|
|
13
13
|
v-if="isFetching && !products.length"
|
|
14
|
-
class="
|
|
14
|
+
class="relative min-h-[300px] ui-section"
|
|
15
15
|
>
|
|
16
16
|
<Skeleton class="absolute top-0 w-full px-5" is-bold is-large />
|
|
17
17
|
</div>
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<Fade>
|
|
20
20
|
<section
|
|
21
21
|
v-if="hasFiltersBar"
|
|
22
|
-
class="
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
class="sticky top-0 z-[12]
|
|
23
|
+
flex items-center justify-between
|
|
24
|
+
rounded-b bg-white/80 to-base-100 px-6
|
|
25
|
+
py-4 shadow-sm backdrop-blur-sm transition-transform ui-section-slim
|
|
26
|
+
sticky-header:translate-y-16 lg:sticky-header:translate-y-24"
|
|
27
27
|
>
|
|
28
|
-
<strong class="text-base-700
|
|
28
|
+
<strong class="font-medium lowercase text-base-700">
|
|
29
29
|
<template v-if="resultMeta.count > 1">
|
|
30
30
|
{{ resultMeta.count }}
|
|
31
31
|
<span class="hidden lg:inline">{{ $t.i19itemsFound }}</span>
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
</strong>
|
|
35
35
|
<div class="flex items-center gap-4">
|
|
36
36
|
<span class="hidden text-xl leading-none md:block">
|
|
37
|
-
<i class="text-base-600 i-adjustments-horizontal
|
|
37
|
+
<i class="m-0 text-base-600 i-adjustments-horizontal"></i>
|
|
38
38
|
</span>
|
|
39
39
|
<button
|
|
40
40
|
@click="isFiltersOpen = !isFiltersOpen"
|
|
41
|
-
class="ui-btn-sm ui-btn-secondary
|
|
41
|
+
class="relative ui-btn-sm ui-btn-secondary"
|
|
42
42
|
>
|
|
43
43
|
<span class="hidden md:inline">
|
|
44
44
|
{{ $t.i19filterProducts }}
|
|
45
45
|
</span>
|
|
46
46
|
<span class="md:hidden">
|
|
47
|
-
<i class="i-adjustments-horizontal
|
|
47
|
+
<i class="mr-1 i-adjustments-horizontal"></i>
|
|
48
48
|
{{ $t.i19filterOut }}
|
|
49
49
|
</span>
|
|
50
50
|
<span
|
|
51
51
|
v-if="filtersCount"
|
|
52
|
-
class="outline-3
|
|
53
|
-
|
|
52
|
+
class="outline-3 absolute -right-1.5
|
|
53
|
+
-top-1 outline outline-secondary/80 ui-badge-pill-sm"
|
|
54
54
|
>
|
|
55
55
|
{{ filtersCount }}
|
|
56
56
|
</span>
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
<Listbox
|
|
59
59
|
v-model="sortOption"
|
|
60
60
|
as="div"
|
|
61
|
-
class="text-base-800
|
|
61
|
+
class="relative text-sm text-base-800"
|
|
62
62
|
>
|
|
63
63
|
<ListboxButton :id="$useId('ss')" class="ui-btn-sm ui-btn-secondary">
|
|
64
64
|
{{ $t.i19sort }}
|
|
65
65
|
</ListboxButton>
|
|
66
66
|
<Fade>
|
|
67
|
-
<ListboxOptions class="
|
|
68
|
-
|
|
67
|
+
<ListboxOptions class="absolute
|
|
68
|
+
right-0 mt-2 divide-y divide-base-100 rounded bg-white
|
|
69
69
|
shadow ring-1 ring-black/5 focus:outline-none">
|
|
70
70
|
<ListboxOption
|
|
71
71
|
v-for="({ label, value }) in sortOptions"
|
|
@@ -139,6 +139,7 @@ import Drawer from '@@sf/components/Drawer.vue';
|
|
|
139
139
|
import Pagination from '~/components/Pagination.vue';
|
|
140
140
|
import ProductShelf from '~/components/ProductShelf.vue';
|
|
141
141
|
import SearchFilters from '~/components/SearchFilters.vue';
|
|
142
|
+
import middSearchEngine from '~/state/midd-search-engine';
|
|
142
143
|
|
|
143
144
|
export interface Props extends UseSearchShowcaseProps {}
|
|
144
145
|
|
|
@@ -157,6 +158,7 @@ const {
|
|
|
157
158
|
sortOptions,
|
|
158
159
|
sortOption,
|
|
159
160
|
} = useSearchShowcase({ ...props, showcase });
|
|
161
|
+
middSearchEngine(searchEngine);
|
|
160
162
|
if (import.meta.env.SSR) {
|
|
161
163
|
await fetching;
|
|
162
164
|
}
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
<ALink
|
|
15
15
|
v-if="hasLabel && $settings.countryCode === 'BR'"
|
|
16
16
|
href="https://buscacepinter.correios.com.br/app/endereco/index.php"
|
|
17
|
-
class="
|
|
17
|
+
class="text-xs font-normal text-base-500 ui-link"
|
|
18
18
|
>
|
|
19
19
|
Não sei meu CEP
|
|
20
|
-
<i class="i-arrow-top-right-on-square
|
|
20
|
+
<i class="mr-1 opacity-50 i-arrow-top-right-on-square"></i>
|
|
21
21
|
</ALink>
|
|
22
22
|
</label>
|
|
23
23
|
<div class="relative max-w-52">
|
|
@@ -32,28 +32,28 @@
|
|
|
32
32
|
:class="isFetching && 'bg-base-50'"
|
|
33
33
|
/>
|
|
34
34
|
<button
|
|
35
|
-
class="
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
class="absolute inset-y-0 end-0 grid w-12
|
|
36
|
+
place-content-center text-xl
|
|
37
|
+
hover:text-primary group-focus-within:text-primary"
|
|
38
38
|
:class="isMounted && !shippingServices.length && zipCode.length > 1
|
|
39
|
-
? 'text-primary' : 'text-base-600'"
|
|
39
|
+
? 'text-primary' : `${hasLabel ? 'text-base-400' : 'text-base-600'}`"
|
|
40
40
|
:aria-label="$t.i19calculateShipping"
|
|
41
41
|
>
|
|
42
42
|
<Spinner v-if="isFetching" class="size-5" />
|
|
43
|
-
<i v-else class="i-truck"></i>
|
|
43
|
+
<i v-else class="m-0 i-truck-line"></i>
|
|
44
44
|
</button>
|
|
45
45
|
</div>
|
|
46
46
|
</form>
|
|
47
47
|
<Fade slide="down">
|
|
48
48
|
<ul
|
|
49
49
|
v-if="!isFetching && shippingServices.length"
|
|
50
|
-
class="
|
|
51
|
-
|
|
50
|
+
class="mt-2 grow divide-y divide-base-200
|
|
51
|
+
rounded border border-base-100 bg-base-50/50 px-3 py-1"
|
|
52
52
|
>
|
|
53
53
|
<li
|
|
54
54
|
v-for="({ label, shipping_line: shipping }, i) in shippingServices"
|
|
55
55
|
:key="`${zipCode}-${i}`"
|
|
56
|
-
class="text-base-800
|
|
56
|
+
class="py-2.5 text-base-800 md:text-sm"
|
|
57
57
|
>
|
|
58
58
|
<div class="flex flex-wrap items-center">
|
|
59
59
|
<div class="grow">
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { usePageSections } from '@@sf/layouts/use-page-main';
|
|
3
|
+
import { SearchEngine } from '@@sf/state/search-engine';
|
|
3
4
|
import ContentClearfix from '@@sf/components/ContentClearfix.vue';
|
|
4
5
|
import BannersGrid from '~/components/BannersGrid.astro';
|
|
5
6
|
import Breadcrumbs from '~/components/Breadcrumbs.vue';
|
|
@@ -11,6 +12,7 @@ import ProductSpecifications from '~/components/ProductSpecifications.vue';
|
|
|
11
12
|
import SearchShowcase from '~/components/SearchShowcase.vue';
|
|
12
13
|
import PageTitle from '~/components/PageTitle.vue';
|
|
13
14
|
import ContentEntry from '~/components/ContentEntry.vue';
|
|
15
|
+
import middSearchEngine from '~/state/midd-search-engine';
|
|
14
16
|
|
|
15
17
|
const { routeContext } = Astro.locals;
|
|
16
18
|
const { sections } = await usePageSections({
|
|
@@ -19,6 +21,7 @@ const { sections } = await usePageSections({
|
|
|
19
21
|
if (type === 'c:foo') return { props: { ...content, foo: 'bar' } };
|
|
20
22
|
return { props: content };
|
|
21
23
|
},
|
|
24
|
+
searchEngine: middSearchEngine(new SearchEngine()),
|
|
22
25
|
});
|
|
23
26
|
const { cmsContent } = routeContext;
|
|
24
27
|
/* `apiContext` is surelly set here (from Main.astro)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SearchEngineInstance } from '@@sf/state/search-engine';
|
|
2
|
+
|
|
3
|
+
export default (searchEngine: SearchEngineInstance) => {
|
|
4
|
+
searchEngine.addMiddleware((searchOptions) => {
|
|
5
|
+
if (!searchOptions.term) return;
|
|
6
|
+
if (!searchOptions.params) searchOptions.params = {};
|
|
7
|
+
let { sort } = searchOptions.params;
|
|
8
|
+
if (
|
|
9
|
+
(typeof sort === 'string' || typeof sort === 'object')
|
|
10
|
+
&& (sort as string[]).includes('-available')
|
|
11
|
+
) return;
|
|
12
|
+
searchOptions.params.sort = '-available,-in_stock';
|
|
13
|
+
if (sort) {
|
|
14
|
+
if (Array.isArray(sort)) sort = sort.join(',');
|
|
15
|
+
searchOptions.params.sort += `,${sort}`;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return searchEngine;
|
|
19
|
+
};
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^2.
|
|
19
|
-
"@cloudcommerce/firebase": "^2.
|
|
20
|
-
"@cloudcommerce/modules": "^2.
|
|
18
|
+
"@cloudcommerce/events": "^2.6.1",
|
|
19
|
+
"@cloudcommerce/firebase": "^2.6.1",
|
|
20
|
+
"@cloudcommerce/modules": "^2.6.1"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@cloudcommerce/cli": "^2.
|
|
29
|
+
"@cloudcommerce/cli": "^2.6.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@cloudcommerce/eslint": "^2.
|
|
32
|
+
"@cloudcommerce/eslint": "^2.6.1",
|
|
33
33
|
"husky": "^9.0.10",
|
|
34
34
|
"lint-staged": "^15.2.2"
|
|
35
35
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
const { join: joinPath } = require('node:path');
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
process.env.STOREFRONT_BASE_DIR = joinPath(__dirname, './functions/ssr');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const tailwindConfig = require('./functions/ssr/tailwind.config.cjs');
|
|
6
|
+
|
|
7
|
+
module.exports = tailwindConfig;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.2",
|
|
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>",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"vite": "^5.0.11",
|
|
37
37
|
"vitest": "^1.3.0",
|
|
38
38
|
"zx": "^7.2.3",
|
|
39
|
-
"@cloudcommerce/eslint": "2.6.
|
|
39
|
+
"@cloudcommerce/eslint": "2.6.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"fix-install": "bash scripts/pre-install.sh && pnpm i",
|