@rh-support/troubleshoot 2.6.32 → 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/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +18 -20
- 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/scss/_main.scss +4 -0
- package/lib/esm/scss/_pf-overrides.scss +5 -0
- package/package.json +2 -2
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
|
}
|
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/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
|
}
|