@faststore/core 3.91.2 → 3.91.3-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +79 -79
  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/images-manifest.json +1 -1
  10. package/.next/prerender-manifest.js +1 -1
  11. package/.next/prerender-manifest.json +1 -1
  12. package/.next/react-loadable-manifest.json +28 -28
  13. package/.next/required-server-files.json +1 -1
  14. package/.next/routes-manifest.json +1 -1
  15. package/.next/server/chunks/2792.js +1 -1
  16. package/.next/server/chunks/3836.js +1 -1
  17. package/.next/server/chunks/4168.js +1 -1
  18. package/.next/server/chunks/4803.js +1 -1
  19. package/.next/server/chunks/5683.js +1 -1
  20. package/.next/server/chunks/6789.js +1 -1
  21. package/.next/server/chunks/7098.js +1 -1
  22. package/.next/server/chunks/870.js +1 -1
  23. package/.next/server/chunks/948.js +1 -1
  24. package/.next/server/chunks/9563.js +1 -1
  25. package/.next/server/chunks/9630.js +1 -1
  26. package/.next/server/chunks/9740.js +1 -1
  27. package/.next/server/chunks/9853.js +1 -1
  28. package/.next/server/chunks/UISKUMatrixSidebar.js +1 -1
  29. package/.next/server/functions-config-manifest.json +1 -1
  30. package/.next/server/middleware-build-manifest.js +1 -1
  31. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  32. package/.next/server/pages/404.js +1 -1
  33. package/.next/server/pages/500.js +1 -1
  34. package/.next/server/pages/[...slug].js +1 -1
  35. package/.next/server/pages/[slug]/p.js +1 -1
  36. package/.next/server/pages/_error.js +1 -1
  37. package/.next/server/pages/api/graphql.js +1 -1
  38. package/.next/server/pages/checkout.js +1 -1
  39. package/.next/server/pages/en-US/404.html +1 -1
  40. package/.next/server/pages/en-US/500.html +1 -1
  41. package/.next/server/pages/en-US/checkout.html +1 -1
  42. package/.next/server/pages/en-US/login.html +1 -1
  43. package/.next/server/pages/en-US/s.html +1 -1
  44. package/.next/server/pages/en-US.html +1 -1
  45. package/.next/server/pages/index.js +1 -1
  46. package/.next/server/pages/login.js +1 -1
  47. package/.next/server/pages/pvt/account/403.js +1 -1
  48. package/.next/server/pages/pvt/account/404.js +1 -1
  49. package/.next/server/pages/pvt/account/[...unknown].js +1 -1
  50. package/.next/server/pages/pvt/account/orders/[id].js +1 -1
  51. package/.next/server/pages/pvt/account/orders.js +1 -1
  52. package/.next/server/pages/pvt/account/profile.js +1 -1
  53. package/.next/server/pages/pvt/account/security.js +1 -1
  54. package/.next/server/pages/pvt/account/user-details.js +1 -1
  55. package/.next/server/pages/pvt/account.js +1 -1
  56. package/.next/server/pages/s.js +1 -1
  57. package/.next/server/pages-manifest.json +1 -1
  58. package/.next/static/chunks/2284.dffe7b0e5a5bfb4a.js +1 -0
  59. package/.next/static/chunks/{2927.23bae2c79f0ac0f3.js → 2927.5a79877943a6bf7c.js} +1 -1
  60. package/.next/static/chunks/3399.3e1f685c992c345b.js +1 -0
  61. package/.next/static/chunks/3836.612763339fc4c64c.js +1 -0
  62. package/.next/static/chunks/5859.1023ecc1175e7e5a.js +1 -0
  63. package/.next/static/chunks/{6031-a7dfc540189ff57c.js → 6031-b0b111f48a7d504d.js} +2 -2
  64. package/.next/static/chunks/6789.960162355435a81d.js +1 -0
  65. package/.next/static/chunks/7191-5f9bc40c648eda05.js +1 -0
  66. package/.next/static/chunks/{9173-51ba7ca2f546f879.js → 9173-2dea6acd60aa8030.js} +1 -1
  67. package/.next/static/chunks/{9399.132e63584d15075f.js → 9399.48251a278809f7d3.js} +1 -1
  68. package/.next/static/chunks/CartItem.092df07db9e8b271.js +1 -0
  69. package/.next/static/chunks/Gift.08db4da8c89cacf1.js +1 -0
  70. package/.next/static/chunks/UISKUMatrixSidebar.87ba393b7d738e99.js +1 -0
  71. package/.next/static/chunks/{UIToast.de15325248043ce5.js → UIToast.19a8664c01a00d3a.js} +1 -1
  72. package/.next/static/chunks/{main-595f5e3b626b9fff.js → main-ec03882c4375091d.js} +1 -1
  73. package/.next/static/chunks/pages/{[...slug]-7878c4679614a34d.js → [...slug]-5d0cf270dda4b839.js} +1 -1
  74. package/.next/static/chunks/pages/[slug]/p-28fab8021db28766.js +1 -0
  75. package/.next/static/chunks/pages/_app-69a5536f585549e0.js +1 -0
  76. package/.next/static/chunks/pages/index-900b6104074a72b8.js +1 -0
  77. package/.next/static/chunks/pages/pvt/account/orders-369a813fa114b381.js +1 -0
  78. package/.next/static/chunks/pages/{s-a056370e5ad4366b.js → s-9ba90a9525cf19e8.js} +1 -1
  79. package/.next/static/chunks/{webpack-95c6847556354c4b.js → webpack-befe37790ea11a4b.js} +1 -1
  80. package/.next/static/css/{244373752cfc52c7.css → 9f8fb1ef9b49d844.css} +1 -1
  81. package/.next/static/{e1Iy_PbcFsZ57QejzRzyL → jsgIfezCdBnXngIoyg7Az}/_buildManifest.js +1 -1
  82. package/.next/trace +138 -138
  83. package/.turbo/turbo-build.log +17 -17
  84. package/.turbo/turbo-test.log +5 -5
  85. package/CHANGELOG.md +11 -0
  86. package/discovery.config.default.js +1 -1
  87. package/next.config.js +3 -1
  88. package/package.json +7 -7
  89. package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterSlider.tsx +0 -8
  90. package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/section.module.scss +0 -2
  91. package/src/components/account/orders/MyAccountListOrders/MyAccountListOrders.tsx +1 -28
  92. package/src/components/account/orders/MyAccountListOrders/MyAccountSelectedTags/MyAccountSelectedTags.tsx +3 -20
  93. package/src/components/templates/ProductListingPage/ProductListingPage.tsx +1 -0
  94. package/src/components/ui/Image/Image.tsx +4 -5
  95. package/src/components/ui/Image/loader.ts +60 -26
  96. package/src/pages/_app.tsx +3 -0
  97. package/src/pages/pvt/account/orders/index.tsx +0 -6
  98. package/src/pages/s.tsx +1 -0
  99. package/src/sdk/search/Sentinel.tsx +4 -4
  100. package/src/sdk/search/useMyAccountFilter.ts +0 -7
  101. package/src/sdk/ui/useScrollRestoration.tsx +65 -0
  102. package/.next/static/chunks/2284.be64169724492654.js +0 -1
  103. package/.next/static/chunks/3399.b1311b661da6b316.js +0 -1
  104. package/.next/static/chunks/3836.5a76d717d95d1f2d.js +0 -1
  105. package/.next/static/chunks/5859.0b4ee873dc86bef7.js +0 -1
  106. package/.next/static/chunks/6789.856de844108ee5da.js +0 -1
  107. package/.next/static/chunks/7191-eef95438b827504b.js +0 -1
  108. package/.next/static/chunks/CartItem.afa42120880fcb94.js +0 -1
  109. package/.next/static/chunks/Gift.9d0570cbe866077f.js +0 -1
  110. package/.next/static/chunks/UISKUMatrixSidebar.2cfa8552a84d2f5f.js +0 -1
  111. package/.next/static/chunks/pages/[slug]/p-5f89d29d02064f15.js +0 -1
  112. package/.next/static/chunks/pages/_app-e8ac4d8f914feb94.js +0 -1
  113. package/.next/static/chunks/pages/index-f285046ed161df07.js +0 -1
  114. package/.next/static/chunks/pages/pvt/account/orders-34821345bd7401d9.js +0 -1
  115. package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetPlacedBy/MyAccountFilterFacetPlacedBy.tsx +0 -172
  116. package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetPlacedBy/index.ts +0 -2
  117. package/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/MyAccountFilterFacetPlacedBy/styles.scss +0 -96
  118. package/src/sdk/account/useShopperSuggestions.ts +0 -151
  119. /package/.next/static/{e1Iy_PbcFsZ57QejzRzyL → jsgIfezCdBnXngIoyg7Az}/_ssgManifest.js +0 -0
@@ -1,23 +1,23 @@
1
1
 
2
- > @faststore/core@3.91.1 prebuild /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.91.3-dev.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.91.1 partytown /home/runner/work/faststore/faststore/packages/core
6
+ > @faststore/core@3.91.3-dev.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.91.1 generate /home/runner/work/faststore/faststore/packages/core
11
+ > @faststore/core@3.91.3-dev.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.91.1 generate:schema /home/runner/work/faststore/faststore/packages/core
15
+ > @faststore/core@3.91.3-dev.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.91.1 generate:codegen /home/runner/work/faststore/faststore/packages/core
20
+ > @faststore/core@3.91.3-dev.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.91.1 format:generated /home/runner/work/faststore/faststore/packages/core
40
+ > @faststore/core@3.91.3-dev.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.91.1 build /home/runner/work/faststore/faststore/packages/core
44
+ > @faststore/core@3.91.3-dev.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
@@ -76,7 +76,7 @@ Route (pages) Size First Load JS
76
76
  ┌ ● / 7.36 kB 146 kB
77
77
  ├ └ css/c29fee5b9f9d48d9.css 3.07 kB
78
78
  ├ /_app 0 B 108 kB
79
- ├ ● /[...slug] 2.49 kB 156 kB
79
+ ├ ● /[...slug] 2.54 kB 157 kB
80
80
  ├ ● /[slug]/p 97.5 kB 236 kB
81
81
  ├ └ css/a9328b56f3942b82.css 22 kB
82
82
  ├ ○ /404 1.57 kB 140 kB
@@ -85,30 +85,30 @@ Route (pages) Size First Load JS
85
85
  ├ λ /api/health/live 0 B 108 kB
86
86
  ├ λ /api/health/ready 0 B 108 kB
87
87
  ├ λ /api/preview 0 B 108 kB
88
- ├ ● /checkout 749 B 139 kB
89
- ├ ● /login 1.7 kB 140 kB
88
+ ├ ● /checkout 749 B 140 kB
89
+ ├ ● /login 1.7 kB 141 kB
90
90
  ├ λ /pvt/account 247 B 108 kB
91
91
  ├ ● /pvt/account/[...unknown] 287 B 108 kB
92
92
  ├ λ /pvt/account/403 2.98 kB 142 kB
93
93
  ├ └ css/c53b17b6fa994508.css 4.66 kB
94
94
  ├ λ /pvt/account/404 2.18 kB 141 kB
95
95
  ├ └ css/ceb410a7062740d1.css 4.72 kB
96
- ├ λ /pvt/account/orders 10.6 kB 149 kB
97
- ├ └ css/244373752cfc52c7.css 13.9 kB
96
+ ├ λ /pvt/account/orders 9.4 kB 148 kB
97
+ ├ └ css/9f8fb1ef9b49d844.css 13.3 kB
98
98
  ├ λ /pvt/account/orders/[id] 12.1 kB 151 kB
99
99
  ├ └ css/da5bfb1f39c54578.css 13.3 kB
100
100
  ├ λ /pvt/account/profile 1.98 kB 141 kB
101
101
  ├ └ css/b65e005fb943434c.css 4.4 kB
102
102
  ├ λ /pvt/account/security 3.96 kB 143 kB
103
103
  ├ └ css/6bb0abee27fe0019.css 5.65 kB
104
- ├ λ /pvt/account/user-details 1.91 kB 140 kB
104
+ ├ λ /pvt/account/user-details 1.91 kB 141 kB
105
105
  ├ └ css/bd121d85d6ceed46.css 4.52 kB
106
- └ ● /s 3.29 kB 157 kB
106
+ └ ● /s 3.33 kB 157 kB
107
107
  + First Load JS shared by all 111 kB
108
108
  ├ chunks/framework-d514426edf885c68.js 45.4 kB
109
- ├ chunks/main-595f5e3b626b9fff.js 33.2 kB
110
- ├ chunks/pages/_app-e8ac4d8f914feb94.js 25.2 kB
111
- ├ chunks/webpack-95c6847556354c4b.js 3.84 kB
109
+ ├ chunks/main-ec03882c4375091d.js 33.2 kB
110
+ ├ chunks/pages/_app-69a5536f585549e0.js 25.5 kB
111
+ ├ chunks/webpack-befe37790ea11a4b.js 3.84 kB
112
112
  └ css/24a5e8f6808266fe.css 3.53 kB
113
113
 
114
114
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
@@ -1,14 +1,14 @@
1
1
 
2
- > @faststore/core@3.91.1 test /home/runner/work/faststore/faststore/packages/core
2
+ > @faststore/core@3.91.3-dev.0 test /home/runner/work/faststore/faststore/packages/core
3
3
  > jest
4
4
 
5
- PASS test/server/cms/global.test.ts (27.666 s)
6
- PASS test/utils/multipleTemplates.test.ts (28.301 s)
5
+ PASS test/server/cms/global.test.ts (26.493 s)
6
+ PASS test/utils/multipleTemplates.test.ts (26.909 s)
7
7
  PASS test/server/cms/index.test.ts
8
- PASS test/server/index.test.ts (31.297 s)
8
+ PASS test/server/index.test.ts (29.984 s)
9
9
 
10
10
  Test Suites: 4 passed, 4 total
11
11
  Tests: 22 passed, 22 total
12
12
  Snapshots: 0 total
13
- Time: 32.383 s
13
+ Time: 31.274 s
14
14
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.91.3-dev.1](https://github.com/vtex/faststore/compare/v3.91.3-dev.0...v3.91.3-dev.1) (2025-10-30)
7
+
8
+ **Note:** Version bump only for package @faststore/core
9
+
10
+ ## 3.91.3-dev.0 (2025-10-30)
11
+
12
+ ### Bug Fixes
13
+
14
+ - add background color to TextareaField label ([#3079](https://github.com/vtex/faststore/issues/3079)) ([9e5a64d](https://github.com/vtex/faststore/commit/9e5a64d51d9983f028ec5cf0004cfed633b1ee8d)), closes [#2705](https://github.com/vtex/faststore/issues/2705) [/github.com/vtex/faststore/pull/2705#pullrequestreview-2710467780](https://github.com//github.com/vtex/faststore/pull/2705/issues/pullrequestreview-2710467780) [#2705](https://github.com/vtex/faststore/issues/2705) [/github.com/vtex/faststore/pull/2705#pullrequestreview-2710467780](https://github.com//github.com/vtex/faststore/pull/2705/issues/pullrequestreview-2710467780)
15
+ - remove purchaseAgentId filter - SFS-2942 ([#3085](https://github.com/vtex/faststore/issues/3085)) ([270588f](https://github.com/vtex/faststore/commit/270588f1e7490ff94e296c4da7116c4112883359))
16
+
6
17
  ## 3.91.2 (2025-10-27)
7
18
 
8
19
  ### Bug Fixes
@@ -146,11 +146,11 @@ module.exports = {
146
146
  enableRedirects: false,
147
147
  enableSearchSSR: false,
148
148
  enableFaststoreMyAccount: false,
149
- enableVtexAssetsLoader: false,
150
149
  graphqlCacheControl: {
151
150
  maxAge: 0, // 0 disables cache, 5 * 60 enable cache control maxAge 5 minutes
152
151
  staleWhileRevalidate: 60 * 60, // 1 hour
153
152
  },
154
153
  refreshToken: false,
154
+ scrollRestoration: false,
155
155
  },
156
156
  }
package/next.config.js CHANGED
@@ -13,6 +13,8 @@ const nextConfig = {
13
13
  domains: [`${storeConfig.api.storeId}.vtexassets.com`],
14
14
  deviceSizes: [360, 412, 540, 768, 1280, 1440],
15
15
  imageSizes: [34, 68, 154, 320],
16
+ loader: 'custom',
17
+ loaderFile: './src/components/ui/Image/loader.ts',
16
18
  },
17
19
  i18n: {
18
20
  locales: [storeConfig.session.locale],
@@ -23,7 +25,7 @@ const nextConfig = {
23
25
  },
24
26
  // TODO: We won't need to enable this experimental feature when migrating to Next.js 13
25
27
  experimental: {
26
- scrollRestoration: true,
28
+ scrollRestoration: !storeConfig.experimental.scrollRestoration,
27
29
  /*
28
30
  * The FastStore Discovery CLI will update this value to match the path where the
29
31
  * command is being run, because that is where the node_modules directory is.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/core",
3
- "version": "3.91.2",
3
+ "version": "3.91.3-dev.1",
4
4
  "license": "MIT",
5
5
  "repository": "vtex/faststore",
6
6
  "browserslist": "supports es6-module and not dead",
@@ -44,11 +44,11 @@
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.91.2",
48
- "@faststore/graphql-utils": "^3.91.2",
49
- "@faststore/lighthouse": "^3.91.2",
50
- "@faststore/sdk": "^3.91.2",
51
- "@faststore/ui": "^3.91.2",
47
+ "@faststore/api": "^3.91.3-dev.0",
48
+ "@faststore/graphql-utils": "^3.91.3-dev.0",
49
+ "@faststore/lighthouse": "^3.91.3-dev.0",
50
+ "@faststore/sdk": "^3.91.3-dev.1",
51
+ "@faststore/ui": "^3.91.3-dev.0",
52
52
  "@graphql-codegen/cli": "5.0.2",
53
53
  "@graphql-codegen/client-preset": "4.2.6",
54
54
  "@graphql-codegen/typescript": "4.0.7",
@@ -116,5 +116,5 @@
116
116
  "ts-jest": "29.1.1",
117
117
  "typescript": "5.3.2"
118
118
  },
119
- "gitHead": "6fa73a4cd395be39afc7e376c45beb3201bc50a9"
119
+ "gitHead": "065cbda4584ddd21f8e6762f3fac9f340ec71125"
120
120
  }
@@ -13,7 +13,6 @@ import type {
13
13
  useMyAccountFilter,
14
14
  } from 'src/sdk/search/useMyAccountFilter'
15
15
  import FilterFacetDateRange from './MyAccountFilterFacetDateRange'
16
- import FilterFacetPlacedBy from './MyAccountFilterFacetPlacedBy'
17
16
  import styles from './section.module.scss'
18
17
 
19
18
  export interface FilterSliderProps {
@@ -92,10 +91,6 @@ function MyAccountFilterSlider({
92
91
  : [value]
93
92
  }
94
93
 
95
- if (key === 'purchaseAgentId') {
96
- acc['purchaseAgentId'] = value
97
- }
98
-
99
94
  return acc
100
95
  },
101
96
  {} as Record<string, string | string[]>
@@ -208,9 +203,6 @@ function MyAccountFilterSlider({
208
203
  })}
209
204
  </UIFilterFacetBoolean>
210
205
  )}
211
- {type === 'StoreFacetPlacedBy' && isExpanded && (
212
- <FilterFacetPlacedBy selected={selected} dispatch={dispatch} />
213
- )}
214
206
  {type === 'StoreFacetRange' && isExpanded && (
215
207
  <FilterFacetDateRange
216
208
  ref={dateRangeInputRef}
@@ -1,6 +1,5 @@
1
1
  .section {
2
2
  @import "@faststore/ui/src/components/atoms/Button/styles.scss";
3
- @import "@faststore/ui/src/components/atoms/Loader/styles.scss";
4
3
  @import "@faststore/ui/src/components/atoms/Badge/styles.scss";
5
4
  @import "@faststore/ui/src/components/atoms/Checkbox/styles.scss";
6
5
  @import "@faststore/ui/src/components/atoms/Icon/styles.scss";
@@ -17,7 +16,6 @@
17
16
  @import "@faststore/ui/src/components/organisms/FilterSlider/styles.scss";
18
17
  @import "@faststore/ui/src/components/organisms/SlideOver/styles.scss";
19
18
  @import "./MyAccountFilterFacetDateRange/styles.scss";
20
- @import "./MyAccountFilterFacetPlacedBy/styles.scss";
21
19
 
22
20
  [data-fs-badge] {
23
21
  display: none;
@@ -14,7 +14,6 @@ import {
14
14
  } from '@faststore/ui'
15
15
  import { useEffect } from 'react'
16
16
  import MyAccountFilterSlider from 'src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider'
17
- import AccountHeader from '../../components/MyAccountHeader'
18
17
  import { useDebounce } from 'src/sdk/account/useDebounce'
19
18
  import {
20
19
  useMyAccountFilter,
@@ -23,6 +22,7 @@ import {
23
22
  } from 'src/sdk/search/useMyAccountFilter'
24
23
  import useScreenResize from 'src/sdk/ui/useScreenResize'
25
24
  import { FastStoreOrderStatus } from 'src/utils/userOrderStatus'
25
+ import AccountHeader from '../../components/MyAccountHeader'
26
26
  import MyAccountListOrdersTable, {
27
27
  Pagination,
28
28
  } from './MyAccountListOrdersTable/MyAccountListOrdersTable'
@@ -40,7 +40,6 @@ export type MyAccountListOrdersProps = {
40
40
  dateFinal: string
41
41
  text: string
42
42
  clientEmail: string
43
- purchaseAgentId?: string
44
43
  }
45
44
  }
46
45
 
@@ -75,11 +74,6 @@ function getSelectedFacets({
75
74
  key: 'dateFinal',
76
75
  value: String(value),
77
76
  })
78
- } else if (filter === 'purchaseAgentId' && value) {
79
- acc.push({
80
- key: 'purchaseAgentId',
81
- value: String(value),
82
- })
83
77
  }
84
78
 
85
79
  return acc
@@ -103,12 +97,6 @@ function getAllFacets({
103
97
  value: status.toLowerCase(),
104
98
  })),
105
99
  },
106
- /* FIXME: Removing this facet until we have a cost-effective way to get the shopper name
107
- {
108
- __typename: 'StoreFacetPlacedBy',
109
- key: 'purchaseAgentId',
110
- label: 'Placed by',
111
- } as any, */
112
100
  {
113
101
  __typename: 'StoreFacetRange',
114
102
  key: 'dateRange',
@@ -246,8 +234,6 @@ export default function MyAccountListOrders({
246
234
  status: filters.status,
247
235
  dateInitial: filters.dateInitial,
248
236
  dateFinal: filters.dateFinal,
249
- // FIXME: Removing this filter until we have a cost-effective way to get the shopper name
250
- // purchaseAgentId: filters.purchaseAgentId,
251
237
  }}
252
238
  onClearAll={() => {
253
239
  window.location.href = '/pvt/account/orders'
@@ -255,17 +241,6 @@ export default function MyAccountListOrders({
255
241
  onRemoveFilter={(key, value) => {
256
242
  const { page, clientEmail, ...updatedFilters } = { ...filters }
257
243
 
258
- if (key === 'status' && Array.isArray(updatedFilters[key])) {
259
- updatedFilters[key] = updatedFilters[key].filter((v) => v !== value)
260
- } else if (key === 'dateInitial' || key === 'dateFinal') {
261
- delete updatedFilters.dateInitial
262
- delete updatedFilters.dateFinal
263
- } else if (key === 'purchaseAgentId') {
264
- delete updatedFilters.purchaseAgentId
265
- } else {
266
- delete updatedFilters[key]
267
- }
268
-
269
244
  if (key === 'status' && Array.isArray(updatedFilters[key])) {
270
245
  updatedFilters[key] = updatedFilters[key].filter(
271
246
  (v) => v.toLowerCase() !== value.toLowerCase()
@@ -273,8 +248,6 @@ export default function MyAccountListOrders({
273
248
  } else if (key === 'dateInitial' || key === 'dateFinal') {
274
249
  delete updatedFilters.dateInitial
275
250
  delete updatedFilters.dateFinal
276
- } else if (key === 'purchaseAgentId') {
277
- delete updatedFilters.purchaseAgentId
278
251
  } else {
279
252
  delete updatedFilters[key]
280
253
  }
@@ -7,11 +7,10 @@ type MyAccountSelectedTagsProps = {
7
7
  status?: string[]
8
8
  dateInitial?: string
9
9
  dateFinal?: string
10
- purchaseAgentId?: string
11
10
  }
12
11
  onClearAll: () => void
13
12
  onRemoveFilter: (
14
- key: 'status' | 'dateInitial' | 'dateFinal' | 'purchaseAgentId',
13
+ key: 'status' | 'dateInitial' | 'dateFinal',
15
14
  value: string
16
15
  ) => void
17
16
  }
@@ -41,7 +40,7 @@ function Tags({
41
40
  onRemoveFilter,
42
41
  }: Pick<MyAccountSelectedTagsProps, 'filters' | 'onRemoveFilter'>) {
43
42
  const { locale } = useSession()
44
- const { dateInitial, dateFinal, status, purchaseAgentId } = filters
43
+ const { dateInitial, dateFinal, status } = filters
45
44
  const formattedDateInitial = dateInitial
46
45
  ? formatFilterDate(dateInitial, locale)
47
46
  : ''
@@ -86,21 +85,8 @@ function Tags({
86
85
  </div>
87
86
  ))
88
87
 
89
- const placedByTag = purchaseAgentId && (
90
- <div key={`placed-by-${purchaseAgentId}`} data-fs-list-orders-selected-tag>
91
- <span>Placed by: {purchaseAgentId}</span>
92
- <button
93
- data-fs-list-orders-selected-tag-clear
94
- onClick={() => onRemoveFilter('purchaseAgentId', purchaseAgentId)}
95
- >
96
- &times;
97
- </button>
98
- </div>
99
- )
100
-
101
88
  return (
102
89
  <>
103
- {placedByTag}
104
90
  {dateTag}
105
91
  {statusTags}
106
92
  </>
@@ -114,10 +100,7 @@ function MyAccountSelectedTags({
114
100
  }: MyAccountSelectedTagsProps) {
115
101
  const hasFilters = Object.entries(filters).some(
116
102
  ([key, values]) =>
117
- (key === 'status' ||
118
- key === 'dateInitial' ||
119
- key === 'dateFinal' ||
120
- key === 'purchaseAgentId') &&
103
+ (key === 'status' || key === 'dateInitial' || key === 'dateFinal') &&
121
104
  values &&
122
105
  (Array.isArray(values) ? values.length > 0 : true)
123
106
  )
@@ -118,6 +118,7 @@ export default function ProductListingPage({
118
118
  <SearchProvider
119
119
  onChange={applySearchState}
120
120
  itemsPerPage={itemsPerPage}
121
+ shouldResetInfiniteScroll={!storeConfig.experimental?.scrollRestoration}
121
122
  {...searchParams}
122
123
  >
123
124
  {/* SEO */}
@@ -1,18 +1,17 @@
1
1
  import { memo } from 'react'
2
2
 
3
3
  import NextImage, { type ImageProps as NextImageProps } from 'next/image'
4
- import loader from './loader'
4
+ import { faststoreLoader } from './loader'
5
5
 
6
6
  export type ImageProps = NextImageProps
7
7
 
8
- // Next loader function does not handle all props as height and options
9
- // so we use a custom loader to handle images using thumbor server with VTEX CDN
10
- // https://nextjs.org/docs/api-reference/next/image#loader
8
+ // FastStore Image component that uses custom loader for VTEX URLs (optimized)
9
+ // Returns src directly for all other images (no optimization)
11
10
  function Image({ loading = 'lazy', ...otherProps }: ImageProps) {
12
11
  return (
13
12
  <NextImage
14
13
  data-fs-image
15
- loader={loader}
14
+ loader={faststoreLoader}
16
15
  loading={loading}
17
16
  priority={loading === 'eager'}
18
17
  {...otherProps}
@@ -1,39 +1,73 @@
1
- import storeConfig from 'discovery.config'
2
1
  import type { ImageLoaderProps } from 'next/image'
3
- const THUMBOR_SERVER = `https://${storeConfig.api.storeId}.vtexassets.com`
4
2
 
3
+ function handleVtexUrls(src: string, width: number, quality = 8) {
4
+ const customQuality =
5
+ quality > 10 ? Math.ceil(Math.min(quality, 100) / 10) : quality
6
+
7
+ // Handle VTEX IDs pattern: /ids/{number}/{filename}.{extension}?{queryParams} (Product Images)
8
+ const regex = /(\/ids\/\d+)\/([^/?]+)(\.[^/?]+)(\?.+)?$/
9
+ if (regex.test(src)) {
10
+ return src.replace(
11
+ regex,
12
+ (_match, idPart, filename, _extension, queryString = '') => {
13
+ const qs = new URLSearchParams(queryString)
14
+ qs.set('quality', customQuality.toString())
15
+ return `${idPart}-${width}-auto/${filename}.webp?${qs.toString()}`
16
+ }
17
+ )
18
+ }
19
+
20
+ // Handle VTEX file manager URLs (CMS Images)
21
+ if (src.includes('vtexassets') && src.includes('/assets')) {
22
+ const url = new URL(src)
23
+ url.searchParams.set('width', width.toString())
24
+ url.searchParams.set('aspect', 'true')
25
+ url.searchParams.set('quality', customQuality.toString())
26
+ return url.toString()
27
+ }
28
+
29
+ return null
30
+ }
31
+
32
+ /**
33
+ * Global loader that handles VTEX-specific URLs with custom logic
34
+ * and falls back to Next.js default behavior for other images
35
+ */
5
36
  export default function customImageLoader({
6
37
  src,
7
38
  width,
8
39
  quality,
9
40
  }: ImageLoaderProps) {
10
- return storeConfig.experimental.enableVtexAssetsLoader
11
- ? fileServerLoader({ src, width })
12
- : thumborLoader({ src, width, quality })
13
- }
14
-
15
- function thumborLoader({ src, width, quality }: ImageLoaderProps) {
16
- const preSizeComponents = [THUMBOR_SERVER, 'unsafe']
17
-
18
- // proportional to the width, enter a height of 0,
19
- const height = 0
20
- const finalSize = `${width}x${height}`
41
+ const vtexResult = handleVtexUrls(src, width, quality)
42
+ if (vtexResult) {
43
+ return vtexResult
44
+ }
21
45
 
22
- const postSizeComponents: string[] = ['center', 'middle']
23
- quality && postSizeComponents.push(`filters:quality(${quality || 80})`)
24
- postSizeComponents.push(encodeURIComponent(src))
46
+ try {
47
+ new URL(src)
48
+ const params = new URLSearchParams()
49
+ params.set('url', src)
50
+ params.set('w', width.toString())
51
+ if (quality) {
52
+ params.set('q', quality.toString())
53
+ }
25
54
 
26
- return [...preSizeComponents, finalSize, ...postSizeComponents].join('/')
55
+ return `/_next/image?${params.toString()}`
56
+ } catch {
57
+ // If URL parsing fails, it's a local path (/logo.svg) or an invalid URL
58
+ return src
59
+ }
27
60
  }
28
61
 
29
- function fileServerLoader({ src, width }: ImageLoaderProps) {
30
- // Regular expression to match the pattern: /ids/{number}/{filename}.{extension}?{queryParams}
31
- const regex = /(\/ids\/\d+)\/([^/?]+)(\.[^/?]+)(\?.+)?$/
62
+ /**
63
+ * Loader used by FastStore Image component that only handles VTEX URLs
64
+ * Returns src directly for other images (no Next.js optimization)
65
+ */
66
+ export function faststoreLoader({ src, width, quality }: ImageLoaderProps) {
67
+ const vtexResult = handleVtexUrls(src, width, quality)
68
+ if (vtexResult) {
69
+ return vtexResult
70
+ }
32
71
 
33
- return src.replace(
34
- regex,
35
- (_match, idPart, filename, _extension, queryString = '') => {
36
- return `${idPart}-${width}-auto/${filename}.webp${queryString}`
37
- }
38
- )
72
+ return src
39
73
  }
@@ -12,8 +12,10 @@ import AnalyticsHandler from 'src/sdk/analytics'
12
12
  import { DeliveryPromiseProvider } from 'src/sdk/deliveryPromise'
13
13
  import ErrorBoundary from 'src/sdk/error/ErrorBoundary'
14
14
  import useGeolocation from 'src/sdk/geolocation/useGeolocation'
15
+ import useScrollRestoration from 'src/sdk/ui/useScrollRestoration'
15
16
 
16
17
  import SEO from 'next-seo.config'
18
+ import storeConfig from 'discovery.config'
17
19
 
18
20
  // FastStore UI's base styles
19
21
  import '../styles/main.scss'
@@ -22,6 +24,7 @@ import { ITEMS_PER_PAGE } from 'src/constants'
22
24
 
23
25
  function App({ Component, pageProps }: AppProps) {
24
26
  useGeolocation()
27
+ storeConfig.experimental?.scrollRestoration && useScrollRestoration()
25
28
  const router = useRouter()
26
29
  const { start: startGlobalSearchState } = useSearch()
27
30
 
@@ -45,7 +45,6 @@ type ListOrdersPageProps = {
45
45
  dateFinal: string
46
46
  text: string
47
47
  clientEmail: string
48
- purchaseAgentId?: string
49
48
  }
50
49
  } & MyAccountProps
51
50
 
@@ -162,10 +161,6 @@ export const getServerSideProps: GetServerSideProps<
162
161
  const dateFinal = (context.query.dateFinal as string | undefined) || ''
163
162
  const text = (context.query.text as string | undefined) || ''
164
163
  const clientEmail = (context.query.clientEmail as string | undefined) || ''
165
- // TODO: Integration: ensure `purchaseAgentId` is mapped to `purchase_agent_id`
166
- // when calling the OMS API. Keep camelCase across the frontend.
167
- const purchaseAgentId =
168
- (context.query.purchaseAgentId as string | undefined) || ''
169
164
 
170
165
  // Map labels from FastStore status to API status
171
166
  const groupedStatus = groupOrderStatusByLabel()
@@ -249,7 +244,6 @@ export const getServerSideProps: GetServerSideProps<
249
244
  dateFinal,
250
245
  text,
251
246
  clientEmail,
252
- purchaseAgentId,
253
247
  },
254
248
  isRepresentative,
255
249
  },
package/src/pages/s.tsx CHANGED
@@ -123,6 +123,7 @@ function Page({
123
123
  <SearchProvider
124
124
  onChange={applySearchState}
125
125
  itemsPerPage={itemsPerPage}
126
+ shouldResetInfiniteScroll={!storeConfig.experimental?.scrollRestoration}
126
127
  {...searchParams}
127
128
  >
128
129
  {/* SEO */}
@@ -6,8 +6,6 @@ import { useRouter } from 'next/router'
6
6
 
7
7
  import type { ProductSummary_ProductFragment } from '@generated/graphql'
8
8
 
9
- import useScreenResize from 'src/sdk/ui/useScreenResize'
10
-
11
9
  interface SentinelProps {
12
10
  page: number
13
11
  pageSize: number
@@ -41,8 +39,10 @@ const replacePagination = (page: string, router: NextRouter) => {
41
39
  function Sentinel({ page, children }: PropsWithChildren<SentinelProps>) {
42
40
  const router = useRouter()
43
41
  const { pages } = useSearch()
44
- const { isMobile } = useScreenResize()
45
- const { ref, inView } = useInView({ threshold: isMobile ? 0.3 : 0.7 })
42
+ const { ref, inView } = useInView({
43
+ threshold: [0.3, 0.7],
44
+ triggerOnce: false,
45
+ })
46
46
 
47
47
  useEffect(() => {
48
48
  // Only replace pagination state when infinite scroll
@@ -49,16 +49,9 @@ export type MyAccountFilter_Facets_StoreFacetRange_Fragment = {
49
49
  to: string
50
50
  }
51
51
 
52
- export type MyAccountFilter_Facets_StoreFacetPlacedBy_Fragment = {
53
- __typename: 'StoreFacetPlacedBy'
54
- key: string
55
- label: string
56
- }
57
-
58
52
  export type MyAccountFilter_FacetsFragment =
59
53
  | MyAccountFilter_Facets_StoreFacetBoolean_Fragment
60
54
  | MyAccountFilter_Facets_StoreFacetRange_Fragment
61
- | MyAccountFilter_Facets_StoreFacetPlacedBy_Fragment
62
55
 
63
56
  const reducer = (state: State, action: Action) => {
64
57
  const { expanded, selected } = state