@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.
Files changed (92) hide show
  1. package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +1 -1
  2. package/lib/designSystemExtension/Banner/Banner.tsx +1 -1
  3. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  4. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +11 -2
  5. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
  6. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
  7. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  8. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +5 -5
  9. package/lib/designSystemExtension/Operator/Operator.tsx +6 -5
  10. package/lib/designSystemExtension/Pulse/Pulse.tsx +2 -2
  11. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
  12. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  13. package/lib/field/AutoComplete/AutoComplete.tsx +4 -4
  14. package/lib/field/CancelAlert/CancelAlert.tsx +3 -3
  15. package/lib/field/Checkbox/Checkbox.tsx +4 -4
  16. package/lib/field/Currency/Currency.tsx +2 -2
  17. package/lib/field/Date/Date.tsx +23 -42
  18. package/lib/field/DateTime/DateTime.tsx +29 -34
  19. package/lib/field/Decimal/Decimal.tsx +2 -2
  20. package/lib/field/Dropdown/Dropdown.tsx +3 -3
  21. package/lib/field/Email/Email.tsx +29 -8
  22. package/lib/field/Group/Group.tsx +2 -2
  23. package/lib/field/Integer/Integer.tsx +22 -8
  24. package/lib/field/Multiselect/Multiselect.tsx +8 -14
  25. package/lib/field/Percentage/Percentage.tsx +3 -3
  26. package/lib/field/Phone/Phone.tsx +6 -5
  27. package/lib/field/Phone/config-ext.json +8 -0
  28. package/lib/field/RadioButtons/RadioButtons.tsx +3 -3
  29. package/lib/field/RichText/RichText.tsx +1 -1
  30. package/lib/field/RichText/config-ext.json +10 -0
  31. package/lib/field/ScalarList/ScalarList.tsx +2 -2
  32. package/lib/field/SemanticLink/SemanticLink.tsx +4 -4
  33. package/lib/field/TextArea/TextArea.tsx +26 -8
  34. package/lib/field/TextContent/TextContent.tsx +1 -1
  35. package/lib/field/TextInput/TextInput.tsx +2 -2
  36. package/lib/field/Time/Time.tsx +27 -20
  37. package/lib/field/URL/URL.tsx +26 -7
  38. package/lib/field/UserReference/UserReference.tsx +2 -2
  39. package/lib/helpers/field-group-utils.ts +2 -2
  40. package/lib/helpers/simpleTableHelpers.ts +1 -1
  41. package/lib/infra/ActionButtons/ActionButtons.tsx +3 -3
  42. package/lib/infra/Assignment/Assignment.tsx +10 -6
  43. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +11 -10
  44. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +7 -4
  45. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +8 -8
  46. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +1 -1
  47. package/lib/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  48. package/lib/infra/DashboardFilter/filterUtils.tsx +2 -1
  49. package/lib/infra/DeferLoad/DeferLoad.tsx +3 -3
  50. package/lib/infra/MultiStep/MultiStep.tsx +14 -8
  51. package/lib/infra/NavBar/NavBar.css +1 -0
  52. package/lib/infra/NavBar/NavBar.tsx +25 -17
  53. package/lib/infra/RootContainer/RootContainer.tsx +5 -6
  54. package/lib/infra/Stages/Stages.tsx +4 -4
  55. package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
  56. package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +2 -2
  57. package/lib/infra/View/View.tsx +37 -3
  58. package/lib/template/AppShell/AppShell.tsx +55 -5
  59. package/lib/template/BannerPage/config-ext.json +9 -0
  60. package/lib/template/CaseView/CaseView.tsx +5 -5
  61. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
  62. package/lib/template/Confirmation/Confirmation.tsx +2 -1
  63. package/lib/template/DataReference/DataReference.tsx +2 -2
  64. package/lib/template/Details/Details/Details.tsx +2 -2
  65. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
  66. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +2 -2
  67. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +2 -2
  68. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +4 -3
  69. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +10 -3
  70. package/lib/template/InlineDashboard/InlineDashboard.tsx +2 -2
  71. package/lib/template/InlineDashboardPage/config-ext.json +9 -0
  72. package/lib/template/ListView/ListView.tsx +69 -61
  73. package/lib/template/ListView/utils.ts +1 -1
  74. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +2 -2
  75. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +2 -2
  76. package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -1
  77. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +42 -30
  78. package/lib/template/SubTabs/SubTabs.tsx +2 -2
  79. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +2 -2
  80. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +2 -2
  81. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +2 -2
  82. package/lib/template/WssNavBar/WssNavBar.tsx +9 -9
  83. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
  84. package/lib/widget/Attachment/Attachment.tsx +5 -2
  85. package/lib/widget/CaseHistory/CaseHistory.tsx +12 -10
  86. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
  87. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +4 -3
  88. package/lib/widget/Followers/Followers.tsx +2 -2
  89. package/lib/widget/QuickCreate/config-ext.json +9 -0
  90. package/lib/widget/SummaryItem/SummaryItem.tsx +3 -2
  91. package/lib/widget/ToDo/ToDo.tsx +91 -21
  92. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import React, { useState } from 'react';
2
- import Button from '@material-ui/core/Button';
3
- import Menu from '@material-ui/core/Menu';
4
- import MenuItem from '@material-ui/core/MenuItem';
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-ui/core/Snackbar';
8
- import IconButton from '@material-ui/core/IconButton';
9
- import CloseIcon from '@material-ui/icons/Close';
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 | React.MouseEvent, reason?: string) {
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, makeStyles } from '@material-ui/core';
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 = ['LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode);
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-ui/core/Grid';
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', 'LABELS_LEFT');
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, TextField } from '@material-ui/core';
3
- import { TabContext, TabPanel } from '@material-ui/lab';
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 && <TextField>{propsToUse.label}</TextField>}
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-ui/core/Grid';
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', 'LABELS_LEFT');
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-ui/core/Grid';
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', 'LABELS_LEFT');
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 { makeStyles, Tab, Tabs } from '@material-ui/core';
3
- import { TabContext, TabPanel } from '@material-ui/lab';
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', 'LABELS_LEFT');
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 === 'LABELS_LEFT';
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', 'LABELS_LEFT');
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-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
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 {
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "InlineDashboardPage",
3
+ "label": "Inline Dashboard",
4
+ "description": "Inline Dashboard Page Template",
5
+ "type": "Template",
6
+ "subtype": "PAGE",
7
+ "icon": "InlineDashboardPage.svg",
8
+ "properties": []
9
+ }
@@ -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 { createStyles, makeStyles, Theme } from '@material-ui/core/styles';
8
- import Table from '@material-ui/core/Table';
9
- import TableBody from '@material-ui/core/TableBody';
10
- import TableCell from '@material-ui/core/TableCell';
11
- import TableContainer from '@material-ui/core/TableContainer';
12
- import TableHead from '@material-ui/core/TableHead';
13
- import TablePagination from '@material-ui/core/TablePagination';
14
- import TableRow from '@material-ui/core/TableRow';
15
- import TableSortLabel from '@material-ui/core/TableSortLabel';
16
- import Paper from '@material-ui/core/Paper';
17
- import MoreIcon from '@material-ui/icons/MoreVert';
18
- import FilterListIcon from '@material-ui/icons/FilterList';
19
- import SubjectIcon from '@material-ui/icons/Subject';
20
- import SearchIcon from '@material-ui/icons/Search';
21
- import TextField from '@material-ui/core/TextField';
22
- import Grid from '@material-ui/core/Grid';
23
- import Menu from '@material-ui/core/Menu';
24
- import MenuItem from '@material-ui/core/MenuItem';
25
- import Dialog from '@material-ui/core/Dialog';
26
- import DialogActions from '@material-ui/core/DialogActions';
27
- import DialogContent from '@material-ui/core/DialogContent';
28
- import DialogTitle from '@material-ui/core/DialogTitle';
29
- import Select from '@material-ui/core/Select';
30
- import Button from '@material-ui/core/Button';
31
- import Link from '@material-ui/core/Link';
32
- import Typography from '@material-ui/core/Typography';
33
- import Snackbar from '@material-ui/core/Snackbar';
34
- import IconButton from '@material-ui/core/IconButton';
35
- import CloseIcon from '@material-ui/icons/Close';
36
- import { Radio } from '@material-ui/core';
37
- import Checkbox from '@material-ui/core/Checkbox';
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 | React.MouseEvent, reason?: string) {
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
- {stableSort(arRows, getComparator(order, orderBy))
1036
- .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
1037
- .map(row => {
1038
- return (
1039
- <TableRow key={row.pxRefObjectInsName || row.pyID}>
1040
- {arColumns.map(column => {
1041
- const value = row[column.id];
1042
- return (
1043
- <TableCell key={column.id} align={column.align} className={classes.cell}>
1044
- {_showButton(column.id, row) || column.displayAsLink ? (
1045
- <Link
1046
- component='button'
1047
- onClick={() => {
1048
- _listViewClick(row, column);
1049
- }}
1050
- >
1051
- {column.format && typeof value === 'number' ? column.format(value) : value}
1052
- </Link>
1053
- ) : (
1054
- <>{column.format && typeof value === 'number' ? column.format(value) : value || '---'}</>
1055
- )}
1056
- </TableCell>
1057
- );
1058
- })}
1059
- </TableRow>
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.setCompositeKeys(compositeKeys);
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-ui/core/Grid';
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', 'LABELS_LEFT');
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-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
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-ui/core/Button';
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-ui/core/Table';
4
- import TableBody from '@material-ui/core/TableBody';
5
- import TableCell from '@material-ui/core/TableCell';
6
- import TableContainer from '@material-ui/core/TableContainer';
7
- import TableHead from '@material-ui/core/TableHead';
8
- import TableRow from '@material-ui/core/TableRow';
9
- import Paper from '@material-ui/core/Paper';
10
- import { makeStyles } from '@material-ui/core/styles';
11
- import Link from '@material-ui/core/Link';
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-ui/core/TableSortLabel';
14
- import MoreIcon from '@material-ui/icons/MoreVert';
15
- import Menu from '@material-ui/core/Menu';
16
- import MenuItem from '@material-ui/core/MenuItem';
17
- import FilterListIcon from '@material-ui/icons/FilterList';
18
- import SubjectIcon from '@material-ui/icons/Subject';
19
- import Dialog from '@material-ui/core/Dialog';
20
- import DialogActions from '@material-ui/core/DialogActions';
21
- import DialogContent from '@material-ui/core/DialogContent';
22
- import DialogTitle from '@material-ui/core/DialogTitle';
23
- import Select from '@material-ui/core/Select';
24
- import Button from '@material-ui/core/Button';
25
- import TextField from '@material-ui/core/TextField';
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).then(listData => {
262
- const data = formatRowsData(listData);
263
- myRows = data;
264
- setRowData(data);
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-ui/core';
3
- import { TabContext, TabPanel } from '@material-ui/lab';
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-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
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-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
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-ui/core/Grid';
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', 'LABELS_LEFT');
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;