@rh-support/cases 2.6.197 → 2.6.199
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 +52 -28
- package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/CreatorSsoNameFilter.js +21 -14
- package/lib/esm/utils/caseListMapper.d.ts.map +1 -1
- package/lib/esm/utils/caseListMapper.js +2 -1
- package/package.json +7 -7
|
@@ -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;
|
|
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;AAsClC,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAqC1C,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,qBA0lBrC"}
|
|
@@ -13,7 +13,7 @@ import { useApolloClient } from '@apollo/client/react';
|
|
|
13
13
|
import { Alert, AlertActionCloseButton, AlertVariant, Button } from '@patternfly/react-core';
|
|
14
14
|
import OpenDrawerRightIcon from '@patternfly/react-icons/dist/js/icons/open-drawer-right-icon';
|
|
15
15
|
import { ErrorBoundary, ToastNotification, useBreakpoint, useDocumentTitle, useForceUpdate, } from '@rh-support/components';
|
|
16
|
-
import { CSSUserModal, fetchAllStatuses, fetchCaseGroupsForAccount, fetchCaseGroupsForSSO,
|
|
16
|
+
import { CSSUserModal, fetchAllStatuses, fetchCaseGroupsForAccount, fetchCaseGroupsForSSO, fetchCaseSeverities, fetchCaseTypes, fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext, setUserPreferences, updateCaseListTraditionalSupportAgreed, updateUserPreferences, useGlobalDispatchContext, UserPreferencesKeys, } from '@rh-support/react-context';
|
|
17
17
|
import { getStringifiedParams, getUrlParsedParams, haventLoadedMetadata, haventLoadedProductsMetadata, pendoTrackEvent, } from '@rh-support/utils';
|
|
18
18
|
import isEmpty from 'lodash/isEmpty';
|
|
19
19
|
import some from 'lodash/some';
|
|
@@ -38,14 +38,14 @@ import { isNoFilterApplied, isOnlyDefaultFilterApplied } from './CaseListFilterH
|
|
|
38
38
|
import { updateFilterState } from './CaseListFilterReducer';
|
|
39
39
|
import { appendCaseList, setCaseList, setCurrentQuery, setCursorInfo, setIsFetching, setIsLoadingMore, setLoadMoreError, } from './CaseListReducer';
|
|
40
40
|
export function CaseList(props) {
|
|
41
|
-
var _a, _b;
|
|
41
|
+
var _a, _b, _c;
|
|
42
42
|
const { t } = useTranslation();
|
|
43
43
|
useDocumentTitle(PageTitle.CASE_LIST);
|
|
44
44
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
45
45
|
const { caseList, isFetching, isLoadingMore, hasNextPage, endCursor, currentQuery, loadMoreError, loadMoreRetryCount, } = useCaseListStateContext();
|
|
46
46
|
const CaseListDispatch = useCaseListDispatchContext();
|
|
47
47
|
const breakPoint = useBreakpoint();
|
|
48
|
-
const { globalMetadataState, globalMetadataState: { caseGroups,
|
|
48
|
+
const { globalMetadataState, globalMetadataState: { caseGroups, loggedInUserRights, loggedInUsersAccount, userPreferences, managedAccounts, bookmarkedAccounts, allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts, caseRecordTypes, caseListTraditionalSupportAgreed, }, } = useContext(GlobalMetadataStateContext);
|
|
49
49
|
const globalDispatchContext = useGlobalDispatchContext();
|
|
50
50
|
const apolloClient = useApolloClient();
|
|
51
51
|
const location = useLocation();
|
|
@@ -67,6 +67,9 @@ export function CaseList(props) {
|
|
|
67
67
|
const [RHCDValue, setRHCDValue] = useState('');
|
|
68
68
|
const [isRHCDAlertShown, setIsRHCDAlertShown] = useState(true);
|
|
69
69
|
const loadMoreLockRef = useRef(false);
|
|
70
|
+
const loadMoreFnRef = useRef(() => { });
|
|
71
|
+
const loadMoreCooldownRef = useRef(false);
|
|
72
|
+
const activeFilterStateRef = useRef(filterState);
|
|
70
73
|
const sentinelElRef = useRef(null);
|
|
71
74
|
const prefetchRef = useRef({
|
|
72
75
|
cursor: '',
|
|
@@ -82,7 +85,7 @@ export function CaseList(props) {
|
|
|
82
85
|
if (!cursor || prefetchRef.current.cursor === cursor)
|
|
83
86
|
return;
|
|
84
87
|
prefetchRef.current = { cursor, data: null, loading: true };
|
|
85
|
-
loadMoreCases(
|
|
88
|
+
loadMoreCases(activeFilterStateRef.current, apolloClient, cursor)
|
|
86
89
|
.then((result) => {
|
|
87
90
|
if (prefetchRef.current.cursor === cursor) {
|
|
88
91
|
prefetchRef.current = { cursor, data: result, loading: false };
|
|
@@ -96,6 +99,7 @@ export function CaseList(props) {
|
|
|
96
99
|
}
|
|
97
100
|
useEffect(() => {
|
|
98
101
|
let ticking = false;
|
|
102
|
+
let triggered = false;
|
|
99
103
|
const onScroll = () => {
|
|
100
104
|
if (ticking)
|
|
101
105
|
return;
|
|
@@ -105,21 +109,37 @@ export function CaseList(props) {
|
|
|
105
109
|
if (!sentinelElRef.current)
|
|
106
110
|
return;
|
|
107
111
|
const rect = sentinelElRef.current.getBoundingClientRect();
|
|
108
|
-
|
|
109
|
-
|
|
112
|
+
const isNear = rect.top <= window.innerHeight + 600;
|
|
113
|
+
if (!isNear) {
|
|
114
|
+
triggered = false;
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (!triggered && !loadMoreLockRef.current) {
|
|
118
|
+
triggered = true;
|
|
119
|
+
loadMoreFnRef.current();
|
|
110
120
|
}
|
|
111
121
|
});
|
|
112
122
|
};
|
|
113
123
|
window.addEventListener('scroll', onScroll, true);
|
|
114
124
|
return () => window.removeEventListener('scroll', onScroll, true);
|
|
115
|
-
|
|
116
|
-
}, [hasNextPage, isLoadingMore, loadMoreError, endCursor]);
|
|
125
|
+
}, []);
|
|
117
126
|
useEffect(() => {
|
|
118
127
|
if (inView && hasNextPage && !isLoadingMore && !loadMoreError) {
|
|
119
128
|
loadMore();
|
|
120
129
|
}
|
|
121
130
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122
|
-
}, [inView
|
|
131
|
+
}, [inView]);
|
|
132
|
+
useEffect(() => {
|
|
133
|
+
const onClick = (e) => {
|
|
134
|
+
const anchor = e.target.closest('a.btn_slideto[href="#masthead"]');
|
|
135
|
+
if (anchor) {
|
|
136
|
+
e.preventDefault();
|
|
137
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
document.addEventListener('click', onClick, true);
|
|
141
|
+
return () => document.removeEventListener('click', onClick, true);
|
|
142
|
+
}, []);
|
|
123
143
|
function getCases(currentFilterState) {
|
|
124
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
145
|
var _a;
|
|
@@ -132,6 +152,8 @@ export function CaseList(props) {
|
|
|
132
152
|
setIsFetching(CaseListDispatch, true);
|
|
133
153
|
setHasError(false);
|
|
134
154
|
prefetchRef.current = { cursor: '', data: null, loading: false };
|
|
155
|
+
loadMoreCooldownRef.current = true;
|
|
156
|
+
activeFilterStateRef.current = currentFilterState;
|
|
135
157
|
const result = yield getCaseListFromGraphQL(currentFilterState, apolloClient, undefined, controller.signal);
|
|
136
158
|
if (controller.signal.aborted) {
|
|
137
159
|
return;
|
|
@@ -139,6 +161,9 @@ export function CaseList(props) {
|
|
|
139
161
|
setCaseList(CaseListDispatch, result.caseListResponse.response);
|
|
140
162
|
setCursorInfo(CaseListDispatch, result.hasNextPage, result.endCursor);
|
|
141
163
|
setIsFetching(CaseListDispatch, false);
|
|
164
|
+
setTimeout(() => {
|
|
165
|
+
loadMoreCooldownRef.current = false;
|
|
166
|
+
}, 500);
|
|
142
167
|
if (result.hasNextPage && result.endCursor) {
|
|
143
168
|
startPrefetch(result.endCursor);
|
|
144
169
|
}
|
|
@@ -159,7 +184,12 @@ export function CaseList(props) {
|
|
|
159
184
|
}
|
|
160
185
|
function loadMore() {
|
|
161
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
if (
|
|
187
|
+
if (loadMoreCooldownRef.current ||
|
|
188
|
+
loadMoreLockRef.current ||
|
|
189
|
+
isLoadingMore ||
|
|
190
|
+
!hasNextPage ||
|
|
191
|
+
!endCursor ||
|
|
192
|
+
loadMoreError)
|
|
163
193
|
return;
|
|
164
194
|
loadMoreLockRef.current = true;
|
|
165
195
|
setIsLoadingMore(CaseListDispatch, true);
|
|
@@ -172,7 +202,7 @@ export function CaseList(props) {
|
|
|
172
202
|
}
|
|
173
203
|
else {
|
|
174
204
|
prefetchRef.current = { cursor: '', data: null, loading: false };
|
|
175
|
-
result = yield loadMoreCases(
|
|
205
|
+
result = yield loadMoreCases(activeFilterStateRef.current, apolloClient, endCursor);
|
|
176
206
|
}
|
|
177
207
|
setLoadMoreError(CaseListDispatch, false, 0);
|
|
178
208
|
appendCaseList(CaseListDispatch, result.docs, result.hasNextPage, result.endCursor);
|
|
@@ -190,8 +220,10 @@ export function CaseList(props) {
|
|
|
190
220
|
}
|
|
191
221
|
});
|
|
192
222
|
}
|
|
223
|
+
loadMoreFnRef.current = loadMore;
|
|
193
224
|
function retryLoadMore() {
|
|
194
225
|
setLoadMoreError(CaseListDispatch, false, loadMoreRetryCount);
|
|
226
|
+
setTimeout(() => loadMoreFnRef.current(), 0);
|
|
195
227
|
}
|
|
196
228
|
const toggleFilterSection = (isExpanded) => {
|
|
197
229
|
if (!filterSectionRef.current)
|
|
@@ -238,22 +270,22 @@ export function CaseList(props) {
|
|
|
238
270
|
console.log(err);
|
|
239
271
|
}
|
|
240
272
|
});
|
|
273
|
+
const salesforceAccountId = (_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.salesforceAccountId;
|
|
241
274
|
useEffect(() => {
|
|
242
275
|
var _a;
|
|
276
|
+
if (!salesforceAccountId)
|
|
277
|
+
return;
|
|
243
278
|
if (haventLoadedMetadata(caseGroups, (data) => data === undefined)) {
|
|
244
279
|
if ((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.isInternal) {
|
|
245
|
-
fetchCaseGroupsForAccount(dispatchToGlobalMetadataReducer,
|
|
280
|
+
fetchCaseGroupsForAccount(dispatchToGlobalMetadataReducer, apolloClient, salesforceAccountId);
|
|
246
281
|
}
|
|
247
282
|
else {
|
|
248
|
-
fetchCaseGroupsForSSO(dispatchToGlobalMetadataReducer,
|
|
283
|
+
fetchCaseGroupsForSSO(dispatchToGlobalMetadataReducer, apolloClient, salesforceAccountId);
|
|
249
284
|
}
|
|
250
285
|
}
|
|
251
|
-
}, [caseGroups, dispatchToGlobalMetadataReducer,
|
|
286
|
+
}, [caseGroups, dispatchToGlobalMetadataReducer, apolloClient, salesforceAccountId, loggedInUsersAccount.data]);
|
|
252
287
|
useEffect(() => {
|
|
253
288
|
const loadMetadata = () => __awaiter(this, void 0, void 0, function* () {
|
|
254
|
-
if (haventLoadedMetadata(caseRecordTypes)) {
|
|
255
|
-
yield fetchCaseRecordTypes(dispatchToGlobalMetadataReducer, apolloClient);
|
|
256
|
-
}
|
|
257
289
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
258
290
|
fetchCaseTypes(dispatchToGlobalMetadataReducer, apolloClient);
|
|
259
291
|
}
|
|
@@ -269,15 +301,7 @@ export function CaseList(props) {
|
|
|
269
301
|
});
|
|
270
302
|
loadMetadata();
|
|
271
303
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
272
|
-
}, [
|
|
273
|
-
allCaseTypes,
|
|
274
|
-
allCaseSeverities,
|
|
275
|
-
allCaseStatuses,
|
|
276
|
-
allProducts,
|
|
277
|
-
caseRecordTypes,
|
|
278
|
-
dispatchToGlobalMetadataReducer,
|
|
279
|
-
apolloClient,
|
|
280
|
-
]);
|
|
304
|
+
}, [allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts, dispatchToGlobalMetadataReducer, apolloClient]);
|
|
281
305
|
function saveFilterQueryInUserPreferences() {
|
|
282
306
|
if (isNoFilterApplied(filterState))
|
|
283
307
|
return;
|
|
@@ -427,8 +451,8 @@ export function CaseList(props) {
|
|
|
427
451
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading filter chips') } },
|
|
428
452
|
React.createElement(CaseListFilterChips, null))),
|
|
429
453
|
React.createElement("section", { className: "case-search-bottom" },
|
|
430
|
-
React.createElement("aside", { className: `case-search-filters ${((
|
|
431
|
-
React.createElement("h2", { className: "filter-header pf-v6-u-display-flex" }, ((
|
|
454
|
+
React.createElement("aside", { className: `case-search-filters ${((_b = filterSectionRef.current) === null || _b === void 0 ? void 0 : _b.expanded) ? '' : 'collapsed'}` },
|
|
455
|
+
React.createElement("h2", { className: "filter-header pf-v6-u-display-flex" }, ((_c = filterSectionRef.current) === null || _c === void 0 ? void 0 : _c.expanded) ? (React.createElement(React.Fragment, null,
|
|
432
456
|
React.createElement(Button, { isInline: true, className: "pf-v6-u-flex-shrink-0 pf-v6-u-flex-none case-search-filter-text-button", variant: "link", title: t('Collapse filter section'), "data-tracking-id": "collapse-case-list-filter", onClick: onToggleFilterBtnClick, iconPosition: "right", icon: React.createElement(OpenDrawerRightIcon, { className: "mirrored" }) },
|
|
433
457
|
React.createElement(Trans, null, "Filters")))) : (React.createElement(Button, { isInline: true, className: "pf-v6-c-button pf-m-link pf-m-inline pf-v6-u-flex-shrink-0 pf-v6-u-flex-none pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-justify-content-center pf-v6-u-px-lg", variant: "link", title: t('Expand filter section'), "data-tracking-id": "expand-case-list-filter", onClick: onToggleFilterBtnClick, iconPosition: "right", icon: React.createElement(OpenDrawerRightIcon, null) }, isXLScreen ? null : React.createElement(Trans, null, "Filters")))),
|
|
434
458
|
React.createElement("div", { className: "filter-wrapper" },
|
|
@@ -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,GAAI,YAAO,WAIlC,CAAC;AAYF,eAAO,MAAM,eAAe,GAAI,gBAAW,EAAE,QAAG;;;;;;;GAAyD,CAAC;AAE1G,eAAO,MAAM,kBAAkB,GAAI,iBAAY,EAAE,eAAU,EAAE,QAAG,EAAE,MAAC,UAyClE,CAAC;AAEF,wBAAgB,oBAAoB,
|
|
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,GAAI,YAAO,WAIlC,CAAC;AAYF,eAAO,MAAM,eAAe,GAAI,gBAAW,EAAE,QAAG;;;;;;;GAAyD,CAAC;AAE1G,eAAO,MAAM,kBAAkB,GAAI,iBAAY,EAAE,eAAU,EAAE,QAAG,EAAE,MAAC,UAyClE,CAAC;AAEF,wBAAgB,oBAAoB,sBAiQnC"}
|
|
@@ -7,12 +7,12 @@ 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 {
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
11
|
import { Button, MenuToggle, Select, SelectGroup, SelectList, SelectOption, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, Truncate, } from '@patternfly/react-core';
|
|
12
12
|
import TimesCircleIcon from '@patternfly/react-icons/dist/js/icons/times-circle-icon';
|
|
13
|
-
import { LoadingIndicator,
|
|
13
|
+
import { LoadingIndicator, useSelectKeyboardNavigator } from '@rh-support/components';
|
|
14
14
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
15
|
-
import { getDropdownBtnPlaceholder } from '@rh-support/utils';
|
|
15
|
+
import { fetchLoggedInUserAccountContactsFromGraphQL, getDropdownBtnPlaceholder } from '@rh-support/utils';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import isNull from 'lodash/isNull';
|
|
18
18
|
import isUndefined from 'lodash/isUndefined';
|
|
@@ -84,13 +84,14 @@ export const getSelectedListObj = (contactsList, filterInfo, own, t) => {
|
|
|
84
84
|
};
|
|
85
85
|
export function CreatorSsoNameFilter() {
|
|
86
86
|
const { t } = useTranslation();
|
|
87
|
+
const apolloClient = useApolloClient();
|
|
87
88
|
const { filterInfo } = useContext(CaseListFilterStateContext);
|
|
88
89
|
const dispatch = useContext(CaseListFilterDispatchContext);
|
|
89
90
|
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
90
91
|
const CaseListDispatch = useCaseListDispatchContext();
|
|
91
92
|
const own = loggedInUserRights.data.getSSOUsername();
|
|
92
93
|
const isExternalNonOrgAdmin = !loggedInUserRights.data.isInternal() && loggedInUserRights.data.isCustomerNonOrgAdmin();
|
|
93
|
-
const
|
|
94
|
+
const [isFetchingExternalContacts, setIsFetchingExternalContacts] = useState(false);
|
|
94
95
|
const externalInputRef = useRef();
|
|
95
96
|
const [externalContactList, setExternalContactList] = useState([]);
|
|
96
97
|
const [isExternalOpen, setIsExternalOpen] = useState(false);
|
|
@@ -163,19 +164,25 @@ export function CreatorSsoNameFilter() {
|
|
|
163
164
|
if (loggedInUserRights.data.isInternal())
|
|
164
165
|
return;
|
|
165
166
|
const fetchStrataAccountUsers = () => __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
167
|
+
setIsFetchingExternalContacts(true);
|
|
168
|
+
try {
|
|
169
|
+
const externalContacts = isExternalNonOrgAdmin
|
|
170
|
+
? []
|
|
171
|
+
: yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
172
|
+
const chipsNameSsoPairs = externalContacts.reduce((result, item) => {
|
|
173
|
+
result[item.ssoUsername] = { firstName: item.firstName || '', lastName: item.lastName || '' };
|
|
174
|
+
return result;
|
|
175
|
+
}, {});
|
|
176
|
+
setChipsNameSsoMap(CaseListDispatch, chipsNameSsoPairs);
|
|
177
|
+
setExternalContactList(externalContacts);
|
|
178
|
+
}
|
|
179
|
+
finally {
|
|
180
|
+
setIsFetchingExternalContacts(false);
|
|
181
|
+
}
|
|
175
182
|
});
|
|
176
183
|
fetchStrataAccountUsers();
|
|
177
184
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
178
|
-
}, [dispatch, isExternalNonOrgAdmin, loggedInUserRights.data]);
|
|
185
|
+
}, [dispatch, isExternalNonOrgAdmin, loggedInUserRights.data, apolloClient]);
|
|
179
186
|
const filteredExternalList = useMemo(() => {
|
|
180
187
|
return [
|
|
181
188
|
...(noResults && !isExternalNonOrgAdmin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseListMapper.d.ts","sourceRoot":"","sources":["../../../src/utils/caseListMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"caseListMapper.d.ts","sourceRoot":"","sources":["../../../src/utils/caseListMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGhE,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa,CAgC9E;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC,GAAG,aAAa,EAAE,CAElG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import unescape from 'lodash/unescape';
|
|
1
2
|
export function mapGraphQLCaseToCaseListItem(node) {
|
|
2
3
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
3
4
|
const isEscalated = ((_a = node.IsEscalated) === null || _a === void 0 ? void 0 : _a.value) === true;
|
|
@@ -25,7 +26,7 @@ export function mapGraphQLCaseToCaseListItem(node) {
|
|
|
25
26
|
case_last_public_update_date: ((_2 = node.LastModifiedDate) === null || _2 === void 0 ? void 0 : _2.value) || '',
|
|
26
27
|
case_customer_escalation: isEscalated,
|
|
27
28
|
case_closedDate: ((_3 = node.ClosedDate) === null || _3 === void 0 ? void 0 : _3.value) || '',
|
|
28
|
-
case_folderName: ((_5 = (_4 = node.Group__r) === null || _4 === void 0 ? void 0 : _4.Name) === null || _5 === void 0 ? void 0 : _5.value) || '',
|
|
29
|
+
case_folderName: unescape(((_5 = (_4 = node.Group__r) === null || _4 === void 0 ? void 0 : _4.Name) === null || _5 === void 0 ? void 0 : _5.value) || ''),
|
|
29
30
|
case_folderNumber: ((_6 = node.Group__c) === null || _6 === void 0 ? void 0 : _6.value) || ((_7 = node.Group__r) === null || _7 === void 0 ? void 0 : _7.Id) || '',
|
|
30
31
|
case_alternate_id: ((_8 = node.AlternateCaseId__c) === null || _8 === void 0 ? void 0 : _8.value) || '',
|
|
31
32
|
uri: '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.199",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"solr-query-builder": "1.0.1"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@cee-eng/hydrajs": "^4.18.
|
|
37
|
+
"@cee-eng/hydrajs": "^4.18.114",
|
|
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.195",
|
|
42
|
+
"@rh-support/react-context": "2.5.289",
|
|
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.141",
|
|
45
|
+
"@rh-support/utils": "2.5.123",
|
|
46
46
|
"localforage": "^1.10.0",
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"pegjs": "^0.10.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"defaults and supports es6-module",
|
|
93
93
|
"maintained node versions"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "f5994856f35873c8555a84006c0d278fbc98b067"
|
|
96
96
|
}
|