@faststore/core 3.41.8 → 3.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +35 -35
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.js +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +23 -17
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/1454.js +1 -0
- package/.next/server/chunks/3358.js +1 -0
- package/.next/server/chunks/3675.js +1 -1
- package/.next/server/chunks/3684.js +1 -1
- package/.next/server/chunks/416.js +1 -0
- package/.next/server/chunks/4289.js +13 -5
- package/.next/server/chunks/4746.js +1 -1
- package/.next/server/chunks/4816.js +1 -0
- package/.next/server/chunks/6026.js +9 -0
- package/.next/server/chunks/6030.js +1 -0
- package/.next/server/chunks/6076.js +1 -1
- package/.next/server/chunks/6594.js +1 -0
- package/.next/server/chunks/6999.js +1 -0
- package/.next/server/chunks/7371.js +1 -0
- package/.next/server/chunks/831.js +1 -0
- package/.next/server/chunks/8482.js +1 -0
- package/.next/server/chunks/9594.js +1 -1
- package/.next/server/chunks/UIBannerText.js +1 -1
- package/.next/server/chunks/UISKUMatrixSidebar.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/404.js.nft.json +1 -1
- package/.next/server/pages/500.js.nft.json +1 -1
- package/.next/server/pages/[...slug].js +1 -1
- package/.next/server/pages/[...slug].js.nft.json +1 -1
- package/.next/server/pages/[slug]/p.js +1 -1
- package/.next/server/pages/[slug]/p.js.nft.json +1 -1
- package/.next/server/pages/_app.js.nft.json +1 -1
- package/.next/server/pages/_document.js.nft.json +1 -1
- package/.next/server/pages/_error.js.nft.json +1 -1
- package/.next/server/pages/account/profile.js.nft.json +1 -1
- package/.next/server/pages/account.js.nft.json +1 -1
- package/.next/server/pages/api/graphql.js +1 -1
- package/.next/server/pages/api/graphql.js.nft.json +1 -1
- package/.next/server/pages/api/health/live.js.nft.json +1 -1
- package/.next/server/pages/api/health/ready.js.nft.json +1 -1
- package/.next/server/pages/api/preview.js.nft.json +1 -1
- package/.next/server/pages/checkout.js.nft.json +1 -1
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/404.json +1 -1
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/500.json +1 -1
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/checkout.json +1 -1
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/login.json +1 -1
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US/s.json +1 -1
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages/en-US.json +1 -1
- package/.next/server/pages/index.js +1 -1
- package/.next/server/pages/index.js.nft.json +1 -1
- package/.next/server/pages/login.js.nft.json +1 -1
- package/.next/server/pages/s.js +1 -1
- package/.next/server/pages/s.js.nft.json +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/server/webpack-runtime.js +1 -1
- package/.next/static/{LDbNn9GX3-MH7ekCHdiDN → Ra_8xXVEVCNHcT2KePSUO}/_buildManifest.js +1 -1
- package/.next/static/chunks/3358.02de0bb531c6487a.js +1 -0
- package/.next/static/chunks/3675.e8cad32e70cf3d3c.js +1 -0
- package/.next/static/chunks/417.c39c1c5e5ef57b4a.js +1 -0
- package/.next/static/chunks/4865.3e2ae9feb511c870.js +1 -0
- package/.next/static/chunks/6335-5870fc075bf96b86.js +1 -0
- package/.next/static/chunks/{7498-49bf89838314b503.js → 7498-415859c993f5002b.js} +1 -1
- package/.next/static/chunks/UISKUMatrixSidebar.c68540bda6d40e13.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-3b513ae37c648620.js +1 -0
- package/.next/static/chunks/pages/{_app-b83676824a39752c.js → _app-0f16b6b5d7dfab2a.js} +1 -1
- package/.next/static/chunks/webpack-d72e5eb27bf80195.js +1 -0
- package/.next/static/css/31fb64e064998460.css +1 -0
- package/.next/trace +109 -109
- package/.turbo/turbo-build.log +11 -17
- package/.turbo/turbo-test.log +5 -5
- package/@generated/gql.ts +2 -2
- package/@generated/graphql.ts +59 -7
- package/@generated/persisted-documents.json +3 -3
- package/CHANGELOG.md +12 -0
- package/cms/faststore/sections.json +85 -0
- package/package.json +4 -4
- package/src/components/navigation/Navbar/Navbar.tsx +2 -0
- package/src/components/product/ProductCard/ProductCard.tsx +8 -0
- package/src/components/search/SearchDropdown/SearchDropdown.tsx +14 -1
- package/src/components/search/SearchInput/SearchInput.tsx +17 -2
- package/src/components/search/SearchProductItem/SearchProductItem.tsx +120 -1
- package/src/components/sections/Navbar/DefaultComponents.ts +7 -0
- package/src/components/sections/Navbar/Navbar.tsx +16 -0
- package/src/components/sections/Navbar/section.module.scss +11 -0
- package/src/components/ui/SKUMatrix/SKUMatrixSidebar.tsx +12 -4
- package/src/sdk/analytics/platform/vtex/search.ts +4 -2
- package/src/sdk/cart/useBuyButton.ts +7 -2
- package/src/typings/overrides.ts +1 -0
- package/src/utils/getBaseDomain.ts +50 -0
- package/.next/server/chunks/3979.js +0 -1
- package/.next/server/chunks/5071.js +0 -1
- package/.next/server/chunks/5284.js +0 -1
- package/.next/server/chunks/6198.js +0 -1
- package/.next/server/chunks/804.js +0 -1
- package/.next/server/chunks/8112.js +0 -9
- package/.next/server/chunks/9019.js +0 -1
- package/.next/server/chunks/9068.js +0 -1
- package/.next/static/chunks/3675.b6f0a3644a7802fe.js +0 -1
- package/.next/static/chunks/3979.485ff5351a2504d8.js +0 -1
- package/.next/static/chunks/417.08663bd4b5809548.js +0 -1
- package/.next/static/chunks/4865.8b1970610c412187.js +0 -1
- package/.next/static/chunks/6335-7aa183582a89bc0e.js +0 -1
- package/.next/static/chunks/pages/[slug]/p-2e02254149cef33d.js +0 -1
- package/.next/static/chunks/webpack-ddf24b55e934e623.js +0 -1
- package/.next/static/css/b0c0e0632c5d7f52.css +0 -1
- /package/.next/static/{LDbNn9GX3-MH7ekCHdiDN → Ra_8xXVEVCNHcT2KePSUO}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.41.
|
|
2
|
+
> @faststore/core@3.41.9 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.41.
|
|
6
|
+
> @faststore/core@3.41.9 partytown /home/runner/work/faststore/faststore/packages/core
|
|
7
7
|
> partytown copylib ./public/~partytown
|
|
8
8
|
|
|
9
9
|
Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
|
|
10
10
|
|
|
11
|
-
> @faststore/core@3.41.
|
|
11
|
+
> @faststore/core@3.41.9 generate /home/runner/work/faststore/faststore/packages/core
|
|
12
12
|
> na run generate:schema && na run generate:codegen && na run format:generated
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
> @faststore/core@3.41.
|
|
15
|
+
> @faststore/core@3.41.9 generate:schema /home/runner/work/faststore/faststore/packages/core
|
|
16
16
|
> tsx src/server/generator/generateGraphQLSchemaFile.ts
|
|
17
17
|
|
|
18
18
|
Schema GraphQL file generated successfully
|
|
19
19
|
|
|
20
|
-
> @faststore/core@3.41.
|
|
20
|
+
> @faststore/core@3.41.9 generate:codegen /home/runner/work/faststore/faststore/packages/core
|
|
21
21
|
> graphql-codegen
|
|
22
22
|
|
|
23
23
|
[STARTED] Parse Configuration
|
|
@@ -37,11 +37,11 @@ Running lifecycle hook "afterStart" scripts...
|
|
|
37
37
|
[CLI] Loading Documents
|
|
38
38
|
[CLI] Generating output
|
|
39
39
|
|
|
40
|
-
> @faststore/core@3.41.
|
|
40
|
+
> @faststore/core@3.41.9 format:generated /home/runner/work/faststore/faststore/packages/core
|
|
41
41
|
> prettier --write "@generated/**/*.{ts,js,tsx,jsx,json}" --loglevel error
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
> @faststore/core@3.41.
|
|
44
|
+
> @faststore/core@3.41.9 build /home/runner/work/faststore/faststore/packages/core
|
|
45
45
|
> next build
|
|
46
46
|
|
|
47
47
|
⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
|
|
@@ -58,16 +58,10 @@ https://nextjs.org/telemetry
|
|
|
58
58
|
✓ Compiled successfully
|
|
59
59
|
Collecting page data ...
|
|
60
60
|
Generating static pages (0/6) ...
|
|
61
|
-
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
62
61
|
|
|
63
62
|
Generating static pages (1/6)
|
|
64
63
|
Warning: Dynamic Content not found for the page: home. Refer to the Dynamic Content documentation at https://developers.vtex.com/docs/guides/faststore/dynamic-content-overview for mapping the page and the corresponding data-fetching function.
|
|
65
|
-
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
66
64
|
|
|
67
65
|
Generating static pages (2/6)
|
|
68
|
-
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
69
|
-
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
70
66
|
|
|
71
67
|
Generating static pages (4/6)
|
|
72
|
-
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
73
|
-
RegionPopover not found. Add a new component for this section or remove it from the CMS
|
|
74
68
|
|
|
75
69
|
✓ Generating static pages (6/6)
|
|
76
70
|
Finalizing page optimization ...
|
|
77
71
|
Collecting build traces ...
|
|
@@ -77,13 +71,13 @@ Route (pages) Size First Load JS
|
|
|
77
71
|
├ └ css/b1806cbafd0c1f81.css 3.06 kB
|
|
78
72
|
├ /_app 0 B 92.4 kB
|
|
79
73
|
├ ● /[...slug] 2.34 kB 133 kB
|
|
80
|
-
├ ● /[slug]/p 35.
|
|
74
|
+
├ ● /[slug]/p 35.7 kB 156 kB
|
|
81
75
|
├ ├ css/a3ca6a9b63f657be.css 5.75 kB
|
|
82
76
|
├ ├ css/62a5153ac7061286.css 6.11 kB
|
|
83
77
|
├ └ css/b5bf49598c8f8b66.css 16.1 kB
|
|
84
78
|
├ ○ /404 1.48 kB 122 kB
|
|
85
79
|
├ ● /500 1.48 kB 122 kB
|
|
86
|
-
├ λ /account 240 B 92.
|
|
80
|
+
├ λ /account 240 B 92.7 kB
|
|
87
81
|
├ λ /account/profile 1.34 kB 122 kB
|
|
88
82
|
├ └ css/249b9deaabc0d32d.css 2.51 kB
|
|
89
83
|
├ λ /api/graphql 0 B 92.4 kB
|
|
@@ -96,8 +90,8 @@ Route (pages) Size First Load JS
|
|
|
96
90
|
+ First Load JS shared by all 95.9 kB
|
|
97
91
|
├ chunks/framework-807b0f81cbc129f0.js 45.4 kB
|
|
98
92
|
├ chunks/main-5569625b3fdd6741.js 33.1 kB
|
|
99
|
-
├ chunks/pages/_app-
|
|
100
|
-
├ chunks/webpack-
|
|
93
|
+
├ chunks/pages/_app-0f16b6b5d7dfab2a.js 10.4 kB
|
|
94
|
+
├ chunks/webpack-d72e5eb27bf80195.js 3.62 kB
|
|
101
95
|
└ css/0a57ee6c7a57788c.css 3.49 kB
|
|
102
96
|
|
|
103
97
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.41.
|
|
2
|
+
> @faststore/core@3.41.9 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/utils/multipleTemplates.test.ts (
|
|
6
|
-
PASS test/server/cms/global.test.ts (24.
|
|
5
|
+
PASS test/utils/multipleTemplates.test.ts (23.58 s)
|
|
6
|
+
PASS test/server/cms/global.test.ts (24.55 s)
|
|
7
7
|
PASS test/server/cms/index.test.ts
|
|
8
|
-
PASS test/server/index.test.ts (
|
|
8
|
+
PASS test/server/index.test.ts (29.038 s)
|
|
9
9
|
|
|
10
10
|
Test Suites: 4 passed, 4 total
|
|
11
11
|
Tests: 22 passed, 22 total
|
|
12
12
|
Snapshots: 0 total
|
|
13
|
-
Time:
|
|
13
|
+
Time: 30.255 s
|
|
14
14
|
Ran all test suites.
|
package/@generated/gql.ts
CHANGED
|
@@ -12,7 +12,7 @@ import * as types from './graphql'
|
|
|
12
12
|
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
13
13
|
*/
|
|
14
14
|
const documents = {
|
|
15
|
-
'\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n }\n':
|
|
15
|
+
'\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\t\tunitMultiplier\n\n isVariantOf {\n productGroupID\n name\n\t\t\tskuVariants {\n\t\t\t\tallVariantsByName\n\t\t\t\tactiveVariations\n\t\t\t\tslugsMap\n\t\t\t\tavailableVariations\n\t\t\t}\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n\t\t\t\tpriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n }\n':
|
|
16
16
|
types.ProductSummary_ProductFragmentDoc,
|
|
17
17
|
'\n fragment Filter_facets on StoreFacet {\n ... on StoreFacetRange {\n key\n label\n\n min {\n selected\n absolute\n }\n\n max {\n selected\n absolute\n }\n\n __typename\n }\n ... on StoreFacetBoolean {\n key\n label\n values {\n label\n value\n selected\n quantity\n }\n\n __typename\n }\n }\n':
|
|
18
18
|
types.Filter_FacetsFragmentDoc,
|
|
@@ -68,7 +68,7 @@ const documents = {
|
|
|
68
68
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
69
69
|
*/
|
|
70
70
|
export function gql(
|
|
71
|
-
source: '\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\n isVariantOf {\n productGroupID\n name\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n }\n'
|
|
71
|
+
source: '\n fragment ProductSummary_product on StoreProduct {\n id: productID\n slug\n sku\n brand {\n brandName: name\n }\n name\n gtin\n\t\tunitMultiplier\n\n isVariantOf {\n productGroupID\n name\n\t\t\tskuVariants {\n\t\t\t\tallVariantsByName\n\t\t\t\tactiveVariations\n\t\t\t\tslugsMap\n\t\t\t\tavailableVariations\n\t\t\t}\n }\n\n image {\n url\n alternateName\n }\n\n brand {\n name\n }\n\n offers {\n lowPrice\n lowPriceWithTaxes\n offers {\n availability\n price\n listPrice\n listPriceWithTaxes\n\t\t\t\tpriceWithTaxes\n quantity\n seller {\n identifier\n }\n }\n }\n\n additionalProperty {\n propertyID\n name\n value\n valueReference\n }\n\n advertisement {\n adId\n adResponseId\n }\n }\n'
|
|
72
72
|
): typeof import('./graphql').ProductSummary_ProductFragmentDoc
|
|
73
73
|
/**
|
|
74
74
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
package/@generated/graphql.ts
CHANGED
|
@@ -1199,9 +1199,19 @@ export type ProductSummary_ProductFragment = {
|
|
|
1199
1199
|
sku: string
|
|
1200
1200
|
name: string
|
|
1201
1201
|
gtin: string
|
|
1202
|
+
unitMultiplier: number | null
|
|
1202
1203
|
id: string
|
|
1203
1204
|
brand: { name: string; brandName: string }
|
|
1204
|
-
isVariantOf: {
|
|
1205
|
+
isVariantOf: {
|
|
1206
|
+
productGroupID: string
|
|
1207
|
+
name: string
|
|
1208
|
+
skuVariants: {
|
|
1209
|
+
allVariantsByName: any | null
|
|
1210
|
+
activeVariations: any | null
|
|
1211
|
+
slugsMap: any | null
|
|
1212
|
+
availableVariations: any | null
|
|
1213
|
+
} | null
|
|
1214
|
+
}
|
|
1205
1215
|
image: Array<{ url: string; alternateName: string }>
|
|
1206
1216
|
offers: {
|
|
1207
1217
|
lowPrice: number
|
|
@@ -1211,6 +1221,7 @@ export type ProductSummary_ProductFragment = {
|
|
|
1211
1221
|
price: number
|
|
1212
1222
|
listPrice: number
|
|
1213
1223
|
listPriceWithTaxes: number
|
|
1224
|
+
priceWithTaxes: number
|
|
1214
1225
|
quantity: number
|
|
1215
1226
|
seller: { identifier: string }
|
|
1216
1227
|
}>
|
|
@@ -1604,9 +1615,19 @@ export type ClientManyProductsQueryQuery = {
|
|
|
1604
1615
|
sku: string
|
|
1605
1616
|
name: string
|
|
1606
1617
|
gtin: string
|
|
1618
|
+
unitMultiplier: number | null
|
|
1607
1619
|
id: string
|
|
1608
1620
|
brand: { name: string; brandName: string }
|
|
1609
|
-
isVariantOf: {
|
|
1621
|
+
isVariantOf: {
|
|
1622
|
+
productGroupID: string
|
|
1623
|
+
name: string
|
|
1624
|
+
skuVariants: {
|
|
1625
|
+
allVariantsByName: any | null
|
|
1626
|
+
activeVariations: any | null
|
|
1627
|
+
slugsMap: any | null
|
|
1628
|
+
availableVariations: any | null
|
|
1629
|
+
} | null
|
|
1630
|
+
}
|
|
1610
1631
|
image: Array<{ url: string; alternateName: string }>
|
|
1611
1632
|
offers: {
|
|
1612
1633
|
lowPrice: number
|
|
@@ -1616,6 +1637,7 @@ export type ClientManyProductsQueryQuery = {
|
|
|
1616
1637
|
price: number
|
|
1617
1638
|
listPrice: number
|
|
1618
1639
|
listPriceWithTaxes: number
|
|
1640
|
+
priceWithTaxes: number
|
|
1619
1641
|
quantity: number
|
|
1620
1642
|
seller: { identifier: string }
|
|
1621
1643
|
}>
|
|
@@ -1737,9 +1759,19 @@ export type ClientSearchSuggestionsQueryQuery = {
|
|
|
1737
1759
|
sku: string
|
|
1738
1760
|
name: string
|
|
1739
1761
|
gtin: string
|
|
1762
|
+
unitMultiplier: number | null
|
|
1740
1763
|
id: string
|
|
1741
1764
|
brand: { name: string; brandName: string }
|
|
1742
|
-
isVariantOf: {
|
|
1765
|
+
isVariantOf: {
|
|
1766
|
+
productGroupID: string
|
|
1767
|
+
name: string
|
|
1768
|
+
skuVariants: {
|
|
1769
|
+
allVariantsByName: any | null
|
|
1770
|
+
activeVariations: any | null
|
|
1771
|
+
slugsMap: any | null
|
|
1772
|
+
availableVariations: any | null
|
|
1773
|
+
} | null
|
|
1774
|
+
}
|
|
1743
1775
|
image: Array<{ url: string; alternateName: string }>
|
|
1744
1776
|
offers: {
|
|
1745
1777
|
lowPrice: number
|
|
@@ -1749,6 +1781,7 @@ export type ClientSearchSuggestionsQueryQuery = {
|
|
|
1749
1781
|
price: number
|
|
1750
1782
|
listPrice: number
|
|
1751
1783
|
listPriceWithTaxes: number
|
|
1784
|
+
priceWithTaxes: number
|
|
1752
1785
|
quantity: number
|
|
1753
1786
|
seller: { identifier: string }
|
|
1754
1787
|
}>
|
|
@@ -1867,9 +1900,19 @@ export type ServerManyProductsQueryQuery = {
|
|
|
1867
1900
|
sku: string
|
|
1868
1901
|
name: string
|
|
1869
1902
|
gtin: string
|
|
1903
|
+
unitMultiplier: number | null
|
|
1870
1904
|
id: string
|
|
1871
1905
|
brand: { name: string; brandName: string }
|
|
1872
|
-
isVariantOf: {
|
|
1906
|
+
isVariantOf: {
|
|
1907
|
+
productGroupID: string
|
|
1908
|
+
name: string
|
|
1909
|
+
skuVariants: {
|
|
1910
|
+
allVariantsByName: any | null
|
|
1911
|
+
activeVariations: any | null
|
|
1912
|
+
slugsMap: any | null
|
|
1913
|
+
availableVariations: any | null
|
|
1914
|
+
} | null
|
|
1915
|
+
}
|
|
1873
1916
|
image: Array<{ url: string; alternateName: string }>
|
|
1874
1917
|
offers: {
|
|
1875
1918
|
lowPrice: number
|
|
@@ -1879,6 +1922,7 @@ export type ServerManyProductsQueryQuery = {
|
|
|
1879
1922
|
price: number
|
|
1880
1923
|
listPrice: number
|
|
1881
1924
|
listPriceWithTaxes: number
|
|
1925
|
+
priceWithTaxes: number
|
|
1882
1926
|
quantity: number
|
|
1883
1927
|
seller: { identifier: string }
|
|
1884
1928
|
}>
|
|
@@ -1926,9 +1970,16 @@ export const ProductSummary_ProductFragmentDoc = new TypedDocumentString(
|
|
|
1926
1970
|
}
|
|
1927
1971
|
name
|
|
1928
1972
|
gtin
|
|
1973
|
+
unitMultiplier
|
|
1929
1974
|
isVariantOf {
|
|
1930
1975
|
productGroupID
|
|
1931
1976
|
name
|
|
1977
|
+
skuVariants {
|
|
1978
|
+
allVariantsByName
|
|
1979
|
+
activeVariations
|
|
1980
|
+
slugsMap
|
|
1981
|
+
availableVariations
|
|
1982
|
+
}
|
|
1932
1983
|
}
|
|
1933
1984
|
image {
|
|
1934
1985
|
url
|
|
@@ -1945,6 +1996,7 @@ export const ProductSummary_ProductFragmentDoc = new TypedDocumentString(
|
|
|
1945
1996
|
price
|
|
1946
1997
|
listPrice
|
|
1947
1998
|
listPriceWithTaxes
|
|
1999
|
+
priceWithTaxes
|
|
1948
2000
|
quantity
|
|
1949
2001
|
seller {
|
|
1950
2002
|
identifier
|
|
@@ -2387,7 +2439,7 @@ export const ClientAllVariantProductsQueryDocument = {
|
|
|
2387
2439
|
export const ClientManyProductsQueryDocument = {
|
|
2388
2440
|
__meta__: {
|
|
2389
2441
|
operationName: 'ClientManyProductsQuery',
|
|
2390
|
-
operationHash: '
|
|
2442
|
+
operationHash: '1adc93c70f16173540c50f725ee09a2d67cb85ab',
|
|
2391
2443
|
},
|
|
2392
2444
|
} as unknown as TypedDocumentString<
|
|
2393
2445
|
ClientManyProductsQueryQuery,
|
|
@@ -2414,7 +2466,7 @@ export const ClientProductQueryDocument = {
|
|
|
2414
2466
|
export const ClientSearchSuggestionsQueryDocument = {
|
|
2415
2467
|
__meta__: {
|
|
2416
2468
|
operationName: 'ClientSearchSuggestionsQuery',
|
|
2417
|
-
operationHash: '
|
|
2469
|
+
operationHash: 'b548281d477a173be7b6960434604d69769a97e7',
|
|
2418
2470
|
},
|
|
2419
2471
|
} as unknown as TypedDocumentString<
|
|
2420
2472
|
ClientSearchSuggestionsQueryQuery,
|
|
@@ -2450,7 +2502,7 @@ export const ClientShippingSimulationQueryDocument = {
|
|
|
2450
2502
|
export const ServerManyProductsQueryDocument = {
|
|
2451
2503
|
__meta__: {
|
|
2452
2504
|
operationName: 'ServerManyProductsQuery',
|
|
2453
|
-
operationHash: '
|
|
2505
|
+
operationHash: '5c2181dde311ca80b72e0cc76ac0855d8aa8b51e',
|
|
2454
2506
|
},
|
|
2455
2507
|
} as unknown as TypedDocumentString<
|
|
2456
2508
|
ServerManyProductsQueryQuery,
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"c2b3f8bff73ebf6ac79d758c66cabbc21ba9fcc0": "fragment CartItem on StoreOffer { itemOffered { ...CartProductItem } listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } fragment CartMessage on StoreCartMessage { status text } fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) { validateCart(cart: $cart, session: $session) { messages { ...CartMessage } order { acceptedOffer { ...CartItem } orderNumber shouldSplitItem } } }",
|
|
5
5
|
"feb7005103a859e2bc8cf2360d568806fd88deba": "mutation SubscribeToNewsletter($data: IPersonNewsletter!) { subscribeToNewsletter(data: $data) { id } }",
|
|
6
6
|
"4039e05f01a2fe449e20e8b82170d0ba94b1fbe9": "fragment ProductSKUMatrixSidebarFragment_product on StoreProduct { isVariantOf { name productGroupID skuVariants { activeVariations allVariantProducts { additionalProperty { name propertyID value valueReference } image { alternateName url } name offers { highPrice lowPrice lowPriceWithTaxes offerCount offers { availability itemCondition listPrice listPriceWithTaxes price priceCurrency priceValidUntil priceWithTaxes quantity sellingPrice } priceCurrency } sku } availableVariations slugsMap } } id: productID } query ClientAllVariantProductsQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { ...ProductSKUMatrixSidebarFragment_product } }",
|
|
7
|
-
"
|
|
7
|
+
"1adc93c70f16173540c50f725ee09a2d67cb85ab": "fragment ClientManyProducts on Query { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { products { pageInfo { totalCount } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier } query ClientManyProductsQuery($after: String, $first: Int!, $selectedFacets: [IStoreSelectedFacet!]!, $sort: StoreSort!, $sponsoredCount: Int, $term: String!) { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { products { edges { node { ...ProductSummary_product } } pageInfo { totalCount } } } ...ClientManyProducts }",
|
|
8
8
|
"bfc40da32b60f9404a4adb96b0856e3fbb04b076": "fragment ClientProductGallery on Query { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets ) { products { pageInfo { totalCount } } } } fragment Filter_facets on StoreFacet { ... on StoreFacetBoolean { __typename key label values { label quantity selected value } } ... on StoreFacetRange { __typename key label max { absolute selected } min { absolute selected } } } fragment SearchEvent_metadata on SearchMetadata { fuzzy isTermMisspelled logicalOperator } query ClientProductGalleryQuery($after: String!, $first: Int!, $selectedFacets: [IStoreSelectedFacet!]!, $sort: StoreSort!, $term: String!) { redirect(term: $term, selectedFacets: $selectedFacets) { url } search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets ) { facets { ...Filter_facets } metadata { ...SearchEvent_metadata } products { pageInfo { totalCount } } } ...ClientProductGallery }",
|
|
9
9
|
"7d121ef8d4dc99174e64e4429a9b977b8bbebed8": "fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } fragment ClientProduct on Query { product(locator: $locator) { id: productID } } fragment ProductDetailsFragment_product on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } description gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes seller { identifier } } } id: productID sku unitMultiplier ...CartProductItem } query ClientProductQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { ...ProductDetailsFragment_product } ...ClientProduct }",
|
|
10
|
-
"
|
|
10
|
+
"b548281d477a173be7b6960434604d69769a97e7": "fragment ClientSearchSuggestions on Query { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier } fragment SearchEvent_metadata on SearchMetadata { fuzzy isTermMisspelled logicalOperator } query ClientSearchSuggestionsQuery($selectedFacets: [IStoreSelectedFacet!], $term: String!) { search(first: 5, term: $term, selectedFacets: $selectedFacets) { metadata { ...SearchEvent_metadata } products { pageInfo { totalCount } } suggestions { products { ...ProductSummary_product } terms { value } } } ...ClientSearchSuggestions }",
|
|
11
11
|
"e2385b0f11726d0068f96548f57a8dd441c064e3": "fragment ClientTopSearchSuggestions on Query { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } } query ClientTopSearchSuggestionsQuery($selectedFacets: [IStoreSelectedFacet!], $term: String!) { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } ...ClientTopSearchSuggestions }",
|
|
12
12
|
"2c6e94b978eb50647873082daebcc5b332154cb1": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType b2b { customerId } channel country currency { code symbol } deliveryMode { deliveryChannel deliveryMethod deliveryWindow { endDate startDate } } geoCoordinates { latitude longitude } locale marketingData { utmCampaign utmMedium utmSource utmiCampaign utmiPage utmiPart } person { email familyName givenName id } postalCode } }",
|
|
13
13
|
"c35bad22f67f3eb34fea52bb49efa6b1da6b728d": "fragment ClientShippingSimulation on Query { shipping(items: $items, postalCode: $postalCode, country: $country) { address { city } } } query ClientShippingSimulationQuery($country: String!, $items: [IShippingItem!]!, $postalCode: String!) { shipping(items: $items, postalCode: $postalCode, country: $country) { address { city neighborhood state } logisticsInfo { slas { availableDeliveryWindows { endDateUtc listPrice price startDateUtc } carrier deliveryChannel localizedEstimates price shippingEstimate } } } ...ClientShippingSimulation }",
|
|
14
|
-
"
|
|
14
|
+
"5c2181dde311ca80b72e0cc76ac0855d8aa8b51e": "fragment ClientManyProducts on Query { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { products { pageInfo { totalCount } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier } fragment SearchEvent_metadata on SearchMetadata { fuzzy isTermMisspelled logicalOperator } query ServerManyProductsQuery($after: String, $first: Int!, $selectedFacets: [IStoreSelectedFacet!]!, $sort: StoreSort!, $sponsoredCount: Int, $term: String!) { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { metadata { ...SearchEvent_metadata } products { edges { node { ...ProductSummary_product } } pageInfo { totalCount } } } ...ClientManyProducts }"
|
|
15
15
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.42.0](https://github.com/vtex/faststore/compare/v3.41.9...v3.42.0) (2025-05-08)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Quick Order feature ([#2831](https://github.com/vtex/faststore/issues/2831)) ([875c6f4](https://github.com/vtex/faststore/commit/875c6f4ad4eb780cfa6f8a7aad445db5b3da2ee6))
|
|
11
|
+
|
|
12
|
+
## [3.41.9](https://github.com/vtex/faststore/compare/v3.41.8...v3.41.9) (2025-05-01)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- Sets domain search cookies ([#2811](https://github.com/vtex/faststore/issues/2811)) ([83bda9a](https://github.com/vtex/faststore/commit/83bda9a80554f57974e78e7bef1c454dc1bae3a7))
|
|
17
|
+
|
|
6
18
|
## [3.41.8](https://github.com/vtex/faststore/compare/v3.41.7...v3.41.8) (2025-04-30)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @faststore/core
|
|
@@ -221,6 +221,91 @@
|
|
|
221
221
|
"discount_desc",
|
|
222
222
|
"score_desc"
|
|
223
223
|
]
|
|
224
|
+
},
|
|
225
|
+
"quickOrderSettings": {
|
|
226
|
+
"title": "Quick Order settings",
|
|
227
|
+
"type": "object",
|
|
228
|
+
"properties": {
|
|
229
|
+
"quickOrder": {
|
|
230
|
+
"title": "Enable Quick Order?",
|
|
231
|
+
"description": "Allows adding products directly to the cart through search terms, streamlining the purchase.",
|
|
232
|
+
"type": "boolean",
|
|
233
|
+
"default": false
|
|
234
|
+
},
|
|
235
|
+
"skuMatrix": {
|
|
236
|
+
"title": "SKUMatrix Configuration",
|
|
237
|
+
"type": "object",
|
|
238
|
+
"properties": {
|
|
239
|
+
"triggerButtonLabel": {
|
|
240
|
+
"title": "SKU Matrix Trigger label to be displayed",
|
|
241
|
+
"type": "string",
|
|
242
|
+
"default": "Select multiple"
|
|
243
|
+
},
|
|
244
|
+
"columns": {
|
|
245
|
+
"title": "Columns",
|
|
246
|
+
"type": "object",
|
|
247
|
+
"properties": {
|
|
248
|
+
"name": {
|
|
249
|
+
"title": "SKU name column label",
|
|
250
|
+
"type": "string",
|
|
251
|
+
"default": "Name"
|
|
252
|
+
},
|
|
253
|
+
"additionalColumns": {
|
|
254
|
+
"title": "Additional columns",
|
|
255
|
+
"type": "array",
|
|
256
|
+
"items": {
|
|
257
|
+
"title": "Column",
|
|
258
|
+
"type": "object",
|
|
259
|
+
"required": ["label", "value"],
|
|
260
|
+
"properties": {
|
|
261
|
+
"label": {
|
|
262
|
+
"title": "Label",
|
|
263
|
+
"type": "string"
|
|
264
|
+
},
|
|
265
|
+
"value": {
|
|
266
|
+
"title": "Value",
|
|
267
|
+
"type": "string"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"availability": {
|
|
273
|
+
"title": "Availability column label",
|
|
274
|
+
"type": "object",
|
|
275
|
+
"properties": {
|
|
276
|
+
"label": {
|
|
277
|
+
"title": "Label",
|
|
278
|
+
"type": "string",
|
|
279
|
+
"default": "Availability"
|
|
280
|
+
},
|
|
281
|
+
"stockDisplaySettings": {
|
|
282
|
+
"title": "Stock display settings",
|
|
283
|
+
"description": "Control how the stock status of your products is displayed to customers on your online store.",
|
|
284
|
+
"type": "string",
|
|
285
|
+
"enum": ["showAvailability", "showStockQuantity"],
|
|
286
|
+
"enumNames": [
|
|
287
|
+
"Show availability (Available/Out of Stock)",
|
|
288
|
+
"Show stock quantity"
|
|
289
|
+
],
|
|
290
|
+
"default": "showAvailability"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"price": {
|
|
295
|
+
"title": "Price column label",
|
|
296
|
+
"type": "string",
|
|
297
|
+
"default": "Price"
|
|
298
|
+
},
|
|
299
|
+
"quantitySelector": {
|
|
300
|
+
"title": "Quantity selector column label",
|
|
301
|
+
"type": "string",
|
|
302
|
+
"default": "Quantity"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
224
309
|
}
|
|
225
310
|
}
|
|
226
311
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.42.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"@envelop/parser-cache": "^6.0.2",
|
|
46
46
|
"@envelop/validation-cache": "^6.0.2",
|
|
47
47
|
"@faststore/api": "^3.41.8",
|
|
48
|
-
"@faststore/components": "^3.
|
|
48
|
+
"@faststore/components": "^3.42.0",
|
|
49
49
|
"@faststore/graphql-utils": "^3.38.3",
|
|
50
50
|
"@faststore/lighthouse": "^3.38.3",
|
|
51
51
|
"@faststore/sdk": "^3.38.3",
|
|
52
|
-
"@faststore/ui": "^3.
|
|
52
|
+
"@faststore/ui": "^3.42.0",
|
|
53
53
|
"@graphql-codegen/cli": "5.0.2",
|
|
54
54
|
"@graphql-codegen/client-preset": "4.2.6",
|
|
55
55
|
"@graphql-codegen/typescript": "4.0.7",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"ts-jest": "29.1.1",
|
|
106
106
|
"typescript": "5.3.2"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "d8814aed0849211cb76d06b880c6d556bf1ac898"
|
|
109
109
|
}
|
|
@@ -143,6 +143,7 @@ function Navbar({
|
|
|
143
143
|
<SearchInput
|
|
144
144
|
placeholder={searchInput?.placeholder}
|
|
145
145
|
sort={searchInput?.sort}
|
|
146
|
+
quickOrderSettings={searchInput?.quickOrderSettings}
|
|
146
147
|
/>
|
|
147
148
|
)}
|
|
148
149
|
|
|
@@ -170,6 +171,7 @@ function Navbar({
|
|
|
170
171
|
buttonTestId="store-input-mobile-button"
|
|
171
172
|
onSearchClick={handlerExpandSearch}
|
|
172
173
|
sort={searchInput?.sort}
|
|
174
|
+
quickOrderSettings={searchInput?.quickOrderSettings}
|
|
173
175
|
hidden={!searchExpanded}
|
|
174
176
|
aria-hidden={!searchExpanded}
|
|
175
177
|
/>
|
|
@@ -170,10 +170,17 @@ export const fragment = gql(`
|
|
|
170
170
|
}
|
|
171
171
|
name
|
|
172
172
|
gtin
|
|
173
|
+
unitMultiplier
|
|
173
174
|
|
|
174
175
|
isVariantOf {
|
|
175
176
|
productGroupID
|
|
176
177
|
name
|
|
178
|
+
skuVariants {
|
|
179
|
+
allVariantsByName
|
|
180
|
+
activeVariations
|
|
181
|
+
slugsMap
|
|
182
|
+
availableVariations
|
|
183
|
+
}
|
|
177
184
|
}
|
|
178
185
|
|
|
179
186
|
image {
|
|
@@ -193,6 +200,7 @@ export const fragment = gql(`
|
|
|
193
200
|
price
|
|
194
201
|
listPrice
|
|
195
202
|
listPriceWithTaxes
|
|
203
|
+
priceWithTaxes
|
|
196
204
|
quantity
|
|
197
205
|
seller {
|
|
198
206
|
identifier
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Dispatch, SetStateAction } from 'react'
|
|
1
2
|
import {
|
|
2
3
|
SearchProducts,
|
|
3
4
|
SearchAutoComplete as UISearchAutoComplete,
|
|
@@ -17,10 +18,13 @@ import type {
|
|
|
17
18
|
IntelligentSearchAutocompleteClickEvent,
|
|
18
19
|
IntelligentSearchAutocompleteClickParams,
|
|
19
20
|
} from 'src/sdk/analytics/types'
|
|
21
|
+
import type { NavbarProps } from 'src/components/sections/Navbar'
|
|
20
22
|
|
|
21
23
|
interface SearchDropdownProps {
|
|
22
24
|
sort: SearchState['sort']
|
|
25
|
+
quickOrderSettings?: NavbarProps['searchInput']['quickOrderSettings']
|
|
23
26
|
[key: string]: any
|
|
27
|
+
onChangeCustomSearchDropdownVisible: Dispatch<SetStateAction<boolean>>
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
export function sendAutocompleteClickEvent({
|
|
@@ -37,7 +41,12 @@ export function sendAutocompleteClickEvent({
|
|
|
37
41
|
})
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
function SearchDropdown({
|
|
44
|
+
function SearchDropdown({
|
|
45
|
+
sort,
|
|
46
|
+
quickOrderSettings,
|
|
47
|
+
onChangeCustomSearchDropdownVisible,
|
|
48
|
+
...otherProps
|
|
49
|
+
}: SearchDropdownProps) {
|
|
41
50
|
const {
|
|
42
51
|
values: { onSearchSelection, products, term, terms },
|
|
43
52
|
} = useSearch()
|
|
@@ -79,6 +88,10 @@ function SearchDropdown({ sort, ...otherProps }: SearchDropdownProps) {
|
|
|
79
88
|
key={productParsed.id}
|
|
80
89
|
product={productParsed}
|
|
81
90
|
index={index}
|
|
91
|
+
quickOrderSettings={quickOrderSettings}
|
|
92
|
+
onChangeCustomSearchDropdownVisible={
|
|
93
|
+
onChangeCustomSearchDropdownVisible
|
|
94
|
+
}
|
|
82
95
|
/>
|
|
83
96
|
)
|
|
84
97
|
})}
|
|
@@ -30,6 +30,7 @@ import type { SearchProviderContextValue } from '@faststore/ui'
|
|
|
30
30
|
import useSearchHistory from 'src/sdk/search/useSearchHistory'
|
|
31
31
|
import useSuggestions from 'src/sdk/search/useSuggestions'
|
|
32
32
|
import useOnClickOutside from 'src/sdk/ui/useOnClickOutside'
|
|
33
|
+
import type { NavbarProps } from 'src/components/sections/Navbar'
|
|
33
34
|
|
|
34
35
|
import { formatSearchPath } from 'src/sdk/search/formatSearchPath'
|
|
35
36
|
|
|
@@ -50,6 +51,7 @@ export type SearchInputProps = {
|
|
|
50
51
|
buttonTestId?: string
|
|
51
52
|
containerStyle?: CSSProperties
|
|
52
53
|
placeholder?: string
|
|
54
|
+
quickOrderSettings?: NavbarProps['searchInput']['quickOrderSettings']
|
|
53
55
|
sort?: string
|
|
54
56
|
} & Omit<UISearchInputFieldProps, 'onSubmit'>
|
|
55
57
|
|
|
@@ -74,12 +76,17 @@ const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
74
76
|
containerStyle,
|
|
75
77
|
sort,
|
|
76
78
|
placeholder,
|
|
79
|
+
quickOrderSettings,
|
|
77
80
|
...otherProps
|
|
78
81
|
},
|
|
79
82
|
ref
|
|
80
83
|
) {
|
|
81
84
|
const { hidden } = otherProps
|
|
82
85
|
const [searchQuery, setSearchQuery] = useState<string>('')
|
|
86
|
+
const [
|
|
87
|
+
customSearchDropdownVisibleCondition,
|
|
88
|
+
setCustomSearchDropdownVisibleCondition,
|
|
89
|
+
] = useState<boolean>(false)
|
|
83
90
|
const searchQueryDeferred = useDeferredValue(searchQuery)
|
|
84
91
|
const [searchDropdownVisible, setSearchDropdownVisible] =
|
|
85
92
|
useState<boolean>(false)
|
|
@@ -102,7 +109,9 @@ const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
102
109
|
setSearchQuery(term)
|
|
103
110
|
}
|
|
104
111
|
|
|
105
|
-
useOnClickOutside(searchRef, () =>
|
|
112
|
+
useOnClickOutside(searchRef, () =>
|
|
113
|
+
setSearchDropdownVisible(customSearchDropdownVisibleCondition ?? false)
|
|
114
|
+
)
|
|
106
115
|
|
|
107
116
|
const { data, error } = useSuggestions(searchQueryDeferred)
|
|
108
117
|
const terms = (data?.search.suggestions.terms ?? []).slice(
|
|
@@ -163,7 +172,13 @@ const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
163
172
|
|
|
164
173
|
{searchDropdownVisible && (
|
|
165
174
|
<Suspense fallback={null}>
|
|
166
|
-
<SearchDropdown
|
|
175
|
+
<SearchDropdown
|
|
176
|
+
sort={sort as SearchState['sort']}
|
|
177
|
+
quickOrderSettings={quickOrderSettings}
|
|
178
|
+
onChangeCustomSearchDropdownVisible={
|
|
179
|
+
setCustomSearchDropdownVisibleCondition
|
|
180
|
+
}
|
|
181
|
+
/>
|
|
167
182
|
</Suspense>
|
|
168
183
|
)}
|
|
169
184
|
</UISearchInput>
|