@rh-support/troubleshoot 0.2.16 → 0.2.17

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":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAgMtD"}
1
+ {"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAwB/F,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAiMtD"}
@@ -29,7 +29,7 @@ const REOPEN_ESCALATION_MSG = 'Escalation reopened. A manager will review your r
29
29
  const CLOSURE_ESCALATION_MSG = 'Escalation closed.';
30
30
  export default function RMEEscalationList(props) {
31
31
  const { t } = useTranslation();
32
- const { request: updateEscalationRequest, isFetching: isUpdatingEscalation, } = useFetch(escalations.updateEscalations, { propgateErrors: true });
32
+ const { request: updateEscalationRequest, isFetching: isUpdatingEscalation } = useFetch(escalations.updateEscalations, { propgateErrors: true });
33
33
  const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
34
34
  propgateErrors: true,
35
35
  });
@@ -116,7 +116,7 @@ export default function RMEEscalationList(props) {
116
116
  }
117
117
  else {
118
118
  return (React.createElement(React.Fragment, null,
119
- React.createElement(Button, { variant: ButtonVariant.secondary, onClick: () => requestUpdateRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-update" },
119
+ React.createElement(Button, { className: "pf-u-ml-sm", variant: ButtonVariant.secondary, onClick: () => requestUpdateRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-update" },
120
120
  React.createElement(Trans, null, "Request Update")),
121
121
  React.createElement(Button, { variant: ButtonVariant.secondary, className: "pf-u-mt-sm pf-u-ml-sm", onClick: () => requestClosureRMEEscalation(escalation.name), "data-tracking-id": "case-details-rme-req-closure" },
122
122
  React.createElement(Trans, null, "Request Closure"))));
@@ -1 +1 @@
1
- {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eA+K1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"RHAssociatesSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/RHAssociatesSelector.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,MAAM;CAAG;AAG1B,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAiM1C;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -7,7 +7,7 @@ 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 { Button } from '@patternfly/react-core';
10
+ import { Button, Tooltip, TooltipPosition } from '@patternfly/react-core';
11
11
  import { ToastNotification } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
@@ -18,7 +18,7 @@ import isEmpty from 'lodash/isEmpty';
18
18
  import isEqual from 'lodash/isEqual';
19
19
  import map from 'lodash/map';
20
20
  import uniqBy from 'lodash/uniqBy';
21
- import React, { useContext, useState } from 'react';
21
+ import React, { useContext, useRef, useState } from 'react';
22
22
  import { Token } from 'react-bootstrap-typeahead';
23
23
  import { Trans, useTranslation } from 'react-i18next';
24
24
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
@@ -101,6 +101,7 @@ function RHAssociatesSelector(props) {
101
101
  return (React.createElement(Token, { key: idx, onRemove: props.onRemove, disabled: disabled, option: option }, props.labelKey(option)));
102
102
  };
103
103
  const canNotifyRHAssociates = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.NOTIFY_RH_ASSOCIATES);
104
+ const toolTipRef = useRef();
104
105
  if (!canNotifyRHAssociates)
105
106
  return React.createElement(React.Fragment, null);
106
107
  return (React.createElement(React.Fragment, null, canNotifyRHAssociates && (React.createElement("div", { className: "form-group" },
@@ -112,10 +113,10 @@ function RHAssociatesSelector(props) {
112
113
  }, placeholder: t(`Add watchers to this case`), onSelect: onNotifiedUserChange, renderToken: renderToken, isUpdating: isRHAssociatesUpdating }),
113
114
  caseNumber && showAddWatchButton() && (React.createElement(Button, { variant: "secondary", onClick: addCurrentUser, type: "button", "data-tracking-id": "case-add-me-rh-watcher" },
114
115
  React.createElement(Trans, null, "Add me as a watcher"))),
115
- caseNumber && showRemoveWatchButton() && (React.createElement("span", { title: isCurrentUserCaseContact
116
- ? t('You are case contact and therefore you cannot be removed as watcher')
117
- : '' },
118
- React.createElement(Button, { variant: isCurrentUserCaseContact ? 'tertiary' : 'secondary', onClick: removeCurrentUser, type: "button", isDisabled: isCurrentUserCaseContact, "data-tracking-id": "case-remove-me-rh-watcher" },
119
- React.createElement(Trans, null, "Remove me as a watcher"))))))));
116
+ caseNumber && showRemoveWatchButton() && (React.createElement("div", { ref: toolTipRef, className: "remove-me-as-watcher pf-u-display-inline-block" }, isCurrentUserCaseContact ? (React.createElement(React.Fragment, null,
117
+ React.createElement(Tooltip, { trigger: 'mouseenter focus', reference: toolTipRef, position: TooltipPosition.top, content: React.createElement(Trans, null, "You are case contact and therefore you cannot be removed as watcher") }),
118
+ React.createElement(Button, { variant: "tertiary", onClick: removeCurrentUser, type: "button", isDisabled: true, "data-tracking-id": "case-remove-me-rh-watcher" },
119
+ React.createElement(Trans, null, "Remove me as a watcher")))) : (React.createElement(Button, { variant: "secondary", onClick: removeCurrentUser, type: "button", "data-tracking-id": "case-remove-me-rh-watcher" },
120
+ React.createElement(Trans, null, "Remove me as a watcher")))))))));
120
121
  }
121
122
  export { RHAssociatesSelector };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -73,8 +73,8 @@
73
73
  "@progress/kendo-drawing": "^1.6.0",
74
74
  "@progress/kendo-react-pdf": "^3.12.0",
75
75
  "@rh-support/api": "0.3.3",
76
- "@rh-support/components": "1.1.8",
77
- "@rh-support/react-context": "0.2.9",
76
+ "@rh-support/components": "1.1.9",
77
+ "@rh-support/react-context": "0.2.10",
78
78
  "@rh-support/types": "0.2.0",
79
79
  "@rh-support/user-permissions": "0.2.5",
80
80
  "@rh-support/utils": "0.2.5",
@@ -142,5 +142,5 @@
142
142
  "not ie <= 11",
143
143
  "not op_mini all"
144
144
  ],
145
- "gitHead": "4c0ad3d02e935d663992c02c03bf438a2b22bfa9"
145
+ "gitHead": "27553f3c53998d0f3657c7e2f04b2eacdcda00c2"
146
146
  }