@rh-support/troubleshoot 0.3.0 → 0.3.3

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 (29) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +2 -4
  3. package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.js +3 -4
  5. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +1 -1
  6. package/lib/esm/components/CaseInformation/Description.d.ts.map +1 -1
  7. package/lib/esm/components/CaseInformation/Description.js +14 -9
  8. package/lib/esm/components/CaseInformation/Fts.js +1 -1
  9. package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
  10. package/lib/esm/components/CaseManagement/Cep.js +31 -40
  11. package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
  12. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +1 -1
  13. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
  14. package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +3 -3
  15. package/lib/esm/components/ImproveCase/KtQuestions.d.ts.map +1 -1
  16. package/lib/esm/components/ImproveCase/KtQuestions.js +33 -21
  17. package/lib/esm/components/Issue/Issue.d.ts.map +1 -1
  18. package/lib/esm/components/Issue/Issue.js +6 -5
  19. package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +1 -1
  20. package/lib/esm/components/SessionRestore/SessionItem.js +1 -1
  21. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  22. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  23. package/lib/esm/components/SubmitCase/SubmitCase.js +2 -3
  24. package/lib/esm/components/shared/Constants.d.ts +4 -0
  25. package/lib/esm/components/shared/Constants.d.ts.map +1 -1
  26. package/lib/esm/components/shared/Constants.js +9 -4
  27. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  28. package/lib/esm/reducers/CaseHelpers.js +1 -2
  29. package/package.json +11 -13
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/AccountSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAKnC,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAarE,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,eAAO,MAAM,YAAY,EAAE,MAG1B,CAAC;AAEF,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAyIrC;kBAzIQ,eAAe;;;AA6IxB,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"AccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/AccountSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAKnC,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAYrE,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,eAAO,MAAM,YAAY,EAAE,MAG1B,CAAC;AAEF,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA6HrC;kBA7HQ,eAAe;;;AAiIxB,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -2,7 +2,6 @@ import './css/accountSelector.css';
2
2
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
3
3
  import { AccountSelectorInternal, GlobalMetadataStateContext } from '@rh-support/react-context';
4
4
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
5
- import { getConfigField, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
6
5
  import isArray from 'lodash/isArray';
7
6
  import isEmpty from 'lodash/isEmpty';
8
7
  import isEqual from 'lodash/isEqual';
@@ -23,14 +22,13 @@ function AccountSelector(props) {
23
22
  }), isEqual);
24
23
  const isSelectedAccountSubscriptionAbused = ((_a = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _a === void 0 ? void 0 : _a.subscriptionAbuse) || false;
25
24
  const caseDispatch = useCaseDispatch();
26
- const { globalMetadataState: { pcmConfig, bookmarkedAccounts, bookmarkedGroupAccounts, loggedInUserRights, managedAccounts, loggedInUsersAccount, }, } = useContext(GlobalMetadataStateContext);
25
+ const { globalMetadataState: { bookmarkedGroupAccounts, loggedInUserRights, managedAccounts, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
27
26
  const { t } = useTranslation();
28
27
  /** Various Abilities */
29
28
  const ability = useContext(AbilityContext);
30
29
  const canAccessManagedAccounts = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.MANAGED_ACCOUNTS);
31
30
  const canBookmarkAccounts = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.BOOKMARK_ACCOUNTS);
32
31
  const canUseFindMyAccount = loggedInUserRights.data.isAccountDifferentFromLoggedInAccount(accountNumber);
33
- const isGroupBookmarkEnabled = getConfigField(pcmConfig.data, 'isGroupBookmarkEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
34
32
  //
35
33
  const onAccountChange = (account) => {
36
34
  if (selectedAccountDetails.data.accountNumber === account.accountNumber)
@@ -74,7 +72,7 @@ function AccountSelector(props) {
74
72
  canUseFindMyAccount && (React.createElement("button", { role: "link", className: "btn btn-link btn-app find-my-account pf-u-ml-auto", onClick: onFindMyAccountClick, disabled: selectedAccountDetails.isFetching, "data-tracking-id": "open-case-find-my-account" },
75
73
  React.createElement(Trans, null, "Find my account")))),
76
74
  React.createElement("div", { className: "account-selector-wrapper" },
77
- React.createElement(AccountSelectorInternal, { selectedAccounts: [selectedAccount], canBookmarkAccount: canBookmarkAccounts, bookmarkedAccounts: isGroupBookmarkEnabled ? bookmarkedGroupAccounts.data : bookmarkedAccounts.data, id: "account-or-bookmark-selector", className: "account-selector", name: "account-or-bookmark-selector", placeholder: t(`Search for an account ${loggedInUserRights.data.isExternal() ? '' : 'or select a bookmark'} `), onSelect: onInternalAccountSelect, disabled: loggedInUserRights.data.isExternal() || selectedAccountDetails.isFetching, isInValid: isSelectedAccountSubscriptionAbused, restrictedOnSubscriptionAbuse: true })),
75
+ React.createElement(AccountSelectorInternal, { selectedAccounts: [selectedAccount], canBookmarkAccount: canBookmarkAccounts, bookmarkedAccounts: bookmarkedGroupAccounts.data, id: "account-or-bookmark-selector", className: "account-selector", name: "account-or-bookmark-selector", placeholder: t(`Search for an account ${loggedInUserRights.data.isExternal() ? '' : 'or select a bookmark'} `), onSelect: onInternalAccountSelect, disabled: loggedInUserRights.data.isExternal() || selectedAccountDetails.isFetching, isInValid: isSelectedAccountSubscriptionAbused, restrictedOnSubscriptionAbuse: true })),
78
76
  canAccessManagedAccounts && (React.createElement(ManagedAccountsDropdown, { className: "managed-account-selector", onManagedAccountChange: onManagedAccountChange, managedAccounts: managedAccounts, selectedAccountNumber: accountNumber, disabled: selectedAccountDetails.isFetching })),
79
77
  isSelectedAccountSubscriptionAbused && (React.createElement("p", { className: "form-instructions form-invalid" },
80
78
  React.createElement(InfoCircleIcon, null),
@@ -1 +1 @@
1
- {"version":3,"file":"ManagedAccountsDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/ManagedAccountsDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAM7G,UAAU,MAAO,SAAQ,gBAAgB;IACrC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,mBAAmB,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;IACxE,sBAAsB,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC,KAAK,IAAI,CAAC;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAOD,iBAAS,uBAAuB,CAAC,KAAK,EAAE,MAAM,eA4D7C;kBA5DQ,uBAAuB;;;AA8DhC,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"ManagedAccountsDropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/ManagedAccountsDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAM7G,UAAU,MAAO,SAAQ,gBAAgB;IACrC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,mBAAmB,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;IACxE,sBAAsB,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,CAAC,KAAK,IAAI,CAAC;IAChG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAOD,iBAAS,uBAAuB,CAAC,KAAK,EAAE,MAAM,eA6D7C;kBA7DQ,uBAAuB;;;AA+DhC,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -25,9 +25,8 @@ function ManagedAccountsDropdown(props) {
25
25
  setSelectedItem(toOption(item, { labelKey: getLabelForAccountOption }));
26
26
  }, [props.managedAccounts.data, props.selectedAccountNumber]);
27
27
  // Only accounts that have granted access permission to partner should be listed
28
- const managedAccountsOptions = props.managedAccounts.data
29
- .filter((account) => account.partnerCaseAccess === 'All')
30
- .map((account) => (Object.assign({ actionItem: (React.createElement(React.Fragment, null, account.subscriptionAbuse && (React.createElement("span", { className: "form-instructions form-invalid pf-u-text-nowrap pf-u-pr-sm" },
28
+ const managedAccountsWithPermission = () => props.managedAccounts.data.filter((account) => account.partnerCaseAccess === 'All') || [];
29
+ const managedAccountsOptions = managedAccountsWithPermission().map((account) => (Object.assign({ actionItem: (React.createElement(React.Fragment, null, account.subscriptionAbuse && (React.createElement("span", { className: "form-instructions form-invalid pf-u-text-nowrap pf-u-pr-sm" },
31
30
  ' ',
32
31
  React.createElement(InfoCircleIcon, null),
33
32
  " ",
@@ -35,7 +34,7 @@ function ManagedAccountsDropdown(props) {
35
34
  return (React.createElement(Dropdown, { className: `push-top ${props.className}`, id: props.id, placeholder: "Select a managed account", list: toOptions(managedAccountsOptions, {
36
35
  childrenKey: 'children',
37
36
  actionItemKey: 'actionItem',
38
- }), selectedItem: selectedItem, title: `Select a managed account`, onChange: props.onManagedAccountChange, disabled: props.disabled }));
37
+ }), selectedItem: selectedItem, title: `Select a managed account`, onChange: props.onManagedAccountChange, disabled: props.disabled || managedAccountsWithPermission.length === 0 }));
39
38
  }
40
39
  ManagedAccountsDropdown.defaultProps = defaultProps;
41
40
  export { ManagedAccountsDropdown };
@@ -219,7 +219,7 @@ export function CaseOpenshiftClusterId() {
219
219
  }
220
220
  else {
221
221
  return (React.createElement(React.Fragment, null,
222
- React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV4: majorVersion === '4', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
222
+ React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: displayName.current, openshiftClusterIDState: localOpenshiftClusterIDState || selectedReason, onClusterIdStateUpdate: onClusterIdSave, isClusterIdInvalid: (isEmpty(localOpenshiftClusterIDState) && isEmpty(selectedReason)) || isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isNotV3: majorVersion !== '3', isDisabled: isClusterIdUpdating, noClusterIdReasonExplanation: noClusterIdReasonExplanation }),
223
223
  noClusterIdReasonExplanation !== 'v3-cluster' &&
224
224
  (dontKnowSelected || noClusterIdReasonExplanation || noClusterIdReason) && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: debounceFn, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer, isDisabled: isReasonUpdating })),
225
225
  React.createElement(LoadingIndicator, { show: isClusterIdUpdating, size: "xs" })));
@@ -1 +1 @@
1
- {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAaA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eA2FhD"}
1
+ {"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Description.tsx"],"names":[],"mappings":"AAcA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,MAAM,eA4FhD"}
@@ -1,4 +1,5 @@
1
- import { InlineEdit, TextAreaAutosize } from '@rh-support/components';
1
+ import { TextArea } from '@patternfly/react-core';
2
+ import { InlineEdit } from '@rh-support/components';
2
3
  import isEmpty from 'lodash/isEmpty';
3
4
  import isEqual from 'lodash/isEqual';
4
5
  import React, { useContext, useState } from 'react';
@@ -10,7 +11,7 @@ import { getUpdatedDescription } from '../../reducers/CaseHelpers';
10
11
  import { setCaseDetails } from '../../reducers/CaseReducer';
11
12
  export default function Description(props) {
12
13
  const { t } = useTranslation();
13
- const { description, hasLargeCaseDescription, issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName, } = useCaseSelector((state) => ({
14
+ const { hasLargeCaseDescription, issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName } = useCaseSelector((state) => ({
14
15
  description: state.caseDetails.description,
15
16
  issue: state.caseDetails.issue,
16
17
  environment: state.caseDetails.environment,
@@ -20,27 +21,31 @@ export default function Description(props) {
20
21
  v3ClusterName: state.v3ClusterName,
21
22
  }), isEqual);
22
23
  const caseDispatch = useCaseDispatch();
23
- const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
24
+ const [hasFocusedLostKT4, setHasFocusedLostKT4] = useState(false);
24
25
  const [isIssueTextAreaFocused, setIssueTextAreaFocused] = useState(false);
25
26
  const onKTQ1IssueFocusChange = (e) => {
26
27
  setIssueTextAreaFocused(e.type === 'focus');
28
+ e.type === 'blur' && setHasFocusedLostKT4(true);
27
29
  };
28
30
  const onCaseDetailsChange = (caseDetails) => {
29
31
  setCaseDetails(caseDispatch, caseDetails);
30
32
  };
31
- const onKTQ1IssueChange = (e) => {
32
- var _a;
33
- const ktQ1Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
33
+ const onKTQ1IssueChange = (value, e) => {
34
+ const ktQ1Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
34
35
  const newDescription = getUpdatedDescription(ktQ1Local, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName);
35
36
  onCaseDetailsChange({ issue: ktQ1Local, description: newDescription });
36
37
  };
37
- const isKT1Required = isEmpty(environment) && isEmpty(periodicityOfIssue) && isEmpty(timeFramesAndUrgency);
38
+ const isKT1Required = true;
39
+ const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
38
40
  const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
39
- const isDescriptionInvalid = (isEmpty(description) || hasLargeCaseDescription) && showValidationErrorAlert;
41
+ const isDescriptionInvalid = (issue) => {
42
+ return (hasFocusedLostKT4 && isEmpty(issue)) || showValidationErrorAlert;
43
+ };
40
44
  return (React.createElement(InlineEdit, { labelContent: React.createElement(React.Fragment, null,
41
45
  React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?"),
42
46
  ' ',
43
47
  isKT1Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), labelProps: { htmlFor: 'open-case-ktQ1-issue' }, content: issue, allowInlineEdit: !!props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: isEmpty(issue), usePreformattedTag: true, saveOnBlur: true },
44
- React.createElement(TextAreaAutosize, { id: "open-case-ktQ1-issue", name: "open-case-ktQ1-issue", className: `form-control${isDescriptionInvalid ? ' form-invalid' : ''}`, "aria-invalid": isDescriptionInvalid, "aria-required": isKT1Required, required: isKT1Required, value: issue, disabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "open-case-ktQ1-issue" }),
48
+ React.createElement(TextArea, { id: "open-case-ktQ1-issue", name: "open-case-ktQ1-issue", className: `form-control${isDescriptionInvalid(issue) ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'true' : 'false', "aria-required": isKT1Required, isRequired: isKT1Required, value: issue, isDisabled: isEmpty(issue) && hasLargeCaseDescription && !setIssueTextAreaFocused, onChange: onKTQ1IssueChange, onFocus: onKTQ1IssueFocusChange, onBlur: onKTQ1IssueFocusChange, "data-tracking-id": "open-case-ktQ1-issue" }),
49
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'Description cannot be more than 20000 characters' : ''}`),
45
50
  React.createElement("p", { className: "form-instructions" }, `${hasLargeCaseDescription && isIssueTextAreaFocused ? descriptionErrorMessage : ''}`)));
46
51
  }
@@ -81,7 +81,7 @@ function Fts(props) {
81
81
  if (canEditCase.alert())
82
82
  return;
83
83
  setFtsContact(e.target.value);
84
- if (props.inlineEditable)
84
+ if (props.inlineEditable && !isEmpty(caseNumber))
85
85
  return;
86
86
  setContactInfoIntoGlobalState(e.target.value);
87
87
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AAyBA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,eAoShC"}
1
+ {"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AAoCA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,eAiShC"}
@@ -7,8 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { Modal, ModalVariant, Popover, PopoverPosition } from '@patternfly/react-core';
11
- import { Input, LoadingIndicator, TextAreaResizable, ToastNotification, useConfirmation } from '@rh-support/components';
10
+ import { Button, Form, FormGroup, Modal, ModalVariant, Popover, PopoverPosition, TextArea, TextInput, ValidatedOptions, } from '@patternfly/react-core';
11
+ import { LoadingIndicator, ToastNotification, useConfirmation } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
14
  import isEmpty from 'lodash/isEmpty';
@@ -21,7 +21,7 @@ import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext,
21
21
  import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
22
22
  import { checkForCaseStatusToggleOnAttachOrComment, postCepDetails, setCaseDetails, setCaseState, updateCaseDetails, } from '../../reducers/CaseReducer';
23
23
  export function Cep(props) {
24
- var _a, _b, _c;
24
+ var _a, _b, _c, _d, _e, _f;
25
25
  const { t } = useTranslation();
26
26
  const { cep, caseNumber, status, cepDetails, isPostingCep, isCaseUpdating } = useCaseSelector((state) => ({
27
27
  cep: state.caseDetails.cep,
@@ -42,6 +42,7 @@ export function Cep(props) {
42
42
  const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
43
43
  const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
44
44
  const canEditCase = useCanEditCase();
45
+ const [saveButtonIsClicked, setSaveButtonIsClicked] = useState(false);
45
46
  /** Sync cepDetailsLocal with cepDetails from reducer */
46
47
  useEffect(() => {
47
48
  setCepDetailsLocal(cepDetails);
@@ -96,8 +97,12 @@ export function Cep(props) {
96
97
  const onCancel = () => {
97
98
  setIsCepModalOpen(false);
98
99
  setCepDetailsLocal(cepDetails);
100
+ setSaveButtonIsClicked(false);
99
101
  };
100
102
  const onSubmit = () => {
103
+ setSaveButtonIsClicked(true);
104
+ if (isFormInvalid)
105
+ return;
101
106
  setIsCepModalOpen(false);
102
107
  if (!isEmpty(caseNumber)) {
103
108
  cepUpdate({ cep: true });
@@ -119,9 +124,11 @@ export function Cep(props) {
119
124
  const onCepNotesChange = (value) => {
120
125
  setCepDetailsLocal(Object.assign(Object.assign({}, cepDetailsLocal), { notes: value }));
121
126
  };
122
- const isSubmitButtonDisabled = isEmpty((_a = cepDetailsLocal.contactName) === null || _a === void 0 ? void 0 : _a.trim()) ||
127
+ const isFormInvalid = isEmpty((_a = cepDetailsLocal.contactName) === null || _a === void 0 ? void 0 : _a.trim()) ||
123
128
  isEmpty((_b = cepDetailsLocal.workingHours) === null || _b === void 0 ? void 0 : _b.trim()) ||
124
- isEmpty((_c = cepDetailsLocal.contactInformation) === null || _c === void 0 ? void 0 : _c.trim());
129
+ isEmpty((_c = cepDetailsLocal.contactInformation) === null || _c === void 0 ? void 0 : _c.trim()) ||
130
+ isCaseUpdating ||
131
+ isPostingCep;
125
132
  if (!canUseCep) {
126
133
  return React.createElement(React.Fragment, null);
127
134
  }
@@ -134,44 +141,28 @@ export function Cep(props) {
134
141
  ' ',
135
142
  React.createElement(LoadingIndicator, { show: isCaseUpdating && isPostingCep, isInline: true, size: "sm" }),
136
143
  React.createElement(Modal, { id: "cep-details-modal", title: t('Consultant engagement is in progress'), "aria-describedby": "cep-modal-description", isOpen: isCepModalOpen, showClose: true, variant: ModalVariant.large, onClose: onCancel, actions: [
137
- React.createElement("button", { key: "confirm", className: "btn btn-app btn-primary", onClick: onSubmit, disabled: isSubmitButtonDisabled, "data-tracking-id": "cep-details-save" },
144
+ React.createElement(Button, { key: "confirm", variant: "primary", className: "btn btn-app btn-primary", onClick: onSubmit, isDisabled: saveButtonIsClicked && isFormInvalid, "data-tracking-id": "cep-details-save" },
138
145
  React.createElement(Trans, null, "Submit")),
139
- React.createElement("button", { key: "link", className: "btn btn-app btn-link", onClick: onCancel, "data-tracking-id": "cep-details-cancel" },
146
+ React.createElement(Button, { key: "link", className: "btn btn-app btn-link", variant: "link", onClick: onCancel, "data-tracking-id": "cep-details-cancel", isDisabled: isCaseUpdating || isPostingCep },
140
147
  React.createElement(Trans, null, "Cancel")),
141
148
  ] },
142
- React.createElement("p", { className: "kicker kicker-sm" },
149
+ React.createElement("p", null,
143
150
  React.createElement(Trans, null, "Please provide the contact information of Consulting personnel troubleshooting the customer issue.")),
144
- React.createElement("p", { className: "kicker kicker-sm push-top-narrow", id: "cep-madal-description" },
151
+ React.createElement("p", { className: "push-top-narrow", id: "cep-madal-description" },
145
152
  React.createElement(Trans, null, "If requested, Red Hat Support will use this information to initiate direct contact (i.e. phone, chat) with listed contact(s) in order to provide faster assistance. The primary method of communication will continue to be this support ticket.")),
146
- React.createElement("form", { className: "push-top", action: "", onSubmit: onSubmit },
147
- React.createElement("div", { className: "form-group" },
148
- React.createElement("label", { htmlFor: "cep-contact-name" },
149
- React.createElement(Trans, null, "Contact name"),
150
- "\u00A0",
151
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
152
- React.createElement(Input, { type: "text", id: "cep-contact-name", className: `form-control`, "aria-required": true, isRequired: true, maxLength: 254, ariaLabel: t('cep-contact-name'), onChange: onCepContactNameChange, isSpaceAllowed: false }),
153
- React.createElement("p", { className: "form-instructions" },
154
- React.createElement(Trans, null, "Provide main contact(s) troubleshooting the issue."))),
155
- React.createElement("div", { className: "form-group" },
156
- React.createElement("label", { htmlFor: "cep-workingHours" },
157
- React.createElement(Trans, null, "Availability/Working hours"),
158
- "\u00A0",
159
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
160
- React.createElement(Input, { type: "text", id: "cep-workingHours", className: `form-control`, "aria-required": true, isRequired: true, maxLength: 254, placeholder: 'M-F 9:00am - 5:00pm EDT', ariaLabel: t('cep-workingHours'), onChange: onCepWorkingHoursChange, isSpaceAllowed: false }),
161
- React.createElement("p", { className: "form-instructions" },
162
- React.createElement(Trans, null, "Indicate working hours, time zone; specify if not available on certain dates (i.e. weekends, holidays)."))),
163
- React.createElement("div", { className: "form-group" },
164
- React.createElement("label", { htmlFor: "cep-contactInformation" },
165
- React.createElement(Trans, null, "Contact information"),
166
- "\u00A0",
167
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
168
- React.createElement(TextAreaResizable, { id: "cep-contactInformation", className: `form-control`, "aria-required": true, isRequired: true, maxLength: 2000, name: "cep-contactInformation", value: cepDetailsLocal.contactInformation, onChange: onCepContactInformationsChange, "aria-label": "auto resizing text area example", isSpaceAllowed: false, autoResize: true }),
169
- React.createElement("p", { className: "form-instructions" },
170
- React.createElement(Trans, null, "Please provide phone number, chat ID or email."))),
171
- React.createElement("div", { className: "form-group" },
172
- React.createElement("label", { htmlFor: "cep-notes" },
173
- React.createElement(Trans, null, "Notes")),
174
- React.createElement(TextAreaResizable, { id: "cep-notes", className: `form-control`, "aria-required": false, isRequired: false, maxLength: 2000, name: "cep-notes", value: cepDetailsLocal.notes, onChange: onCepNotesChange, isSpaceAllowed: false, autoResize: true }),
175
- React.createElement("p", { className: "form-instructions" },
176
- React.createElement(Trans, null, "Provide any pertinent information that Red Hat Support should be aware of that's not already captured in the issue statement or comments.")))))));
153
+ React.createElement(Form, { className: "push-top-narrow" },
154
+ React.createElement(FormGroup, { label: t('Contact name'), isRequired: true, fieldId: "cep-contact-name", helperText: t('Provide main contact(s) troubleshooting the issue.') },
155
+ React.createElement(TextInput, { type: "text", id: "cep-contact-name", isRequired: true, maxLength: 254, "aria-label": t('Contact name'), onChange: onCepContactNameChange, validated: saveButtonIsClicked && isEmpty((_d = cepDetailsLocal.contactName) === null || _d === void 0 ? void 0 : _d.trim())
156
+ ? ValidatedOptions.error
157
+ : ValidatedOptions.default })),
158
+ React.createElement(FormGroup, { label: t('Availability/Working hours'), isRequired: true, fieldId: "cep-workingHours", helperText: t('Indicate working hours, time zone; specify if not available on certain dates (i.e. weekends, holidays).') },
159
+ React.createElement(TextInput, { type: "text", id: "cep-workingHours", isRequired: true, maxLength: 254, "aria-label": t('Availability/Working hours'), onChange: onCepWorkingHoursChange, validated: saveButtonIsClicked && isEmpty((_e = cepDetailsLocal.workingHours) === null || _e === void 0 ? void 0 : _e.trim())
160
+ ? ValidatedOptions.error
161
+ : ValidatedOptions.default })),
162
+ React.createElement(FormGroup, { label: t('Contact information'), isRequired: true, fieldId: "cep-contactInformation", helperText: t('Please provide phone number, chat ID or email.') },
163
+ React.createElement(TextArea, { id: "cep-contactInformation", "aria-required": true, isRequired: true, maxLength: 2000, name: "cep-contactInformation", value: cepDetailsLocal.contactInformation, onChange: onCepContactInformationsChange, "aria-label": "auto resizing text area example", autoResize: true, validated: saveButtonIsClicked && isEmpty((_f = cepDetailsLocal.contactInformation) === null || _f === void 0 ? void 0 : _f.trim())
164
+ ? ValidatedOptions.error
165
+ : ValidatedOptions.default })),
166
+ React.createElement(FormGroup, { label: t('Notes'), fieldId: "cep-notes", helperText: t("Provide any pertinent information that Red Hat Support should be aware of that's not already captured in the issue statement or comments.") },
167
+ React.createElement(TextArea, { id: "cep-notes", "aria-required": false, isRequired: false, maxLength: 2000, name: "cep-notes", value: cepDetailsLocal.notes, onChange: onCepNotesChange, autoResize: true }))))));
177
168
  }
@@ -206,7 +206,7 @@ export function OpenShiftClusterId() {
206
206
  return null;
207
207
  return (React.createElement(React.Fragment, null,
208
208
  !isOpenShiftV3 && (React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: openshiftDisplayName, openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: showValidationErrorAlert &&
209
- ((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV4: majorVersion === '4' })),
209
+ ((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) || isClusterIdInvalid), clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isNotV3: majorVersion !== '3' })),
210
210
  noClusterIdReasonExplanation !== 'v3-cluster' && dontKnowSelected && !isOpenShiftV3 && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer })),
211
211
  (v3Selected || isOpenShiftV3) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) && showValidationErrorAlert, v3Selected: v3Selected }))));
212
212
  }
@@ -6,7 +6,7 @@ interface IProps extends IDClassNameProps {
6
6
  isClusterIdInvalid: boolean;
7
7
  clusterIdDropdownFormInstructions?: JSX.Element;
8
8
  onClusterClear: () => void;
9
- isV4: boolean;
9
+ isNotV3: boolean;
10
10
  isDisabled?: boolean;
11
11
  noClusterIdReasonExplanation?: string;
12
12
  openshiftDisplayName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAG5E,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AAUjF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAuBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA4WzC;kBA5WQ,mBAAmB;;;AA+W5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAG5E,OAAO,EAAE,gBAAgB,EAAuB,MAAM,0BAA0B,CAAC;AAUjF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAuBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA4WzC;kBA5WQ,mBAAmB;;;AA+W5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -99,7 +99,7 @@ function OpenshiftDropdownV4(props) {
99
99
  React.createElement(Checkbox, { label: t('Show archived clusters'), key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", "data-tracking-id": "show-hide-archived-clusters", isChecked: showArchivedClusters, className: "archived-clusters-checkbox" })),
100
100
  React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
101
101
  React.createElement(SelectOption, { key: 'dont-have-id', value: createState('dont-have-id', t("I don't have my Cluster ID")) }),
102
- ...(!props.isV4
102
+ ...(!props.isNotV3
103
103
  ? [
104
104
  React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')) }),
105
105
  ]
@@ -231,7 +231,7 @@ function OpenshiftDropdownV4(props) {
231
231
  }, []);
232
232
  // need to get clusters when user opens the dropdown
233
233
  // as the api response is cached np extra call is made on open/close
234
- // added observing props.isV4 because re-render
234
+ // added observing props.isNotV3 because re-render
235
235
  // is needed when user on overview page changing version
236
236
  useEffect(() => {
237
237
  if (!isOpen)
@@ -251,7 +251,7 @@ function OpenshiftDropdownV4(props) {
251
251
  isUnmounted = true;
252
252
  };
253
253
  // eslint-disable-next-line react-hooks/exhaustive-deps
254
- }, [props.isV4, showArchivedClusters, isOpen, inputVal]);
254
+ }, [props.isNotV3, showArchivedClusters, isOpen, inputVal]);
255
255
  useEffect(() => {
256
256
  if (props.isClusterIdInvalid) {
257
257
  setValidated('error');
@@ -1 +1 @@
1
- {"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eA+NjC;kBA/NQ,WAAW;;;AAiOpB,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"KtQuestions.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/KtQuestions.tsx"],"names":[],"mappings":"AAkBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,eAwPjC;kBAxPQ,WAAW;;;AA0PpB,eAAe,WAAW,CAAC"}
@@ -1,4 +1,5 @@
1
- import { InlineEdit, TextAreaAutosize } from '@rh-support/components';
1
+ import { TextArea } from '@patternfly/react-core';
2
+ import { InlineEdit } from '@rh-support/components';
2
3
  import isEmpty from 'lodash/isEmpty';
3
4
  import isEqual from 'lodash/isEqual';
4
5
  import React, { useContext, useEffect, useState } from 'react';
@@ -24,19 +25,19 @@ function KtQuestions(props) {
24
25
  const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
25
26
  const [isKTQ2TextAreaActive, setKTQ2TextAreaActive] = useState(false);
26
27
  const [hasFocusedLostKT2, setHasFocusedLostKT2] = useState(false);
27
- const [isKTQ2InValid, setKTQ2InValid] = useState(false);
28
+ // const [isKTQ2InValid, setKTQ2InValid] = useState(false);
28
29
  const onKTQ2FocusChange = (e) => {
29
30
  setKTQ2TextAreaActive(e.type === 'focus');
30
31
  e.type === 'blur' && setHasFocusedLostKT2(true);
31
- e.type !== 'focus' && setKTQ2InValid(isEmpty(description));
32
+ // e.type !== 'focus' && setKTQ2InValid(isEmpty(description));
32
33
  };
33
34
  const [isKTQ3TextAreaActive, setKTQ3TextAreaActive] = useState(false);
34
- const [isKTQ3InValid, setKTQ3InValid] = useState(false);
35
+ // const [isKTQ3InValid, setKTQ3InValid] = useState(false);
35
36
  const [hasFocusedLostKT3, setHasFocusedLostKT3] = useState(false);
36
37
  const onKTQ3FocusChange = (e) => {
37
38
  setKTQ3TextAreaActive(e.type === 'focus');
38
39
  e.type === 'blur' && setHasFocusedLostKT3(true);
39
- e.type !== 'focus' && setKTQ3InValid(isEmpty(description));
40
+ // e.type !== 'focus' && setKTQ3InValid(isEmpty(description));
40
41
  };
41
42
  const [isKTQ4TextAreaActive, setKTQ4TextAreaActive] = useState(false);
42
43
  const [isKTQ4InValid, setKTQ4InValid] = useState(false);
@@ -47,24 +48,22 @@ function KtQuestions(props) {
47
48
  e.type === 'blur' && setHasFocusedLostKT4(true);
48
49
  };
49
50
  useEffect(() => {
50
- hasFocusedLostKT2 && setKTQ2InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
51
- hasFocusedLostKT3 && setKTQ3InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
51
+ // hasFocusedLostKT2 && setKTQ2InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
52
+ // hasFocusedLostKT3 && setKTQ3InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
52
53
  hasFocusedLostKT4 && setKTQ4InValid(isEmpty(description) && isEmpty(timeFramesAndUrgency));
53
54
  }, [description, timeFramesAndUrgency, hasFocusedLostKT2, hasFocusedLostKT3, hasFocusedLostKT4]);
54
55
  const onCaseDetailsChange = (caseDetails) => {
55
56
  setCaseDetails(caseDispatch, caseDetails);
56
57
  };
57
58
  // Troubleshoot Page Question 3
58
- const onKtQ2Change = (e) => {
59
- var _a;
60
- const ktQ2Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
59
+ const onKtQ2Change = (value, e) => {
60
+ const ktQ2Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
61
61
  const newDescription = getUpdatedDescription(issue, ktQ2Local, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName);
62
62
  onCaseDetailsChange({ environment: ktQ2Local, description: newDescription });
63
63
  };
64
64
  // Troubleshoot Page Question 4
65
- const onKtQ3Change = (e) => {
66
- var _a;
67
- const ktQ3Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
65
+ const onKtQ3Change = (value, e) => {
66
+ const ktQ3Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
68
67
  const newDescription = getUpdatedDescription(issue, environment, ktQ3Local, timeFramesAndUrgency, v3ClusterName);
69
68
  onCaseDetailsChange({
70
69
  periodicityOfIssue: ktQ3Local,
@@ -72,35 +71,48 @@ function KtQuestions(props) {
72
71
  });
73
72
  };
74
73
  // Troubleshoot Page Question 2
75
- const onKtQ4Change = (e) => {
76
- var _a;
77
- const ktQ4Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
74
+ const onKtQ4Change = (value, e) => {
75
+ const ktQ4Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
78
76
  const newDescription = getUpdatedDescription(issue, environment, periodicityOfIssue, ktQ4Local, v3ClusterName);
79
77
  onCaseDetailsChange({ timeFramesAndUrgency: ktQ4Local, description: newDescription });
80
78
  };
81
- const isKT2Required = isEmpty(issue) && isEmpty(timeFramesAndUrgency) && isEmpty(periodicityOfIssue);
82
- const isKT3Required = isEmpty(issue) && isEmpty(timeFramesAndUrgency) && isEmpty(environment);
79
+ const isKT2Required = false;
80
+ const isKT3Required = false;
83
81
  const isKT4Required = true;
84
82
  const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
85
83
  const isBusinessImpactInvalid = (isEmpty(timeFramesAndUrgency) || hasLargeCaseDescription) && showValidationErrorAlert;
84
+ const invalidateQT4 = (value) => {
85
+ return isEmpty(value) && hasFocusedLostKT4;
86
+ };
86
87
  return (React.createElement(React.Fragment, null,
87
88
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ4-timeFramesAndUrgency' }, labelContent: React.createElement(React.Fragment, null,
88
89
  t(KtQuestionConstant.timeFramesAndUrgency),
89
90
  ' ',
90
91
  isKT4Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(timeFramesAndUrgency), usePreformattedTag: true, saveOnBlur: true, content: timeFramesAndUrgency },
91
- React.createElement(TextAreaAutosize, { className: `form-control${isBusinessImpactInvalid || isKTQ4InValid ? ' form-invalid' : ''}`, "aria-invalid": isBusinessImpactInvalid, id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, disabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, required: isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency", placeholder: "E.g., users affected, financial impact, and whether it\u2019s a matter of legal, national, or medical urgency" }),
92
+ React.createElement(TextArea, { className: `form-control${(invalidateQT4(timeFramesAndUrgency) && isBusinessImpactInvalid) || isKTQ4InValid
93
+ ? ' form-invalid'
94
+ : ''}`, "aria-invalid": timeFramesAndUrgency && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > 4000 ? 'true' : 'false', id: "ktQ4-timeFramesAndUrgency", value: timeFramesAndUrgency, isDisabled: isEmpty(timeFramesAndUrgency) && hasLargeCaseDescription && !isKTQ4TextAreaActive, onChange: onKtQ4Change, onFocus: onKTQ4FocusChange, onBlur: onKTQ4FocusChange, "aria-required": isKT4Required, "data-tracking-id": "open-case-ktQ4-timeFramesAndUrgency", placeholder: "E.g., users affected, financial impact, and whether it\u2019s a matter of legal, national, or medical urgency", isRequired: isKT4Required }),
95
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ4-environment" }, `${isKTQ4TextAreaActive && (timeFramesAndUrgency === null || timeFramesAndUrgency === void 0 ? void 0 : timeFramesAndUrgency.length) > 4000
96
+ ? 'Description cannot be more than 4000 characters'
97
+ : ''}`),
92
98
  React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ4-timeFramesAndUrgency" }, `${hasLargeCaseDescription && isKTQ4TextAreaActive ? descriptionErrorMessage : ''}`)),
93
99
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ2-environment' }, labelContent: React.createElement(React.Fragment, null,
94
100
  t(KtQuestionConstant.environment),
95
101
  ' ',
96
102
  isKT2Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(environment), usePreformattedTag: true, saveOnBlur: true, content: environment },
97
- React.createElement(TextAreaAutosize, { className: `form-control${isKTQ2InValid || hasLargeCaseDescription ? ' form-invalid' : ''}`, id: "ktQ2-environment", value: environment, disabled: isEmpty(environment) && hasLargeCaseDescription && !isKTQ2TextAreaActive, onChange: onKtQ2Change, onFocus: onKTQ2FocusChange, onBlur: onKTQ2FocusChange, "aria-required": isKT2Required, required: isKT2Required, "data-tracking-id": "open-case-ktQ2-environment" }),
103
+ React.createElement(TextArea, { className: `form-control`, id: "ktQ2-environment", value: environment, isDisabled: isEmpty(environment) && hasLargeCaseDescription && !isKTQ2TextAreaActive, onChange: onKtQ2Change, onFocus: onKTQ2FocusChange, onBlur: onKTQ2FocusChange, "aria-required": isKT2Required, isRequired: isKT2Required, "data-tracking-id": "open-case-ktQ2-environment", "aria-invalid": environment && (environment === null || environment === void 0 ? void 0 : environment.length) > 4000 ? 'true' : 'false' }),
104
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ2-environment" }, `${isKTQ2TextAreaActive && (environment === null || environment === void 0 ? void 0 : environment.length) > 4000
105
+ ? 'Description cannot be more than 4000 characters'
106
+ : ''}`),
98
107
  React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ2-environment" }, `${hasLargeCaseDescription && isKTQ2TextAreaActive ? descriptionErrorMessage : ''}`)),
99
108
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'ktQ3-periodicityOfIssue' }, labelContent: React.createElement(React.Fragment, null,
100
109
  t(KtQuestionConstant.periodicityOfIssue),
101
110
  ' ',
102
111
  isKT3Required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: props.hideSaveCancel, initialIsEditing: isEmpty(periodicityOfIssue), usePreformattedTag: true, saveOnBlur: true, content: periodicityOfIssue },
103
- React.createElement(TextAreaAutosize, { className: `form-control${isKTQ3InValid || hasLargeCaseDescription ? ' form-invalid' : ''}`, id: "ktQ3-periodicityOfIssue", value: periodicityOfIssue, disabled: isEmpty(periodicityOfIssue) && hasLargeCaseDescription && !isKTQ3TextAreaActive, onChange: onKtQ3Change, onFocus: onKTQ3FocusChange, onBlur: onKTQ3FocusChange, "aria-required": isKT3Required, required: isKT3Required, "data-tracking-id": "open-case-ktQ3-periodicityOfIssue" }),
112
+ React.createElement(TextArea, { className: `form-control`, id: "ktQ3-periodicityOfIssue", value: periodicityOfIssue, isDisabled: isEmpty(periodicityOfIssue) && hasLargeCaseDescription && !isKTQ3TextAreaActive, onChange: onKtQ3Change, onFocus: onKTQ3FocusChange, onBlur: onKTQ3FocusChange, "aria-required": isKT3Required, isRequired: isKT3Required, "data-tracking-id": "open-case-ktQ3-periodicityOfIssue", "aria-invalid": periodicityOfIssue && (periodicityOfIssue === null || periodicityOfIssue === void 0 ? void 0 : periodicityOfIssue.length) > 4000 ? 'true' : 'false' }),
113
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-4k-warning-ktQ3-environment" }, `${isKTQ3TextAreaActive && (periodicityOfIssue === null || periodicityOfIssue === void 0 ? void 0 : periodicityOfIssue.length) > 4000
114
+ ? 'Description cannot be more than 4000 characters'
115
+ : ''}`),
104
116
  React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-warning-ktQ3-periodicityOfIssue" }, `${hasLargeCaseDescription && isKTQ3TextAreaActive ? descriptionErrorMessage : ''}`))));
105
117
  }
106
118
  KtQuestions.defaultProps = defaultProps;
@@ -1 +1 @@
1
- {"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../../../src/components/Issue/Issue.tsx"],"names":[],"mappings":"AAcA,MAAM,CAAC,OAAO,UAAU,KAAK,gBAuF5B"}
1
+ {"version":3,"file":"Issue.d.ts","sourceRoot":"","sources":["../../../../src/components/Issue/Issue.tsx"],"names":[],"mappings":"AAeA,MAAM,CAAC,OAAO,UAAU,KAAK,gBA0F5B"}
@@ -1,4 +1,5 @@
1
- import { InlineEdit, MoreOrLess, TextAreaAutosize } from '@rh-support/components';
1
+ import { TextArea } from '@patternfly/react-core';
2
+ import { InlineEdit, MoreOrLess } from '@rh-support/components';
2
3
  import { useGlobalStateContext } from '@rh-support/react-context';
3
4
  import isEmpty from 'lodash/isEmpty';
4
5
  import isEqual from 'lodash/isEqual';
@@ -26,9 +27,8 @@ export default function Issue() {
26
27
  const onCaseDetailsChange = (caseDetails) => {
27
28
  setCaseDetails(caseDispatch, caseDetails);
28
29
  };
29
- const onKTQ1IssueChange = (e) => {
30
- var _a;
31
- const ktQ1Local = isEmpty((_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : e.target.value;
30
+ const onKTQ1IssueChange = (value, e) => {
31
+ const ktQ1Local = isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? '' : value;
32
32
  const description = getUpdatedDescription(ktQ1Local, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName);
33
33
  setHasLargeDescription(description.length > DESCRIPTION_LENGTH_LIMIT);
34
34
  onCaseDetailsChange({ issue: ktQ1Local, description });
@@ -43,7 +43,8 @@ export default function Issue() {
43
43
  React.createElement(MoreOrLess, { maxHeight: 600, appStickyHeaderRef: navBarRef },
44
44
  React.createElement(InlineEdit, { labelProps: { htmlFor: 'issue-section-ktQ1-issue' }, labelContent: React.createElement(React.Fragment, null,
45
45
  React.createElement(Trans, null, "What are you experiencing? What are you expecting to happen?")), allowInlineEdit: true, hideSaveCancel: true, initialIsEditing: isEmpty(issue), usePreformattedTag: true, content: issue },
46
- React.createElement(TextAreaAutosize, { id: "issue-section-ktQ1-issue", name: "issue-section-ktQ1-issue", "aria-describedby": "describeIssueDesc", "aria-invalid": hasLargeDescription, className: `form-control${hasLargeDescription ? ' form-invalid' : ''}`, value: issue, placeholder: t('Elaborate more on your issue'), "data-tracking-id": "open-case-describe-ktQ1-issue", onChange: onKTQ1IssueChange }))),
46
+ React.createElement(TextArea, { id: "issue-section-ktQ1-issue", name: "issue-section-ktQ1-issue", className: `form-control${hasLargeDescription ? ' form-invalid' : ''}`, "aria-invalid": (issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'true' : 'false', value: issue, onChange: onKTQ1IssueChange, "data-tracking-id": "open-case-describe-ktQ1-issue", "aria-describedby": "describeIssueDesc", placeholder: t('Elaborate more on your issue') }),
47
+ React.createElement("p", { className: "form-instructions", "data-tracking-id": "large-20k-warning-ktQ1-environment" }, `${(issue === null || issue === void 0 ? void 0 : issue.length) > 20000 ? 'Description cannot be more than 20000 characters' : ''}`))),
47
48
  ((_a = getUpdatedDescription(issue, environment, periodicityOfIssue, timeFramesAndUrgency, v3ClusterName)) === null || _a === void 0 ? void 0 : _a.length) > DESCRIPTION_LENGTH_LIMIT && (React.createElement("div", { className: "pull-top" },
48
49
  React.createElement("p", { className: "form-instructions form-invalid" }, maxLengtMessage))))));
49
50
  }
@@ -33,7 +33,7 @@ export function ClusterRecommendationItems(props) {
33
33
  React.createElement("h3", null, rule.description)),
34
34
  React.createElement("pfe-accordion-panel", null,
35
35
  React.createElement("p", null,
36
- React.createElement(Label, { color: riskLabels[rule.total_risk].color },
36
+ React.createElement(Label, { icon: riskLabels[rule.total_risk].icon, color: riskLabels[rule.total_risk].color },
37
37
  React.createElement(Trans, null, riskLabels[rule.total_risk].label))),
38
38
  React.createElement("p", null, rule.details || ''),
39
39
  rule.reason && (React.createElement(React.Fragment, null,
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { Button } from '@patternfly/react-core';
11
11
  import OutlinedThumbsDownIcon from '@patternfly/react-icons/dist/js/icons/outlined-thumbs-down-icon';
12
12
  import OutlinedThumbsUpIcon from '@patternfly/react-icons/dist/js/icons/outlined-thumbs-up-icon';
13
- import { getUserAgentForCaseMode } from '@rh-support/api';
14
13
  import { LoadingIndicator, ToastNotification } from '@rh-support/components';
14
+ import { getUserAgentForCaseMode } from '@rh-support/utils';
15
15
  import React, { useContext, useState } from 'react';
16
16
  import { Trans, useTranslation } from 'react-i18next';
17
17
  import { RouteContext } from '../../context/RouteContext';
@@ -8,9 +8,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { pcm } from '@cee-eng/hydrajs';
11
- import { getUserAgentForCaseMode } from '@rh-support/api';
12
11
  import { useDebounce, useDeepCompareDebounce, usePrevious } from '@rh-support/components';
13
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
+ import { getUserAgentForCaseMode } from '@rh-support/utils';
14
14
  import includes from 'lodash/includes';
15
15
  import isEmpty from 'lodash/isEmpty';
16
16
  import isEqual from 'lodash/isEqual';
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAmMjC"}
1
+ {"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AA0BA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAmMjC"}
@@ -1,5 +1,4 @@
1
- import { publicApi } from '@cee-eng/hydrajs';
2
- import { getEnvName } from '@rh-support/api';
1
+ import { Env, publicApi } from '@cee-eng/hydrajs';
3
2
  import { AlertMessage, AlertType, LoadingIndicator, useFetch } from '@rh-support/components';
4
3
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
5
4
  import { getConfigField, getRedhatDotComHost, getTimezoneOffsetFromTZName, PCM_CONFIG_FIELD_TYPE, } from '@rh-support/utils';
@@ -106,7 +105,7 @@ export default function SubmitCase() {
106
105
  : `${startTime.replace(':00.000Z', '')} - ${endTime.replace(':00.000Z', '')} (GMT${getTimezoneOffsetFromTZName(hours.name)})`)));
107
106
  })),
108
107
  React.createElement("p", null,
109
- React.createElement("a", { className: "btn btn-app btn-bordered", href: `${getRedhatDotComHost(getEnvName())}/wapps/ugc/protected/locale.html`, target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "update-preferences-case-submit" },
108
+ React.createElement("a", { className: "btn btn-app btn-bordered", href: `${getRedhatDotComHost(Env.getEnvName())}/wapps/ugc/protected/locale.html`, target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "update-preferences-case-submit" },
110
109
  React.createElement(Trans, null, "Update preferences"))))),
111
110
  !isEmpty(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(FileUploader, { idToUploadTo: caseNumber, isSessionId: false, isSecureSupport: loggedInUsersAccount.data.secureSupport }))))));
112
111
  }
@@ -52,18 +52,22 @@ export declare const markdownInlineFileSelectEvent = "PCM-Next > Markdown-toolba
52
52
  export declare const markdownFilePasteEvent = "PCM-Next > Markdown-toolbar-file-paste";
53
53
  export declare const riskLabels: {
54
54
  1: {
55
+ icon: JSX.Element;
55
56
  label: string;
56
57
  color: string;
57
58
  };
58
59
  2: {
60
+ icon: JSX.Element;
59
61
  label: string;
60
62
  color: string;
61
63
  };
62
64
  3: {
65
+ icon: JSX.Element;
63
66
  label: string;
64
67
  color: string;
65
68
  };
66
69
  4: {
70
+ icon: JSX.Element;
67
71
  label: string;
68
72
  color: string;
69
73
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,cAAc;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,sBAAsB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
1
+ {"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/Constants.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,wBA+BE;AAEF;;GAEG;AACH,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,cAAc;IAClB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,sBAAsB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC9C;AAED,eAAO,MAAM,8BAA8B,oDAAoD,CAAC;AAEhG,eAAO,MAAM,oCAAoC,wDAAwD,CAAC;AAC1G,eAAO,MAAM,6BAA6B,4CAA4C,CAAC;AACvF,eAAO,MAAM,sBAAsB,2CAA2C,CAAC;AAE/E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAKtB,CAAC"}
@@ -1,3 +1,8 @@
1
+ import AngleDoubleDownIcon from '@patternfly/react-icons/dist/js/icons/angle-double-down-icon';
2
+ import AngleDoubleUpIcon from '@patternfly/react-icons/dist/js/icons/angle-double-up-icon';
3
+ import CriticalRiskIcon from '@patternfly/react-icons/dist/js/icons/critical-risk-icon';
4
+ import EqualsIcon from '@patternfly/react-icons/dist/js/icons/equals-icon';
5
+ import React from 'react';
1
6
  export default {
2
7
  languagesMap: {
3
8
  en: 'English',
@@ -51,8 +56,8 @@ export const recsViewedFromNoAttachmentModalEvent = 'PCM-Next > No-Attachment-mo
51
56
  export const markdownInlineFileSelectEvent = 'PCM-Next > Markdown-toolbar-file-select';
52
57
  export const markdownFilePasteEvent = 'PCM-Next > Markdown-toolbar-file-paste';
53
58
  export const riskLabels = {
54
- 1: { label: 'Low', color: 'blue' },
55
- 2: { label: 'Moderate', color: 'orange' },
56
- 3: { label: 'Important', color: 'red' },
57
- 4: { label: 'Critical', color: 'red' },
59
+ 1: { icon: React.createElement(AngleDoubleDownIcon, null), label: 'Low', color: 'blue' },
60
+ 2: { icon: React.createElement(EqualsIcon, null), label: 'Moderate', color: 'gold' },
61
+ 3: { icon: React.createElement(AngleDoubleUpIcon, null), label: 'Important', color: 'orange' },
62
+ 4: { icon: React.createElement(CriticalRiskIcon, null), label: 'Critical', color: 'red' },
58
63
  };
@@ -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;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAW3D,OAAO,EAMH,UAAU,EAcb,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,KACvB,MAuBF,CAAC;AAIF,eAAO,MAAM,oBAAoB,UACtB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,KAC9B,MAQF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,MAKzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CA8B5B,CAAC;AAIF,eAAO,MAAM,gBAAgB,cAAe,UAAU,wBAAwB,QAAQ,eAAe,CAAC,KAAG,OA2BxG,CAAC;AAEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAiEtB,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,CA6BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eAyCF,CAAC"}
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;AAiB3D,OAAO,EAMH,UAAU,EAcb,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,KACvB,MAuBF,CAAC;AAIF,eAAO,MAAM,oBAAoB,UACtB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,KAC9B,MAQF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,MAKzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CA8B5B,CAAC;AAIF,eAAO,MAAM,gBAAgB,cAAe,UAAU,wBAAwB,QAAQ,eAAe,CAAC,KAAG,OA2BxG,CAAC;AAEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAiBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CAiEtB,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,CA6BtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eAyCF,CAAC"}
@@ -1,5 +1,4 @@
1
- import { getAppVersion, getUserAgentForCaseMode } from '@rh-support/api';
2
- import { canManageCase, isPremiumEntitlement, showFtsOnCreateCasePage } from '@rh-support/utils';
1
+ import { canManageCase, getAppVersion, getUserAgentForCaseMode, isPremiumEntitlement, showFtsOnCreateCasePage, } from '@rh-support/utils';
3
2
  import filter from 'lodash/filter';
4
3
  import forEach from 'lodash/forEach';
5
4
  import isEmpty from 'lodash/isEmpty';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.3.0",
3
+ "version": "0.3.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -28,12 +28,11 @@
28
28
  "peerDependencies": {
29
29
  "@cee-eng/hydrajs": "4.12.7",
30
30
  "@cee-eng/ui-toolkit": "1.1.6",
31
- "@patternfly/patternfly": "4.185.1",
31
+ "@patternfly/patternfly": "4.196.7",
32
32
  "@patternfly/pfe-accordion": "1.12.3",
33
33
  "@patternfly/pfe-collapse": "1.12.3",
34
34
  "@patternfly/pfe-tabs": "1.12.3",
35
35
  "@patternfly/react-core": "4.202.16",
36
- "@rh-support/api": "0.3.9",
37
36
  "@rh-support/components": "^0.1.3",
38
37
  "@rh-support/react-context": "^0.1.3",
39
38
  "@rh-support/types": "^0.1.3",
@@ -47,7 +46,7 @@
47
46
  "js-worker-search": "^1.4.1",
48
47
  "lazysizes": "^5.3.2",
49
48
  "localforage": "^1.7.3",
50
- "lodash": "^4.17.15",
49
+ "lodash": "^4.17.21",
51
50
  "mark.js": "^8.11.1",
52
51
  "marked": "^1.2.4",
53
52
  "qs": "^6.7.0",
@@ -65,7 +64,7 @@
65
64
  "dependencies": {
66
65
  "@cee-eng/hydrajs": "4.12.7",
67
66
  "@cee-eng/ui-toolkit": "1.1.6",
68
- "@patternfly/patternfly": "4.185.1",
67
+ "@patternfly/patternfly": "4.196.7",
69
68
  "@patternfly/pfe-accordion": "1.12.3",
70
69
  "@patternfly/pfe-collapse": "1.12.3",
71
70
  "@patternfly/pfe-icon": "^1.12.3",
@@ -73,12 +72,11 @@
73
72
  "@patternfly/react-core": "4.202.16",
74
73
  "@progress/kendo-drawing": "^1.6.0",
75
74
  "@progress/kendo-react-pdf": "^3.12.0",
76
- "@rh-support/api": "0.3.25",
77
- "@rh-support/components": "1.1.80",
78
- "@rh-support/react-context": "0.3.0",
75
+ "@rh-support/components": "1.1.83",
76
+ "@rh-support/react-context": "0.3.3",
79
77
  "@rh-support/types": "0.2.0",
80
- "@rh-support/user-permissions": "0.2.64",
81
- "@rh-support/utils": "0.2.47",
78
+ "@rh-support/user-permissions": "0.2.67",
79
+ "@rh-support/utils": "0.2.49",
82
80
  "@types/react-redux": "^7.1.12",
83
81
  "@types/redux": "^3.6.0",
84
82
  "@webcomponents/webcomponentsjs": "^2.2.10",
@@ -89,7 +87,7 @@
89
87
  "js-worker-search": "^1.4.1",
90
88
  "lazysizes": "^5.3.2",
91
89
  "localforage": "^1.7.3",
92
- "lodash": "^4.17.15",
90
+ "lodash": "^4.17.21",
93
91
  "mark.js": "^8.11.1",
94
92
  "marked": "^1.2.4",
95
93
  "qs": "^6.7.0",
@@ -119,7 +117,7 @@
119
117
  "@types/react-dom": "^17.0.9",
120
118
  "@types/react-i18next": "^8.1.0",
121
119
  "@types/react-router-dom": "^5.1.2",
122
- "faker": "^4.1.0",
120
+ "faker": "^5.5.3",
123
121
  "node-sass": "^4.14.1"
124
122
  },
125
123
  "scripts": {
@@ -143,5 +141,5 @@
143
141
  "not ie <= 11",
144
142
  "not op_mini all"
145
143
  ],
146
- "gitHead": "df9aba7f875d84c08c533f9ae63c4c7b325fe646"
144
+ "gitHead": "8ad6dda321ad690b179be7346240345a57f1749b"
147
145
  }