@rh-support/cases 2.6.173 → 2.6.181

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 (79) hide show
  1. package/lib/esm/components/case-list/CaseList.d.ts +0 -7
  2. package/lib/esm/components/case-list/CaseList.d.ts.map +1 -1
  3. package/lib/esm/components/case-list/CaseList.js +143 -108
  4. package/lib/esm/components/case-list/CaseListContext.d.ts.map +1 -1
  5. package/lib/esm/components/case-list/CaseListContext.js +5 -2
  6. package/lib/esm/components/case-list/CaseListFilterReducer.d.ts +6 -4
  7. package/lib/esm/components/case-list/CaseListFilterReducer.d.ts.map +1 -1
  8. package/lib/esm/components/case-list/CaseListFilterReducer.js +3 -12
  9. package/lib/esm/components/case-list/CaseListReducer.d.ts +22 -10
  10. package/lib/esm/components/case-list/CaseListReducer.d.ts.map +1 -1
  11. package/lib/esm/components/case-list/CaseListReducer.js +25 -7
  12. package/lib/esm/components/case-list/case-list-filters/AccountsFilter.d.ts.map +1 -1
  13. package/lib/esm/components/case-list/case-list-filters/AccountsFilter.js +18 -11
  14. package/lib/esm/components/case-list/case-list-filters/AdditionalFilters.d.ts.map +1 -1
  15. package/lib/esm/components/case-list/case-list-filters/AdditionalFilters.js +4 -2
  16. package/lib/esm/components/case-list/case-list-filters/CaseListFilterChips.d.ts +1 -7
  17. package/lib/esm/components/case-list/case-list-filters/CaseListFilterChips.d.ts.map +1 -1
  18. package/lib/esm/components/case-list/case-list-filters/CaseListFilterChips.js +7 -15
  19. package/lib/esm/components/case-list/case-list-filters/CaseListFilters.d.ts +2 -5
  20. package/lib/esm/components/case-list/case-list-filters/CaseListFilters.d.ts.map +1 -1
  21. package/lib/esm/components/case-list/case-list-filters/CaseListFilters.js +14 -14
  22. package/lib/esm/components/case-list/case-list-filters/ProductFilterChip.d.ts +1 -3
  23. package/lib/esm/components/case-list/case-list-filters/ProductFilterChip.d.ts.map +1 -1
  24. package/lib/esm/components/case-list/case-list-filters/ProductFilterChip.js +2 -2
  25. package/lib/esm/components/case-list/case-list-filters/ProductsFilter.d.ts +5 -4
  26. package/lib/esm/components/case-list/case-list-filters/ProductsFilter.d.ts.map +1 -1
  27. package/lib/esm/components/case-list/case-list-filters/ProductsFilter.js +15 -54
  28. package/lib/esm/components/case-list/case-list-filters/SeverityFilter.d.ts +0 -3
  29. package/lib/esm/components/case-list/case-list-filters/SeverityFilter.d.ts.map +1 -1
  30. package/lib/esm/components/case-list/case-list-filters/SeverityFilter.js +18 -44
  31. package/lib/esm/components/case-list/case-list-filters/StatusFilter.d.ts +0 -3
  32. package/lib/esm/components/case-list/case-list-filters/StatusFilter.d.ts.map +1 -1
  33. package/lib/esm/components/case-list/case-list-filters/StatusFilter.js +14 -44
  34. package/lib/esm/components/case-list/case-list-filters/VersionsFilter.d.ts +1 -3
  35. package/lib/esm/components/case-list/case-list-filters/VersionsFilter.d.ts.map +1 -1
  36. package/lib/esm/components/case-list/case-list-filters/VersionsFilter.js +61 -32
  37. package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts +7 -3
  38. package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts.map +1 -1
  39. package/lib/esm/components/case-list/case-list-table/CaseListTable.js +69 -58
  40. package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.d.ts +0 -5
  41. package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.d.ts.map +1 -1
  42. package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.js +38 -68
  43. package/lib/esm/components/case-list/case-list-table/ExportCaseListCSV.d.ts.map +1 -1
  44. package/lib/esm/components/case-list/case-list-table/ExportCaseListCSV.js +5 -15
  45. package/lib/esm/components/case-list/case-list-table/SeverityLabel.js +1 -1
  46. package/lib/esm/components/case-list/case-list-table/TableActionsDropdown.d.ts.map +1 -1
  47. package/lib/esm/components/case-list/case-list-table/TableActionsDropdown.js +2 -3
  48. package/lib/esm/components/case-list/case-search/BookmarkedSearchesSelector.d.ts.map +1 -1
  49. package/lib/esm/components/case-list/case-search/BookmarkedSearchesSelector.js +1 -0
  50. package/lib/esm/components/case-list/case-search/CaseSearch.d.ts.map +1 -1
  51. package/lib/esm/components/case-list/case-search/CaseSearch.js +6 -6
  52. package/lib/esm/components/case-list/case-search/useAdvanceSearchParser.d.ts.map +1 -1
  53. package/lib/esm/components/case-list/case-search/useAdvanceSearchParser.js +2 -1
  54. package/lib/esm/css/caseList.css +99 -22
  55. package/lib/esm/enums/case.d.ts +2 -1
  56. package/lib/esm/enums/case.d.ts.map +1 -1
  57. package/lib/esm/enums/case.js +14 -1
  58. package/lib/esm/hooks/useExportCaseListCSV.d.ts.map +1 -1
  59. package/lib/esm/hooks/useExportCaseListCSV.js +1 -9
  60. package/lib/esm/test-utils/mockData.js +1 -1
  61. package/lib/esm/utils/caseListGraphQLUtils.d.ts +28 -0
  62. package/lib/esm/utils/caseListGraphQLUtils.d.ts.map +1 -0
  63. package/lib/esm/utils/caseListGraphQLUtils.js +244 -0
  64. package/lib/esm/utils/caseListMapper.d.ts +6 -0
  65. package/lib/esm/utils/caseListMapper.d.ts.map +1 -0
  66. package/lib/esm/utils/caseListMapper.js +36 -0
  67. package/lib/esm/utils/caseListVariablesBuilder.d.ts +14 -0
  68. package/lib/esm/utils/caseListVariablesBuilder.d.ts.map +1 -0
  69. package/lib/esm/utils/caseListVariablesBuilder.js +193 -0
  70. package/lib/esm/utils/caseSearchUtils.d.ts.map +1 -1
  71. package/lib/esm/utils/caseSearchUtils.js +26 -1
  72. package/lib/esm/utils/constants.d.ts +2 -1
  73. package/lib/esm/utils/constants.d.ts.map +1 -1
  74. package/lib/esm/utils/constants.js +14 -3
  75. package/lib/esm/utils/mockSolrResponse.js +1 -1
  76. package/lib/esm/utils/statusUtils.d.ts +3 -0
  77. package/lib/esm/utils/statusUtils.d.ts.map +1 -0
  78. package/lib/esm/utils/statusUtils.js +22 -0
  79. package/package.json +6 -5
@@ -1,12 +1,18 @@
1
1
  var CaseListReducerEnum;
2
2
  (function (CaseListReducerEnum) {
3
3
  CaseListReducerEnum["updateState"] = "SET_STATE";
4
+ CaseListReducerEnum["appendDocs"] = "APPEND_DOCS";
4
5
  })(CaseListReducerEnum || (CaseListReducerEnum = {}));
5
6
  const caseListReducer = (state, action) => {
6
7
  switch (action.type) {
7
8
  case CaseListReducerEnum.updateState: {
8
9
  return Object.assign(Object.assign({}, state), action.payload);
9
10
  }
11
+ case CaseListReducerEnum.appendDocs: {
12
+ const { docs, hasNextPage, endCursor } = action.payload;
13
+ return Object.assign(Object.assign({}, state), { caseList: Object.assign(Object.assign({}, state.caseList), { docs: [...state.caseList.docs, ...docs] }), hasNextPage,
14
+ endCursor, isLoadingMore: false });
15
+ }
10
16
  }
11
17
  };
12
18
  const setCaseList = (dispatch, caseList) => {
@@ -27,22 +33,34 @@ const setIsFetching = (dispatch, isFetching) => {
27
33
  payload: { isFetching },
28
34
  });
29
35
  };
30
- const setFilterValuesFromFacetResponse = (dispatch, filterValuesFromFacetResponse) => {
36
+ const setCurrentQuery = (dispatch, currentQuery) => {
31
37
  dispatch({
32
38
  type: CaseListReducerEnum.updateState,
33
- payload: { filterValuesFromFacetResponse },
39
+ payload: { currentQuery },
34
40
  });
35
41
  };
36
- const setPivotValues = (dispatch, pivotValues) => {
42
+ const setIsLoadingMore = (dispatch, isLoadingMore) => {
37
43
  dispatch({
38
44
  type: CaseListReducerEnum.updateState,
39
- payload: { pivotValues },
45
+ payload: { isLoadingMore },
40
46
  });
41
47
  };
42
- const setCurrentQuery = (dispatch, currentQuery) => {
48
+ const appendCaseList = (dispatch, docs, hasNextPage, endCursor) => {
49
+ dispatch({
50
+ type: CaseListReducerEnum.appendDocs,
51
+ payload: { docs, hasNextPage, endCursor },
52
+ });
53
+ };
54
+ const setCursorInfo = (dispatch, hasNextPage, endCursor) => {
43
55
  dispatch({
44
56
  type: CaseListReducerEnum.updateState,
45
- payload: { currentQuery },
57
+ payload: { hasNextPage, endCursor },
58
+ });
59
+ };
60
+ const setLoadMoreError = (dispatch, loadMoreError, loadMoreRetryCount) => {
61
+ dispatch({
62
+ type: CaseListReducerEnum.updateState,
63
+ payload: { loadMoreError, loadMoreRetryCount, isLoadingMore: false },
46
64
  });
47
65
  };
48
- export { caseListReducer, setCaseList, setChipsNameSsoMap, setIsFetching, setFilterValuesFromFacetResponse, setPivotValues, setCurrentQuery, };
66
+ export { caseListReducer, setCaseList, setChipsNameSsoMap, setIsFetching, setCurrentQuery, setIsLoadingMore, appendCaseList, setCursorInfo, setLoadMoreError, };
@@ -1 +1 @@
1
- {"version":3,"file":"AccountsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AccountsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAQ1F,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,UAAU,MAAM;IACZ,uBAAuB,EAAE,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,gCAAgC,GAAI,SAAS,QAAQ,WAMjE,CAAC;AACF,eAAO,MAAM,+BAA+B,GAAI,SAAS,OAAO,CAAC,sBAAsB,CAAC,WAEvF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,cAAS,EAAE,eAAU,QACgC,CAAC;AAE/E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBA+F3C"}
1
+ {"version":3,"file":"AccountsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AccountsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAO1F,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,UAAU,MAAM;IACZ,uBAAuB,EAAE,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,gCAAgC,GAAI,SAAS,QAAQ,WAMjE,CAAC;AACF,eAAO,MAAM,+BAA+B,GAAI,SAAS,OAAO,CAAC,sBAAsB,CAAC,WAEvF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,cAAS,EAAE,eAAU,QACgC,CAAC;AAE/E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAqG3C"}
@@ -7,9 +7,9 @@ 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 { accounts } from '@cee-eng/hydrajs';
10
+ import { useApolloClient } from '@apollo/client/react';
11
11
  import { AccountSelectorInternal } from '@rh-support/react-context';
12
- import { getDropdownBtnPlaceholder } from '@rh-support/utils';
12
+ import { getDropdownBtnPlaceholder, SEARCH_ACCOUNTS } from '@rh-support/utils';
13
13
  import differenceBy from 'lodash/differenceBy';
14
14
  import filter from 'lodash/filter';
15
15
  import remove from 'lodash/remove';
@@ -35,6 +35,7 @@ export function AccountsFilter(props) {
35
35
  const { canReadBookmarkAccounts } = props;
36
36
  const { filterInfo } = useContext(CaseListFilterStateContext);
37
37
  const dispatch = useContext(CaseListFilterDispatchContext);
38
+ const apolloClient = useApolloClient();
38
39
  const selectedAccounts = useMemo(() => filterInfo[SolrKeys.accountNumber]
39
40
  .filter((item) => !Array.isArray(item.key))
40
41
  .map((item) => ({
@@ -67,20 +68,26 @@ export function AccountsFilter(props) {
67
68
  return;
68
69
  function getAccountsWithoutNames() {
69
70
  return __awaiter(this, void 0, void 0, function* () {
71
+ var _a, _b, _c, _d;
70
72
  const allSelected = [...filterInfo[SolrKeys.accountNumber]];
71
73
  const accountsWithoutNames = remove(allSelected, (item) => item.key === item.value);
72
74
  if (accountsWithoutNames.length < 1)
73
75
  return;
74
- const fields = ['accountNumber', 'accountId', 'name'].join(',');
75
- const params = {
76
- fields,
77
- orderBy: 'name',
78
- orderDirection: 'asc',
79
- accountNumberIn: accountsWithoutNames.map((item) => item.key).join(','),
80
- };
76
+ const accountNumbers = accountsWithoutNames.map((item) => item.key);
81
77
  try {
82
- const accountsDetail = yield accounts.getAccounts(params);
83
- const keyValueMap = accountsDetail.items.map((item) => ({ key: item.accountNumber, value: item.name }));
78
+ const { data } = yield apolloClient.query({
79
+ query: SEARCH_ACCOUNTS,
80
+ variables: {
81
+ where: { AccountNumber: { in: accountNumbers } },
82
+ first: accountNumbers.length,
83
+ },
84
+ fetchPolicy: 'network-only',
85
+ });
86
+ const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
87
+ const keyValueMap = edges.map((edge) => ({
88
+ key: edge.node.AccountNumber.value,
89
+ value: edge.node.Name.value,
90
+ }));
84
91
  updateFilter(dispatch, {
85
92
  filterKey: SolrKeys.accountNumber,
86
93
  values: [...keyValueMap, ...allSelected],
@@ -1 +1 @@
1
- {"version":3,"file":"AdditionalFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AdditionalFilters.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,wBAAgB,iBAAiB,sBAwFhC"}
1
+ {"version":3,"file":"AdditionalFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/AdditionalFilters.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,wBAAgB,iBAAiB,sBA6FhC"}
@@ -19,6 +19,8 @@ export function AdditionalFilters() {
19
19
  });
20
20
  setIsEscalated(checked);
21
21
  };
22
+ // @ts-ignore - kept for future use when GraphQL supports private cases filter
23
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
24
  const onisPrivateChange = (checked) => {
23
25
  updateFilter(dispatch, {
24
26
  filterKey: SolrKeys.isPrivate,
@@ -26,6 +28,7 @@ export function AdditionalFilters() {
26
28
  });
27
29
  setIsPrivate(checked);
28
30
  };
31
+ void onisPrivateChange;
29
32
  useEffect(() => {
30
33
  var _a, _b;
31
34
  updateFilter(dispatch, {
@@ -62,6 +65,5 @@ export function AdditionalFilters() {
62
65
  React.createElement("div", { className: "additional-filters" },
63
66
  React.createElement("h3", null,
64
67
  React.createElement(Trans, null, "More")),
65
- React.createElement(Checkbox, { label: t(AdditionalFilterLabels[SolrKeys.escalation]), isChecked: escalated, onChange: (_event, checked) => onEscalatedChange(checked), "aria-label": t(AdditionalFilterLabels[SolrKeys.escalation]), id: "escalated", name: "escalated", "data-tracking-id": "escalated-filter-selector" }),
66
- React.createElement(Checkbox, { label: t(AdditionalFilterLabels[SolrKeys.isPrivate]), isChecked: isPrivate, onChange: (_event, checked) => onisPrivateChange(checked), "aria-label": t(AdditionalFilterLabels[SolrKeys.isPrivate]), id: "private", name: "private", "data-tracking-id": "private-filter-selector" }))));
68
+ React.createElement(Checkbox, { label: t(AdditionalFilterLabels[SolrKeys.escalation]), isChecked: escalated, onChange: (_event, checked) => onEscalatedChange(checked), "aria-label": t(AdditionalFilterLabels[SolrKeys.escalation]), id: "escalated", name: "escalated", "data-tracking-id": "escalated-filter-selector" }))));
67
69
  }
@@ -1,9 +1,3 @@
1
1
  import React from 'react';
2
- import { IProductVersionPivotMap } from '../CaseList';
3
- interface IProps {
4
- productVersionPivotValues: IProductVersionPivotMap[];
5
- isSolrSearchDown: boolean;
6
- }
7
- export declare function CaseListFilterChips(props: IProps): React.JSX.Element;
8
- export {};
2
+ export declare function CaseListFilterChips(): React.JSX.Element;
9
3
  //# sourceMappingURL=CaseListFilterChips.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseListFilterChips.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilterChips.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAMtD,UAAU,MAAM;IACZ,yBAAyB,EAAE,uBAAuB,EAAE,CAAC;IACrD,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmIhD"}
1
+ {"version":3,"file":"CaseListFilterChips.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilterChips.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,wBAAgB,mBAAmB,sBAwHlC"}
@@ -7,11 +7,10 @@ import { Trans } from 'react-i18next';
7
7
  import { ProductVersionKey, SolrKeys, SolrPivotKeys } from '../../../enums/filters';
8
8
  import { filterNamesMap } from '../../../utils/constants';
9
9
  import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
10
- import { visibleFilterChipsWhenSolrDownSfdcUp } from '../CaseListFilterHelpers';
11
10
  import { clearFilters, removeFilterItem } from '../CaseListFilterReducer';
12
11
  import { CreatorSsoNameFilterChip } from './CreatorSsoNameFilterChip';
13
12
  import { ProductFilterChip } from './ProductFilterChip';
14
- export function CaseListFilterChips(props) {
13
+ export function CaseListFilterChips() {
15
14
  const { filterInfo } = useContext(CaseListFilterStateContext);
16
15
  const dispatch = useContext(CaseListFilterDispatchContext);
17
16
  const currentFilterLength = flatMap(filterInfo).length;
@@ -37,15 +36,10 @@ export function CaseListFilterChips(props) {
37
36
  };
38
37
  const getChipGroupForFilter = (filterKey, filterValues, groupName = '') => {
39
38
  const caseTypeFilter = filterKey === 'case_type' ? toNewCaseTypeMapper(filterValues) : filterValues;
40
- if (props.isSolrSearchDown && !visibleFilterChipsWhenSolrDownSfdcUp.includes(filterKey)) {
41
- return React.createElement(React.Fragment, null);
42
- }
43
- else {
44
- return (React.createElement("div", { className: "filter-chip", key: `${filterKey}-bookmarks-${groupName}` },
45
- React.createElement("span", { className: "filter-chip__heading" },
46
- React.createElement(Trans, null, groupName || filterNamesMap[filterKey] || filterKey)),
47
- React.createElement(LabelGroup, { numLabels: 7, className: "pf-v6-c-chip-group__simple" }, renderFilterValueChips(filterKey, caseTypeFilter, groupName))));
48
- }
39
+ return (React.createElement("div", { className: "filter-chip", key: `${filterKey}-bookmarks-${groupName}` },
40
+ React.createElement("span", { className: "filter-chip__heading" },
41
+ React.createElement(Trans, null, groupName || filterNamesMap[filterKey] || filterKey)),
42
+ React.createElement(LabelGroup, { numLabels: 7, className: "pf-v6-c-chip-group__simple" }, renderFilterValueChips(filterKey, caseTypeFilter, groupName))));
49
43
  };
50
44
  const renderAccountFilterChip = () => {
51
45
  const visibleChips = [];
@@ -86,10 +80,8 @@ export function CaseListFilterChips(props) {
86
80
  return (React.createElement(React.Fragment, null, isAnyFilterApplied && (React.createElement("div", { className: "filter-chip-wrapper" },
87
81
  React.createElement("h2", null, "Filtering by"),
88
82
  React.createElement("div", { className: "filter-chips" },
89
- Array.isArray(filterInfo[ProductVersionKey]) && filterInfo[ProductVersionKey].length > 0 && (React.createElement(ProductFilterChip, { productList: props.isSolrSearchDown && filterInfo[ProductVersionKey].length > 1
90
- ? [filterInfo[ProductVersionKey][0]]
91
- : filterInfo[ProductVersionKey], productVersionPivot: props.productVersionPivotValues })),
92
- !props.isSolrSearchDown && showUsernameFilter && React.createElement(CreatorSsoNameFilterChip, null),
83
+ Array.isArray(filterInfo[ProductVersionKey]) && filterInfo[ProductVersionKey].length > 0 && (React.createElement(ProductFilterChip, { productList: filterInfo[ProductVersionKey] })),
84
+ showUsernameFilter && React.createElement(CreatorSsoNameFilterChip, null),
93
85
  renderChips(),
94
86
  currentFilterLength > 1 && (React.createElement(Button, { variant: "link", isInline: true, onClick: clearAllFilters, "data-tracking-id": "case-list-clear-filters", className: "clear-filters" },
95
87
  React.createElement(Trans, null, "Clear all filters"))))))));
@@ -1,15 +1,12 @@
1
1
  import { IApiResponseDetails } from '@rh-support/types/shared';
2
- import { ISolrResponseToFacetFields, ITroubleshootProductResponse } from '@rh-support/utils';
2
+ import { ITroubleshootProductResponse } from '@rh-support/utils';
3
3
  import React from 'react';
4
- import { IFacetFields } from '../../../models/caseList';
5
4
  interface IProps {
6
- filterValues: ISolrResponseToFacetFields<IFacetFields>;
7
- isSolrSearchDown: boolean;
8
5
  allCaseTypes: IApiResponseDetails<string[]>;
9
6
  allCaseStatuses: IApiResponseDetails<string[]>;
10
7
  allCaseSeverities: IApiResponseDetails<string[]>;
11
8
  allProducts: IApiResponseDetails<ITroubleshootProductResponse>;
12
9
  }
13
- export declare const CaseListFilters: ({ filterValues, allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts, isSolrSearchDown, }: IProps) => React.JSX.Element;
10
+ export declare const CaseListFilters: ({ allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts }: IProps) => React.JSX.Element;
14
11
  export {};
15
12
  //# sourceMappingURL=CaseListFilters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CaseListFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAE7F,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAWxD,UAAU,MAAM;IACZ,YAAY,EAAE,0BAA0B,CAAC,YAAY,CAAC,CAAC;IACvD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,eAAe,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/C,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,WAAW,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;CAClE;AAID,eAAO,MAAM,eAAe,GAAI,oGAO7B,MAAM,sBA2ER,CAAC"}
1
+ {"version":3,"file":"CaseListFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,UAAU,MAAM;IACZ,YAAY,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,eAAe,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/C,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,WAAW,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;CAClE;AAED,eAAO,MAAM,eAAe,GAAI,mEAAmE,MAAM,sBAmExG,CAAC"}
@@ -1,7 +1,5 @@
1
1
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
2
- import get from 'lodash/get';
3
2
  import React, { useContext } from 'react';
4
- import { SolrKeys } from '../../../enums/filters';
5
3
  import { AccountsBookmarkedGroupFilter } from './AccountsBookmarkedGroupFilter';
6
4
  import { AccountsFilter } from './AccountsFilter';
7
5
  import { AdditionalFilters } from './AdditionalFilters';
@@ -11,9 +9,7 @@ import { ProductsFilter } from './ProductsFilter';
11
9
  import { SeverityFilter } from './SeverityFilter';
12
10
  import { StatusFilter } from './StatusFilter';
13
11
  import { TypeFilter } from './TypeFilter';
14
- // Adding a new filter here? Make sure you add in caseSearchUtils also so that
15
- // it get included in the solr search query fq parameter
16
- export const CaseListFilters = ({ filterValues, allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts, isSolrSearchDown, }) => {
12
+ export const CaseListFilters = ({ allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts }) => {
17
13
  var _a, _b;
18
14
  const ability = useContext(AbilityContext);
19
15
  const canReadAccountFilter = ability.can(resourceActions.READ, resources.ACCOUNTS_FILTER);
@@ -25,17 +21,21 @@ export const CaseListFilters = ({ filterValues, allCaseTypes, allCaseSeverities,
25
21
  const canAccessSeverityFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.SEVERITY_FILTER);
26
22
  const canAccessAdditionalFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.ADDITIONAL_FILTER);
27
23
  const canAccessGroupsFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.GROUPS_FILTER);
24
+ void canAccessGroupsFilter;
25
+ void GroupsFilter;
28
26
  const canAccessCreatorFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.CREATOR_FILTER);
29
27
  const canAccessTypeFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.TYPE_FILTER);
30
28
  return (React.createElement(React.Fragment, null,
31
29
  React.createElement("div", { className: "filter-group" },
32
- !isSolrSearchDown && canReadAccountFilter && (React.createElement(AccountsFilter, { canReadBookmarkAccounts: canReadAccountFilter })),
33
- !isSolrSearchDown && (canReadBookmarkAccounts || canAccessManagedAccounts) && (React.createElement(AccountsBookmarkedGroupFilter, { canManageBookmarkAccounts: canManageBookmarkAccounts, canReadBookmarkAccounts: canReadBookmarkAccounts, canAccessManagedAccounts: canAccessManagedAccounts })),
34
- canAccessGroupsFilter && React.createElement(GroupsFilter, null),
35
- canAccessProductsFilter && (React.createElement(ProductsFilter, { filterValues: get(filterValues, SolrKeys.product, []), isSolrSearchDown: isSolrSearchDown, allProducts: ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) === null || _b === void 0 ? void 0 : _b.map((p) => p.product)) || [] })),
36
- canAccessSeverityFilter && (React.createElement(SeverityFilter, { filterValues: get(filterValues, SolrKeys.severity, []), isSolrSearchDown: isSolrSearchDown, allCaseSeverities: allCaseSeverities.data })),
37
- canAccessStatusFilter && (React.createElement(StatusFilter, { filterValues: get(filterValues, SolrKeys.status, []), allCaseStatuses: allCaseStatuses.data, isSolrSearchDown: isSolrSearchDown })),
38
- !isSolrSearchDown && canAccessTypeFilter && React.createElement(TypeFilter, { allCaseTypes: allCaseTypes.data }),
39
- !isSolrSearchDown && canAccessCreatorFilter && React.createElement(CreatorSsoNameFilter, null),
40
- !isSolrSearchDown && canAccessAdditionalFilter && React.createElement(AdditionalFilters, null))));
30
+ canReadAccountFilter && React.createElement(AccountsFilter, { canReadBookmarkAccounts: canReadAccountFilter }),
31
+ (canReadBookmarkAccounts || canAccessManagedAccounts) && (React.createElement(AccountsBookmarkedGroupFilter, { canManageBookmarkAccounts: canManageBookmarkAccounts, canReadBookmarkAccounts: canReadBookmarkAccounts, canAccessManagedAccounts: canAccessManagedAccounts })),
32
+ canAccessProductsFilter && (React.createElement(ProductsFilter, { allProducts: ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) === null || _b === void 0 ? void 0 : _b.map((p) => ({
33
+ name: p.product,
34
+ productId: p.productId,
35
+ }))) || [] })),
36
+ canAccessSeverityFilter && React.createElement(SeverityFilter, { allCaseSeverities: allCaseSeverities.data }),
37
+ canAccessStatusFilter && React.createElement(StatusFilter, { allCaseStatuses: allCaseStatuses.data }),
38
+ canAccessTypeFilter && React.createElement(TypeFilter, { allCaseTypes: allCaseTypes.data }),
39
+ canAccessCreatorFilter && React.createElement(CreatorSsoNameFilter, null),
40
+ canAccessAdditionalFilter && React.createElement(AdditionalFilters, null))));
41
41
  };
@@ -1,10 +1,8 @@
1
1
  import React from 'react';
2
- import { IProductVersionPivotMap } from '../CaseList';
3
2
  import { IProductFilter } from '../CaseListFilterReducer';
4
3
  interface IProps {
5
4
  productList: IProductFilter[];
6
- productVersionPivot: IProductVersionPivotMap[];
7
5
  }
8
- export declare function ProductFilterChip({ productList, productVersionPivot }: IProps): React.JSX.Element;
6
+ export declare function ProductFilterChip({ productList }: IProps): React.JSX.Element;
9
7
  export {};
10
8
  //# sourceMappingURL=ProductFilterChip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductFilterChip.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductFilterChip.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAgB,MAAM,0BAA0B,CAAC;AAGxE,UAAU,MAAM;IACZ,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,mBAAmB,EAAE,uBAAuB,EAAE,CAAC;CAClD;AAED,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,mBAAwB,EAAE,EAAE,MAAM,qBAsElF"}
1
+ {"version":3,"file":"ProductFilterChip.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductFilterChip.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,cAAc,EAAgB,MAAM,0BAA0B,CAAC;AAGxE,UAAU,MAAM;IACZ,WAAW,EAAE,cAAc,EAAE,CAAC;CACjC;AAED,wBAAgB,iBAAiB,CAAC,EAAE,WAAW,EAAE,EAAE,MAAM,qBAsExD"}
@@ -7,7 +7,7 @@ import { filterNamesMap } from '../../../utils/constants';
7
7
  import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
8
8
  import { updateFilter } from '../CaseListFilterReducer';
9
9
  import { VersionsFilter } from './VersionsFilter';
10
- export function ProductFilterChip({ productList, productVersionPivot = [] }) {
10
+ export function ProductFilterChip({ productList }) {
11
11
  const { filterInfo } = useContext(CaseListFilterStateContext);
12
12
  const dispatch = useContext(CaseListFilterDispatchContext);
13
13
  const canAccessVersionsFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.VERSIONS_FILTER);
@@ -26,7 +26,7 @@ export function ProductFilterChip({ productList, productVersionPivot = [] }) {
26
26
  return (React.createElement("div", { className: "filter-chip" },
27
27
  React.createElement("span", { className: "filter-chip__heading" }, filterNamesMap[SolrKeys.product]),
28
28
  canAccessVersionsFilter ? (React.createElement(React.Fragment, null, productList.map((currentProduct, index) => (React.createElement(LabelGroup, { numLabels: 10, key: `${currentProduct.value}-${index}`, categoryName: currentProduct.value },
29
- React.createElement(VersionsFilter, { productInfo: currentProduct, productVersionPivot: productVersionPivot }),
29
+ React.createElement(VersionsFilter, { productInfo: currentProduct }),
30
30
  currentProduct[SolrKeys.version].map((chip) => (React.createElement(Label, { variant: "outline", key: chip.value, onClose: () => deleteVersion(currentProduct, chip) }, chip.value))),
31
31
  React.createElement(Button, { icon: React.createElement(TimesCircleIcon, { "aria-hidden": "true" }), className: "pf-v6-c-button__icon", variant: ButtonVariant.plain, "aria-label": "Remove product", onClick: () => deleteProduct(currentProduct) })))))) : (React.createElement(LabelGroup, { numLabels: 10, categoryName: "Product", key: "products" }, productList.map((currentProduct, index) => (React.createElement(Label, { variant: "outline", key: `${currentProduct.value}-${index}`, onClose: () => deleteProduct(currentProduct) }, currentProduct.value)))))));
32
32
  }
@@ -1,9 +1,10 @@
1
- import { IFacetResponse } from '@rh-support/types/shared';
2
1
  import React from 'react';
2
+ interface IProductOption {
3
+ name: string;
4
+ productId: string;
5
+ }
3
6
  interface IProps {
4
- filterValues: IFacetResponse[];
5
- isSolrSearchDown: boolean;
6
- allProducts: string[];
7
+ allProducts: IProductOption[];
7
8
  }
8
9
  export declare function ProductsFilter(props: IProps): React.JSX.Element;
9
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ProductsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductsFilter.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI1D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBA+O3C"}
1
+ {"version":3,"file":"ProductsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductsFilter.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,UAAU,cAAc;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,MAAM;IACZ,WAAW,EAAE,cAAc,EAAE,CAAC;CACjC;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAoL3C"}
@@ -1,5 +1,5 @@
1
1
  import { MenuToggle, Select, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, } from '@patternfly/react-core';
2
- import { SingleSelectDropdown, useSelectKeyboardNavigator } from '@rh-support/components';
2
+ import { useSelectKeyboardNavigator } from '@rh-support/components';
3
3
  import { getDropdownBtnPlaceholder } from '@rh-support/utils';
4
4
  import isEmpty from 'lodash/isEmpty';
5
5
  import isUndefined from 'lodash/isUndefined';
@@ -10,11 +10,11 @@ import { filterNamesMap } from '../../../utils/constants';
10
10
  import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
11
11
  import { updateFilter } from '../CaseListFilterReducer';
12
12
  export function ProductsFilter(props) {
13
- var _a, _b, _c, _d, _f;
13
+ var _a;
14
14
  const { t } = useTranslation();
15
15
  const dispatch = useContext(CaseListFilterDispatchContext);
16
16
  const { filterInfo } = useContext(CaseListFilterStateContext);
17
- const { allProducts, filterValues, isSolrSearchDown } = props;
17
+ const { allProducts } = props;
18
18
  const [isOpen, setIsOpen] = useState(false);
19
19
  const [selectedItems, setSelectedItems] = useState({});
20
20
  const [activeItem, setActiveItem] = useState(null);
@@ -23,51 +23,24 @@ export function ProductsFilter(props) {
23
23
  const selectedProducts = !isUndefined(filterInfo) && !isUndefined(filterInfo[SolrPivotKeys.product_version])
24
24
  ? filterInfo[SolrPivotKeys.product_version]
25
25
  : [];
26
- const productOptions = filterValues.map((product) => ({
26
+ const productOptions = allProducts.map((product) => ({
27
27
  field: SolrKeys.product,
28
- value: product.value,
28
+ value: product.name,
29
+ productId: product.productId,
29
30
  [SolrKeys.version]: [],
30
31
  }));
31
- const singleSelectOptions = allProducts.length > 0
32
- ? allProducts.map((product) => ({
33
- value: product,
34
- label: product,
35
- }))
36
- : [{ value: '', label: t('No products available') }];
37
- const selectedProduct = ((_b = (_a = filterInfo === null || filterInfo === void 0 ? void 0 : filterInfo[SolrPivotKeys.product_version]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value) || '';
38
- const selectedOption = {
39
- value: selectedProduct,
40
- label: selectedProduct,
41
- };
42
- // Single select mode for when Solr is down
43
- const onFilterChangeSingleSelect = (selection) => {
44
- updateFilter(dispatch, {
45
- filterKey: SolrPivotKeys.product_version,
46
- values: [{ field: SolrKeys.product, value: selection.value, [SolrKeys.version]: [] }],
47
- });
48
- setIsOpen(false);
49
- };
50
- const onSingleSelectChange = (option) => {
51
- // Don't update filter if no products are available
52
- if (allProducts.length === 0 || option.value === '') {
53
- return;
54
- }
55
- updateFilter(dispatch, {
56
- filterKey: SolrPivotKeys.product_version,
57
- values: [{ field: SolrKeys.product, value: option.value, [SolrKeys.version]: [] }],
58
- });
59
- };
60
- // Multi-select mode
61
32
  const onSelect = (option) => {
33
+ var _a;
62
34
  let newSelectedProducts = [];
63
35
  if (selectedProducts === null || selectedProducts === void 0 ? void 0 : selectedProducts.some((product) => option.value === product.value)) {
64
36
  newSelectedProducts = selectedProducts.filter((product) => option.value !== product.value);
65
37
  setSelectedItems((prevData) => (Object.assign(Object.assign({}, prevData), { [option.value]: false })));
66
38
  }
67
39
  else {
40
+ const productId = option.productId || ((_a = allProducts.find((p) => p.name === option.value)) === null || _a === void 0 ? void 0 : _a.productId) || '';
68
41
  newSelectedProducts = [
69
42
  ...selectedProducts,
70
- { field: SolrKeys.product, value: option.value, [SolrKeys.version]: [] },
43
+ { field: SolrKeys.product, value: option.value, productId, [SolrKeys.version]: [] },
71
44
  ];
72
45
  setSelectedItems((prevData) => (Object.assign(Object.assign({}, prevData), { [option.value]: true })));
73
46
  }
@@ -93,21 +66,12 @@ export function ProductsFilter(props) {
93
66
  resetIndexOnClose: true,
94
67
  isDisabled: false,
95
68
  setIsOpen,
96
- onSelect: (item) => {
97
- if (isSolrSearchDown) {
98
- onFilterChangeSingleSelect(item);
99
- }
100
- else {
101
- onSelect(item);
102
- }
103
- },
69
+ onSelect,
104
70
  });
105
71
  const onTextInputChange = (_event, value) => {
106
72
  setInputValue(value);
107
73
  };
108
- const placeholder = isSolrSearchDown
109
- ? ((_d = (_c = filterInfo === null || filterInfo === void 0 ? void 0 : filterInfo[SolrPivotKeys.product_version]) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.value) || t('Select a product')
110
- : getDropdownBtnPlaceholder(t('Select a product'), ((_f = filterInfo === null || filterInfo === void 0 ? void 0 : filterInfo[SolrPivotKeys.product_version]) === null || _f === void 0 ? void 0 : _f.map((i) => i.value)) || [], '', props.filterValues.length, t('All selected'));
74
+ const placeholder = getDropdownBtnPlaceholder(t('Select a product'), ((_a = filterInfo === null || filterInfo === void 0 ? void 0 : filterInfo[SolrPivotKeys.product_version]) === null || _a === void 0 ? void 0 : _a.map((i) => i.value)) || [], '', (allProducts === null || allProducts === void 0 ? void 0 : allProducts.length) || 0, t('All selected'));
111
75
  const toggleForMultiSelect = (toggleRef) => (React.createElement(MenuToggle, { variant: "typeahead", onClick: onToggleClick, innerRef: toggleRef, isExpanded: isOpen, isFullWidth: true },
112
76
  React.createElement(TextInputGroup, { isPlain: true },
113
77
  React.createElement(TextInputGroupMain, Object.assign({ value: inputValue, onClick: onToggleClick, onChange: onTextInputChange, onKeyDown: onInputKeyDown, id: "multi-typeahead-product-filter-input", autoComplete: "off", innerRef: textInputRef, placeholder: placeholder }, (activeItem && { 'aria-activedescendant': activeItem }), { role: "combobox", isExpanded: isOpen, "aria-controls": "select-multi-typeahead-product-listbox" })))));
@@ -129,9 +93,6 @@ export function ProductsFilter(props) {
129
93
  }, [inputValue]);
130
94
  useEffect(() => {
131
95
  var _a;
132
- if (isSolrSearchDown) {
133
- return;
134
- }
135
96
  if (isEmpty(filterInfo === null || filterInfo === void 0 ? void 0 : filterInfo[SolrPivotKeys.product_version])) {
136
97
  setSelectedItems({});
137
98
  }
@@ -142,13 +103,13 @@ export function ProductsFilter(props) {
142
103
  }, {});
143
104
  setSelectedItems(selectedProductItems || {});
144
105
  }
145
- }, [filterInfo, isSolrSearchDown]);
106
+ }, [filterInfo]);
146
107
  const renderOptions = () => {
147
108
  const filteredOptions = getFilteredOptions();
148
- return filteredOptions.map((option, index) => (React.createElement(SelectOption, { key: `product-option-${index}`, value: option, hasCheckbox: !isSolrSearchDown, isSelected: selectedItems[option.value], isFocused: focusedItemIndex !== null && focusedItemIndex === index, id: `select-product-${String(option.value).replace(/\s/g, '-')}` }, option.value)));
109
+ return filteredOptions.map((option, index) => (React.createElement(SelectOption, { key: `product-option-${index}`, value: option, hasCheckbox: true, isSelected: selectedItems[option.value], isFocused: focusedItemIndex !== null && focusedItemIndex === index, id: `select-product-${String(option.value).replace(/\s/g, '-')}` }, option.value)));
149
110
  };
150
111
  return (React.createElement("div", { className: "product-filter" },
151
112
  React.createElement("label", { htmlFor: "case-list-products-filter", className: "pf-v6-u-mb-sm products-filter-label" }, t(filterNamesMap[SolrKeys.product])),
152
- isSolrSearchDown ? (React.createElement(SingleSelectDropdown, { id: "case-list-products-filter", selected: selectedOption, options: singleSelectOptions, placeholder: allProducts.length > 0 ? t('Select a product') : t('No products available'), onSelect: (options) => onSingleSelectChange(options[0]), dataTrackingId: "products-filter", isScrollable: true, isDisabled: allProducts.length === 0 })) : (React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "case-list-products-filter", "data-tracking-id": "products-filter", isOpen: isOpen, selected: selectedItems, onSelect: (_e, v) => onSelect(v), onOpenChange: (nextOpen) => setIsOpen(nextOpen), toggle: toggleForMultiSelect, isScrollable: true, popperProps: { direction: 'down', enableFlip: false, maxWidth: '30rem' } },
153
- React.createElement(SelectList, null, renderOptions())))));
113
+ React.createElement(Select, { shouldFocusToggleOnSelect: true, shouldPreventScrollOnItemFocus: true, id: "case-list-products-filter", "data-tracking-id": "products-filter", isOpen: isOpen, selected: selectedItems, onSelect: (_e, v) => onSelect(v), onOpenChange: (nextOpen) => setIsOpen(nextOpen), toggle: toggleForMultiSelect, isScrollable: true, popperProps: { direction: 'down', enableFlip: false, maxWidth: '30rem' } },
114
+ React.createElement(SelectList, null, renderOptions()))));
154
115
  }
@@ -1,9 +1,6 @@
1
- import { IFacetResponse } from '@rh-support/types/shared';
2
1
  import React from 'react';
3
2
  interface IProps {
4
- filterValues: IFacetResponse[];
5
3
  allCaseSeverities: string[];
6
- isSolrSearchDown: boolean;
7
4
  }
8
5
  export declare function SeverityFilter(props: IProps): React.JSX.Element;
9
6
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"SeverityFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/SeverityFilter.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAoL3C"}
1
+ {"version":3,"file":"SeverityFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/SeverityFilter.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,UAAU,MAAM;IACZ,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBA0I3C"}