@akinon/next 1.48.0-rc.4 → 1.48.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 (65) hide show
  1. package/CHANGELOG.md +1 -444
  2. package/api/client.ts +17 -50
  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/pagination.tsx +2 -1
  10. package/components/price.tsx +4 -11
  11. package/components/pz-root.tsx +3 -15
  12. package/components/selected-payment-option-view.tsx +38 -26
  13. package/data/client/account.ts +9 -10
  14. package/data/client/address.ts +8 -32
  15. package/data/client/api.ts +2 -2
  16. package/data/client/b2b.ts +2 -35
  17. package/data/client/basket.ts +5 -6
  18. package/data/client/checkout.ts +4 -47
  19. package/data/client/user.ts +2 -3
  20. package/data/server/category.ts +19 -43
  21. package/data/server/flatpage.ts +7 -29
  22. package/data/server/form.ts +11 -29
  23. package/data/server/landingpage.ts +7 -26
  24. package/data/server/list.ts +6 -16
  25. package/data/server/menu.ts +2 -15
  26. package/data/server/product.ts +21 -46
  27. package/data/server/seo.ts +24 -17
  28. package/data/server/special-page.ts +5 -15
  29. package/data/server/widget.ts +7 -14
  30. package/data/urls.ts +2 -9
  31. package/hocs/server/with-segment-defaults.tsx +1 -4
  32. package/hooks/index.ts +1 -2
  33. package/hooks/use-pagination.ts +2 -2
  34. package/hooks/use-payment-options.ts +1 -2
  35. package/lib/cache.ts +6 -8
  36. package/middlewares/default.ts +8 -91
  37. package/middlewares/pretty-url.ts +1 -11
  38. package/middlewares/url-redirection.ts +0 -4
  39. package/package.json +4 -5
  40. package/plugins.d.ts +0 -1
  41. package/redux/middlewares/checkout.ts +11 -70
  42. package/redux/reducers/checkout.ts +5 -24
  43. package/redux/reducers/config.ts +0 -2
  44. package/types/commerce/account.ts +0 -1
  45. package/types/commerce/address.ts +1 -1
  46. package/types/commerce/b2b.ts +2 -12
  47. package/types/commerce/checkout.ts +0 -30
  48. package/types/commerce/misc.ts +0 -2
  49. package/types/commerce/order.ts +0 -12
  50. package/types/index.ts +3 -37
  51. package/utils/app-fetch.ts +10 -21
  52. package/utils/generate-commerce-search-params.ts +1 -3
  53. package/utils/index.ts +6 -27
  54. package/utils/menu-generator.ts +2 -2
  55. package/utils/server-translation.ts +1 -11
  56. package/utils/server-variables.ts +1 -2
  57. package/with-pz-config.js +2 -13
  58. package/assets/styles/index.css +0 -49
  59. package/assets/styles/index.css.map +0 -1
  60. package/bin/pz-generate-translations.js +0 -41
  61. package/components/file-input.tsx +0 -8
  62. package/hooks/use-message-listener.ts +0 -24
  63. package/lib/cache-handler.mjs +0 -33
  64. package/routes/pretty-url.tsx +0 -192
  65. package/utils/redirection-iframe.ts +0 -85
package/CHANGELOG.md CHANGED
@@ -1,136 +1,6 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.48.0-rc.4
4
-
5
- ### Minor Changes
6
-
7
- - 5dfeea0: ZERO-2801: Revert ZERO-2801
8
-
9
- ## 1.48.0-rc.3
10
-
11
- ### Minor Changes
12
-
13
- - 90282b53: ZERO-2729: Audit packages for yarn and npm and also update app-template
14
- - 572d2e84: ZERO-2667: Add iframe support for redirection payment methods
15
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
16
- - fda5b92: ZERO-2725: fix invalid import
17
- - 2d9b2b2: ZERO-2816: Add segment to headers
18
- - c53ea3e6: ZERO-2609: Reset additional form fields when selectedFormType is not company
19
- - d93a507: ZERO-2900: Fix pretty url rewrite
20
- - 8d9ac9a: ZERO-2794: Add field to order type
21
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
22
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
23
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
24
- - 3bf2dd9: ZERO-2551: Fix search page
25
- - e9541a1: ZERO-2816: Add headers to url
26
- - 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.
27
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
28
- - 2e6104d: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
29
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
30
- - 0d3a913e: ZERO-2725: Update decimal scale in Price component
31
- - 1448a96e: ZERO-2612: add errors type in CheckoutState
32
- - 1ec2e9d: ZERO-2895: Update app-fetch to include cookies in headers
33
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
34
- - d3474c64: ZERO-2655: Add data source shipping option
35
- - 75080fd6: ZERO-2630: Add max limit to postcode area
36
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
37
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
38
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
39
- - bbe18b9f: ZERO-2575: Fix build error
40
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
41
- - 4920742: Disable getCachedTranslations
42
- - 12a873e: ZERO-2846:Edit the siteKey regex in the response from GetCaptcha
43
- - 7e56d6b: ZERO-2841: Update api tagTypes
44
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
45
- - 98bb8dcd: ZERO-2706: Cache getTranlations method
46
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
47
- - dcc8a150: ZERO-2694: added build step to RC branch pipeline
48
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
49
- - fad27689: ZERO-2739: add gpay to payment plugin map
50
- - dff0d595: ZERO-2659: add formData support to proxy api requests
51
- - fdd0b41: ZERO-2706: Add optimized translation support
52
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
53
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
54
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
55
- - beb499e6: ZERO-2551: Add new tsconfig paths
56
- - 146ea39: ZERO-2774: Update imports
57
- - f2c92d5: ZERO-2816: Update cookie name
58
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
59
- - c47be30d: ZERO-2744: Update Order and OrderItem types
60
- - e9a46acb: ZERO-2738: add CVC input to registered cards in Masterpass
61
- - f046f8e0: ZERO-2575: update version for react-number-format
62
- - b9273fd: ZERO-2889: add host headers to requests
63
- - 86d25315: ZERO-2693: resolve dependency collision warning for eslint-config-next
64
- - c670bd4: ZERO-2900: Add middleware rewrite functionality
65
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
66
-
67
- ## 1.48.0-rc.2
68
-
69
- ### Minor Changes
70
-
71
- - 2e6104d: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
72
-
73
- ## 1.48.0-rc.1
74
-
75
- ### Minor Changes
76
-
77
- - fdd0b41: ZERO-2706: Add optimized translation support
78
-
79
- ## 1.48.0-rc.0
80
-
81
- ### Minor Changes
82
-
83
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
84
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
85
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
86
- - fda5b92: ZERO-2725: fix invalid import
87
- - 2d9b2b2: ZERO-2816: Add segment to headers
88
- - c53ea3e6: ZERO-2609: Reset additional form fields when selectedFormType is not company
89
- - d93a507: ZERO-2900: Fix pretty url rewrite
90
- - 8d9ac9a: ZERO-2794: Add field to order type
91
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
92
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
93
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
94
- - 3bf2dd9: ZERO-2551: Fix search page
95
- - e9541a1: ZERO-2816: Add headers to url
96
- - 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.
97
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
98
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
99
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
100
- - 1448a96e: ZERO-2612: add errors type in CheckoutState
101
- - 1ec2e9d: ZERO-2895: Update app-fetch to include cookies in headers
102
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
103
- - d3474c6: ZERO-2655: Add data source shipping option
104
- - 75080fd6: ZERO-2630: Add max limit to postcode area
105
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
106
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
107
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
108
- - bbe18b9f: ZERO-2575: Fix build error
109
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
110
- - 4920742: Disable getCachedTranslations
111
- - 12a873e: ZERO-2846:Edit the siteKey regex in the response from GetCaptcha
112
- - 7e56d6b: ZERO-2841: Update api tagTypes
113
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
114
- - 98bb8dc: ZERO-2706: Cache getTranlations method
115
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
116
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
117
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
118
- - fad2768: ZERO-2739: add gpay to payment plugin map
119
- - dff0d595: ZERO-2659: add formData support to proxy api requests
120
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
121
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
122
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
123
- - beb499e6: ZERO-2551: Add new tsconfig paths
124
- - 146ea39: ZERO-2774: Update imports
125
- - f2c92d5: ZERO-2816: Update cookie name
126
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
127
- - c47be30: ZERO-2744: Update Order and OrderItem types
128
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
129
- - f046f8e0: ZERO-2575: update version for react-number-format
130
- - b9273fd: ZERO-2889: add host headers to requests
131
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
132
- - c670bd4: ZERO-2900: Add middleware rewrite functionality
133
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
3
+ ## 1.48.0
134
4
 
135
5
  ## 1.47.0
136
6
 
@@ -145,126 +15,7 @@
145
15
 
146
16
  ### Minor Changes
147
17
 
148
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
149
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
150
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
151
- - fda5b92: ZERO-2725: fix invalid import
152
- - 2d9b2b2: ZERO-2816: Add segment to headers
153
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
154
- - 8d9ac9a: ZERO-2794: Add field to order type
155
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
156
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
157
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
158
- - 3bf2dd9: ZERO-2551: Fix search page
159
- - e9541a1: ZERO-2816: Add headers to url
160
- - 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.
161
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
162
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
163
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
164
- - 1448a96e: ZERO-2612: add errors type in CheckoutState
165
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
166
- - d3474c6: ZERO-2655: Add data source shipping option
167
- - 75080fd6: ZERO-2630: Add max limit to postcode area
168
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
169
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
170
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
171
- - bbe18b9f: ZERO-2575: Fix build error
172
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
173
- - 4920742: Disable getCachedTranslations
174
- - 7e56d6b: ZERO-2841: Update api tagTypes
175
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
176
- - 98bb8dc: ZERO-2706: Cache getTranlations method
177
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
178
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
179
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
180
- - fad2768: ZERO-2739: add gpay to payment plugin map
181
- - dff0d595: ZERO-2659: add formData support to proxy api requests
182
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
183
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
184
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
185
- - beb499e6: ZERO-2551: Add new tsconfig paths
186
- - 948eb42: ZERO-2852: Add out of stock endpoints
187
- - 146ea39: ZERO-2774: Update imports
188
- - f2c92d5: ZERO-2816: Update cookie name
189
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
190
- - c47be30: ZERO-2744: Update Order and OrderItem types
191
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
192
- - f046f8e0: ZERO-2575: update version for react-number-format
193
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
194
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
195
-
196
- ## 1.45.0-rc.4
197
-
198
- ### Minor Changes
199
-
200
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
201
-
202
- ## 1.45.0-rc.3
203
-
204
- ### Minor Changes
205
-
206
- - 948eb42: ZERO-2852: Add out of stock endpoints
207
-
208
- ## 1.45.0-rc.2
209
-
210
- ### Minor Changes
211
-
212
- - c45b62c: ZERO-2818: Add upload and download support for b2b package
213
- - f2c325c: ZERO-2838: Move file input component into @akinon/next
214
-
215
- ## 1.45.0-rc.1
216
-
217
- ### Minor Changes
218
-
219
- - 7e56d6b: ZERO-2841: Update api tagTypes
220
-
221
- ## 1.45.0-rc.0
222
-
223
- ### Minor Changes
224
-
225
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
226
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
227
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
228
- - fda5b92: ZERO-2725: fix invalid import
229
- - 2d9b2b2: ZERO-2816: Add segment to headers
230
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
231
- - 8d9ac9a: ZERO-2794: Add field to order type
232
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
233
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
234
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
235
- - 3bf2dd9: ZERO-2551: Fix search page
236
- - e9541a1: ZERO-2816: Add headers to url
237
- - 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.
238
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
239
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
240
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
241
- - 1448a96: ZERO-2612: add errors type in CheckoutState
242
18
  - 2ab6e08: ZERO-2841: Update getBasketDetail query
243
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
244
- - d3474c6: ZERO-2655: Add data source shipping option
245
- - 75080fd: ZERO-2630: Add max limit to postcode area
246
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
247
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
248
- - bbe18b9: ZERO-2575: Fix build error
249
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
250
- - 4920742: Disable getCachedTranslations
251
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
252
- - 98bb8dc: ZERO-2706: Cache getTranlations method
253
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
254
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
255
- - fad2768: ZERO-2739: add gpay to payment plugin map
256
- - dff0d59: ZERO-2659: add formData support to proxy api requests
257
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
258
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
259
- - beb499e: ZERO-2551: Add new tsconfig paths
260
- - 146ea39: ZERO-2774: Update imports
261
- - f2c92d5: ZERO-2816: Update cookie name
262
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
263
- - c47be30: ZERO-2744: Update Order and OrderItem types
264
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
265
- - f046f8e0: ZERO-2575: update version for react-number-format
266
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
267
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
268
19
 
269
20
  ## 1.44.0
270
21
 
@@ -272,201 +23,7 @@
272
23
 
273
24
  ### Minor Changes
274
25
 
275
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
276
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
277
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
278
- - fda5b92: ZERO-2725: fix invalid import
279
- - 2d9b2b2: ZERO-2816: Add segment to headers
280
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
281
- - 8d9ac9a: ZERO-2794: Add field to order type
282
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
283
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
284
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
285
- - 3bf2dd9: ZERO-2551: Fix search page
286
- - e9541a1: ZERO-2816: Add headers to url
287
- - 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.
288
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
289
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
290
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
291
- - 1448a96: ZERO-2612: add errors type in CheckoutState
292
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
293
- - d3474c6: ZERO-2655: Add data source shipping option
294
- - 75080fd: ZERO-2630: Add max limit to postcode area
295
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
296
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
297
- - bbe18b9: ZERO-2575: Fix build error
298
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
299
- - 4920742: Disable getCachedTranslations
300
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
301
- - 98bb8dc: ZERO-2706: Cache getTranlations method
302
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
303
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
304
- - fad2768: ZERO-2739: add gpay to payment plugin map
305
- - dff0d59: ZERO-2659: add formData support to proxy api requests
306
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
307
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
308
- - beb499e: ZERO-2551: Add new tsconfig paths
309
- - 146ea39: ZERO-2774: Update imports
310
- - f2c92d5: ZERO-2816: Update cookie name
311
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
312
- - c47be30: ZERO-2744: Update Order and OrderItem types
313
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
314
- - f046f8e0: ZERO-2575: update version for react-number-format
315
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
316
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
317
-
318
- ## 1.43.0-rc.15
319
-
320
- ## 1.43.0-rc.14
321
-
322
- ### Minor Changes
323
-
324
- - 3bf2dd9: ZERO-2551: Fix search page
325
-
326
- ## 1.43.0-rc.13
327
-
328
- ### Minor Changes
329
-
330
- - 9e25a64: ZERO-2835: Update category page layout with breadcrumb
331
-
332
- ## 1.43.0-rc.12
333
-
334
- ### Minor Changes
335
-
336
- - 4920742: Disable getCachedTranslations
337
-
338
- ## 1.43.0-rc.11
339
-
340
- ### Minor Changes
341
-
342
- - 6c25f66: ZERO-2551: Check CACHE_HOST variable
343
-
344
- ## 1.43.0-rc.10
345
-
346
- ### Minor Changes
347
-
348
- - d6edb1d: ZERO-2551: Fix searchparams handling for list and other routes
349
-
350
- ## 1.43.0-rc.9
351
-
352
- ### Minor Changes
353
-
354
- - bc2b411: ZERO-2825: Add attribute-based shipping options to checkout page
355
-
356
- ## 1.43.0-rc.8
357
-
358
- ### Minor Changes
359
-
360
- - 70279e7: ZERO-2817: Add metrics endpoint in default middleware
361
- - 9d94f7e: ZERO-2820: update parent pk usage for menu generator
362
-
363
- ## 1.43.0-rc.7
364
-
365
- ### Minor Changes
366
-
367
- - 7bd3d99: ZERO-2801: Refactor locale middleware to handle single locale configuration
368
-
369
- ## 1.43.0-rc.6
370
-
371
- ### Minor Changes
372
-
373
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
374
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
375
- - a4c8d6a: ZERO-2663: Fix the image url for gif and svgs and return them without options
376
- - fda5b92: ZERO-2725: fix invalid import
377
- - 2d9b2b2: ZERO-2816: Add segment to headers
378
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
379
- - 8d9ac9a: ZERO-2794: Add field to order type
380
- - e9541a1: ZERO-2816: Add headers to url
381
- - 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.
382
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
383
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
384
- - 1448a96: ZERO-2612: add errors type in CheckoutState
385
- - d3474c6: ZERO-2655: Add data source shipping option
386
- - 75080fd: ZERO-2630: Add max limit to postcode area
387
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
388
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
389
- - bbe18b9: ZERO-2575: Fix build error
390
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
391
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
392
- - 98bb8dc: ZERO-2706: Cache getTranlations method
393
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
394
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
395
- - fad2768: ZERO-2739: add gpay to payment plugin map
396
- - dff0d59: ZERO-2659: add formData support to proxy api requests
397
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
398
26
  - 4a163f2: ZERO-2761: Add condition for basket summary
399
- - beb499e: ZERO-2551: Add new tsconfig paths
400
- - 146ea39: ZERO-2774: Update imports
401
- - f2c92d5: ZERO-2816: Update cookie name
402
- - c47be30: ZERO-2744: Update Order and OrderItem types
403
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
404
- - f046f8e: ZERO-2575: update version for react-number-format
405
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
406
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
407
-
408
- ## 1.43.0-rc.5
409
-
410
- ### Minor Changes
411
-
412
- - 17f8752: ZERO-2816: Make the incoming currency lowercase
413
-
414
- ## 1.43.0-rc.4
415
-
416
- ### Minor Changes
417
-
418
- - 3f9b8d7: ZERO-2761: Update plugins.js for akinon-next
419
-
420
- ## 1.43.0-rc.3
421
-
422
- ### Minor Changes
423
-
424
- - 64699d3: ZERO-2761: Fix invalid import for plugin module
425
-
426
- ## 1.43.0-rc.2
427
-
428
- ### Minor Changes
429
-
430
- - f2c92d5: ZERO-2816: Update cookie name
431
-
432
- ## 1.43.0-rc.1
433
-
434
- ### Minor Changes
435
-
436
- - eecb282: ZERO-2607: Update address-related functions to include invalidateTag option
437
-
438
- ## 1.43.0-rc.0
439
-
440
- ### Minor Changes
441
-
442
- - 90282b5: ZERO-2729: Audit packages for yarn and npm and also update app-template
443
- - 572d2e8: ZERO-2667: Add iframe support for redirection payment methods
444
- - a4c8d6a: ZERO-2663: Fix the image url for gif and svgs and return them without options
445
- - fda5b92: ZERO-2725: fix invalid import
446
- - 2d9b2b2: ZERO-2816: Add segment to headers
447
- - c53ea3e: ZERO-2609: Reset additional form fields when selectedFormType is not company
448
- - 8d9ac9a: ZERO-2794: Add field to order type
449
- - e9541a1: ZERO-2816: Add headers to url
450
- - 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.
451
- - 0d3a913: ZERO-2725: Update decimal scale in Price component
452
- - 1448a96: ZERO-2612: add errors type in CheckoutState
453
- - d3474c6: ZERO-2655: Add data source shipping option
454
- - 75080fd: ZERO-2630: Add max limit to postcode area
455
- - 91265bb: ZERO-2551: Improve pretty url and caching performance
456
- - bbe18b9: ZERO-2575: Fix build error
457
- - d409996: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
458
- - 94b6928: ZERO-2551: Add cache handler check in url-redirection middleware
459
- - 98bb8dc: ZERO-2706: Cache getTranlations method
460
- - 46b7aad: ZERO-2775: Add condition and logger for menuitemmodel data
461
- - dcc8a15: ZERO-2694: added build step to RC branch pipeline
462
- - fad2768: ZERO-2739: add gpay to payment plugin map
463
- - dff0d59: ZERO-2659: add formData support to proxy api requests
464
- - beb499e: ZERO-2551: Add new tsconfig paths
465
- - 146ea39: ZERO-2774: Update imports
466
- - c47be30: ZERO-2744: Update Order and OrderItem types
467
- - e9a46ac: ZERO-2738: add CVC input to registered cards in Masterpass
468
- - f046f8e: ZERO-2575: update version for react-number-format
469
- - 86d2531: ZERO-2693: resolve dependency collision warning for eslint-config-next
470
27
 
471
28
  ## 1.42.0
472
29
 
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: {
@@ -52,24 +51,18 @@ async function proxyRequest(...args) {
52
51
  extraHeaders[key.toLowerCase()] = value;
53
52
  }
54
53
 
55
- const excludedHeaders = [
54
+ [
56
55
  'x-forwarded-host',
57
56
  'x-forwarded-proto',
58
57
  'x-forwarded-port',
59
58
  'x-requested-with',
60
59
  'origin',
60
+ 'host',
61
61
  'referer',
62
62
  'accept',
63
63
  'content-length',
64
- 'content-type',
65
- 'host'
66
- ];
67
-
68
- excludedHeaders.forEach((header) => {
69
- if (!settings.includedProxyHeaders?.includes(header)) {
70
- delete extraHeaders[header];
71
- }
72
- });
64
+ 'content-type'
65
+ ].forEach((header) => delete extraHeaders[header]);
73
66
 
74
67
  const fetchOptions = {
75
68
  method: req.method,
@@ -81,33 +74,16 @@ async function proxyRequest(...args) {
81
74
  }
82
75
  } as RequestInit;
83
76
 
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
77
  if (options.contentType) {
99
78
  fetchOptions.headers['Content-Type'] = options.contentType;
100
79
  }
101
80
 
102
- const isMultipartFormData = req.headers
103
- .get('content-type')
104
- ?.includes('multipart/form-data;');
105
-
106
81
  if (req.method !== 'GET') {
107
- let body: Record<string, any> | FormData = {};
82
+ const formData = new URLSearchParams();
83
+ let body = {};
108
84
 
109
85
  try {
110
- body = isMultipartFormData ? await req.formData() : await req.json();
86
+ body = await req.json();
111
87
  } catch (error) {
112
88
  logger.error(
113
89
  `Client Proxy Request - Error while parsing request body to JSON`,
@@ -118,25 +94,13 @@ async function proxyRequest(...args) {
118
94
  );
119
95
  }
120
96
 
121
- if (isMultipartFormData) {
122
- fetchOptions.body = body as FormData;
123
- } else {
124
- const formData = new FormData();
125
-
126
- Object.keys(body ?? {}).forEach((key) => {
127
- 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
- }
133
- }
134
- });
97
+ Object.keys(body ?? {}).forEach((key) => {
98
+ if (body[key]) {
99
+ formData.append(key, body[key]);
100
+ }
101
+ });
135
102
 
136
- fetchOptions.body = !options.useFormData
137
- ? JSON.stringify(body)
138
- : formData;
139
- }
103
+ fetchOptions.body = !options.useFormData ? JSON.stringify(body) : formData;
140
104
  }
141
105
 
142
106
  let url = `${commerceUrl}/${slug.replace(/,/g, '/')}`;
@@ -152,8 +116,11 @@ async function proxyRequest(...args) {
152
116
  try {
153
117
  const request = await fetch(url, fetchOptions);
154
118
 
119
+ // Using NextResponse.json with status 204 will cause an error
155
120
  if (request.status === 204) {
156
- return new Response(null, { status: 204 });
121
+ return new Response(null, {
122
+ status: 204
123
+ });
157
124
  }
158
125
 
159
126
  let response = {} as any;
@@ -1,53 +1,29 @@
1
1
  .checkout-payment-iframe-wrapper {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- width: 100%;
6
- height: 100%;
7
- border: none;
8
- z-index: 1000;
9
- background-color: white;
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ border: none;
8
+ z-index: 1000;
9
+ background-color: white;
10
10
 
11
- iframe {
12
- width: 100%;
13
- height: 100%;
14
- border: none;
15
- background-color: white;
16
- }
11
+ iframe {
12
+ width: 100%;
13
+ height: 100%;
14
+ border: none;
15
+ background-color: white;
16
+ }
17
17
 
18
- .close-button {
19
- position: fixed;
20
- top: 16px;
21
- right: 16px;
22
- width: 32px;
23
- height: 32px;
24
- display: flex;
25
- align-items: center;
26
- justify-content: center;
27
- z-index: 1001;
28
- }
29
- }
30
-
31
- .checkout-payment-redirection-iframe-wrapper {
32
- width: 100%;
33
- position: relative;
34
-
35
- iframe {
36
- width: 100%;
37
- height: 100%;
38
- border: none;
39
- background-color: white;
40
- }
41
-
42
- .close-button {
43
- position: absolute;
44
- top: 16px;
45
- right: 16px;
46
- width: 32px;
47
- height: 32px;
48
- display: flex;
49
- align-items: center;
50
- justify-content: center;
51
- z-index: 1001;
52
- }
53
- }
18
+ .close-button {
19
+ position: fixed;
20
+ top: 16px;
21
+ right: 16px;
22
+ width: 32px;
23
+ height: 32px;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ z-index: 1001;
28
+ }
29
+ }
@@ -4,4 +4,3 @@ const runScript = require('./run-script');
4
4
 
5
5
  runScript('pz-install-theme.js');
6
6
  runScript('pz-pre-check-dist.js');
7
- runScript('pz-generate-translations.js');
package/bin/pz-predev.js CHANGED
@@ -5,4 +5,3 @@ const runScript = require('./run-script');
5
5
  runScript('pz-install-extensions.js');
6
6
  runScript('pz-check-env.js');
7
7
  runScript('pz-install-theme.js');
8
- runScript('pz-generate-translations.js');
@@ -19,4 +19,3 @@ export * from './trans';
19
19
  export * from './link';
20
20
  export * from './pagination';
21
21
  export * from './live-commerce';
22
- export * from './file-input';