@rh-support/cases 2.6.216 → 2.6.218
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":"CaseList.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseList.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AAwClC,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAuC1C,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAMD,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,
|
|
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;AAwClC,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAuC1C,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAMD,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,qBAsxBrC"}
|
|
@@ -60,6 +60,8 @@ export function CaseList(props) {
|
|
|
60
60
|
const lastPushedQueryRef = useRef('');
|
|
61
61
|
const isXLScreen = breakPoint.xl;
|
|
62
62
|
const isFirstMount = useRef(true);
|
|
63
|
+
const userDismissedDefaultGroupRef = useRef(false);
|
|
64
|
+
const prevGroupFilterRef = useRef(undefined);
|
|
63
65
|
const filterSectionRef = useRef(null);
|
|
64
66
|
const filterState = useContext(CaseListFilterStateContext);
|
|
65
67
|
const filterDispatch = useContext(CaseListFilterDispatchContext);
|
|
@@ -316,6 +318,21 @@ export function CaseList(props) {
|
|
|
316
318
|
const loggedInContactId = (_b = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data) === null || _b === void 0 ? void 0 : _b.id;
|
|
317
319
|
const loggedInIsOrgAdmin = (_c = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data) === null || _c === void 0 ? void 0 : _c.isOrgAdmin;
|
|
318
320
|
const defaultCaseGroupId = (_e = (_d = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data) === null || _d === void 0 ? void 0 : _d.defaultCaseGroup) !== null && _e !== void 0 ? _e : null;
|
|
321
|
+
const prevDefaultCaseGroupIdRef = useRef(defaultCaseGroupId);
|
|
322
|
+
useEffect(() => {
|
|
323
|
+
var _a;
|
|
324
|
+
if (prevDefaultCaseGroupIdRef.current !== defaultCaseGroupId) {
|
|
325
|
+
userDismissedDefaultGroupRef.current = false;
|
|
326
|
+
}
|
|
327
|
+
prevDefaultCaseGroupIdRef.current = defaultCaseGroupId;
|
|
328
|
+
const currentGroupFilter = ((_a = filterState.filterInfo) === null || _a === void 0 ? void 0 : _a[SolrKeys.group]) || [];
|
|
329
|
+
if (prevGroupFilterRef.current !== undefined &&
|
|
330
|
+
prevGroupFilterRef.current.length > 0 &&
|
|
331
|
+
currentGroupFilter.length === 0) {
|
|
332
|
+
userDismissedDefaultGroupRef.current = true;
|
|
333
|
+
}
|
|
334
|
+
prevGroupFilterRef.current = currentGroupFilter;
|
|
335
|
+
}, [filterState.filterInfo, defaultCaseGroupId]);
|
|
319
336
|
useEffect(() => {
|
|
320
337
|
var _a;
|
|
321
338
|
if (!salesforceAccountId || loggedInUser.isFetching)
|
|
@@ -353,6 +370,9 @@ export function CaseList(props) {
|
|
|
353
370
|
return;
|
|
354
371
|
const nextGroupFilter = getDefaultGroupFilterSelection(caseGroups.data, loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data);
|
|
355
372
|
const currentGroupFilter = filterState.filterInfo[SolrKeys.group] || [];
|
|
373
|
+
if (userDismissedDefaultGroupRef.current && currentGroupFilter.length === 0) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
356
376
|
if (isEqual(currentGroupFilter, nextGroupFilter))
|
|
357
377
|
return;
|
|
358
378
|
updateFilterState(filterDispatch, Object.assign(Object.assign({}, filterState), { filterInfo: Object.assign(Object.assign({}, filterState.filterInfo), { [SolrKeys.group]: nextGroupFilter }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.218",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"@patternfly/patternfly": "6.2.1",
|
|
39
39
|
"@patternfly/react-core": "6.2.1",
|
|
40
40
|
"@patternfly/react-table": "6.2.1",
|
|
41
|
-
"@rh-support/components": "2.5.
|
|
42
|
-
"@rh-support/react-context": "2.5.
|
|
41
|
+
"@rh-support/components": "2.5.213",
|
|
42
|
+
"@rh-support/react-context": "2.5.308",
|
|
43
43
|
"@rh-support/types": "2.0.26",
|
|
44
|
-
"@rh-support/user-permissions": "2.5.
|
|
45
|
-
"@rh-support/utils": "2.5.
|
|
44
|
+
"@rh-support/user-permissions": "2.5.160",
|
|
45
|
+
"@rh-support/utils": "2.5.141",
|
|
46
46
|
"localforage": "^1.10.0",
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"pegjs": "^0.10.0",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"defaults and supports es6-module",
|
|
95
95
|
"maintained node versions"
|
|
96
96
|
],
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "62d92ed52ff1bf81a6103af96c29e96442da5963"
|
|
98
98
|
}
|