@rh-support/cases 2.1.120 → 2.2.0-alpha.0

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":"CreatorSsoNameFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CreatorSsoNameFilter.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,eAAO,MAAM,WAAW,0BAIvB,CAAC;AAYF,eAAO,MAAM,eAAe;;;;;;;GAA6E,CAAC;AAE1G,eAAO,MAAM,kBAAkB,iEAyC9B,CAAC;AAEF,wBAAgB,oBAAoB,sBA4PnC"}
1
+ {"version":3,"file":"CreatorSsoNameFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CreatorSsoNameFilter.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,eAAO,MAAM,WAAW,0BAIvB,CAAC;AAYF,eAAO,MAAM,eAAe;;;;;;;GAA6E,CAAC;AAE1G,eAAO,MAAM,kBAAkB,iEAyC9B,CAAC;AAEF,wBAAgB,oBAAoB,sBA2PnC"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { accounts } from '@cee-eng/hydrajs';
11
- import { Button, MenuToggle, Select, SelectGroup, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, Truncate, } from '@patternfly/react-core';
11
+ import { Button, MenuToggle, Select, SelectGroup, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
12
12
  import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
13
13
  import { LoadingIndicator, useFetch, useSelectKeyboardNavigator } from '@rh-support/components';
14
14
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
@@ -184,16 +184,14 @@ export function CreatorSsoNameFilter() {
184
184
  React.createElement(Trans, null, "No results found")),
185
185
  ]
186
186
  : []),
187
- ...dropdownHeader.map((contact, index) => (React.createElement(SelectOption, { key: contact.value, isFocused: focusedItemIndex === index, value: contact, hasCheckbox: true, isSelected: selectedExternalContacts.some((c) => c.value === contact.value) },
188
- React.createElement(Truncate, { content: contact.label })))),
187
+ ...dropdownHeader.map((contact, index) => (React.createElement(SelectOption, { key: contact.value, isFocused: focusedItemIndex === index, value: contact, hasCheckbox: true, isSelected: selectedExternalContacts.some((c) => c.value === contact.value) }, contact.label))),
189
188
  ...(!isEmpty(filteredOptions)
190
189
  ? [
191
190
  React.createElement("div", { className: "pf-v5-c-divider", role: "separator", key: "separator" }),
192
191
  React.createElement(SelectGroup, { key: "created-or-owned-by-accounts-group" },
193
192
  React.createElement("h6", { className: "pf-v5-u-pl-md" },
194
193
  React.createElement(Trans, null, "Created or owned by")),
195
- filteredOptions.map((contact, index) => (React.createElement(SelectOption, { key: contact.value, isFocused: focusedItemIndex === index + dropdownHeader.length, value: contact, hasCheckbox: true, isSelected: selectedExternalContacts.some((c) => c.value === contact.value) },
196
- React.createElement(Truncate, { content: contact.label }))))),
194
+ filteredOptions.map((contact, index) => (React.createElement(SelectOption, { key: contact.value, isFocused: focusedItemIndex === index + dropdownHeader.length, value: contact, hasCheckbox: true, isSelected: selectedExternalContacts.some((c) => c.value === contact.value) }, contact.label)))),
197
195
  ]
198
196
  : []),
199
197
  ];
@@ -202,8 +200,7 @@ export function CreatorSsoNameFilter() {
202
200
  const onExternalQueryChange = (_v, query) => {
203
201
  setExternalQuery(query);
204
202
  };
205
- const onExternalToggle = (e) => {
206
- e.stopPropagation();
203
+ const onExternalToggle = () => {
207
204
  setIsExternalOpen((pre) => !pre);
208
205
  };
209
206
  const externalToggle = (toggleRef) => (React.createElement(MenuToggle, { variant: "typeahead", onClick: onExternalToggle, innerRef: toggleRef, isExpanded: isExternalOpen, isFullWidth: true },
@@ -29,8 +29,7 @@ export function GroupsFilter() {
29
29
  const [isOpen, setIsOpen] = useState(false);
30
30
  const [selectedItems, setSelectedItems] = useState({});
31
31
  const textInputRef = useRef();
32
- const onToggleClick = (e) => {
33
- e.stopPropagation();
32
+ const onToggleClick = () => {
34
33
  setIsOpen(!isOpen);
35
34
  };
36
35
  const onSelect = (option) => {
@@ -1 +1 @@
1
- {"version":3,"file":"InternalSsoNameFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/InternalSsoNameFilter.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBA+R5C"}
1
+ {"version":3,"file":"InternalSsoNameFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/InternalSsoNameFilter.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,qBAAqB,sBA8R5C"}
@@ -194,8 +194,7 @@ export default function InternalSsoNameFilter() {
194
194
  setInternalQuery(query);
195
195
  onSearchAsync(query);
196
196
  };
197
- const onInternalToggle = (e) => {
198
- e.stopPropagation();
197
+ const onInternalToggle = () => {
199
198
  setIsInternalOpen((pre) => !pre);
200
199
  };
201
200
  const internalToggle = (toggleRef) => (React.createElement(MenuToggle, { variant: "typeahead", onClick: onInternalToggle, innerRef: toggleRef, isExpanded: isInternalOpen, isFullWidth: true },
@@ -1 +1 @@
1
- {"version":3,"file":"CloseCaseBtn.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CloseCaseBtn.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,UAAU,MAAM;IACZ,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC;AAUD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAAE,MAAM,qBAsF5F"}
1
+ {"version":3,"file":"CloseCaseBtn.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CloseCaseBtn.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,UAAU,MAAM;IACZ,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC;AAUD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAAE,MAAM,qBAkF5F"}
@@ -11,7 +11,7 @@ import { publicApi } from '@cee-eng/hydrajs';
11
11
  import { Button } from '@patternfly/react-core';
12
12
  import { ToastNotification, useFetch } from '@rh-support/components';
13
13
  import { CloseCaseModal, useCanCreateCase } from '@rh-support/react-context';
14
- import { dtmTrackEventCaseStepEncountered } from '@rh-support/utils';
14
+ import { dtmTrackEvent } from '@rh-support/utils';
15
15
  import React, { useState } from 'react';
16
16
  import { Trans, useTranslation } from 'react-i18next';
17
17
  const MAX_ALLOWED_CASES = 5;
@@ -43,9 +43,7 @@ export default function CloseCaseBtn({ selectedCases, caseList, onCasesCloseSucc
43
43
  const promiseArr = [];
44
44
  setIsModalOpen(false);
45
45
  const toastId = ToastNotification.addSuccessMessage(t(`Closing selected cases`));
46
- selectedCases.forEach((caseNumber, i) => {
47
- const product = caseList[i].case_product[0];
48
- const version = caseList[i].case_version;
46
+ selectedCases.forEach((caseNumber) => {
49
47
  const p = request(caseNumber, { status: 'Closed' });
50
48
  promiseArr.push(p);
51
49
  p.then((res) => __awaiter(this, void 0, void 0, function* () {
@@ -57,8 +55,7 @@ export default function CloseCaseBtn({ selectedCases, caseList, onCasesCloseSucc
57
55
  });
58
56
  ToastNotification.clearToast(toastId);
59
57
  ToastNotification.addSuccessMessage(t('Case {{caseNumber}} successfully closed', { caseNumber }));
60
- // Only call dtm track event only when the case has been closed successfully.
61
- dtmTrackEventCaseStepEncountered('close', caseNumber, product, version);
58
+ dtmTrackEvent('case closed', 'case closed - case list page', caseNumber, '');
62
59
  }), (err) => {
63
60
  ToastNotification.clearToast(toastId);
64
61
  ToastNotification.addDangerMessage(t('Could not close case {{caseNumber}}', { caseNumber }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/cases",
3
- "version": "2.1.120",
3
+ "version": "2.2.0-alpha.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,7 +26,7 @@
26
26
  "lib/**/*"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@cee-eng/hydrajs": "4.17.27",
29
+ "@cee-eng/hydrajs": "4.17.26",
30
30
  "@patternfly/patternfly": "5.4.0",
31
31
  "@patternfly/react-core": "5.4.0",
32
32
  "@patternfly/react-table": "5.4.0",
@@ -39,15 +39,15 @@
39
39
  "solr-query-builder": "1.0.1"
40
40
  },
41
41
  "dependencies": {
42
- "@cee-eng/hydrajs": "4.17.27",
42
+ "@cee-eng/hydrajs": "4.17.26",
43
43
  "@patternfly/patternfly": "5.4.0",
44
44
  "@patternfly/react-core": "5.4.0",
45
45
  "@patternfly/react-table": "5.4.0",
46
- "@rh-support/components": "2.1.93",
47
- "@rh-support/react-context": "2.1.102",
46
+ "@rh-support/components": "2.2.0-alpha.0",
47
+ "@rh-support/react-context": "2.2.0-alpha.0",
48
48
  "@rh-support/types": "2.0.5",
49
- "@rh-support/user-permissions": "2.1.57",
50
- "@rh-support/utils": "2.1.46",
49
+ "@rh-support/user-permissions": "2.2.0-alpha.0",
50
+ "@rh-support/utils": "2.2.0-alpha.0",
51
51
  "localforage": "^1.10.0",
52
52
  "lodash": "^4.17.21",
53
53
  "pegjs": "^0.10.0",
@@ -96,5 +96,5 @@
96
96
  "defaults and supports es6-module",
97
97
  "maintained node versions"
98
98
  ],
99
- "gitHead": "441d2489eca03e52a4c437c41638e5e0ae5338c3"
99
+ "gitHead": "adbfb4aacbf67de864e57d292d02fedc7589567b"
100
100
  }