@beinformed/ui 1.23.2 → 1.23.4
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 +11 -6
- package/esm/react-server/requestInformation.js +8 -4
- package/esm/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/requestInformation.js +9 -4
- package/lib/react-server/requestInformation.js.flow +8 -3
- package/lib/react-server/requestInformation.js.map +1 -1
- package/package.json +1 -1
- package/src/react-server/requestInformation.js +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,30 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.23.4](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.23.3...v1.23.4) (2025-07-01)
|
|
6
|
+
|
|
7
|
+
### [1.23.3](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.23.2...v1.23.3) (2025-07-01)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **server-request:** escape deeplink ([377c881](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/377c881b51de618d8077cf0fcd3a3854c16d8b5c))
|
|
12
|
+
|
|
5
13
|
### [1.23.2](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.23.1...v1.23.2) (2022-11-16)
|
|
6
14
|
|
|
7
15
|
### [1.23.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.23.0...v1.23.1) (2022-09-26)
|
|
8
16
|
|
|
9
|
-
|
|
10
17
|
### Bug Fixes
|
|
11
18
|
|
|
12
|
-
|
|
19
|
+
- **DependentAttribute:** DependentAttribute extended to work with empty and not empty attribute value ([9cf3864](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/9cf38644e032b0cfea0e8a8561baa2ca7aa9eb49))
|
|
13
20
|
|
|
14
21
|
## [1.23.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.22.1...v1.23.0) (2022-09-22)
|
|
15
22
|
|
|
16
|
-
|
|
17
23
|
### Features
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
- **DependentAttribute:** DependentAttribute extended to work with empty and not empty attribute value ([73473cf](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/73473cff35ca5c7974a3800df5e49bdb1a9031ea))
|
|
20
26
|
|
|
21
27
|
### [1.22.1](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.22.0...v1.22.1) (2022-09-07)
|
|
22
28
|
|
|
23
29
|
## [1.22.0](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.21.7...v1.22.0) (2022-09-05)
|
|
24
30
|
|
|
25
|
-
|
|
26
31
|
### Features
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
- **error:** added get isInvalidCredentials in to ErrorResponse ([b6e2ef6](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/commit/b6e2ef6e2838f7fe65bbedefedf8c6a1ea927fc2))
|
|
29
34
|
|
|
30
35
|
### [1.21.7](https://git.beinformed.com/public/nl.beinformed.bi.layout.lib.ui/compare/v1.21.6...v1.21.7) (2022-09-01)
|
|
31
36
|
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
1
2
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
2
3
|
import Href from "../models/href/Href";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
*/
|
|
6
7
|
export const getFullRequestUrl = request => {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
var _context;
|
|
9
|
+
|
|
10
|
+
let pathInfo = request.getPathInfo() || "/";
|
|
11
|
+
let queryString = request.getQueryString();
|
|
12
|
+
pathInfo = _mapInstanceProperty(_context = pathInfo.split("/")).call(_context, segment => encodeURIComponent(segment)).join("/");
|
|
9
13
|
|
|
10
14
|
if (queryString) {
|
|
11
|
-
var
|
|
15
|
+
var _context2;
|
|
12
16
|
|
|
13
|
-
return _concatInstanceProperty(
|
|
17
|
+
return _concatInstanceProperty(_context2 = "".concat(pathInfo, "?")).call(_context2, encodeURIComponent(queryString));
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
return pathInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestInformation.js","names":["Href","getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n
|
|
1
|
+
{"version":3,"file":"requestInformation.js","names":["Href","getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","split","segment","encodeURIComponent","join","getFullRequestHref","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n let pathInfo = request.getPathInfo() || \"/\";\n let queryString = request.getQueryString();\n\n pathInfo = pathInfo\n .split(\"/\")\n .map((segment) => encodeURIComponent(segment))\n .join(\"/\");\n\n if (queryString) {\n return `${pathInfo}?${encodeURIComponent(queryString)}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":";;AACA,OAAOA,IAAP,MAAiB,qBAAjB;;AAIA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAIC,OAAD,IAA6C;EAAA;;EAC5E,IAAIC,QAAQ,GAAGD,OAAO,CAACE,WAAR,MAAyB,GAAxC;EACA,IAAIC,WAAW,GAAGH,OAAO,CAACI,cAAR,EAAlB;EAEAH,QAAQ,GAAG,gCAAAA,QAAQ,CAChBI,KADQ,CACF,GADE,kBAEHC,OAAD,IAAaC,kBAAkB,CAACD,OAAD,CAF3B,EAGRE,IAHQ,CAGH,GAHG,CAAX;;EAKA,IAAIL,WAAJ,EAAiB;IAAA;;IACf,qDAAUF,QAAV,wBAAsBM,kBAAkB,CAACJ,WAAD,CAAxC;EACD;;EAED,OAAOF,QAAP;AACD,CAdM;AAgBP;AACA;;AACA,OAAO,MAAMQ,kBAAkB,GAAIT,OAAD,IAChC,IAAIF,IAAJ,CAASC,iBAAiB,CAACC,OAAD,CAA1B,CADK;AAGP;AACA;;AACA,OAAO,MAAMU,oBAAoB,GAAG,CAClCV,OADkC,EAElCW,UAFkC,KAGhB;EAClB,OAAOX,OAAO,CAACY,eAAR,CAAwBD,UAAxB,CAAP;AACD,CALM;AAOP;AACA;;AACA,OAAO,MAAME,kBAAkB,GAAG,CAChCb,OADgC,EAEhCc,OAFgC,KAGd;EAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACV,OAAD,EAAU,QAAV,CAA/C;EACA,MAAMgB,oBAAoB,GACxBD,kBAAkB,IAAIf,OAAO,CAACiB,SAAR,CAAkB,iBAAlB,CADxB,CAFkB,CAKlB;;EACA,IAAID,oBAAoB,KAAK,IAA7B,EAAmC;IACjC,OAAOF,OAAO,CAACI,oBAAR,CAA6B,CAA7B,CAAP;EACD;;EAED,OAAOJ,OAAO,CAACD,kBAAR,CAA2BG,oBAA3B,CAAP;AACD,CAdM"}
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.getPreferredLocale = exports.getFullRequestUrl = exports.getFullRequestHref = exports.getCookieFromRequest = void 0;
|
|
9
9
|
|
|
10
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
11
|
+
|
|
10
12
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
11
13
|
|
|
12
14
|
var _Href = _interopRequireDefault(require("../models/href/Href"));
|
|
@@ -14,13 +16,16 @@ var _Href = _interopRequireDefault(require("../models/href/Href"));
|
|
|
14
16
|
/**
|
|
15
17
|
*/
|
|
16
18
|
const getFullRequestUrl = request => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
var _context;
|
|
20
|
+
|
|
21
|
+
let pathInfo = request.getPathInfo() || "/";
|
|
22
|
+
let queryString = request.getQueryString();
|
|
23
|
+
pathInfo = (0, _map.default)(_context = pathInfo.split("/")).call(_context, segment => encodeURIComponent(segment)).join("/");
|
|
19
24
|
|
|
20
25
|
if (queryString) {
|
|
21
|
-
var
|
|
26
|
+
var _context2;
|
|
22
27
|
|
|
23
|
-
return (0, _concat.default)(
|
|
28
|
+
return (0, _concat.default)(_context2 = "".concat(pathInfo, "?")).call(_context2, encodeURIComponent(queryString));
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
return pathInfo;
|
|
@@ -6,11 +6,16 @@ import type Locales from "../i18n/Locales";
|
|
|
6
6
|
/**
|
|
7
7
|
*/
|
|
8
8
|
export const getFullRequestUrl = (request: HttpServletRequestJava): string => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
let pathInfo = request.getPathInfo() || "/";
|
|
10
|
+
let queryString = request.getQueryString();
|
|
11
|
+
|
|
12
|
+
pathInfo = pathInfo
|
|
13
|
+
.split("/")
|
|
14
|
+
.map((segment) => encodeURIComponent(segment))
|
|
15
|
+
.join("/");
|
|
11
16
|
|
|
12
17
|
if (queryString) {
|
|
13
|
-
return `${pathInfo}?${queryString}`;
|
|
18
|
+
return `${pathInfo}?${encodeURIComponent(queryString)}`;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
return pathInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestInformation.js","names":["getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","Href","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n
|
|
1
|
+
{"version":3,"file":"requestInformation.js","names":["getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","split","segment","encodeURIComponent","join","getFullRequestHref","Href","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n let pathInfo = request.getPathInfo() || \"/\";\n let queryString = request.getQueryString();\n\n pathInfo = pathInfo\n .split(\"/\")\n .map((segment) => encodeURIComponent(segment))\n .join(\"/\");\n\n if (queryString) {\n return `${pathInfo}?${encodeURIComponent(queryString)}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":";;;;;;;;;;;;;AACA;;AAIA;AACA;AACO,MAAMA,iBAAiB,GAAIC,OAAD,IAA6C;EAAA;;EAC5E,IAAIC,QAAQ,GAAGD,OAAO,CAACE,WAAR,MAAyB,GAAxC;EACA,IAAIC,WAAW,GAAGH,OAAO,CAACI,cAAR,EAAlB;EAEAH,QAAQ,GAAG,6BAAAA,QAAQ,CAChBI,KADQ,CACF,GADE,kBAEHC,OAAD,IAAaC,kBAAkB,CAACD,OAAD,CAF3B,EAGRE,IAHQ,CAGH,GAHG,CAAX;;EAKA,IAAIL,WAAJ,EAAiB;IAAA;;IACf,kDAAUF,QAAV,wBAAsBM,kBAAkB,CAACJ,WAAD,CAAxC;EACD;;EAED,OAAOF,QAAP;AACD,CAdM;AAgBP;AACA;;;;;AACO,MAAMQ,kBAAkB,GAAIT,OAAD,IAChC,IAAIU,aAAJ,CAASX,iBAAiB,CAACC,OAAD,CAA1B,CADK;AAGP;AACA;;;;;AACO,MAAMW,oBAAoB,GAAG,CAClCX,OADkC,EAElCY,UAFkC,KAGhB;EAClB,OAAOZ,OAAO,CAACa,eAAR,CAAwBD,UAAxB,CAAP;AACD,CALM;AAOP;AACA;;;;;AACO,MAAME,kBAAkB,GAAG,CAChCd,OADgC,EAEhCe,OAFgC,KAGd;EAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACX,OAAD,EAAU,QAAV,CAA/C;EACA,MAAMiB,oBAAoB,GACxBD,kBAAkB,IAAIhB,OAAO,CAACkB,SAAR,CAAkB,iBAAlB,CADxB,CAFkB,CAKlB;;EACA,IAAID,oBAAoB,KAAK,IAA7B,EAAmC;IACjC,OAAOF,OAAO,CAACI,oBAAR,CAA6B,CAA7B,CAAP;EACD;;EAED,OAAOJ,OAAO,CAACD,kBAAR,CAA2BG,oBAA3B,CAAP;AACD,CAdM"}
|
package/package.json
CHANGED
|
@@ -6,11 +6,16 @@ import type Locales from "../i18n/Locales";
|
|
|
6
6
|
/**
|
|
7
7
|
*/
|
|
8
8
|
export const getFullRequestUrl = (request: HttpServletRequestJava): string => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
let pathInfo = request.getPathInfo() || "/";
|
|
10
|
+
let queryString = request.getQueryString();
|
|
11
|
+
|
|
12
|
+
pathInfo = pathInfo
|
|
13
|
+
.split("/")
|
|
14
|
+
.map((segment) => encodeURIComponent(segment))
|
|
15
|
+
.join("/");
|
|
11
16
|
|
|
12
17
|
if (queryString) {
|
|
13
|
-
return `${pathInfo}?${queryString}`;
|
|
18
|
+
return `${pathInfo}?${encodeURIComponent(queryString)}`;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
return pathInfo;
|