@faststore/core 3.88.5 → 3.88.7
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 +52 -52
- 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 +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/8071.js +1 -1
- package/.next/server/chunks/948.js +1 -1
- package/.next/server/chunks/9563.js +2 -2
- package/.next/server/chunks/9630.js +1 -1
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/pages/api/graphql.js +2 -2
- package/.next/server/pages/en-US/404.html +1 -1
- package/.next/server/pages/en-US/500.html +1 -1
- package/.next/server/pages/en-US/checkout.html +1 -1
- package/.next/server/pages/en-US/login.html +1 -1
- package/.next/server/pages/en-US/s.html +1 -1
- package/.next/server/pages/en-US.html +1 -1
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/chunks/2284.be64169724492654.js +1 -0
- package/.next/static/chunks/9173-496f066fb8522bb9.js +1 -0
- package/.next/static/chunks/pages/{_app-7df8dc37869d32e8.js → _app-78bc68991096280c.js} +1 -1
- package/.next/static/chunks/{webpack-c7f9b413b744dbe4.js → webpack-747ebf1e0c896030.js} +1 -1
- package/.next/static/css/{0f990bb4836247c7.css → d26cb0a54378b3d9.css} +1 -1
- package/.next/static/{iqcrhwU7dkNsCBnGmd1Cf → pe6z3Z3bQ07PowbWL75Ts}/_buildManifest.js +1 -1
- package/.next/trace +137 -137
- package/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-test.log +5 -5
- package/@generated/gql.ts +2 -2
- package/@generated/graphql.ts +1 -12
- package/@generated/persisted-documents.json +1 -1
- package/@generated/schema.graphql +0 -10
- package/CHANGELOG.md +12 -0
- package/package.json +4 -4
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawer.tsx +3 -4
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerHeader.tsx +2 -4
- package/src/components/account/MyAccountDrawer/OrganizationDrawer/section.module.scss +4 -6
- package/src/components/account/MyAccountDrawer/ProfileSummary/ProfileSummary.tsx +1 -5
- package/src/components/search/SearchDropdown/SearchDropdown.tsx +20 -8
- package/src/sdk/session/index.ts +0 -3
- package/.next/static/chunks/2284.17a3e4c3af092981.js +0 -1
- package/.next/static/chunks/9173-228abc549c008914.js +0 -1
- /package/.next/static/{iqcrhwU7dkNsCBnGmd1Cf → pe6z3Z3bQ07PowbWL75Ts}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.88.
|
|
2
|
+
> @faststore/core@3.88.6 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.88.
|
|
6
|
+
> @faststore/core@3.88.6 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.88.
|
|
11
|
+
> @faststore/core@3.88.6 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.88.
|
|
15
|
+
> @faststore/core@3.88.6 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.88.
|
|
20
|
+
> @faststore/core@3.88.6 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.88.
|
|
40
|
+
> @faststore/core@3.88.6 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.88.
|
|
44
|
+
> @faststore/core@3.88.6 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
|
|
@@ -65,8 +65,8 @@ Browserslist: browsers data (caniuse-lite) is 8 months old. Please run:
|
|
|
65
65
|
Collecting page data ...
|
|
66
66
|
Generating static pages (0/6) ...
|
|
67
67
|
|
|
68
68
|
Generating static pages (1/6)
|
|
69
|
-
|
|
70
69
|
Generating static pages (2/6)
|
|
71
70
|
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.
|
|
71
|
+
|
|
72
72
|
Generating static pages (2/6)
|
|
73
73
|
|
|
74
74
|
Generating static pages (4/6)
|
|
75
75
|
|
|
76
76
|
✓ Generating static pages (6/6)
|
|
77
77
|
Finalizing page optimization ...
|
|
@@ -108,8 +108,8 @@ Route (pages) Size First Load JS
|
|
|
108
108
|
+ First Load JS shared by all 111 kB
|
|
109
109
|
├ chunks/framework-d514426edf885c68.js 45.4 kB
|
|
110
110
|
├ chunks/main-595f5e3b626b9fff.js 33.2 kB
|
|
111
|
-
├ chunks/pages/_app-
|
|
112
|
-
├ chunks/webpack-
|
|
111
|
+
├ chunks/pages/_app-78bc68991096280c.js 25 kB
|
|
112
|
+
├ chunks/webpack-747ebf1e0c896030.js 3.85 kB
|
|
113
113
|
└ css/24a5e8f6808266fe.css 3.53 kB
|
|
114
114
|
|
|
115
115
|
λ (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.88.
|
|
2
|
+
> @faststore/core@3.88.6 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/
|
|
6
|
-
PASS test/
|
|
5
|
+
PASS test/utils/multipleTemplates.test.ts (28.406 s)
|
|
6
|
+
PASS test/server/cms/global.test.ts (28.911 s)
|
|
7
7
|
PASS test/server/cms/index.test.ts
|
|
8
|
-
PASS test/server/index.test.ts (31.
|
|
8
|
+
PASS test/server/index.test.ts (31.65 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: 32.
|
|
13
|
+
Time: 32.799 s
|
|
14
14
|
Ran all test suites.
|
package/@generated/gql.ts
CHANGED
|
@@ -86,7 +86,7 @@ const documents = {
|
|
|
86
86
|
types.ClientSearchSuggestionsQueryDocument,
|
|
87
87
|
'\n query ClientTopSearchSuggestionsQuery(\n $term: String!\n $selectedFacets: [IStoreSelectedFacet!]\n ) {\n ...ClientTopSearchSuggestions\n search(first: 5, term: $term, selectedFacets: $selectedFacets) {\n suggestions {\n terms {\n value\n }\n }\n }\n }\n':
|
|
88
88
|
types.ClientTopSearchSuggestionsQueryDocument,
|
|
89
|
-
'\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n
|
|
89
|
+
'\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n refreshAfter\n }\n }\n':
|
|
90
90
|
types.ValidateSessionDocument,
|
|
91
91
|
'\n query ClientShippingSimulationQuery(\n $postalCode: String!\n $country: String!\n $items: [IShippingItem!]!\n ) {\n ...ClientShippingSimulation\n shipping(items: $items, postalCode: $postalCode, country: $country) {\n logisticsInfo {\n slas {\n carrier\n price\n availableDeliveryWindows {\n startDateUtc\n endDateUtc\n price\n listPrice\n }\n shippingEstimate\n localizedEstimates\n deliveryChannel\n }\n }\n address {\n city\n neighborhood\n state\n }\n }\n }\n':
|
|
92
92
|
types.ClientShippingSimulationQueryDocument,
|
|
@@ -320,7 +320,7 @@ export function gql(
|
|
|
320
320
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
321
321
|
*/
|
|
322
322
|
export function gql(
|
|
323
|
-
source: '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n
|
|
323
|
+
source: '\n mutation ValidateSession($session: IStoreSession!, $search: String!) {\n validateSession(session: $session, search: $search) {\n locale\n channel\n country\n addressType\n postalCode\n city\n deliveryMode {\n deliveryChannel\n deliveryMethod\n deliveryWindow {\n startDate\n endDate\n }\n }\n geoCoordinates {\n latitude\n longitude\n }\n currency {\n code\n symbol\n }\n person {\n id\n email\n givenName\n familyName\n }\n b2b {\n customerId\n isRepresentative\n unitName\n unitId\n firstName\n lastName\n userName\n userEmail\n savedPostalCode\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n refreshAfter\n }\n }\n'
|
|
324
324
|
): typeof import('./graphql').ValidateSessionDocument
|
|
325
325
|
/**
|
|
326
326
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
package/@generated/graphql.ts
CHANGED
|
@@ -417,7 +417,6 @@ export type IStoreB2B = {
|
|
|
417
417
|
firstName: InputMaybe<Scalars['String']['input']>
|
|
418
418
|
isRepresentative: InputMaybe<Scalars['Boolean']['input']>
|
|
419
419
|
lastName: InputMaybe<Scalars['String']['input']>
|
|
420
|
-
permissions: IStoreB2BPermissions
|
|
421
420
|
savedPostalCode: InputMaybe<Scalars['String']['input']>
|
|
422
421
|
unitId: InputMaybe<Scalars['String']['input']>
|
|
423
422
|
unitName: InputMaybe<Scalars['String']['input']>
|
|
@@ -425,10 +424,6 @@ export type IStoreB2B = {
|
|
|
425
424
|
userName: InputMaybe<Scalars['String']['input']>
|
|
426
425
|
}
|
|
427
426
|
|
|
428
|
-
export type IStoreB2BPermissions = {
|
|
429
|
-
canManageOrganization: Scalars['Boolean']['input']
|
|
430
|
-
}
|
|
431
|
-
|
|
432
427
|
/** Shopping cart input. */
|
|
433
428
|
export type IStoreCart = {
|
|
434
429
|
/** Order information, including `orderNumber`, `acceptedOffer` and `shouldSplitItem`. */
|
|
@@ -1135,7 +1130,6 @@ export type StoreB2B = {
|
|
|
1135
1130
|
firstName: Maybe<Scalars['String']['output']>
|
|
1136
1131
|
isRepresentative: Maybe<Scalars['Boolean']['output']>
|
|
1137
1132
|
lastName: Maybe<Scalars['String']['output']>
|
|
1138
|
-
permissions: StoreB2BPermissions
|
|
1139
1133
|
savedPostalCode: Maybe<Scalars['String']['output']>
|
|
1140
1134
|
unitId: Maybe<Scalars['String']['output']>
|
|
1141
1135
|
unitName: Maybe<Scalars['String']['output']>
|
|
@@ -1143,10 +1137,6 @@ export type StoreB2B = {
|
|
|
1143
1137
|
userName: Maybe<Scalars['String']['output']>
|
|
1144
1138
|
}
|
|
1145
1139
|
|
|
1146
|
-
export type StoreB2BPermissions = {
|
|
1147
|
-
canManageOrganization: Scalars['Boolean']['output']
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
1140
|
/** Brand of a given product. */
|
|
1151
1141
|
export type StoreBrand = {
|
|
1152
1142
|
/** Brand name. */
|
|
@@ -3609,7 +3599,6 @@ export type ValidateSessionMutation = {
|
|
|
3609
3599
|
userName: string | null
|
|
3610
3600
|
userEmail: string | null
|
|
3611
3601
|
savedPostalCode: string | null
|
|
3612
|
-
permissions: { canManageOrganization: boolean }
|
|
3613
3602
|
} | null
|
|
3614
3603
|
marketingData: {
|
|
3615
3604
|
utmCampaign: string | null
|
|
@@ -4506,7 +4495,7 @@ export const ClientTopSearchSuggestionsQueryDocument = {
|
|
|
4506
4495
|
export const ValidateSessionDocument = {
|
|
4507
4496
|
__meta__: {
|
|
4508
4497
|
operationName: 'ValidateSession',
|
|
4509
|
-
operationHash: '
|
|
4498
|
+
operationHash: '5da2700f5a69ee8835b1cb6c69e14f4b6e12c4df',
|
|
4510
4499
|
},
|
|
4511
4500
|
} as unknown as TypedDocumentString<
|
|
4512
4501
|
ValidateSessionMutation,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"34ea14c0d4a57ddf9bc11e4be0cd2b5a6506d3d4": "query ClientProfileQuery($id: String!) { profile(id: $id) { addresses { city country geoCoordinate postalCode } } }",
|
|
23
23
|
"bbaa2ed75c4fb04842189e8d53a1d65481154e2b": "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 } deliveryPromiseBadges { typeName } gtin hasSpecifications image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } isVariantOf { name productGroupID skuVariants { activeVariations allVariantProducts { name productID } availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier 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 }",
|
|
24
24
|
"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 }",
|
|
25
|
-
"
|
|
25
|
+
"5da2700f5a69ee8835b1cb6c69e14f4b6e12c4df": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType b2b { customerId firstName isRepresentative lastName savedPostalCode unitId unitName userEmail userName } channel city 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 refreshAfter } }",
|
|
26
26
|
"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 }",
|
|
27
27
|
"4b769cda49004c85d0d427c601eba36c37a52224": "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 } deliveryPromiseBadges { typeName } gtin hasSpecifications image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } isVariantOf { name productGroupID skuVariants { activeVariations allVariantProducts { name productID } availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier 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 }"
|
|
28
28
|
}
|
|
@@ -1252,10 +1252,6 @@ type StoreSession {
|
|
|
1252
1252
|
refreshAfter: String
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
|
-
type StoreB2BPermissions {
|
|
1256
|
-
canManageOrganization: Boolean!
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
1255
|
type StoreB2B {
|
|
1260
1256
|
customerId: String!
|
|
1261
1257
|
isRepresentative: Boolean
|
|
@@ -1266,11 +1262,6 @@ type StoreB2B {
|
|
|
1266
1262
|
userName: String
|
|
1267
1263
|
userEmail: String
|
|
1268
1264
|
savedPostalCode: String
|
|
1269
|
-
permissions: StoreB2BPermissions!
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
input IStoreB2BPermissions {
|
|
1273
|
-
canManageOrganization: Boolean!
|
|
1274
1265
|
}
|
|
1275
1266
|
|
|
1276
1267
|
input IStoreB2B {
|
|
@@ -1283,7 +1274,6 @@ input IStoreB2B {
|
|
|
1283
1274
|
userName: String
|
|
1284
1275
|
userEmail: String
|
|
1285
1276
|
savedPostalCode: String
|
|
1286
|
-
permissions: IStoreB2BPermissions!
|
|
1287
1277
|
}
|
|
1288
1278
|
|
|
1289
1279
|
"""Session input."""
|
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.88.7](https://github.com/vtex/faststore/compare/v3.88.6...v3.88.7) (2025-09-25)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- refactor search dropdown to handle analytics events asynchronously ([#3057](https://github.com/vtex/faststore/issues/3057)) ([ebd0ead](https://github.com/vtex/faststore/commit/ebd0eadfaf80f493e4defd88e47517f346720810))
|
|
11
|
+
|
|
12
|
+
## [3.88.6](https://github.com/vtex/faststore/compare/v3.88.5...v3.88.6) (2025-09-23)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- Revert "feat: add organization management permission validation ([#3029](https://github.com/vtex/faststore/issues/3029))" - SFS-2880 ([#3054](https://github.com/vtex/faststore/issues/3054)) ([68854b1](https://github.com/vtex/faststore/commit/68854b120b28d910b4ab48c93c1fbb60fe0e470d))
|
|
17
|
+
|
|
6
18
|
## [3.88.5](https://github.com/vtex/faststore/compare/v3.88.4...v3.88.5) (2025-09-22)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.88.
|
|
3
|
+
"version": "3.88.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@envelop/graphql-jit": "^8.0.3",
|
|
45
45
|
"@envelop/parser-cache": "^6.0.2",
|
|
46
46
|
"@envelop/validation-cache": "^6.0.2",
|
|
47
|
-
"@faststore/api": "^3.88.
|
|
47
|
+
"@faststore/api": "^3.88.6",
|
|
48
48
|
"@faststore/graphql-utils": "^3.81.0",
|
|
49
49
|
"@faststore/lighthouse": "^3.81.0",
|
|
50
|
-
"@faststore/sdk": "^3.
|
|
50
|
+
"@faststore/sdk": "^3.88.6",
|
|
51
51
|
"@faststore/ui": "^3.88.0",
|
|
52
52
|
"@graphql-codegen/cli": "5.0.2",
|
|
53
53
|
"@graphql-codegen/client-preset": "4.2.6",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"ts-jest": "29.1.1",
|
|
117
117
|
"typescript": "5.3.2"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "a8f722fb40f8861f9ed4aedaae4305cb028ca3fe"
|
|
120
120
|
}
|
|
@@ -30,10 +30,9 @@ export const OrganizationDrawer = ({
|
|
|
30
30
|
|
|
31
31
|
const contractName = person?.givenName ?? ''
|
|
32
32
|
|
|
33
|
-
const contractUrl =
|
|
34
|
-
b2b?.unitId
|
|
35
|
-
|
|
36
|
-
: null
|
|
33
|
+
const contractUrl = b2b?.unitId
|
|
34
|
+
? `/pvt/organization-account/org-unit/${b2b?.unitId}`
|
|
35
|
+
: null
|
|
37
36
|
|
|
38
37
|
return (
|
|
39
38
|
<SlideOver
|
package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawerHeader.tsx
CHANGED
|
@@ -14,13 +14,11 @@ export const OrganizationDrawerHeader = ({
|
|
|
14
14
|
contractImage,
|
|
15
15
|
onCloseDrawer,
|
|
16
16
|
}: OrganizationDrawerHeaderProps) => {
|
|
17
|
-
const TitleComponent = contractUrl ? Link : 'div'
|
|
18
|
-
|
|
19
17
|
return (
|
|
20
18
|
<>
|
|
21
19
|
<SlideOverHeader onClose={() => onCloseDrawer?.()} />
|
|
22
20
|
<div data-fs-organization-drawer-header>
|
|
23
|
-
<
|
|
21
|
+
<Link
|
|
24
22
|
data-fs-organization-drawer-header-contract-link
|
|
25
23
|
{...(contractUrl && { href: contractUrl })}
|
|
26
24
|
>
|
|
@@ -34,7 +32,7 @@ export const OrganizationDrawerHeader = ({
|
|
|
34
32
|
<h1 data-fs-organization-drawer-header-contract-name>
|
|
35
33
|
{contractName}
|
|
36
34
|
</h1>
|
|
37
|
-
</
|
|
35
|
+
</Link>
|
|
38
36
|
</div>
|
|
39
37
|
</>
|
|
40
38
|
)
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
@import "../ProfileSummary/profile-summary.scss";
|
|
21
21
|
|
|
22
22
|
[data-fs-organization-drawer] {
|
|
23
|
-
--fs-organization-drawer-header-contract-color: #cbe9ff;
|
|
24
|
-
--fs-organization-drawer-body-link-color: #f5f5f5;
|
|
23
|
+
--fs-organization-drawer-header-contract-color : #cbe9ff;
|
|
24
|
+
--fs-organization-drawer-body-link-color : #f5f5f5;
|
|
25
25
|
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: column;
|
|
@@ -61,10 +61,8 @@
|
|
|
61
61
|
transition: all 1s ease;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
text-decoration: underline;
|
|
67
|
-
}
|
|
64
|
+
[data-fs-organization-drawer-header-contract-name]:hover {
|
|
65
|
+
text-decoration: underline;
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
[data-fs-organization-drawer-header-contract-image] {
|
|
@@ -25,10 +25,6 @@ export const ProfileSummary = ({
|
|
|
25
25
|
}: ProfileSummaryProps) => {
|
|
26
26
|
const { b2b } = useSession()
|
|
27
27
|
|
|
28
|
-
// TODO fix it
|
|
29
|
-
const showBuyerPortalManageLink = true
|
|
30
|
-
// showManageLink && b2b?.permissions?.canManageOrganization && b2b?.unitId
|
|
31
|
-
|
|
32
28
|
return (
|
|
33
29
|
<section
|
|
34
30
|
data-fs-profile-summary
|
|
@@ -37,7 +33,7 @@ export const ProfileSummary = ({
|
|
|
37
33
|
>
|
|
38
34
|
<div data-fs-profile-summary-header>
|
|
39
35
|
<h2 data-fs-profile-summary-org-name>{orgName}</h2>
|
|
40
|
-
{
|
|
36
|
+
{showManageLink && (
|
|
41
37
|
<Link
|
|
42
38
|
data-fs-profile-summary-org-link
|
|
43
39
|
href={`/pvt/organization-account/org-unit/${b2b?.unitId}`}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
SearchDropdown as UISearchDropdown,
|
|
6
6
|
useSearch,
|
|
7
7
|
} from '@faststore/ui'
|
|
8
|
-
import
|
|
8
|
+
import React, { type Dispatch, type SetStateAction } from 'react'
|
|
9
9
|
|
|
10
10
|
import { SearchHistory } from '../SearchHistory'
|
|
11
11
|
import { SearchTop } from '../SearchTop'
|
|
@@ -33,8 +33,8 @@ export function sendAutocompleteClickEvent({
|
|
|
33
33
|
position,
|
|
34
34
|
productId,
|
|
35
35
|
}: IntelligentSearchAutocompleteClickParams) {
|
|
36
|
-
import('@faststore/sdk').then(({ sendAnalyticsEvent }) => {
|
|
37
|
-
sendAnalyticsEvent<IntelligentSearchAutocompleteClickEvent>({
|
|
36
|
+
return import('@faststore/sdk').then(({ sendAnalyticsEvent }) => {
|
|
37
|
+
return sendAnalyticsEvent<IntelligentSearchAutocompleteClickEvent>({
|
|
38
38
|
name: 'intelligent_search_autocomplete_click',
|
|
39
39
|
params: { term, url, productId, position },
|
|
40
40
|
})
|
|
@@ -66,15 +66,27 @@ function SearchDropdown({
|
|
|
66
66
|
term: suggestion,
|
|
67
67
|
sort,
|
|
68
68
|
}),
|
|
69
|
-
onClick: () => {
|
|
69
|
+
onClick: async (event: React.MouseEvent<HTMLAnchorElement>) => {
|
|
70
|
+
event.preventDefault()
|
|
71
|
+
|
|
72
|
+
const href = formatSearchPath({ term: suggestion, sort })
|
|
73
|
+
|
|
74
|
+
// Execute search selection callback
|
|
70
75
|
onSearchSelection?.(
|
|
71
76
|
term,
|
|
72
77
|
formatSearchPath({ term: term, sort })
|
|
73
78
|
)
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
|
|
80
|
+
// Wait for analytics event to complete
|
|
81
|
+
try {
|
|
82
|
+
await sendAutocompleteClickEvent({
|
|
83
|
+
term: term,
|
|
84
|
+
url: window.location.href,
|
|
85
|
+
})
|
|
86
|
+
} catch (_) {}
|
|
87
|
+
|
|
88
|
+
// Navigate after events are completed
|
|
89
|
+
window.location.href = href
|
|
78
90
|
},
|
|
79
91
|
}}
|
|
80
92
|
/>
|
package/src/sdk/session/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2284],{42284:function(e,t,r){r.r(t),r.d(t,{default:function(){return search_SearchDropdown_SearchDropdown},sendAutocompleteClickEvent:function(){return sendAutocompleteClickEvent}});var a=r(33067),n=r(34235),i=r(11933),o=r(64583),c=r(42174),s=r(80757),l=r(19994),u=r(22701),d=r(9482),m=r(91379),f=r(31549);function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach(function(t){(0,a.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var search_SearchHistory_SearchHistory=e=>{var t=Object.assign({},e),{values:{onSearchSelection:r}}=(0,i.R)(),{searchHistory:a,clearSearchHistory:n}=(0,m.Z)();return a.length?(0,f.jsx)(u.Z,_objectSpread(_objectSpread({title:"History",onClear:n},t),{},{children:a.map(e=>(0,f.jsx)(d.Z,{value:e.term,linkProps:{href:e.path,onClick:()=>null==r?void 0:r(e.term,e.path)}},e.term))})):null},p=r(43311),h=r(21287),v=r(50704),y=r(25487),g=r(52693),b=r(97358),O=y.M,search_useTopSearch=function(){var{channel:e,locale:t}=(0,b.kP)(),{data:r,error:a}=(0,g.aM)(O,{term:"",selectedFacets:[{key:"channel",value:null!=e?e:""},{key:"locale",value:t}]});return{data:r,error:a}},w=["topTerms","sort"];function SearchTop_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function SearchTop_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?SearchTop_ownKeys(Object(r),!0).forEach(function(t){(0,a.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SearchTop_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var search_SearchTop_SearchTop=function(e){var t,{topTerms:r=[],sort:a}=e,o=(0,n.Z)(e,w),{values:{onSearchSelection:c}}=(0,i.R)(),{data:s}=search_useTopSearch(),l=(null!==(t=null==s?void 0:s.search.suggestions.terms)&&void 0!==t?t:r).slice(0,5);return 0===l.length?null:(0,f.jsx)(p.Z,SearchTop_objectSpread(SearchTop_objectSpread({title:"Top Search"},o),{},{children:l.map((e,t)=>(0,f.jsx)(h.Z,{value:e.value,index:t,linkProps:{href:(0,v.u)({term:e.value,sort:a}),onClick:()=>null==c?void 0:c(e.value,(0,v.u)({term:e.value,sort:a}))}},t))}))},E=r(16652),S=r(86035),k=r(69082),j=r(57190),P=r(2614),_=r(47866),Z=r(27859),C=r(44194),x=r(2056),D=r(68687),I=r(29746),q=r(70643),R=r(78563),T=r(1090),M=r.n(T),K=["product","index","quickOrderSettings","onChangeCustomSearchDropdownVisible"],V=["href","onClick"];function SearchProductItem_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function SearchProductItem_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?SearchProductItem_ownKeys(Object(r),!0).forEach(function(t){(0,a.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SearchProductItem_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var search_SearchProductItem_SearchProductItem=function(e){var{product:t,index:r,quickOrderSettings:a,onChangeCustomSearchDropdownVisible:o}=e,c=(0,n.Z)(e,K),{values:{term:s,onSearchSelection:l}}=(0,i.R)(),{pushToast:u}=(0,E.l8)(),{__experimentalSKUMatrixSidebar:d}=(0,I.r3)(),m=(0,R.w)({product:t,selectedOffer:0,index:r}),{href:p,onClick:h}=m,v=(0,n.Z)(m,V),{0:y,1:g}=(0,C.useState)(1),{id:b,sku:O,gtin:w,brand:T,isVariantOf:L,isVariantOf:{name:Q},unitMultiplier:B,image:[F],offers:{lowPrice:N,offers:[{listPrice:U,availability:A,price:H,listPriceWithTaxes:G,seller:z,priceWithTaxes:W,quantity:$}]},additionalProperty:J}=t,X=SearchProductItem_objectSpread({href:p,onClick:()=>{var e;h(),null==l||l(Q,p),sendAutocompleteClickEvent({url:p,term:s,position:r,productId:null!==(e=t.isVariantOf.productGroupID)&&void 0!==e?e:t.sku})}},v),Y=(0,C.useMemo)(()=>"https://schema.org/OutOfStock"===A,[A]),ee=(0,C.useMemo)(()=>!!Object.keys(t.isVariantOf.skuVariants.allVariantsByName).length,[t]),et=(0,D.Q)({id:b,price:H,priceWithTaxes:W,listPrice:U,listPriceWithTaxes:G,seller:z,quantity:y,itemOffered:{sku:O,name:Q,gtin:w,image:[F],brand:T,isVariantOf:L,additionalProperty:J,unitMultiplier:B}},!1);return(0,f.jsxs)(S.Z,SearchProductItem_objectSpread(SearchProductItem_objectSpread({linkProps:X},c),{},{children:[(0,f.jsx)(k.Z,{children:(0,f.jsx)(x.Z,{src:F.url,alt:F.alternateName,width:56,height:56})}),(0,f.jsx)(j.Z,{title:Q,price:{value:N,listPrice:U,formatter:q.P},onValidateBlur:(e,t,r)=>u({title:"Invalid quantity!",message:"The quantity you entered is outside the range of ".concat(e," to ").concat(t,". The quantity was set to ").concat(r,"."),status:"INFO",icon:(0,f.jsx)(P.Z,{name:"CircleWavyWarning",width:30,height:30})}),quickOrder:{enabled:null==a?void 0:a.quickOrder,outOfStockLabel:"Out of stock",availability:!Y,hasVariants:ee,buyProps:et,quantity:y,onChangeQuantity:g,max:$,skuMatrixControl:(0,f.jsx)(f.Fragment,{children:(null==a?void 0:a.quickOrder)&&(0,f.jsxs)(_.Z,{children:[(0,f.jsx)(Z.Z,{children:null==a?void 0:a.skuMatrix.triggerButtonLabel}),(0,f.jsx)(d.Component,{overlayProps:{className:M().section},formatter:q.P,columns:null==a?void 0:a.skuMatrix.columns,product:t,status:e=>o("visible"===e)})]})})}})]}))},L=["sort","quickOrderSettings","onChangeCustomSearchDropdownVisible"];function SearchDropdown_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function SearchDropdown_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?SearchDropdown_ownKeys(Object(r),!0).forEach(function(t){(0,a.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SearchDropdown_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function sendAutocompleteClickEvent(e){var{url:t,term:a,position:n,productId:i}=e;r.e(9399).then(r.bind(r,66393)).then(e=>{var{sendAnalyticsEvent:r}=e;r({name:"intelligent_search_autocomplete_click",params:{term:a,url:t,productId:i,position:n}})})}var search_SearchDropdown_SearchDropdown=function(e){var{sort:t,quickOrderSettings:r,onChangeCustomSearchDropdownVisible:a}=e,u=(0,n.Z)(e,L),{values:{onSearchSelection:d,products:m,term:p,terms:h}}=(0,i.R)();return(0,f.jsxs)(o.Z,SearchDropdown_objectSpread(SearchDropdown_objectSpread({},u),{},{children:[(0,f.jsx)(search_SearchHistory_SearchHistory,{sort:t}),(0,f.jsx)(search_SearchTop_SearchTop,{sort:t}),(0,f.jsx)(c.Z,{children:null==h?void 0:h.map(e=>{var{value:r}=e;return(0,f.jsx)(s.Z,{term:p,suggestion:r,linkProps:{href:(0,v.u)({term:r,sort:t}),onClick:()=>{null==d||d(p,(0,v.u)({term:p,sort:t})),sendAutocompleteClickEvent({term:p,url:window.location.href})}}},r)})}),(0,f.jsx)(l.Z,{children:m.map((e,t)=>(0,f.jsx)(search_SearchProductItem_SearchProductItem,{product:e,index:t,quickOrderSettings:r,onChangeCustomSearchDropdownVisible:a},e.id))})]}))}},68687:function(e,t,r){r.d(t,{Q:function(){return useBuyButton}});var a=r(44194),n=r(16652),i=r(97358),o=r(71041),useBuyButton=function(e){var t,c=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{openCart:s}=(0,n.l8)(),{currency:{code:l}}=(0,i.kP)(),u=Array.isArray(e);return{onClick:(0,a.useCallback)(t=>{if(t.preventDefault(),e){var a=u?e.reduce((e,t)=>e+=t.price*t.quantity,0):e.price*e.quantity;r.e(9399).then(r.bind(r,66393)).then(t=>{var{sendAnalyticsEvent:r}=t;r({name:"add_to_cart",params:{currency:l,value:a,items:u?e.map(generatedItem):[generatedItem(e)]}})}),u?e.forEach(e=>o.i8.addItem(e)):o.i8.addItem(e),c&&s()}function generatedItem(e){return{item_id:e.itemOffered.isVariantOf.productGroupID,item_name:e.itemOffered.isVariantOf.name,item_brand:e.itemOffered.brand.name,item_variant:e.itemOffered.sku,quantity:e.quantity,price:e.price,discount:e.listPrice-e.price,currency:l,item_variant_name:e.itemOffered.name,product_reference_id:e.itemOffered.gtin}}},[l,e,s,u]),"data-testid":"buy-button","data-sku":u?"sku-matrix-sidebar":null==e?void 0:e.itemOffered.sku,"data-seller":u?null===(t=e[0])||void 0===t?void 0:t.seller.identifier:null==e?void 0:e.seller.identifier}}},70643:function(e,t,r){r.d(t,{P:function(){return useFormattedPrice}});var a=r(44194),n=r(97358),usePriceFormatter=function(){var{decimals:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{currency:t,locale:r}=(0,n.kP)();return(0,a.useCallback)(a=>Intl.NumberFormat(r,{style:"currency",currency:t.code,minimumFractionDigits:e?2:0}).format(a),[t.code,r,e])},useFormattedPrice=e=>{var t=usePriceFormatter();return(0,a.useMemo)(()=>t(e),[t,e])}},78563:function(e,t,r){r.d(t,{w:function(){return useProductLink}});var a=r(44194),n=r(97358),useProductLink=e=>{var{index:t,product:i,selectedOffer:o}=e,{slug:c}=i,{currency:{code:s}}=(0,n.kP)(),l=(0,a.useCallback)(()=>{r.e(9399).then(r.bind(r,66393)).then(e=>{var{sendAnalyticsEvent:r}=e;r({name:"select_item",params:{items:[{item_id:i.isVariantOf.productGroupID,item_name:i.isVariantOf.name,item_brand:i.brand.name,item_variant:i.sku,index:t,price:i.offers.offers[o].price,discount:i.offers.offers[o].listPrice-i.offers.offers[o].price,currency:s,item_variant_name:i.name,product_reference_id:i.gtin}]}}),r({name:"search_select_item",params:{url:window.location.href,items:[{item_id:i.isVariantOf.productGroupID,item_variant:i.sku,index:t}]}})})},[s,i,t,o]);return{href:"/".concat(c,"/p"),onClick:l,"data-testid":"product-link"}}},99767:function(e,t,r){var a=r(44194),n=r(55450);let i=(0,a.forwardRef)(function({value:e,as:t="span",variant:r="selling",testId:i="fs-price",formatter:o=e=>e,SRText:c,...s},l){let u=o(e,r);return a.createElement(t,{ref:l,"data-fs-price":!0,"data-fs-price-variant":r,"data-testid":i,...s},c&&a.createElement(n.Z,{text:c}),u)});t.Z=i},55450:function(e,t,r){var a=r(44194);t.Z=function({text:e,as:t}){let r=t??"span";return a.createElement(r,{"data-fs-sr-only":!0},e)}},72955:function(e,t,r){r.d(t,{_:function(){return useSKUMatrix}});var a=r(44194),n=r(63442);function useSKUMatrix(){let e=(0,a.useContext)(n.m);if(!e)throw Error("Do not use SKUMatrix components outside the SKUMatrix context.");return e}},11933:function(e,t,r){r.d(t,{R:function(){return useSearch}});var a=r(44194),n=r(50101);let useSearch=()=>{let e=(0,a.useContext)(n.c);return e?{inContext:!0,values:e}:{inContext:!1}}},69088:function(e,t,r){var a=r(44194),n=r(99767);let i=(0,a.forwardRef)(function({testId:e="fs-product-price",value:t,listPrice:r,formatter:i,...o},c){let s=r??0,l=t??0;return a.createElement("div",{ref:c,"data-fs-product-price":!0,"data-testid":e,...o},l!==s&&0!==s?a.createElement(a.Fragment,null,a.createElement(n.Z,{value:s,formatter:i,testId:"list-price","data-value":s,variant:"listing",SRText:"Original price:"}),a.createElement(n.Z,{value:l,formatter:i,testId:"price","data-value":l,variant:"spot",SRText:"Price:"})):a.createElement(n.Z,{value:l,formatter:i,testId:"price","data-value":l,variant:"spot",SRText:"Price:"}))});t.Z=i},6693:function(e,t,r){var a=r(44194),n=r(37041),i=r(2614),o=r(42256);t.Z=({max:e,min:t=1,unitMultiplier:r=1,useUnitMultiplier:c,initial:s,disabled:l=!1,onChange:u,onValidateBlur:d,testId:m="fs-quantity-selector",...f})=>{let[p,h]=(0,a.useState)(s??t),[v,y]=(0,a.useState)(p*r),roundUpQuantityIfNeeded=e=>c?Math.ceil(e/r)*r:e,g=p===t,b=p===e,changeQuantity=e=>{let t=validateQuantityBounds(p+e);u?.(t),h(t),y(t*r)};function validateQuantityBounds(a){let n=t?Math.max(a,t):a;return e?Math.min(n,c?e*r:e):n}return(0,a.useEffect)(()=>{s&&h(s)},[s]),a.createElement("div",{"data-fs-quantity-selector":l?"disabled":"true","data-testid":m,...f},a.createElement(n.Z,{"data-quantity-selector-button":"left",icon:a.createElement(i.Z,{name:"Minus",width:16,height:16,weight:"bold"}),"aria-label":"Decrement Quantity","aria-controls":"quantity-selector-input",disabled:g||l,onClick:()=>changeQuantity(-1),testId:`${m}-left-button`,size:"small"}),a.createElement(o.Z,{"data-quantity-selector-input":!0,id:"quantity-selector-input","aria-label":"Quantity",value:c?v:p,onChange:e=>{let t=e.target.value.replace(/\D/g,"");h(Number(t))},onBlur:function(){let a=validateQuantityBounds(p),n=roundUpQuantityIfNeeded(a),i=e??(t?Math.max(p,t):p),o=p>i||p<t;o&&d?.(t,i,n),h(()=>(y(n),u?.(n/r),n/r))},onInput:e=>{let t=e.currentTarget;t.value=t.value.replace(/\D/g,"")},disabled:l}),a.createElement(n.Z,{"data-quantity-selector-button":"right","aria-controls":"quantity-selector-input","aria-label":"Increment Quantity",disabled:b||l,icon:a.createElement(i.Z,{name:"Plus",width:16,height:16,weight:"bold"}),onClick:()=>changeQuantity(1),testId:`${m}-right-button`,size:"small"}))}},42174:function(e,t,r){var a=r(44194),n=r(11933),i=r(94564);t.Z=({testId:e="fs-search-auto-complete",children:t,...r})=>{let{inContext:o,values:c}=(0,n.R)();return o&&(c.terms.length<=0||c.term.length<=0)?null:a.createElement("section",{"data-testid":e,"data-fs-search-auto-complete":!0,...r},a.createElement(i.Z,{as:"ol"},t))}},80757:function(e,t,r){var a=r(44194),n=r(2614),i=r(40727);t.Z=({testId:e="fs-search-auto-complete-term",suggestion:t,term:r,linkProps:o,icon:c=a.createElement(n.Z,{name:"MagnifyingGlass",width:18,height:18})})=>{let s=t.toLowerCase().split(r.toLowerCase());return a.createElement("li",{"data-fs-search-auto-complete-item":!0,"data-testid":e},a.createElement(i.Z,{...o,"data-fs-search-auto-complete-item-link":!0,variant:"display"},a.createElement("span",{"data-fs-search-auto-complete-item-icon":!0},c),a.createElement("p",null,s.map((e,n)=>a.createElement(a.Fragment,{key:[e,n].join()},e.length>0&&a.createElement("strong",{"data-fs-search-auto-complete-item-suggestion":!0},0===n?e.charAt(0).toUpperCase()+e.slice(1):e),n!==s.length-1&&(0===n?r.split("").map((e,r)=>0===r&&0===t.indexOf(e.toUpperCase())?e.toUpperCase():e.toLowerCase()).join(""):r.toLowerCase()))))))}},64583:function(e,t,r){var a=r(44194),n=r(11933);let SearchLoading=()=>{let{inContext:e,values:t}=(0,n.R)();return a.createElement(a.Fragment,null,e&&t.isLoading&&a.createElement("p",{"data-fs-search-dropdown-loading-text":!0},"Loading..."))},i=(0,a.forwardRef)(function({testId:e="fs-search-dropdown",children:t,...r},n){return a.createElement("div",{ref:n,"data-fs-search-dropdown":!0,"data-testid":e,...r},a.createElement("section",null,a.createElement(SearchLoading,null),t))});t.Z=i},22701:function(e,t,r){var a=r(44194),n=r(11933),i=r(83339),o=r(94564);t.Z=({testId:e="fs-search-history",title:t="History",clearLabel:r="Clear History",onClear:c,children:s,...l})=>{let{inContext:u,values:d}=(0,n.R)();return u&&(0!==d.term.length||d.isLoading)?null:a.createElement("section",{"data-testid":e,"data-fs-search-history":!0,...l},a.createElement("header",{"data-fs-search-history-header":!0},a.createElement("p",{"data-fs-search-history-title":!0},t),a.createElement(i.Z,{variant:"tertiary",onClick:c,size:"small"},r)),a.createElement(o.Z,{as:"ol"},s))}},9482:function(e,t,r){var a=r(44194),n=r(2614),i=r(40727);t.Z=({testId:e="fs-search-history-term",value:t,linkProps:r,icon:o=a.createElement(n.Z,{name:"ClockClockwise",width:18,height:18})})=>a.createElement("li",{"data-fs-search-history-item":!0,"data-testid":e},a.createElement(i.Z,{...r,"data-fs-search-history-item-link":!0,variant:"display"},a.createElement("span",{"data-fs-search-history-item-icon":!0},o),a.createElement("span",null,t)))},86035:function(e,t,r){var a=r(44194),n=r(40727);let i=(0,a.forwardRef)(function({testId:e="fs-search-product-item",linkProps:t,children:r},i){return a.createElement("li",{ref:i,"data-fs-search-product-item":!0,"data-testid":e},a.createElement(n.Z,{...t,"data-fs-search-product-item-link":!0,variant:"display"},r))});t.Z=i},57190:function(e,t,r){r.d(t,{Z:function(){return f}});var a=r(44194),n=r(69088),i=r(83982),o=r(2614),c=r(40276),s=r(6693),l=r(42256),u=r(37041);let d=(0,a.forwardRef)(function({availability:e,children:t,hasVariants:r,skuMatrixControl:n,quantity:d,outOfStockLabel:m,min:f=1,max:p,onClick:h,onChangeQuantity:v,onValidateBlur:y,...g},b){let[O,w]=(0,a.useState)("default"),E=e&&r;function stopPropagationClick(e){e.preventDefault(),e.stopPropagation()}let S=(0,a.useCallback)(()=>{switch(O){case"inProgress":return a.createElement(i.Z,null);case"completed":return a.createElement(o.Z,{name:"Checked",width:24,height:24});default:return a.createElement(o.Z,{name:"ShoppingCart",width:24,height:24})}},[O]);return a.createElement("div",{ref:b,"data-fs-search-product-item-control":!0,...g},a.createElement("div",{"data-fs-search-product-item-control-content":!0},!e&&a.createElement(c.Z,{"data-fs-search-product-item-control-badge":!0,variant:"warning"},m),t),e&&!r&&a.createElement("div",{"data-fs-search-product-item-control-actions":!0,role:"group","aria-hidden":!0,tabIndex:-1,onKeyDown:()=>{},onClick:stopPropagationClick},a.createElement("div",{"data-fs-search-product-item-control-actions-desktop":!0},a.createElement(s.Z,{disabled:"default"!==O,max:p,onValidateBlur:y,initial:d,onChange:v})),a.createElement("div",{"data-fs-search-product-item-control-actions-mobile":!0},a.createElement(l.Z,{"data-fs-product-item-control-input":!0,min:1,value:d,onChange:e=>v(e.target.value?Number(e.target.value):0),onBlur:function(){let e=p??(f?Math.max(d,f):d),t=d>e||d<f,r=d>e?e:d<f?f:d;t&&y?.(f,e,r),v(r)},onInput:e=>{let t=e.currentTarget;t.value=t.value.replace(/\D/g,"")}})),a.createElement(u.Z,{variant:"primary","aria-label":"Add product to cart",onClick:function(e){h&&(w("inProgress"),setTimeout(()=>{w("completed"),h(e)},1e3),setTimeout(()=>{w("default"),v(1)},2e3))},disabled:"inProgress"===O,icon:S()})),E&&a.createElement("div",{onClick:stopPropagationClick,"aria-hidden":!0,tabIndex:-1,onKeyDown:()=>{}},n))}),m=(0,a.forwardRef)(function({price:e,title:t,quickOrder:r,onValidateBlur:i,...o},c){let s=(0,a.useCallback)(()=>a.createElement(a.Fragment,null,a.createElement("p",{"data-fs-search-product-item-title":!0},t),0!==e.value&&a.createElement(n.Z,{"data-fs-search-product-item-prices":!0,listPrice:e.listPrice,value:e.value,formatter:e.formatter})),[e.formatter,e.listPrice,e.value,t]);return a.createElement("section",{ref:c,"data-fs-search-product-item-content":!0,...o},!r?.enabled&&s(),r?.enabled&&a.createElement(d,{outOfStockLabel:r.outOfStockLabel,availability:r.availability,hasVariants:r.hasVariants,skuMatrixControl:r.skuMatrixControl,quantity:r.quantity,onChangeQuantity:r.onChangeQuantity,max:r.max,onValidateBlur:i,...r.buyProps},s()))});var f=m},69082:function(e,t,r){var a=r(44194);let n=(0,a.forwardRef)(function({testId:e="fs-search-product-item-image",children:t,...r},n){return a.createElement("div",{ref:n,"data-fs-search-product-item-image":!0,"data-testid":e,...r},t)});t.Z=n},19994:function(e,t,r){var a=r(44194),n=r(11933),i=r(94564);t.Z=({testId:e="fs-search-products",title:t="Suggested Products",children:r,...o})=>{let{inContext:c,values:s}=(0,n.R)();return c&&s.products.length<=0?null:a.createElement("section",{"data-testid":e,"data-fs-search-products":!0,...o},a.createElement("header",{"data-fs-search-products-header":!0},a.createElement("p",{"data-fs-search-products-title":!0},t)),a.createElement(i.Z,{as:"ol"},r))}},43311:function(e,t,r){var a=r(44194),n=r(11933),i=r(94564);let o=(0,a.forwardRef)(function({testId:e="fs-top-search",title:t="Top Search",children:r,...o},c){let{inContext:s,values:l}=(0,n.R)();return s&&(0!==l.term.length||l.isLoading)?null:a.createElement("section",{ref:c,"data-testid":e,"data-fs-search-top":!0,...o},a.createElement("header",{"data-fs-search-top-header":!0},a.createElement("p",{"data-fs-search-top-title":!0},t)),a.createElement(i.Z,{as:"ol"},r))});t.Z=o},21287:function(e,t,r){var a=r(44194),n=r(40727),i=r(40276);let o=(0,a.forwardRef)(function({testId:e="fs-top-search-term",value:t,linkProps:r,index:o},c){return a.createElement("li",{ref:c,"data-fs-search-top-item":!0,"data-testid":e},a.createElement(n.Z,{...r,"data-fs-search-top-item-link":!0,variant:"display"},a.createElement(i.Z,{"data-fs-search-top-item-badge":!0,variant:"info"},o+1),t))});t.Z=o},47866:function(e,t,r){var a=r(44194),n=r(63442);let i=(0,a.forwardRef)(function({testId:e="fs-sku-matrix",children:t,...r},i){return a.createElement("div",{ref:i,"data-fs-sku-matrix":!0,"data-testid":e,...r},a.createElement(n.Z,null,t))});t.Z=i},27859:function(e,t,r){var a=r(44194),n=r(83339),i=r(72955);let o=(0,a.forwardRef)(function({children:e,variant:t="secondary",onClick:r,...o},c){let{setIsOpen:s}=(0,i._)();return a.createElement(n.Z,{ref:c,variant:t,onClick:e=>{s(!0),r?.(e)},...o},e)});t.Z=o},63442:function(e,t,r){r.d(t,{m:function(){return n}});var a=r(44194);let n=(0,a.createContext)(null);t.Z=function({children:e}){let[t,r]=(0,a.useState)(!1),[i,o]=(0,a.useState)([]),c=(0,a.useCallback)((e,t)=>{let r=[...i],a=r.find(t=>t.id===e);return a&&(a.selectedCount=t),o(r),r},[i]);return a.createElement(n.Provider,{value:{isOpen:t,allVariantProducts:i,setAllVariantProducts:o,onChangeQuantityItem:c,setIsOpen:r}},e)}}}]);
|