@rh-support/react-context 2.5.307 → 2.5.308
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalContextWrapper.d.ts","sourceRoot":"","sources":["../../src/GlobalContextWrapper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GlobalContextWrapper.d.ts","sourceRoot":"","sources":["../../src/GlobalContextWrapper.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAenD,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,yBAAyB,EAAE,GAAG,CAAC;KAClC;IAED,UAAU,QAAQ;QACd,YAAY,EAAE,GAAG,CAAC;KACrB;CACJ;AA0HD,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,sBAKjD,CAAC"}
|
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { useApolloClient } from '@apollo/client/react';
|
|
11
11
|
import { accounts, Config } from '@cee-eng/hydrajs';
|
|
12
12
|
import { LoginModal } from '@rh-support/components';
|
|
13
|
-
import { fetchAndSetSalesforceToken, getApiResourceObject, setSecuredSupport, setStrataHeaders, } from '@rh-support/utils';
|
|
13
|
+
import { fetchAndSetSalesforceToken, getApiResourceObject, SALESFORCE_SESSION_EXPIRED_EVENT, setSecuredSupport, setStrataHeaders, } from '@rh-support/utils';
|
|
14
14
|
import isEmpty from 'lodash/isEmpty';
|
|
15
15
|
import React, { useEffect, useState } from 'react';
|
|
16
16
|
import { GlobalMetadataContextProvider, GlobalMetadataDispatchContext } from './context/GlobalMetadataContext';
|
|
@@ -37,6 +37,14 @@ function GlobalContextMetadataWrapper() {
|
|
|
37
37
|
});
|
|
38
38
|
init();
|
|
39
39
|
}, []);
|
|
40
|
+
// Show session-expired modal when Salesforce token refresh fails
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const handleSalesforceSessionExpired = () => {
|
|
43
|
+
setShowSessionExpiredModal(true);
|
|
44
|
+
};
|
|
45
|
+
window.addEventListener(SALESFORCE_SESSION_EXPIRED_EVENT, handleSalesforceSessionExpired);
|
|
46
|
+
return () => window.removeEventListener(SALESFORCE_SESSION_EXPIRED_EVENT, handleSalesforceSessionExpired);
|
|
47
|
+
}, []);
|
|
40
48
|
const loadGlobalMetadata = (loggedInUserJwtToken) => __awaiter(this, void 0, void 0, function* () {
|
|
41
49
|
var _a, _b;
|
|
42
50
|
setLoggedInUserJwtToken(dispatchToGlobalMetadataReducer, loggedInUserJwtToken);
|
|
@@ -34,7 +34,7 @@ export function CloseCaseModal(props) {
|
|
|
34
34
|
resolutionsWithDescription.includes(option.value) ? setShowTextArea(true) : setShowTextArea(false);
|
|
35
35
|
};
|
|
36
36
|
const getCommentBody = () => {
|
|
37
|
-
return
|
|
37
|
+
return `<p><strong>Reason for closing case:</strong></p><p>${selectedResolution}${resolutionsWithDescription.includes(selectedResolution) ? `. ${resolutionDescription}` : ''}</p>`;
|
|
38
38
|
};
|
|
39
39
|
// To check for required fields
|
|
40
40
|
const checkForRequiredFields = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/react-context",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.308",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@cee-eng/hydrajs": "^4.18.114",
|
|
38
38
|
"@patternfly/react-core": "6.2.1",
|
|
39
39
|
"@patternfly/react-icons": "6.2.1",
|
|
40
|
-
"@rh-support/components": "2.5.
|
|
40
|
+
"@rh-support/components": "2.5.213",
|
|
41
41
|
"@rh-support/types": "2.0.26",
|
|
42
|
-
"@rh-support/user-permissions": "2.5.
|
|
43
|
-
"@rh-support/utils": "2.5.
|
|
42
|
+
"@rh-support/user-permissions": "2.5.160",
|
|
43
|
+
"@rh-support/utils": "2.5.141",
|
|
44
44
|
"i18next": "^23.15.0",
|
|
45
45
|
"localforage": "^1.10.0",
|
|
46
46
|
"lodash": "^4.17.21",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"defaults and supports es6-module",
|
|
93
93
|
"maintained node versions"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "62d92ed52ff1bf81a6103af96c29e96442da5963"
|
|
96
96
|
}
|