@rh-support/manage 0.3.4 → 0.3.7

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":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"AAeA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA2KhD"}
1
+ {"version":3,"file":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"AAeA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAwLhD"}
@@ -28,6 +28,7 @@ export function PreferencesCaseView(props) {
28
28
  const [originalCommentType, setOriginalCommentType] = useState('');
29
29
  const [originalCommentSignature, setOriginalCommentSignature] = useState('');
30
30
  const [commentValidated, setCommentValidated] = useState('default');
31
+ const [isHostnamesLoading, setIsHostnamesLoading] = useState(true);
31
32
  const [isCommentSignatureLoading, setIsCommentSignatureLoading] = useState(false);
32
33
  const commentTypes = [EditorMode.PLAIN, EditorMode.MARKDOWN];
33
34
  const userOriginalCommentType = () => __awaiter(this, void 0, void 0, function* () {
@@ -84,7 +85,7 @@ export function PreferencesCaseView(props) {
84
85
  });
85
86
  const titleId = 'default-comment-preference-select';
86
87
  const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
87
- const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
88
+ const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
88
89
  const { request: fetchHostnameDefault } = useFetch(accounts.getIsSharingHostname);
89
90
  const accountNumber = loggedInUsersAccount.data.accountNumber;
90
91
  const { request: updateShareHostnames } = useFetch(accounts.updateIsSharingHostname);
@@ -99,19 +100,22 @@ export function PreferencesCaseView(props) {
99
100
  catch (error) {
100
101
  console.log(error);
101
102
  }
103
+ setIsHostnamesLoading(false);
102
104
  });
103
105
  }
104
- !loggedInUserRights.data.isInternal && userOriginalHostnameValue();
106
+ canUseHostName && userOriginalHostnameValue();
105
107
  // eslint-disable-next-line react-hooks/exhaustive-deps
106
108
  }, []);
107
109
  const onShareHostNamesSwitch = () => __awaiter(this, void 0, void 0, function* () {
108
110
  try {
111
+ setIsHostnamesLoading(true);
109
112
  yield updateShareHostnames(!isSharingHostNames, accountNumber);
110
113
  setIsSharingHostNames(!isSharingHostNames);
111
114
  }
112
115
  catch (error) {
113
116
  console.log(error);
114
117
  }
118
+ setIsHostnamesLoading(false);
115
119
  });
116
120
  const prefHostnameCopy = 'Red Hat Support cannot currently access hostnames that have been entered on a case. You can share this information at any time to improve your support experience.';
117
121
  return (React.createElement(Card, { className: "preference-card" },
@@ -136,5 +140,6 @@ export function PreferencesCaseView(props) {
136
140
  React.createElement(PreferenceSwitch, { className: "switches hostnameSwitch", id: "share-hostnames-switch", label: 'Share hostnames', isChecked: isSharingHostNames, onSwitchChange: onShareHostNamesSwitch }),
137
141
  React.createElement("div", { className: "prefhostnameTooltip" },
138
142
  React.createElement(Tooltip, { content: prefHostnameCopy, position: "right" },
139
- React.createElement(InfoIcon, { className: "pf-u-ml-sm" }))))))))));
143
+ React.createElement(InfoIcon, { className: "pf-u-ml-sm" })),
144
+ isHostnamesLoading && (React.createElement(Spinner, { isSVG: true, size: "lg", className: "pf-u-ml-sm hostnameSpinner", "aria-label": "Hostname loading" }))))))))));
140
145
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MajorVersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/MajorVersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAWA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAMhE,OAAO,EAAE,oBAAoB,EAAwB,MAAM,qCAAqC,CAAC;AAIjG,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAAC,MAAM,CA6ErD,CAAC"}
1
+ {"version":3,"file":"MajorVersionPerformanceMetrics.d.ts","sourceRoot":"","sources":["../../../../../src/components/TopContentManagement/ContentUsage/MajorVersionPerformanceMetrics.tsx"],"names":[],"mappings":"AAWA,OAAc,EAAE,EAAE,EAAgC,MAAM,OAAO,CAAC;AAMhE,OAAO,EAAE,oBAAoB,EAAwB,MAAM,qCAAqC,CAAC;AAIjG,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,8BAA8B,EAAE,EAAE,CAAC,MAAM,CA8ErD,CAAC"}
@@ -26,7 +26,7 @@ export const MajorVersionPerformanceMetrics = ({ isModalOpen, onHideModal, filte
26
26
  };
27
27
  return (React.createElement(Modal, { variant: ModalVariant.large, id: "top-content-major-version-performance-metric", "aria-label": "top-content-performance-metric", isOpen: isModalOpen, onClose: onModalClose, actions: [
28
28
  React.createElement(Button, { variant: ButtonVariant.secondary, key: "close-button", onClick: onModalClose }, "Cancel"),
29
- ] },
29
+ ], className: "performance-metrics-modal" },
30
30
  React.createElement("div", { className: "sticky-header" },
31
31
  React.createElement(Title, { headingLevel: "h1", size: TitleSizes['2xl'] },
32
32
  React.createElement(Trans, null, " Performance metrics ")),
@@ -303,3 +303,7 @@ div label.hostnameSwitch {
303
303
  div.prefhostnameTooltip {
304
304
  margin-left: 11.25rem !important;
305
305
  }
306
+
307
+ svg.hostnameSpinner {
308
+ vertical-align: -0.65rem !important;
309
+ }
@@ -65,3 +65,25 @@ div#top-content-major-version-performance-metric.pf-c-modal-box {
65
65
  }
66
66
  }
67
67
  }
68
+
69
+ // Overrides performance metrics modal font weight
70
+ div.performance-metrics-modal {
71
+ div.pf-c-modal-box__body {
72
+ div.sticky-header {
73
+ div.pf-l-flex.pf-m-justify-content-space-between {
74
+ // For versions dropdown
75
+ div.pf-u-w-50.pf-u-pr-md {
76
+ div.pf-u-font-weight-bold {
77
+ font-weight: 600 !important;
78
+ }
79
+ }
80
+ // For categories dropdown
81
+ div.pf-u-w-50.pf-u-pl-md {
82
+ div.pf-u-font-weight-bold {
83
+ font-weight: 600 !important;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "0.3.4",
3
+ "version": "0.3.7",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -94,12 +94,12 @@
94
94
  "@patternfly/pfe-tabs": "1.12.3",
95
95
  "@patternfly/react-core": "4.202.16",
96
96
  "@patternfly/react-table": "4.71.16",
97
- "@rh-support/components": "1.1.83",
98
- "@rh-support/configs": "0.2.8",
99
- "@rh-support/react-context": "0.3.3",
97
+ "@rh-support/components": "1.1.84",
98
+ "@rh-support/configs": "0.2.9",
99
+ "@rh-support/react-context": "0.3.5",
100
100
  "@rh-support/types": "0.2.0",
101
- "@rh-support/user-permissions": "0.2.67",
102
- "@rh-support/utils": "0.2.49",
101
+ "@rh-support/user-permissions": "0.2.68",
102
+ "@rh-support/utils": "0.2.50",
103
103
  "@types/react-beautiful-dnd": "^13.0.0",
104
104
  "i18next": ">=17.0.1",
105
105
  "lodash": ">=4.17.15",
@@ -109,5 +109,5 @@
109
109
  "react-i18next": ">=10.11.0",
110
110
  "react-router-dom": ">=5.1.2"
111
111
  },
112
- "gitHead": "8ad6dda321ad690b179be7346240345a57f1749b"
112
+ "gitHead": "d1025a2463c9e2bac873dd764a02518fbb5b5e47"
113
113
  }