@akinon/next 1.59.0-rc.5 → 1.60.0-rc.10

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  # @akinon/next
2
2
 
3
- ## 1.59.0-rc.5
3
+ ## 1.60.0-rc.10
4
+
5
+ ### Minor Changes
6
+
7
+ - 7b17923: ZERO-2669: Fix isIframePaymentOptionExcluded value
8
+
9
+ ## 1.60.0-rc.9
10
+
11
+ ### Minor Changes
12
+
13
+ - ad5de2c: ZERO-2949: Add currency and language headers to format=json request
14
+
15
+ ## 1.60.0-rc.8
16
+
17
+ ### Minor Changes
18
+
19
+ - 57d1657: ZERO-2925: Update condation
20
+
21
+ ## 1.60.0-rc.7
22
+
23
+ ## 1.60.0-rc.6
4
24
 
5
25
  ### Minor Changes
6
26
 
@@ -36,10 +56,9 @@
36
56
  - 7e56d6b: ZERO-2841: Update api tagTypes
37
57
  - 94b69285: ZERO-2551: Add cache handler check in url-redirection middleware
38
58
  - 98bb8dcd: ZERO-2706: Cache getTranlations method
39
- - 50f3c60: ZERO-2936: Fix Input component styling for floating labels
40
59
  - dcc8a150: ZERO-2694: added build step to RC branch pipeline
41
60
  - 3be7462: ZERO-2934: fix reset basket on redirection payment complete
42
- - 8f47cca: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
61
+ - 8f47ccae: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
43
62
  - fdd0b41: ZERO-2706: Add optimized translation support
44
63
  - f2c325c: ZERO-2838: Move file input component into @akinon/next
45
64
  - 9e25a64b: ZERO-2835: Update category page layout with breadcrumb
@@ -52,73 +71,11 @@
52
71
  - 86d25315: ZERO-2693: resolve dependency collision warning for eslint-config-next
53
72
  - 3f9b8d7e: ZERO-2761: Update plugins.js for akinon-next
54
73
 
55
- ## 1.59.0-rc.4
56
-
57
- ### Minor Changes
58
-
59
- - d899cc7: ZERO-2925: Login by checking the session id
60
- - 3be7462: ZERO-2934: fix reset basket on redirection payment complete
61
-
62
- ## 1.59.0-rc.3
63
-
64
- ## 1.59.0-rc.2
65
-
66
- ### Minor Changes
67
-
68
- - c873740: ZERO-2903: add types
69
- - 034b813: ZERO-2903: create saved card plugin
70
-
71
- ## 1.59.0-rc.1
74
+ ## 1.59.0
72
75
 
73
76
  ### Minor Changes
74
77
 
75
- - 907813c: ZERO-2934: add payment-gateway/<gateway> redirect in middleware
76
-
77
- ## 1.59.0-rc.0
78
-
79
- ### Minor Changes
80
-
81
- - c416d18: ZERO-2915: Add delivery option null check for setAddress
82
- - 572d2e84: ZERO-2667: Add iframe support for redirection payment methods
83
- - 5dfeea04: ZERO-2801: Revert ZERO-2801
84
- - a4c8d6a9: ZERO-2663: Fix the image url for gif and svgs and return them without options
85
- - fda5b927: ZERO-2725: fix invalid import
86
- - 2d9b2b2c: ZERO-2816: Add segment to headers
87
- - c53ea3e6: ZERO-2609: Reset additional form fields when selectedFormType is not company
88
- - 6c25f666: ZERO-2551: Check CACHE_HOST variable
89
- - bc2b4117: ZERO-2825: Add attribute-based shipping options to checkout page
90
- - 3bf2dd94: ZERO-2551: Fix search page
91
- - e9541a13: ZERO-2816: Add headers to url
92
- - 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.
93
- - 2e6104d0: ZERO-2888:Edit the numbering in the pagination and the visibility of the prev and next buttons
94
- - 64699d3f: ZERO-2761: Fix invalid import for plugin module
95
- - 0d3a913e: ZERO-2725: Update decimal scale in Price component
96
- - 7b05522: ZERO-2905: Fix resend and close button in otp package
97
- - d6edb1d0: ZERO-2551: Fix searchparams handling for list and other routes
98
- - d3474c64: ZERO-2655: Add data source shipping option
99
- - 17f87524: ZERO-2816: Make the incoming currency lowercase
100
- - 29ead87: ZERO-2905: Fix resend and close button in otp package
101
- - c45b62c9: ZERO-2818: Add upload and download support for b2b package
102
- - 91265bba: ZERO-2551: Improve pretty url and caching performance
103
- - bbe18b9f: ZERO-2575: Fix build error
104
- - d4099960: ZERO-2781: Refactor buildClientRequestUrl function to support caching and options
105
- - 4920742c: Disable getCachedTranslations
106
- - 12a873e7: ZERO-2846:Edit the siteKey regex in the response from GetCaptcha
107
- - 7e56d6b6: ZERO-2841: Update api tagTypes
108
- - 94b69285: ZERO-2551: Add cache handler check in url-redirection middleware
109
- - 98bb8dcd: ZERO-2706: Cache getTranlations method
110
- - dcc8a150: ZERO-2694: added build step to RC branch pipeline
111
- - 8f47ccae: ZERO-2829: fix and add nested JSON support for useFormData in api/client route
112
- - fdd0b418: ZERO-2706: Add optimized translation support
113
- - f2c325c1: ZERO-2838: Move file input component into @akinon/next
114
- - 9e25a64b: ZERO-2835: Update category page layout with breadcrumb
115
- - beb499e6: ZERO-2551: Add new tsconfig paths
116
- - f2c92d5c: ZERO-2816: Update cookie name
117
- - 7bd3d992: ZERO-2801: Refactor locale middleware to handle single locale configuration
118
- - f046f8e0: ZERO-2575: update version for react-number-format
119
- - 49eeebf: ZERO-2909: Add deleteCollectionItem query to wishlistApi
120
- - 86d25315: ZERO-2693: resolve dependency collision warning for eslint-config-next
121
- - 3f9b8d7e: ZERO-2761: Update plugins.js for akinon-next
78
+ - 50f3c60: ZERO-2936: Fix Input component styling for floating labels
122
79
 
123
80
  ## 1.58.0
124
81
 
@@ -37,6 +37,12 @@ const withPzDefault =
37
37
  // Support legacy ?format=json query param
38
38
  if (searchParams.has('json') || searchParams.get('format') === 'json') {
39
39
  try {
40
+ const { locales } = Settings.localization;
41
+ const locale = req.cookies.get('pz-locale')?.value;
42
+ const selectedLanguageValue = locales.find(
43
+ (l) => l.value === locale
44
+ )?.apiValue;
45
+
40
46
  searchParams.set('format', 'json');
41
47
 
42
48
  const request = await fetch(
@@ -51,7 +57,9 @@ const withPzDefault =
51
57
  headers: {
52
58
  Cookie: req.headers.get('cookie') || '',
53
59
  Accept: 'application/json',
54
- 'X-Requested-With': 'XMLHttpRequest'
60
+ 'X-Requested-With': 'XMLHttpRequest',
61
+ 'x-currency': req.cookies.get('pz-currency')?.value ?? '',
62
+ 'Accept-Language': selectedLanguageValue ?? ''
55
63
  }
56
64
  }
57
65
  );
@@ -60,7 +60,10 @@ const withOauthLogin =
60
60
 
61
61
  const currentSessionId = req.cookies.get('osessionid');
62
62
 
63
- if (req.cookies.get('messages')?.value.includes('Successfully signed in') || currentSessionId) {
63
+ if (
64
+ req.cookies.get('messages')?.value.includes('Successfully signed in') ||
65
+ (currentSessionId && req.cookies.get('messages'))
66
+ ) {
64
67
  let redirectUrlWithLocale = `${url.origin}${getUrlPathWithLocale(
65
68
  '/auth/oauth-login',
66
69
  req.cookies.get('pz-locale')?.value
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.59.0-rc.5",
4
+ "version": "1.60.0-rc.10",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "set-cookie-parser": "2.6.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@akinon/eslint-plugin-projectzero": "1.59.0-rc.5",
33
+ "@akinon/eslint-plugin-projectzero": "1.60.0-rc.10",
34
34
  "@types/react-redux": "7.1.30",
35
35
  "@types/set-cookie-parser": "2.4.7",
36
36
  "@typescript-eslint/eslint-plugin": "6.7.4",
@@ -230,7 +230,7 @@ export const contextListMiddleware: Middleware = ({
230
230
  isMobileApp ||
231
231
  /iPad|iPhone|iPod|Android/i.test(navigator.userAgent);
232
232
  const isIframePaymentOptionExcluded =
233
- !settings.checkout?.iframeExcludedPaymentOptions?.includes(
233
+ settings.checkout?.iframeExcludedPaymentOptions?.includes(
234
234
  result.payload?.pre_order?.payment_option?.slug
235
235
  );
236
236
  urlObj.searchParams.set('t', new Date().getTime().toString());