@rh-support/react-context 2.1.34 → 2.1.35
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/SharedModals/CSSUserModal.d.ts +7 -0
- package/lib/esm/components/SharedModals/CSSUserModal.d.ts.map +1 -0
- package/lib/esm/components/SharedModals/CSSUserModal.js +36 -0
- package/lib/esm/components/SharedModals/index.d.ts +1 -0
- package/lib/esm/components/SharedModals/index.d.ts.map +1 -1
- package/lib/esm/components/SharedModals/index.js +1 -0
- package/lib/esm/reducers/GlobalMetadataReducer.d.ts +7 -1
- package/lib/esm/reducers/GlobalMetadataReducer.d.ts.map +1 -1
- package/lib/esm/reducers/GlobalMetadataReducer.js +23 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSSUserModal.d.ts","sourceRoot":"","sources":["../../../../src/components/SharedModals/CSSUserModal.tsx"],"names":[],"mappings":"AAKA,UAAU,MAAM;IACZ,oCAAoC,EAAE,MAAM,IAAI,CAAC;IACjD,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,oCAAoC,EAAE,OAAO,EAAE,EAAE,MAAM,eAuErF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Button, Modal, ModalVariant } from '@patternfly/react-core';
|
|
2
|
+
import React, { useContext, useState } from 'react';
|
|
3
|
+
import { GlobalMetadataStateContext } from '../../context/GlobalMetadataContext';
|
|
4
|
+
export function CSSUserModal({ onConfirmTraditionalSupportAgreement, display }) {
|
|
5
|
+
var _a;
|
|
6
|
+
const [showSupportTypeModal, setShowSupportTypeModal] = useState(true);
|
|
7
|
+
const [showTraditionalSupportAgreement, setShowTraditionalSupportAgreement] = useState(false);
|
|
8
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
9
|
+
const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
|
|
10
|
+
const handleCSSclick = () => {
|
|
11
|
+
window.open('https://redhatgov.servicenowservices.com/css?id=csm_login', '_self');
|
|
12
|
+
};
|
|
13
|
+
const handleTraditionalSupportClick = () => {
|
|
14
|
+
setShowTraditionalSupportAgreement(true);
|
|
15
|
+
};
|
|
16
|
+
const handleTraditionalSupportAgreement = () => {
|
|
17
|
+
setShowTraditionalSupportAgreement(false);
|
|
18
|
+
setShowSupportTypeModal(false);
|
|
19
|
+
onConfirmTraditionalSupportAgreement && onConfirmTraditionalSupportAgreement();
|
|
20
|
+
};
|
|
21
|
+
if (!display || !isConfirmedStateSideSupport)
|
|
22
|
+
return null;
|
|
23
|
+
return (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(Modal, { variant: ModalVariant.medium, title: 'Choose the type of support you want', isOpen: isConfirmedStateSideSupport && showSupportTypeModal, onClose: () => setShowSupportTypeModal(false), actions: [
|
|
25
|
+
React.createElement(Button, { key: "confirmed-stateside-support-btn", onClick: handleCSSclick }, "Confirmed Stateside Support"),
|
|
26
|
+
React.createElement(Button, { variant: "secondary", key: "traditional-support-btn", onClick: handleTraditionalSupportClick }, "Traditional Support"),
|
|
27
|
+
] }, "You have a Confirmed Stateside Support account"),
|
|
28
|
+
React.createElement(Modal, { variant: ModalVariant.medium, title: 'Traditional Support', isOpen: isConfirmedStateSideSupport && showTraditionalSupportAgreement, onClose: () => setShowTraditionalSupportAgreement(false), actions: [
|
|
29
|
+
React.createElement(Button, { variant: "secondary", key: "back-btn", onClick: () => setShowTraditionalSupportAgreement(false) }, "Back"),
|
|
30
|
+
React.createElement(Button, { key: "agree-traditional-support-btn", onClick: handleTraditionalSupportAgreement }, "I agree"),
|
|
31
|
+
] },
|
|
32
|
+
"By continuing you agree not to transmit Controlled Unclassified Information(CUI) or export-controlled information to the Red Hat Customer Portal.",
|
|
33
|
+
React.createElement("br", null),
|
|
34
|
+
React.createElement("br", null),
|
|
35
|
+
"The Customer Protal is not certified to store data regulated by the US government, including data covered by ITAR or EAR (Export Administration Regulations).")));
|
|
36
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SharedModals/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SharedModals/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC"}
|
|
@@ -77,7 +77,9 @@ export declare enum GlobalMetadataReducerConstants {
|
|
|
77
77
|
setAccountCustomEmails = "setAccountCustomEmails",
|
|
78
78
|
setReferrerUrl = "setReferrerUrl",
|
|
79
79
|
getNoclusteridreasons = "getNoclusteridreasons",
|
|
80
|
-
setIsSharingHostnameswithRHt = "setIsSharingHostnameswithRHt"
|
|
80
|
+
setIsSharingHostnameswithRHt = "setIsSharingHostnameswithRHt",
|
|
81
|
+
setCaseListTraditionalSupportAgreed = "setCaseListTraditionalSupportAgreed",
|
|
82
|
+
setTroubleshootTraditionalSupportAgreed = "setTroubleshootTraditionalSupportAgreed"
|
|
81
83
|
}
|
|
82
84
|
export declare type ICaseType = string;
|
|
83
85
|
export declare type ICaseSeverity = string;
|
|
@@ -126,6 +128,8 @@ export interface IGlobalMetadataState {
|
|
|
126
128
|
accountCustomEmails: IApiResponseDetails<IAccountNotificationAddresses[]>;
|
|
127
129
|
referrerUrl: string;
|
|
128
130
|
caseNoClusterIdReasons: IApiResponseDetails<string[]>;
|
|
131
|
+
caseListTraditionalSupportAgreed: boolean;
|
|
132
|
+
troubleshootTraditionalSupportAgreed: boolean;
|
|
129
133
|
}
|
|
130
134
|
export interface IGlobalMetadataPayloadType extends IGlobalMetadataState {
|
|
131
135
|
interaction: IIntraction;
|
|
@@ -169,5 +173,7 @@ export declare const updateFeatureFlag: (dispatch: GlobalMetadataReducerDispatch
|
|
|
169
173
|
export declare const fetchAccountCustomEmails: (dispatch: GlobalMetadataReducerDispatchType, accountNumber: string) => Promise<void>;
|
|
170
174
|
export declare const setAccountCustomEmails: (dispatch: GlobalMetadataReducerDispatchType, accountCustomEmails: IAccountNotificationAddresses[]) => void;
|
|
171
175
|
export declare const fetchNoClusterIdReasonsMetadata: (dispatch: GlobalMetadataReducerDispatchType) => Promise<void>;
|
|
176
|
+
export declare const updateCaseListTraditionalSupportAgreed: (dispatch: GlobalMetadataReducerDispatchType, value: boolean) => void;
|
|
177
|
+
export declare const updateTroubleshootTraditionalSupportAgreed: (dispatch: GlobalMetadataReducerDispatchType, value: boolean) => void;
|
|
172
178
|
export {};
|
|
173
179
|
//# sourceMappingURL=GlobalMetadataReducer.d.ts.map
|
|
@@ -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,EAIH,4BAA4B,E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iCAAiC,SAEnF,CAAC;AAEF,eAAO,MAAM,oBAAoB,aACnB,iCAAiC,SACpC,QAAQ,eAAe,CAAC,kBAsBlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,aACpB,iCAAiC,eAC9B,MAAM,eACN,WAAW,EAAE,cACf,KAAK,GAAG,QAAQ,2CAEJ,OAAO,kBAiCjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAChB,iCAAiC,gBAC7B,QAAQ,aAAa,CAAC,SAMvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,aAAoB,iCAAiC,iBAAiB,MAAM,kBAiBhH,CAAC;AAEF,eAAO,MAAM,sBAAsB,aACrB,iCAAiC,uBACtB,6BAA6B,EAAE,SAMvD,CAAC;AAEF,eAAO,MAAM,+BAA+B,aAAoB,iCAAiC,kBAkBhG,CAAC;AAEF,eAAO,MAAM,sCAAsC,aAAc,iCAAiC,SAAS,OAAO,SAKjH,CAAC;AAEF,eAAO,MAAM,0CAA0C,aACzC,iCAAiC,SACpC,OAAO,SAMjB,CAAC"}
|
|
@@ -79,6 +79,8 @@ export var GlobalMetadataReducerConstants;
|
|
|
79
79
|
GlobalMetadataReducerConstants["setReferrerUrl"] = "setReferrerUrl";
|
|
80
80
|
GlobalMetadataReducerConstants["getNoclusteridreasons"] = "getNoclusteridreasons";
|
|
81
81
|
GlobalMetadataReducerConstants["setIsSharingHostnameswithRHt"] = "setIsSharingHostnameswithRHt";
|
|
82
|
+
GlobalMetadataReducerConstants["setCaseListTraditionalSupportAgreed"] = "setCaseListTraditionalSupportAgreed";
|
|
83
|
+
GlobalMetadataReducerConstants["setTroubleshootTraditionalSupportAgreed"] = "setTroubleshootTraditionalSupportAgreed";
|
|
82
84
|
})(GlobalMetadataReducerConstants || (GlobalMetadataReducerConstants = {}));
|
|
83
85
|
const initialProductResponse = {
|
|
84
86
|
topProducts: [],
|
|
@@ -117,9 +119,12 @@ export const initialGlobalMetadataState = {
|
|
|
117
119
|
},
|
|
118
120
|
referrerUrl: null,
|
|
119
121
|
caseNoClusterIdReasons: getApiResourceObject([]),
|
|
122
|
+
caseListTraditionalSupportAgreed: false,
|
|
123
|
+
troubleshootTraditionalSupportAgreed: false,
|
|
120
124
|
};
|
|
121
125
|
// Resucers
|
|
122
126
|
export const globalMetadataReducer = (pState, action) => {
|
|
127
|
+
var _a, _b;
|
|
123
128
|
switch (action.type) {
|
|
124
129
|
case GlobalMetadataReducerConstants.setCaseTypes: {
|
|
125
130
|
return Object.assign(Object.assign({}, pState), { allCaseTypes: action.payload.allCaseTypes });
|
|
@@ -212,6 +217,12 @@ export const globalMetadataReducer = (pState, action) => {
|
|
|
212
217
|
case GlobalMetadataReducerConstants.getNoclusteridreasons: {
|
|
213
218
|
return Object.assign(Object.assign({}, pState), { caseNoClusterIdReasons: action.payload.caseNoClusterIdReasons });
|
|
214
219
|
}
|
|
220
|
+
case GlobalMetadataReducerConstants.setCaseListTraditionalSupportAgreed: {
|
|
221
|
+
return Object.assign(Object.assign({}, pState), { caseListTraditionalSupportAgreed: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseListTraditionalSupportAgreed });
|
|
222
|
+
}
|
|
223
|
+
case GlobalMetadataReducerConstants.setTroubleshootTraditionalSupportAgreed: {
|
|
224
|
+
return Object.assign(Object.assign({}, pState), { troubleshootTraditionalSupportAgreed: (_b = action.payload) === null || _b === void 0 ? void 0 : _b.troubleshootTraditionalSupportAgreed });
|
|
225
|
+
}
|
|
215
226
|
default: {
|
|
216
227
|
return pState;
|
|
217
228
|
}
|
|
@@ -849,3 +860,15 @@ export const fetchNoClusterIdReasonsMetadata = (dispatch) => __awaiter(void 0, v
|
|
|
849
860
|
});
|
|
850
861
|
}
|
|
851
862
|
});
|
|
863
|
+
export const updateCaseListTraditionalSupportAgreed = (dispatch, value) => {
|
|
864
|
+
dispatch({
|
|
865
|
+
type: GlobalMetadataReducerConstants.setCaseListTraditionalSupportAgreed,
|
|
866
|
+
payload: { caseListTraditionalSupportAgreed: value },
|
|
867
|
+
});
|
|
868
|
+
};
|
|
869
|
+
export const updateTroubleshootTraditionalSupportAgreed = (dispatch, value) => {
|
|
870
|
+
dispatch({
|
|
871
|
+
type: GlobalMetadataReducerConstants.setTroubleshootTraditionalSupportAgreed,
|
|
872
|
+
payload: { troubleshootTraditionalSupportAgreed: value },
|
|
873
|
+
});
|
|
874
|
+
};
|
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.35",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -40,7 +40,7 @@
|
|
|
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.32",
|
|
44
44
|
"@rh-support/types": "2.0.2",
|
|
45
45
|
"@rh-support/user-permissions": "2.1.22",
|
|
46
46
|
"@rh-support/utils": "2.1.15",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"defaults and supports es6-module",
|
|
85
85
|
"maintained node versions"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "462d269eaba23f3e9b735caf2157f24f2a841da2"
|
|
88
88
|
}
|