@pega/react-sdk-overrides 0.24.4 → 0.242.1

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 (78) 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.tsx +11 -2
  4. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +3 -3
  5. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +4 -4
  6. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  7. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +3 -3
  8. package/lib/designSystemExtension/Operator/Operator.tsx +6 -5
  9. package/lib/designSystemExtension/Pulse/Pulse.tsx +2 -2
  10. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +3 -2
  11. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +1 -1
  12. package/lib/field/AutoComplete/AutoComplete.tsx +3 -3
  13. package/lib/field/CancelAlert/CancelAlert.tsx +3 -3
  14. package/lib/field/Checkbox/Checkbox.tsx +3 -3
  15. package/lib/field/Currency/Currency.tsx +1 -1
  16. package/lib/field/Date/Date.tsx +22 -41
  17. package/lib/field/DateTime/DateTime.tsx +22 -34
  18. package/lib/field/Decimal/Decimal.tsx +1 -1
  19. package/lib/field/Dropdown/Dropdown.tsx +2 -2
  20. package/lib/field/Email/Email.tsx +2 -2
  21. package/lib/field/Group/Group.tsx +1 -1
  22. package/lib/field/Integer/Integer.tsx +1 -1
  23. package/lib/field/Multiselect/Multiselect.tsx +8 -14
  24. package/lib/field/Percentage/Percentage.tsx +2 -2
  25. package/lib/field/Phone/Phone.tsx +1 -1
  26. package/lib/field/RadioButtons/RadioButtons.tsx +2 -2
  27. package/lib/field/SemanticLink/SemanticLink.tsx +3 -3
  28. package/lib/field/TextArea/TextArea.tsx +1 -1
  29. package/lib/field/TextContent/TextContent.tsx +1 -1
  30. package/lib/field/TextInput/TextInput.tsx +1 -1
  31. package/lib/field/Time/Time.tsx +19 -15
  32. package/lib/field/URL/URL.tsx +1 -1
  33. package/lib/field/UserReference/UserReference.tsx +1 -1
  34. package/lib/helpers/simpleTableHelpers.ts +1 -1
  35. package/lib/infra/ActionButtons/ActionButtons.tsx +3 -3
  36. package/lib/infra/Assignment/Assignment.tsx +9 -5
  37. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +8 -9
  38. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +2 -2
  39. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +8 -8
  40. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +1 -1
  41. package/lib/infra/DashboardFilter/DashboardFilter.tsx +1 -1
  42. package/lib/infra/DashboardFilter/filterUtils.tsx +2 -1
  43. package/lib/infra/DeferLoad/DeferLoad.tsx +2 -2
  44. package/lib/infra/NavBar/NavBar.tsx +17 -16
  45. package/lib/infra/RootContainer/RootContainer.tsx +5 -6
  46. package/lib/infra/Stages/Stages.tsx +4 -4
  47. package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +2 -2
  48. package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +2 -2
  49. package/lib/template/AppShell/AppShell.tsx +21 -2
  50. package/lib/template/CaseView/CaseView.tsx +5 -5
  51. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +7 -7
  52. package/lib/template/Confirmation/Confirmation.tsx +2 -1
  53. package/lib/template/DataReference/DataReference.tsx +1 -1
  54. package/lib/template/Details/Details/Details.tsx +1 -1
  55. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +3 -3
  56. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
  57. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
  58. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +3 -2
  59. package/lib/template/InlineDashboard/InlineDashboard.tsx +2 -2
  60. package/lib/template/ListView/ListView.tsx +41 -34
  61. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
  62. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +2 -2
  63. package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -1
  64. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +29 -25
  65. package/lib/template/SubTabs/SubTabs.tsx +2 -2
  66. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +2 -2
  67. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +2 -2
  68. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +1 -1
  69. package/lib/template/WssNavBar/WssNavBar.tsx +9 -9
  70. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +2 -2
  71. package/lib/widget/Attachment/Attachment.tsx +3 -2
  72. package/lib/widget/CaseHistory/CaseHistory.tsx +12 -10
  73. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +1 -1
  74. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +4 -3
  75. package/lib/widget/Followers/Followers.tsx +2 -2
  76. package/lib/widget/SummaryItem/SummaryItem.tsx +3 -2
  77. package/lib/widget/ToDo/ToDo.tsx +85 -21
  78. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { KeyboardTimePicker } from '@material-ui/pickers';
2
- import AccessTimeIcon from '@material-ui/icons/AccessTime';
1
+ import { TimePicker } from '@mui/x-date-pickers/TimePicker';
2
+ // import AccessTimeIcon from '@mui/icons-material/AccessTime';
3
3
  import dayjs from 'dayjs';
4
4
 
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
@@ -52,25 +52,29 @@ export default function Time(props: TimeProps) {
52
52
  //
53
53
 
54
54
  return (
55
- <KeyboardTimePicker
56
- variant='inline'
57
- inputVariant='outlined'
58
- placeholder='hh:mm am'
59
- keyboardIcon={<AccessTimeIcon />}
60
- fullWidth
61
- required={required}
55
+ <TimePicker
56
+ // keyboardIcon={<AccessTimeIcon />}
57
+ // fullWidth
58
+
62
59
  disabled={disabled}
63
- error={status === 'error'}
64
- helperText={helperTextToDisplay}
65
60
  minutesStep={5}
66
- size='small'
67
61
  label={label}
68
- autoOk
69
- mask='__:__ _m'
62
+ // autoOk
63
+ // mask='__:__ _m'
70
64
  format='hh:mm a'
71
65
  value={timeValue}
72
66
  onChange={handleChange}
73
- InputProps={{ inputProps: { ...testProp } }}
67
+ slotProps={{
68
+ textField: {
69
+ variant: 'outlined',
70
+ placeholder: 'hh:mm am',
71
+ required,
72
+ error: status === 'error',
73
+ helperText: helperTextToDisplay,
74
+ size: 'small',
75
+ InputProps: { inputProps: { ...testProp } }
76
+ }
77
+ }}
74
78
  />
75
79
  );
76
80
  }
@@ -1,4 +1,4 @@
1
- import { TextField } from '@material-ui/core';
1
+ import { TextField } from '@mui/material';
2
2
 
3
3
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
4
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -1,5 +1,5 @@
1
1
  import { memo, useEffect, useState } from 'react';
2
- import { Typography } from '@material-ui/core';
2
+ import { Typography } from '@mui/material';
3
3
 
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -231,7 +231,7 @@ export const filterData = filterByColumns => {
231
231
  case 'Date':
232
232
  case 'DateTime':
233
233
  case 'Time':
234
- value = item[filterObj.ref] !== null ?? item[filterObj.ref] !== '' ? Utils.getSeconds(item[filterObj.ref]) : null;
234
+ value = (item[filterObj.ref] !== null ?? item[filterObj.ref] !== '') ? Utils.getSeconds(item[filterObj.ref]) : null;
235
235
  filterValue =
236
236
  filterObj.containsFilterValue !== null && filterObj.containsFilterValue !== '' ? Utils.getSeconds(filterObj.containsFilterValue) : null;
237
237
 
@@ -1,6 +1,6 @@
1
- import { makeStyles } from '@material-ui/core/styles';
2
- import Button from '@material-ui/core/Button';
3
- import { Grid, Divider } from '@material-ui/core';
1
+ import makeStyles from '@mui/styles/makeStyles';
2
+ import Button from '@mui/material/Button';
3
+ import { Grid, Divider } from '@mui/material';
4
4
 
5
5
  // ActionButtons does NOT have getPConnect. So, no need to extend from PConnProps
6
6
  interface ActionButtonsProps {
@@ -1,9 +1,10 @@
1
1
  import React, { PropsWithChildren, useEffect, useState } from 'react';
2
- import Snackbar from '@material-ui/core/Snackbar';
3
- import IconButton from '@material-ui/core/IconButton';
4
- import CloseIcon from '@material-ui/icons/Close';
2
+ import Snackbar from '@mui/material/Snackbar';
3
+ import IconButton from '@mui/material/IconButton';
4
+ import CloseIcon from '@mui/icons-material/Close';
5
5
 
6
6
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
+ import { useFocusFirstField, useScrolltoTop } from '@pega/react-sdk-components/lib/hooks';
7
8
 
8
9
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
10
 
@@ -86,6 +87,10 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
86
87
  return formedSteps;
87
88
  }
88
89
 
90
+ const scrollId = window.location.href.includes('embedded') ? '#pega-part-of-page' : '#portal';
91
+ useScrolltoTop(scrollId, children);
92
+ useFocusFirstField('Assignment', children);
93
+
89
94
  useEffect(() => {
90
95
  if (children) {
91
96
  const firstChild = Array.isArray(children) ? children[0] : children;
@@ -134,7 +139,7 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
134
139
  setShowSnackbar(true);
135
140
  }
136
141
 
137
- function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {
142
+ function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {
138
143
  if (reason === 'clickaway') {
139
144
  return;
140
145
  }
@@ -230,7 +235,6 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
230
235
  break;
231
236
  }
232
237
  } else if (sButtonType === 'primary') {
233
- // eslint-disable-next-line sonarjs/no-small-switch
234
238
  switch (sAction) {
235
239
  case 'finishAssignment': {
236
240
  const finishPromise = finishAssignment(itemKey);
@@ -1,11 +1,8 @@
1
1
  /* eslint-disable no-nested-ternary */
2
2
 
3
3
  import { useState, useEffect, useContext } from 'react';
4
- import { makeStyles } from '@material-ui/core/styles';
5
- import { Card, CardHeader, Avatar, Typography } from '@material-ui/core';
6
- import { Alert } from '@material-ui/lab';
7
- import DayjsUtils from '@date-io/dayjs';
8
- import { MuiPickersUtilsProvider } from '@material-ui/pickers';
4
+ import makeStyles from '@mui/styles/makeStyles';
5
+ import { Alert, Card, CardHeader, Avatar, Typography } from '@mui/material';
9
6
 
10
7
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
11
8
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
@@ -15,6 +12,8 @@ import { withSimpleViewContainerRenderer } from '../SimpleView/SimpleView';
15
12
 
16
13
  import { addContainerItem, getToDoAssignments, showBanner, hasContainerItems } from './helpers';
17
14
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
15
+ import { LocalizationProvider } from '@mui/x-date-pickers';
16
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
18
17
 
19
18
  interface FlowContainerProps extends PConnProps {
20
19
  // If any, enter additional props that only exist on this component
@@ -313,21 +312,21 @@ export const FlowContainer = (props: FlowContainerProps) => {
313
312
  avatar={<Avatar className={`${classes.avatar} psdk-avatar`}>{operatorInitials}</Avatar>}
314
313
  />
315
314
  {displayPageMessages()}
316
- <MuiPickersUtilsProvider utils={DayjsUtils}>
315
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
317
316
  <Assignment getPConnect={getPConnect} itemKey={itemKey}>
318
317
  {rootViewElement}
319
318
  </Assignment>
320
- </MuiPickersUtilsProvider>
319
+ </LocalizationProvider>
321
320
  </Card>
322
321
  ) : (
323
322
  <Card className={`${classes.root} psdk-root`}>
324
323
  <Typography variant='h6'>{localizedVal(containerName, undefined, key)}</Typography>
325
324
  {displayPageMessages()}
326
- <MuiPickersUtilsProvider utils={DayjsUtils}>
325
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
327
326
  <Assignment getPConnect={getPConnect} itemKey={itemKey}>
328
327
  {rootViewElement}
329
328
  </Assignment>
330
- </MuiPickersUtilsProvider>
329
+ </LocalizationProvider>
331
330
  </Card>
332
331
  )
333
332
  ) : (
@@ -1,6 +1,6 @@
1
1
  import { useState } from 'react';
2
- import Button from '@material-ui/core/Button';
3
- import { makeStyles } from '@material-ui/core/styles';
2
+ import Button from '@mui/material/Button';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  const useStyles = makeStyles((/* theme */) => ({
@@ -1,10 +1,10 @@
1
1
  import { createElement, useEffect, useRef, useState } from 'react';
2
- import Dialog from '@material-ui/core/Dialog';
3
- import DialogContent from '@material-ui/core/DialogContent';
4
- import DialogTitle from '@material-ui/core/DialogTitle';
5
- import { makeStyles } from '@material-ui/core/styles';
6
- import { MuiPickersUtilsProvider } from '@material-ui/pickers';
7
- import DayjsUtils from '@date-io/dayjs';
2
+ import Dialog from '@mui/material/Dialog';
3
+ import DialogContent from '@mui/material/DialogContent';
4
+ import DialogTitle from '@mui/material/DialogTitle';
5
+ import makeStyles from '@mui/styles/makeStyles';
6
+ import { LocalizationProvider } from '@mui/x-date-pickers';
7
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
8
8
  import difference from 'lodash.difference';
9
9
 
10
10
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
@@ -315,7 +315,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
315
315
  </DialogTitle>
316
316
  <DialogContent className={`${classes.dlgContent} psdk-dialog-content`}>
317
317
  {bShowModal ? (
318
- <MuiPickersUtilsProvider utils={DayjsUtils}>
318
+ <LocalizationProvider dateAdapter={AdapterDayjs}>
319
319
  <Assignment
320
320
  getPConnect={createdView.configObject.getPConnect}
321
321
  itemKey={itemKey}
@@ -327,7 +327,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
327
327
  >
328
328
  {arNewChildrenAsReact}
329
329
  </Assignment>
330
- </MuiPickersUtilsProvider>
330
+ </LocalizationProvider>
331
331
  ) : null}
332
332
  </DialogContent>
333
333
 
@@ -1,5 +1,5 @@
1
1
  import React, { createElement, useContext, useEffect, useState } from 'react';
2
- import { Box, CircularProgress } from '@material-ui/core';
2
+ import { Box, CircularProgress } from '@mui/material';
3
3
 
4
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
5
5
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-shadow */
2
2
  /* eslint-disable operator-assignment */
3
3
  import { forwardRef, PropsWithChildren, useEffect, useRef, useState } from 'react';
4
- import { TextField } from '@material-ui/core';
4
+ import { TextField } from '@mui/material';
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
  import { debounce } from 'throttle-debounce';
7
7
  import DatePicker from 'react-datepicker';
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable prefer-template */
2
2
  /** This file contains various utility methods to generate filter components, regionLayout data, filter expressions, etc. */
3
3
 
4
- import { Grid, Link } from '@material-ui/core';
4
+ import { Grid, Link } from '@mui/material';
5
5
 
6
6
  import DashboardFilter from './DashboardFilter';
7
7
 
@@ -85,6 +85,7 @@ export const buildFilterComponents = (getPConnect, allFilters) => {
85
85
  // @ts-ignore - second parameter “payload” for publish method should be optional
86
86
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL);
87
87
  }}
88
+ underline='hover'
88
89
  >
89
90
  Clear All
90
91
  </Link>
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, createElement } from 'react';
2
- import { Box, Card, CircularProgress } from '@material-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
2
+ import { Box, Card, CircularProgress } from '@mui/material';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
 
5
5
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
6
6
 
@@ -1,5 +1,6 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { makeStyles, useTheme } from '@material-ui/core/styles';
2
+ import { useTheme } from '@mui/material/styles';
3
+ import makeStyles from '@mui/styles/makeStyles';
3
4
  import clsx from 'clsx';
4
5
 
5
6
  import {
@@ -15,19 +16,19 @@ import {
15
16
  Menu,
16
17
  MenuItem,
17
18
  Typography
18
- } from '@material-ui/core';
19
- import PersonOutlineIcon from '@material-ui/icons/PersonOutlineOutlined';
20
- import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
21
- import ChevronRightIcon from '@material-ui/icons/ChevronRight';
22
- import FlagOutlinedIcon from '@material-ui/icons/FlagOutlined';
23
- import HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';
24
- import ExpandLess from '@material-ui/icons/ExpandLess';
25
- import ExpandMore from '@material-ui/icons/ExpandMore';
26
- import AddIcon from '@material-ui/icons/Add';
27
- import WorkOutlineIcon from '@material-ui/icons/WorkOutline';
28
- import ClearOutlinedIcon from '@material-ui/icons/ClearOutlined';
29
- import ArrowBackIcon from '@material-ui/icons/ArrowBack';
30
- import useMediaQuery from '@material-ui/core/useMediaQuery';
19
+ } from '@mui/material';
20
+ import PersonOutlineIcon from '@mui/icons-material/PersonOutlineOutlined';
21
+ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
22
+ import ChevronRightIcon from '@mui/icons-material/ChevronRight';
23
+ import FlagOutlinedIcon from '@mui/icons-material/FlagOutlined';
24
+ import HomeOutlinedIcon from '@mui/icons-material/HomeOutlined';
25
+ import ExpandLess from '@mui/icons-material/ExpandLess';
26
+ import ExpandMore from '@mui/icons-material/ExpandMore';
27
+ import AddIcon from '@mui/icons-material/Add';
28
+ import WorkOutlineIcon from '@mui/icons-material/WorkOutline';
29
+ import ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';
30
+ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
31
+ import useMediaQuery from '@mui/material/useMediaQuery';
31
32
  import { logout } from '@pega/auth/lib/sdk-auth-manager';
32
33
 
33
34
  import { useNavBar } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
@@ -203,7 +204,7 @@ export default function NavBar(props: NavBarProps) {
203
204
  }
204
205
  />
205
206
  <ListItemSecondaryAction>
206
- <IconButton edge='end' onClick={handleDrawerOpen}>
207
+ <IconButton edge='end' onClick={handleDrawerOpen} size='large'>
207
208
  <ChevronLeftIcon className={classes.appListIcon} />
208
209
  </IconButton>
209
210
  </ListItemSecondaryAction>
@@ -256,7 +257,7 @@ export default function NavBar(props: NavBarProps) {
256
257
  <ListItemText primary={portalOperator} />
257
258
  {open && (
258
259
  <ListItemSecondaryAction>
259
- <IconButton edge='end' onClick={navPanelOperatorButtonClick}>
260
+ <IconButton edge='end' onClick={navPanelOperatorButtonClick} size='large'>
260
261
  <ChevronRightIcon />
261
262
  </IconButton>
262
263
  </ListItemSecondaryAction>
@@ -1,6 +1,5 @@
1
1
  import { Children, createElement, PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';
2
- import isEqual from 'lodash.isequal';
3
- import { Box, CircularProgress } from '@material-ui/core';
2
+ import { Box, CircularProgress } from '@mui/material';
4
3
 
5
4
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
6
5
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
@@ -54,6 +53,7 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
54
53
  const pConn = getPConnect();
55
54
 
56
55
  const options = { context: 'app' };
56
+ const rootView = useRef(null);
57
57
 
58
58
  const [componentName, setComponentName] = useState('');
59
59
 
@@ -146,7 +146,6 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
146
146
  return noPortalContent;
147
147
  }
148
148
 
149
- let rootView: any;
150
149
  let rootViewConfig: any = null;
151
150
 
152
151
  useEffect(() => {
@@ -180,8 +179,8 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
180
179
  }
181
180
  };
182
181
 
183
- if (!isEqual(currentRootConfig, prevRootConfig)) {
184
- rootView = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig));
182
+ if (!PCore.isDeepEqual(currentRootConfig, prevRootConfig)) {
183
+ rootView.current = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig)) as any;
185
184
  }
186
185
 
187
186
  // debugging/investigation help
@@ -189,7 +188,7 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
189
188
 
190
189
  return (
191
190
  <div id='ModalManager'>
192
- {rootView}
191
+ {rootView.current}
193
192
  {MemoizedModalViewContainer}
194
193
  <div id='MemoizedPreviewViewContainer' />
195
194
  <div id='ReAuthMessageModal' />
@@ -1,7 +1,7 @@
1
- import { Breadcrumbs, Card, Typography } from '@material-ui/core';
2
- import DoubleArrowIcon from '@material-ui/icons/DoubleArrow';
3
- import DoneIcon from '@material-ui/icons/Done';
4
- import { makeStyles } from '@material-ui/core/styles';
1
+ import { Breadcrumbs, Card, Typography } from '@mui/material';
2
+ import DoubleArrowIcon from '@mui/icons-material/DoubleArrow';
3
+ import DoneIcon from '@mui/icons-material/Done';
4
+ import makeStyles from '@mui/styles/makeStyles';
5
5
 
6
6
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
@@ -1,5 +1,5 @@
1
- import { withStyles } from '@material-ui/core/styles';
2
- import { Tab, Divider } from '@material-ui/core';
1
+ import withStyles from '@mui/styles/withStyles';
2
+ import { Tab, Divider } from '@mui/material';
3
3
 
4
4
  // LeftAlignVerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps
5
5
 
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { makeStyles } from '@material-ui/core/styles';
3
- import Tabs from '@material-ui/core/Tabs';
2
+ import makeStyles from '@mui/styles/makeStyles';
3
+ import Tabs from '@mui/material/Tabs';
4
4
 
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren, useEffect, useState } from 'react';
2
- import { makeStyles } from '@material-ui/core/styles';
3
- import Avatar from '@material-ui/core/Avatar';
2
+ import makeStyles from '@mui/styles/makeStyles';
3
+ import Avatar from '@mui/material/Avatar';
4
4
 
5
5
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
6
6
  import { NavContext } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
@@ -92,6 +92,25 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
92
92
  setMapChildren(tempMap);
93
93
  }, []);
94
94
 
95
+ useEffect(() => {
96
+ // @ts-ignore
97
+ const caseTypesAvailableToCreateDP = PCore.getEnvironmentInfo().environmentInfoObject?.pxApplication?.pyCaseTypesAvailableToCreateDP;
98
+ if (caseTypesAvailableToCreateDP) {
99
+ const portalID = pConn.getValue('.pyOwner');
100
+ PCore.getDataPageUtils()
101
+ .getPageDataAsync(caseTypesAvailableToCreateDP, pConn.getContextName(), {
102
+ PortalName: portalID
103
+ })
104
+ .then(response => {
105
+ if (response?.pyCaseTypesAvailableToCreate) {
106
+ pConn.replaceState('.pyCaseTypesAvailableToCreate', response.pyCaseTypesAvailableToCreate, {
107
+ skipDirtyValidation: true
108
+ });
109
+ }
110
+ });
111
+ }
112
+ }, []);
113
+
95
114
  const [iconURL, setIconURL] = useState('');
96
115
  const [fullIconURL, setFullIconURL] = useState('');
97
116
  useEffect(() => {
@@ -1,11 +1,11 @@
1
1
  /* eslint-disable react/jsx-boolean-value */
2
2
 
3
3
  import { PropsWithChildren, ReactElement, useContext, useEffect, useState } from 'react';
4
- import { Avatar, Card, CardHeader, Divider, Typography } from '@material-ui/core';
5
- import { makeStyles } from '@material-ui/core/styles';
6
- import Box from '@material-ui/core/Box';
7
- import Button from '@material-ui/core/Button';
8
- import Grid from '@material-ui/core/Grid';
4
+ import { Avatar, Card, CardHeader, Divider, Typography } from '@mui/material';
5
+ import makeStyles from '@mui/styles/makeStyles';
6
+ import Box from '@mui/material/Box';
7
+ import Button from '@mui/material/Button';
8
+ import Grid from '@mui/material/Grid';
9
9
 
10
10
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
11
11
  import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
@@ -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';
@@ -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';
@@ -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, TextField } 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 && <TextField variant='standard'>{propsToUse.label}</TextField>}
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';
@@ -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';
@@ -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';
@@ -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 {