@rh-support/react-context 2.1.17 → 2.1.19
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":"HostnameAwarenessModal.d.ts","sourceRoot":"","sources":["../../../../src/components/HostnameAwarenessModal/HostnameAwarenessModal.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAatC,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"HostnameAwarenessModal.d.ts","sourceRoot":"","sources":["../../../../src/components/HostnameAwarenessModal/HostnameAwarenessModal.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAatC,eAAO,MAAM,sBAAsB,mBAwKlC,CAAC"}
|
|
@@ -32,7 +32,6 @@ export const HostnameAwarenessModal = () => {
|
|
|
32
32
|
const [isHostnamesLoading, setIsHostnamesLoading] = useState(true);
|
|
33
33
|
const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
|
|
34
34
|
const accountNumber = loggedInUsersAccount.data.accountNumber;
|
|
35
|
-
const { request: fetchHostnameDefault, isFetching: isFetchingHostnameDefault } = useFetch(accounts.getIsSharingHostname);
|
|
36
35
|
const { request: updateHostnameDefault, isFetching: isFetchingUpdateHostnameDefault } = useFetch(accounts.updateIsSharingHostname);
|
|
37
36
|
useEffect(() => {
|
|
38
37
|
const userOriginalHostnamesCount = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -50,10 +49,10 @@ export const HostnameAwarenessModal = () => {
|
|
|
50
49
|
}
|
|
51
50
|
});
|
|
52
51
|
const userOriginalHostnameValue = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
-
|
|
54
|
-
setisHostnamesChecked(
|
|
52
|
+
var _a, _b;
|
|
53
|
+
setisHostnamesChecked((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.shareHostnameWithRHT);
|
|
55
54
|
// This is needed so we preserve initial state we do not close modal upon updating names.
|
|
56
|
-
setAlreadyCheckedCloseModal(
|
|
55
|
+
setAlreadyCheckedCloseModal((_b = loggedInUsersAccount.data) === null || _b === void 0 ? void 0 : _b.shareHostnameWithRHT);
|
|
57
56
|
setIsHostnamesLoading(false);
|
|
58
57
|
});
|
|
59
58
|
userOriginalHostnamesCount();
|
|
@@ -109,8 +108,7 @@ export const HostnameAwarenessModal = () => {
|
|
|
109
108
|
//Do not show modal if user cannot share hostnames.
|
|
110
109
|
const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
|
|
111
110
|
//Do not show modal if user is already sharing hostnames, has seen the modal more than twice, or opted to not show it again
|
|
112
|
-
if (
|
|
113
|
-
isFetchingUpdateHostnameDefault ||
|
|
111
|
+
if (isFetchingUpdateHostnameDefault ||
|
|
114
112
|
isLoadingHostnamesVisibilityObj ||
|
|
115
113
|
!canUseHostName ||
|
|
116
114
|
alreadyCheckedCloseModal ||
|
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.19",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lib/**/*"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@cee-eng/hydrajs": "4.16.
|
|
29
|
+
"@cee-eng/hydrajs": "4.16.21",
|
|
30
30
|
"@patternfly/react-core": "4.264.0",
|
|
31
31
|
"@patternfly/react-icons": "4.92.10",
|
|
32
32
|
"i18next": "^19.0.1",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"react-test-renderer": "17.0.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@cee-eng/hydrajs": "4.16.
|
|
40
|
+
"@cee-eng/hydrajs": "4.16.21",
|
|
41
41
|
"@patternfly/react-core": "4.264.0",
|
|
42
42
|
"@patternfly/react-icons": "4.92.10",
|
|
43
|
-
"@rh-support/components": "2.1.
|
|
43
|
+
"@rh-support/components": "2.1.18",
|
|
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.12",
|
|
46
|
+
"@rh-support/utils": "2.1.9",
|
|
47
47
|
"i18next": "^19.0.1",
|
|
48
48
|
"localforage": "^1.10.0",
|
|
49
49
|
"lodash": "^4.17.21",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"defaults and supports es6-module",
|
|
86
86
|
"maintained node versions"
|
|
87
87
|
],
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "1be555e9d41b629276c10a44ec8e40e0bb9a8995"
|
|
89
89
|
}
|