@rh-support/troubleshoot 2.6.31 → 2.6.33
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/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +0 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +18 -20
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +4 -3
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +10 -17
- package/lib/esm/css/case.css +27 -6
- package/lib/esm/scss/_main.scss +4 -0
- package/lib/esm/scss/_pf-overrides.scss +5 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBAoN1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -100,7 +100,6 @@ function RHAssociatesSelector(props) {
|
|
|
100
100
|
onNotifiedUserChange([Object.assign(Object.assign({}, loggedInUser.data), { accountNumber: loggedInUserRights.data.getAccountNumber() })], true);
|
|
101
101
|
});
|
|
102
102
|
const removeCurrentUser = () => {
|
|
103
|
-
console.log(isCurrentUserSelectedInternalNotifiedUser());
|
|
104
103
|
if (isCurrentUserSelectedInternalNotifiedUser()) {
|
|
105
104
|
onNotifiedUserChange(filter(selectedNotificationContacts, (contact) => contact.ssoUsername !== loggedInUser.data.ssoUsername));
|
|
106
105
|
}
|
package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddCustomEmailToAccountModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddCustomEmailToAccountModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AACD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,qBA+GpD"}
|
|
@@ -8,11 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { customEmail } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalFooter, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, TextInput, ValidatedOptions, } from '@patternfly/react-core';
|
|
12
12
|
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
14
|
import React, { useState } from 'react';
|
|
15
|
-
import {
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
16
16
|
export function AddCustomEmailToAccount(props) {
|
|
17
17
|
const { t } = useTranslation();
|
|
18
18
|
const { request, isFetching } = useFetch(customEmail.addCustomEmailToAccount, { propgateErrors: true });
|
|
@@ -45,23 +45,21 @@ export function AddCustomEmailToAccount(props) {
|
|
|
45
45
|
: isEmpty(firstName.trim())
|
|
46
46
|
? ValidatedOptions.error
|
|
47
47
|
: ValidatedOptions.default;
|
|
48
|
-
return (React.createElement(Modal, {
|
|
49
|
-
React.createElement(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
React.createElement(
|
|
53
|
-
React.createElement(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
React.createElement(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
return (React.createElement(Modal, { isOpen: true, onClose: handleClose, variant: ModalVariant.medium, "aria-labelledby": "add-email-modal-title", "aria-describedby": "add-email-modal-body" },
|
|
49
|
+
React.createElement(ModalHeader, { title: t('Add a notification email to your account'), labelId: "add-email-modal-title" }),
|
|
50
|
+
React.createElement(ModalBody, { id: "add-email-modal-body" },
|
|
51
|
+
React.createElement("p", { className: "pf-v6-u-mb-md" }, t('Note: This email will be added at an account level, not a case level.')),
|
|
52
|
+
React.createElement(Form, null,
|
|
53
|
+
React.createElement(FormGroup, { label: t('New email address'), fieldId: "custom-email-address", isRequired: true },
|
|
54
|
+
React.createElement(TextInput, { id: "custom-email", isDisabled: true, value: props.customEmailAddress, isRequired: true, "aria-label": t('New email address') })),
|
|
55
|
+
React.createElement(FormGroup, { label: t('First name'), fieldId: "custom-email-firstName", isRequired: true },
|
|
56
|
+
React.createElement(TextInput, { id: "custom-email-firstName", value: firstName, isRequired: true, type: "text", validated: firstNameValidated, onChange: (_event, firstName) => onFirstNameChange(firstName), "aria-label": t('First name'), placeholder: t('First name'), maxLength: 254 }),
|
|
57
|
+
firstNameValidated === ValidatedOptions.error && (React.createElement(FormHelperText, null,
|
|
58
|
+
React.createElement(HelperText, null,
|
|
59
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('First name cannot be empty')))))),
|
|
60
|
+
React.createElement(FormGroup, { label: t('Last name'), fieldId: "custom-email-lastName" },
|
|
61
|
+
React.createElement(TextInput, { id: "custom-email-lastName", value: lastName, type: "text", onChange: (_event, lastName) => onLastNameChange(lastName), "aria-label": t('Last name'), placeholder: t('Last name'), maxLength: 254 })))),
|
|
62
62
|
React.createElement(ModalFooter, null,
|
|
63
|
-
React.createElement(Button, {
|
|
64
|
-
|
|
65
|
-
React.createElement(Button, { key: "cancel", variant: "link", onClick: handleClose, isDisabled: isFetching },
|
|
66
|
-
React.createElement(Trans, null, "Cancel")))));
|
|
63
|
+
React.createElement(Button, { key: "confirm", variant: ButtonVariant.primary, onClick: onAdd, isDisabled: isFetching || (isSaveButtonClicked && isEmpty(firstName.trim())), spinnerAriaValueText: isFetching ? t('Loading') : undefined, isLoading: isFetching }, t('Add to account')),
|
|
64
|
+
React.createElement(Button, { key: "cancel", variant: ButtonVariant.link, onClick: handleClose, isDisabled: isFetching }, t('Cancel')))));
|
|
67
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/CaseContactSelector.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAgBvE,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAsdzC;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -16,7 +16,6 @@ import difference from 'lodash/difference';
|
|
|
16
16
|
import differenceBy from 'lodash/differenceBy';
|
|
17
17
|
import filter from 'lodash/filter';
|
|
18
18
|
import find from 'lodash/find';
|
|
19
|
-
import intersection from 'lodash/intersection';
|
|
20
19
|
import isEmpty from 'lodash/isEmpty';
|
|
21
20
|
import isEqual from 'lodash/isEqual';
|
|
22
21
|
import map from 'lodash/map';
|
|
@@ -128,7 +127,7 @@ function CaseContactSelector(props) {
|
|
|
128
127
|
});
|
|
129
128
|
const processCustomEmails = (selectedCustomEmails) => __awaiter(this, void 0, void 0, function* () {
|
|
130
129
|
const currentEmails = customEmailsList.data.map((item) => item.emailAddress);
|
|
131
|
-
const toRemoveEmails =
|
|
130
|
+
const toRemoveEmails = difference(currentEmails, selectedCustomEmails);
|
|
132
131
|
const toAddEmails = difference(selectedCustomEmails, currentEmails);
|
|
133
132
|
(toAddEmails.length || toRemoveEmails.length) && clearErrorState();
|
|
134
133
|
if ((toAddEmails || []).length > 0) {
|
|
@@ -247,7 +246,9 @@ function CaseContactSelector(props) {
|
|
|
247
246
|
return false;
|
|
248
247
|
};
|
|
249
248
|
const clearNonOrgTypeahead = () => {
|
|
250
|
-
|
|
249
|
+
if (nonOrgTypeaheadRef.current) {
|
|
250
|
+
nonOrgTypeaheadRef.current.value = '';
|
|
251
|
+
}
|
|
251
252
|
};
|
|
252
253
|
const clearErrorState = () => {
|
|
253
254
|
showGroupPermissionError && setShowGroupPermissionError(false);
|
package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAyMxD"}
|
|
@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
21
|
import { accounts } from '@cee-eng/hydrajs';
|
|
22
|
-
import { Button, Flex, FlexItem, Label, LabelGroup, Menu, MenuContent, MenuItem, MenuList, Popper,
|
|
22
|
+
import { Button, Flex, FlexItem, Label, LabelGroup, Menu, MenuContent, MenuItem, MenuList, Popper, TextInputGroup, TextInputGroupMain, } from '@patternfly/react-core';
|
|
23
23
|
import { getHydraContactLabel, useFetch } from '@rh-support/components';
|
|
24
24
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
25
25
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -42,7 +42,7 @@ const CustomHighlighter = ({ search, children }) => {
|
|
|
42
42
|
return React.createElement(React.Fragment, null, children);
|
|
43
43
|
const regex = new RegExp(`(${search})`, 'gi');
|
|
44
44
|
const parts = children.split(regex);
|
|
45
|
-
return (React.createElement(React.Fragment, null, parts.map((part, index) => regex.test(part) ? (React.createElement("mark", { key: index, style: { backgroundColor: '#
|
|
45
|
+
return (React.createElement(React.Fragment, null, parts.map((part, index) => regex.test(part) ? (React.createElement("mark", { key: index, style: { backgroundColor: '#FFF3CD' } }, part)) : (part))));
|
|
46
46
|
};
|
|
47
47
|
export function NonOrgCaseNotifyeesSelector(props) {
|
|
48
48
|
const [inputVal, setInputVal] = useState('');
|
|
@@ -84,11 +84,7 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
84
84
|
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
85
85
|
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
86
86
|
});
|
|
87
|
-
setNotifyeesList([
|
|
88
|
-
...mappedContacts,
|
|
89
|
-
{ emailAddress: notificationAddress.email, caseNumber: '' },
|
|
90
|
-
]);
|
|
91
|
-
setIsDropdownOpen(true);
|
|
87
|
+
setNotifyeesList([...mappedContacts, { emailAddress: notificationAddress.email }]);
|
|
92
88
|
}
|
|
93
89
|
else {
|
|
94
90
|
if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
|
|
@@ -140,11 +136,11 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
140
136
|
const renderSelectedItems = () => {
|
|
141
137
|
if (props.selectedItems.length === 0)
|
|
142
138
|
return null;
|
|
143
|
-
return (React.createElement(LabelGroup, {
|
|
139
|
+
return (React.createElement(LabelGroup, { "aria-label": "Selected contacts" }, props.selectedItems.map((option, index) => {
|
|
144
140
|
const isContactOption = isContact(option);
|
|
145
141
|
const isCurrentUserCaseContact = isContactOption && option.ssoUsername === props.contactSsoUsername;
|
|
146
142
|
const isDisabled = (props.isChipDisabled && isContactOption) || isCurrentUserCaseContact;
|
|
147
|
-
return (React.createElement(Label, { key: getKey(option) || index, onClose: () => onRemoveItem(option), isDisabled: isDisabled, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline" }, getHydraContactLabel(option)));
|
|
143
|
+
return (React.createElement(Label, { key: getKey(option) || index, onClose: () => onRemoveItem(option), isDisabled: isDisabled, closeBtnAriaLabel: `Remove ${getHydraContactLabel(option)}`, variant: "outline", color: "blue" }, getHydraContactLabel(option)));
|
|
148
144
|
})));
|
|
149
145
|
};
|
|
150
146
|
const menu = (React.createElement(Menu, { ref: menuRef },
|
|
@@ -154,16 +150,13 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
154
150
|
return (React.createElement(Flex, null,
|
|
155
151
|
React.createElement(FlexItem, { grow: { sm: 'grow' } },
|
|
156
152
|
React.createElement("div", null,
|
|
157
|
-
renderSelectedItems(),
|
|
158
153
|
React.createElement(Flex, null,
|
|
159
154
|
React.createElement(FlexItem, { grow: { sm: 'grow' } },
|
|
160
|
-
React.createElement(Popper, { trigger: React.createElement(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
React.createElement(Trans, null, "Enter an email address or username for the person you want to notify"))),
|
|
166
|
-
React.createElement("p", { className: "pf-v6-c-form__helper-text pf-m-error", style: { color: '#c9190b' } },
|
|
155
|
+
React.createElement(Popper, { trigger: React.createElement(TextInputGroup, null,
|
|
156
|
+
React.createElement(TextInputGroupMain, { ref: inputRef, id: props.id, "data-tracking-id": props.dataTrackingId, value: inputVal, onChange: (_, value) => onInputChange(value), placeholder: props.placeholder, disabled: props.isDisabled || isFetching, onBlur: onBlur }, renderSelectedItems())), popper: menu, isVisible: isDropdownOpen && notifyeesList.length > 0, position: "start" })),
|
|
157
|
+
React.createElement(Button, { variant: "primary", onClick: onAddClick, isLoading: props.isDisabled || isFetching, spinnerAriaValueText: props.isDisabled ? 'Loading' : undefined, isDisabled: !(inputVal || '').trim() || props.isDisabled || isFetching, "data-tracking-id": `${props.dataTrackingId}-add-btn`, className: "send-notifications-add" },
|
|
158
|
+
React.createElement(Trans, null, "Add")))),
|
|
159
|
+
React.createElement("p", { className: "pf-v6-c-form__helper-text pf-m-error", style: { color: '#C9190B' } },
|
|
167
160
|
showGroupPermissionError && (React.createElement(Trans, null,
|
|
168
161
|
inputVal,
|
|
169
162
|
" was not found under the selected group. Please contact your Org Admin to add them to this group.")),
|
package/lib/esm/css/case.css
CHANGED
|
@@ -177,15 +177,36 @@ button,
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
.clipboard-wrapper {
|
|
180
|
+
display: flex;
|
|
180
181
|
position: relative;
|
|
181
182
|
}
|
|
182
183
|
|
|
183
|
-
.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
.clipboard-wrapper svg {
|
|
185
|
+
color: var(--pf-t--global--text--color--link--default);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.clipboard-wrapper :first-child {
|
|
189
|
+
white-space: nowrap;
|
|
190
|
+
overflow: hidden;
|
|
191
|
+
text-overflow: ellipsis;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.helper-text-size {
|
|
195
|
+
font-size: var(--pf-t--global--font--size--100);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.label-text-size {
|
|
199
|
+
font-size: var(--pf-t--global--font--size--300);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.request-collaboration-input {
|
|
203
|
+
background-color: var(--pf-t--global--background--color--200);
|
|
204
|
+
border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--100);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.copy-button {
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
189
210
|
}
|
|
190
211
|
|
|
191
212
|
.clip-code-raw-btn {
|
package/lib/esm/scss/_main.scss
CHANGED
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.pf-v6-c-alert {
|
|
110
|
+
margin-top: 24px;
|
|
110
111
|
.pf-v6-c-alert__title {
|
|
111
112
|
font-weight: 600 !important;
|
|
112
113
|
font-size: 15px;
|
|
@@ -330,6 +331,10 @@
|
|
|
330
331
|
color: var(--pf-v6-c-button--Color);
|
|
331
332
|
}
|
|
332
333
|
|
|
334
|
+
.pf-m-aria-disabled {
|
|
335
|
+
color: var(--pf-v6-c-button--disabled--Color) !important;
|
|
336
|
+
}
|
|
337
|
+
|
|
333
338
|
// Override disable color on darker backgrounds
|
|
334
339
|
.case-overview-secondary,
|
|
335
340
|
#review {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.33",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -134,5 +134,5 @@
|
|
|
134
134
|
"defaults and supports es6-module",
|
|
135
135
|
"maintained node versions"
|
|
136
136
|
],
|
|
137
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "f69973584d77efaa8fb77808e43757b074e50dc6"
|
|
138
138
|
}
|