@pega/react-sdk-overrides 24.1.10 → 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 +11 -2
- 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 +3 -3
- package/lib/field/Checkbox/Checkbox.tsx +4 -4
- package/lib/field/Currency/Currency.tsx +2 -2
- package/lib/field/Date/Date.tsx +23 -42
- package/lib/field/DateTime/DateTime.tsx +29 -34
- package/lib/field/Decimal/Decimal.tsx +2 -2
- 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.tsx +8 -14
- package/lib/field/Percentage/Percentage.tsx +3 -3
- package/lib/field/Phone/Phone.tsx +6 -5
- 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 +2 -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 +2 -2
- 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 +10 -6
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +11 -10
- 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 +1 -1
- package/lib/infra/DashboardFilter/filterUtils.tsx +2 -1
- package/lib/infra/DeferLoad/DeferLoad.tsx +3 -3
- package/lib/infra/MultiStep/MultiStep.tsx +14 -8
- package/lib/infra/NavBar/NavBar.css +1 -0
- package/lib/infra/NavBar/NavBar.tsx +25 -17
- 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 +5 -5
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
- package/lib/template/Confirmation/Confirmation.tsx +2 -1
- package/lib/template/DataReference/DataReference.tsx +2 -2
- package/lib/template/Details/Details/Details.tsx +2 -2
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +2 -2
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +2 -2
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +4 -3
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
- package/lib/template/InlineDashboard/InlineDashboard.tsx +2 -2
- package/lib/template/InlineDashboardPage/config-ext.json +9 -0
- package/lib/template/ListView/ListView.tsx +69 -61
- package/lib/template/ListView/utils.ts +1 -1
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +2 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +2 -2
- package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -1
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +42 -30
- 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 +2 -2
- package/lib/template/WssNavBar/WssNavBar.tsx +9 -9
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
- package/lib/widget/Attachment/Attachment.tsx +5 -2
- package/lib/widget/CaseHistory/CaseHistory.tsx +12 -10
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +4 -3
- package/lib/widget/Followers/Followers.tsx +2 -2
- 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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import Button from '@material
|
|
3
|
-
import Menu from '@material
|
|
4
|
-
import MenuItem from '@material
|
|
2
|
+
import Button from '@mui/material/Button';
|
|
3
|
+
import Menu from '@mui/material/Menu';
|
|
4
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
5
5
|
|
|
6
6
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
-
import Snackbar from '@material
|
|
8
|
-
import IconButton from '@material
|
|
9
|
-
import CloseIcon from '@
|
|
7
|
+
import Snackbar from '@mui/material/Snackbar';
|
|
8
|
+
import IconButton from '@mui/material/IconButton';
|
|
9
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
10
10
|
|
|
11
11
|
interface CaseViewActionsMenuProps extends PConnProps {
|
|
12
12
|
// If any, enter additional props that only exist on this component
|
|
@@ -44,7 +44,7 @@ export default function CaseViewActionsMenu(props: CaseViewActionsMenuProps) {
|
|
|
44
44
|
setShowSnackbar(true);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function handleSnackbarClose(event: React.SyntheticEvent |
|
|
47
|
+
function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {
|
|
48
48
|
if (reason === 'clickaway') {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
2
|
import { PropsWithChildren, useState } from 'react';
|
|
3
|
-
import { Button, Card
|
|
3
|
+
import { Button, Card } from '@mui/material';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
5
|
|
|
5
6
|
import { getToDoAssignments } from '@pega/react-sdk-components/lib/components/infra/Containers/FlowContainer/helpers';
|
|
6
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -52,7 +52,7 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
|
|
|
52
52
|
const refList = rawViewMetadata.config.referenceList;
|
|
53
53
|
const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
|
|
54
54
|
let propName;
|
|
55
|
-
const isDisplayModeEnabled = ['
|
|
55
|
+
const isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode);
|
|
56
56
|
let firstChildPConnect;
|
|
57
57
|
|
|
58
58
|
/* Only for dropdown when it has param use data api to get the data back and add it to datasource */
|
|
@@ -251,7 +251,7 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
|
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
return childrenToRender.length === 1 ? (
|
|
254
|
-
childrenToRender[0] ?? null
|
|
254
|
+
(childrenToRender[0] ?? null)
|
|
255
255
|
) : (
|
|
256
256
|
<div>
|
|
257
257
|
{childrenToRender.map(child => (
|
|
@@ -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 Details(props: DetailsProps) {
|
|
|
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(), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Children, PropsWithChildren, useEffect, useState } from 'react';
|
|
2
|
-
import { Tab, Tabs
|
|
3
|
-
import { TabContext, TabPanel } from '@
|
|
2
|
+
import { Tab, Tabs } from '@mui/material';
|
|
3
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
4
4
|
|
|
5
5
|
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/react-sdk-components/lib/components/template/SubTabs/tabUtils';
|
|
6
6
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
@@ -39,7 +39,7 @@ export default function DetailsSubTabs(props: PropsWithChildren<DetailsSubTabsPr
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<>
|
|
42
|
-
{propsToUse.showLabel && <
|
|
42
|
+
{propsToUse.showLabel && <h3>{propsToUse.label}</h3>}
|
|
43
43
|
<TabContext value={currentTabId.toString()}>
|
|
44
44
|
<Tabs onChange={handleTabClick} value={currentTabId}>
|
|
45
45
|
{tabItems.map((tab: any) => (
|
|
@@ -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(), {
|
|
@@ -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(), {
|
|
@@ -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)];
|
|
@@ -89,7 +96,7 @@ export default function FieldGroupTemplate(props: FieldGroupTemplateProps) {
|
|
|
89
96
|
);
|
|
90
97
|
}
|
|
91
98
|
|
|
92
|
-
pConn.setInheritedProp('displayMode', '
|
|
99
|
+
pConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
93
100
|
const memoisedReadOnlyList = useMemo(() => {
|
|
94
101
|
return referenceList.map((item, index) => {
|
|
95
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
|
|
|
@@ -670,7 +672,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
670
672
|
}
|
|
671
673
|
}
|
|
672
674
|
|
|
673
|
-
function handleSnackbarClose(event: React.SyntheticEvent |
|
|
675
|
+
function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {
|
|
674
676
|
if (reason === 'clickaway') {
|
|
675
677
|
return;
|
|
676
678
|
}
|
|
@@ -1032,33 +1034,35 @@ export default function ListView(props: ListViewProps) {
|
|
|
1032
1034
|
</TableRow>
|
|
1033
1035
|
</TableHead>
|
|
1034
1036
|
<TableBody>
|
|
1035
|
-
{
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
{
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
{
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
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
|
+
})}
|
|
1062
1066
|
</TableBody>
|
|
1063
1067
|
</Table>
|
|
1064
1068
|
</TableContainer>
|
|
@@ -1158,7 +1162,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1158
1162
|
<DialogContent>
|
|
1159
1163
|
{containsDateOrTime ? (
|
|
1160
1164
|
<>
|
|
1161
|
-
<Select value={displayDialogDateFilter} onChange={_dialogDateFilter} fullWidth>
|
|
1165
|
+
<Select variant='standard' value={displayDialogDateFilter} onChange={_dialogDateFilter} fullWidth>
|
|
1162
1166
|
<MenuItem value='notequal'>is not equal to</MenuItem>
|
|
1163
1167
|
<MenuItem value='after'>after</MenuItem>
|
|
1164
1168
|
<MenuItem value='before'>before</MenuItem>
|
|
@@ -1167,6 +1171,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1167
1171
|
</Select>
|
|
1168
1172
|
{filterType === 'Date' && (
|
|
1169
1173
|
<TextField
|
|
1174
|
+
variant='standard'
|
|
1170
1175
|
autoFocus
|
|
1171
1176
|
margin='dense'
|
|
1172
1177
|
id='containsFilter'
|
|
@@ -1178,6 +1183,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1178
1183
|
)}
|
|
1179
1184
|
{filterType === 'DateTime' && (
|
|
1180
1185
|
<TextField
|
|
1186
|
+
variant='standard'
|
|
1181
1187
|
autoFocus
|
|
1182
1188
|
margin='dense'
|
|
1183
1189
|
id='containsFilter'
|
|
@@ -1189,6 +1195,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1189
1195
|
)}
|
|
1190
1196
|
{filterType === 'Time' && (
|
|
1191
1197
|
<TextField
|
|
1198
|
+
variant='standard'
|
|
1192
1199
|
autoFocus
|
|
1193
1200
|
margin='dense'
|
|
1194
1201
|
id='containsFilter'
|
|
@@ -1201,12 +1208,13 @@ export default function ListView(props: ListViewProps) {
|
|
|
1201
1208
|
</>
|
|
1202
1209
|
) : (
|
|
1203
1210
|
<>
|
|
1204
|
-
<Select fullWidth onChange={_dialogContainsFilter} value={displayDialogContainsFilter}>
|
|
1211
|
+
<Select variant='standard' fullWidth onChange={_dialogContainsFilter} value={displayDialogContainsFilter}>
|
|
1205
1212
|
<MenuItem value='contains'>Contains</MenuItem>
|
|
1206
1213
|
<MenuItem value='equals'>Equals</MenuItem>
|
|
1207
1214
|
<MenuItem value='startswith'>Starts with</MenuItem>
|
|
1208
1215
|
</Select>
|
|
1209
1216
|
<TextField
|
|
1217
|
+
variant='standard'
|
|
1210
1218
|
autoFocus
|
|
1211
1219
|
margin='dense'
|
|
1212
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(), {
|
|
@@ -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';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
2
|
import React, { PropsWithChildren, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
|
-
import Table from '@material
|
|
4
|
-
import TableBody from '@material
|
|
5
|
-
import TableCell from '@material
|
|
6
|
-
import TableContainer from '@material
|
|
7
|
-
import TableHead from '@material
|
|
8
|
-
import TableRow from '@material
|
|
9
|
-
import Paper from '@material
|
|
10
|
-
import
|
|
11
|
-
import Link from '@material
|
|
3
|
+
import Table from '@mui/material/Table';
|
|
4
|
+
import TableBody from '@mui/material/TableBody';
|
|
5
|
+
import TableCell from '@mui/material/TableCell';
|
|
6
|
+
import TableContainer from '@mui/material/TableContainer';
|
|
7
|
+
import TableHead from '@mui/material/TableHead';
|
|
8
|
+
import TableRow from '@mui/material/TableRow';
|
|
9
|
+
import Paper from '@mui/material/Paper';
|
|
10
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
11
|
+
import Link from '@mui/material/Link';
|
|
12
12
|
import { createElement } from 'react';
|
|
13
|
-
import TableSortLabel from '@material
|
|
14
|
-
import MoreIcon from '@
|
|
15
|
-
import Menu from '@material
|
|
16
|
-
import MenuItem from '@material
|
|
17
|
-
import FilterListIcon from '@
|
|
18
|
-
import SubjectIcon from '@
|
|
19
|
-
import Dialog from '@material
|
|
20
|
-
import DialogActions from '@material
|
|
21
|
-
import DialogContent from '@material
|
|
22
|
-
import DialogTitle from '@material
|
|
23
|
-
import Select from '@material
|
|
24
|
-
import Button from '@material
|
|
25
|
-
import TextField from '@material
|
|
13
|
+
import TableSortLabel from '@mui/material/TableSortLabel';
|
|
14
|
+
import MoreIcon from '@mui/icons-material/MoreVert';
|
|
15
|
+
import Menu from '@mui/material/Menu';
|
|
16
|
+
import MenuItem from '@mui/material/MenuItem';
|
|
17
|
+
import FilterListIcon from '@mui/icons-material/FilterList';
|
|
18
|
+
import SubjectIcon from '@mui/icons-material/Subject';
|
|
19
|
+
import Dialog from '@mui/material/Dialog';
|
|
20
|
+
import DialogActions from '@mui/material/DialogActions';
|
|
21
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
22
|
+
import DialogTitle from '@mui/material/DialogTitle';
|
|
23
|
+
import Select from '@mui/material/Select';
|
|
24
|
+
import Button from '@mui/material/Button';
|
|
25
|
+
import TextField from '@mui/material/TextField';
|
|
26
26
|
|
|
27
27
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
28
28
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
@@ -258,11 +258,16 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
258
258
|
function generateRowsData() {
|
|
259
259
|
// if referenceList is empty and dataPageName property value exists then make a datapage fetch call and get the list of data.
|
|
260
260
|
if (!referenceList.length && dataPageName) {
|
|
261
|
-
getDataPage(dataPageName, parameters, context)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
261
|
+
getDataPage(dataPageName, parameters, context)
|
|
262
|
+
.then(listData => {
|
|
263
|
+
const data = formatRowsData(listData);
|
|
264
|
+
myRows = data;
|
|
265
|
+
setRowData(data);
|
|
266
|
+
})
|
|
267
|
+
.catch(e => {
|
|
268
|
+
// eslint-disable-next-line no-console
|
|
269
|
+
console.log(e);
|
|
270
|
+
});
|
|
266
271
|
} else {
|
|
267
272
|
// The referenceList prop has the JSON data for each row to be displayed
|
|
268
273
|
// in the table. So, iterate over referenceList to create the dataRows that
|
|
@@ -378,6 +383,9 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
378
383
|
};
|
|
379
384
|
|
|
380
385
|
function descendingComparator<T>(a: T, b: T, orderedBy: keyof T) {
|
|
386
|
+
if (!orderedBy || (!a[orderedBy] && !b[orderedBy])) {
|
|
387
|
+
return 0;
|
|
388
|
+
}
|
|
381
389
|
if (!b[orderedBy] || b[orderedBy] < a[orderedBy]) {
|
|
382
390
|
return -1;
|
|
383
391
|
}
|
|
@@ -698,7 +706,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
698
706
|
</TableContainer>
|
|
699
707
|
{showAddRowButton && (
|
|
700
708
|
<div style={{ fontSize: '1rem' }}>
|
|
701
|
-
<Link style={{ cursor: 'pointer' }} onClick={addRecord}>
|
|
709
|
+
<Link style={{ cursor: 'pointer' }} onClick={addRecord} underline='hover'>
|
|
702
710
|
+ Add
|
|
703
711
|
</Link>
|
|
704
712
|
</div>
|
|
@@ -716,7 +724,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
716
724
|
<DialogContent>
|
|
717
725
|
{containsDateOrTime ? (
|
|
718
726
|
<>
|
|
719
|
-
<Select value={displayDialogDateFilter} onChange={_dialogDateFilter} fullWidth>
|
|
727
|
+
<Select variant='standard' value={displayDialogDateFilter} onChange={_dialogDateFilter} fullWidth>
|
|
720
728
|
<MenuItem value='notequal'>is not equal to</MenuItem>
|
|
721
729
|
<MenuItem value='equal'>is equal to</MenuItem>
|
|
722
730
|
<MenuItem value='after'>after</MenuItem>
|
|
@@ -726,6 +734,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
726
734
|
</Select>
|
|
727
735
|
{filterType === 'Date' && (
|
|
728
736
|
<TextField
|
|
737
|
+
variant='standard'
|
|
729
738
|
autoFocus
|
|
730
739
|
margin='dense'
|
|
731
740
|
id='containsFilter'
|
|
@@ -737,6 +746,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
737
746
|
)}
|
|
738
747
|
{filterType === 'DateTime' && (
|
|
739
748
|
<TextField
|
|
749
|
+
variant='standard'
|
|
740
750
|
autoFocus
|
|
741
751
|
margin='dense'
|
|
742
752
|
id='containsFilter'
|
|
@@ -748,6 +758,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
748
758
|
)}
|
|
749
759
|
{filterType === 'Time' && (
|
|
750
760
|
<TextField
|
|
761
|
+
variant='standard'
|
|
751
762
|
autoFocus
|
|
752
763
|
margin='dense'
|
|
753
764
|
id='containsFilter'
|
|
@@ -760,12 +771,13 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
760
771
|
</>
|
|
761
772
|
) : (
|
|
762
773
|
<>
|
|
763
|
-
<Select id='filter' fullWidth onChange={_dialogContainsFilter} value={displayDialogContainsFilter}>
|
|
774
|
+
<Select variant='standard' id='filter' fullWidth onChange={_dialogContainsFilter} value={displayDialogContainsFilter}>
|
|
764
775
|
<MenuItem value='contains'>Contains</MenuItem>
|
|
765
776
|
<MenuItem value='equals'>Equals</MenuItem>
|
|
766
777
|
<MenuItem value='startswith'>Starts with</MenuItem>
|
|
767
778
|
</Select>
|
|
768
779
|
<TextField
|
|
780
|
+
variant='standard'
|
|
769
781
|
autoFocus
|
|
770
782
|
margin='dense'
|
|
771
783
|
id='containsFilter'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Children, PropsWithChildren, useEffect, useState } from 'react';
|
|
2
|
-
import { Tab, Tabs } from '@material
|
|
3
|
-
import { TabContext, TabPanel } from '@
|
|
2
|
+
import { Tab, Tabs } from '@mui/material';
|
|
3
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
4
4
|
|
|
5
5
|
import { getTransientTabs, getVisibleTabs, tabClick } from './tabUtils';
|
|
6
6
|
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { Grid, GridSize } from '@material
|
|
3
|
-
import
|
|
2
|
+
import { Grid, GridSize } 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 TwoColumnProps extends PConnProps {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
-
import { Grid, GridSize } from '@material
|
|
3
|
-
import
|
|
2
|
+
import { Grid, GridSize } 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 TwoColumnTabProps extends PConnProps {
|
|
@@ -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 WideNarrowDetails(props: WideNarrowDetailsProps) {
|
|
|
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
|
let theConfigObject: object = configObject;
|