@rh-support/troubleshoot 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.
Files changed (47) hide show
  1. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +6 -15
  3. package/lib/esm/components/CaseEditView/RequestRemoteSession/index.d.ts +0 -1
  4. package/lib/esm/components/CaseEditView/RequestRemoteSession/index.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/RequestRemoteSession/index.js +0 -1
  6. package/lib/esm/components/CaseInformation/FileDiag.d.ts +5 -1
  7. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  8. package/lib/esm/components/CaseInformation/FileDiag.js +2 -2
  9. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  10. package/lib/esm/components/CaseManagement/CaseManagement.js +2 -15
  11. package/lib/esm/components/Recommendations/CriticalSolutionsToast.d.ts.map +1 -1
  12. package/lib/esm/components/Recommendations/CriticalSolutionsToast.js +5 -2
  13. package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +1 -1
  14. package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
  15. package/lib/esm/components/Recommendations/RulesModal.js +25 -9
  16. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  17. package/lib/esm/components/Review/Review.js +2 -12
  18. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  19. package/lib/esm/components/SubmitCase/SubmitCase.js +4 -9
  20. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  21. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +16 -11
  22. package/lib/esm/components/wizardLayout/WizardAside.js +1 -1
  23. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  24. package/lib/esm/components/wizardLayout/WizardNavigation.js +50 -4
  25. package/lib/esm/reducers/CaseConstNTypes.d.ts +1 -0
  26. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  27. package/lib/esm/reducers/CaseConstNTypes.js +1 -1
  28. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  29. package/lib/esm/reducers/CaseHelpers.js +2 -5
  30. package/lib/esm/reducers/CaseReducer.d.ts +0 -1
  31. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  32. package/lib/esm/reducers/CaseReducer.js +1 -21
  33. package/lib/esm/scss/_main.scss +13 -0
  34. package/lib/esm/scss/_pf4-overrides.scss +24 -1
  35. package/package.json +6 -6
  36. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts +0 -12
  37. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +0 -1
  38. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +0 -48
  39. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts +0 -15
  40. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +0 -1
  41. package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +0 -108
  42. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts +0 -17
  43. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +0 -1
  44. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +0 -181
  45. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts +0 -3
  46. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +0 -1
  47. package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +0 -167
@@ -151,7 +151,6 @@ export const initialCaseState = {
151
151
  openshiftClusterVersion: '',
152
152
  phone: '',
153
153
  suppliedPhoneNumberVerified: undefined,
154
- screenSessionRequested: false,
155
154
  },
156
155
  customerEscalation: false,
157
156
  isClosed: false,
@@ -191,6 +190,7 @@ export const initialCaseState = {
191
190
  caseCreation500ErrorStatus: false,
192
191
  openshiftDisplayName: '',
193
192
  isCaseOwnerUpdating: false,
193
+ isFileRecommendationsTriggered: false,
194
194
  };
195
195
  export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
196
196
  export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAkB3D,OAAO,EAUH,UAAU,EAgBb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,SAAU,mBAAmB,EAAE,wBAMjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,WAAW,KAAG,MAOrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAS,mBAAmB,SAAS,MAAM,sBAyB9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,UACvB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,kBACb,MAAM,YACZ,MAAM,YACN,MAAM,KACjB,MAyBF,CAAC;AAIF,eAAO,MAAM,oBAAoB,UACtB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,KAC9B,MAQF,CAAC;AAEF,eAAO,MAAM,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/C,OAuBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAyEtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CA+BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eA2CF,CAAC"}
@@ -236,7 +236,6 @@ export const createCasePayload = (caseState, sessionItem, isCaseCreate = false)
236
236
  !isEmpty(case_details.hostname) && (casePayload.hostname = case_details.hostname);
237
237
  !isEmpty(case_details.caseResourceLinks) && (casePayload.caseResourceLinks = case_details.caseResourceLinks);
238
238
  !isEmpty(case_details.phone) && (casePayload.phone = case_details.phone);
239
- case_details.screenSessionRequested && (casePayload.screenSessionRequested = !!case_details.screenSessionRequested);
240
239
  case_details.remoteSessionTermsAcked &&
241
240
  (casePayload.remoteSessionTermsAcked = !!case_details.remoteSessionTermsAcked);
242
241
  casePayload.suppliedPhoneNumberVerified = !isEmpty(case_details.suppliedPhoneNumberVerified)
@@ -289,7 +288,7 @@ export const getHasInvalidEntitlements = (caseEntitlements) => {
289
288
  return filter(unionBy(caseEntitlements, 'slaProcessId'), (e) => !!e.slaProcessId).length === 0;
290
289
  };
291
290
  export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber, loggedInUserSSO) => {
292
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
291
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
293
292
  const { sessionDetails, session } = sessionItem;
294
293
  return {
295
294
  product: sessionDetails.product,
@@ -319,11 +318,10 @@ export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber
319
318
  suppliedPhoneNumberVerified: (_m = sessionDetails.suppliedPhoneNumberVerified) !== null && _m !== void 0 ? _m : undefined,
320
319
  userAgent: session.userAgent,
321
320
  originatingSystem: session.originatingSystem,
322
- screenSessionRequested: (_o = sessionDetails.screenSessionRequested) !== null && _o !== void 0 ? _o : false,
323
321
  };
324
322
  };
325
323
  export const getSessionDetailsFromCase = (caseDetails, selectedNotificationContacts) => {
326
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
324
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
327
325
  const notifiedUsersInternal = [];
328
326
  const notifiedUsersExternal = [];
329
327
  forEach(selectedNotificationContacts, (contact) => {
@@ -362,6 +360,5 @@ export const getSessionDetailsFromCase = (caseDetails, selectedNotificationConta
362
360
  noClusterIdReasonExplanation: (_s = (_r = caseDetails.noClusterIdReasonExplanation) === null || _r === void 0 ? void 0 : _r.substring(0, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT)) !== null && _s !== void 0 ? _s : '',
363
361
  phone: (_u = (_t = caseDetails.phone) === null || _t === void 0 ? void 0 : _t.substring(0, SESSION_PHONE_LENGTH_LIMIT)) !== null && _u !== void 0 ? _u : '',
364
362
  suppliedPhoneNumberVerified: caseDetails.suppliedPhoneNumberVerified,
365
- screenSessionRequested: (_v = caseDetails.screenSessionRequested) !== null && _v !== void 0 ? _v : false,
366
363
  };
367
364
  };
@@ -25,7 +25,6 @@ export declare const updateCaseCreationErrorStatusOnError: (dispatch: CaseReduce
25
25
  */
26
26
  export declare const updateCaseCreationErrorStatus: (dispatch: CaseReducerDispatchType, errorStatus: boolean) => void;
27
27
  export declare const postCaseCreationProcessing: (dispatch: CaseReducerDispatchType, caseNumber: string, caseDetails: ICaseState) => Promise<void>;
28
- export declare const postRemoteSessionRequest: (dispatch: CaseReducerDispatchType, caseNumber: string) => Promise<void>;
29
28
  export declare const postCepDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, cepDetails: ICepDetails) => Promise<void>;
30
29
  export declare const setCaseRecommendations: (dispatch: CaseReducerDispatchType, docs: ISolrRecommendation[], oldRecommendations: ICaseResourceLink[]) => void;
31
30
  export declare const setDetectedLanguage: (dispatch: CaseReducerDispatchType, subject: string, description: string) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AASxD,OAAO,EAEH,uBAAuB,EAEvB,UAAU,EAEb,MAAM,mBAAmB,CAAC;AAU3B,eAAO,MAAM,WAAW,WAAY,UAAU,UAAU,GAAG,KAAG,UA6L7D,CAAC;AAGF,eAAO,MAAM,cAAc,aAAc,uBAAuB,aAAa,QAAQ,YAAY,CAAC,SAEjG,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,uBAAuB,aAAa,QAAQ,UAAU,CAAC,SAE7F,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,uBAAuB,gCAAgC,QAAQ,EAAE,SAK1G,CAAC;AAEF,eAAO,MAAM,UAAU,aACT,uBAAuB,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AAa,EAAE,gBACR,MAAM,kBAmCvB,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,yEAInB,MAAM,kBACJ,MAAM,kBAgFzB,CAAC;AAEF,eAAO,MAAM,yCAAyC,aACxC,uBAAuB,cACrB,OAAO,iBACJ,MAAM,SAMxB,CAAC;AAIF,eAAO,MAAM,yBAAyB,aACxB,uBAAuB,iBAClB,MAAM,eACR,MAAM,sBACC,QAAQ,kBA6B/B,CAAC;AAEF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAmBtG;AAGD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,0BAA0B,EAAE,QAO5D;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAiB1F;AAED,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,QAAQ,OAAO,SAKlF,CAAC"}
@@ -197,25 +197,6 @@ export const updateCaseCreationErrorStatus = (dispatch, errorStatus) => {
197
197
  };
198
198
  export const postCaseCreationProcessing = (dispatch, caseNumber, caseDetails) => __awaiter(void 0, void 0, void 0, function* () {
199
199
  caseDetails.caseDetails.cep === true && postCepDetails(dispatch, caseNumber, caseDetails.cepDetails);
200
- caseDetails.caseDetails.screenSessionRequested === true && postRemoteSessionRequest(dispatch, caseNumber);
201
- });
202
- export const postRemoteSessionRequest = (dispatch, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
203
- dispatch({ type: CaseReducerConstants.updateCaseDetails, payload: { isCaseUpdating: true } });
204
- try {
205
- yield publicApi.kase.postComment({
206
- caseNumber,
207
- commentBody: 'Submitted a remote session request.',
208
- isPublic: true,
209
- contentType: 'markdown',
210
- });
211
- dispatch({ type: CaseReducerConstants.updateCaseDetails, payload: { isCaseUpdating: false } });
212
- }
213
- catch (error) {
214
- dispatch({
215
- type: CaseReducerConstants.isCreatingCase,
216
- payload: { caseCreationErrorMessage: error.message },
217
- });
218
- }
219
200
  });
220
201
  export const postCepDetails = (dispatch, caseNumber, cepDetails) => __awaiter(void 0, void 0, void 0, function* () {
221
202
  dispatch({ type: CaseReducerConstants.setIsPostingCep, payload: { isPostingCep: true } });
@@ -514,7 +495,7 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
514
495
  }
515
496
  });
516
497
  export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refresh = false, previousState = {}) => __awaiter(void 0, void 0, void 0, function* () {
517
- var _h, _j;
498
+ var _h;
518
499
  dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
519
500
  try {
520
501
  const data = yield publicApi.kase.getCase(caseNumber);
@@ -558,7 +539,6 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refre
558
539
  noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
559
540
  phone: data.phone || '',
560
541
  suppliedPhoneNumberVerified: data.suppliedPhoneNumberVerified || undefined,
561
- screenSessionRequested: (_j = data.screenSessionRequested) !== null && _j !== void 0 ? _j : false,
562
542
  };
563
543
  caseDetails.chats = data === null || data === void 0 ? void 0 : data.chats;
564
544
  caseDetails.comments = data === null || data === void 0 ? void 0 : data.comments;
@@ -1077,3 +1077,16 @@ li.pf-c-wizard__nav-item button.pf-m-disabled::before {
1077
1077
  border: 2px dashed var(--pf-global--palette--black-600);
1078
1078
  background-color: var(--pf-global--palette--black-300);
1079
1079
  }
1080
+ .pf-c-wizard__footer {
1081
+ display: flex !important;
1082
+ align-items: center !important;
1083
+ padding: 10px !important;
1084
+ }
1085
+
1086
+ .main-nav-button {
1087
+ display: flex !important;
1088
+ }
1089
+
1090
+ .solved-issue-button {
1091
+ margin-left: auto !important;
1092
+ }
@@ -147,7 +147,7 @@
147
147
  padding: 0 10px;
148
148
 
149
149
  &:hover svg {
150
- color: #004080 !important;
150
+ color: var(--pf-global--palette--blue-500) !important;
151
151
  }
152
152
  }
153
153
  }
@@ -276,6 +276,29 @@
276
276
 
277
277
  .popular-solutions {
278
278
  background-color: #286869 !important;
279
+ .card-title {
280
+ color: #fff !important;
281
+ }
282
+ div > button > span > svg {
283
+ color: white !important;
284
+ }
285
+ .file-recs-actions-toggle {
286
+ color: white !important;
287
+ }
288
+ }
289
+ .file-diag {
290
+ border: 1px solid #ededed;
291
+ }
292
+
293
+ .file-diag > .card-heading {
294
+ display: flex;
295
+ -ms-flex-align: center;
296
+ margin-bottom: 0;
297
+ padding: 0.5rem 0.8rem;
298
+ font-size: 15px;
299
+ background-color: var(--pf-global--palette--black-500);
300
+ border: 1px solid var(--pf-global--palette--black-500);
301
+ color: var(--pf-global--palette--white);
279
302
  }
280
303
 
281
304
  .file-diag .file-buttons .pf-c-switch .pf-c-switch__label {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.1.17",
3
+ "version": "2.1.19",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -66,11 +66,11 @@
66
66
  "@patternfly/react-core": "4.264.0",
67
67
  "@progress/kendo-drawing": "^1.6.0",
68
68
  "@progress/kendo-react-pdf": "^3.12.0",
69
- "@rh-support/components": "2.0.10",
70
- "@rh-support/react-context": "2.0.10",
69
+ "@rh-support/components": "2.0.11",
70
+ "@rh-support/react-context": "2.0.11",
71
71
  "@rh-support/types": "2.0.2",
72
- "@rh-support/user-permissions": "2.0.10",
73
- "@rh-support/utils": "2.0.10",
72
+ "@rh-support/user-permissions": "2.0.11",
73
+ "@rh-support/utils": "2.0.11",
74
74
  "@types/react-redux": "^7.1.12",
75
75
  "@types/redux": "^3.6.0",
76
76
  "dompurify": "^2.4.1",
@@ -133,5 +133,5 @@
133
133
  "defaults and supports es6-module",
134
134
  "maintained node versions"
135
135
  ],
136
- "gitHead": "2f772b8e900d7f9d1226ada977ad63c11261fbb3"
136
+ "gitHead": "847c33cd666971e8c8529b15192437cd74d995bb"
137
137
  }
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- caseNumber: string;
4
- caseSeverity: string;
5
- caseStatus: string;
6
- readOnly: boolean;
7
- screenSessionRequested: boolean;
8
- remoteSessionTermsAcked?: boolean;
9
- }
10
- export declare const ESSRemoteSession: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>;
11
- export {};
12
- //# sourceMappingURL=ESSRemoteSession.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;IAChC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,gBAAgB,+EAmH3B,CAAC"}
@@ -1,48 +0,0 @@
1
- import { Button, Popover, Tooltip } from '@patternfly/react-core';
2
- import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
- import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
4
- import React, { forwardRef, useContext, useRef, useState } from 'react';
5
- import { useTranslation } from 'react-i18next';
6
- import { TnC } from '../../../constants/tncConstants';
7
- import { ESSRemoteSessionModal } from './ESSRemoteSessionModal';
8
- import { NewEssTermsModal } from './NewEssTermsModal';
9
- export const ESSRemoteSession = forwardRef((props, ref) => {
10
- const tooltipRef = useRef();
11
- const { t } = useTranslation();
12
- const canEditCase = useCanEditCase();
13
- const { caseNumber, caseStatus, screenSessionRequested, readOnly, remoteSessionTermsAcked } = props;
14
- const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
15
- const [openESSRemoteSessionModal, setOpenESSRemoteSessionModal] = useState(false);
16
- const [openNewESSRemoteSessionModal, setOpenNewESSRemoteSessionModal] = useState(false);
17
- // To toggle ESS RS Modal
18
- const toggleESSRemoteSessionModal = () => {
19
- if (canEditCase.alert())
20
- return;
21
- setOpenESSRemoteSessionModal((openESSRemoteSessionModal) => !openESSRemoteSessionModal);
22
- };
23
- // To toggle New ESS RS Modal
24
- const toggleNewESSRemoteSessionModal = () => {
25
- if (canEditCase.alert())
26
- return;
27
- setOpenNewESSRemoteSessionModal((openNewESSRemoteSessionModal) => !openNewESSRemoteSessionModal);
28
- };
29
- const termsAcked = remoteSessionTermsAcked && !screenSessionRequested;
30
- // ESS RS Aside Section Body
31
- const ESSRemoteSessionSectionBody = (React.createElement("div", { className: "card card-white card-support escalations", ref: ref },
32
- React.createElement("h3", { className: "card-heading pf-u-display-flex pf-u-justify-content-space-between" },
33
- t('Remote session'),
34
- React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('A remote session allows support engineers to view or access your computer to simplify collaboration and troubleshooting.'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
35
- React.createElement(InfoCircleIcon, null))),
36
- React.createElement("div", { className: "card-body" },
37
- React.createElement("p", null,
38
- React.createElement("strong", null, `${t('Red Hat may agree to remotely access your systems if:')}`)),
39
- React.createElement("ul", null,
40
- React.createElement("li", null, t(`Such access will help diagnose, debug or lead to the resolution of a software defect`)),
41
- React.createElement("li", null, t('Agreed upon by both Red Hat and you, the end user'))),
42
- React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
43
- screenSessionRequested && (React.createElement(Tooltip, { content: t('Remote session agreement has already been accepted.'), reference: tooltipRef, "aria-live": 'polite' })),
44
- React.createElement(Button, { "aria-label": screenSessionRequested ? t('Remote session requested') : t('Request remote session'), variant: screenSessionRequested ? 'primary' : 'secondary', onClick: termsAcked ? toggleESSRemoteSessionModal : toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: screenSessionRequested, ref: tooltipRef, isDisabled: screenSessionRequested }, screenSessionRequested ? t('Remote session requested') : t('Request remote session')))));
45
- return (React.createElement(React.Fragment, null,
46
- ESSRemoteSessionSectionBody,
47
- remoteSessionTermsAcked && !screenSessionRequested ? (React.createElement(ESSRemoteSessionModal, { caseNumber: caseNumber, caseStatus: caseStatus, screenSessionRequested: screenSessionRequested, show: openESSRemoteSessionModal, onClose: toggleESSRemoteSessionModal, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })) : (React.createElement(NewEssTermsModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openNewESSRemoteSessionModal, onClose: toggleNewESSRemoteSessionModal, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly }))));
48
- });
@@ -1,15 +0,0 @@
1
- import { IApiResponseDetails } from '@rh-support/types/shared';
2
- import { UserAuth } from '@rh-support/user-permissions';
3
- interface IProps {
4
- caseNumber: string;
5
- onClose?: () => void;
6
- loggedInUser: string;
7
- caseStatus: string;
8
- show: boolean;
9
- loggedInUserRights: IApiResponseDetails<UserAuth>;
10
- readOnly: boolean;
11
- screenSessionRequested: boolean;
12
- }
13
- export declare function ESSRemoteSessionModal(props: IProps): JSX.Element;
14
- export {};
15
- //# sourceMappingURL=ESSRemoteSessionModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAiBxD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,eAoKlD"}
@@ -1,108 +0,0 @@
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 { publicApi } from '@cee-eng/hydrajs';
11
- import { Button, ButtonVariant, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
12
- import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
13
- import { ToastNotification, useFetch } from '@rh-support/components';
14
- import React, { useState } from 'react';
15
- import { Trans, useTranslation } from 'react-i18next';
16
- import { useCaseDispatch } from '../../../context/CaseContext';
17
- import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
18
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
19
- import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
20
- import { checkForCaseStatusToggleOnAttachOrComment, setCaseDetails, updateCaseDetails, } from '../../../reducers/CaseReducer';
21
- export function ESSRemoteSessionModal(props) {
22
- const { t } = useTranslation();
23
- const caseDispatch = useCaseDispatch();
24
- const [agreeLoading, setAgreeLoading] = useState(false);
25
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
26
- propgateErrors: true,
27
- });
28
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
29
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
30
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
31
- // To handle modal cancel and close
32
- const onCancel = () => {
33
- props.onClose && props.onClose();
34
- };
35
- // Function to ack remote session terms and post comment
36
- const submitESSRemoteSessionRequest = () => __awaiter(this, void 0, void 0, function* () {
37
- const requestComment = t('Submitted a remote session request.');
38
- try {
39
- updateCaseDetails(caseDispatch, props.caseNumber, { screenSessionRequested: true });
40
- setCaseDetails(caseDispatch, {
41
- screenSessionRequested: true,
42
- });
43
- try {
44
- yield postCommentRequest({
45
- caseNumber: props.caseNumber,
46
- commentBody: requestComment,
47
- contentType: 'markdown',
48
- });
49
- updateDiscussionStateComments(dispatchDiscussion, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
50
- checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
51
- setAgreeLoading(false);
52
- ToastNotification.addSuccessMessage(t('Remote session has been requested successfully'), t('Red Hat will add a comment to your case to schedule your remote session.'));
53
- }
54
- catch (e) {
55
- ToastNotification.addWarningMessage(t('Could not submit a comment'), t('Rest assured, we have noted you have accepted the agreement'));
56
- setAgreeLoading(false);
57
- props.onClose();
58
- }
59
- props.onClose();
60
- }
61
- catch (e) {
62
- if (props.readOnly) {
63
- ToastNotification.addDangerMessage(t('You are not authorized to update this case.'));
64
- }
65
- else {
66
- ToastNotification.addDangerMessage(t('Could not submit a request for remote session'), t('Please try again.'));
67
- }
68
- setCaseDetails(caseDispatch, {
69
- screenSessionRequested: false,
70
- });
71
- setAgreeLoading(false);
72
- props.onClose();
73
- }
74
- });
75
- // To handle submit
76
- const onSubmit = () => {
77
- setAgreeLoading(true);
78
- submitESSRemoteSessionRequest();
79
- };
80
- // To check and if Request remote session button is loading
81
- const isAgreeLoading = agreeLoading || isPostingComment;
82
- // ESS RS Modal Actions
83
- const modalActions = [
84
- React.createElement(Button, { key: "submit", "aria-label": t('Request remote session'), variant: ButtonVariant.primary, onClick: onSubmit, "data-tracking-id": "ess-request-remote-session", isLoading: isAgreeLoading }, t('Request remote session')),
85
- React.createElement(Button, { key: "cancel", variant: "link", onClick: props.onClose }, t('Cancel')),
86
- ];
87
- const acceptedModalActions = [
88
- React.createElement(Button, { key: "cancel", variant: ButtonVariant.primary, onClick: props.onClose },
89
- React.createElement(Trans, null, "Close")),
90
- ];
91
- // Body of ESS Modal
92
- const ESSRemoteSessionModalBody = () => {
93
- return (React.createElement(React.Fragment, null,
94
- React.createElement("p", { className: "pf-u-mt-xs" },
95
- React.createElement(Trans, null, "To troubleshoot your problem, Red Hat support accesses your network or systems remotely."))));
96
- };
97
- const RequestedESSRemoteSessionModalBody = () => {
98
- return (React.createElement(React.Fragment, null,
99
- React.createElement("p", { className: "pf-u-mt-xs" },
100
- React.createElement(Trans, null, "Red Hat will add a comment to your case to schedule your remote session."))));
101
- };
102
- const essModalHeader = props.screenSessionRequested ? (React.createElement(React.Fragment, null,
103
- React.createElement(Title, { className: "pf-u-mb-xs", id: "modal-custom-header-label", headingLevel: "h1", size: TitleSizes['2xl'] },
104
- React.createElement(CheckCircleIcon, { color: "#3E8635", size: "lg", className: "pf-u-mr-md" }),
105
- t('Remote session has been requested')))) : (React.createElement(React.Fragment, null,
106
- React.createElement(Title, { className: "pf-u-mb-xs", id: "modal-custom-header-label", headingLevel: "h1", size: TitleSizes['2xl'] }, t('Request a remote session?'))));
107
- return (React.createElement(Modal, { variant: ModalVariant.small, id: "remote-session-agreement-modal", "aria-label": props.screenSessionRequested ? t('Remote session has been requested') : t('Request a remote session?'), header: essModalHeader, isOpen: props.show, onClose: onCancel, actions: props.screenSessionRequested ? acceptedModalActions : modalActions }, props.screenSessionRequested ? RequestedESSRemoteSessionModalBody() : ESSRemoteSessionModalBody()));
108
- }
@@ -1,17 +0,0 @@
1
- import { IApiResponseDetails } from '@rh-support/types/shared';
2
- import { UserAuth } from '@rh-support/user-permissions';
3
- interface IProps {
4
- caseNumber: string;
5
- onClose?: () => void;
6
- termsAcked?: boolean;
7
- siteCode: string;
8
- eventCode: string;
9
- loggedInUser: string;
10
- caseStatus: string;
11
- show: boolean;
12
- loggedInUserRights: IApiResponseDetails<UserAuth>;
13
- readOnly: boolean;
14
- }
15
- export declare function NewEssTermsModal(props: IProps): JSX.Element;
16
- export {};
17
- //# sourceMappingURL=NewEssTermsModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAaxD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eA8P7C"}
@@ -1,181 +0,0 @@
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 { publicApi } from '@cee-eng/hydrajs';
11
- import { Button, ButtonVariant, Checkbox, Modal, Select, SelectOption } from '@patternfly/react-core';
12
- import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
13
- import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
14
- import { ToastNotification, useFetch } from '@rh-support/components';
15
- import React, { useEffect, useState } from 'react';
16
- import { Trans, useTranslation } from 'react-i18next';
17
- import { useCaseDispatch } from '../../../context/CaseContext';
18
- import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
19
- import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
20
- import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
21
- import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetails } from '../../../reducers/CaseReducer';
22
- const getLocaleNameFromLocalCode = (localeCode) => {
23
- if ('Intl' in window && 'DisplayNames' in Intl) {
24
- try {
25
- const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
26
- // https://github.com/microsoft/TypeScript/issues/41338
27
- const langName = new Intl.DisplayNames([lang], { type: 'language' });
28
- const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
29
- return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
30
- }
31
- catch (e) {
32
- return localeCode;
33
- }
34
- }
35
- return localeCode;
36
- };
37
- export function NewEssTermsModal(props) {
38
- const { t } = useTranslation();
39
- const [isTermsChecked, setIsTermsChecked] = useState(false);
40
- const { request } = useFetch(publicApi.terms.getRequiredTerms);
41
- const [isLangSelectorDropdownOpen, setisLangSelectorDropdownOpen] = useState(false);
42
- const caseDispatch = useCaseDispatch();
43
- const [selectedTranslation, setSelectedTranslation] = useState({
44
- id: '5001',
45
- isDefault: false,
46
- localeCode: 'en_US',
47
- pdfDownloadUrl: '/wapps/tnc/viewterms/7275e6f5-5f32-4d9c-aeaf-c796b56817fd',
48
- termsPdfId: '7275e6f5-5f32-4d9c-aeaf-c796b56817fd',
49
- translatedDescription: 'Your acceptance of this Remote Access Rider is required when you request Red Hat’s support team to remotely access your network or systems. Remote access to your network or systems is not a standard Red Hat problem resolution process. Before Red Hat logs onto your systems to analyze your support issue, Red Hat needs your approval and authorization for such remote access.',
50
- translatedInstructions: 'Please read and accept the Remote Access Rider terms below to allow Red Hat to access your network or systems.',
51
- translatedTermsName: 'Remote Access Rider',
52
- });
53
- const [allTranslations, setAllTranslations] = useState({});
54
- const [agreeLoading, setAgreeLoading] = useState(false);
55
- useEffect(() => {
56
- const fetchTerms = () => __awaiter(this, void 0, void 0, function* () {
57
- try {
58
- const { siteCode, eventCode, loggedInUser } = props;
59
- const response = yield request(siteCode, eventCode, loggedInUser);
60
- let defaultTranslation = response[0].translations[0];
61
- const translationLangInfoMap = response[0].translations.reduce((allTranslationsmap, translation) => {
62
- if (translation.isDefault) {
63
- defaultTranslation = translation;
64
- }
65
- allTranslationsmap[translation['localeCode']] = translation;
66
- return allTranslationsmap;
67
- }, {});
68
- setSelectedTranslation(defaultTranslation);
69
- setAllTranslations(translationLangInfoMap);
70
- }
71
- catch (e) {
72
- console.log(e);
73
- }
74
- });
75
- fetchTerms();
76
- // eslint-disable-next-line react-hooks/exhaustive-deps
77
- }, []);
78
- const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
79
- propgateErrors: true,
80
- });
81
- const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
82
- const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
83
- const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
84
- // To handle modal cancel and close
85
- const onCancel = () => {
86
- props.onClose && props.onClose();
87
- };
88
- // Function to ack remote session terms and post comment
89
- const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
90
- const requestComment = t('Submitted a remote session request.');
91
- try {
92
- yield updateCaseDetails(caseDispatch, props.caseNumber, { remoteSessionTermsAcked: true });
93
- try {
94
- yield updateCaseDetails(caseDispatch, props.caseNumber, { screenSessionRequested: true });
95
- try {
96
- yield postCommentRequest({
97
- caseNumber: props.caseNumber,
98
- commentBody: requestComment,
99
- contentType: 'markdown',
100
- });
101
- updateDiscussionStateComments(dispatchDiscussion, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
102
- checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
103
- setAgreeLoading(false);
104
- props.onClose();
105
- ToastNotification.addSuccessMessage(t('Remote session has been requested successfully'), t('Red Hat will add a comment to your case to schedule your remote session.'));
106
- }
107
- catch (e) {
108
- ToastNotification.addWarningMessage(t('Could not submit a comment'), t('Rest assured, we have noted you have accepted the agreement'));
109
- setAgreeLoading(false);
110
- props.onClose();
111
- }
112
- props.onClose();
113
- }
114
- catch (e) {
115
- yield updateCaseDetails(caseDispatch, props.caseNumber, { screenSessionRequested: false });
116
- ToastNotification.addDangerMessage(t('Could not submit a request for remote session'), t('Please try again.'));
117
- props.onClose();
118
- }
119
- }
120
- catch (e) {
121
- if (props.readOnly) {
122
- ToastNotification.addDangerMessage(t('You are not authorized to update this case.'));
123
- }
124
- else {
125
- ToastNotification.addDangerMessage(t('Could not accept the remote access rider agreement'), t('Please try again.'));
126
- }
127
- setAgreeLoading(false);
128
- setIsTermsChecked(false);
129
- props.onClose();
130
- }
131
- });
132
- // To handle submit
133
- const onSubmit = () => {
134
- setAgreeLoading(true);
135
- submitRemoteSessionAgreement(selectedTranslation.termsPdfId);
136
- };
137
- // Handle terms checkbox
138
- const onCheckBoxChange = (value) => {
139
- setIsTermsChecked(value);
140
- };
141
- // Handle language change
142
- const onLangChange = (event, lang) => {
143
- setSelectedTranslation(allTranslations[lang]);
144
- setisLangSelectorDropdownOpen(false);
145
- };
146
- // To handle dropdown toggle
147
- const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
148
- // To check and if I agree button is loading
149
- const isAgreeLoading = agreeLoading || isPostingComment;
150
- // ESS RSA Modal Actions
151
- const modalActions = [
152
- React.createElement(Button, { key: "submit", "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: onSubmit, "data-tracking-id": "remote-session-agreement-check", isLoading: isAgreeLoading, isDisabled: !isTermsChecked || isAgreeLoading }, t('I agree')),
153
- ];
154
- // Body of ESS RSA Modal
155
- const EssRSAModalBody = () => {
156
- return (React.createElement(React.Fragment, null,
157
- React.createElement("p", { className: "pf-u-mt-xs" },
158
- React.createElement(Trans, null,
159
- "Your acceptance of this Remote Access Rider is required ",
160
- React.createElement("strong", null, "for each case"),
161
- " when you request Red Hat\u2019s support team to directly access your network or systems.")),
162
- React.createElement("p", { className: "pf-u-mt-md" },
163
- React.createElement(Trans, null, "Remote access to your network or systems is not a standard Red Hat problem resolution process. Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access.")),
164
- React.createElement("p", { className: "pf-u-mt-md" },
165
- React.createElement(Trans, null, "Please read and accept the Remote Access Rider terms below to allow Red Hat to access your network or systems.")),
166
- React.createElement("div", null,
167
- React.createElement(Select, { className: "pf-u-mt-md", "aria-label": t('Select language'), id: "terms-language-selector", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle, width: 350 }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option))))),
168
- React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-u-ml-md", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
169
- t('Download'),
170
- " ",
171
- React.createElement(DownloadIcon, { className: "pf-u-ml-xs" }))),
172
- React.createElement("div", null,
173
- React.createElement(Checkbox, { className: "pf-u-mt-md rsa-checkbox", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
174
- React.createElement(Trans, null, "I have read and agree to the"),
175
- ' ',
176
- React.createElement("a", { className: "pf-c-button pf-m-link pf-m-inline align-link-items", rel: "noopener noreferrer", target: "_blank", href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": "case-details-request-remote-session-terms" },
177
- React.createElement(Trans, null, "terms "),
178
- React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
179
- };
180
- return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": t('Remote Session Agreement'), title: t('Remote Session Agreement'), isOpen: props.show, onClose: onCancel, actions: modalActions }, EssRSAModalBody()));
181
- }
@@ -1,3 +0,0 @@
1
- declare const ESSRemoteSessionCheck: () => JSX.Element;
2
- export default ESSRemoteSessionCheck;
3
- //# sourceMappingURL=ESSRemoteSessionCheckBox.d.ts.map