cloudcommerce 2.2.0 → 2.2.1
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-apps.yml +2 -2
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -3
- package/CHANGELOG.md +9 -0
- package/action.yml +3 -3
- package/ecomplus-stores/barra-doce/.husky/pre-commit +0 -3
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/brands.json +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/categories.json +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +2 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PageTitle.vue +26 -17
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +4 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchShowcase.vue +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/blog/[page].astro +6 -5
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +4 -4
- package/package.json +10 -10
- package/packages/api/package.json +1 -1
- package/packages/apps/affiliate-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 +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 +1 -1
- 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 +1 -1
- package/packages/apps/mandae/package.json +2 -2
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/pagarme-v5/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/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +2 -2
- package/packages/eslint/package.json +2 -2
- 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 +2 -2
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +4 -4
- package/packages/storefront/package.json +7 -7
- package/packages/storefront/src/lib/composables/use-search-showcase.ts +34 -8
- package/packages/storefront/src/lib/state/search-engine.ts +7 -2
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
|
@@ -104,11 +104,11 @@ jobs:
|
|
|
104
104
|
${{ steps.npm-paths.outputs.LIB_PATH }}
|
|
105
105
|
${{ steps.npm-paths.outputs.BIN_PATH }}
|
|
106
106
|
~/.npm-global/bin
|
|
107
|
-
key: ${{ runner.os }}-npm-globals-firebase-tools-13.0
|
|
107
|
+
key: ${{ runner.os }}-npm-globals-firebase-tools-13.1.0
|
|
108
108
|
|
|
109
109
|
- if: steps.npm-g-cache.outputs.cache-hit != 'true'
|
|
110
110
|
shell: bash
|
|
111
|
-
run: npm install -g firebase-tools@13.0
|
|
111
|
+
run: npm install -g firebase-tools@13.1.0
|
|
112
112
|
|
|
113
113
|
- name: Initialize Firebase emulators
|
|
114
114
|
shell: bash
|
package/.husky/commit-msg
CHANGED
package/.husky/pre-commit
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.2.1](https://github.com/ecomplus/cloud-commerce/compare/v2.2.0...v2.2.1) (2024-01-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **storefront:** Fix `useSearchShowcase` to ensure URL params respected on initial (maybe) fetch ([1ecc3df](https://github.com/ecomplus/cloud-commerce/commit/1ecc3dfd2973c22e4186d37ee05cc266f5a56e31))
|
|
11
|
+
* **storefront:** New optional `pageSize` prop to search showcase compsable ([5b3fa04](https://github.com/ecomplus/cloud-commerce/commit/5b3fa04d837a4d54488ca7cc4e3b78131c0589b3))
|
|
12
|
+
* **storefront:** Update Astro to latest v4.2.6 ([#312](https://github.com/ecomplus/cloud-commerce/issues/312)) ([76ddf9a](https://github.com/ecomplus/cloud-commerce/commit/76ddf9ab17fc6bd31c674b580c185747260fc17f))
|
|
13
|
+
|
|
5
14
|
## [2.2.0](https://github.com/ecomplus/cloud-commerce/compare/v2.1.0...v2.2.0) (2024-01-28)
|
|
6
15
|
|
|
7
16
|
|
package/action.yml
CHANGED
|
@@ -153,11 +153,11 @@ runs:
|
|
|
153
153
|
${{ steps.npm-paths.outputs.LIB_PATH }}
|
|
154
154
|
${{ steps.npm-paths.outputs.BIN_PATH }}
|
|
155
155
|
~/.npm-global/bin
|
|
156
|
-
key: ${{ runner.os }}-npm-g-firebase-tools-13.0
|
|
156
|
+
key: ${{ runner.os }}-npm-g-firebase-tools-13.1.0
|
|
157
157
|
|
|
158
158
|
- if: github.event_name == 'push' && steps.npm-g-cache.outputs.cache-hit != 'true'
|
|
159
159
|
shell: bash
|
|
160
|
-
run: npm i --location=global firebase-tools@13.0
|
|
160
|
+
run: npm i --location=global firebase-tools@13.1.0
|
|
161
161
|
|
|
162
162
|
- if: steps.npm-cache-many.outputs.cache-hit != 'true'
|
|
163
163
|
name: Install codebase "many" dependencies
|
|
@@ -186,7 +186,7 @@ runs:
|
|
|
186
186
|
echo "ecom_store_id=${ECOM_STORE_ID:-$(cat config.json | jq -r '.storeId')}" >> $GITHUB_ENV
|
|
187
187
|
echo "git_branch=${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" >> $GITHUB_ENV
|
|
188
188
|
|
|
189
|
-
- uses: dorny/paths-filter@
|
|
189
|
+
- uses: dorny/paths-filter@v3.0.0
|
|
190
190
|
id: changes
|
|
191
191
|
with:
|
|
192
192
|
filters: |
|
|
@@ -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.2.0",
|
|
19
|
+
"@cloudcommerce/firebase": "^2.2.0",
|
|
20
|
+
"@cloudcommerce/passport": "^2.2.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"main": "index.js",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@cloudcommerce/api": "^2.
|
|
22
|
-
"@cloudcommerce/firebase": "^2.
|
|
23
|
-
"@cloudcommerce/ssr": "^2.
|
|
21
|
+
"@cloudcommerce/api": "^2.2.0",
|
|
22
|
+
"@cloudcommerce/firebase": "^2.2.0",
|
|
23
|
+
"@cloudcommerce/ssr": "^2.2.0",
|
|
24
24
|
"@headlessui/vue": "^1.7.17"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@cloudcommerce/i18n": "^2.
|
|
28
|
-
"@cloudcommerce/storefront": "^2.
|
|
29
|
-
"@cloudcommerce/types": "^2.
|
|
27
|
+
"@cloudcommerce/i18n": "^2.2.0",
|
|
28
|
+
"@cloudcommerce/storefront": "^2.2.0",
|
|
29
|
+
"@cloudcommerce/types": "^2.2.0",
|
|
30
30
|
"@iconify-json/mingcute": "^1.1.15",
|
|
31
31
|
"photoswipe": "^5.4.3"
|
|
32
32
|
}
|
|
@@ -36,7 +36,7 @@ a, button, button > *, [role=button], [role=button] > * {
|
|
|
36
36
|
ring-primary/30;
|
|
37
37
|
}
|
|
38
38
|
.ui-btn-secondary {
|
|
39
|
-
@apply bg-secondary-100/50 text-secondary border-secondary
|
|
39
|
+
@apply bg-secondary-100/50 text-secondary-700 border-secondary
|
|
40
40
|
hover:primary ring-secondary/30;
|
|
41
41
|
}
|
|
42
42
|
.ui-btn-contrast {
|
|
@@ -54,7 +54,7 @@ a, button, button > *, [role=button], [role=button] > * {
|
|
|
54
54
|
@apply font-brand font-extrabold not-italic;
|
|
55
55
|
}
|
|
56
56
|
.ui-title {
|
|
57
|
-
@apply text-3xl xl:text-5xl;
|
|
57
|
+
@apply text-3xl xl:text-5xl text-balance;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
[class*=ui-badge] {
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class="
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
<section
|
|
3
|
+
v-if="title"
|
|
4
|
+
class="from-secondary-50/20 to-secondary-100 bg-gradient-to-br py-2"
|
|
5
|
+
>
|
|
6
|
+
<article class="ui-section">
|
|
7
|
+
<div class="prose mx-auto">
|
|
8
|
+
<div class="not-prose flex items-center gap-4 md:justify-center">
|
|
9
|
+
<AImg
|
|
10
|
+
v-if="logo"
|
|
11
|
+
:picture="logo"
|
|
12
|
+
:alt="logo.alt || title"
|
|
13
|
+
class="h-auto max-w-[150px] xl:max-w-[200px]"
|
|
14
|
+
/>
|
|
15
|
+
<h1 class="ui-title from-secondary-600 to-secondary-700 bg-gradient-to-br
|
|
16
|
+
bg-clip-text text-center text-transparent">
|
|
17
|
+
{{ title }}
|
|
18
|
+
</h1>
|
|
19
|
+
</div>
|
|
20
|
+
<p
|
|
21
|
+
v-if="description"
|
|
22
|
+
:class="description.length < 120 && 'md:text-center'"
|
|
23
|
+
>
|
|
24
|
+
{{ description }}
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
27
|
+
</article>
|
|
19
28
|
</section>
|
|
20
29
|
</template>
|
|
21
30
|
|
|
@@ -36,11 +36,10 @@
|
|
|
36
36
|
</div>
|
|
37
37
|
<span
|
|
38
38
|
v-if="discountPercentage"
|
|
39
|
-
class=":uno:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
group-hover:translate-x-2 group-hover:scale-110"
|
|
39
|
+
class=":uno: absolute right-2
|
|
40
|
+
top-9 rounded-full bg-gradient-to-bl from-fuchsia-100
|
|
41
|
+
to-fuchsia-100/20 px-2 py-0.5
|
|
42
|
+
text-xs text-fuchsia-900 transition-transform"
|
|
44
43
|
>
|
|
45
44
|
-<strong>{{ discountPercentage }}</strong>%
|
|
46
45
|
</span>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<ImagesGallery :pictures="product.pictures" />
|
|
7
7
|
</template>
|
|
8
8
|
</div>
|
|
9
|
-
<div class="lg:sticky-header:translate-y-
|
|
9
|
+
<div class="lg:sticky-header:translate-y-24 top-0 py-4
|
|
10
10
|
transition-transform lg:sticky">
|
|
11
11
|
<h1 class="text-secondary-900 ui-text-brand text-lg">
|
|
12
12
|
{{ title }}
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
<Fade>
|
|
20
20
|
<section
|
|
21
21
|
v-if="hasFiltersBar"
|
|
22
|
-
class="to-base-100 ui-section-slim sticky-header:translate-y-16
|
|
22
|
+
class="to-base-100 ui-section-slim sticky-header:translate-y-16
|
|
23
|
+
lg:sticky-header:translate-y-24 sticky top-0
|
|
23
24
|
z-[12] flex items-center justify-between
|
|
24
25
|
rounded-b bg-white/80 px-6 py-4 shadow-sm
|
|
25
26
|
backdrop-blur-sm transition-transform"
|
|
@@ -65,13 +65,13 @@ export async function getStaticPaths() {
|
|
|
65
65
|
|
|
66
66
|
<!DOCTYPE html>
|
|
67
67
|
<html lang={routeContext?.lang.replace('_', '-')}>
|
|
68
|
-
{routeContext
|
|
69
|
-
|
|
68
|
+
{routeContext && <>
|
|
69
|
+
<Base>
|
|
70
70
|
<BaseHead slot="base-head" />
|
|
71
71
|
<PageHeader />
|
|
72
72
|
<Main />
|
|
73
73
|
<PageFooter />
|
|
74
74
|
</Base>
|
|
75
|
-
}
|
|
75
|
+
</>}
|
|
76
76
|
{loadError && <Fragment set:html={loadError.responseHTML} />}
|
|
77
77
|
</html>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { type RouteContext, loadRouteContext } from '@@sf/ssr-context';
|
|
3
3
|
import BaseHead from '@@sf/layouts/BaseHead.astro';
|
|
4
|
+
import { POSTS_PER_PAGE, countBlogPages } from './_blog-pages';
|
|
4
5
|
import Base from '~/layouts/Base.astro';
|
|
5
6
|
import PageHeader from '~/layouts/PageHeader.astro';
|
|
6
7
|
import PageFooter from '~/layouts/PageFooter.astro';
|
|
7
8
|
import BlogPosts, { type Props as BlogPostsProps } from '~/components/BlogPosts.vue';
|
|
8
|
-
import { POSTS_PER_PAGE, countBlogPages } from './_blog-pages';
|
|
9
9
|
|
|
10
10
|
let routeContext: RouteContext | undefined;
|
|
11
11
|
let loadError: any;
|
|
@@ -33,8 +33,9 @@ await Promise.all(
|
|
|
33
33
|
return new Promise((resolve) => {
|
|
34
34
|
getContent(`blog/${slug}`).then((content) => {
|
|
35
35
|
if (content) {
|
|
36
|
-
const {
|
|
37
|
-
|
|
36
|
+
const post = { ...content, slug };
|
|
37
|
+
delete post.markdown;
|
|
38
|
+
posts.push(post);
|
|
38
39
|
}
|
|
39
40
|
resolve(null);
|
|
40
41
|
});
|
|
@@ -53,7 +54,7 @@ export async function getStaticPaths() {
|
|
|
53
54
|
|
|
54
55
|
<!DOCTYPE html>
|
|
55
56
|
<html lang={routeContext.lang.replace('_', '-')}>
|
|
56
|
-
{routeContext &&
|
|
57
|
+
{routeContext && <>
|
|
57
58
|
<Base {metaTitle}>
|
|
58
59
|
<Fragment slot="base-head">
|
|
59
60
|
<BaseHead />
|
|
@@ -66,6 +67,6 @@ export async function getStaticPaths() {
|
|
|
66
67
|
</main>
|
|
67
68
|
<PageFooter />
|
|
68
69
|
</Base>
|
|
69
|
-
}
|
|
70
|
+
</>}
|
|
70
71
|
{loadError && <Fragment set:html={loadError.responseHTML} />}
|
|
71
72
|
</html>
|
|
@@ -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.2.0",
|
|
19
|
+
"@cloudcommerce/firebase": "^2.2.0",
|
|
20
|
+
"@cloudcommerce/modules": "^2.2.0"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"login": "cloudcommerce login",
|
|
16
16
|
"setup": "bash scripts/install.sh && cloudcommerce setup",
|
|
17
17
|
"setup:quiet": "cloudcommerce setup --no-deploy --no-commit",
|
|
18
|
-
"prepare": "husky
|
|
18
|
+
"prepare": "husky"
|
|
19
19
|
},
|
|
20
20
|
"lint-staged": {
|
|
21
21
|
"functions/ssr/**/*.{ts,vue,astro}": "eslint -c ./functions/ssr/.staged.eslintrc.cjs --fix",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@cloudcommerce/cli": "^2.
|
|
29
|
+
"@cloudcommerce/cli": "^2.2.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@cloudcommerce/eslint": "^2.
|
|
33
|
-
"husky": "^
|
|
32
|
+
"@cloudcommerce/eslint": "^2.2.0",
|
|
33
|
+
"husky": "^9.0.7",
|
|
34
34
|
"lint-staged": "^15.2.0"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcommerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
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>",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"packages/!(storefront)/**/*.ts": "eslint --fix"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@commitlint/cli": "^18.
|
|
24
|
-
"@commitlint/config-conventional": "^18.
|
|
25
|
-
"@commitlint/rules": "^18.
|
|
26
|
-
"@types/node": "^18.19.
|
|
27
|
-
"dotenv": "^16.
|
|
23
|
+
"@commitlint/cli": "^18.6.0",
|
|
24
|
+
"@commitlint/config-conventional": "^18.6.0",
|
|
25
|
+
"@commitlint/rules": "^18.6.0",
|
|
26
|
+
"@types/node": "^18.19.10",
|
|
27
|
+
"dotenv": "^16.4.1",
|
|
28
28
|
"eslint": "^8.56.0",
|
|
29
|
-
"husky": "^
|
|
29
|
+
"husky": "^9.0.7",
|
|
30
30
|
"lint-staged": "^15.2.0",
|
|
31
31
|
"standard-version": "^9.5.0",
|
|
32
32
|
"ts-node": "^10.9.2",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"typescript": "~5.2.2",
|
|
35
35
|
"uglify-js": "^3.17.4",
|
|
36
36
|
"vite": "^5.0.11",
|
|
37
|
-
"vitest": "^1.2.
|
|
37
|
+
"vitest": "^1.2.2",
|
|
38
38
|
"zx": "^7.2.3",
|
|
39
|
-
"@cloudcommerce/eslint": "2.2.
|
|
39
|
+
"@cloudcommerce/eslint": "2.2.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"fix-install": "bash scripts/pre-install.sh && pnpm i",
|
|
43
|
-
"postinstall": "husky
|
|
43
|
+
"postinstall": "husky && pnpm run -r prepare-monorepo",
|
|
44
44
|
"new-pkg": "bash scripts/new-package.sh",
|
|
45
45
|
"build": "turbo run build --filter='!./ecomplus-stores/**'",
|
|
46
46
|
"build:apps": "turbo run build --filter='./packages/{apps/**,modules}'",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-correios",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
29
|
"@google-cloud/pubsub": "^4.1.1",
|
|
30
|
-
"axios": "^1.6.
|
|
30
|
+
"axios": "^1.6.7",
|
|
31
31
|
"firebase-admin": "^12.0.0",
|
|
32
32
|
"firebase-functions": "^4.6.0"
|
|
33
33
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-datafrete",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Datafrete shipping gateway ",
|
|
6
6
|
"main": "lib/datafrete.js",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
28
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
29
|
-
"axios": "^1.6.
|
|
29
|
+
"axios": "^1.6.7",
|
|
30
30
|
"firebase-admin": "^12.0.0",
|
|
31
31
|
"firebase-functions": "^4.6.0"
|
|
32
32
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-flash-courier",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Flash Courier",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.7",
|
|
29
29
|
"firebase-functions": "^4.6.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-frenet",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Frenet shipping calculation",
|
|
6
6
|
"main": "lib/frenet.js",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
|
-
"axios": "^1.6.
|
|
29
|
+
"axios": "^1.6.7",
|
|
30
30
|
"firebase-admin": "^12.0.0",
|
|
31
31
|
"firebase-functions": "^4.6.0"
|
|
32
32
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-galaxpay",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Galax Pay for recurring payments",
|
|
6
6
|
"main": "lib/galaxpay.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.7",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-google-analytics",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to send carts/orders events to GA Measurement Protocol",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
|
-
"axios": "^1.6.
|
|
24
|
+
"axios": "^1.6.7",
|
|
25
25
|
"firebase-admin": "^12.0.0",
|
|
26
26
|
"firebase-functions": "^4.6.0"
|
|
27
27
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-jadlog",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Jadlog shipping calculation",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
|
-
"axios": "^1.6.
|
|
23
|
+
"axios": "^1.6.7"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@cloudcommerce/types": "workspace:*"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-mandae",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Mandaê shipping intermediator",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
24
|
-
"axios": "^1.6.
|
|
24
|
+
"axios": "^1.6.7",
|
|
25
25
|
"firebase-functions": "^4.6.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-melhor-envio",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Melhor Envio",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.7",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-mercadopago",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
|
|
6
6
|
"main": "lib/mercadopago.js",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
|
-
"axios": "^1.6.
|
|
29
|
+
"axios": "^1.6.7",
|
|
30
30
|
"firebase-admin": "^12.0.0",
|
|
31
31
|
"firebase-functions": "^4.6.0"
|
|
32
32
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pagarme",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Pagar.me",
|
|
6
6
|
"main": "lib/pagarme.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.7",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0",
|
|
31
31
|
"pagarme": "^4.33.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pagarme-v5",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Pagar.me API v5 with recurring payments",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@cloudcommerce/api": "workspace:*",
|
|
28
28
|
"@cloudcommerce/firebase": "workspace:*",
|
|
29
29
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
30
|
-
"axios": "^1.6.
|
|
30
|
+
"axios": "^1.6.7",
|
|
31
31
|
"firebase-admin": "^12.0.0",
|
|
32
32
|
"firebase-functions": "^4.6.0"
|
|
33
33
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-paghiper",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate PagHiper",
|
|
6
6
|
"main": "lib/paghiper.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.7",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-pix",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app to integrate Pix API (Bacen)",
|
|
6
6
|
"main": "lib/pix.js",
|
|
7
7
|
"exports": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@cloudcommerce/api": "workspace:*",
|
|
27
27
|
"@cloudcommerce/firebase": "workspace:*",
|
|
28
|
-
"axios": "^1.6.
|
|
28
|
+
"axios": "^1.6.7",
|
|
29
29
|
"firebase-admin": "^12.0.0",
|
|
30
30
|
"firebase-functions": "^4.6.0"
|
|
31
31
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-tiny-erp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for Tiny ERP",
|
|
6
6
|
"main": "lib/tiny-erp.js",
|
|
7
7
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
24
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
25
|
-
"axios": "^1.6.
|
|
25
|
+
"axios": "^1.6.7",
|
|
26
26
|
"firebase-admin": "^12.0.0",
|
|
27
27
|
"firebase-functions": "^4.6.0",
|
|
28
28
|
"form-data": "4.0.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/app-webhooks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce app for general order webhooks",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@cloudcommerce/api": "workspace:*",
|
|
23
23
|
"@cloudcommerce/firebase": "workspace:*",
|
|
24
|
-
"axios": "^1.6.
|
|
24
|
+
"axios": "^1.6.7",
|
|
25
25
|
"firebase-admin": "^12.0.0",
|
|
26
26
|
"firebase-functions": "^4.6.0"
|
|
27
27
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce CLI tools",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cloudcommerce": "./bin/run.mjs"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@cloudcommerce/api": "workspace:*",
|
|
30
30
|
"@fastify/deepmerge": "^1.3.0",
|
|
31
|
-
"dotenv": "^16.
|
|
31
|
+
"dotenv": "^16.4.1",
|
|
32
32
|
"libsodium-wrappers": "^0.7.13",
|
|
33
33
|
"md5": "^2.3.0",
|
|
34
34
|
"typescript": "~5.2.2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/emails",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce email sender",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@cloudcommerce/firebase": "workspace:*",
|
|
26
|
-
"axios": "^1.6.
|
|
26
|
+
"axios": "^1.6.7",
|
|
27
27
|
"ejs": "^3.1.9",
|
|
28
28
|
"nodemailer": "^6.9.8"
|
|
29
29
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/eslint",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce ESLint config",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
26
26
|
"eslint-plugin-astro": "^0.31.3",
|
|
27
27
|
"eslint-plugin-import": "^2.29.1",
|
|
28
|
-
"eslint-plugin-tailwindcss": "3.14.
|
|
28
|
+
"eslint-plugin-tailwindcss": "3.14.1",
|
|
29
29
|
"eslint-plugin-vue": "^9.20.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/firebase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce on Firebase",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@cloudcommerce/api": "workspace:*",
|
|
34
34
|
"@cloudcommerce/config": "workspace:*",
|
|
35
35
|
"@google-cloud/pubsub": "^4.1.1",
|
|
36
|
-
"dotenv": "^16.
|
|
36
|
+
"dotenv": "^16.4.1",
|
|
37
37
|
"firebase-admin": "^12.0.0",
|
|
38
38
|
"firebase-functions": "^4.6.0",
|
|
39
39
|
"source-map-support": "^0.5.21"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/modules",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce modules API",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
7
7
|
"exports": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
48
48
|
"ajv": "^8.12.0",
|
|
49
49
|
"ajv-formats": "^2.1.1",
|
|
50
|
-
"axios": "^1.6.
|
|
50
|
+
"axios": "^1.6.7",
|
|
51
51
|
"firebase-admin": "^12.0.0",
|
|
52
52
|
"firebase-functions": "^4.6.0",
|
|
53
53
|
"source-map-support": "^0.5.21"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/ssr",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront SSR",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"build:workers": "npx tsc -p src/cloudflare --outDir cloudflare && npx eslint --ext .js cloudflare --fix"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@astrojs/node": "8.
|
|
29
|
+
"@astrojs/node": "8.1.0",
|
|
30
30
|
"@cloudcommerce/api": "workspace:*",
|
|
31
31
|
"@cloudcommerce/firebase": "workspace:*",
|
|
32
32
|
"@cloudcommerce/i18n": "workspace:*",
|
|
33
33
|
"@ecomplus/utils": "1.5.0-rc.6",
|
|
34
34
|
"@vueuse/core": "10.7.2",
|
|
35
|
-
"astro": "4.2.
|
|
35
|
+
"astro": "4.2.6",
|
|
36
36
|
"astro-capo": "^0.0.1",
|
|
37
|
-
"axios": "^1.6.
|
|
37
|
+
"axios": "^1.6.7",
|
|
38
38
|
"firebase-admin": "^12.0.0",
|
|
39
39
|
"firebase-functions": "^4.6.0",
|
|
40
40
|
"mitt": "^3.0.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcommerce/storefront",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "E-Com Plus Cloud Commerce storefront with Astro",
|
|
6
6
|
"bin": {
|
|
7
7
|
"storefront": "./scripts/build-prod.sh"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lint:fix": "eslint -c ../eslint/storefront.staged.eslintrc.cjs src/lib/**/*.{ts,vue,astro} --fix"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@astrojs/node": "8.
|
|
33
|
+
"@astrojs/node": "8.1.0",
|
|
34
34
|
"@astrojs/vue": "4.0.8",
|
|
35
35
|
"@cloudcommerce/api": "workspace:*",
|
|
36
36
|
"@cloudcommerce/config": "workspace:*",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"@types/gtag.js": "^0.0.18",
|
|
44
44
|
"@vite-pwa/astro": "^0.2.0",
|
|
45
45
|
"@vueuse/core": "10.7.2",
|
|
46
|
-
"astro": "4.2.
|
|
46
|
+
"astro": "4.2.6",
|
|
47
47
|
"astro-capo": "^0.0.1",
|
|
48
48
|
"chroma-js": "^2.4.2",
|
|
49
|
-
"dotenv": "^16.
|
|
49
|
+
"dotenv": "^16.4.1",
|
|
50
50
|
"firebase": "^10.7.2",
|
|
51
51
|
"image-size": "^1.1.1",
|
|
52
52
|
"mime": "^3.0.0",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"semver": "^7.5.4",
|
|
55
55
|
"sharp": "^0.32.6",
|
|
56
56
|
"tailwindcss": "^3.4.1",
|
|
57
|
-
"unocss": "^0.58.
|
|
58
|
-
"unplugin-auto-import": "^0.17.
|
|
57
|
+
"unocss": "^0.58.4",
|
|
58
|
+
"unplugin-auto-import": "^0.17.5",
|
|
59
59
|
"vite": "^5.0.11",
|
|
60
|
-
"vite-plugin-pwa": "^0.17.
|
|
60
|
+
"vite-plugin-pwa": "^0.17.5",
|
|
61
61
|
"vue": "^3.4.15",
|
|
62
62
|
"wade": "0.3.3",
|
|
63
63
|
"yaml": "^2.3.4"
|
|
@@ -23,6 +23,7 @@ import { useSearchActiveFilters } from '@@sf/composables/use-search-filters';
|
|
|
23
23
|
|
|
24
24
|
export interface Props {
|
|
25
25
|
term?: string | null;
|
|
26
|
+
pageSize?: number;
|
|
26
27
|
fixedParams?: SearchEngineInstance['params'];
|
|
27
28
|
products?: SearchItem<null>[];
|
|
28
29
|
resultMeta?: SearchEngineInstance['meta'];
|
|
@@ -49,32 +50,57 @@ const useSearchShowcase = (props: Props) => {
|
|
|
49
50
|
if (term !== undefined) {
|
|
50
51
|
searchEngine.term.value = term;
|
|
51
52
|
}
|
|
53
|
+
if (props.pageSize) {
|
|
54
|
+
searchEngine.pageSize.value = props.pageSize;
|
|
55
|
+
}
|
|
52
56
|
Object.assign(searchEngine.params, props.fixedParams);
|
|
57
|
+
let hasChangedInitParams = false;
|
|
53
58
|
if (urlParams) {
|
|
54
59
|
Object.keys(urlParams).forEach((param) => {
|
|
60
|
+
if (!urlParams[param]) return;
|
|
61
|
+
if (param.startsWith('f\\')) {
|
|
62
|
+
const field = param.substring(2);
|
|
63
|
+
searchEngine.params[field] = urlParams[param];
|
|
64
|
+
if (props.fixedParams?.[field] !== urlParams[param]) {
|
|
65
|
+
hasChangedInitParams = true;
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
55
69
|
if (param === 'sort') {
|
|
56
70
|
searchEngine.params.sort = urlParams.sort;
|
|
71
|
+
if (
|
|
72
|
+
typeof urlParams.sort === 'string'
|
|
73
|
+
&& props.resultMeta?.sort?.length === 1
|
|
74
|
+
) {
|
|
75
|
+
const { field, order } = props.resultMeta.sort[0];
|
|
76
|
+
const fetchedSort = order ? field : `-${field}`;
|
|
77
|
+
if (fetchedSort === urlParams.sort) return;
|
|
78
|
+
}
|
|
79
|
+
hasChangedInitParams = true;
|
|
57
80
|
return;
|
|
58
81
|
}
|
|
59
82
|
if (param === 'p') {
|
|
60
83
|
const pageNumber = parseInt(String(urlParams.p), 10);
|
|
61
|
-
if (pageNumber >= 1)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
84
|
+
if (pageNumber >= 1) {
|
|
85
|
+
searchEngine.pageNumber.value = pageNumber;
|
|
86
|
+
if (props.resultMeta?.limit) {
|
|
87
|
+
const { offset, limit } = props.resultMeta;
|
|
88
|
+
const fetchedPage = offset ? Math.ceil(offset / limit) : 1;
|
|
89
|
+
if (fetchedPage === pageNumber) return;
|
|
90
|
+
}
|
|
91
|
+
hasChangedInitParams = true;
|
|
92
|
+
}
|
|
67
93
|
}
|
|
68
94
|
});
|
|
69
95
|
}
|
|
70
96
|
if (!searchEngine.wasFetched.value) {
|
|
71
|
-
if (props.products || props.resultMeta) {
|
|
97
|
+
if ((props.products || props.resultMeta) && !hasChangedInitParams) {
|
|
72
98
|
searchEngine.setResult({
|
|
73
99
|
result: props.products,
|
|
74
100
|
meta: props.resultMeta,
|
|
75
101
|
});
|
|
76
102
|
}
|
|
77
|
-
if (!props.products) {
|
|
103
|
+
if (!props.products || hasChangedInitParams) {
|
|
78
104
|
searchEngine.fetch().catch(console.error);
|
|
79
105
|
}
|
|
80
106
|
}
|
|
@@ -107,7 +107,10 @@ export class SearchEngine {
|
|
|
107
107
|
return search(opts);
|
|
108
108
|
}, debounce);
|
|
109
109
|
watch([this.term, this.params, this.pageSize], () => {
|
|
110
|
-
this.
|
|
110
|
+
if (this.wasFetched.value) {
|
|
111
|
+
this.pageNumber.value = 1;
|
|
112
|
+
this.#wasFetched.value = false;
|
|
113
|
+
}
|
|
111
114
|
});
|
|
112
115
|
watch(this.pageNumber, () => {
|
|
113
116
|
this.#wasFetched.value = false;
|
|
@@ -168,7 +171,9 @@ export class SearchEngine {
|
|
|
168
171
|
data.result.forEach((item) => this.products.push(item));
|
|
169
172
|
}
|
|
170
173
|
if (data.meta && data.result) {
|
|
171
|
-
|
|
174
|
+
/* nextTick */ setTimeout(() => {
|
|
175
|
+
this.#wasFetched.value = true;
|
|
176
|
+
}, 9);
|
|
172
177
|
}
|
|
173
178
|
}
|
|
174
179
|
}
|