@rh-support/cases 2.6.218 → 2.6.219
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/case-list-table/CaseListLabelGroup.d.ts +9 -0
- package/lib/esm/components/case-list/case-list-table/CaseListLabelGroup.d.ts.map +1 -0
- package/lib/esm/components/case-list/case-list-table/CaseListLabelGroup.js +105 -0
- package/lib/esm/components/case-list/case-list-table/CaseListTable.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-table/CaseListTable.js +70 -53
- package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-table/DownloadCSVFileModal.js +9 -0
- package/lib/esm/components/case-list/case-list-table/table-column-selector/TableColumnSelector.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-table/table-column-selector/TableColumnSelector.js +1 -0
- package/lib/esm/css/caseList.css +72 -0
- package/lib/esm/enums/case.d.ts +3 -1
- package/lib/esm/enums/case.d.ts.map +1 -1
- package/lib/esm/enums/case.js +2 -0
- package/lib/esm/models/caseList.d.ts +1 -0
- package/lib/esm/models/caseList.d.ts.map +1 -1
- package/lib/esm/test-utils/mockData.d.ts +1 -0
- package/lib/esm/test-utils/mockData.d.ts.map +1 -1
- package/lib/esm/test-utils/mockData.js +1 -0
- package/lib/esm/utils/caseListMapper.d.ts.map +1 -1
- package/lib/esm/utils/caseListMapper.js +9 -2
- package/package.json +6 -6
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
labels: string[];
|
|
4
|
+
}
|
|
5
|
+
export declare function truncateCollapsedLabelName(labelName: string): string;
|
|
6
|
+
export declare function getVisibleLabelCount(itemWidths: number[], availableWidth: number, overflowWidth: number, gap: number): number;
|
|
7
|
+
export default function CaseListLabelGroup({ labels }: IProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=CaseListLabelGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseListLabelGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListLabelGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAGjE,UAAU,MAAM;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAWD,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMpE;AAED,wBAAgB,oBAAoB,CAChC,UAAU,EAAE,MAAM,EAAE,EACpB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,GACZ,MAAM,CAuBR;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,qBAyH5D"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Label, LabelGroup, Popover, PopoverPosition } from '@patternfly/react-core';
|
|
2
|
+
import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
const COLLAPSED_LABEL_CHAR_LIMIT = 12;
|
|
5
|
+
function getLabelGapPx(element) {
|
|
6
|
+
const gap = getComputedStyle(element).getPropertyValue('--case-list-label-gap').trim();
|
|
7
|
+
const parsedGap = Number.parseFloat(gap);
|
|
8
|
+
return Number.isNaN(parsedGap) ? 0 : parsedGap;
|
|
9
|
+
}
|
|
10
|
+
export function truncateCollapsedLabelName(labelName) {
|
|
11
|
+
if (labelName.length <= COLLAPSED_LABEL_CHAR_LIMIT) {
|
|
12
|
+
return labelName;
|
|
13
|
+
}
|
|
14
|
+
return `${labelName.slice(0, COLLAPSED_LABEL_CHAR_LIMIT)}...`;
|
|
15
|
+
}
|
|
16
|
+
export function getVisibleLabelCount(itemWidths, availableWidth, overflowWidth, gap) {
|
|
17
|
+
if (!itemWidths.length || availableWidth <= 0) {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
let usedWidth = 0;
|
|
21
|
+
let visibleCount = 0;
|
|
22
|
+
for (let index = 0; index < itemWidths.length; index++) {
|
|
23
|
+
const nextUsedWidth = usedWidth + (visibleCount > 0 ? gap : 0) + itemWidths[index];
|
|
24
|
+
const remainingCount = itemWidths.length - (index + 1);
|
|
25
|
+
const totalWidth = remainingCount > 0 ? nextUsedWidth + gap + overflowWidth : nextUsedWidth;
|
|
26
|
+
if (totalWidth <= availableWidth) {
|
|
27
|
+
usedWidth = nextUsedWidth;
|
|
28
|
+
visibleCount = index + 1;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
return Math.max(1, visibleCount);
|
|
32
|
+
}
|
|
33
|
+
return visibleCount;
|
|
34
|
+
}
|
|
35
|
+
export default function CaseListLabelGroup({ labels }) {
|
|
36
|
+
const { t } = useTranslation();
|
|
37
|
+
const containerRef = useRef(null);
|
|
38
|
+
const measureRef = useRef(null);
|
|
39
|
+
const overflowMeasureRef = useRef(null);
|
|
40
|
+
const lastMeasuredWidthRef = useRef(0);
|
|
41
|
+
const [numVisible, setNumVisible] = useState(labels.length);
|
|
42
|
+
useLayoutEffect(() => {
|
|
43
|
+
const container = containerRef.current;
|
|
44
|
+
const measureRow = measureRef.current;
|
|
45
|
+
if (!container || !measureRow || !labels.length) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const tableCell = container.closest('td');
|
|
49
|
+
const updateVisibleCount = () => {
|
|
50
|
+
var _a, _b, _c;
|
|
51
|
+
const availableWidth = (_a = tableCell === null || tableCell === void 0 ? void 0 : tableCell.clientWidth) !== null && _a !== void 0 ? _a : container.clientWidth;
|
|
52
|
+
if (availableWidth <= 0) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const itemWidths = Array.from(measureRow.querySelectorAll('[data-measure-label]')).map((element) => element.offsetWidth);
|
|
56
|
+
const overflowWidth = (_c = (_b = overflowMeasureRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth) !== null && _c !== void 0 ? _c : 32;
|
|
57
|
+
const labelGapPx = getLabelGapPx(container);
|
|
58
|
+
const nextVisible = getVisibleLabelCount(itemWidths, availableWidth, overflowWidth, labelGapPx);
|
|
59
|
+
lastMeasuredWidthRef.current = availableWidth;
|
|
60
|
+
setNumVisible((current) => (current === nextVisible ? current : nextVisible));
|
|
61
|
+
};
|
|
62
|
+
updateVisibleCount();
|
|
63
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
67
|
+
const entry = entries[0];
|
|
68
|
+
if (!entry) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const nextWidth = Math.round(entry.contentRect.width);
|
|
72
|
+
if (nextWidth === lastMeasuredWidthRef.current) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
updateVisibleCount();
|
|
76
|
+
});
|
|
77
|
+
resizeObserver.observe(tableCell !== null && tableCell !== void 0 ? tableCell : container);
|
|
78
|
+
return () => resizeObserver.disconnect();
|
|
79
|
+
}, [labels]);
|
|
80
|
+
const visibleLabels = labels.slice(0, numVisible);
|
|
81
|
+
const hiddenLabels = labels.slice(numVisible);
|
|
82
|
+
const remainingCount = hiddenLabels.length;
|
|
83
|
+
return (React.createElement("div", { ref: containerRef, className: "case-list-label-cell" },
|
|
84
|
+
React.createElement("div", { ref: measureRef, className: "case-list-label-cell__measure", "aria-hidden": "true" },
|
|
85
|
+
labels.map((labelName) => (React.createElement("span", { key: labelName, "data-measure-label": true },
|
|
86
|
+
React.createElement(Label, { variant: "outline" }, truncateCollapsedLabelName(labelName))))),
|
|
87
|
+
React.createElement("span", { ref: overflowMeasureRef },
|
|
88
|
+
React.createElement(Label, { variant: "outline" },
|
|
89
|
+
"+",
|
|
90
|
+
labels.length))),
|
|
91
|
+
React.createElement("div", { className: "pf-v6-c-label-group case-list-label-group" },
|
|
92
|
+
React.createElement("div", { className: "pf-v6-c-label-group__main" },
|
|
93
|
+
React.createElement("ul", { className: "pf-v6-c-label-group__list", "aria-label": t('Case labels') },
|
|
94
|
+
visibleLabels.map((labelName) => {
|
|
95
|
+
const displayName = truncateCollapsedLabelName(labelName);
|
|
96
|
+
return (React.createElement("li", { key: labelName, className: "pf-v6-c-label-group__list-item" },
|
|
97
|
+
React.createElement(Label, { variant: "outline", title: displayName !== labelName ? labelName : undefined }, displayName)));
|
|
98
|
+
}),
|
|
99
|
+
remainingCount > 0 && (React.createElement("li", { className: "pf-v6-c-label-group__list-item" },
|
|
100
|
+
React.createElement(Popover, { "aria-label": t('Additional case labels'), className: "case-list-label-popover-panel", position: PopoverPosition.topEnd, enableFlip: false, hasAutoWidth: true, maxWidth: "20rem", distance: 15, appendTo: () => document.body, bodyContent: React.createElement("div", { className: "case-list-label-popover" },
|
|
101
|
+
React.createElement(LabelGroup, { numLabels: hiddenLabels.length, "aria-label": t('Case labels') }, hiddenLabels.map((labelName) => (React.createElement(Label, { key: labelName, variant: "outline" }, labelName))))) },
|
|
102
|
+
React.createElement(Label, { variant: "overflow" },
|
|
103
|
+
"+",
|
|
104
|
+
remainingCount)))))))));
|
|
105
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseListTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAsB3E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAaxD,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,iBAAiB,EAAyB,MAAM,0BAA0B,CAAC;AAEpF,OAAO,EAAgB,SAAS,EAAc,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseListTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAsB3E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAaxD,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,iBAAiB,EAAyB,MAAM,0BAA0B,CAAC;AAEpF,OAAO,EAAgB,SAAS,EAAc,MAAM,0BAA0B,CAAC;AA8B/E,UAAU,MAAM;IACZ,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAC;CACjD;AAuBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,qBA8pB1C"}
|
|
@@ -16,6 +16,7 @@ import { Link } from 'react-router-dom';
|
|
|
16
16
|
import { CaseListColumnIds } from '../../../enums/case';
|
|
17
17
|
import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
|
|
18
18
|
import { clearFilters, updateSort } from '../CaseListFilterReducer';
|
|
19
|
+
import CaseListLabelGroup from './CaseListLabelGroup';
|
|
19
20
|
import SeverityLabel from './SeverityLabel';
|
|
20
21
|
import { TableColumnSelector } from './table-column-selector/TableColumnSelector';
|
|
21
22
|
import { TableActionsDropdown } from './TableActionsDropdown';
|
|
@@ -27,6 +28,7 @@ const initialSelectedColumns = [
|
|
|
27
28
|
CaseListColumnIds.owner,
|
|
28
29
|
CaseListColumnIds.modified,
|
|
29
30
|
CaseListColumnIds.status,
|
|
31
|
+
CaseListColumnIds.caseLabel,
|
|
30
32
|
];
|
|
31
33
|
const EMPTY_STATE_FILTER_APPLIED = 'Try removing filters or modifying your search query to broaden the results.';
|
|
32
34
|
const EMPTY_STATE_NO_FILTERS = 'The table will be populated after creating your first support case.';
|
|
@@ -135,6 +137,11 @@ export function CaseListTable(props) {
|
|
|
135
137
|
sortable: true,
|
|
136
138
|
show: isColumnVisible(CaseListColumnIds.group),
|
|
137
139
|
},
|
|
140
|
+
{
|
|
141
|
+
id: CaseListColumnIds.caseLabel,
|
|
142
|
+
title: t('Case labels'),
|
|
143
|
+
show: isColumnVisible(CaseListColumnIds.caseLabel),
|
|
144
|
+
},
|
|
138
145
|
];
|
|
139
146
|
const visibleCaseListColumns = columns.filter((column) => visibleColumns.includes(column.id));
|
|
140
147
|
const allRows = caseListData.map((row, index) => row.case_number);
|
|
@@ -260,28 +267,32 @@ export function CaseListTable(props) {
|
|
|
260
267
|
return (group === null || group === void 0 ? void 0 : group.name) || '';
|
|
261
268
|
};
|
|
262
269
|
const localRows = [
|
|
263
|
-
...caseListData === null || caseListData === void 0 ? void 0 : caseListData.map((row, index) =>
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
270
|
+
...caseListData === null || caseListData === void 0 ? void 0 : caseListData.map((row, index) => {
|
|
271
|
+
var _a;
|
|
272
|
+
return ({
|
|
273
|
+
case_number: row.case_number,
|
|
274
|
+
case_summary: row.case_summary,
|
|
275
|
+
case_createdByName: row.case_createdByName,
|
|
276
|
+
case_lastModifiedDate: formatDate(row.case_last_public_update_date)
|
|
277
|
+
? formatDate(row.case_last_public_update_date)
|
|
278
|
+
: '',
|
|
279
|
+
case_severity: row.case_severity ? row.case_severity : '',
|
|
280
|
+
case_status: mapSfdcStatusToPortalStatus(row.case_status),
|
|
281
|
+
case_createdDate: formatDate(row.case_createdDate),
|
|
282
|
+
case_accountNumber: row.case_accountNumber,
|
|
283
|
+
case_alternate_id: row.case_alternate_id ? row.case_alternate_id : '',
|
|
284
|
+
case_type: toNewCaseTypeSwitcher(row.case_type),
|
|
285
|
+
case_closedDate: formatDate(row.case_closedDate) ? formatDate(row.case_closedDate) : '',
|
|
286
|
+
case_folderName: row.case_folderName || getCaseGroupName(row.case_folderNumber) || '',
|
|
287
|
+
case_contactName: row.case_contactName,
|
|
288
|
+
case_lastModifiedByName: row.case_last_public_update_by ? row.case_last_public_update_by : '',
|
|
289
|
+
case_version: row.case_version,
|
|
290
|
+
id: row.id,
|
|
291
|
+
case_product: row.case_product,
|
|
292
|
+
case_customer_escalation: row.case_customer_escalation,
|
|
293
|
+
case_label: (_a = row.case_label) !== null && _a !== void 0 ? _a : [],
|
|
294
|
+
});
|
|
295
|
+
}),
|
|
285
296
|
];
|
|
286
297
|
useEffect(() => {
|
|
287
298
|
var _a;
|
|
@@ -365,37 +376,43 @@ export function CaseListTable(props) {
|
|
|
365
376
|
: undefined,
|
|
366
377
|
}, id: column.id, sort: column.sortable ? onSort(index) : undefined, key: column.id }, column.title))))),
|
|
367
378
|
React.createElement(Tbody, null, !props.isCaseListPageLoading && (caseListData || []).length < 1 ? (noResultFoundRow) : props.isCaseListPageLoading ? (loadingRowDefault) : (React.createElement(React.Fragment, null, sortedCaseListData === null || sortedCaseListData === void 0 ? void 0 :
|
|
368
|
-
sortedCaseListData.map((row, rowIndex) =>
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
React.createElement(
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
React.createElement(
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
React.createElement(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
379
|
+
sortedCaseListData.map((row, rowIndex) => {
|
|
380
|
+
var _a;
|
|
381
|
+
return (React.createElement(Tr, { onRowClick: (event) => (onRowClick ? onRowClick(event, row) : ''), key: row === null || row === void 0 ? void 0 : row.case_number },
|
|
382
|
+
React.createElement(Td, { className: "pf-v6-u-pl-md", select: {
|
|
383
|
+
rowIndex: rowIndex,
|
|
384
|
+
onSelect: (_event, _idx) => onRowSelect(_event, row === null || row === void 0 ? void 0 : row.case_number),
|
|
385
|
+
isSelected: selectedCases.includes(row === null || row === void 0 ? void 0 : row.case_number),
|
|
386
|
+
} }),
|
|
387
|
+
React.createElement(Td, { dataLabel: "Case ID", id: row.case_number, scope: "row" },
|
|
388
|
+
React.createElement("div", { className: "case-number-section" },
|
|
389
|
+
React.createElement(Link, { to: `/case/${row.case_number}`, onClick: () => dtmTrackEventCaseStepEncountered('review', row.case_number, row.case_product, row.case_version) },
|
|
390
|
+
React.createElement("span", { className: "case-number" }, row.case_number)),
|
|
391
|
+
row.case_customer_escalation ? (React.createElement("div", { className: "escalation-label" },
|
|
392
|
+
React.createElement(Trans, null, "Escalated"))) : (''))),
|
|
393
|
+
React.createElement(Td, { dataLabel: "Title" }, row.case_summary),
|
|
394
|
+
React.createElement(Td, { className: !isColumnVisible('contactName') ? Visibility.hidden : '', dataLabel: "Owner" }, row.case_contactName),
|
|
395
|
+
React.createElement(Td, { className: !isColumnVisible('lastModifiedDate') ? Visibility.hidden : '', dataLabel: "Modified by" },
|
|
396
|
+
React.createElement("span", { className: "modified-name" }, row.case_lastModifiedByName),
|
|
397
|
+
row.case_lastModifiedDate ? formatDate(row.case_lastModifiedDate) : ''),
|
|
398
|
+
React.createElement(Td, { className: !isColumnVisible('severity') ? Visibility.hidden : '', dataLabel: "Severity" },
|
|
399
|
+
React.createElement(SeverityLabel, { sevValue: row.case_severity })),
|
|
400
|
+
React.createElement(Td, { className: !isColumnVisible('status') ? Visibility.hidden : '', dataLabel: "Status" }, row.case_status),
|
|
401
|
+
React.createElement(Td, { className: !isColumnVisible('createdDate') ? Visibility.hidden : '', dataLabel: "Created by" },
|
|
402
|
+
React.createElement("span", { className: "created-name" }, row.case_createdByName),
|
|
403
|
+
row.case_createdDate ? formatDate(row.case_createdDate) : ''),
|
|
404
|
+
React.createElement(Td, { className: !isColumnVisible('product') ? Visibility.hidden : '', dataLabel: "Product and Version" },
|
|
405
|
+
row.case_product,
|
|
406
|
+
React.createElement("span", { style: { display: 'block' } }, row.case_version)),
|
|
407
|
+
React.createElement(Td, { className: !isColumnVisible('accountNumber') ? Visibility.hidden : '', dataLabel: "Account number" }, row.case_accountNumber),
|
|
408
|
+
React.createElement(Td, { className: !isColumnVisible('alternateCaseId') ? Visibility.hidden : '', "data-label": "Personal reference number" }, row.case_alternate_id ? row.case_alternate_id : ''),
|
|
409
|
+
React.createElement(Td, { className: !isColumnVisible('type') ? Visibility.hidden : '', "data-label": "Support type" }, row.case_type),
|
|
410
|
+
React.createElement(Td, { className: !isColumnVisible('closedDate') ? Visibility.hidden : '', "data-label": "Closed date" }, row.case_closedDate ? formatDate(row.case_closedDate) : ''),
|
|
411
|
+
React.createElement(Td, { className: !isColumnVisible('folderName') ? Visibility.hidden : '', "data-label": "Group" }, row.case_folderName ? row.case_folderName : ''),
|
|
412
|
+
React.createElement(Td, { className: !isColumnVisible(CaseListColumnIds.caseLabel)
|
|
413
|
+
? Visibility.hidden
|
|
414
|
+
: '', dataLabel: "Case labels" }, ((_a = row.case_label) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement(CaseListLabelGroup, { labels: row.case_label })) : (''))));
|
|
415
|
+
}),
|
|
399
416
|
(props.hasNextPage || props.isLoadingMore || props.loadMoreError) && (React.createElement(Tr, { key: "skeleton-loader-row", className: "skeleton-loader-row" },
|
|
400
417
|
React.createElement(Td, { className: "pf-v6-u-pl-md" },
|
|
401
418
|
React.createElement("div", { ref: props.sentinelRef, className: "skeleton-sentinel" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadCSVFileModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/DownloadCSVFileModal.tsx"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AAgCrC,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,oBAAoB,CAAC;IAClC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAWD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DownloadCSVFileModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/DownloadCSVFileModal.tsx"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AAgCrC,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,oBAAoB,CAAC;IAClC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAWD,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,KAAK,EAAE,MAAM,qBA4XzD"}
|
|
@@ -49,6 +49,7 @@ export default function DownloadCSVFileModal(props) {
|
|
|
49
49
|
type: false,
|
|
50
50
|
caseClosedDate: false,
|
|
51
51
|
group: false,
|
|
52
|
+
caseLabel: false,
|
|
52
53
|
});
|
|
53
54
|
const [isSaveClicked, setIsSavedClicked] = useState(false);
|
|
54
55
|
function getKey(key) {
|
|
@@ -129,6 +130,12 @@ export default function DownloadCSVFileModal(props) {
|
|
|
129
130
|
key: getKey('groupName'),
|
|
130
131
|
label: 'Group',
|
|
131
132
|
},
|
|
133
|
+
{
|
|
134
|
+
checkbox: checkboxes.caseLabel,
|
|
135
|
+
key: getKey('caseLabel'),
|
|
136
|
+
label: 'Case labels',
|
|
137
|
+
transform: (labels) => (Array.isArray(labels) ? labels.join(', ') : labels || ''),
|
|
138
|
+
},
|
|
132
139
|
], [checkboxes]);
|
|
133
140
|
const getHeaders = () => {
|
|
134
141
|
const updatedCsvHeaders = [...csvHeaders];
|
|
@@ -202,6 +209,7 @@ export default function DownloadCSVFileModal(props) {
|
|
|
202
209
|
type: newSelectAllState,
|
|
203
210
|
caseClosedDate: newSelectAllState,
|
|
204
211
|
group: newSelectAllState,
|
|
212
|
+
caseLabel: newSelectAllState,
|
|
205
213
|
};
|
|
206
214
|
setCheckboxes((prevCheckboxes) => (Object.assign({ selectAll: !prevCheckboxes.selectAll }, updatedCheckboxes)));
|
|
207
215
|
};
|
|
@@ -219,6 +227,7 @@ export default function DownloadCSVFileModal(props) {
|
|
|
219
227
|
{ label: 'Product and version', key: 'productVersion' },
|
|
220
228
|
{ label: 'Personal reference number', key: 'alternateId' },
|
|
221
229
|
{ label: 'Closed date', key: 'caseClosedDate' },
|
|
230
|
+
{ label: 'Case labels', key: 'caseLabel' },
|
|
222
231
|
];
|
|
223
232
|
const generateCheckboxes = (fieldDefinitions) => {
|
|
224
233
|
return fieldDefinitions.map((field) => (React.createElement(Checkbox, { key: field.key, className: "nested", label: t(field.label), isChecked: checkboxes[field.key], onChange: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableColumnSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/case-list/case-list-table/table-column-selector/TableColumnSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AAWpC,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B;AAMD,wBAAgB,mBAAmB,CAAC,EAAE,sBAAsB,EAAE,aAAa,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TableColumnSelector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/case-list/case-list-table/table-column-selector/TableColumnSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AAWpC,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpD,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B;AAMD,wBAAgB,mBAAmB,CAAC,EAAE,sBAAsB,EAAE,aAAa,EAAE,EAAE,MAAM,qBAiGpF"}
|
package/lib/esm/components/case-list/case-list-table/table-column-selector/TableColumnSelector.js
CHANGED
|
@@ -38,6 +38,7 @@ export function TableColumnSelector({ onColumnSelectorChange, cachedColumns }) {
|
|
|
38
38
|
{ label: t('Product and version'), key: 'product' },
|
|
39
39
|
{ label: t('Personal reference number'), key: 'alternateCaseId' },
|
|
40
40
|
{ label: t('Closed date'), key: 'closedDate' },
|
|
41
|
+
{ label: t('Case labels'), key: 'caseLabel' },
|
|
41
42
|
];
|
|
42
43
|
const generateCheckboxes = (fieldDefinitions) => {
|
|
43
44
|
return fieldDefinitions === null || fieldDefinitions === void 0 ? void 0 : fieldDefinitions.map((field) => (React.createElement(Checkbox, { key: field.key, className: "case-column-selector", label: field.label, isChecked: cachedColumns.includes(field.key), onChange: () => {
|
package/lib/esm/css/caseList.css
CHANGED
|
@@ -252,6 +252,78 @@
|
|
|
252
252
|
display: none;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
+
.case-list-table th#caseLabel,
|
|
256
|
+
.case-list-table td[data-label='Case labels'] {
|
|
257
|
+
width: 20rem;
|
|
258
|
+
min-width: 20rem;
|
|
259
|
+
max-width: 20rem;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.case-list-label-cell {
|
|
263
|
+
--case-list-label-gap: 8px;
|
|
264
|
+
position: relative;
|
|
265
|
+
max-width: 100%;
|
|
266
|
+
width: 100%;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.case-list-label-cell__measure {
|
|
270
|
+
display: flex;
|
|
271
|
+
column-gap: var(--case-list-label-gap);
|
|
272
|
+
position: absolute;
|
|
273
|
+
visibility: hidden;
|
|
274
|
+
pointer-events: none;
|
|
275
|
+
height: 0;
|
|
276
|
+
overflow: hidden;
|
|
277
|
+
white-space: nowrap;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.case-list-table td[data-label='Case labels'] .case-list-label-group,
|
|
281
|
+
.case-list-table td[data-label='Case labels'] .case-list-label-group .pf-v6-c-label-group__main,
|
|
282
|
+
.case-list-table td[data-label='Case labels'] .case-list-label-group .pf-v6-c-label-group__list {
|
|
283
|
+
max-width: 100%;
|
|
284
|
+
width: 100%;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.case-list-table td[data-label='Case labels'] .case-list-label-group .pf-v6-c-label-group__list {
|
|
288
|
+
column-gap: var(--case-list-label-gap);
|
|
289
|
+
flex-wrap: nowrap;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.case-list-table td[data-label='Case labels'] .case-list-label-group .pf-v6-c-label-group__list-item {
|
|
293
|
+
flex-shrink: 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.case-list-table td[data-label='Case labels'] .case-list-label-group .pf-v6-c-label__text {
|
|
297
|
+
white-space: nowrap;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.case-list-label-popover .pf-v6-c-label-group__list {
|
|
301
|
+
column-gap: var(--case-list-label-gap);
|
|
302
|
+
row-gap: var(--case-list-label-gap);
|
|
303
|
+
flex-wrap: wrap;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.case-list-label-popover-panel {
|
|
307
|
+
--case-list-label-gap: 8px;
|
|
308
|
+
--case-list-label-popover-offset-x: 0.9rem;
|
|
309
|
+
--case-list-label-popover-offset-y: 0.1rem;
|
|
310
|
+
--case-list-label-popover-close-offset-x: 0.5rem;
|
|
311
|
+
--pf-v6-c-popover__close--sibling--PaddingInlineEnd: var(--pf-t--global--spacer--md);
|
|
312
|
+
--pf-v6-c-popover__close--InsetInlineEnd: calc(
|
|
313
|
+
var(--pf-v6-c-popover__content--PaddingInlineEnd, 1rem) - var(--case-list-label-popover-close-offset-x)
|
|
314
|
+
);
|
|
315
|
+
margin-inline-start: var(--case-list-label-popover-offset-x);
|
|
316
|
+
margin-block-start: var(--case-list-label-popover-offset-y);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.case-list-label-popover-panel .pf-v6-c-popover__close .pf-v6-c-button {
|
|
320
|
+
width: 21px;
|
|
321
|
+
height: 21px;
|
|
322
|
+
min-width: 21px;
|
|
323
|
+
min-height: 21px;
|
|
324
|
+
padding: 0;
|
|
325
|
+
}
|
|
326
|
+
|
|
255
327
|
.case-list-table td[data-label='Title'] {
|
|
256
328
|
text-align: start !important;
|
|
257
329
|
}
|
package/lib/esm/enums/case.d.ts
CHANGED
|
@@ -31,7 +31,8 @@ export declare enum CaseListColumnIds {
|
|
|
31
31
|
group = "folderName",
|
|
32
32
|
alternateCaseId = "alternateCaseId",
|
|
33
33
|
type = "type",
|
|
34
|
-
caseClosedDate = "closedDate"
|
|
34
|
+
caseClosedDate = "closedDate",
|
|
35
|
+
caseLabel = "caseLabel"
|
|
35
36
|
}
|
|
36
37
|
export declare const caseListSortColumnIdsToSolrMap: {
|
|
37
38
|
number: SolrKeys;
|
|
@@ -75,5 +76,6 @@ export declare const caseTableColumSortNamesMap: {
|
|
|
75
76
|
alternateCaseId: string;
|
|
76
77
|
type: string;
|
|
77
78
|
closedDate: string;
|
|
79
|
+
caseLabel: string;
|
|
78
80
|
};
|
|
79
81
|
//# sourceMappingURL=case.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../../src/enums/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/C,oBAAY,UAAU;IAClB,+BAA+B,wCAAwC;IACvE,kCAAkC,2CAA2C;IAC7E,UAAU,gBAAgB;IAC1B,IAAI,mBAAmB;IACvB,MAAM,WAAW;IACjB,GAAG,cAAc;IACjB,4DAA4D;IAC5D,iBAAiB,wBAAwB;IACzC,4DAA4D;IAC5D,eAAe,uBAAuB;CACzC;AAED,oBAAY,YAAY;IACpB,MAAM,eAAe;IACrB,SAAS,kBAAkB;IAC3B,MAAM,eAAe;IACrB,GAAG,YAAY;CAClB;AAED,eAAO,MAAM,cAAc,0UACgT,CAAC;AAE5U,oBAAY,iBAAiB;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,gBAAgB;IACrB,OAAO,gBAAgB;IACvB,MAAM,WAAW;IACjB,QAAQ,qBAAqB;IAC7B,iBAAiB,YAAY;IAC7B,aAAa,kBAAkB;IAC/B,KAAK,eAAe;IACpB,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,cAAc,eAAe;
|
|
1
|
+
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../../src/enums/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/C,oBAAY,UAAU;IAClB,+BAA+B,wCAAwC;IACvE,kCAAkC,2CAA2C;IAC7E,UAAU,gBAAgB;IAC1B,IAAI,mBAAmB;IACvB,MAAM,WAAW;IACjB,GAAG,cAAc;IACjB,4DAA4D;IAC5D,iBAAiB,wBAAwB;IACzC,4DAA4D;IAC5D,eAAe,uBAAuB;CACzC;AAED,oBAAY,YAAY;IACpB,MAAM,eAAe;IACrB,SAAS,kBAAkB;IAC3B,MAAM,eAAe;IACrB,GAAG,YAAY;CAClB;AAED,eAAO,MAAM,cAAc,0UACgT,CAAC;AAE5U,oBAAY,iBAAiB;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,gBAAgB;IACrB,OAAO,gBAAgB;IACvB,MAAM,WAAW;IACjB,QAAQ,qBAAqB;IAC7B,iBAAiB,YAAY;IAC7B,aAAa,kBAAkB;IAC/B,KAAK,eAAe;IACpB,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,cAAc,eAAe;IAC7B,SAAS,cAAc;CAC1B;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;CAa1C,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;CAa1C,CAAC;AAGF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAWpE,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;CActC,CAAC"}
|
package/lib/esm/enums/case.js
CHANGED
|
@@ -35,6 +35,7 @@ export var CaseListColumnIds;
|
|
|
35
35
|
CaseListColumnIds["alternateCaseId"] = "alternateCaseId";
|
|
36
36
|
CaseListColumnIds["type"] = "type";
|
|
37
37
|
CaseListColumnIds["caseClosedDate"] = "closedDate";
|
|
38
|
+
CaseListColumnIds["caseLabel"] = "caseLabel";
|
|
38
39
|
})(CaseListColumnIds || (CaseListColumnIds = {}));
|
|
39
40
|
export const caseListSortColumnIdsToSolrMap = {
|
|
40
41
|
[CaseListColumnIds.caseId]: SolrKeys.caseNumber,
|
|
@@ -90,4 +91,5 @@ export const caseTableColumSortNamesMap = {
|
|
|
90
91
|
[CaseListColumnIds.alternateCaseId]: 'Personal reference number',
|
|
91
92
|
[CaseListColumnIds.type]: 'Support type',
|
|
92
93
|
[CaseListColumnIds.caseClosedDate]: 'Close date',
|
|
94
|
+
[CaseListColumnIds.caseLabel]: 'Case labels',
|
|
93
95
|
};
|
|
@@ -37,6 +37,7 @@ export interface ISolrCaseListResponse {
|
|
|
37
37
|
uri: string;
|
|
38
38
|
case_closedDate: string;
|
|
39
39
|
case_alternate_id: string;
|
|
40
|
+
case_label?: string[];
|
|
40
41
|
}
|
|
41
42
|
export type ISolrCaseSearchResponse = ISolrResponse<ISolrCaseListResponse, IFacetCounts>;
|
|
42
43
|
export type ICaseListResponse = ISolrCaseListResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseList.d.ts","sourceRoot":"","sources":["../../../src/models/caseList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,WAAW,WAAW;IACxB,2BAA2B,EAAE,kBAAkB,EAAE,CAAC;CACrD;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACtD,KAAK,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,EAAE,CAAC;IAClB,aAAa,CAAC,EAAE,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,EAAE,OAAO,CAAC;IAClC,0BAA0B,EAAE,MAAM,CAAC;IACnC,4BAA4B,EAAE,MAAM,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"caseList.d.ts","sourceRoot":"","sources":["../../../src/models/caseList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,WAAW,WAAW;IACxB,2BAA2B,EAAE,kBAAkB,EAAE,CAAC;CACrD;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACtD,KAAK,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,EAAE,CAAC;IAClB,aAAa,CAAC,EAAE,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,EAAE,OAAO,CAAC;IAClC,0BAA0B,EAAE,MAAM,CAAC;IACnC,4BAA4B,EAAE,MAAM,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,MAAM,uBAAuB,GAAG,aAAa,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;AAEzF,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../src/test-utils/mockData.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;GAI1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;GAgBlC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;GA4BvC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;GAgBnC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;CAExC,CAAC;AAEF,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../src/test-utils/mockData.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;GAI1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;GAgBlC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;GA4BvC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;GAgBnC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;CAExC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;GAS/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,GAG9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC5B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;GA6GpB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;GA4B9B,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;CA+d7C,CAAC"}
|
|
@@ -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;AAShE,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,YAAY,GAAG,aAAa,CAiC9E;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC,GAAG,aAAa,EAAE,CAElG"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import unescape from 'lodash/unescape';
|
|
2
|
+
function mapCaseLabelNames(node) {
|
|
3
|
+
var _a, _b;
|
|
4
|
+
const edges = (_b = (_a = node.Case_Label_Links__r) === null || _a === void 0 ? void 0 : _a.edges) !== null && _b !== void 0 ? _b : [];
|
|
5
|
+
const names = edges.map((edge) => { var _a, _b, _c; return (_c = (_b = (_a = edge.node) === null || _a === void 0 ? void 0 : _a.Label__r) === null || _b === void 0 ? void 0 : _b.Name) === null || _c === void 0 ? void 0 : _c.value; }).filter((name) => Boolean(name));
|
|
6
|
+
return [...new Set(names)];
|
|
7
|
+
}
|
|
2
8
|
export function mapGraphQLCaseToCaseListItem(node) {
|
|
3
9
|
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;
|
|
4
10
|
const isEscalated = ((_a = node.IsEscalated) === null || _a === void 0 ? void 0 : _a.value) === true;
|
|
5
11
|
return {
|
|
6
12
|
id: node.Id || '',
|
|
7
13
|
case_number: ((_b = node.CaseNumber__c) === null || _b === void 0 ? void 0 : _b.value) || '',
|
|
8
|
-
case_summary: ((_c = node.Subject) === null || _c === void 0 ? void 0 : _c.value) || '',
|
|
14
|
+
case_summary: unescape(((_c = node.Subject) === null || _c === void 0 ? void 0 : _c.value) || ''),
|
|
9
15
|
case_status: ((_d = node.Status) === null || _d === void 0 ? void 0 : _d.value) || '',
|
|
10
16
|
case_severity: ((_e = node.Priority) === null || _e === void 0 ? void 0 : _e.value) || '',
|
|
11
17
|
case_product: ((_h = (_g = (_f = node.Product) === null || _f === void 0 ? void 0 : _f.ParentProduct__r) === null || _g === void 0 ? void 0 : _g.Name) === null || _h === void 0 ? void 0 : _h.value)
|
|
@@ -28,7 +34,8 @@ export function mapGraphQLCaseToCaseListItem(node) {
|
|
|
28
34
|
case_closedDate: ((_3 = node.ClosedDate) === null || _3 === void 0 ? void 0 : _3.value) || '',
|
|
29
35
|
case_folderName: unescape(((_5 = (_4 = node.Group__r) === null || _4 === void 0 ? void 0 : _4.Name) === null || _5 === void 0 ? void 0 : _5.value) || ''),
|
|
30
36
|
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) || '',
|
|
31
|
-
case_alternate_id: ((_8 = node.AlternateCaseId__c) === null || _8 === void 0 ? void 0 : _8.value) || '',
|
|
37
|
+
case_alternate_id: unescape(((_8 = node.AlternateCaseId__c) === null || _8 === void 0 ? void 0 : _8.value) || ''),
|
|
38
|
+
case_label: mapCaseLabelNames(node),
|
|
32
39
|
uri: '',
|
|
33
40
|
};
|
|
34
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.219",
|
|
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.214",
|
|
42
|
+
"@rh-support/react-context": "2.5.309",
|
|
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.161",
|
|
45
|
+
"@rh-support/utils": "2.5.142",
|
|
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": "db4ef21c103bd27b78fdbcbe38b84750e7886df4"
|
|
98
98
|
}
|