@faststore/core 3.63.0 → 3.64.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 +3 -3
- 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/routes-manifest.json +1 -1
- package/.next/server/chunks/6011.js +1 -1
- package/.next/server/chunks/9563.js +2 -2
- package/.next/server/functions-config-manifest.json +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/account/orders/[id].js +1 -1
- package/.next/server/pages/api/graphql.js +2 -2
- package/.next/server/pages/en-US/404.html +2 -2
- package/.next/server/pages/en-US/500.html +2 -2
- package/.next/server/pages/en-US/checkout.html +2 -2
- package/.next/server/pages/en-US/login.html +2 -2
- package/.next/server/pages/en-US/s.html +2 -2
- package/.next/server/pages/en-US.html +2 -2
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/{ACJhTM9AboFQMIRbBuxZx → _fNL5rUsrvwdHfkRr9RdO}/_buildManifest.js +1 -1
- package/.next/static/chunks/pages/account/orders/[id]-0780c7252aa3283f.js +1 -0
- package/.next/trace +129 -129
- package/.turbo/turbo-build.log +9 -9
- package/.turbo/turbo-test.log +5 -5
- package/@generated/gql.ts +2 -2
- package/@generated/graphql.ts +3 -4
- package/@generated/persisted-documents.json +1 -1
- package/@generated/schema.graphql +1 -2
- package/CHANGELOG.md +12 -0
- package/package.json +3 -3
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordion.tsx +2 -1
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderActions/MyAccountOrderActions.tsx +3 -3
- package/src/components/account/orders/MyAccountOrderDetails/MyAccountOrderDetails.tsx +1 -1
- package/src/pages/account/orders/[id].tsx +1 -1
- package/.next/static/chunks/pages/account/orders/[id]-40637c13cd4487aa.js +0 -1
- /package/.next/static/{ACJhTM9AboFQMIRbBuxZx → _fNL5rUsrvwdHfkRr9RdO}/_ssgManifest.js +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.
|
|
2
|
+
> @faststore/core@3.63.1 prebuild /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> na run partytown && na run generate
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @faststore/core@3.
|
|
6
|
+
> @faststore/core@3.63.1 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.
|
|
11
|
+
> @faststore/core@3.63.1 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.
|
|
15
|
+
> @faststore/core@3.63.1 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.
|
|
20
|
+
> @faststore/core@3.63.1 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.
|
|
40
|
+
> @faststore/core@3.63.1 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.
|
|
44
|
+
> @faststore/core@3.63.1 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
|
|
@@ -62,8 +62,8 @@ Browserslist: browsers data (caniuse-lite) is 6 months old. Please run:
|
|
|
62
62
|
Collecting page data ...
|
|
63
63
|
Generating static pages (0/6) ...
|
|
64
64
|
|
|
65
65
|
Generating static pages (1/6)
|
|
66
|
-
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.
|
|
67
66
|
|
|
68
67
|
Generating static pages (2/6)
|
|
68
|
+
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.
|
|
69
69
|
|
|
70
70
|
Generating static pages (4/6)
|
|
71
71
|
|
|
72
72
|
✓ Generating static pages (6/6)
|
|
73
73
|
Finalizing page optimization ...
|
|
@@ -88,7 +88,7 @@ Route (pages) Size First Load JS
|
|
|
88
88
|
├ └ css/5347dbc8b71de47d.css 4.25 kB
|
|
89
89
|
├ λ /account/orders 8.57 kB 138 kB
|
|
90
90
|
├ └ css/8a3f440e0ff9cd8e.css 11.9 kB
|
|
91
|
-
├ λ /account/orders/[id] 10 kB
|
|
91
|
+
├ λ /account/orders/[id] 10.1 kB 140 kB
|
|
92
92
|
├ └ css/506442c818624bd2.css 11.5 kB
|
|
93
93
|
├ λ /account/profile 1.27 kB 131 kB
|
|
94
94
|
├ λ /account/security 1.27 kB 131 kB
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @faststore/core@3.
|
|
2
|
+
> @faststore/core@3.63.1 test /home/runner/work/faststore/faststore/packages/core
|
|
3
3
|
> jest
|
|
4
4
|
|
|
5
|
-
PASS test/
|
|
6
|
-
PASS test/
|
|
5
|
+
PASS test/server/cms/global.test.ts (24.984 s)
|
|
6
|
+
PASS test/utils/multipleTemplates.test.ts (25.457 s)
|
|
7
7
|
PASS test/server/cms/index.test.ts
|
|
8
|
-
PASS test/server/index.test.ts (
|
|
8
|
+
PASS test/server/index.test.ts (31.389 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: 32.566 s
|
|
14
14
|
Ran all test suites.
|
package/@generated/gql.ts
CHANGED
|
@@ -44,7 +44,7 @@ const documents = {
|
|
|
44
44
|
types.ServerProductQueryDocument,
|
|
45
45
|
'\n fragment UserOrderItemsFragment on UserOrderItems {\n id\n name\n quantity\n sellingPrice\n unitMultiplier\n measurementUnit\n imageUrl\n detailUrl\n refId\n rewardValue\n }\n':
|
|
46
46
|
types.UserOrderItemsFragmentFragmentDoc,
|
|
47
|
-
'\n query ServerOrderDetailsQuery($orderId: String!) {\n userOrder(orderId: $orderId) {\n orderId\n status\n
|
|
47
|
+
'\n query ServerOrderDetailsQuery($orderId: String!) {\n userOrder(orderId: $orderId) {\n orderId\n status\n statusDescription\n allowCancellation\n storePreferencesData {\n currencyCode\n }\n clientProfileData {\n firstName\n lastName\n email\n phone\n corporateName\n isCorporate\n }\n customFields {\n type\n id\n fields {\n name\n value\n refId\n }\n }\n deliveryOptionsData {\n deliveryOptions {\n selectedSla\n deliveryChannel\n deliveryCompany\n deliveryWindow {\n startDateUtc\n endDateUtc\n price\n }\n shippingEstimate\n shippingEstimateDate\n friendlyShippingEstimate\n friendlyDeliveryOptionName\n seller\n address {\n addressType\n receiverName\n addressId\n versionId\n entityId\n postalCode\n city\n state\n country\n street\n number\n neighborhood\n complement\n reference\n geoCoordinates\n }\n pickupStoreInfo {\n additionalInfo\n address {\n addressType\n receiverName\n addressId\n versionId\n entityId\n postalCode\n city\n state\n country\n street\n number\n neighborhood\n complement\n reference\n geoCoordinates\n }\n dockId\n friendlyName\n isPickupStore\n }\n quantityOfDifferentItems\n total\n items {\n id\n uniqueId\n name\n quantity\n price\n imageUrl\n tax\n total\n }\n }\n contact {\n email\n phone\n name\n }\n }\n paymentData {\n transactions {\n isActive\n payments {\n id\n paymentSystemName\n value\n installments\n referenceValue\n lastDigits\n url\n group\n tid\n connectorResponses {\n authId\n }\n bankIssuedInvoiceIdentificationNumber\n redemptionCode\n paymentOrigin\n }\n }\n }\n totals {\n id\n name\n value\n }\n }\n accountName\n }\n':
|
|
48
48
|
types.ServerOrderDetailsQueryDocument,
|
|
49
49
|
'\n query ServerListOrdersQuery ($page: Int,$perPage: Int, $status: [String], $dateInitial: String, $dateFinal: String, $text: String, $clientEmail: String) {\n listUserOrders (page: $page, perPage: $perPage, status: $status, dateInitial: $dateInitial, dateFinal: $dateFinal, text: $text, clientEmail: $clientEmail) {\n list {\n orderId\n creationDate\n clientName\n items {\n seller\n quantity\n description\n ean\n refId\n id\n productId\n sellingPrice\n price\n }\n totalValue\n status\n statusDescription\n ShippingEstimatedDate\n currencyCode\n customFields {\n type\n value\n }\n }\n paging {\n total\n pages\n currentPage\n perPage\n }\n }\n accountName\n }\n':
|
|
50
50
|
types.ServerListOrdersQueryDocument,
|
|
@@ -186,7 +186,7 @@ export function gql(
|
|
|
186
186
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
187
187
|
*/
|
|
188
188
|
export function gql(
|
|
189
|
-
source: '\n query ServerOrderDetailsQuery($orderId: String!) {\n userOrder(orderId: $orderId) {\n orderId\n status\n
|
|
189
|
+
source: '\n query ServerOrderDetailsQuery($orderId: String!) {\n userOrder(orderId: $orderId) {\n orderId\n status\n statusDescription\n allowCancellation\n storePreferencesData {\n currencyCode\n }\n clientProfileData {\n firstName\n lastName\n email\n phone\n corporateName\n isCorporate\n }\n customFields {\n type\n id\n fields {\n name\n value\n refId\n }\n }\n deliveryOptionsData {\n deliveryOptions {\n selectedSla\n deliveryChannel\n deliveryCompany\n deliveryWindow {\n startDateUtc\n endDateUtc\n price\n }\n shippingEstimate\n shippingEstimateDate\n friendlyShippingEstimate\n friendlyDeliveryOptionName\n seller\n address {\n addressType\n receiverName\n addressId\n versionId\n entityId\n postalCode\n city\n state\n country\n street\n number\n neighborhood\n complement\n reference\n geoCoordinates\n }\n pickupStoreInfo {\n additionalInfo\n address {\n addressType\n receiverName\n addressId\n versionId\n entityId\n postalCode\n city\n state\n country\n street\n number\n neighborhood\n complement\n reference\n geoCoordinates\n }\n dockId\n friendlyName\n isPickupStore\n }\n quantityOfDifferentItems\n total\n items {\n id\n uniqueId\n name\n quantity\n price\n imageUrl\n tax\n total\n }\n }\n contact {\n email\n phone\n name\n }\n }\n paymentData {\n transactions {\n isActive\n payments {\n id\n paymentSystemName\n value\n installments\n referenceValue\n lastDigits\n url\n group\n tid\n connectorResponses {\n authId\n }\n bankIssuedInvoiceIdentificationNumber\n redemptionCode\n paymentOrigin\n }\n }\n }\n totals {\n id\n name\n value\n }\n }\n accountName\n }\n'
|
|
190
190
|
): typeof import('./graphql').ServerOrderDetailsQueryDocument
|
|
191
191
|
/**
|
|
192
192
|
* The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
package/@generated/graphql.ts
CHANGED
|
@@ -1270,7 +1270,6 @@ export type UserOrder = {
|
|
|
1270
1270
|
allowEdition: Maybe<Scalars['Boolean']['output']>
|
|
1271
1271
|
authorizedDate: Maybe<Scalars['String']['output']>
|
|
1272
1272
|
callCenterOperatorData: Maybe<Scalars['String']['output']>
|
|
1273
|
-
canCancelOrder: Maybe<Scalars['Boolean']['output']>
|
|
1274
1273
|
cancelReason: Maybe<Scalars['String']['output']>
|
|
1275
1274
|
cancellationData: Maybe<UserOrderCancellationData>
|
|
1276
1275
|
cancellationRequests: Maybe<Array<Maybe<UserOrderCancellationRequest>>>
|
|
@@ -1532,6 +1531,7 @@ export type UserOrderDeliveryOptionsItems = {
|
|
|
1532
1531
|
quantity: Maybe<Scalars['Int']['output']>
|
|
1533
1532
|
tax: Maybe<Scalars['Float']['output']>
|
|
1534
1533
|
total: Maybe<Scalars['Float']['output']>
|
|
1534
|
+
uniqueId: Maybe<Scalars['String']['output']>
|
|
1535
1535
|
}
|
|
1536
1536
|
|
|
1537
1537
|
export type UserOrderDeliveryWindow = {
|
|
@@ -1918,7 +1918,6 @@ export type UserOrderRestitutions = {
|
|
|
1918
1918
|
|
|
1919
1919
|
export type UserOrderResult = {
|
|
1920
1920
|
allowCancellation: Maybe<Scalars['Boolean']['output']>
|
|
1921
|
-
canCancelOrder: Maybe<Scalars['Boolean']['output']>
|
|
1922
1921
|
clientProfileData: Maybe<UserOrderClientProfileData>
|
|
1923
1922
|
customData: Maybe<UserOrderCustomData>
|
|
1924
1923
|
customFields: Maybe<Array<Maybe<UserOrderCustomFieldsGrouped>>>
|
|
@@ -2277,7 +2276,6 @@ export type ServerOrderDetailsQueryQuery = {
|
|
|
2277
2276
|
userOrder: {
|
|
2278
2277
|
orderId: string | null
|
|
2279
2278
|
status: string | null
|
|
2280
|
-
canCancelOrder: boolean | null
|
|
2281
2279
|
statusDescription: string | null
|
|
2282
2280
|
allowCancellation: boolean | null
|
|
2283
2281
|
storePreferencesData: { currencyCode: string | null } | null
|
|
@@ -2357,6 +2355,7 @@ export type ServerOrderDetailsQueryQuery = {
|
|
|
2357
2355
|
} | null
|
|
2358
2356
|
items: Array<{
|
|
2359
2357
|
id: string | null
|
|
2358
|
+
uniqueId: string | null
|
|
2360
2359
|
name: string | null
|
|
2361
2360
|
quantity: number | null
|
|
2362
2361
|
price: number | null
|
|
@@ -3512,7 +3511,7 @@ export const ServerProductQueryDocument = {
|
|
|
3512
3511
|
export const ServerOrderDetailsQueryDocument = {
|
|
3513
3512
|
__meta__: {
|
|
3514
3513
|
operationName: 'ServerOrderDetailsQuery',
|
|
3515
|
-
operationHash: '
|
|
3514
|
+
operationHash: '577feb29827ad55ea5b52fbc4e36844fbee9109d',
|
|
3516
3515
|
},
|
|
3517
3516
|
} as unknown as TypedDocumentString<
|
|
3518
3517
|
ServerOrderDetailsQueryQuery,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"47315a3cd26ddd9c7fa963778988464341b8193f": "query ServerAccountPageQuery { accountName }",
|
|
3
3
|
"4b33c5c07f440dc7489e55619dc2211a13786e72": "fragment ServerCollectionPage on Query { collection(slug: $slug) { id } } query ServerCollectionPageQuery($slug: String!) { collection(slug: $slug) { breadcrumbList { itemListElement { item name position } } meta { selectedFacets { key value } } seo { description title } } ...ServerCollectionPage }",
|
|
4
4
|
"46103bee661405bde706d72126fdbf9b0a0c9e6e": "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 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 } fragment ServerProduct on Query { product(locator: $locator) { id: productID } } query ServerProductQuery($locator: [IStoreSelectedFacet!]!) { product(locator: $locator) { brand { name } breadcrumbList { itemListElement { item name position } } description gtin image { alternateName url } isVariantOf { productGroupID } name offers { highPrice lowPrice lowPriceWithTaxes offers { availability itemCondition price priceCurrency priceValidUntil seller { identifier } } priceCurrency } id: productID releaseDate seo { canonical description title } sku ...ProductDetailsFragment_product } ...ServerProduct }",
|
|
5
|
-
"
|
|
5
|
+
"577feb29827ad55ea5b52fbc4e36844fbee9109d": "query ServerOrderDetailsQuery($orderId: String!) { accountName userOrder(orderId: $orderId) { allowCancellation clientProfileData { corporateName email firstName isCorporate lastName phone } customFields { fields { name refId value } id type } deliveryOptionsData { contact { email name phone } deliveryOptions { address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } deliveryChannel deliveryCompany deliveryWindow { endDateUtc price startDateUtc } friendlyDeliveryOptionName friendlyShippingEstimate items { id imageUrl name price quantity tax total uniqueId } pickupStoreInfo { additionalInfo address { addressId addressType city complement country entityId geoCoordinates neighborhood number postalCode receiverName reference state street versionId } dockId friendlyName isPickupStore } quantityOfDifferentItems selectedSla seller shippingEstimate shippingEstimateDate total } } orderId paymentData { transactions { isActive payments { bankIssuedInvoiceIdentificationNumber connectorResponses { authId } group id installments lastDigits paymentOrigin paymentSystemName redemptionCode referenceValue tid url value } } } status statusDescription storePreferencesData { currencyCode } totals { id name value } } }",
|
|
6
6
|
"ee84ac3f5b58c5e1950a927a42c5c1dd6012fcc4": "query ServerListOrdersQuery($clientEmail: String, $dateFinal: String, $dateInitial: String, $page: Int, $perPage: Int, $status: [String], $text: String) { accountName listUserOrders( page: $page perPage: $perPage status: $status dateInitial: $dateInitial dateFinal: $dateFinal text: $text clientEmail: $clientEmail ) { list { ShippingEstimatedDate clientName creationDate currencyCode customFields { type value } items { description ean id price productId quantity refId seller sellingPrice } orderId status statusDescription totalValue } paging { currentPage pages perPage total } } }",
|
|
7
7
|
"c4191223fe0b642eee3aaaa2c56563da7d163265": "query ServerProfileQuery { accountName }",
|
|
8
8
|
"9f24767f16e6e05c168336701a6c6c7b6b5dc1c6": "query ServerSecurityQuery { accountName }",
|
|
@@ -1280,13 +1280,11 @@ type UserOrder {
|
|
|
1280
1280
|
totals: [UserOrderTotals]
|
|
1281
1281
|
deliveryOptionsData: UserOrderDeliveryOptionsData
|
|
1282
1282
|
customFields: [UserOrderCustomFieldsGrouped]
|
|
1283
|
-
canCancelOrder: Boolean
|
|
1284
1283
|
}
|
|
1285
1284
|
|
|
1286
1285
|
type UserOrderResult {
|
|
1287
1286
|
orderId: String
|
|
1288
1287
|
status: String
|
|
1289
|
-
canCancelOrder: Boolean
|
|
1290
1288
|
statusDescription: String
|
|
1291
1289
|
allowCancellation: Boolean
|
|
1292
1290
|
storePreferencesData: UserOrderStorePreferencesData
|
|
@@ -1879,6 +1877,7 @@ type UserOrderDeliveryOption {
|
|
|
1879
1877
|
|
|
1880
1878
|
type UserOrderDeliveryOptionsItems {
|
|
1881
1879
|
id: String
|
|
1880
|
+
uniqueId: String
|
|
1882
1881
|
name: String
|
|
1883
1882
|
quantity: Int
|
|
1884
1883
|
price: Float
|
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.64.0](https://github.com/vtex/faststore/compare/v3.63.1...v3.64.0) (2025-07-15)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add uniqueId field to UserOrder items and update related components ([#2945](https://github.com/vtex/faststore/issues/2945)) ([d48ea5a](https://github.com/vtex/faststore/commit/d48ea5af35a538f7e07c14cf90330b87cf27178a))
|
|
11
|
+
|
|
12
|
+
## [3.63.1](https://github.com/vtex/faststore/compare/v3.63.0...v3.63.1) (2025-07-15)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- use allowCancellation to validate cancel order button ([#2942](https://github.com/vtex/faststore/issues/2942)) ([1f0f6a9](https://github.com/vtex/faststore/commit/1f0f6a9dc27436b6de63e2aff58a1086d4b2ae2a)), closes [/github.com/vtex/my-orders/blob/ff400736a4b6ea8eb70298c2de26a6e974489fc3/react/pages/CancelOrder.jsx#L116](https://github.com//github.com/vtex/my-orders/blob/ff400736a4b6ea8eb70298c2de26a6e974489fc3/react/pages/CancelOrder.jsx/issues/L116) [/github.com/vtex/my-orders/blob/ff400736a4b6ea8eb70298c2de26a6e974489fc3/react/components/Order/OrderActions.jsx#L41](https://github.com//github.com/vtex/my-orders/blob/ff400736a4b6ea8eb70298c2de26a6e974489fc3/react/components/Order/OrderActions.jsx/issues/L41)
|
|
17
|
+
|
|
6
18
|
# [3.63.0](https://github.com/vtex/faststore/compare/v3.62.0...v3.63.0) (2025-07-14)
|
|
7
19
|
|
|
8
20
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.64.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "vtex/faststore",
|
|
6
6
|
"browserslist": "supports es6-module and not dead",
|
|
@@ -44,7 +44,7 @@
|
|
|
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.
|
|
47
|
+
"@faststore/api": "^3.64.0",
|
|
48
48
|
"@faststore/graphql-utils": "^3.56.1",
|
|
49
49
|
"@faststore/lighthouse": "^3.56.1",
|
|
50
50
|
"@faststore/sdk": "^3.63.0",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
"ts-jest": "29.1.1",
|
|
106
106
|
"typescript": "5.3.2"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "016d1a9af1ac985995f4a0ffb523144869289fb8"
|
|
109
109
|
}
|
|
@@ -76,7 +76,8 @@ function MyAccountDeliveryOptionAccordion({
|
|
|
76
76
|
quantity={item.quantity}
|
|
77
77
|
name={item.name}
|
|
78
78
|
field={
|
|
79
|
-
customFields?.find((cf) => cf.id === item.
|
|
79
|
+
customFields?.find((cf) => cf.id === item.uniqueId)
|
|
80
|
+
?.fields?.[0]
|
|
80
81
|
}
|
|
81
82
|
price={formatPrice(item.price ?? 0, currencyCode)}
|
|
82
83
|
tax={formatPrice(item.tax ?? 0, currencyCode)}
|
|
@@ -23,13 +23,13 @@ const TOASTS_CONFIG = {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
interface MyAccountOrderActionsProps {
|
|
26
|
-
|
|
26
|
+
allowCancellation: boolean
|
|
27
27
|
orderId: string
|
|
28
28
|
customerEmail?: string
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export default function MyAccountOrderActions({
|
|
32
|
-
|
|
32
|
+
allowCancellation,
|
|
33
33
|
orderId,
|
|
34
34
|
customerEmail,
|
|
35
35
|
}: MyAccountOrderActionsProps) {
|
|
@@ -89,7 +89,7 @@ export default function MyAccountOrderActions({
|
|
|
89
89
|
return (
|
|
90
90
|
<>
|
|
91
91
|
<div data-fs-order-details-header-actions>
|
|
92
|
-
{
|
|
92
|
+
{allowCancellation && (
|
|
93
93
|
<UIButton
|
|
94
94
|
variant="secondary"
|
|
95
95
|
data-fs-order-details-header-actions-cancel
|
|
@@ -52,7 +52,7 @@ export default function MyAccountOrderDetails({
|
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
54
|
<MyAccountOrderActions
|
|
55
|
-
|
|
55
|
+
allowCancellation={order.allowCancellation}
|
|
56
56
|
orderId={order.orderId}
|
|
57
57
|
customerEmail={order.clientProfileData?.email}
|
|
58
58
|
/>
|
|
@@ -73,7 +73,6 @@ const query = gql(`
|
|
|
73
73
|
userOrder(orderId: $orderId) {
|
|
74
74
|
orderId
|
|
75
75
|
status
|
|
76
|
-
canCancelOrder
|
|
77
76
|
statusDescription
|
|
78
77
|
allowCancellation
|
|
79
78
|
storePreferencesData {
|
|
@@ -155,6 +154,7 @@ const query = gql(`
|
|
|
155
154
|
total
|
|
156
155
|
items {
|
|
157
156
|
id
|
|
157
|
+
uniqueId
|
|
158
158
|
name
|
|
159
159
|
quantity
|
|
160
160
|
price
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1117],{6886:function(e,t,r){"use strict";r.d(t,{Z:function(){return MyAccountLayout_MyAccountLayout}});var n=r(7306),a=r(727),o=r(9009),c=r(3339),i=r(7085),d=r.n(i),s=r(679),l=r(1549),Nav=e=>{var{items:t}=e,r=(0,c.useRouter)().pathname;return(0,l.jsx)("ul",{className:d().nav,children:t.map(e=>{var{route:t,title:n}=e;return(0,l.jsx)("li",{className:d().navItem,"data-is-selected":r.includes(t),children:(0,l.jsx)(a.Z,{href:t,tabIndex:0,children:n})},t)})})},MyAccountMenu_MyAccountMenu=e=>{var{avatarImageUrl:t,accountName:r,items:n}=e,{isDesktop:a}=(0,s.Z)();return(0,l.jsxs)("div",{className:d().menu,children:[a?(0,l.jsxs)("div",{className:d().account,children:[(0,l.jsxs)("div",{className:d().avatarContainer,children:[t?(0,l.jsx)("img",{className:d().avatar,src:t}):(0,l.jsx)("span",{className:d().avatar,children:null==r?void 0:r[0]}),(0,l.jsx)("h2",{children:r})]}),(0,l.jsx)(o.Z,{className:d().switchButton,variant:"secondary",size:"small",children:"Switch"})]}):null,(0,l.jsx)(Nav,{items:n})]})},MyAccountLayout_MyAccountLayout=e=>{var{children:t,accountName:r}=e;return(0,l.jsxs)("div",{className:d().layout,children:[(0,l.jsx)(MyAccountMenu_MyAccountMenu,{accountName:r,items:n.Z}),(0,l.jsx)("section",{children:t})]})}},2562:function(e,t,r){"use strict";var n=r(5759),a=r(1549);t.Z=function(e){var t,{status:r,statusFallback:o}=e;return(0,a.jsx)("span",{"data-fs-my-account-badge":!0,"data-fs-my-account-badge-variant":function(e){var t,{status:r}=e;return(null===(t=n._y[r])||void 0===t?void 0:t.variant)||"neutral"}({status:r}),children:(null===(t=n._y[r])||void 0===t?void 0:t.label)||o||"-"})}},6896:function(e,t,r){"use strict";r.d(t,{p:function(){return useFormatPrice}});var n=r(31),a=r(4194),useFormatPrice=()=>{var{locale:e}=(0,n.kP)();return(0,a.useCallback)((t,r)=>new Intl.NumberFormat(e,{style:"currency",currency:r,minimumFractionDigits:2}).format(t/100),[e])}},6205:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return et},default:function(){return OrderDetailsPage},fragment:function(){return er}});var n=r(3067),a=r(5487),o=r(5935),c=r(6886),i=r(7041),d=r(2614),s=r(792),l=r(4194),u=r(4235),p=r(6678),y=r(1549),f=["children"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}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,n.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 MyAccountCard_MyAccountCard=function(e){var{children:t}=e,r=(0,u.Z)(e,f);return(0,y.jsx)(p.Z,_objectSpread(_objectSpread({},r),{},{"data-fs-my-account-card":!0,children:t}))},v=r(5759),m=r(679),h={order:{completed:"Order Placed",loading:"Order Placed","not-started":"Order Placed",failed:"Order Placed"},approval:{completed:"Approved",loading:"Approval Pending","not-started":"Approval Pending",failed:"Denied"},payment:{completed:"Payment Approved",loading:"Payment Pending","not-started":"Payment authorization",failed:"Payment Denied"},processing:{completed:"Ready for Delivery",loading:"Handling order","not-started":"Handling order",failed:"Canceled"},shipping:{completed:"Invoiced",loading:"Shipping order","not-started":"Ship order",failed:"Canceled"}},j=[{label:e=>h.order[e],key:"order"},{label:e=>h.approval[e],key:"approval"},{label:e=>h.payment[e],key:"payment"},{label:e=>h.processing[e],key:"processing"},{label:e=>h.shipping[e],key:"shipping"}],b={"Order Placed":"order","Approval Pending":"approval","Payment Pending":"payment","Payment Approved":"processing","Payment Denied":"payment","Ready for Delivery":"processing",Invoiced:"shipping"},g=["Cancellation Requested","Canceled"],x=["Payment Denied"],formatDate=e=>new Intl.DateTimeFormat("en-US",{month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).format(new Date(e)),StepIcon=e=>{var{status:t,isCanceled:r}=e;return"failed"===t?(0,y.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-failed":!0,children:(0,y.jsx)(d.Z,{name:"X",height:16,width:16})}):r?(0,y.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-canceled":!0}):"completed"===t?(0,y.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-completed":!0,children:(0,y.jsx)(d.Z,{name:"Checked",height:16,width:16})}):"loading"===t?(0,y.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-loading":!0,children:(0,y.jsx)(d.Z,{name:"DotsThree",height:16,width:16})}):(0,y.jsx)("div",{"data-fs-shipping-step-icon":!0})},getStepStatus=e=>{var t,{stepKey:r,currentStatus:n,isCanceled:a,isFailed:o}=e,c=null===(t=v._y[n])||void 0===t?void 0:t.label;if(a)return"payment"===r?"failed":"not-started";var i=c?b[c]:void 0;if(o&&r===i)return"failed";var d=j.findIndex(e=>e.key===i),s=j.findIndex(e=>e.key===r);return -1===d?0===s?"loading":"not-started":s===d?"loading":s<d?"completed":"not-started"},MyAccountStatusCard_MyAccountStatusCard=function(e){var t,{status:r}=e,n=(0,l.useRef)(null);!function(e){var{isDesktop:t,isMobile:r,isTablet:n}=(0,m.Z)();(0,l.useEffect)(()=>{var r=e.current;if(r){var calculateContainerGap=()=>{var e=r.querySelectorAll("[data-fs-shipping-step]");if(0!==e.length){var t=r.offsetWidth,n=0;e.forEach(e=>{n+=e.offsetWidth});var a=e.length-1;return(t-n)/a}},setUpConnectorPositioning=()=>{var e=r.querySelectorAll("[data-fs-shipping-connector]");if(0!==e.length){if(t){var n=calculateContainerGap();e.forEach(e=>{e.style.top="calc(1rem + var(--fs-order-status-step-icon-margin) + var(--fs-order-status-step-icon-half-size))",e.style.left="calc(50% + var(--fs-order-status-step-icon-half-size) + var(--fs-order-status-card-gap))",e.style.width="calc(((50% - var(--fs-order-status-step-icon-half-size) - var(--fs-order-status-card-gap)) * 2) + ".concat(n,"px)"),e.style.height="var(--fs-border-width)"})}else e.forEach(e=>{e.style.top="calc(50% + var(--fs-order-status-step-icon-half-size) + var(--fs-order-status-connector-spacing))",e.style.left="calc(var(--fs-spacing-2) + var(--fs-order-status-step-icon-half-size) + var(--fs-order-status-step-icon-margin))",e.style.width="var(--fs-border-width)",e.style.height="calc((50% - var(--fs-order-status-step-icon-half-size)) + var(--fs-order-status-card-gap) + (50% - var(--fs-order-status-step-icon-half-size)) - (var(--fs-order-status-connector-spacing) * 2))"})}};return setUpConnectorPositioning(),window.addEventListener("resize",setUpConnectorPositioning),()=>window.removeEventListener("resize",setUpConnectorPositioning)}},[e,t])}(n);var a=null===(t=v._y[r])||void 0===t?void 0:t.label,o=!!a&&g.includes(a),c=!!a&&x.includes(a),i=j.map(e=>{var t=getStepStatus({stepKey:e.key,currentStatus:r,isCanceled:o,isFailed:c});return{label:o?"payment"===e.key?a:(0,y.jsx)(s.Z,{size:{width:"100px",height:"14px"},shimmer:!1},e.key):e.label(t),status:t}});return(0,y.jsx)(MyAccountCard_MyAccountCard,{title:"Status","data-fs-order-status-card":!0,children:(0,y.jsx)("div",{"data-fs-order-status-content":!0,ref:n,children:i.map((e,t)=>(0,y.jsxs)("div",{"data-fs-shipping-step":!0,"data-fs-shipping-status":e.status,children:[(0,y.jsx)(StepIcon,{status:e.status,isCanceled:o}),(0,y.jsxs)("div",{"data-fs-shipping-step-content":!0,children:[(0,y.jsx)("p",{"data-fs-shipping-step-label":!0,children:e.label}),e.completedAt&&(0,y.jsx)("div",{"data-fs-shipping-step-details":!0,children:(0,y.jsx)("span",{"data-fs-shipping-step-date":!0,children:formatDate(e.completedAt)})})]}),t<i.length-1&&(0,y.jsx)("div",{"data-fs-shipping-connector":!0,"data-fs-shipping-connector-status":"completed"===e.status?"completed":"not-started"})]},"".concat(e.label,"-").concat(t)))})})},A=r(4018);function MyAccountDeliveryCard(e){var t,r,{deliveryOptionsData:n,fields:a}=e;return(0,y.jsxs)(MyAccountCard_MyAccountCard,{title:"Delivery","data-fs-order-delivery-card":!0,children:[(0,y.jsx)("div",{"data-fs-delivery-methods":!0,children:n.deliveryOptions.map((e,t)=>(0,y.jsx)("p",{"data-fs-delivery-method":!0,children:e.friendlyDeliveryOptionName},e.friendlyDeliveryOptionName))}),n.contact&&(0,y.jsxs)("div",{"data-fs-delivery-contact":!0,children:[(0,y.jsx)("p",{"data-fs-delivery-contact-name":!0,children:n.contact.name}),n.contact.phone&&(0,y.jsx)("p",{"data-fs-delivery-contact-phone":!0,children:n.contact.phone}),(null==a?void 0:a.length)>0&&(0,y.jsx)("p",{"data-fs-delivery-contact-fields":!0,children:"".concat((0,A.gi)(null===(t=a[0])||void 0===t?void 0:t.name),": ").concat(null===(r=a[0])||void 0===r?void 0:r.value)})]})]})}var O=r(1516),P=["children"];function MyAccountAccordion_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function MyAccountAccordion_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?MyAccountAccordion_ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MyAccountAccordion_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var MyAccountAccordion_MyAccountAccordion=function(e){var{children:t}=e,r=(0,u.Z)(e,P);return(0,y.jsx)(O.Z,MyAccountAccordion_objectSpread(MyAccountAccordion_objectSpread({},r),{},{"data-fs-my-account-accordion":!0,children:t}))},C=r(783),_=["children","index"];function MyAccountAccordionItem_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function MyAccountAccordionItem_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?MyAccountAccordionItem_ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MyAccountAccordionItem_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var MyAccountAccordion_MyAccountAccordionItem=function(e){var{children:t,index:r}=e,n=(0,u.Z)(e,_);return(0,y.jsx)(C.Z,MyAccountAccordionItem_objectSpread(MyAccountAccordionItem_objectSpread({index:r},n),{},{"data-fs-my-account-accordion-item":!0,children:t}))},w=r(7734),MyAccountAccordion_MyAccountAccordionButton=function(e){var{title:t,summary:r,children:n}=e;return(0,y.jsxs)(w.Z,{collapsedIcon:(0,y.jsx)(d.Z,{name:"CaretDown"}),expandedIcon:(0,y.jsx)(d.Z,{name:"CaretUp"}),"data-fs-my-account-accordion-button":!0,type:"button",children:[(0,y.jsxs)("div",{"data-fs-my-account-accordion-header":!0,children:[(0,y.jsx)(d.Z,{name:"Package"}),(0,y.jsx)("span",{"data-fs-my-account-accordion-header-title":!0,children:t})]}),(0,y.jsx)("p",{"data-fs-my-account-accordion-summary":!0,children:r}),n]})},M=r(7583),MyAccountAccordion_MyAccountAccordionPanel=function(e){var{children:t}=e;return(0,y.jsx)(M.Z,{children:(0,y.jsx)("div",{"data-fs-my-account-accordion-content":!0,children:t})})},D=r(6896);function InfoContainer(e){var{title:t,children:r}=e;return(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-info-container":!0,children:[(0,y.jsx)("span",{"data-fs-delivery-option-accordion-info-title":!0,children:t}),r]})}var MyAccountDeliveryOptionAccordion_MyAccountDeliveryOptionAccordionDeliveryInfo=function(e){var t,{deliveryOption:r,contact:n}=e,a="pickup-in-point"===r.deliveryChannel,o=a?null===(t=r.pickupStoreInfo)||void 0===t?void 0:t.address:r.address;return o||n||r.deliveryWindow?(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-delivery-info":!0,children:[!a&&n&&(0,y.jsxs)(InfoContainer,{title:"Recipient",children:[(0,y.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:(0,y.jsx)("strong",{children:n.name})}),n.phone&&(0,y.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:n.phone}),n.email&&(0,y.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:n.email})]}),(0,y.jsxs)(InfoContainer,{title:a?"Store address":"Delivery address",children:[(0,y.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:(0,y.jsx)("strong",{children:o.city})}),(0,y.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:o.street}),(0,y.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:"".concat(o.postalCode).concat(o.state?", ".concat(o.state):"").concat(o.country?", ".concat(o.country,"."):"")})]}),a&&r.deliveryWindow&&(0,y.jsxs)(InfoContainer,{title:"Store Hours",children:[(0,y.jsxs)("span",{"data-fs-delivery-option-accordion-info":!0,children:["From:"," ",new Date(r.deliveryWindow.startDateUtc).toLocaleString()]}),(0,y.jsxs)("span",{"data-fs-delivery-option-accordion-info":!0,children:["To:"," ",new Date(r.deliveryWindow.endDateUtc).toLocaleString()]})]})]}):null};function MyAccountDeliveryOptionAccordionProduct(e){var t,{image:r,quantity:n,name:a,field:o,price:c,tax:i,total:d}=e;return(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product":!0,children:[(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product-top":!0,children:[(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product-image":!0,children:[(0,y.jsx)("img",{src:r,alt:a}),(0,y.jsx)("span",{"data-fs-delivery-option-accordion-product-quantity":!0,children:n})]}),(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product-details":!0,children:[(0,y.jsx)("p",{children:a}),o&&(0,y.jsx)("span",{children:"".concat((0,A.gi)(o.name),": ").concat(null!==(t=o.value)&&void 0!==t?t:"")})]})]}),(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product-bottom":!0,children:[(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product-price":!0,children:[(0,y.jsx)("p",{children:c}),(0,y.jsx)("span",{children:"Each"})]}),(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product-tax":!0,children:[(0,y.jsx)("p",{children:i}),(0,y.jsx)("span",{children:"Taxes"})]}),(0,y.jsxs)("div",{"data-fs-delivery-option-accordion-product-total":!0,children:[(0,y.jsx)("p",{children:d}),(0,y.jsx)("span",{children:"Total"})]})]})]})}function MyAccountDeliveryOptionAccordionProducts(e){var{children:t}=e;return(0,y.jsx)("div",{"data-fs-delivery-option-accordion-products":!0,children:t})}var MyAccountDeliveryOptionAccordion_MyAccountDeliveryOptionAccordion=function(e){var t,r,{deliveryOption:n,contact:a,currencyCode:o,customFields:c}=e,{0:i,1:d}=(0,l.useState)(new Set([])),s=(0,D.p)(),u=n.friendlyDeliveryOptionName,p="".concat(n.quantityOfDifferentItems," ").concat(1===n.quantityOfDifferentItems?"item":"items"," – Total ").concat(s(null!==(t=n.total)&&void 0!==t?t:0,o));return(0,y.jsx)(MyAccountAccordion_MyAccountAccordion,{indices:i,onChange:e=>{i.has(e)?(i.delete(e),d(new Set(i))):d(new Set(i.add(e)))},"data-fs-delivery-option-accordion":!0,children:(0,y.jsxs)(MyAccountAccordion_MyAccountAccordionItem,{index:0,children:[(0,y.jsx)(MyAccountAccordion_MyAccountAccordionButton,{title:u,summary:p}),(0,y.jsxs)(MyAccountAccordion_MyAccountAccordionPanel,{children:[(0,y.jsx)(MyAccountDeliveryOptionAccordion_MyAccountDeliveryOptionAccordionDeliveryInfo,{deliveryOption:n,contact:a}),(0,y.jsx)(MyAccountDeliveryOptionAccordionProducts,{children:null===(r=n.items)||void 0===r?void 0:r.map((e,t)=>{var r,n,a,i,d;return(0,y.jsx)(MyAccountDeliveryOptionAccordionProduct,{image:e.imageUrl||"",quantity:e.quantity,name:e.name,field:null==c?void 0:null===(r=c.find(t=>t.id===e.id))||void 0===r?void 0:null===(n=r.fields)||void 0===n?void 0:n[0],price:s(null!==(a=e.price)&&void 0!==a?a:0,o),tax:s(null!==(i=e.tax)&&void 0!==i?i:0,o),total:s(null!==(d=e.total)&&void 0!==d?d:0,o)},t)})})]})]},String(0))})},S=r(4988),I=r(6652),E=r(9009),Z=r(3666);function useOrderActionModal_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function useOrderActionModal_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?useOrderActionModal_ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):useOrderActionModal_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var k=r(4684),N=r(9965),R=r(5273),B=r(8373),T=["testId","isOpen","fade","children","overlayProps","onDismiss"];function BottomSheet_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function BottomSheet_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?BottomSheet_ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BottomSheet_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var BottomSheet_BottomSheet=function(e){var{testId:t="fs-bottom-sheet",isOpen:r,fade:n="out",children:a,overlayProps:o,onDismiss:c}=e,i=(0,u.Z)(e,T);return(0,y.jsx)(B.Z,BottomSheet_objectSpread(BottomSheet_objectSpread({"data-fs-modal":null,"data-fs-bottom-sheet":!0,"data-fs-bottom-sheet-state":n,isOpen:r,onDismiss:c,testId:t,overlayProps:o},i),{},{children:a}))},F=r(3268),K=r.n(F),q={cancel:{title:"Cancel order",message:"Are you sure you want to cancel this order? This action can't be undone.",confirmText:"Cancel order",cancelText:"Not now",confirmVariant:"secondary"},reject:{title:"Reject order",message:"Are you sure you want to reject this order? This action can't be undone.",confirmText:"Reject",cancelText:"Cancel",confirmVariant:"primary"},approve:{title:"Approve order",message:"Are you sure you want to approve this order?",confirmText:"Approve",cancelText:"Cancel",confirmVariant:"primary"}};function MyAccountOrderActionModal(e){var{isOpen:t=!1,loading:r=!1,fade:n="out",actionType:a,onClose:o,onConfirm:c}=e,{isMobile:i,isTablet:d}=(0,m.Z)(),s=a&&q[a],l=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(k.Z,{title:null==s?void 0:s.title,onClose:()=>o(a)}),(0,y.jsx)(N.Z,{children:(0,y.jsx)("p",{"data-fs-order-details-action-modal-message":!0,children:null==s?void 0:s.message})}),(0,y.jsxs)(R.Z,{children:[(0,y.jsx)(E.Z,{variant:"tertiary",onClick:()=>o(a),children:null==s?void 0:s.cancelText}),(0,y.jsx)(E.Z,{variant:null==s?void 0:s.confirmVariant,onClick:()=>c(a),loading:r,children:null==s?void 0:s.confirmText})]})]});return i||d?(0,y.jsx)(BottomSheet_BottomSheet,{"data-fs-order-details-action-modal":!0,isOpen:t,onDismiss:()=>o(a),fade:n,overlayProps:{className:K().orderActionsModal},children:l}):(0,y.jsx)(B.Z,{"data-fs-order-details-action-modal":!0,isOpen:t,onDismiss:()=>o(a),overlayProps:{className:K().orderActionsModal},children:l})}var z=r(8098),L=a.rd,useCancelOrder=()=>{var[e,{data:t,error:r,isValidating:n}]=(0,z.t)(L,{data:{orderId:"",reason:"",customerEmail:""}});return{cancelOrder:e,data:t,error:r,loading:n}},useApproveOrder=()=>{var e,{0:t,1:r}=(0,l.useState)(null),{0:n,1:a}=(0,l.useState)(null),{0:o,1:c}=(0,l.useState)(!1);return{approveOrder:(e=(0,S.Z)(function*(e){c(!0);try{if(yield new Promise(e=>setTimeout(e,800)),!(Math.random()>.1))throw Error("Failed to approve order");var t={data:{success:!0,orderId:e.data.orderId}};return r(t),c(!1),t}catch(e){var n=e instanceof Error?e:Error("Failed to approve order");throw a(n),c(!1),n}}),function(t){return e.apply(this,arguments)}),data:t,error:n,loading:o}},useRejectOrder=()=>{var e,{0:t,1:r}=(0,l.useState)(null),{0:n,1:a}=(0,l.useState)(null),{0:o,1:c}=(0,l.useState)(!1);return{rejectOrder:(e=(0,S.Z)(function*(e){c(!0);try{if(yield new Promise(e=>setTimeout(e,800)),!(Math.random()>.9))throw Error("Failed to reject order");var t={data:{success:!0,orderId:e.data.orderId}};return r(t),c(!1),t}catch(e){var n=e instanceof Error?e:Error("Failed to reject order");throw a(n),c(!1),n}}),function(t){return e.apply(this,arguments)}),data:t,error:n,loading:o}},U={cancel:{success:"Order canceled successfully",error:"Order couldn't be canceled due to a technical issue. Try again."},approve:{success:"Order approved successfully",error:"Order couldn't be approved due to a technical issue. Try again."},reject:{success:"Order rejected successfully",error:"Order couldn't be rejected due to a technical issue. Try again."}};function MyAccountOrderActions(e){var t,{canCancelOrder:r,orderId:n,customerEmail:a}=e,{isMobile:o,isTablet:c}=(0,m.Z)(),{isOpen:i,actionType:s,fade:u,openDialog:p,closeDialog:f}=function(){var{fade:e,fadeOut:t,fadeIn:r}=(0,Z.b)(),{0:n,1:a}=(0,l.useState)({isOpen:!1,actionType:null}),o=(0,l.useCallback)(e=>{a({isOpen:!0,actionType:e}),r()},[]),c=(0,l.useCallback)(()=>{a({isOpen:!1,actionType:null}),t()},[]);return useOrderActionModal_objectSpread(useOrderActionModal_objectSpread({},n),{},{fade:e,openDialog:o,closeDialog:c})}(),{pushToast:v}=(0,I.l)(),{cancelOrder:h,loading:j}=useCancelOrder(),{approveOrder:b,loading:g}=useApproveOrder(),{rejectOrder:x,loading:A}=useRejectOrder(),O=(t=(0,S.Z)(function*(e){try{var t={cancel:h,approve:b,reject:x}[e];if(!t)throw Error("Invalid action type: ".concat(e));yield t({data:{orderId:n,customerEmail:a,reason:""}}),f(),v({status:"INFO",message:U[e].success,icon:(0,y.jsx)(d.Z,{width:30,height:30,name:"CircleWavyCheck"})})}catch(t){v({status:"ERROR",message:U[e].error,icon:(0,y.jsx)(d.Z,{width:30,height:30,name:"CircleWavyWarning"})})}}),function(e){return t.apply(this,arguments)});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{"data-fs-order-details-header-actions":!0,children:r&&(0,y.jsx)(E.Z,{variant:"secondary","data-fs-order-details-header-actions-cancel":!0,size:o||c?"regular":"small",type:"button",onClick:()=>p("cancel"),children:"Cancel order"})}),(0,y.jsx)(MyAccountOrderActionModal,{isOpen:i,loading:"cancel"===s&&j||"approve"===s&&g||"reject"===s&&A,fade:u,actionType:s,onClose:f,onConfirm:O})]})}var MyAccountOrderedByCard_MyAccountOrderedByCard=function(e){var{clientProfileData:t}=e,r=null==t?void 0:t.firstName,n=null==t?void 0:t.lastName,a=null==t?void 0:t.email,o=null==t?void 0:t.phone,c=null==t?void 0:t.corporateName,i=null==t?void 0:t.isCorporate;return(0,y.jsxs)(MyAccountCard_MyAccountCard,{title:"Ordered by","data-fs-order-ordered-by-card":!0,children:[i&&c&&(0,y.jsxs)("div",{"data-fs-ordered-by-org":!0,children:[(0,y.jsx)("div",{"data-fs-ordered-by-avatar":!0,children:c.charAt(0).toUpperCase()}),(0,y.jsx)("p",{"data-fs-ordered-by-org-name":!0,children:c})]}),(0,y.jsxs)("div",{"data-fs-ordered-by-client-info":!0,children:[(0,y.jsx)("p",{"data-fs-ordered-by-client-name":!0,children:"".concat(null!=r?r:""," ").concat(null!=n?n:"")}),(o||a)&&(0,y.jsxs)("p",{children:[o&&(0,y.jsx)(y.Fragment,{children:o}),o&&a&&(0,y.jsx)("br",{}),a]})]})]})},$={BANK_INVOICE:"bankInvoice",PAYPAL:"payPal",GIFT_CARD:"giftCard",DEBIT_CARD:"debitCard"},W={visa:"Visa",mastercard:"Mastercard",diners:"Diners",american:"Amex",hipercard:"Hipercard",discover:"Discover",banricompras:"Banricompras",aura:"Aura",elo:"EloCard",jcb:"JCB",bankinvoice:"FileText",paypal:"PayPal",giftcard:"Gift",cash:"Currency",applepay:"ApplePay",googlepay:"GooglePay"},MyAccountPaymentCard_MyAccountPaymentFlagsIcon=function(e){var{payment:t}=e;if(!(t.paymentSystemName&&"Free"!==t.paymentSystemName))return null;var r=(()=>{var e,{group:r,paymentSystemName:n,paymentOrigin:a}=t;if(a){if("Google Pay"===a)return W.googlepay;if("Apple Pay"===a)return W.applepay}switch(r){case $.BANK_INVOICE:e="bankinvoice";break;case $.PAYPAL:e="paypal";break;case $.GIFT_CARD:e="giftcard";break;case $.DEBIT_CARD:e="cash";break;default:e=n.toLowerCase().split(" ")[0]}return e in W?W[e]:null})();return r?(0,y.jsx)("div",{"data-fs-payment-flag":!0,children:(0,y.jsx)(d.Z,{name:r,height:22})}):null},G=r(727);function MyAccountPaymentCard_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function MyAccountPaymentCard_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?MyAccountPaymentCard_ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MyAccountPaymentCard_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var getPaymentMethodInfo=e=>{var t={type:"Billing",methodName:"",icon:e.paymentSystemName};switch(e.group){case"creditCard":case"debitCard":return MyAccountPaymentCard_objectSpread(MyAccountPaymentCard_objectSpread({},t),{},{methodName:"".concat(e.paymentSystemName," ending in ").concat(e.lastDigits)});case"bankInvoice":return MyAccountPaymentCard_objectSpread(MyAccountPaymentCard_objectSpread({},t),{},{type:"Bank Invoice",methodName:"Bank Invoice"});case"payPal":return MyAccountPaymentCard_objectSpread(MyAccountPaymentCard_objectSpread({},t),{},{methodName:"PayPal"});case"giftCard":return MyAccountPaymentCard_objectSpread(MyAccountPaymentCard_objectSpread({},t),{},{type:"Gift Card",methodName:"Gift Card"});default:return MyAccountPaymentCard_objectSpread(MyAccountPaymentCard_objectSpread({},t),{},{methodName:e.paymentSystemName})}},getBankInvoiceUrl=e=>{for(var t of e)for(var r of t.payments)if(r.url)return r.url.replace("{Installment}","1");return null},MyAccountPaymentCard_MyAccountPaymentCard=function(e){var t,{paymentData:r,currencyCode:n,allowCancellation:a=!1}=e,o=(0,D.p)(),c=getBankInvoiceUrl(null==r?void 0:r.transactions),i=a&&c;return(0,y.jsx)(MyAccountCard_MyAccountCard,{title:"Payment","data-fs-order-payment-card":!0,children:(0,y.jsx)("div",{"data-fs-payment-details":!0,children:null==r?void 0:null===(t=r.transactions[0])||void 0===t?void 0:t.payments.map(e=>{var t,r=getPaymentMethodInfo(e),a="giftCard"===e.group&&e.redemptionCode;return(0,y.jsxs)("div",{"data-fs-payment-info":!0,children:[(0,y.jsxs)("div",{"data-fs-payment-method":!0,children:[(0,y.jsxs)("div",{"data-fs-payment-method-info":!0,children:[(0,y.jsx)("p",{"data-fs-payment-name":!0,children:r.methodName}),(0,y.jsx)(MyAccountPaymentCard_MyAccountPaymentFlagsIcon,{payment:e})]}),(0,y.jsx)("div",{"data-fs-payment-value":!0,children:a?(0,y.jsxs)("span",{children:[e.redemptionCode," -"," ",o(e.value,n)]}):e.installments>1?(0,y.jsxs)("span",{children:[e.installments,"x of"," ",o(e.value/e.installments,n)]}):(0,y.jsx)("span",{children:o(e.value,n)})})]}),(0,y.jsxs)("div",{"data-fs-payment-transaction-info":!0,children:[e.tid&&(0,y.jsxs)("span",{"data-fs-payment-tid":!0,children:["Tid: ",e.tid]}),(null===(t=e.connectorResponses)||void 0===t?void 0:t.authId)&&(0,y.jsxs)("span",{"data-fs-payment-authid":!0,children:["AuthId: ",String(e.connectorResponses.authId)]}),(0,y.jsxs)("div",{"data-fs-payment-bank-invoice":!0,children:[e.bankIssuedInvoiceIdentificationNumber&&(0,y.jsxs)("span",{"data-fs-payment-bank-invoice-number":!0,children:["Invoice Number:"," ",e.bankIssuedInvoiceIdentificationNumber]}),i&&(0,y.jsx)(G.Z,{"data-fs-payment-invoice-link":!0,href:c,target:"_blank",children:"Print Bank Invoice"})]})]})]},e.id)})})})},MyAccountSummaryCard_MyAccountSummaryCard=function(e){var t,r,{totals:n,currencyCode:a,transactions:o}=e,c=(0,D.p)(),i=(t=0,o.forEach(e=>{e.isActive&&e.payments.forEach(e=>{var r=0===e.referenceValue?e.value:e.referenceValue,n=e.value-r;t+=n})}),(r=t)>0)?[...n,{id:"Interest",name:"Interest",value:r}]:n,d=i.reduce((e,t)=>e+t.value,0);return(0,y.jsxs)(MyAccountCard_MyAccountCard,{title:"Summary","data-fs-order-summary-card":!0,children:[i.map(e=>(0,y.jsxs)("div",{"data-fs-order-summary-item":!0,children:[(0,y.jsx)("span",{children:e.name}),(0,y.jsx)("span",{children:c(e.value,a)})]},e.id)),(0,y.jsxs)("div",{"data-fs-order-summary-item":!0,"data-fs-order-summary-total":!0,children:[(0,y.jsx)("span",{children:"Total"}),(0,y.jsx)("span",{children:c(d,a)})]})]})},V=r(2562),MyAccountMoreInformationCard_MyAccountMoreInformationCard=function(e){var{fields:t}=e;return(0,y.jsx)(MyAccountCard_MyAccountCard,{title:"More information","data-fs-order-more-information-card":!0,children:(0,y.jsx)("div",{"data-fs-order-more-information-card-content":!0,children:t.map(e=>(0,y.jsxs)("div",{"data-fs-order-more-information-card-item":!0,children:[(0,y.jsx)("p",{"data-fs-order-more-information-card-title":!0,children:(0,A.gi)(e.name)}),(0,y.jsx)("p",{"data-fs-order-more-information-card-value":!0,children:e.value})]},e.name))})})},X=r(100),H=r.n(X);function MyAccountOrderDetails(e){var t,r,n,a,o,{order:c}=e,s=null==c?void 0:null===(t=c.customFields)||void 0===t?void 0:null===(r=t.find(e=>"order"===e.type))||void 0===r?void 0:r.fields;return(0,y.jsxs)("div",{className:H().page,"data-fs-order-details":!0,children:[(0,y.jsxs)("header",{"data-fs-order-details-header":!0,children:[(0,y.jsxs)("div",{"data-fs-order-details-header-title":!0,children:[(0,y.jsx)("a",{href:"/account/orders",children:(0,y.jsx)(i.Z,{"data-fs-order-details-header-back-button":!0,size:"small","aria-label":"Go back",icon:(0,y.jsx)(d.Z,{height:20,width:20,name:"ArrowLeft"}),type:"button"})}),(0,y.jsxs)("div",{"data-fs-order-details-header-title-wrapper":!0,children:[(0,y.jsxs)("h1",{"data-fs-order-details-header-title-text":!0,children:["Order #",c.orderId]}),(0,y.jsx)(V.Z,{status:c.status,statusFallback:c.statusDescription})]})]}),(0,y.jsx)(MyAccountOrderActions,{canCancelOrder:c.canCancelOrder,orderId:c.orderId,customerEmail:null===(n=c.clientProfileData)||void 0===n?void 0:n.email})]}),(0,y.jsxs)("main",{"data-fs-order-details-content":!0,children:[(0,y.jsx)(MyAccountOrderedByCard_MyAccountOrderedByCard,{clientProfileData:c.clientProfileData}),(0,y.jsx)(MyAccountDeliveryCard,{deliveryOptionsData:c.deliveryOptionsData,fields:(null==c?void 0:null===(a=c.customFields)||void 0===a?void 0:null===(o=a.find(e=>"address"===e.type))||void 0===o?void 0:o.fields)||[]}),(0,y.jsx)(MyAccountStatusCard_MyAccountStatusCard,{status:c.status}),(0,y.jsx)(MyAccountPaymentCard_MyAccountPaymentCard,{currencyCode:c.storePreferencesData.currencyCode,paymentData:c.paymentData,allowCancellation:c.allowCancellation}),(0,y.jsx)(MyAccountSummaryCard_MyAccountSummaryCard,{totals:c.totals,currencyCode:c.storePreferencesData.currencyCode,transactions:c.paymentData.transactions}),c.deliveryOptionsData.deliveryOptions.map(e=>(0,y.jsx)(MyAccountDeliveryOptionAccordion_MyAccountDeliveryOptionAccordion,{deliveryOption:e,contact:c.deliveryOptionsData.contact,currencyCode:c.storePreferencesData.currencyCode,customFields:c.customFields.filter(e=>"item"===e.type)},e.friendlyDeliveryOptionName)),(null==s?void 0:s.length)>0&&(0,y.jsx)(MyAccountMoreInformationCard_MyAccountMoreInformationCard,{fields:s})]})]})}var J=r(9173),Q=r(1772),Y=r(6924),after=function(){return(0,y.jsx)(y.Fragment,{})},before=function(){return(0,y.jsx)(y.Fragment,{})};function _id_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _id_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_id_ownKeys(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_id_ownKeys(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ee=_id_objectSpread(_id_objectSpread({},Q.Z),Y.Z),et=!0;function OrderDetailsPage(e){var{globalSections:t,order:r,accountName:n}=e;return(0,y.jsxs)(J.ZP,{globalSections:t.sections,components:ee,children:[(0,y.jsx)(o.PB,{noindex:!0,nofollow:!0}),(0,y.jsxs)(c.Z,{accountName:n,children:[(0,y.jsx)(before,{}),(0,y.jsx)(MyAccountOrderDetails,{order:r}),(0,y.jsx)(after,{})]})]})}var er=a.fh},8098:function(e,t,r){"use strict";r.d(t,{t:function(){return useLazyQuery}});var n=r(4988),a=r(6600),o=r(7440),c=r(2693),useLazyQuery=(e,t,r)=>{var i,d=(0,a.ZP)((0,c.km)(e.__meta__.operationName,t),()=>null,c.WN);return[(i=(0,n.Z)(function*(t){var n=yield(0,o.W)(e,t,r);return yield d.mutate(n,!1)}),function(e){return i.apply(this,arguments)}),d]}},5759:function(e,t,r){"use strict";r.d(t,{BX:function(){return o},_y:function(){return n},j4:function(){return a}});var n={created:{variant:"success",label:"Order Placed"},creating:{variant:"success",label:"Order Placed"},"on-order-completed":{variant:"success",label:"Order Placed"},"on-order-completed-ffm":{variant:"success",label:"Order Placed"},"order-accepted":{variant:"success",label:"Order Placed"},"order-created":{variant:"success",label:"Order Placed"},"waiting-for-seller-confirmation":{variant:"success",label:"Order Placed"},"waiting-for-confirmation":{variant:"warning",label:"Approval Pending"},"approving-transaction":{variant:"warning",label:"Payment Pending"},"notify-payment":{variant:"warning",label:"Payment Pending"},"payment-pending":{variant:"warning",label:"Payment Pending"},"payment-approved":{variant:"success",label:"Payment Approved"},"approve-payment":{variant:"success",label:"Payment Approved"},"payment-denied":{variant:"neutral",label:"Payment Denied"},"authorize-fulfillment":{variant:"success",label:"Ready for Delivery"},handling:{variant:"success",label:"Ready for Delivery"},invoice:{variant:"success",label:"Ready for Delivery"},"invoice-after-cancellation-deny":{variant:"success",label:"Ready for Delivery"},invoicing:{variant:"success",label:"Ready for Delivery"},packing:{variant:"success",label:"Ready for Delivery"},picking:{variant:"success",label:"Ready for Delivery"},"ready-for-handling":{variant:"success",label:"Ready for Delivery"},"ready-for-invoicing":{variant:"success",label:"Ready for Delivery"},"ready-for-packing":{variant:"success",label:"Ready for Delivery"},"ready-for-picking":{variant:"success",label:"Ready for Delivery"},"release-to-fulfillment":{variant:"success",label:"Ready for Delivery"},"start-handling":{variant:"success",label:"Ready for Delivery"},"waiting-ffmt-authorization":{variant:"success",label:"Ready for Delivery"},"waiting-for-fulfillment":{variant:"success",label:"Ready for Delivery"},"window-to-cancel":{variant:"success",label:"Ready for Delivery"},invoiced:{variant:"success",label:"Invoiced"},"accepting-cancel":{variant:"neutral",label:"Cancellation Requested"},cancel:{variant:"neutral",label:"Cancellation Requested"},canceling:{variant:"neutral",label:"Cancellation Requested"},"cancellation-requested":{variant:"neutral",label:"Cancellation Requested"},"cancellation-requested-with-ack":{variant:"neutral",label:"Cancellation Requested"},"request-cancel":{variant:"neutral",label:"Cancellation Requested"},"waiting-for-seller-decision":{variant:"neutral",label:"Cancellation Requested"},canceled:{variant:"neutral",label:"Canceled"}},a=["Order Placed","Approval Pending","Payment Pending","Payment Approved","Payment Denied","Ready for Delivery","Invoiced","Cancellation Requested","Canceled"],o={"order placed":"Order Placed","approval pending":"Approval Pending","payment pending":"Payment Pending","payment approved":"Payment Approved","payment denied":"Payment Denied","ready for delivery":"Ready for Delivery",invoiced:"Invoiced","cancellation requested":"Cancellation Requested",canceled:"Canceled"}},7079:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/orders/[id]",function(){return r(6205)}])},3268:function(e){e.exports={orderActionsModal:"styles_orderActionsModal__vxmGM",load:"styles_load__BTyKg"}},100:function(e){e.exports={page:"section_page__cOX2V"}},7085:function(e){e.exports={layout:"section_layout__QJ4xs",menu:"section_menu__WKZdl",account:"section_account__YjCAC",avatarContainer:"section_avatarContainer__1RMsJ",switchButton:"section_switchButton__ul06M",nav:"section_nav__Jjee8",navItem:"section_navItem__yr27R",avatar:"section_avatar__IQLo8"}},792:function(e,t,r){"use strict";var n=r(4194);let a=(0,n.forwardRef)(function({testId:e="fs-skeleton",loading:t=!0,shimmer:r=!0,children:a,size:o,border:c,borderRadius:i,...d},s){let l={width:o.width,height:o.height};return t?n.createElement("div",{ref:s,"data-fs-skeleton":!0,"data-testid":e,"data-fs-skeleton-border":c||null,style:i?{...l,borderRadius:i}:l,...d},r&&n.createElement("div",{"data-fs-skeleton-shimmer":!0})):n.createElement(n.Fragment,null,a)});t.Z=a},1516:function(e,t,r){"use strict";r.d(t,{A:function(){return useAccordion}});var n=r(4194);let a=(0,n.createContext)(void 0),o=(0,n.forwardRef)(function({testId:e="fs-accordion",indices:t,onChange:r,children:o,...c},i){let d=n.Children.map(o,(e,t)=>(0,n.cloneElement)(e,{index:e.props.index??t})),s={indices:new Set(t),onChange:r,numberOfItems:d.length};return n.createElement(a.Provider,{value:s},n.createElement("div",{ref:i,"data-fs-accordion":!0,role:"region","data-testid":e,...c},d))});function useAccordion(){let e=(0,n.useContext)(a);if(void 0===e)throw Error("Do not use Accordion components outside the Accordion context.");return e}t.Z=o},7734:function(e,t,r){"use strict";var n=r(4194),a=r(1516),o=r(783),c=r(2614),i=r(9009);let d=(0,n.forwardRef)(function({testId:e="fs-accordion-button",expandedIcon:t=n.createElement(c.Z,{name:"MinusCircle","data-icon":"expanded"}),collapsedIcon:r=n.createElement(c.Z,{name:"PlusCircle","data-icon":"collapsed"}),children:d,...s},l){let{indices:u,onChange:p,numberOfItems:y}=(0,a.A)(),{index:f,panel:v,button:m,prefixId:h}=(0,o.D)();return n.createElement(i.Z,{ref:l,id:m,variant:"tertiary","data-fs-accordion-button":u.has(f)?"expanded":"collapsed","aria-expanded":u.has(f),icon:u.has(f)?t:r,iconPosition:"right","aria-controls":v,onKeyDown:e=>{if(["ArrowDown","ArrowUp"].includes(e.key))switch(e.key){case"ArrowDown":e.preventDefault(),(()=>{let e=Number(f)+1===y?0:Number(f)+1;return document.getElementById(`${h&&`${h}-`}button--${e}`)})()?.focus();break;case"ArrowUp":e.preventDefault(),(()=>{let e=Number(f)-1<0?y-1:Number(f)-1;return document.getElementById(`${h&&`${h}-`}button--${e}`)})()?.focus()}},onClick:()=>{p(f)},"data-testid":e,...s},d)});t.Z=d},783:function(e,t,r){"use strict";r.d(t,{D:function(){return useAccordionItem}});var n=r(4194);let a=(0,n.createContext)(void 0),o=(0,n.forwardRef)(function({prefixId:e="",index:t=0,as:r,children:o,testId:c="fs-accordion-item",...i},d){let s=r??"div",l={index:t,prefixId:e,panel:`${e&&`${e}-`}panel--${t}`,button:`${e&&`${e}-`}button--${t}`};return n.createElement(a.Provider,{value:l},n.createElement(s,{ref:d,"data-fs-accordion-item":!0,"data-testid":c,...i},o))});function useAccordionItem(){let e=(0,n.useContext)(a);if(void 0===e)throw Error("Do not use AccordionItem components outside the AccordionItem context.");return e}t.Z=o},7583:function(e,t,r){"use strict";var n=r(4194),a=r(1516),o=r(783);let c=(0,n.forwardRef)(function({testId:e="fs-accordion-panel",children:t,...r},c){let{indices:i}=(0,a.A)(),{index:d,button:s,panel:l}=(0,o.D)();return n.createElement("div",{ref:c,id:l,"data-fs-accordion-panel":!0,"aria-labelledby":s,role:"region",hidden:!i.has(d),"data-testid":e,...r},t)});t.Z=c},6678:function(e,t,r){"use strict";var n=r(4194),a=r(7041),o=r(2614);let c=(0,n.forwardRef)(function({title:e,maxWidth:t,testId:r="fs-card",iconName:c,iconAction:i,children:d,...s},l){return n.createElement("section",{"data-testid":r,ref:l,"data-fs-card":!0,style:{maxWidth:`${t}`},...s},n.createElement("div",{"data-fs-card-header":!0},n.createElement("div",{"data-fs-card-title":!0},e),c&&n.createElement(a.Z,{icon:n.createElement(o.Z,{name:c,width:20,height:20}),"aria-label":`${e} action`,onClick:i})),n.createElement("div",{"data-fs-card-body":!0},d))});t.Z=c},9965:function(e,t,r){"use strict";var n=r(4194);t.Z=({children:e,...t})=>n.createElement("div",{"data-fs-modal-body":!0,...t},e)},5273:function(e,t,r){"use strict";var n=r(4194);t.Z=({children:e,direction:t="horizontal",wrap:r=!0,...a})=>n.createElement("div",{"data-fs-modal-footer":!0,...a},n.createElement("div",{"data-fs-modal-footer-actions":!0,"data-fs-modal-footer-actions-direction":t,"data-fs-modal-footer-actions-wrap":r},e))},4684:function(e,t,r){"use strict";var n=r(4194),a=r(2614),o=r(7041);t.Z=({onClose:e,title:t,closeBtnProps:r={},description:c})=>n.createElement("header",{"data-fs-modal-header":!0},e&&n.createElement(o.Z,{"data-fs-modal-header-close-button":!0,"aria-label":"Close modal",icon:n.createElement(a.Z,{name:"X"}),onClick:()=>e?.(),...r}),n.createElement("p",{"data-fs-modal-header-title":!0},t),c&&n.createElement("p",{"data-fs-modal-header-description":!0},c))}},function(e){e.O(0,[6031,9173,9774,2888,179],function(){return e(e.s=7079)}),_N_E=e.O()}]);
|
|
File without changes
|