@rh-support/cases 0.2.66 → 0.2.69
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.
- package/lib/esm/components/case-list/CaseList.d.ts.map +1 -1
- package/lib/esm/components/case-list/CaseList.js +17 -3
- package/lib/esm/components/case-list/case-list-filters/CaseListFilterChips.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/CaseListFilterChips.js +1 -8
- package/lib/esm/components/escalations/EscalationForm.d.ts.map +1 -1
- package/lib/esm/components/escalations/EscalationForm.js +2 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseList.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseList.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AA4BlC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAKH,0BAA0B,EAI7B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseList.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseList.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AA4BlC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAKH,0BAA0B,EAI7B,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAM1C,OAAO,EAAgB,WAAW,EAA2B,MAAM,uBAAuB,CAAC;AAmC3F,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC3D,YAAY,EAAE,cAAc,EAAE,CAAC;CAClC;AAED,oBAAY,YAAY,GAAG,0BAA0B,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;AAM5F,MAAM,WAAW,gBAAgB;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eA4crC"}
|
|
@@ -18,6 +18,7 @@ import { ErrorBoundary, ToastNotification, useBreakpoint, useDocumentTitle, useF
|
|
|
18
18
|
import { fetchAllStatuses, fetchCaseGroupsForSSO, fetchCaseSeverities, fetchCaseTypes, fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext, setUserPreferences, updateUserPreferences, UserPreferencesKeys, } from '@rh-support/react-context';
|
|
19
19
|
import { getStringifiedParams, getUrlParsedParams, haventLoadedMetadata, haventLoadedProductsMetadata, pendoTrackEvent, solrResponseToFacetFields, solrResponseToPivotFields, } from '@rh-support/utils';
|
|
20
20
|
import get from 'lodash/get';
|
|
21
|
+
import mapValues from 'lodash/mapValues';
|
|
21
22
|
import some from 'lodash/some';
|
|
22
23
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
23
24
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -36,8 +37,8 @@ import { CaseListFilters } from './case-list-filters/CaseListFilters';
|
|
|
36
37
|
import { CaseListTable } from './case-list-table/CaseListTable';
|
|
37
38
|
import { CaseSearch } from './case-search/CaseSearch';
|
|
38
39
|
import { useCaseListDispatchContext, useCaseListStateContext } from './CaseListContext';
|
|
39
|
-
import { CaseListFilterDispatchContext, CaseListFilterStateContext } from './CaseListFilterContext';
|
|
40
|
-
import { isNoFilterApplied, isOnlyDefaultFilterApplied } from './CaseListFilterHelpers';
|
|
40
|
+
import { CaseListFilterDispatchContext, CaseListFilterStateContext, initialCaseFilterState, } from './CaseListFilterContext';
|
|
41
|
+
import { eligibleSFDCFiltersMultipleValues, isNoFilterApplied, isOnlyDefaultFilterApplied, } from './CaseListFilterHelpers';
|
|
41
42
|
import { updateFilterState } from './CaseListFilterReducer';
|
|
42
43
|
import { setCaseList, setCurrentQuery, setFilterValuesFromFacetResponse, setIsFetching, setPivotValues, } from './CaseListReducer';
|
|
43
44
|
export function CaseList(props) {
|
|
@@ -184,7 +185,19 @@ export function CaseList(props) {
|
|
|
184
185
|
if (haventLoadedProductsMetadata(allProducts)) {
|
|
185
186
|
fetchProducts(dispatchToGlobalMetadataReducer);
|
|
186
187
|
}
|
|
188
|
+
// on sfdc fields that only one value is allowed, set filter to first item
|
|
189
|
+
const sfdcFilterState = mapValues(filterState.filterInfo, (value, key) => {
|
|
190
|
+
//@ts-ignore
|
|
191
|
+
if (eligibleSFDCFiltersMultipleValues.includes(key))
|
|
192
|
+
return value;
|
|
193
|
+
return value[0] ? [value[0]] : [];
|
|
194
|
+
});
|
|
195
|
+
updateFilterState(filterDispatch, {
|
|
196
|
+
//@ts-ignore
|
|
197
|
+
filterInfo: Object.assign(Object.assign({}, initialCaseFilterState.filterInfo), sfdcFilterState),
|
|
198
|
+
});
|
|
187
199
|
}
|
|
200
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
188
201
|
}, [
|
|
189
202
|
allCaseTypes,
|
|
190
203
|
allCaseSeverities,
|
|
@@ -228,7 +241,8 @@ export function CaseList(props) {
|
|
|
228
241
|
if (bookmarkedGroupAccounts.isFetching ||
|
|
229
242
|
bookmarkedAccounts.isFetching ||
|
|
230
243
|
managedAccounts.isFetching ||
|
|
231
|
-
caseGroups.isFetching
|
|
244
|
+
caseGroups.isFetching ||
|
|
245
|
+
caseGroups.data === undefined)
|
|
232
246
|
return;
|
|
233
247
|
// when user manually changes url and hit enter, new result is fetched without refreshing the page
|
|
234
248
|
if (!isFirstMount.current) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseListFilterChips.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilterChips.tsx"],"names":[],"mappings":"AASA,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,
|
|
1
|
+
{"version":3,"file":"CaseListFilterChips.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilterChips.tsx"],"names":[],"mappings":"AASA,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,eA6HhD"}
|
|
@@ -6,7 +6,7 @@ import { Trans } from 'react-i18next';
|
|
|
6
6
|
import { ProductVersionKey, SolrKeys, SolrPivotKeys } from '../../../enums/filters';
|
|
7
7
|
import { filterNamesMap } from '../../../utils/constants';
|
|
8
8
|
import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
|
|
9
|
-
import {
|
|
9
|
+
import { visibleFilterChipsWhenSolrDownSfdcUp } from '../CaseListFilterHelpers';
|
|
10
10
|
import { clearFilters, removeFilterItem } from '../CaseListFilterReducer';
|
|
11
11
|
import { CreatorSsoNameFilterChip } from './CreatorSsoNameFilterChip';
|
|
12
12
|
import { ProductFilterChip } from './ProductFilterChip';
|
|
@@ -28,13 +28,6 @@ export function CaseListFilterChips(props) {
|
|
|
28
28
|
clearFilters(dispatch);
|
|
29
29
|
};
|
|
30
30
|
const renderFilterValueChips = (filterKey, filterValues, chipKeySuffix = '') => {
|
|
31
|
-
const singleValueSfdcFilterHasMultipleValues = visibleFilterChipsWhenSolrDownSfdcUp.includes(filterKey) &&
|
|
32
|
-
eligibleSFDCFiltersWithLengthOne.includes(filterKey) &&
|
|
33
|
-
Array.isArray(filterValues) &&
|
|
34
|
-
filterValues[0];
|
|
35
|
-
if (props.isSolrSearchDown && singleValueSfdcFilterHasMultipleValues) {
|
|
36
|
-
filterValues = [filterValues[0]];
|
|
37
|
-
}
|
|
38
31
|
const filterChips = filterValues.map((chip, index) => {
|
|
39
32
|
return (React.createElement(Chip, { key: `${filterKey}-${index}-${chipKeySuffix}`, onClick: deleteChip(filterKey, getChipKey(chip)) }, getChipValue(chip)));
|
|
40
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EscalationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/escalations/EscalationForm.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAiBlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"EscalationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/escalations/EscalationForm.tsx"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAiBlC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIzE,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKxD,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,SAAS,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;IACxD,IAAI,CAAC,EACC,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,UAAU,EAAE,CAAC;CAC/B;AAED,UAAU,MAAM;IACZ,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,gBAAgB,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE,cAAc,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAKD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA8O3C"}
|
|
@@ -24,13 +24,14 @@ import { ActionGroup, Button, Checkbox, Form, FormGroup, FormSelect, FormSelectO
|
|
|
24
24
|
import { AlertMessage, AlertType, useFetch } from '@rh-support/components';
|
|
25
25
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
26
26
|
import { scrollIntoView } from '@rh-support/utils';
|
|
27
|
+
import isEmpty from 'lodash/isEmpty';
|
|
27
28
|
import pickBy from 'lodash/pickBy';
|
|
28
29
|
import React, { useRef, useState } from 'react';
|
|
29
30
|
import { Trans, useTranslation } from 'react-i18next';
|
|
30
31
|
import { escalationType } from '../../enums/escalation';
|
|
31
32
|
const mapToValueLabel = (options) => options.map((option) => ({ value: option, label: option }));
|
|
32
33
|
const isFieldValueEmpty = function (value) {
|
|
33
|
-
return value ===
|
|
34
|
+
return isEmpty(value === null || value === void 0 ? void 0 : value.trim());
|
|
34
35
|
};
|
|
35
36
|
export function EscalationForm(props) {
|
|
36
37
|
const { t } = useTranslation();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.69",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@cee-eng/hydrajs": "4.7.22",
|
|
30
|
-
"@patternfly/patternfly": "4.
|
|
30
|
+
"@patternfly/patternfly": "4.185.1",
|
|
31
31
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
32
|
-
"@patternfly/react-core": "4.
|
|
33
|
-
"@patternfly/react-table": "4.
|
|
32
|
+
"@patternfly/react-core": "4.202.16",
|
|
33
|
+
"@patternfly/react-table": "4.71.16",
|
|
34
34
|
"@rh-support/api": "0.3.9",
|
|
35
35
|
"@rh-support/components": "^0.1.3",
|
|
36
36
|
"@rh-support/react-context": "^0.1.3",
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@cee-eng/hydrajs": "4.7.22",
|
|
51
|
-
"@patternfly/patternfly": "4.
|
|
51
|
+
"@patternfly/patternfly": "4.185.1",
|
|
52
52
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
53
|
-
"@patternfly/react-core": "4.
|
|
54
|
-
"@patternfly/react-table": "4.
|
|
53
|
+
"@patternfly/react-core": "4.202.16",
|
|
54
|
+
"@patternfly/react-table": "4.71.16",
|
|
55
55
|
"@rh-support/api": "0.3.13",
|
|
56
|
-
"@rh-support/components": "1.1.
|
|
57
|
-
"@rh-support/react-context": "0.2.
|
|
56
|
+
"@rh-support/components": "1.1.57",
|
|
57
|
+
"@rh-support/react-context": "0.2.57",
|
|
58
58
|
"@rh-support/types": "0.2.0",
|
|
59
|
-
"@rh-support/user-permissions": "0.2.
|
|
60
|
-
"@rh-support/utils": "0.2.
|
|
59
|
+
"@rh-support/user-permissions": "0.2.45",
|
|
60
|
+
"@rh-support/utils": "0.2.34",
|
|
61
61
|
"i18next": "^19.0.1",
|
|
62
62
|
"localforage": "^1.7.3",
|
|
63
63
|
"lodash": "^4.17.15",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"not ie <= 11",
|
|
102
102
|
"not op_mini all"
|
|
103
103
|
],
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "4ae8baf19ecc0ddbcb5dc98c668a4f1adb94334d"
|
|
105
105
|
}
|