@rh-support/react-context 0.2.58 → 0.2.61
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/lib/esm/components/HostnameAwarenessModal/HostnameAwarenessModal.d.ts +3 -0
- package/lib/esm/components/HostnameAwarenessModal/HostnameAwarenessModal.d.ts.map +1 -0
- package/lib/esm/components/HostnameAwarenessModal/HostnameAwarenessModal.js +105 -0
- package/lib/esm/components/HostnameAwarenessModal/hostnameAwarenessModal.css +3 -0
- package/lib/esm/components/HostnameAwarenessModal/index.d.ts +2 -0
- package/lib/esm/components/HostnameAwarenessModal/index.d.ts.map +1 -0
- package/lib/esm/components/HostnameAwarenessModal/index.js +1 -0
- package/lib/esm/components/index.d.ts +1 -0
- package/lib/esm/components/index.d.ts.map +1 -1
- package/lib/esm/components/index.js +1 -0
- package/lib/esm/hooks/index.d.ts +1 -0
- package/lib/esm/hooks/index.d.ts.map +1 -1
- package/lib/esm/hooks/index.js +1 -0
- package/lib/esm/hooks/useFeatureAnnouncement.d.ts +2 -1
- package/lib/esm/hooks/useFeatureAnnouncement.d.ts.map +1 -1
- package/lib/esm/hooks/useFeatureAnnouncement.js +1 -0
- package/lib/esm/hooks/useUserPreferences.d.ts +10 -0
- package/lib/esm/hooks/useUserPreferences.d.ts.map +1 -0
- package/lib/esm/hooks/useUserPreferences.js +54 -0
- package/lib/esm/reducers/GlobalMetadataReducer.d.ts +5 -2
- package/lib/esm/reducers/GlobalMetadataReducer.d.ts.map +1 -1
- package/lib/esm/reducers/GlobalMetadataReducer.js +4 -1
- package/package.json +8 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HostnameAwarenessModal.d.ts","sourceRoot":"","sources":["../../../../src/components/HostnameAwarenessModal/HostnameAwarenessModal.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAWtC,eAAO,MAAM,sBAAsB,mBAmIlC,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import './hostnameAwarenessModal.css';
|
|
11
|
+
import { accounts } from '@cee-eng/hydrajs';
|
|
12
|
+
import { Button, Checkbox, Modal, ModalVariant, Switch } from '@patternfly/react-core';
|
|
13
|
+
import { useFetch } from '@rh-support/components';
|
|
14
|
+
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
15
|
+
import React, { useEffect, useState } from 'react';
|
|
16
|
+
import { useGlobalStateContext } from '../../context/GlobalMetadataContext';
|
|
17
|
+
import { useUserPreferences } from '../../hooks';
|
|
18
|
+
export const HostnameAwarenessModal = () => {
|
|
19
|
+
//function to fetch original data
|
|
20
|
+
const { getHostnamesVisibilityObj, updateShowHostnamesCount } = useUserPreferences();
|
|
21
|
+
//Setting State for original data value which are used to open/finalize close modal
|
|
22
|
+
const [originalViewedCountValue, setViewedCountValue] = useState(null);
|
|
23
|
+
const [doNotShowModal, setDoNotShowModal] = useState(null);
|
|
24
|
+
const [isModalOpen, setIsModalOpen] = useState(true);
|
|
25
|
+
const [isHostnamesChecked, setisHostnamesChecked] = useState(false);
|
|
26
|
+
//preserving initial state to disable modal load
|
|
27
|
+
const [alreadyCheckedCloseModal, setAlreadyCheckedCloseModal] = useState(false);
|
|
28
|
+
const userOriginalHostnamesCount = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
try {
|
|
30
|
+
const originalHostnameVisibilityObj = yield getHostnamesVisibilityObj();
|
|
31
|
+
const parsedVisibilityObj = JSON.parse(originalHostnameVisibilityObj);
|
|
32
|
+
setViewedCountValue(parsedVisibilityObj.shownCount);
|
|
33
|
+
setDoNotShowModal(parsedVisibilityObj.doNotShow);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.log(error);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
|
|
40
|
+
const accountNumber = loggedInUsersAccount.data.accountNumber;
|
|
41
|
+
const { request: fetchHostnameDefault } = useFetch(accounts.getIsSharingHostname);
|
|
42
|
+
const { request: updateHostnameDefault } = useFetch(accounts.updateIsSharingHostname);
|
|
43
|
+
const userOriginalHostnameValue = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
+
const fetchedHostnameStatus = yield fetchHostnameDefault(accountNumber);
|
|
45
|
+
setisHostnamesChecked(fetchedHostnameStatus.shareHostnameWithRHT);
|
|
46
|
+
// This is needed so we preserve initial state we do not close modal upon updating names.
|
|
47
|
+
setAlreadyCheckedCloseModal(fetchedHostnameStatus.shareHostnameWithRHT);
|
|
48
|
+
});
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
userOriginalHostnamesCount();
|
|
51
|
+
userOriginalHostnameValue();
|
|
52
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
|
+
}, []);
|
|
54
|
+
const onCloseModal = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
+
try {
|
|
56
|
+
const updatedCountValue = (originalViewedCountValue || 0) + 1;
|
|
57
|
+
updateShowHostnamesCount({ shownCount: updatedCountValue, doNotShow: doNotShowModal });
|
|
58
|
+
setIsModalOpen(!isModalOpen);
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
console.log(error);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
// for hostnames swich
|
|
65
|
+
const onHostnameSwitchChange = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
try {
|
|
67
|
+
yield updateHostnameDefault(!isHostnamesChecked, accountNumber);
|
|
68
|
+
setisHostnamesChecked(!isHostnamesChecked);
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
console.log(error);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
//for the checkbox
|
|
75
|
+
const onDoNotAskAgain = () => {
|
|
76
|
+
try {
|
|
77
|
+
const updateObjValue = { shownCount: originalViewedCountValue, doNotShow: 1 };
|
|
78
|
+
updateShowHostnamesCount(updateObjValue);
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
console.log(error);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const modalBody = () => {
|
|
85
|
+
return (React.createElement(React.Fragment, null,
|
|
86
|
+
React.createElement(Switch, { label: "Share hostnames with support", isChecked: isHostnamesChecked, onChange: onHostnameSwitchChange })));
|
|
87
|
+
};
|
|
88
|
+
//Do not show modal if user cannot share hostnames.
|
|
89
|
+
const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
|
|
90
|
+
if (!canUseHostName) {
|
|
91
|
+
return React.createElement(React.Fragment, null);
|
|
92
|
+
}
|
|
93
|
+
//Do not show modal if user is already sharing hostnames, has seen the modal more than twice, or opted to not show it again
|
|
94
|
+
if (alreadyCheckedCloseModal || originalViewedCountValue > 2 || doNotShowModal) {
|
|
95
|
+
return React.createElement(React.Fragment, null);
|
|
96
|
+
}
|
|
97
|
+
return (React.createElement(React.Fragment, null,
|
|
98
|
+
React.createElement(Modal, { variant: ModalVariant.medium, title: "Hostname Visibility", isOpen: isModalOpen, onClose: onCloseModal, actions: [
|
|
99
|
+
React.createElement(Button, { "data-tracking-id": "close-hostname-modal", key: "close", variant: "primary", onClick: onCloseModal }, "Close"),
|
|
100
|
+
React.createElement("div", { className: "dontAskCheckbox" },
|
|
101
|
+
React.createElement(Checkbox, { label: "Don't ask me again", id: "dont-ask-again", "data-tracking-id": "dont-ask-again-hostname-modal", onClick: onDoNotAskAgain })),
|
|
102
|
+
] },
|
|
103
|
+
"Share hostnames with our support professionals for a smoother experience.",
|
|
104
|
+
modalBody())));
|
|
105
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/HostnameAwarenessModal/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HostnameAwarenessModal';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC"}
|
package/lib/esm/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
package/lib/esm/hooks/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare enum FeatureAnnouncementKeys {
|
|
2
2
|
SEND_NOTIFICATIONS = "sendNotifications",
|
|
3
3
|
MARKDOWN_INLINE_IMAGES = "markdownInlineImages",
|
|
4
|
-
CASE_TYPE_FILTER = "caseTypeFilter"
|
|
4
|
+
CASE_TYPE_FILTER = "caseTypeFilter",
|
|
5
|
+
SHARE_HOSTNAMES = "shareHostnamesWithRHT"
|
|
5
6
|
}
|
|
6
7
|
export interface IFeatureConfig {
|
|
7
8
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureAnnouncement.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFeatureAnnouncement.ts"],"names":[],"mappings":"AAYA,oBAAY,uBAAuB;IAC/B,kBAAkB,sBAAsB;IACxC,sBAAsB,yBAAyB;IAC/C,gBAAgB,mBAAmB;
|
|
1
|
+
{"version":3,"file":"useFeatureAnnouncement.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFeatureAnnouncement.ts"],"names":[],"mappings":"AAYA,oBAAY,uBAAuB;IAC/B,kBAAkB,sBAAsB;IACxC,sBAAsB,yBAAyB;IAC/C,gBAAgB,mBAAmB;IACnC,eAAe,0BAA0B;CAC5C;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,KAAK,GAAG,UAAU,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;CAC3B;AAOD,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,uBAAuB;;;;;;EAgG1E"}
|
|
@@ -8,6 +8,7 @@ export var FeatureAnnouncementKeys;
|
|
|
8
8
|
FeatureAnnouncementKeys["SEND_NOTIFICATIONS"] = "sendNotifications";
|
|
9
9
|
FeatureAnnouncementKeys["MARKDOWN_INLINE_IMAGES"] = "markdownInlineImages";
|
|
10
10
|
FeatureAnnouncementKeys["CASE_TYPE_FILTER"] = "caseTypeFilter";
|
|
11
|
+
FeatureAnnouncementKeys["SHARE_HOSTNAMES"] = "shareHostnamesWithRHT";
|
|
11
12
|
})(FeatureAnnouncementKeys || (FeatureAnnouncementKeys = {}));
|
|
12
13
|
export function useFeatureAnnouncement(featureName) {
|
|
13
14
|
const { globalMetadataState: { loggedInUserRights, hydraUserPreferences, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function useUserPreferences(): {
|
|
2
|
+
getHostnamesVisibilityObj: () => any;
|
|
3
|
+
updateShowHostnamesCount: (value: {
|
|
4
|
+
shownCount: number;
|
|
5
|
+
doNotShow?: number;
|
|
6
|
+
}) => Promise<void>;
|
|
7
|
+
getNewPreferenceTooltipSeenCount: () => any;
|
|
8
|
+
updateNewPreferenceTooltipSeenCount: (newCount: number) => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useUserPreferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUserPreferences.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUserPreferences.tsx"],"names":[],"mappings":"AAKA,wBAAgB,kBAAkB;;sCAoBiB;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;oDAqB5B,MAAM;EAsBtE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { useContext } from 'react';
|
|
11
|
+
import { GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '../';
|
|
12
|
+
import { updateUserPreferences, UserPreferencesKeys } from '../reducers';
|
|
13
|
+
export function useUserPreferences() {
|
|
14
|
+
const { globalMetadataState: { loggedInUser, hydraUserPreferences }, } = useContext(GlobalMetadataStateContext);
|
|
15
|
+
const globalMetadataDispatch = useContext(GlobalMetadataDispatchContext);
|
|
16
|
+
const doesKeyExistWithSameValue = (key, value) => {
|
|
17
|
+
const item = getKeyValue(key);
|
|
18
|
+
return item && item === value;
|
|
19
|
+
};
|
|
20
|
+
const getKeyValue = (key) => {
|
|
21
|
+
const item = hydraUserPreferences.data.find((pref) => pref.key === key);
|
|
22
|
+
return item ? item.value : null;
|
|
23
|
+
};
|
|
24
|
+
const getHostnamesVisibilityObj = () => {
|
|
25
|
+
return getKeyValue(UserPreferencesKeys.showHostnames);
|
|
26
|
+
};
|
|
27
|
+
const updateShowHostnamesCount = (value) => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
if (doesKeyExistWithSameValue(UserPreferencesKeys.showHostnames, value))
|
|
29
|
+
return;
|
|
30
|
+
yield updateUserPreferences(globalMetadataDispatch, loggedInUser.data.ssoUsername, [
|
|
31
|
+
{
|
|
32
|
+
key: UserPreferencesKeys.showHostnames,
|
|
33
|
+
value: JSON.stringify({ shownCount: value.shownCount, doNotShow: value.doNotShow || 0 }),
|
|
34
|
+
},
|
|
35
|
+
], 'add', true, true);
|
|
36
|
+
});
|
|
37
|
+
const getNewPreferenceTooltipSeenCount = () => {
|
|
38
|
+
return getKeyValue(UserPreferencesKeys.showNewPreferenceTooltip);
|
|
39
|
+
};
|
|
40
|
+
const updateNewPreferenceTooltipSeenCount = (newCount) => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
yield updateUserPreferences(globalMetadataDispatch, loggedInUser.data.ssoUsername, [
|
|
42
|
+
{
|
|
43
|
+
key: UserPreferencesKeys.showNewPreferenceTooltip,
|
|
44
|
+
value: newCount,
|
|
45
|
+
},
|
|
46
|
+
], 'add', true, true);
|
|
47
|
+
});
|
|
48
|
+
return {
|
|
49
|
+
getHostnamesVisibilityObj,
|
|
50
|
+
updateShowHostnamesCount,
|
|
51
|
+
getNewPreferenceTooltipSeenCount,
|
|
52
|
+
updateNewPreferenceTooltipSeenCount,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -22,7 +22,9 @@ export declare enum UserPreferencesKeys {
|
|
|
22
22
|
commentSignature = "PCM-CommentSignature",
|
|
23
23
|
shareHostnames = "PCM-ShareHostnames",
|
|
24
24
|
preferredLanguage = "PCM-PreferredLanguage",
|
|
25
|
-
defaultGroups = "PCM-DefaultGroup"
|
|
25
|
+
defaultGroups = "PCM-DefaultGroup",
|
|
26
|
+
showHostnames = "PCM-showHostName",
|
|
27
|
+
showNewPreferenceTooltip = "PCM-prefToolTipVisibility"
|
|
26
28
|
}
|
|
27
29
|
export declare const BOOKMARK_APPLICATION_NAME = "pcm";
|
|
28
30
|
export declare const BOOKMARK_NAME_SPACE = "customer-portal";
|
|
@@ -71,7 +73,8 @@ export declare enum GlobalMetadataReducerConstants {
|
|
|
71
73
|
updateFeatureFlag = "updateFeatureFlag",
|
|
72
74
|
setAccountCustomEmails = "setAccountCustomEmails",
|
|
73
75
|
setReferrerUrl = "setReferrerUrl",
|
|
74
|
-
getNoclusteridreasons = "getNoclusteridreasons"
|
|
76
|
+
getNoclusteridreasons = "getNoclusteridreasons",
|
|
77
|
+
setIsSharingHostnameswithRHt = "setIsSharingHostnameswithRHt"
|
|
75
78
|
}
|
|
76
79
|
export declare type ICaseType = string;
|
|
77
80
|
export declare type ICaseSeverity = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalMetadataReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/GlobalMetadataReducer.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAA0B,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AACtG,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAKH,4BAA4B,EAG/B,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAGzC,oBAAY,mBAAmB;IAC3B,sBAAsB,+BAA+B;IACrD,WAAW,oBAAoB;IAC/B,gBAAgB,yBAAyB;IACzC,uBAAuB,gCAAgC;IACvD,mBAAmB,4BAA4B;IAC/C,sBAAsB,+BAA+B;IACrD,qBAAqB,8BAA8B;IACnD,uBAAuB,gCAAgC;IACvD,gBAAgB,yBAAyB;IACzC,cAAc,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
UserPreferencesKeys["shareHostnames"] = "PCM-ShareHostnames";
|
|
32
32
|
UserPreferencesKeys["preferredLanguage"] = "PCM-PreferredLanguage";
|
|
33
33
|
UserPreferencesKeys["defaultGroups"] = "PCM-DefaultGroup";
|
|
34
|
+
UserPreferencesKeys["showHostnames"] = "PCM-showHostName";
|
|
35
|
+
UserPreferencesKeys["showNewPreferenceTooltip"] = "PCM-prefToolTipVisibility";
|
|
34
36
|
})(UserPreferencesKeys || (UserPreferencesKeys = {}));
|
|
35
37
|
export const BOOKMARK_APPLICATION_NAME = 'pcm';
|
|
36
38
|
export const BOOKMARK_NAME_SPACE = 'customer-portal';
|
|
@@ -73,6 +75,7 @@ export var GlobalMetadataReducerConstants;
|
|
|
73
75
|
GlobalMetadataReducerConstants["setAccountCustomEmails"] = "setAccountCustomEmails";
|
|
74
76
|
GlobalMetadataReducerConstants["setReferrerUrl"] = "setReferrerUrl";
|
|
75
77
|
GlobalMetadataReducerConstants["getNoclusteridreasons"] = "getNoclusteridreasons";
|
|
78
|
+
GlobalMetadataReducerConstants["setIsSharingHostnameswithRHt"] = "setIsSharingHostnameswithRHt";
|
|
76
79
|
})(GlobalMetadataReducerConstants || (GlobalMetadataReducerConstants = {}));
|
|
77
80
|
const initialProductResponse = {
|
|
78
81
|
topProducts: [],
|
|
@@ -414,7 +417,7 @@ export const fetchLoggedInUser = (dispatch, token, pcmConfig) => __awaiter(void
|
|
|
414
417
|
});
|
|
415
418
|
let loggedInUser = yield contacts.getCurrentContact({
|
|
416
419
|
userId: token.user_id,
|
|
417
|
-
|
|
420
|
+
assumeEntitledIfSubscriptionServiceUnavailable: true,
|
|
418
421
|
});
|
|
419
422
|
dispatch({
|
|
420
423
|
type: GlobalMetadataReducerConstants.setLoggedInUser,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/react-context",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.61",
|
|
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.
|
|
29
|
+
"@cee-eng/hydrajs": "4.9.1",
|
|
30
30
|
"@patternfly/react-core": "4.202.16",
|
|
31
31
|
"@patternfly/react-icons": "4.53.16",
|
|
32
32
|
"@rh-support/api": "0.3.9",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"react-test-renderer": "17.0.1"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@cee-eng/hydrajs": "4.
|
|
45
|
+
"@cee-eng/hydrajs": "4.9.1",
|
|
46
46
|
"@patternfly/react-core": "4.202.16",
|
|
47
47
|
"@patternfly/react-icons": "4.53.16",
|
|
48
|
-
"@rh-support/api": "0.3.
|
|
49
|
-
"@rh-support/components": "1.1.
|
|
48
|
+
"@rh-support/api": "0.3.15",
|
|
49
|
+
"@rh-support/components": "1.1.59",
|
|
50
50
|
"@rh-support/types": "0.2.0",
|
|
51
|
-
"@rh-support/user-permissions": "0.2.
|
|
52
|
-
"@rh-support/utils": "0.2.
|
|
51
|
+
"@rh-support/user-permissions": "0.2.47",
|
|
52
|
+
"@rh-support/utils": "0.2.36",
|
|
53
53
|
"i18next": "^19.0.1",
|
|
54
54
|
"localforage": "^1.7.3",
|
|
55
55
|
"lodash": "^4.17.15",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"not ie <= 11",
|
|
90
90
|
"not op_mini all"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "82a2161f34c47eeb658bec78e6af2eff79a61b2f"
|
|
93
93
|
}
|