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