@rh-support/troubleshoot 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"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),
@@ -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":"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');
@@ -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
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseHelpers.d.ts","source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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.1",
3
+ "version": "0.3.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -33,7 +33,6 @@
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",
@@ -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.81",
78
- "@rh-support/react-context": "0.3.1",
75
+ "@rh-support/components": "1.1.82",
76
+ "@rh-support/react-context": "0.3.2",
79
77
  "@rh-support/types": "0.2.0",
80
- "@rh-support/user-permissions": "0.2.65",
81
- "@rh-support/utils": "0.2.48",
78
+ "@rh-support/user-permissions": "0.2.66",
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",
@@ -143,5 +141,5 @@
143
141
  "not ie <= 11",
144
142
  "not op_mini all"
145
143
  ],
146
- "gitHead": "e4bbdcf60f5ca9c6427a3655a7d264680c692b37"
144
+ "gitHead": "f69fb5ac2a9d8561d300a9e7f02456268d1e2fc7"
147
145
  }