@rh-support/react-context 0.2.58 → 0.2.59
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 +2 -0
- package/lib/esm/components/HostnameAwarenessModal/HostnameAwarenessModal.d.ts.map +1 -0
- package/lib/esm/components/HostnameAwarenessModal/HostnameAwarenessModal.js +103 -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 +8 -0
- package/lib/esm/hooks/useUserPreferences.d.ts.map +1 -0
- package/lib/esm/hooks/useUserPreferences.js +41 -0
- package/lib/esm/reducers/GlobalMetadataReducer.d.ts +4 -2
- package/lib/esm/reducers/GlobalMetadataReducer.d.ts.map +1 -1
- package/lib/esm/reducers/GlobalMetadataReducer.js +3 -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":"AASA,eAAO,MAAM,sBAAsB,mBAiIlC,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 { accounts } from '@cee-eng/hydrajs';
|
|
11
|
+
import { Button, Checkbox, Modal, ModalVariant, Switch } from '@patternfly/react-core';
|
|
12
|
+
import { useFetch } from '@rh-support/components';
|
|
13
|
+
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
+
import React, { useEffect, useState } from 'react';
|
|
15
|
+
import { useGlobalStateContext } from '../../context/GlobalMetadataContext';
|
|
16
|
+
import { useUserPreferences } from '../../hooks';
|
|
17
|
+
export const HostnameAwarenessModal = () => {
|
|
18
|
+
//function to fetch original data
|
|
19
|
+
const { getHostnamesVisibilityObj, updateShowHostnamesCount } = useUserPreferences();
|
|
20
|
+
//Setting State for original data value which are used to open/finalize close modal
|
|
21
|
+
const [originalViewedCountValue, setViewedCountValue] = useState(null);
|
|
22
|
+
const [doNotShowModal, setDoNotShowModal] = useState(null);
|
|
23
|
+
const [isModalOpen, setIsModalOpen] = useState(true);
|
|
24
|
+
const [isHostnamesChecked, setisHostnamesChecked] = useState(false);
|
|
25
|
+
//preserving initial state to disable modal load
|
|
26
|
+
const [alreadyCheckedCloseModal, setAlreadyCheckedCloseModal] = useState(false);
|
|
27
|
+
const userOriginalHostnamesCount = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
const originalHostnameVisibilityObj = yield getHostnamesVisibilityObj();
|
|
30
|
+
const parsedVisibilityObj = JSON.parse(originalHostnameVisibilityObj);
|
|
31
|
+
setViewedCountValue(parsedVisibilityObj.shownCount);
|
|
32
|
+
setDoNotShowModal(parsedVisibilityObj.doNotShow);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.log(error);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
|
|
39
|
+
const accountNumber = loggedInUsersAccount.data.accountNumber;
|
|
40
|
+
const { request: fetchHostnameDefault } = useFetch(accounts.getIsSharingHostname);
|
|
41
|
+
const { request: updateHostnameDefault } = useFetch(accounts.updateIsSharingHostname);
|
|
42
|
+
const userOriginalHostnameValue = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
+
const fetchedHostnameStatus = yield fetchHostnameDefault(accountNumber);
|
|
44
|
+
setisHostnamesChecked(fetchedHostnameStatus.shareHostnameWithRHT);
|
|
45
|
+
// This is needed so we preserve initial state we do not close modal upon updating names.
|
|
46
|
+
setAlreadyCheckedCloseModal(fetchedHostnameStatus.shareHostnameWithRHT);
|
|
47
|
+
});
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
userOriginalHostnamesCount();
|
|
50
|
+
userOriginalHostnameValue();
|
|
51
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
|
+
}, []);
|
|
53
|
+
const onCloseModal = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
|
+
try {
|
|
55
|
+
const updatedCountValue = (originalViewedCountValue || 0) + 1;
|
|
56
|
+
updateShowHostnamesCount({ shownCount: updatedCountValue, doNotShow: doNotShowModal });
|
|
57
|
+
setIsModalOpen(!isModalOpen);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
console.log(error);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
// for hostnames swich
|
|
64
|
+
const onHostnameSwitchChange = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
+
try {
|
|
66
|
+
yield updateHostnameDefault(!isHostnamesChecked, accountNumber);
|
|
67
|
+
setisHostnamesChecked(!isHostnamesChecked);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
console.log(error);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
//for the checkbox
|
|
74
|
+
const onDoNotAskAgain = () => {
|
|
75
|
+
try {
|
|
76
|
+
const updateObjValue = { shownCount: originalViewedCountValue, doNotShow: 1 };
|
|
77
|
+
updateShowHostnamesCount(updateObjValue);
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
console.log(error);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const modalBody = () => {
|
|
84
|
+
return (React.createElement(React.Fragment, null,
|
|
85
|
+
React.createElement(Switch, { label: "Share hostnames with support", isChecked: isHostnamesChecked, onChange: onHostnameSwitchChange })));
|
|
86
|
+
};
|
|
87
|
+
//Do not show modal if user cannot share hostnames.
|
|
88
|
+
const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
|
|
89
|
+
if (!canUseHostName) {
|
|
90
|
+
return React.createElement(React.Fragment, null);
|
|
91
|
+
}
|
|
92
|
+
//Do not show modal if user is already sharing hostnames, has seen the modal more than twice, or opted to not show it again
|
|
93
|
+
if (alreadyCheckedCloseModal || originalViewedCountValue > 2 || doNotShowModal) {
|
|
94
|
+
return React.createElement(React.Fragment, null);
|
|
95
|
+
}
|
|
96
|
+
return (React.createElement(React.Fragment, null,
|
|
97
|
+
React.createElement(Modal, { variant: ModalVariant.medium, title: "Hostname Visibility", isOpen: isModalOpen, onClose: onCloseModal, actions: [
|
|
98
|
+
React.createElement(Button, { "data-tracking-id": "close-hostname-modal", key: "close", variant: "primary", onClick: onCloseModal }, "Close"),
|
|
99
|
+
React.createElement(Checkbox, { label: "Don't ask me again", id: "dont-ask-again", "data-tracking-id": "dont-ask-again-hostname-modal", onClick: onDoNotAskAgain }),
|
|
100
|
+
] },
|
|
101
|
+
"Share hostnames with our support professionals for a smoother experience.",
|
|
102
|
+
modalBody())));
|
|
103
|
+
};
|
|
@@ -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 @@
|
|
|
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;EAqB5F"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
return {
|
|
38
|
+
getHostnamesVisibilityObj,
|
|
39
|
+
updateShowHostnamesCount,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -22,7 +22,8 @@ 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"
|
|
26
27
|
}
|
|
27
28
|
export declare const BOOKMARK_APPLICATION_NAME = "pcm";
|
|
28
29
|
export declare const BOOKMARK_NAME_SPACE = "customer-portal";
|
|
@@ -71,7 +72,8 @@ export declare enum GlobalMetadataReducerConstants {
|
|
|
71
72
|
updateFeatureFlag = "updateFeatureFlag",
|
|
72
73
|
setAccountCustomEmails = "setAccountCustomEmails",
|
|
73
74
|
setReferrerUrl = "setReferrerUrl",
|
|
74
|
-
getNoclusteridreasons = "getNoclusteridreasons"
|
|
75
|
+
getNoclusteridreasons = "getNoclusteridreasons",
|
|
76
|
+
setIsSharingHostnameswithRHt = "setIsSharingHostnameswithRHt"
|
|
75
77
|
}
|
|
76
78
|
export declare type ICaseType = string;
|
|
77
79
|
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,oBAA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BAA6B,EAAE,SAMvD,CAAC;AAEF,eAAO,MAAM,+BAA+B,aAAoB,iCAAiC,kBAkBhG,CAAC"}
|
|
@@ -31,6 +31,7 @@ export var UserPreferencesKeys;
|
|
|
31
31
|
UserPreferencesKeys["shareHostnames"] = "PCM-ShareHostnames";
|
|
32
32
|
UserPreferencesKeys["preferredLanguage"] = "PCM-PreferredLanguage";
|
|
33
33
|
UserPreferencesKeys["defaultGroups"] = "PCM-DefaultGroup";
|
|
34
|
+
UserPreferencesKeys["showHostnames"] = "PCM-showHostName";
|
|
34
35
|
})(UserPreferencesKeys || (UserPreferencesKeys = {}));
|
|
35
36
|
export const BOOKMARK_APPLICATION_NAME = 'pcm';
|
|
36
37
|
export const BOOKMARK_NAME_SPACE = 'customer-portal';
|
|
@@ -73,6 +74,7 @@ export var GlobalMetadataReducerConstants;
|
|
|
73
74
|
GlobalMetadataReducerConstants["setAccountCustomEmails"] = "setAccountCustomEmails";
|
|
74
75
|
GlobalMetadataReducerConstants["setReferrerUrl"] = "setReferrerUrl";
|
|
75
76
|
GlobalMetadataReducerConstants["getNoclusteridreasons"] = "getNoclusteridreasons";
|
|
77
|
+
GlobalMetadataReducerConstants["setIsSharingHostnameswithRHt"] = "setIsSharingHostnameswithRHt";
|
|
76
78
|
})(GlobalMetadataReducerConstants || (GlobalMetadataReducerConstants = {}));
|
|
77
79
|
const initialProductResponse = {
|
|
78
80
|
topProducts: [],
|
|
@@ -414,7 +416,7 @@ export const fetchLoggedInUser = (dispatch, token, pcmConfig) => __awaiter(void
|
|
|
414
416
|
});
|
|
415
417
|
let loggedInUser = yield contacts.getCurrentContact({
|
|
416
418
|
userId: token.user_id,
|
|
417
|
-
|
|
419
|
+
assumeEntitledIfSubscriptionServiceUnavailable: true,
|
|
418
420
|
});
|
|
419
421
|
dispatch({
|
|
420
422
|
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.59",
|
|
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": "ad255c7391384f7369695275fcd43481f4298974"
|
|
93
93
|
}
|