@rh-support/react-context 0.2.82 → 0.2.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"HostnameAwarenessModal.d.ts","sourceRoot":"","sources":["../../../../src/components/HostnameAwarenessModal/HostnameAwarenessModal.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAWtC,eAAO,MAAM,sBAAsB,mBAmIlC,CAAC"}
1
+ {"version":3,"file":"HostnameAwarenessModal.d.ts","sourceRoot":"","sources":["../../../../src/components/HostnameAwarenessModal/HostnameAwarenessModal.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAatC,eAAO,MAAM,sBAAsB,mBAkJlC,CAAC"}
@@ -9,10 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import './hostnameAwarenessModal.css';
11
11
  import { accounts } from '@cee-eng/hydrajs';
12
- import { Button, Checkbox, Modal, ModalVariant, Switch } from '@patternfly/react-core';
12
+ import { Button, Checkbox, Modal, ModalVariant, Switch, Tooltip } from '@patternfly/react-core';
13
+ import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
13
14
  import { useFetch } from '@rh-support/components';
14
15
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
15
16
  import React, { useEffect, useState } from 'react';
17
+ import { Trans } from 'react-i18next';
16
18
  import { useGlobalStateContext } from '../../context/GlobalMetadataContext';
17
19
  import { useUserPreferences } from '../../hooks';
18
20
  export const HostnameAwarenessModal = () => {
@@ -81,9 +83,15 @@ export const HostnameAwarenessModal = () => {
81
83
  console.log(error);
82
84
  }
83
85
  };
86
+ const shareHostnamesClarificationCopy = (React.createElement("div", null,
87
+ "This is ",
88
+ React.createElement("b", null, "not required"),
89
+ ". We will not capture any information unless you choose to opt in."));
84
90
  const modalBody = () => {
85
91
  return (React.createElement(React.Fragment, null,
86
- React.createElement(Switch, { label: "Share hostnames with support", isChecked: isHostnamesChecked, onChange: onHostnameSwitchChange })));
92
+ React.createElement(Switch, { label: "Share hostnames with support", isChecked: isHostnamesChecked, onChange: onHostnameSwitchChange, className: "push-top-narrow" }),
93
+ React.createElement(Tooltip, { content: shareHostnamesClarificationCopy, position: "right" },
94
+ React.createElement(InfoIcon, { className: "pf-u-ml-sm hostnameInfoIcon" }))));
87
95
  };
88
96
  //Do not show modal if user cannot share hostnames.
89
97
  const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
@@ -95,11 +103,12 @@ export const HostnameAwarenessModal = () => {
95
103
  return React.createElement(React.Fragment, null);
96
104
  }
97
105
  return (React.createElement(React.Fragment, null,
98
- React.createElement(Modal, { variant: ModalVariant.medium, title: "Hostname Visibility", isOpen: isModalOpen, onClose: onCloseModal, actions: [
106
+ React.createElement(Modal, { variant: ModalVariant.medium, title: "Share hostnames with Red Hat?", isOpen: isModalOpen, onClose: onCloseModal, actions: [
99
107
  React.createElement(Button, { "data-tracking-id": "close-hostname-modal", key: "close", variant: "primary", onClick: onCloseModal }, "Close"),
100
108
  React.createElement("div", { className: "dontAskCheckbox" },
101
109
  React.createElement(Checkbox, { label: "Don't ask me again", id: "dont-ask-again", "data-tracking-id": "dont-ask-again-hostname-modal", onClick: onDoNotAskAgain })),
102
110
  ] },
103
- "Share hostnames with our support professionals for a smoother experience.",
111
+ React.createElement("div", null,
112
+ React.createElement(Trans, null, "Support does not have access to view hostnames that have been entered on a case. You can choose to share hostnames at any time for a smoother support experience.")),
104
113
  modalBody())));
105
114
  };
@@ -1,3 +1,8 @@
1
1
  div.dontAskCheckbox div.pf-c-check label.pf-c-check__label {
2
2
  line-height: 1;
3
3
  }
4
+
5
+ svg.hostnameInfoIcon {
6
+ vertical-align: -0.65rem !important;
7
+ margin-left: -0.45rem !important;
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/react-context",
3
- "version": "0.2.82",
3
+ "version": "0.2.85",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -46,7 +46,7 @@
46
46
  "@patternfly/react-core": "4.202.16",
47
47
  "@patternfly/react-icons": "4.53.16",
48
48
  "@rh-support/api": "0.3.24",
49
- "@rh-support/components": "1.1.76",
49
+ "@rh-support/components": "1.1.79",
50
50
  "@rh-support/types": "0.2.0",
51
51
  "@rh-support/user-permissions": "0.2.63",
52
52
  "@rh-support/utils": "0.2.46",
@@ -89,5 +89,5 @@
89
89
  "not ie <= 11",
90
90
  "not op_mini all"
91
91
  ],
92
- "gitHead": "1359173d6efb7ece2bd1d0760c001e053bc29893"
92
+ "gitHead": "acb137236b62e31aba70cda91755b3b94f0cb7da"
93
93
  }