@akinon/next 1.56.0-rc.7 → 1.57.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 (57) hide show
  1. package/CHANGELOG.md +4 -554
  2. package/api/client.ts +2 -23
  3. package/assets/styles/index.scss +26 -50
  4. package/bin/pz-prebuild.js +0 -1
  5. package/bin/pz-predev.js +0 -1
  6. package/components/index.ts +0 -1
  7. package/components/input.tsx +7 -21
  8. package/components/link.tsx +13 -17
  9. package/components/price.tsx +4 -11
  10. package/components/pz-root.tsx +3 -15
  11. package/components/selected-payment-option-view.tsx +2 -1
  12. package/data/client/api.ts +1 -1
  13. package/data/client/b2b.ts +2 -35
  14. package/data/client/basket.ts +5 -6
  15. package/data/client/checkout.ts +0 -37
  16. package/data/client/user.ts +2 -3
  17. package/data/server/category.ts +19 -43
  18. package/data/server/flatpage.ts +7 -29
  19. package/data/server/form.ts +11 -29
  20. package/data/server/landingpage.ts +7 -26
  21. package/data/server/list.ts +6 -16
  22. package/data/server/menu.ts +2 -15
  23. package/data/server/product.ts +13 -33
  24. package/data/server/seo.ts +24 -17
  25. package/data/server/special-page.ts +5 -15
  26. package/data/server/widget.ts +7 -14
  27. package/data/urls.ts +1 -8
  28. package/hocs/server/with-segment-defaults.tsx +1 -4
  29. package/hooks/index.ts +1 -2
  30. package/hooks/use-pagination.ts +2 -2
  31. package/lib/cache.ts +6 -8
  32. package/middlewares/default.ts +2 -46
  33. package/middlewares/pretty-url.ts +1 -11
  34. package/middlewares/url-redirection.ts +0 -4
  35. package/package.json +3 -4
  36. package/plugins.d.ts +0 -1
  37. package/plugins.js +1 -2
  38. package/redux/middlewares/checkout.ts +11 -71
  39. package/redux/reducers/checkout.ts +3 -23
  40. package/types/commerce/address.ts +1 -1
  41. package/types/commerce/b2b.ts +2 -12
  42. package/types/commerce/checkout.ts +0 -30
  43. package/types/commerce/order.ts +0 -1
  44. package/types/index.ts +2 -17
  45. package/utils/app-fetch.ts +8 -16
  46. package/utils/generate-commerce-search-params.ts +1 -3
  47. package/utils/index.ts +6 -27
  48. package/utils/server-translation.ts +1 -11
  49. package/with-pz-config.js +2 -13
  50. package/assets/styles/index.css +0 -49
  51. package/assets/styles/index.css.map +0 -1
  52. package/bin/pz-generate-translations.js +0 -41
  53. package/components/file-input.tsx +0 -8
  54. package/hooks/use-message-listener.ts +0 -24
  55. package/lib/cache-handler.mjs +0 -33
  56. package/routes/pretty-url.tsx +0 -192
  57. package/utils/redirection-iframe.ts +0 -85
package/CHANGELOG.md CHANGED
@@ -1,137 +1,21 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.56.0-rc.7
4
-
5
- ## 1.56.0-rc.6
6
-
7
- ### Minor Changes
8
-
9
- - f3d076b: ZERO-2864: create tabby extension plugin
10
-
11
- ## 1.56.0-rc.5
3
+ ## 1.57.0
12
4
 
13
5
  ### Minor Changes
14
6
 
15
- - c416d18: ZERO-2915: Add delivery option null check for setAddress
7
+ - fad2768: ZERO-2739: add gpay to payment plugin map
8
+ - dff0d59: ZERO-2659: add formData support to proxy api requests
16
9
 
17
- ## 1.56.0-rc.4
10
+ ## 1.56.0
18
11
 
19
12
  ### Minor Changes
20
13
 
21
- - 572d2e84: ZERO-2667: Add iframe support for redirection payment methods
22
- - 5dfeea0: ZERO-2801: Revert ZERO-2801
23
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
24
- - fda5b927: ZERO-2725: fix invalid import
25
- - 2d9b2b2c: ZERO-2816: Add segment to headers
26
- - c53ea3e6: ZERO-2609: Reset additional form fields when selectedFormType is not company
27
14
  - d93a507: ZERO-2900: Fix pretty url rewrite
28
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
29
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
30
- - 3bf2dd9: ZERO-2551: Fix search page
31
- - e9541a13: ZERO-2816: Add headers to url
32
- - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
33
- - 2e6104d: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
34
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
35
- - 0d3a913e: ZERO-2725: Update decimal scale in Price component
36
- - 7b05522: ZERO-2905: Fix resend and close button in otp package
37
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
38
- - d3474c64: ZERO-2655: Add data source shipping option
39
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
40
- - 29ead87: ZERO-2905: Fix resend and close button in otp package
41
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
42
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
43
- - bbe18b9f: ZERO-2575: Fix build error
44
- - d4099960: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
45
- - 4920742: Disable getCachedTranslations
46
- - 12a873e: ZERO-2846:Edit the siteKey regex in the response from GetCaptcha
47
15
  - 674badc: ZERO-2912: Fix selected payment option view to handle null values
48
- - 7e56d6b: ZERO-2841: Update api tagTypes
49
- - 94b69285: ZERO-2551: Add cache handler check in url-redirection middleware
50
- - 98bb8dcd: ZERO-2706: Cache getTranlations method
51
16
  - 207ac6e: ZERO-2917: Add OrderSelectionPage endpoint
52
- - dcc8a150: ZERO-2694: added build step to RC branch pipeline
53
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
54
- - fad27689: ZERO-2739: add gpay to payment plugin map
55
- - dff0d595: ZERO-2659: add formData support to proxy api requests
56
- - fdd0b41: ZERO-2706: Add optimized translation support
57
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
58
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
59
- - beb499e6: ZERO-2551: Add new tsconfig paths
60
- - f2c92d5c: ZERO-2816: Update cookie name
61
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
62
- - f046f8e0: ZERO-2575: update version for react-number-format
63
17
  - b9273fd: ZERO-2889: add host headers to requests
64
- - 49eeebf: ZERO-2909: Add deleteCollectionItem query to wishlistApi
65
- - 86d25315: ZERO-2693: resolve dependency collision warning for eslint-config-next
66
18
  - c670bd4: ZERO-2900: Add middleware rewrite functionality
67
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
68
-
69
- ## 1.56.0-rc.3
70
-
71
- ### Minor Changes
72
-
73
- - 674badc: ZERO-2912: Fix selected payment option view to handle null values
74
-
75
- ## 1.56.0-rc.2
76
-
77
- ### Minor Changes
78
-
79
- - 7b05522: ZERO-2905: Fix resend and close button in otp package
80
- - 29ead87: ZERO-2905: Fix resend and close button in otp package
81
-
82
- ## 1.56.0-rc.1
83
-
84
- ### Minor Changes
85
-
86
- - 207ac6e: ZERO-2917: Add OrderSelectionPage endpoint
87
-
88
- ## 1.56.0-rc.0
89
-
90
- ### Minor Changes
91
-
92
- - 572d2e84: ZERO-2667: Add iframe support for redirection payment methods
93
- - 5dfeea0: ZERO-2801: Revert ZERO-2801
94
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
95
- - fda5b927: ZERO-2725: fix invalid import
96
- - 2d9b2b2c: ZERO-2816: Add segment to headers
97
- - c53ea3e6: ZERO-2609: Reset additional form fields when selectedFormType is not company
98
- - d93a507: ZERO-2900: Fix pretty url rewrite
99
- - 6c25f666: ZERO-2551: Check CACHE_HOST variable
100
- - bc2b4117: ZERO-2825: Add attribute-based shipping options to checkout page
101
- - 3bf2dd94: ZERO-2551: Fix search page
102
- - e9541a13: ZERO-2816: Add headers to url
103
- - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
104
- - 2e6104d: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
105
- - 64699d3f: ZERO-2761: Fix invalid import for plugin module
106
- - 0d3a913e: ZERO-2725: Update decimal scale in Price component
107
- - d6edb1d0: ZERO-2551: Fix searchparams handling for list and other routes
108
- - d3474c64: ZERO-2655: Add data source shipping option
109
- - 17f87524: ZERO-2816: Make the incoming currency lowercase
110
- - c45b62c9: ZERO-2818: Add upload and download support for b2b package
111
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
112
- - bbe18b9f: ZERO-2575: Fix build error
113
- - d4099960: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
114
- - 4920742c: Disable getCachedTranslations
115
- - 12a873e: ZERO-2846:Edit the siteKey regex in the response from GetCaptcha
116
- - 7e56d6b6: ZERO-2841: Update api tagTypes
117
- - 94b69285: ZERO-2551: Add cache handler check in url-redirection middleware
118
- - 98bb8dcd: ZERO-2706: Cache getTranlations method
119
- - dcc8a150: ZERO-2694: added build step to RC branch pipeline
120
- - 8f47ccae: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
121
- - fad27689: ZERO-2739: add gpay to payment plugin map
122
- - dff0d595: ZERO-2659: add formData support to proxy api requests
123
- - fdd0b41: ZERO-2706: Add optimized translation support
124
- - f2c325c1: ZERO-2838: Move file input component into @akinon/next
125
- - 9e25a64b: ZERO-2835: Update category page layout with breadcrumb
126
- - beb499e6: ZERO-2551: Add new tsconfig paths
127
- - f2c92d5c: ZERO-2816: Update cookie name
128
- - 7bd3d992: ZERO-2801: Refactor locale middleware to handle single locale configuration
129
- - f046f8e0: ZERO-2575: update version for react-number-format
130
- - b9273fd3: ZERO-2889: add host headers to requests
131
- - 49eeebf: ZERO-2909: Add deleteCollectionItem query to wishlistApi
132
- - 86d25315: ZERO-2693: resolve dependency collision warning for eslint-config-next
133
- - c670bd48: ZERO-2900: Add middleware rewrite functionality
134
- - 3f9b8d7e: ZERO-2761: Update plugins.js for akinon-next
135
19
 
136
20
  ## 1.55.0
137
21
 
@@ -177,128 +61,7 @@
177
61
 
178
62
  ### Minor Changes
179
63
 
180
- - 90282b53: ZERO-2729: Audit packages for yarn and npm and also update app-template
181
- - 572d2e84: ZERO-2667: Add iframe support for redirection payment methods
182
- - 5dfeea0: ZERO-2801: Revert ZERO-2801
183
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
184
- - fda5b927: ZERO-2725: fix invalid import
185
- - 2d9b2b2: ZERO-2816: Add segment to headers
186
- - c53ea3e6: ZERO-2609: Reset additional form fields when selectedFormType is not company
187
- - d93a507: ZERO-2900: Fix pretty url rewrite
188
- - 8d9ac9a: ZERO-2794: Add field to order type
189
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
190
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
191
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
192
- - 3bf2dd9: ZERO-2551: Fix search page
193
- - e9541a1: ZERO-2816: Add headers to url
194
- - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
195
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
196
- - 2e6104d: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
197
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
198
- - 0d3a913e: ZERO-2725: Update decimal scale in Price component
199
- - 1448a96e: ZERO-2612: add errors type in CheckoutState
200
- - 1ec2e9d: ZERO-2895: Update app-fetch to include cookies in headers
201
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
202
- - d3474c64: ZERO-2655: Add data source shipping option
203
- - 75080fd6: ZERO-2630: Add max limit to postcode area
204
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
205
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
206
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
207
- - bbe18b9f: ZERO-2575: Fix build error
208
- - d4099960: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
209
- - 4920742: Disable getCachedTranslations
210
- - 12a873e: ZERO-2846:Edit the siteKey regex in the response from GetCaptcha
211
- - 7e56d6b: ZERO-2841: Update api tagTypes
212
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
213
- - 98bb8dcd: ZERO-2706: Cache getTranlations method
214
- - 46b7aad7: ZERO-2775: Add condition and logger for menuitemmodel data
215
- - dcc8a150: ZERO-2694: added build step to RC branch pipeline
216
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
217
- - fad27689: ZERO-2739: add gpay to payment plugin map
218
- - dff0d595: ZERO-2659: add formData support to proxy api requests
219
- - fdd0b41: ZERO-2706: Add optimized translation support
220
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
221
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
222
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
223
- - beb499e6: ZERO-2551: Add new tsconfig paths
224
- - 146ea391: ZERO-2774: Update imports
225
- - f2c92d5: ZERO-2816: Update cookie name
226
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
227
- - c47be30d: ZERO-2744: Update Order and OrderItem types
228
- - e9a46acb: ZERO-2738: add CVC input to registered cards in Masterpass
229
- - f046f8e0: ZERO-2575: update version for react-number-format
230
- - b9273fd: ZERO-2889: add host headers to requests
231
- - 49eeebf: ZERO-2909: Add deleteCollectionItem query to wishlistApi
232
- - 86d25315: ZERO-2693: resolve dependency collision warning for eslint-config-next
233
- - c670bd4: ZERO-2900: Add middleware rewrite functionality
234
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
235
- - 3d35f70: ZERO-2908: Add cookie to redirect url
236
-
237
- ## 1.50.0-rc.1
238
-
239
- ### Minor Changes
240
-
241
- - 49eeebf: ZERO-2909: Add deleteCollectionItem query to wishlistApi
242
-
243
- ## 1.50.0-rc.0
244
-
245
- ### Minor Changes
246
-
247
- - 90282b53: ZERO-2729: Audit packages for yarn and npm and also update app-template
248
- - 572d2e84: ZERO-2667: Add iframe support for redirection payment methods
249
- - 5dfeea0: ZERO-2801: Revert ZERO-2801
250
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
251
- - fda5b927: ZERO-2725: fix invalid import
252
- - 2d9b2b2: ZERO-2816: Add segment to headers
253
- - c53ea3e6: ZERO-2609: Reset additional form fields when selectedFormType is not company
254
- - d93a507: ZERO-2900: Fix pretty url rewrite
255
- - 8d9ac9a: ZERO-2794: Add field to order type
256
64
  - eaf97d6: ZERO-2909: Add deleteCollectionItem query to wishlistApi
257
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
258
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
259
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
260
- - 3bf2dd9: ZERO-2551: Fix search page
261
- - e9541a1: ZERO-2816: Add headers to url
262
- - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
263
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
264
- - 2e6104d: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
265
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
266
- - 0d3a913e: ZERO-2725: Update decimal scale in Price component
267
- - 1448a96e: ZERO-2612: add errors type in CheckoutState
268
- - 1ec2e9d: ZERO-2895: Update app-fetch to include cookies in headers
269
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
270
- - d3474c64: ZERO-2655: Add data source shipping option
271
- - 75080fd6: ZERO-2630: Add max limit to postcode area
272
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
273
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
274
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
275
- - bbe18b9f: ZERO-2575: Fix build error
276
- - d4099960: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
277
- - 4920742: Disable getCachedTranslations
278
- - 12a873e: ZERO-2846:Edit the siteKey regex in the response from GetCaptcha
279
- - 7e56d6b: ZERO-2841: Update api tagTypes
280
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
281
- - 98bb8dcd: ZERO-2706: Cache getTranlations method
282
- - 46b7aad7: ZERO-2775: Add condition and logger for menuitemmodel data
283
- - dcc8a150: ZERO-2694: added build step to RC branch pipeline
284
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
285
- - fad27689: ZERO-2739: add gpay to payment plugin map
286
- - dff0d595: ZERO-2659: add formData support to proxy api requests
287
- - fdd0b41: ZERO-2706: Add optimized translation support
288
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
289
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
290
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
291
- - beb499e6: ZERO-2551: Add new tsconfig paths
292
- - 146ea391: ZERO-2774: Update imports
293
- - f2c92d5: ZERO-2816: Update cookie name
294
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
295
- - c47be30d: ZERO-2744: Update Order and OrderItem types
296
- - e9a46acb: ZERO-2738: add CVC input to registered cards in Masterpass
297
- - f046f8e0: ZERO-2575: update version for react-number-format
298
- - b9273fd: ZERO-2889: add host headers to requests
299
- - 86d25315: ZERO-2693: resolve dependency collision warning for eslint-config-next
300
- - c670bd4: ZERO-2900: Add middleware rewrite functionality
301
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
302
65
 
303
66
  ## 1.49.0
304
67
 
@@ -324,126 +87,7 @@
324
87
 
325
88
  ### Minor Changes
326
89
 
327
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
328
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
329
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
330
- - fda5b92: ZERO-2725: fix invalid import
331
- - 2d9b2b2: ZERO-2816: Add segment to headers
332
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
333
- - 8d9ac9a: ZERO-2794: Add field to order type
334
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
335
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
336
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
337
- - 3bf2dd9: ZERO-2551: Fix search page
338
- - e9541a1: ZERO-2816: Add headers to url
339
- - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
340
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
341
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
342
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
343
- - 1448a96e: ZERO-2612: add errors type in CheckoutState
344
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
345
- - d3474c6: ZERO-2655: Add data source shipping option
346
- - 75080fd6: ZERO-2630: Add max limit to postcode area
347
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
348
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
349
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
350
- - bbe18b9f: ZERO-2575: Fix build error
351
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
352
- - 4920742: Disable getCachedTranslations
353
- - 7e56d6b: ZERO-2841: Update api tagTypes
354
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
355
- - 98bb8dc: ZERO-2706: Cache getTranlations method
356
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
357
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
358
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
359
- - fad2768: ZERO-2739: add gpay to payment plugin map
360
- - dff0d595: ZERO-2659: add formData support to proxy api requests
361
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
362
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
363
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
364
- - beb499e6: ZERO-2551: Add new tsconfig paths
365
- - 948eb42: ZERO-2852: Add out of stock endpoints
366
- - 146ea39: ZERO-2774: Update imports
367
- - f2c92d5: ZERO-2816: Update cookie name
368
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
369
- - c47be30: ZERO-2744: Update Order and OrderItem types
370
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
371
- - f046f8e0: ZERO-2575: update version for react-number-format
372
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
373
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
374
-
375
- ## 1.45.0-rc.4
376
-
377
- ### Minor Changes
378
-
379
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
380
-
381
- ## 1.45.0-rc.3
382
-
383
- ### Minor Changes
384
-
385
- - 948eb42: ZERO-2852: Add out of stock endpoints
386
-
387
- ## 1.45.0-rc.2
388
-
389
- ### Minor Changes
390
-
391
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
392
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
393
-
394
- ## 1.45.0-rc.1
395
-
396
- ### Minor Changes
397
-
398
- - 7e56d6b: ZERO-2841: Update api tagTypes
399
-
400
- ## 1.45.0-rc.0
401
-
402
- ### Minor Changes
403
-
404
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
405
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
406
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
407
- - fda5b92: ZERO-2725: fix invalid import
408
- - 2d9b2b2: ZERO-2816: Add segment to headers
409
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
410
- - 8d9ac9a: ZERO-2794: Add field to order type
411
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
412
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
413
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
414
- - 3bf2dd9: ZERO-2551: Fix search page
415
- - e9541a1: ZERO-2816: Add headers to url
416
- - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
417
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
418
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
419
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
420
- - 1448a96: ZERO-2612: add errors type in CheckoutState
421
90
  - 2ab6e08: ZERO-2841: Update getBasketDetail query
422
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
423
- - d3474c6: ZERO-2655: Add data source shipping option
424
- - 75080fd: ZERO-2630: Add max limit to postcode area
425
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
426
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
427
- - bbe18b9: ZERO-2575: Fix build error
428
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
429
- - 4920742: Disable getCachedTranslations
430
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
431
- - 98bb8dc: ZERO-2706: Cache getTranlations method
432
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
433
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
434
- - fad2768: ZERO-2739: add gpay to payment plugin map
435
- - dff0d59: ZERO-2659: add formData support to proxy api requests
436
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
437
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
438
- - beb499e: ZERO-2551: Add new tsconfig paths
439
- - 146ea39: ZERO-2774: Update imports
440
- - f2c92d5: ZERO-2816: Update cookie name
441
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
442
- - c47be30: ZERO-2744: Update Order and OrderItem types
443
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
444
- - f046f8e0: ZERO-2575: update version for react-number-format
445
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
446
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
447
91
 
448
92
  ## 1.44.0
449
93
 
@@ -451,201 +95,7 @@
451
95
 
452
96
  ### Minor Changes
453
97
 
454
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
455
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
456
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
457
- - fda5b92: ZERO-2725: fix invalid import
458
- - 2d9b2b2: ZERO-2816: Add segment to headers
459
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
460
- - 8d9ac9a: ZERO-2794: Add field to order type
461
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
462
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
463
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
464
- - 3bf2dd9: ZERO-2551: Fix search page
465
- - e9541a1: ZERO-2816: Add headers to url
466
- - c53ef7b9: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
467
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
468
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
469
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
470
- - 1448a96: ZERO-2612: add errors type in CheckoutState
471
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
472
- - d3474c6: ZERO-2655: Add data source shipping option
473
- - 75080fd: ZERO-2630: Add max limit to postcode area
474
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
475
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
476
- - bbe18b9: ZERO-2575: Fix build error
477
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
478
- - 4920742: Disable getCachedTranslations
479
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
480
- - 98bb8dc: ZERO-2706: Cache getTranlations method
481
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
482
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
483
- - fad2768: ZERO-2739: add gpay to payment plugin map
484
- - dff0d59: ZERO-2659: add formData support to proxy api requests
485
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
486
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
487
- - beb499e: ZERO-2551: Add new tsconfig paths
488
- - 146ea39: ZERO-2774: Update imports
489
- - f2c92d5: ZERO-2816: Update cookie name
490
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
491
- - c47be30: ZERO-2744: Update Order and OrderItem types
492
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
493
- - f046f8e0: ZERO-2575: update version for react-number-format
494
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
495
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
496
-
497
- ## 1.43.0-rc.15
498
-
499
- ## 1.43.0-rc.14
500
-
501
- ### Minor Changes
502
-
503
- - 3bf2dd9: ZERO-2551: Fix search page
504
-
505
- ## 1.43.0-rc.13
506
-
507
- ### Minor Changes
508
-
509
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
510
-
511
- ## 1.43.0-rc.12
512
-
513
- ### Minor Changes
514
-
515
- - 4920742: Disable getCachedTranslations
516
-
517
- ## 1.43.0-rc.11
518
-
519
- ### Minor Changes
520
-
521
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
522
-
523
- ## 1.43.0-rc.10
524
-
525
- ### Minor Changes
526
-
527
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
528
-
529
- ## 1.43.0-rc.9
530
-
531
- ### Minor Changes
532
-
533
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
534
-
535
- ## 1.43.0-rc.8
536
-
537
- ### Minor Changes
538
-
539
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
540
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
541
-
542
- ## 1.43.0-rc.7
543
-
544
- ### Minor Changes
545
-
546
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
547
-
548
- ## 1.43.0-rc.6
549
-
550
- ### Minor Changes
551
-
552
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
553
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
554
- - a4c8d6a: ZERO-2663: Fix the image url for gif and svgs and return them without options
555
- - fda5b92: ZERO-2725: fix invalid import
556
- - 2d9b2b2: ZERO-2816: Add segment to headers
557
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
558
- - 8d9ac9a: ZERO-2794: Add field to order type
559
- - e9541a1: ZERO-2816: Add headers to url
560
- - c53ef7b: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
561
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
562
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
563
- - 1448a96: ZERO-2612: add errors type in CheckoutState
564
- - d3474c6: ZERO-2655: Add data source shipping option
565
- - 75080fd: ZERO-2630: Add max limit to postcode area
566
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
567
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
568
- - bbe18b9: ZERO-2575: Fix build error
569
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
570
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
571
- - 98bb8dc: ZERO-2706: Cache getTranlations method
572
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
573
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
574
- - fad2768: ZERO-2739: add gpay to payment plugin map
575
- - dff0d59: ZERO-2659: add formData support to proxy api requests
576
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
577
98
  - 4a163f2: ZERO-2761: Add condition for basket summary
578
- - beb499e: ZERO-2551: Add new tsconfig paths
579
- - 146ea39: ZERO-2774: Update imports
580
- - f2c92d5: ZERO-2816: Update cookie name
581
- - c47be30: ZERO-2744: Update Order and OrderItem types
582
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
583
- - f046f8e: ZERO-2575: update version for react-number-format
584
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
585
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
586
-
587
- ## 1.43.0-rc.5
588
-
589
- ### Minor Changes
590
-
591
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
592
-
593
- ## 1.43.0-rc.4
594
-
595
- ### Minor Changes
596
-
597
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
598
-
599
- ## 1.43.0-rc.3
600
-
601
- ### Minor Changes
602
-
603
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
604
-
605
- ## 1.43.0-rc.2
606
-
607
- ### Minor Changes
608
-
609
- - f2c92d5: ZERO-2816: Update cookie name
610
-
611
- ## 1.43.0-rc.1
612
-
613
- ### Minor Changes
614
-
615
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
616
-
617
- ## 1.43.0-rc.0
618
-
619
- ### Minor Changes
620
-
621
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
622
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
623
- - a4c8d6a: ZERO-2663: Fix the image url for gif and svgs and return them without options
624
- - fda5b92: ZERO-2725: fix invalid import
625
- - 2d9b2b2: ZERO-2816: Add segment to headers
626
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
627
- - 8d9ac9a: ZERO-2794: Add field to order type
628
- - e9541a1: ZERO-2816: Add headers to url
629
- - c53ef7b: ZERO-2668: The Link component has been updated to improve the logic for handling href values. Previously, if the href was not a string or started with 'http', it would return the href as is. Now, if the href is not provided, it will default to '#' to prevent any potential errors. Additionally, if the href is a string and does not start with 'http', it will be formatted with the locale and pathname, based on the localeUrlStrategy and defaultLocaleValue. This ensures that the correct href is generated based on the localization settings.
630
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
631
- - 1448a96: ZERO-2612: add errors type in CheckoutState
632
- - d3474c6: ZERO-2655: Add data source shipping option
633
- - 75080fd: ZERO-2630: Add max limit to postcode area
634
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
635
- - bbe18b9: ZERO-2575: Fix build error
636
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
637
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
638
- - 98bb8dc: ZERO-2706: Cache getTranlations method
639
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
640
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
641
- - fad2768: ZERO-2739: add gpay to payment plugin map
642
- - dff0d59: ZERO-2659: add formData support to proxy api requests
643
- - beb499e: ZERO-2551: Add new tsconfig paths
644
- - 146ea39: ZERO-2774: Update imports
645
- - c47be30: ZERO-2744: Update Order and OrderItem types
646
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
647
- - f046f8e: ZERO-2575: update version for react-number-format
648
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
649
99
 
650
100
  ## 1.42.0
651
101
 
package/api/client.ts CHANGED
@@ -4,7 +4,6 @@ import settings from 'settings';
4
4
  import logger from '../utils/log';
5
5
  import formatCookieString from '../utils/format-cookie-string';
6
6
  import cookieParser from 'set-cookie-parser';
7
- import { cookies } from 'next/headers';
8
7
 
9
8
  interface RouteParams {
10
9
  params: {
@@ -81,27 +80,11 @@ async function proxyRequest(...args) {
81
80
  }
82
81
  } as RequestInit;
83
82
 
84
- const nextCookies = cookies();
85
- const segment = nextCookies.get('pz-segment')?.value;
86
- const currency = nextCookies.get('pz-external-currency')?.value;
87
-
88
- if (segment) {
89
- fetchOptions.headers['X-Segment-Id'] = segment;
90
- }
91
-
92
- if (currency) {
93
- fetchOptions.headers = Object.assign({}, fetchOptions.headers, {
94
- 'x-currency': currency
95
- });
96
- }
97
-
98
83
  if (options.contentType) {
99
84
  fetchOptions.headers['Content-Type'] = options.contentType;
100
85
  }
101
86
 
102
- const isMultipartFormData = req.headers
103
- .get('content-type')
104
- ?.includes('multipart/form-data;');
87
+ const isMultipartFormData = req.headers.get('content-type')?.includes('multipart/form-data;');
105
88
 
106
89
  if (req.method !== 'GET') {
107
90
  let body: Record<string, any> | FormData = {};
@@ -125,11 +108,7 @@ async function proxyRequest(...args) {
125
108
 
126
109
  Object.keys(body ?? {}).forEach((key) => {
127
110
  if (body[key]) {
128
- if (typeof body[key] === 'object' && body[key] !== null) {
129
- formData.append(key, JSON.stringify(body[key]));
130
- } else {
131
- formData.append(key, body[key]);
132
- }
111
+ formData.append(key, body[key]);
133
112
  }
134
113
  });
135
114