@pega/react-sdk-overrides 23.1.12 → 24.2.10
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/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
- package/lib/designSystemExtension/Banner/Banner.tsx +1 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +13 -4
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +5 -5
- package/lib/designSystemExtension/Operator/Operator.tsx +6 -5
- package/lib/designSystemExtension/Pulse/Pulse.tsx +2 -2
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
- package/lib/field/AutoComplete/AutoComplete.tsx +4 -4
- package/lib/field/CancelAlert/CancelAlert.tsx +5 -3
- package/lib/field/Checkbox/Checkbox.tsx +4 -4
- package/lib/field/Currency/Currency.tsx +37 -27
- package/lib/field/Date/Date.tsx +23 -42
- package/lib/field/DateTime/DateTime.tsx +29 -34
- package/lib/field/Decimal/Decimal.tsx +34 -20
- package/lib/field/Dropdown/Dropdown.tsx +3 -3
- package/lib/field/Email/Email.tsx +29 -8
- package/lib/field/Group/Group.tsx +2 -2
- package/lib/field/Integer/Integer.tsx +22 -8
- package/lib/field/{MultiSelect → Multiselect}/Multiselect.tsx +9 -15
- package/lib/field/Percentage/Percentage.tsx +34 -19
- package/lib/field/Phone/Phone.tsx +22 -12
- package/lib/field/Phone/config-ext.json +8 -0
- package/lib/field/RadioButtons/RadioButtons.tsx +3 -3
- package/lib/field/RichText/RichText.tsx +1 -1
- package/lib/field/RichText/config-ext.json +10 -0
- package/lib/field/ScalarList/ScalarList.tsx +4 -2
- package/lib/field/SemanticLink/SemanticLink.tsx +4 -4
- package/lib/field/TextArea/TextArea.tsx +26 -8
- package/lib/field/TextContent/TextContent.tsx +1 -1
- package/lib/field/TextInput/TextInput.tsx +2 -2
- package/lib/field/Time/Time.tsx +27 -20
- package/lib/field/URL/URL.tsx +26 -7
- package/lib/field/UserReference/UserReference.tsx +12 -2
- package/lib/helpers/common-utils.ts +1 -5
- package/lib/helpers/field-group-utils.ts +2 -2
- package/lib/helpers/simpleTableHelpers.ts +1 -1
- package/lib/infra/ActionButtons/ActionButtons.tsx +3 -3
- package/lib/infra/Assignment/Assignment.tsx +38 -7
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +16 -13
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +7 -4
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +8 -8
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +1 -1
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +2 -2
- package/lib/infra/DashboardFilter/filterUtils.tsx +2 -1
- package/lib/infra/DeferLoad/DeferLoad.tsx +8 -4
- package/lib/infra/MultiStep/MultiStep.tsx +17 -9
- package/lib/infra/NavBar/NavBar.css +1 -0
- package/lib/infra/NavBar/NavBar.tsx +27 -19
- package/lib/infra/RootContainer/RootContainer.tsx +5 -6
- package/lib/infra/Stages/Stages.tsx +4 -4
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +2 -2
- package/lib/infra/View/View.tsx +37 -3
- package/lib/template/AppShell/AppShell.tsx +55 -5
- package/lib/template/BannerPage/config-ext.json +9 -0
- package/lib/template/CaseView/CaseView.tsx +7 -6
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +8 -8
- package/lib/template/Confirmation/Confirmation.tsx +2 -1
- package/lib/template/DataReference/DataReference.tsx +3 -3
- package/lib/template/DefaultForm/utils/index.ts +2 -7
- package/lib/template/Details/Details/Details.tsx +3 -3
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +3 -3
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +3 -3
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +4 -3
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +12 -3
- package/lib/template/InlineDashboard/InlineDashboard.tsx +2 -2
- package/lib/template/InlineDashboardPage/config-ext.json +9 -0
- package/lib/template/ListView/ListView.tsx +88 -91
- package/lib/template/ListView/utils.ts +1 -1
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +3 -3
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +2 -2
- package/lib/template/PromotedFilters/PromotedFilters.tsx +2 -1
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +46 -30
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
- package/lib/template/SubTabs/SubTabs.tsx +2 -2
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +2 -2
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +2 -2
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +3 -3
- package/lib/template/WssNavBar/WssNavBar.tsx +9 -9
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
- package/lib/widget/Attachment/Attachment.tsx +8 -4
- package/lib/widget/CaseHistory/CaseHistory.tsx +12 -10
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +5 -4
- package/lib/widget/Followers/Followers.tsx +2 -2
- package/lib/widget/QuickCreate/QuickCreate.tsx +1 -0
- package/lib/widget/QuickCreate/config-ext.json +9 -0
- package/lib/widget/SummaryItem/SummaryItem.tsx +3 -2
- package/lib/widget/ToDo/ToDo.tsx +91 -21
- package/package.json +1 -1
- /package/lib/field/{MultiSelect → Multiselect}/index.tsx +0 -0
- /package/lib/field/{MultiSelect → Multiselect}/utils.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import Grid from '@material
|
|
2
|
+
import Grid from '@mui/material/Grid';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -23,7 +23,7 @@ export default function DetailsThreeColumn(props: DetailsThreeColumnProps) {
|
|
|
23
23
|
|
|
24
24
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
25
25
|
// in a readonly (display) mode instead of a editable
|
|
26
|
-
getPConnect().setInheritedProp('displayMode', '
|
|
26
|
+
getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
27
27
|
getPConnect().setInheritedProp('readOnly', true);
|
|
28
28
|
const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
|
|
29
29
|
createElement(createPConnectComponent(), {
|
|
@@ -46,7 +46,7 @@ export default function DetailsThreeColumn(props: DetailsThreeColumnProps) {
|
|
|
46
46
|
field.config.displayAsStatus = true;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
return getPConnect().createComponent(field, '',
|
|
49
|
+
return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import Grid from '@material
|
|
2
|
+
import Grid from '@mui/material/Grid';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -23,7 +23,7 @@ export default function DetailsTwoColumn(props: DetailsTwoColumnProps) {
|
|
|
23
23
|
|
|
24
24
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
25
25
|
// in a readonly (display) mode instead of a editable
|
|
26
|
-
getPConnect().setInheritedProp('displayMode', '
|
|
26
|
+
getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
27
27
|
getPConnect().setInheritedProp('readOnly', true);
|
|
28
28
|
const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
|
|
29
29
|
createElement(createPConnectComponent(), {
|
|
@@ -46,7 +46,7 @@ export default function DetailsTwoColumn(props: DetailsTwoColumnProps) {
|
|
|
46
46
|
field.config.displayAsStatus = true;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
return getPConnect().createComponent(field, '',
|
|
49
|
+
return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { Children, useMemo, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { TabContext, TabPanel } from '@
|
|
2
|
+
import { Tab, Tabs } from '@mui/material';
|
|
3
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
5
|
|
|
5
6
|
import { buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
|
|
6
7
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
@@ -30,7 +31,7 @@ function DynamicTabs(props: DynamicTabsProps) {
|
|
|
30
31
|
const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
|
|
31
32
|
const referenceListData: any = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
32
33
|
const memoisedTabViews = useMemo(() => {
|
|
33
|
-
pConnect.setInheritedProp('displayMode', '
|
|
34
|
+
pConnect.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
34
35
|
pConnect.setInheritedProp('readOnly', true);
|
|
35
36
|
|
|
36
37
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
|
-
import { useMemo } from 'react';
|
|
2
|
+
import { useLayoutEffect, useMemo } from 'react';
|
|
3
3
|
|
|
4
4
|
import { getReferenceList, buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -37,9 +37,16 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
37
37
|
const resolvedList = getReferenceList(pConn);
|
|
38
38
|
pConn.setReferenceList(resolvedList);
|
|
39
39
|
const pageReference = `${pConn.getPageReference()}${resolvedList}`;
|
|
40
|
-
const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === '
|
|
40
|
+
const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
|
|
41
41
|
const HEADING = heading ?? 'Row';
|
|
42
42
|
|
|
43
|
+
useLayoutEffect(() => {
|
|
44
|
+
if (!isReadonlyMode) {
|
|
45
|
+
// @ts-ignore - Expected 3 arguments, but got 1
|
|
46
|
+
pConn.getListActions().initDefaultPageInstructions(resolvedList);
|
|
47
|
+
}
|
|
48
|
+
}, [referenceList?.length]);
|
|
49
|
+
|
|
43
50
|
const getDynamicHeaderProp = (item, index) => {
|
|
44
51
|
if (fieldHeader === 'propertyRef' && heading && item[heading.substring(1)]) {
|
|
45
52
|
return item[heading.substring(1)];
|
|
@@ -51,6 +58,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
51
58
|
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
52
59
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
|
|
53
60
|
} else {
|
|
61
|
+
// @ts-ignore - An argument for 'pageRef' was not provided.
|
|
54
62
|
pConn.getListActions().insert({}, referenceList.length);
|
|
55
63
|
}
|
|
56
64
|
};
|
|
@@ -63,6 +71,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
63
71
|
if (PCore.getPCoreVersion()?.includes('8.7')) {
|
|
64
72
|
pConn.getListActions().deleteEntry(index, pageReference);
|
|
65
73
|
} else {
|
|
74
|
+
// @ts-ignore - An argument for 'pageRef' was not provided.
|
|
66
75
|
pConn.getListActions().deleteEntry(index);
|
|
67
76
|
}
|
|
68
77
|
};
|
|
@@ -87,7 +96,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
87
96
|
);
|
|
88
97
|
}
|
|
89
98
|
|
|
90
|
-
pConn.setInheritedProp('displayMode', '
|
|
99
|
+
pConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
91
100
|
const memoisedReadOnlyList = useMemo(() => {
|
|
92
101
|
return referenceList.map((item, index) => {
|
|
93
102
|
const key = item[heading] || `field-group-row-${index}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { Grid, Typography } from '@material
|
|
3
|
-
import
|
|
2
|
+
import { Grid, Typography } from '@mui/material';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
6
|
interface InlineDashboardProps extends PConnProps {
|
|
@@ -4,37 +4,39 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
5
5
|
|
|
6
6
|
import React, { useState, useEffect, useRef } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
7
|
+
import { Theme } from '@mui/material/styles';
|
|
8
|
+
import createStyles from '@mui/styles/createStyles';
|
|
9
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
10
|
+
import Table from '@mui/material/Table';
|
|
11
|
+
import TableBody from '@mui/material/TableBody';
|
|
12
|
+
import TableCell from '@mui/material/TableCell';
|
|
13
|
+
import TableContainer from '@mui/material/TableContainer';
|
|
14
|
+
import TableHead from '@mui/material/TableHead';
|
|
15
|
+
import TablePagination from '@mui/material/TablePagination';
|
|
16
|
+
import TableRow from '@mui/material/TableRow';
|
|
17
|
+
import TableSortLabel from '@mui/material/TableSortLabel';
|
|
18
|
+
import Paper from '@mui/material/Paper';
|
|
19
|
+
import MoreIcon from '@mui/icons-material/MoreVert';
|
|
20
|
+
import FilterListIcon from '@mui/icons-material/FilterList';
|
|
21
|
+
import SubjectIcon from '@mui/icons-material/Subject';
|
|
22
|
+
import SearchIcon from '@mui/icons-material/Search';
|
|
23
|
+
import TextField from '@mui/material/TextField';
|
|
24
|
+
import Grid from '@mui/material/Grid';
|
|
25
|
+
import Menu from '@mui/material/Menu';
|
|
26
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
27
|
+
import Dialog from '@mui/material/Dialog';
|
|
28
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
29
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
30
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
31
|
+
import Select from '@mui/material/Select';
|
|
32
|
+
import Button from '@mui/material/Button';
|
|
33
|
+
import Link from '@mui/material/Link';
|
|
34
|
+
import Typography from '@mui/material/Typography';
|
|
35
|
+
import Snackbar from '@mui/material/Snackbar';
|
|
36
|
+
import IconButton from '@mui/material/IconButton';
|
|
37
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
38
|
+
import { Radio } from '@mui/material';
|
|
39
|
+
import Checkbox from '@mui/material/Checkbox';
|
|
38
40
|
|
|
39
41
|
import { filterData } from '@pega/react-sdk-components/lib/components/helpers/simpleTableHelpers';
|
|
40
42
|
|
|
@@ -65,7 +67,6 @@ interface ListViewProps extends PConnProps {
|
|
|
65
67
|
const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
|
|
66
68
|
|
|
67
69
|
let myRows: any[];
|
|
68
|
-
let myDisplayColumnList: any[];
|
|
69
70
|
|
|
70
71
|
let menuColumnId = '';
|
|
71
72
|
let menuColumnType = '';
|
|
@@ -119,6 +120,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
119
120
|
const rowID = compositeKeys && compositeKeys?.length === 1 ? compositeKeys[0] : defRowID;
|
|
120
121
|
|
|
121
122
|
const [arRows, setRows] = useState<any[]>([]);
|
|
123
|
+
const [rowsData, setRowsData] = useState<any[]>([]);
|
|
122
124
|
const [arColumns, setColumns] = useState<any[]>([]);
|
|
123
125
|
const [response, setResponse] = useState<any[]>([]);
|
|
124
126
|
|
|
@@ -291,16 +293,6 @@ export default function ListView(props: ListViewProps) {
|
|
|
291
293
|
});
|
|
292
294
|
}
|
|
293
295
|
|
|
294
|
-
function getMyColumnList(arCols: any[]): string[] {
|
|
295
|
-
const myColList: string[] = [];
|
|
296
|
-
|
|
297
|
-
arCols.forEach(col => {
|
|
298
|
-
myColList.push(col.id);
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
return myColList;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
296
|
/** Will return field from a filter expression */
|
|
305
297
|
function getFieldFromFilter(filter, dateRange = false) {
|
|
306
298
|
let fieldValue;
|
|
@@ -543,8 +535,8 @@ export default function ListView(props: ListViewProps) {
|
|
|
543
535
|
|
|
544
536
|
// store globally, so can be searched, filtered, etc.
|
|
545
537
|
myRows = usingDataResults;
|
|
546
|
-
myDisplayColumnList = getMyColumnList(myColumns);
|
|
547
538
|
|
|
539
|
+
setRowsData(myRows);
|
|
548
540
|
// At this point, if we have data ready to render and haven't been asked
|
|
549
541
|
// to NOT call setRows and setColumns, call them
|
|
550
542
|
if (bCallSetRowsColumns) {
|
|
@@ -604,24 +596,22 @@ export default function ListView(props: ListViewProps) {
|
|
|
604
596
|
}, [listContext]);
|
|
605
597
|
|
|
606
598
|
function searchFilter(value: string, rows: any[]) {
|
|
599
|
+
const cols = arColumns.map(ele => {
|
|
600
|
+
return ele.id;
|
|
601
|
+
});
|
|
602
|
+
|
|
607
603
|
function filterArray(el: any): boolean {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
myVal = myVal.toString();
|
|
616
|
-
}
|
|
617
|
-
if (myVal.toLowerCase().indexOf(value.toLowerCase()) >= 0) {
|
|
618
|
-
return true;
|
|
619
|
-
}
|
|
604
|
+
return Object.keys(el).some(key => {
|
|
605
|
+
// only search columns that are displayed (pzInsKey and pxRefObjectClass are added and may or may not be displayed)
|
|
606
|
+
if (cols.includes(key)) {
|
|
607
|
+
const myVal = el[key];
|
|
608
|
+
if (myVal !== null && typeof myVal !== 'undefined') {
|
|
609
|
+
const strVal = String(myVal); // Ensure myVal is a string
|
|
610
|
+
return strVal.toLowerCase().includes(value.toLowerCase());
|
|
620
611
|
}
|
|
621
612
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
return bReturn;
|
|
613
|
+
return false;
|
|
614
|
+
});
|
|
625
615
|
}
|
|
626
616
|
|
|
627
617
|
rows = rows.filter(filterArray);
|
|
@@ -631,8 +621,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
631
621
|
|
|
632
622
|
function _onSearch(event: any) {
|
|
633
623
|
const searchValue = event.target.value;
|
|
634
|
-
|
|
635
|
-
const filteredRows = searchFilter(searchValue, myRows.slice());
|
|
624
|
+
const filteredRows = searchFilter(searchValue, rowsData?.slice());
|
|
636
625
|
|
|
637
626
|
setRows(filteredRows);
|
|
638
627
|
}
|
|
@@ -653,6 +642,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
653
642
|
|
|
654
643
|
thePConn
|
|
655
644
|
.getActionsApi()
|
|
645
|
+
// @ts-ignore
|
|
656
646
|
.openAssignment(pzInsKey, pxRefObjectClass, options)
|
|
657
647
|
.then(() => {
|
|
658
648
|
// console.log("openAssignment successful");
|
|
@@ -682,7 +672,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
682
672
|
}
|
|
683
673
|
}
|
|
684
674
|
|
|
685
|
-
function handleSnackbarClose(event: React.SyntheticEvent |
|
|
675
|
+
function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {
|
|
686
676
|
if (reason === 'clickaway') {
|
|
687
677
|
return;
|
|
688
678
|
}
|
|
@@ -885,6 +875,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
885
875
|
pzInsKey = row[`${associationCategory}:pzInsKey`];
|
|
886
876
|
}
|
|
887
877
|
if (column.isAssignmentLink) {
|
|
878
|
+
// @ts-ignore
|
|
888
879
|
thePConn.getActionsApi().openAssignment(pzInsKey, pxObjClass, {
|
|
889
880
|
containerName: 'primary',
|
|
890
881
|
channelName: ''
|
|
@@ -1043,33 +1034,35 @@ export default function ListView(props: ListViewProps) {
|
|
|
1043
1034
|
</TableRow>
|
|
1044
1035
|
</TableHead>
|
|
1045
1036
|
<TableBody>
|
|
1046
|
-
{
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
{
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
{
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1037
|
+
{arRows &&
|
|
1038
|
+
stableSort(arRows, getComparator(order, orderBy))
|
|
1039
|
+
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
1040
|
+
.map(row => {
|
|
1041
|
+
return (
|
|
1042
|
+
<TableRow key={row.pxRefObjectInsName || row.pyID}>
|
|
1043
|
+
{arColumns.map(column => {
|
|
1044
|
+
const value = row[column.id];
|
|
1045
|
+
return (
|
|
1046
|
+
<TableCell key={column.id} align={column.align} className={classes.cell}>
|
|
1047
|
+
{_showButton(column.id, row) || column.displayAsLink ? (
|
|
1048
|
+
<Link
|
|
1049
|
+
component='button'
|
|
1050
|
+
onClick={() => {
|
|
1051
|
+
_listViewClick(row, column);
|
|
1052
|
+
}}
|
|
1053
|
+
underline='hover'
|
|
1054
|
+
>
|
|
1055
|
+
{column.format && typeof value === 'number' ? column.format(value) : value}
|
|
1056
|
+
</Link>
|
|
1057
|
+
) : (
|
|
1058
|
+
<>{column.format && typeof value === 'number' ? column.format(value) : value || '---'}</>
|
|
1059
|
+
)}
|
|
1060
|
+
</TableCell>
|
|
1061
|
+
);
|
|
1062
|
+
})}
|
|
1063
|
+
</TableRow>
|
|
1064
|
+
);
|
|
1065
|
+
})}
|
|
1073
1066
|
</TableBody>
|
|
1074
1067
|
</Table>
|
|
1075
1068
|
</TableContainer>
|
|
@@ -1104,7 +1097,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1104
1097
|
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
1105
1098
|
.map(row => {
|
|
1106
1099
|
return (
|
|
1107
|
-
<TableRow key={row
|
|
1100
|
+
<TableRow key={row[rowID]}>
|
|
1108
1101
|
{selectionMode === SELECTION_MODE.SINGLE && (
|
|
1109
1102
|
<TableCell>
|
|
1110
1103
|
<Radio
|
|
@@ -1169,7 +1162,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1169
1162
|
<DialogContent>
|
|
1170
1163
|
{containsDateOrTime ? (
|
|
1171
1164
|
<>
|
|
1172
|
-
<Select value={displayDialogDateFilter} onChange={_dialogDateFilter} fullWidth>
|
|
1165
|
+
<Select variant='standard' value={displayDialogDateFilter} onChange={_dialogDateFilter} fullWidth>
|
|
1173
1166
|
<MenuItem value='notequal'>is not equal to</MenuItem>
|
|
1174
1167
|
<MenuItem value='after'>after</MenuItem>
|
|
1175
1168
|
<MenuItem value='before'>before</MenuItem>
|
|
@@ -1178,6 +1171,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1178
1171
|
</Select>
|
|
1179
1172
|
{filterType === 'Date' && (
|
|
1180
1173
|
<TextField
|
|
1174
|
+
variant='standard'
|
|
1181
1175
|
autoFocus
|
|
1182
1176
|
margin='dense'
|
|
1183
1177
|
id='containsFilter'
|
|
@@ -1189,6 +1183,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1189
1183
|
)}
|
|
1190
1184
|
{filterType === 'DateTime' && (
|
|
1191
1185
|
<TextField
|
|
1186
|
+
variant='standard'
|
|
1192
1187
|
autoFocus
|
|
1193
1188
|
margin='dense'
|
|
1194
1189
|
id='containsFilter'
|
|
@@ -1200,6 +1195,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1200
1195
|
)}
|
|
1201
1196
|
{filterType === 'Time' && (
|
|
1202
1197
|
<TextField
|
|
1198
|
+
variant='standard'
|
|
1203
1199
|
autoFocus
|
|
1204
1200
|
margin='dense'
|
|
1205
1201
|
id='containsFilter'
|
|
@@ -1212,12 +1208,13 @@ export default function ListView(props: ListViewProps) {
|
|
|
1212
1208
|
</>
|
|
1213
1209
|
) : (
|
|
1214
1210
|
<>
|
|
1215
|
-
<Select fullWidth onChange={_dialogContainsFilter} value={displayDialogContainsFilter}>
|
|
1211
|
+
<Select variant='standard' fullWidth onChange={_dialogContainsFilter} value={displayDialogContainsFilter}>
|
|
1216
1212
|
<MenuItem value='contains'>Contains</MenuItem>
|
|
1217
1213
|
<MenuItem value='equals'>Equals</MenuItem>
|
|
1218
1214
|
<MenuItem value='startswith'>Starts with</MenuItem>
|
|
1219
1215
|
</Select>
|
|
1220
1216
|
<TextField
|
|
1217
|
+
variant='standard'
|
|
1221
1218
|
autoFocus
|
|
1222
1219
|
margin='dense'
|
|
1223
1220
|
id='containsFilter'
|
|
@@ -678,7 +678,7 @@ export const readContextResponse = async (context, params) => {
|
|
|
678
678
|
const dataPageKeys = PCore.getDataTypeUtils().getDataPageKeys(dataViewName);
|
|
679
679
|
dataPageKeys?.forEach(item => (item.isAlternateKeyStorage ? compositeKeys.push(item.linkedField) : compositeKeys.push(item.keyName)));
|
|
680
680
|
if (compositeKeys.length) {
|
|
681
|
-
otherContext
|
|
681
|
+
otherContext?.setCompositeKeys(compositeKeys);
|
|
682
682
|
}
|
|
683
683
|
if (otherContext) {
|
|
684
684
|
otherContext.fetchRowActionDetails = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import Grid, { GridSize } from '@material
|
|
2
|
+
import Grid, { GridSize } from '@mui/material/Grid';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -26,7 +26,7 @@ export default function NarrowWideDetails(props: NarrowWideDetailsProps) {
|
|
|
26
26
|
|
|
27
27
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
28
28
|
// in a readonly (display) mode instead of a editable
|
|
29
|
-
getPConnect().setInheritedProp('displayMode', '
|
|
29
|
+
getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
30
30
|
getPConnect().setInheritedProp('readOnly', true);
|
|
31
31
|
const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
|
|
32
32
|
createElement(createPConnectComponent(), {
|
|
@@ -49,7 +49,7 @@ export default function NarrowWideDetails(props: NarrowWideDetailsProps) {
|
|
|
49
49
|
field.config.displayAsStatus = true;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
return getPConnect().createComponent(field, '',
|
|
52
|
+
return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { Grid } from '@material
|
|
3
|
-
import
|
|
2
|
+
import { Grid } from '@mui/material';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
5
|
|
|
6
6
|
interface OneColumnProps extends PConnProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState, createElement } from 'react';
|
|
2
|
-
import Button from '@material
|
|
2
|
+
import Button from '@mui/material/Button';
|
|
3
3
|
|
|
4
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
5
|
import { isEmptyObject } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
|
|
@@ -87,6 +87,7 @@ export default function PromotedFilters(props: PromotedFilterProps) {
|
|
|
87
87
|
};
|
|
88
88
|
return getPConnect().getContainerManager().addTransientItem({
|
|
89
89
|
id: viewName,
|
|
90
|
+
// @ts-ignore - Property 'coreHeaders' is missing in type '{ classID: string; }' but required in type '{ coreHeaders: any; }'.
|
|
90
91
|
data: filtersWithClassID
|
|
91
92
|
});
|
|
92
93
|
}, []);
|