@rh-support/react-context 2.1.33 → 2.1.34
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.
|
@@ -5,10 +5,8 @@ declare global {
|
|
|
5
5
|
interface Window {
|
|
6
6
|
sessionjs: any;
|
|
7
7
|
MSInputMethodContext: any;
|
|
8
|
-
chrometwo_require: (component: string[], callback: (...params: any[]) => any) => any;
|
|
9
8
|
portal: any;
|
|
10
9
|
Raven: any;
|
|
11
|
-
chrometwo_ready: any;
|
|
12
10
|
embedded_svc: any;
|
|
13
11
|
$Lightning: any;
|
|
14
12
|
liveAgentDeployment: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalContextWrapper.d.ts","sourceRoot":"","sources":["../../src/GlobalContextWrapper.tsx"],"names":[],"mappings":"AAmBA,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,
|
|
1
|
+
{"version":3,"file":"GlobalContextWrapper.d.ts","sourceRoot":"","sources":["../../src/GlobalContextWrapper.tsx"],"names":[],"mappings":"AAmBA,UAAU,MAAM;IACZ,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACzC;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,EAAE,GAAG,CAAC;QACf,oBAAoB,EAAE,GAAG,CAAC;QAC1B,MAAM,EAAE,GAAG,CAAC;QACZ,KAAK,EAAE,GAAG,CAAC;QACX,YAAY,EAAE,GAAG,CAAC;QAClB,UAAU,EAAE,GAAG,CAAC;QAChB,mBAAmB,EAAE,GAAG,CAAC;KAC5B;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AAkGD,eAAO,MAAM,oBAAoB,UAAW,MAAM,gBAKjD,CAAC"}
|
|
@@ -20,7 +20,9 @@ function GlobalContextMetadataWrapper() {
|
|
|
20
20
|
const dispatchToGlobalMetadataReducer = React.useContext(GlobalMetadataDispatchContext);
|
|
21
21
|
// Configuring callbacks to show modals in case of auth logout or session expiry
|
|
22
22
|
useEffect(() => {
|
|
23
|
-
|
|
23
|
+
const init = () => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
/** @type { import("@rhcp/primer") } */
|
|
25
|
+
const { session } = yield window.portal.primer.onReady();
|
|
24
26
|
session.on('AuthLogout', () => setShowReLoginModal(true));
|
|
25
27
|
['AuthRefreshError', 'TokenExpired'].forEach((eventName) => session.on(eventName, () => {
|
|
26
28
|
if (!session.isAuthenticated()) {
|
|
@@ -28,6 +30,7 @@ function GlobalContextMetadataWrapper() {
|
|
|
28
30
|
}
|
|
29
31
|
}));
|
|
30
32
|
});
|
|
33
|
+
init();
|
|
31
34
|
}, []);
|
|
32
35
|
const loadGlobalMetadata = (loggedInUserJwtToken) => {
|
|
33
36
|
setLoggedInUserJwtToken(dispatchToGlobalMetadataReducer, loggedInUserJwtToken);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/react-context",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.34",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"@cee-eng/hydrajs": "4.16.43",
|
|
41
41
|
"@patternfly/react-core": "5.1.1",
|
|
42
42
|
"@patternfly/react-icons": "5.1.1",
|
|
43
|
-
"@rh-support/components": "2.1.
|
|
43
|
+
"@rh-support/components": "2.1.31",
|
|
44
44
|
"@rh-support/types": "2.0.2",
|
|
45
|
-
"@rh-support/user-permissions": "2.1.
|
|
46
|
-
"@rh-support/utils": "2.1.
|
|
45
|
+
"@rh-support/user-permissions": "2.1.22",
|
|
46
|
+
"@rh-support/utils": "2.1.15",
|
|
47
47
|
"i18next": "^19.0.1",
|
|
48
48
|
"localforage": "^1.10.0",
|
|
49
49
|
"lodash": "^4.17.21",
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"@types/i18next": "^12.1.0",
|
|
62
62
|
"@types/lodash": "^4.14.136",
|
|
63
63
|
"@types/react": "^17.0.14",
|
|
64
|
-
"@types/react-i18next": "^8.1.0",
|
|
65
64
|
"@types/react-router-dom": "^5.1.2",
|
|
66
65
|
"history": "4.10.1"
|
|
67
66
|
},
|
|
@@ -85,5 +84,5 @@
|
|
|
85
84
|
"defaults and supports es6-module",
|
|
86
85
|
"maintained node versions"
|
|
87
86
|
],
|
|
88
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "0be2733af553431eb0064993df8c0f097e12a47f"
|
|
89
88
|
}
|