@faststore/core 3.47.1 → 3.49.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.
Files changed (60) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +55 -55
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/webpack/client-production/0.pack +0 -0
  6. package/.next/cache/webpack/client-production/index.pack +0 -0
  7. package/.next/cache/webpack/server-production/0.pack +0 -0
  8. package/.next/cache/webpack/server-production/index.pack +0 -0
  9. package/.next/prerender-manifest.js +1 -1
  10. package/.next/prerender-manifest.json +1 -1
  11. package/.next/routes-manifest.json +1 -1
  12. package/.next/server/chunks/4289.js +1 -1
  13. package/.next/server/chunks/4559.js +1 -1
  14. package/.next/server/chunks/5636.js +2 -2
  15. package/.next/server/functions-config-manifest.json +1 -1
  16. package/.next/server/middleware-build-manifest.js +1 -1
  17. package/.next/server/pages/account/orders/[id].js +1 -1
  18. package/.next/server/pages/account/orders.js +1 -1
  19. package/.next/server/pages/api/graphql.js +2 -2
  20. package/.next/server/pages/en-US/404.html +2 -2
  21. package/.next/server/pages/en-US/500.html +2 -2
  22. package/.next/server/pages/en-US/account/403.html +2 -2
  23. package/.next/server/pages/en-US/account/404.html +2 -2
  24. package/.next/server/pages/en-US/checkout.html +2 -2
  25. package/.next/server/pages/en-US/login.html +2 -2
  26. package/.next/server/pages/en-US/s.html +2 -2
  27. package/.next/server/pages/en-US.html +2 -2
  28. package/.next/server/pages-manifest.json +1 -1
  29. package/.next/static/IQf_BcSCHVz6imFMSnCoY/_buildManifest.js +1 -0
  30. package/.next/static/chunks/6335-631f065ba00f8400.js +1 -0
  31. package/.next/static/chunks/pages/{_app-e5a4d3ef47f1b5c3.js → _app-0925a07adf685be4.js} +1 -1
  32. package/.next/static/chunks/pages/account/orders/[id]-1b9f63221f8ac232.js +1 -0
  33. package/.next/static/chunks/pages/account/orders-6fe9b7be784abbbc.js +1 -0
  34. package/.next/static/chunks/{webpack-899d14dc3b88c279.js → webpack-c55ec60030b1ebba.js} +1 -1
  35. package/.next/static/css/{42dee7d8309ef26a.css → 1fef663a0519dddf.css} +1 -1
  36. package/.next/static/css/3aa693541804727c.css +1 -0
  37. package/.next/trace +129 -129
  38. package/.turbo/turbo-build.log +12 -12
  39. package/.turbo/turbo-test.log +5 -6
  40. package/@generated/gql.ts +4 -4
  41. package/@generated/graphql.ts +9 -8
  42. package/@generated/persisted-documents.json +2 -2
  43. package/@generated/schema.graphql +1 -4
  44. package/CHANGELOG.md +12 -0
  45. package/package.json +4 -4
  46. package/src/components/account/MyAccountDrawer/OrganizationDrawer/OrganizationDrawer.tsx +2 -7
  47. package/src/components/account/MyAccountDrawer/ProfileSummary/profile-summary.scss +1 -4
  48. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/MyAccountListOrdersTable.tsx +127 -64
  49. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrdersTable/styles.scss +27 -3
  50. package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/MyAccountSelectedTags.tsx +9 -13
  51. package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/styles.scss +15 -16
  52. package/src/components/account/orders/MyAccountOrderDetails/MyAccountDeliveryOptionAccordion/MyAccountDeliveryOptionAccordion.tsx +3 -3
  53. package/src/pages/account/orders/index.tsx +6 -0
  54. package/src/sdk/session/index.ts +0 -2
  55. package/.next/static/chunks/6335-1380989b5cc84425.js +0 -1
  56. package/.next/static/chunks/pages/account/orders/[id]-987267efe897728e.js +0 -1
  57. package/.next/static/chunks/pages/account/orders-41bc5ef76c592a64.js +0 -1
  58. package/.next/static/css/9d1abf05f9ffaf8f.css +0 -1
  59. package/.next/static/ubzMbDTuqgM9JiF3PWmyK/_buildManifest.js +0 -1
  60. /package/.next/static/{ubzMbDTuqgM9JiF3PWmyK → IQf_BcSCHVz6imFMSnCoY}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.47.0 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.48.0 prebuild /home/runner/work/faststore/faststore/packages/core
3
3
  > na run partytown && na run generate
4
4
 
5
5
 
6
- > @faststore/core@3.47.0 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.48.0 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.47.0 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.48.0 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.47.0 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.48.0 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.47.0 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.48.0 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.47.0 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.48.0 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.47.0 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.48.0 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
@@ -83,8 +83,8 @@ Route (pages) Size First Load JS
83
83
  ├ └ css/b7bba8fce075688b.css 4.2 kB
84
84
  ├ ● /account/404 2.02 kB 130 kB
85
85
  ├ └ css/5347dbc8b71de47d.css 4.25 kB
86
- ├ λ /account/orders 8.41 kB 136 kB
87
- ├ └ css/9d1abf05f9ffaf8f.css 11.7 kB
86
+ ├ λ /account/orders 8.64 kB 137 kB
87
+ ├ └ css/3aa693541804727c.css 11.8 kB
88
88
  ├ λ /account/orders/[id] 10.1 kB 138 kB
89
89
  ├ └ css/2557aa3eaecf6ef0.css 11.4 kB
90
90
  ├ λ /account/profile 1.26 kB 129 kB
@@ -95,13 +95,13 @@ Route (pages) Size First Load JS
95
95
  ├ λ /api/health/ready 0 B 98.4 kB
96
96
  ├ λ /api/preview 0 B 98.4 kB
97
97
  ├ ● /checkout 696 B 129 kB
98
- ├ ● /login 1.59 kB 130 kB
98
+ ├ ● /login 1.59 kB 129 kB
99
99
  └ ● /s 3.17 kB 141 kB
100
100
  + First Load JS shared by all 102 kB
101
101
  ├ chunks/framework-807b0f81cbc129f0.js 45.4 kB
102
102
  ├ chunks/main-5569625b3fdd6741.js 33.1 kB
103
- ├ chunks/pages/_app-e5a4d3ef47f1b5c3.js 16.3 kB
104
- ├ chunks/webpack-899d14dc3b88c279.js 3.7 kB
103
+ ├ chunks/pages/_app-0925a07adf685be4.js 16.3 kB
104
+ ├ chunks/webpack-c55ec60030b1ebba.js 3.7 kB
105
105
  └ css/0a57ee6c7a57788c.css 3.49 kB
106
106
 
107
107
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,15 +1,14 @@
1
1
 
2
- > @faststore/core@3.47.0 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.48.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/server/cms/global.test.ts (24.997 s)
6
- PASS test/utils/multipleTemplates.test.ts (25.285 s)
5
+ PASS test/utils/multipleTemplates.test.ts (23.9 s)
6
+ PASS test/server/cms/global.test.ts (24.557 s)
7
7
  PASS test/server/cms/index.test.ts
8
- PASS test/server/index.test.ts (29.399 s)
9
- A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
8
+ PASS test/server/index.test.ts (29.732 s)
10
9
 
11
10
  Test Suites: 4 passed, 4 total
12
11
  Tests: 22 passed, 22 total
13
12
  Snapshots: 0 total
14
- Time: 30.906 s
13
+ Time: 31.04 s
15
14
  Ran all test suites.
package/@generated/gql.ts CHANGED
@@ -44,7 +44,7 @@ const documents = {
44
44
  types.UserOrderItemsFragmentFragmentDoc,
45
45
  '\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 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 }\n':
46
46
  types.ServerOrderDetailsQueryDocument,
47
- '\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 }\n paging {\n total\n pages\n currentPage\n perPage\n }\n }\n }\n':
47
+ '\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 costCenter\n poNumber\n release\n desktop\n }\n }\n paging {\n total\n pages\n currentPage\n perPage\n }\n }\n }\n':
48
48
  types.ServerListOrdersQueryDocument,
49
49
  '\n mutation CancelOrderMutation($data: IUserOrderCancel!) {\n cancelOrder(data: $data) {\n data\n }\n }\n':
50
50
  types.CancelOrderMutationDocument,
@@ -68,7 +68,7 @@ const documents = {
68
68
  types.ClientSearchSuggestionsQueryDocument,
69
69
  '\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':
70
70
  types.ClientTopSearchSuggestionsQueryDocument,
71
- '\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 isCorporate\n corporateName\n firstName\n lastName\n userName\n userEmail\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n }\n }\n':
71
+ '\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 }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n }\n }\n':
72
72
  types.ValidateSessionDocument,
73
73
  '\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':
74
74
  types.ClientShippingSimulationQueryDocument,
@@ -176,7 +176,7 @@ export function gql(
176
176
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
177
177
  */
178
178
  export function gql(
179
- source: '\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 }\n paging {\n total\n pages\n currentPage\n perPage\n }\n }\n }\n'
179
+ source: '\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 costCenter\n poNumber\n release\n desktop\n }\n }\n paging {\n total\n pages\n currentPage\n perPage\n }\n }\n }\n'
180
180
  ): typeof import('./graphql').ServerListOrdersQueryDocument
181
181
  /**
182
182
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
@@ -248,7 +248,7 @@ export function gql(
248
248
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
249
249
  */
250
250
  export function gql(
251
- 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 isCorporate\n corporateName\n firstName\n lastName\n userName\n userEmail\n }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n }\n }\n'
251
+ 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 }\n marketingData {\n utmCampaign\n utmMedium\n utmSource\n utmiCampaign\n utmiPage\n utmiPart\n }\n }\n }\n'
252
252
  ): typeof import('./graphql').ValidateSessionDocument
253
253
  /**
254
254
  * The gql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
@@ -183,10 +183,8 @@ export type IShippingItem = {
183
183
  }
184
184
 
185
185
  export type IStoreB2B = {
186
- corporateName: InputMaybe<Scalars['String']['input']>
187
186
  customerId: Scalars['String']['input']
188
187
  firstName: InputMaybe<Scalars['String']['input']>
189
- isCorporate: InputMaybe<Scalars['Boolean']['input']>
190
188
  isRepresentative: InputMaybe<Scalars['Boolean']['input']>
191
189
  lastName: InputMaybe<Scalars['String']['input']>
192
190
  unitId: InputMaybe<Scalars['String']['input']>
@@ -769,10 +767,8 @@ export type StoreAuthor = {
769
767
  }
770
768
 
771
769
  export type StoreB2B = {
772
- corporateName: Maybe<Scalars['String']['output']>
773
770
  customerId: Scalars['String']['output']
774
771
  firstName: Maybe<Scalars['String']['output']>
775
- isCorporate: Maybe<Scalars['Boolean']['output']>
776
772
  isRepresentative: Maybe<Scalars['Boolean']['output']>
777
773
  lastName: Maybe<Scalars['String']['output']>
778
774
  unitId: Maybe<Scalars['String']['output']>
@@ -1559,6 +1555,7 @@ export type UserOrderFromList = {
1559
1555
  clientName: Maybe<Scalars['String']['output']>
1560
1556
  creationDate: Maybe<Scalars['String']['output']>
1561
1557
  currencyCode: Maybe<Scalars['String']['output']>
1558
+ customFields: Maybe<UserOrderFromListCustomFields>
1562
1559
  deliveryDates: Maybe<Array<Maybe<Scalars['String']['output']>>>
1563
1560
  giftCardProviders: Maybe<Array<Maybe<Scalars['String']['output']>>>
1564
1561
  hostname: Maybe<Scalars['String']['output']>
@@ -2418,6 +2415,12 @@ export type ServerListOrdersQueryQuery = {
2418
2415
  sellingPrice: number | null
2419
2416
  price: number | null
2420
2417
  } | null> | null
2418
+ customFields: {
2419
+ costCenter: Array<string | null> | null
2420
+ poNumber: Array<string | null> | null
2421
+ release: Array<string | null> | null
2422
+ desktop: Array<string | null> | null
2423
+ } | null
2421
2424
  } | null> | null
2422
2425
  paging: {
2423
2426
  total: number | null
@@ -2868,8 +2871,6 @@ export type ValidateSessionMutation = {
2868
2871
  isRepresentative: boolean | null
2869
2872
  unitName: string | null
2870
2873
  unitId: string | null
2871
- isCorporate: boolean | null
2872
- corporateName: string | null
2873
2874
  firstName: string | null
2874
2875
  lastName: string | null
2875
2876
  userName: string | null
@@ -3474,7 +3475,7 @@ export const ServerOrderDetailsQueryDocument = {
3474
3475
  export const ServerListOrdersQueryDocument = {
3475
3476
  __meta__: {
3476
3477
  operationName: 'ServerListOrdersQuery',
3477
- operationHash: '9f48d9d4c1b6e6b32ac1f1c1b7b3819ac826dfe7',
3478
+ operationHash: '7fba0a7d767fceed07b268597d68e5577d952b43',
3478
3479
  },
3479
3480
  } as unknown as TypedDocumentString<
3480
3481
  ServerListOrdersQueryQuery,
@@ -3582,7 +3583,7 @@ export const ClientTopSearchSuggestionsQueryDocument = {
3582
3583
  export const ValidateSessionDocument = {
3583
3584
  __meta__: {
3584
3585
  operationName: 'ValidateSession',
3585
- operationHash: 'd8eac720a2de6a517384127a199e27a623653394',
3586
+ operationHash: '6f6d66826c836c3633a8dc3d2fe8220c386584d6',
3586
3587
  },
3587
3588
  } as unknown as TypedDocumentString<
3588
3589
  ValidateSessionMutation,
@@ -2,7 +2,7 @@
2
2
  "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 }",
3
3
  "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 }",
4
4
  "8b9b9c7703b0b9af12f47cb86dd3d2e8eb40c8fd": "query ServerOrderDetailsQuery($orderId: String!) { 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 } 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 } } }",
5
- "9f48d9d4c1b6e6b32ac1f1c1b7b3819ac826dfe7": "query ServerListOrdersQuery($clientEmail: String, $dateFinal: String, $dateInitial: String, $page: Int, $perPage: Int, $status: [String], $text: String) { listUserOrders( page: $page perPage: $perPage status: $status dateInitial: $dateInitial dateFinal: $dateFinal text: $text clientEmail: $clientEmail ) { list { ShippingEstimatedDate clientName creationDate currencyCode items { description ean id price productId quantity refId seller sellingPrice } orderId status statusDescription totalValue } paging { currentPage pages perPage total } } }",
5
+ "7fba0a7d767fceed07b268597d68e5577d952b43": "query ServerListOrdersQuery($clientEmail: String, $dateFinal: String, $dateInitial: String, $page: Int, $perPage: Int, $status: [String], $text: String) { listUserOrders( page: $page perPage: $perPage status: $status dateInitial: $dateInitial dateFinal: $dateFinal text: $text clientEmail: $clientEmail ) { list { ShippingEstimatedDate clientName creationDate currencyCode customFields { costCenter desktop poNumber release } items { description ean id price productId quantity refId seller sellingPrice } orderId status statusDescription totalValue } paging { currentPage pages perPage total } } }",
6
6
  "e2b06da6840614d3c72768e56579b9d3b8e80802": "mutation CancelOrderMutation($data: IUserOrderCancel!) { cancelOrder(data: $data) { data } }",
7
7
  "c2b3f8bff73ebf6ac79d758c66cabbc21ba9fcc0": "fragment CartItem on StoreOffer { itemOffered { ...CartProductItem } listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } fragment CartMessage on StoreCartMessage { status text } fragment CartProductItem on StoreProduct { additionalProperty { name propertyID value valueReference } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations availableVariations slugsMap } } name sku unitMultiplier } mutation ValidateCartMutation($cart: IStoreCart!, $session: IStoreSession!) { validateCart(cart: $cart, session: $session) { messages { ...CartMessage } order { acceptedOffer { ...CartItem } orderNumber shouldSplitItem } } }",
8
8
  "feb7005103a859e2bc8cf2360d568806fd88deba": "mutation SubscribeToNewsletter($data: IPersonNewsletter!) { subscribeToNewsletter(data: $data) { id } }",
@@ -14,7 +14,7 @@
14
14
  "34ea14c0d4a57ddf9bc11e4be0cd2b5a6506d3d4": "query ClientProfileQuery($id: String!) { profile(id: $id) { addresses { city country geoCoordinate postalCode } } }",
15
15
  "b548281d477a173be7b6960434604d69769a97e7": "fragment ClientSearchSuggestions on Query { search(first: 5, term: $term, selectedFacets: $selectedFacets) { suggestions { terms { value } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier } fragment SearchEvent_metadata on SearchMetadata { fuzzy isTermMisspelled logicalOperator } query ClientSearchSuggestionsQuery($selectedFacets: [IStoreSelectedFacet!], $term: String!) { search(first: 5, term: $term, selectedFacets: $selectedFacets) { metadata { ...SearchEvent_metadata } products { pageInfo { totalCount } } suggestions { products { ...ProductSummary_product } terms { value } } } ...ClientSearchSuggestions }",
16
16
  "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 }",
17
- "d8eac720a2de6a517384127a199e27a623653394": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType b2b { corporateName customerId firstName isCorporate isRepresentative lastName 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 } }",
17
+ "6f6d66826c836c3633a8dc3d2fe8220c386584d6": "mutation ValidateSession($search: String!, $session: IStoreSession!) { validateSession(session: $session, search: $search) { addressType b2b { customerId firstName isRepresentative lastName 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 } }",
18
18
  "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 }",
19
19
  "5c2181dde311ca80b72e0cc76ac0855d8aa8b51e": "fragment ClientManyProducts on Query { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { products { pageInfo { totalCount } } } } fragment ProductSummary_product on StoreProduct { additionalProperty { name propertyID value valueReference } advertisement { adId adResponseId } brand { brandName: name } brand { name } gtin image { alternateName url } isVariantOf { name productGroupID skuVariants { activeVariations allVariantsByName availableVariations slugsMap } } name offers { lowPrice lowPriceWithTaxes offers { availability listPrice listPriceWithTaxes price priceWithTaxes quantity seller { identifier } } } id: productID sku slug unitMultiplier } fragment SearchEvent_metadata on SearchMetadata { fuzzy isTermMisspelled logicalOperator } query ServerManyProductsQuery($after: String, $first: Int!, $selectedFacets: [IStoreSelectedFacet!]!, $sort: StoreSort!, $sponsoredCount: Int, $term: String!) { search( first: $first after: $after sort: $sort term: $term selectedFacets: $selectedFacets sponsoredCount: $sponsoredCount ) { metadata { ...SearchEvent_metadata } products { edges { node { ...ProductSummary_product } } pageInfo { totalCount } } } ...ClientManyProducts }"
20
20
  }
@@ -882,8 +882,6 @@ type StoreB2B {
882
882
  isRepresentative: Boolean
883
883
  unitName: String
884
884
  unitId: String
885
- isCorporate: Boolean
886
- corporateName: String
887
885
  firstName: String
888
886
  lastName: String
889
887
  userName: String
@@ -895,8 +893,6 @@ input IStoreB2B {
895
893
  isRepresentative: Boolean
896
894
  unitName: String
897
895
  unitId: String
898
- isCorporate: Boolean
899
- corporateName: String
900
896
  firstName: String
901
897
  lastName: String
902
898
  userName: String
@@ -1365,6 +1361,7 @@ type UserOrderFromList {
1365
1361
  paymentApprovedDate: String
1366
1362
  readyForHandlingDate: String
1367
1363
  deliveryDates: [String]
1364
+ customFields: UserOrderFromListCustomFields
1368
1365
  }
1369
1366
 
1370
1367
  type UserOrderCustomData {
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.49.0](https://github.com/vtex/faststore/compare/v3.48.0...v3.49.0) (2025-05-26)
7
+
8
+ ### Features
9
+
10
+ - improve validate session requests SFS-2517 ([#2857](https://github.com/vtex/faststore/issues/2857)) ([42a4131](https://github.com/vtex/faststore/commit/42a41319dd5b98d257f0f2121caaf74f1a399f12))
11
+
12
+ # [3.48.0](https://github.com/vtex/faststore/compare/v3.47.2...v3.48.0) (2025-05-26)
13
+
14
+ ### Features
15
+
16
+ - list orders custom fields + design improvements SFS-2513 SFS-2515 ([#2854](https://github.com/vtex/faststore/issues/2854)) ([20d5471](https://github.com/vtex/faststore/commit/20d547178f2e2a6ae1a7dde4d4e1b5dcbae5e4d6))
17
+
6
18
  ## [3.47.1](https://github.com/vtex/faststore/compare/v3.47.0...v3.47.1) (2025-05-22)
7
19
 
8
20
  **Note:** Version bump only for package @faststore/core
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.47.1",
3
+ "version": "3.49.0",
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.47.0",
47
+ "@faststore/api": "^3.49.0",
48
48
  "@faststore/graphql-utils": "^3.45.0",
49
49
  "@faststore/lighthouse": "^3.45.0",
50
- "@faststore/sdk": "^3.46.0",
50
+ "@faststore/sdk": "^3.49.0",
51
51
  "@faststore/ui": "^3.47.1",
52
52
  "@graphql-codegen/cli": "5.0.2",
53
53
  "@graphql-codegen/client-preset": "4.2.6",
@@ -105,5 +105,5 @@
105
105
  "ts-jest": "29.1.1",
106
106
  "typescript": "5.3.2"
107
107
  },
108
- "gitHead": "8b92299408d358497a78222cccff9bbb5f46fb0e"
108
+ "gitHead": "48b7dca50e1d65fe708e08bae0d39740c232aff6"
109
109
  }
@@ -23,14 +23,9 @@ export const OrganizationDrawer = ({
23
23
  closeDrawer,
24
24
  }: OrganizationDrawerProps) => {
25
25
  const { fade, fadeOut } = useFadeEffect()
26
- const { b2b, person } = useSession()
26
+ const { b2b } = useSession()
27
27
 
28
- const contractName =
29
- b2b?.isCorporate !== null && b2b?.isCorporate !== undefined
30
- ? b2b.isCorporate && b2b?.corporateName
31
- ? b2b?.corporateName
32
- : `${b2b?.firstName ?? ''} ${b2b.lastName ?? ''}`
33
- : `${person?.givenName ?? ''} ${person.familyName ?? ''}`
28
+ const contractName = b2b?.firstName ?? ''
34
29
 
35
30
  return (
36
31
  <SlideOver
@@ -116,13 +116,10 @@
116
116
 
117
117
  [data-fs-button-wrapper] {
118
118
  padding: calc(var(--fs-spacing-2) - var(--fs-spacing-0)) 1.375rem;
119
+ font-size: var(--fs-text-size-tiny);
119
120
  color: var(--fs-color-danger-text);
120
121
  border: var(--fs-border-width) solid var(--fs-border-color-light);
121
122
  border-radius: var(--fs-border-radius-pill);
122
-
123
- @include media("<=tablet") {
124
- font-size: var(--fs-text-size-tiny);
125
- }
126
123
  }
127
124
  }
128
125
  }
@@ -1,12 +1,15 @@
1
1
  import { Button, Icon } from '@faststore/ui'
2
2
  import type { ServerListOrdersQueryQuery } from '@generated/graphql'
3
3
  import { useRouter } from 'next/router'
4
+ import { useState } from 'react'
4
5
 
5
6
  import MyAccountStatusBadge from 'src/components/account/components/MyAccountStatusBadge'
6
7
  import { useFormatPrice } from 'src/components/account/utils/useFormatPrice'
7
8
  import { useSession } from 'src/sdk/session'
8
9
  import useScreenResize from 'src/sdk/ui/useScreenResize'
9
10
 
11
+ const MAX_COST_CENTERS = 5
12
+
10
13
  function formatShippingDate(date: string, locale: string) {
11
14
  return new Date(date).toLocaleDateString(locale, {
12
15
  year: 'numeric',
@@ -105,6 +108,7 @@ export default function MyAccountListOrdersTable({
105
108
  const { isDesktop } = useScreenResize()
106
109
  const { locale } = useSession()
107
110
  const formatPrice = useFormatPrice()
111
+ const [expandedRows, setExpandedRows] = useState<Record<string, boolean>>({})
108
112
 
109
113
  const handleOrderDetail = ({ orderId }: { orderId: string }) => {
110
114
  router.push({
@@ -112,6 +116,13 @@ export default function MyAccountListOrdersTable({
112
116
  })
113
117
  }
114
118
 
119
+ const handleToggleExpand = (orderId: string) => {
120
+ setExpandedRows((prev) => ({
121
+ ...prev,
122
+ [orderId]: !prev[orderId],
123
+ }))
124
+ }
125
+
115
126
  return (
116
127
  <>
117
128
  <table data-fs-list-orders-table>
@@ -120,14 +131,13 @@ export default function MyAccountListOrdersTable({
120
131
  data-fs-list-orders-table-header-row
121
132
  data-fs-list-orders-table-row
122
133
  >
123
- <th data-fs-list-orders-table-header-cell>Order</th>
124
134
  {isDesktop && (
125
135
  <>
136
+ <th data-fs-list-orders-table-header-cell>Order</th>
126
137
  <th data-fs-list-orders-table-header-cell>Ordered by</th>
127
- <th data-fs-list-orders-table-header-cell>Cost Center</th>
128
138
  <th data-fs-list-orders-table-header-cell>Release</th>
129
139
  <th data-fs-list-orders-table-header-cell>PO number</th>
130
- <th data-fs-list-orders-table-header-cell>Delivery by</th>
140
+ <th data-fs-list-orders-table-header-cell>Cost Center</th>
131
141
  </>
132
142
  )}
133
143
  <th data-fs-list-orders-table-header-cell>
@@ -136,70 +146,123 @@ export default function MyAccountListOrdersTable({
136
146
  </tr>
137
147
  </thead>
138
148
  <tbody data-fs-list-orders-table-body>
139
- {listOrders.list.map((item) => (
140
- // biome-ignore lint/a11y/useKeyWithClickEvents: <explanation>
141
- <tr
142
- data-fs-list-orders-table-body-row
143
- data-fs-list-orders-table-row
144
- key={item.orderId}
145
- onClick={() => handleOrderDetail({ orderId: item.orderId })}
146
- role="button"
147
- >
148
- <td data-fs-list-orders-table-cell>
149
- <div data-fs-list-orders-table-product-info>
150
- <p data-fs-list-orders-table-product-info-order-id>
151
- {item.orderId || '-'}
152
- </p>
153
- <p data-fs-list-orders-table-product-info-order-date>
154
- Placed on{' '}
155
- {item.creationDate
156
- ? formatShippingDate(item.creationDate, locale)
157
- : '-'}
158
- </p>
159
- <p data-fs-list-orders-table-product-info-order-total>
160
- Total: {formatPrice(item.totalValue, item.currencyCode)}
161
- </p>
162
- </div>
163
- </td>
149
+ {listOrders.list.map((item) => {
150
+ const costCenters = item?.customFields?.costCenter || []
151
+ const isExpanded = expandedRows[item.orderId]
152
+ const shouldShowButton = costCenters.length > MAX_COST_CENTERS
153
+ const displayedCostCenters = isExpanded
154
+ ? costCenters
155
+ : costCenters.slice(0, 5)
156
+ return (
157
+ // biome-ignore lint/a11y/useKeyWithClickEvents: <explanation>
158
+ <tr
159
+ data-fs-list-orders-table-body-row
160
+ data-fs-list-orders-table-row
161
+ key={item.orderId}
162
+ onClick={() => handleOrderDetail({ orderId: item.orderId })}
163
+ role="button"
164
+ >
165
+ <td data-fs-list-orders-table-cell>
166
+ <div data-fs-list-orders-table-product-info>
167
+ <p data-fs-list-orders-table-product-info-order-id>
168
+ {item.orderId || '-'}
169
+ </p>
170
+ <p data-fs-list-orders-table-product-info-order-date>
171
+ Placed on{' '}
172
+ {item.creationDate
173
+ ? formatShippingDate(item.creationDate, locale)
174
+ : '-'}
175
+ </p>
176
+ {isDesktop && (
177
+ <p data-fs-list-orders-table-product-info-order-delivery>
178
+ Delivery by{' '}
179
+ {item.ShippingEstimatedDate
180
+ ? formatShippingDate(
181
+ item.ShippingEstimatedDate,
182
+ locale
183
+ )
184
+ : '-'}
185
+ </p>
186
+ )}
164
187
 
165
- {isDesktop && (
166
- <>
167
- <td data-fs-list-orders-table-cell>{item?.clientName}</td>
168
- <td data-fs-list-orders-table-cell>
169
- <p>(Cost Center)</p>
170
- </td>
171
- <td data-fs-list-orders-table-cell>
172
- <p>(Release)</p>
173
- </td>
174
- <td data-fs-list-orders-table-cell>
175
- <p>(PO Number)</p>
176
- </td>
177
- <td data-fs-list-orders-table-cell>
178
- {item.ShippingEstimatedDate
179
- ? formatShippingDate(item.ShippingEstimatedDate, locale)
180
- : '-'}
181
- </td>
182
- </>
183
- )}
188
+ <p data-fs-list-orders-table-product-info-order-total>
189
+ Total: {formatPrice(item.totalValue, item.currencyCode)}
190
+ </p>
191
+ </div>
192
+ </td>
184
193
 
185
- <td data-fs-list-orders-table-cell>
186
- <MyAccountStatusBadge
187
- status={item.status}
188
- statusFallback={item.statusDescription}
189
- />
190
- {!isDesktop && (
191
- <p>
192
- {item.ShippingEstimatedDate
193
- ? `Delivery by ${formatShippingDate(
194
- item.ShippingEstimatedDate,
195
- locale
196
- )}`
197
- : ''}
198
- </p>
194
+ {isDesktop && (
195
+ <>
196
+ <td data-fs-list-orders-table-cell>{item?.clientName}</td>
197
+ <td data-fs-list-orders-table-cell>
198
+ {item?.customFields?.release?.map((field) => (
199
+ <p key={field}>{field}</p>
200
+ ))}
201
+ </td>
202
+ <td data-fs-list-orders-table-cell>
203
+ {item?.customFields?.poNumber?.map((field) => (
204
+ <p key={field}>{field}</p>
205
+ ))}
206
+ </td>
207
+ <td data-fs-list-orders-table-cell>
208
+ {displayedCostCenters.map((field) => (
209
+ <p key={field}>{field}</p>
210
+ ))}
211
+ {shouldShowButton && (
212
+ <Button
213
+ data-fs-list-orders-table-expand-button
214
+ size="small"
215
+ variant="primary"
216
+ inverse
217
+ iconPosition="right"
218
+ icon={
219
+ isExpanded ? (
220
+ <Icon
221
+ width={16}
222
+ height={16}
223
+ name="CaretUp"
224
+ aria-label="Collapse"
225
+ />
226
+ ) : (
227
+ <Icon
228
+ width={16}
229
+ height={16}
230
+ name="CaretDown"
231
+ aria-label="Expand"
232
+ />
233
+ )
234
+ }
235
+ onClick={(e) => {
236
+ e.stopPropagation()
237
+ handleToggleExpand(item.orderId)
238
+ }}
239
+ >
240
+ {isExpanded ? 'View less' : 'View all'}
241
+ </Button>
242
+ )}
243
+ </td>
244
+ </>
199
245
  )}
200
- </td>
201
- </tr>
202
- ))}
246
+
247
+ <td data-fs-list-orders-table-cell>
248
+ <MyAccountStatusBadge
249
+ status={item.status}
250
+ statusFallback={item.statusDescription}
251
+ />
252
+ {!isDesktop && (
253
+ <p>
254
+ {item.ShippingEstimatedDate
255
+ ? `Delivery by ${formatShippingDate(
256
+ item.ShippingEstimatedDate,
257
+ locale
258
+ )}`
259
+ : ''}
260
+ </p>
261
+ )}
262
+ </td>
263
+ </tr>
264
+ )
265
+ })}
203
266
  </tbody>
204
267
  </table>
205
268
  {isDesktop && (