@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,4 +1,4 @@
1
- import { Alert } from '@material-ui/lab';
1
+ import { Alert } from '@mui/material';
2
2
 
3
3
  // AlertBanner is one of the few components that does NOT have getPConnect.
4
4
  // So, no need to extend PConnProps
@@ -1,4 +1,4 @@
1
- import Grid from '@material-ui/core/Grid';
1
+ import Grid from '@mui/material/Grid';
2
2
  import './Banner.css';
3
3
 
4
4
  // AlertBanner is one of the few components that does NOT have getPConnect.
@@ -1,7 +1,7 @@
1
1
  import { useState, useEffect } from 'react';
2
2
  import isDeepEqual from 'fast-deep-equal/react';
3
- import Grid from '@material-ui/core/Grid';
4
- import TextField from '@material-ui/core/TextField';
3
+ import Grid from '@mui/material/Grid';
4
+ import TextField from '@mui/material/TextField';
5
5
 
6
6
  import { getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
7
7
  import { getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils';
@@ -43,6 +43,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
43
43
  default:
44
44
  return (
45
45
  <TextField
46
+ variant='standard'
46
47
  value='---'
47
48
  label={field.config.label}
48
49
  InputProps={{
@@ -61,6 +62,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
61
62
  case 'dropdown':
62
63
  return (
63
64
  <TextField
65
+ variant='standard'
64
66
  value={field.config.value}
65
67
  label={field.config.label}
66
68
  InputProps={{
@@ -77,6 +79,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
77
79
 
78
80
  return (
79
81
  <TextField
82
+ variant='standard'
80
83
  value={fieldValue}
81
84
  label={fieldLabel}
82
85
  InputProps={{
@@ -90,6 +93,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
90
93
  case 'status':
91
94
  return (
92
95
  <TextField
96
+ variant='standard'
93
97
  className='psdk-csf-status-style'
94
98
  value={field.config.value}
95
99
  label={field.config.label}
@@ -105,6 +109,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
105
109
  return (
106
110
  <a href={`tel:${displayPhone}`}>
107
111
  <TextField
112
+ variant='standard'
108
113
  value={field.config.value}
109
114
  label={field.config.label}
110
115
  InputProps={{
@@ -124,6 +129,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
124
129
  return (
125
130
  <a href={`mailto:${displayEmail}`}>
126
131
  <TextField
132
+ variant='standard'
127
133
  value={field.config.value}
128
134
  label={field.config.label}
129
135
  InputProps={{
@@ -145,6 +151,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
145
151
 
146
152
  return (
147
153
  <TextField
154
+ variant='standard'
148
155
  value={format(field.config.value, field.type, {
149
156
  format: theFormat
150
157
  })}
@@ -161,6 +168,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
161
168
  const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);
162
169
  return (
163
170
  <TextField
171
+ variant='standard'
164
172
  value={format(field.config.value, field.type, theCurrencyOptions)}
165
173
  label={field.config.label}
166
174
  InputProps={{
@@ -175,6 +183,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
175
183
  case 'userreference':
176
184
  return (
177
185
  <TextField
186
+ variant='standard'
178
187
  value={format(field.config.value, field.type)}
179
188
  label={field.config.label}
180
189
  InputProps={{
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable react/no-array-index-key */
2
2
  import React, { createElement, isValidElement } from 'react';
3
- import Grid from '@material-ui/core/Grid';
4
- import Typography from '@material-ui/core/Typography';
5
- import { makeStyles } from '@material-ui/core/styles';
3
+ import Grid from '@mui/material/Grid';
4
+ import Typography from '@mui/material/Typography';
5
+ import makeStyles from '@mui/styles/makeStyles';
6
6
 
7
7
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
8
8
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
@@ -1,8 +1,8 @@
1
1
  import { PropsWithChildren, useState } from 'react';
2
- import Grid from '@material-ui/core/Grid';
3
- import { makeStyles } from '@material-ui/core/styles';
4
- import KeyboardArrowRightIcon from '@material-ui/icons/KeyboardArrowRight';
5
- import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
2
+ import Grid from '@mui/material/Grid';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
+ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
5
+ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
6
6
 
7
7
  // FieldGroupProps is one of the few components that does NOT have getPConnect.
8
8
  // So, no need to extend PConnProps
@@ -1,6 +1,6 @@
1
- import Grid from '@material-ui/core/Grid';
2
- import Divider from '@material-ui/core/Divider';
3
- import Link from '@material-ui/core/Link';
1
+ import Grid from '@mui/material/Grid';
2
+ import Divider from '@mui/material/Divider';
3
+ import Link from '@mui/material/Link';
4
4
 
5
5
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
6
6
 
@@ -47,7 +47,7 @@ export default function FieldGroupList(props: FieldGroupListProps) {
47
47
  </Grid>
48
48
  ))}
49
49
  {props.onAdd && (
50
- <Link onClick={props.onAdd} style={{ cursor: 'pointer' }}>
50
+ <Link onClick={props.onAdd} style={{ cursor: 'pointer' }} underline='hover'>
51
51
  +Add
52
52
  </Link>
53
53
  )}
@@ -1,6 +1,6 @@
1
- import Grid from '@material-ui/core/Grid';
2
- import Typography from '@material-ui/core/Typography';
3
- import { makeStyles } from '@material-ui/core/styles';
1
+ import Grid from '@mui/material/Grid';
2
+ import Typography from '@mui/material/Typography';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
 
5
5
  // FieldValueList is one of the few components that does NOT have getPConnect.
6
6
  // So, no need to extend PConnProps
@@ -1,9 +1,9 @@
1
1
  import React, { useState } from 'react';
2
- import TextField from '@material-ui/core/TextField';
3
- import Popover from '@material-ui/core/Popover';
4
- import Grid from '@material-ui/core/Grid';
5
- import Typography from '@material-ui/core/Typography';
6
- import { makeStyles } from '@material-ui/core/styles';
2
+ import TextField from '@mui/material/TextField';
3
+ import Popover from '@mui/material/Popover';
4
+ import Grid from '@mui/material/Grid';
5
+ import Typography from '@mui/material/Typography';
6
+ import makeStyles from '@mui/styles/makeStyles';
7
7
 
8
8
  import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
9
9
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -189,6 +189,7 @@ export default function Operator(props: OperatorProps) {
189
189
  return (
190
190
  <>
191
191
  <TextField
192
+ variant='standard'
192
193
  defaultValue={caseOpName}
193
194
  label={caseOpLabel}
194
195
  onClick={showOperatorDetails}
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
- import { Card, CardContent, CardHeader, Typography } from '@material-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
2
+ import { Card, CardContent, CardHeader, Typography } from '@mui/material';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
 
5
5
  // Pulse is one of the few components that does NOT have getPConnect.
6
6
  // So, no need to extend PConnProps
@@ -1,6 +1,7 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import { Editor } from '@tinymce/tinymce-react';
3
- import { FormControl, FormHelperText, InputLabel, makeStyles } from '@material-ui/core';
3
+ import { FormControl, FormHelperText, InputLabel } from '@mui/material';
4
+ import makeStyles from '@mui/styles/makeStyles';
4
5
 
5
6
  import { useAfterInitialEffect, useConsolidatedRef, useUID } from '@pega/react-sdk-components/lib/hooks';
6
7
 
@@ -107,7 +108,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
107
108
  }
108
109
 
109
110
  return (
110
- <FormControl data-test-id={testId} error={error} required={required}>
111
+ <FormControl variant='standard' data-test-id={testId} error={error} required={required}>
111
112
  {!labelHidden && (
112
113
  <InputLabel id='demo-simple-select-error-label' className={classes.fieldLabel}>
113
114
  {label}
@@ -1,4 +1,4 @@
1
- import { Button } from '@material-ui/core';
1
+ import { Button } from '@mui/material';
2
2
  import './WssQuickCreate.css';
3
3
 
4
4
  // WssQuickCreate is one of the few components that does NOT have getPConnect.
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { TextField } from '@material-ui/core';
3
- import Autocomplete from '@material-ui/lab/Autocomplete';
2
+ import { TextField } from '@mui/material';
3
+ import Autocomplete from '@mui/material/Autocomplete';
4
4
  import isDeepEqual from 'fast-deep-equal/react';
5
5
 
6
6
  import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
@@ -191,7 +191,7 @@ export default function AutoComplete(props: AutoCompleteProps) {
191
191
  getOptionLabel={(option: IOption) => {
192
192
  return option.value ? option.value : '';
193
193
  }}
194
- getOptionSelected={(option: any) => {
194
+ isOptionEqualToValue={(option: any) => {
195
195
  return option.value ? option.value : '';
196
196
  }}
197
197
  fullWidth
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
- import { Button, Grid, IconButton, Snackbar } from '@material-ui/core';
3
- import CloseIcon from '@material-ui/icons/Close';
2
+ import { Button, Grid, IconButton, Snackbar } from '@mui/material';
3
+ import CloseIcon from '@mui/icons-material/Close';
4
4
 
5
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
  import './CancelAlert.css';
@@ -89,7 +89,7 @@ export default function CancelAlert(props: CancelAlertProps) {
89
89
  }
90
90
  }
91
91
 
92
- function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {
92
+ function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {
93
93
  if (reason === 'clickaway') {
94
94
  return;
95
95
  }
@@ -1,12 +1,12 @@
1
1
  /* eslint-disable react/no-array-index-key */
2
2
  import { useState, useEffect } from 'react';
3
- import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';
3
+ import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@mui/material';
4
+ import makeStyles from '@mui/styles/makeStyles';
4
5
 
5
6
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
7
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
7
8
  import { insertInstruction, deleteInstruction, updateNewInstuctions } from '@pega/react-sdk-components/lib/components/helpers/instructions-utils';
8
9
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
- import { makeStyles } from '@material-ui/core/styles';
10
10
 
11
11
  interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
12
12
  // If any, enter additional props that only exist on Checkbox here
@@ -161,7 +161,7 @@ export default function CheckboxComponent(props: CheckboxProps) {
161
161
  }
162
162
 
163
163
  return (
164
- <FormControl required={required} error={status === 'error'}>
164
+ <FormControl variant='standard' required={required} error={status === 'error'}>
165
165
  {!hideLabel && <FormLabel component='legend'>{label}</FormLabel>}
166
166
  <FormGroup>{theCheckbox}</FormGroup>
167
167
  <FormHelperText>{helperTextToDisplay}</FormHelperText>
@@ -1,6 +1,6 @@
1
- import { TextField } from '@material-ui/core';
2
1
  import { useState } from 'react';
3
2
  import { NumericFormat } from 'react-number-format';
3
+ import { TextField } from '@mui/material';
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
@@ -1,4 +1,6 @@
1
- import { KeyboardDatePicker } from '@material-ui/pickers';
1
+ import { useState } from 'react';
2
+ import { DatePicker } from '@mui/x-date-pickers/DatePicker';
3
+ import dayjs, { Dayjs } from 'dayjs';
2
4
 
3
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
4
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
@@ -20,22 +22,9 @@ export default function Date(props: DateProps) {
20
22
  const TextInput = getComponentFromMap('TextInput');
21
23
  const FieldValueList = getComponentFromMap('FieldValueList');
22
24
 
23
- const {
24
- getPConnect,
25
- label,
26
- required,
27
- disabled,
28
- value = '',
29
- validatemessage,
30
- status,
31
- onChange,
32
- onBlur,
33
- readOnly,
34
- testId,
35
- helperText,
36
- displayMode,
37
- hideLabel
38
- } = props;
25
+ const { getPConnect, label, required, disabled, value, validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;
26
+
27
+ const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(value) : null);
39
28
 
40
29
  const pConn = getPConnect();
41
30
  const actions = pConn.getActionsApi();
@@ -77,37 +66,29 @@ export default function Date(props: DateProps) {
77
66
 
78
67
  const handleChange = date => {
79
68
  if (date && date.isValid()) {
80
- onChange({ value: getFormattedDate(date) });
81
- }
82
- };
83
-
84
- const handleAccept = date => {
85
- if (date && date.isValid()) {
69
+ setDateValue(date);
86
70
  handleEvent(actions, 'changeNblur', propName, getFormattedDate(date));
87
71
  }
88
72
  };
89
73
 
90
74
  return (
91
- <KeyboardDatePicker
92
- disableToolbar
93
- variant='inline'
94
- inputVariant='outlined'
95
- placeholder={dateFormatInfo.dateFormatStringLC}
96
- format={dateFormatInfo.dateFormatString}
97
- mask={dateFormatInfo.dateFormatMask}
98
- fullWidth
99
- autoOk
100
- required={required}
101
- disabled={disabled}
102
- error={status === 'error'}
103
- helperText={helperTextToDisplay}
104
- size='small'
75
+ <DatePicker
105
76
  label={label}
106
- value={value || null}
77
+ disabled={disabled}
78
+ format={dateFormatInfo.dateFormatString}
79
+ value={dateValue}
80
+ slotProps={{
81
+ textField: {
82
+ required,
83
+ variant: 'outlined',
84
+ placeholder: dateFormatInfo.dateFormatStringLC,
85
+ error: status === 'error',
86
+ helperText: helperTextToDisplay,
87
+ size: 'small',
88
+ InputProps: { ...testProp }
89
+ }
90
+ }}
107
91
  onChange={handleChange}
108
- onBlur={!readOnly ? onBlur : undefined}
109
- onAccept={handleAccept}
110
- InputProps={{ ...testProp }}
111
92
  />
112
93
  );
113
94
  }
@@ -1,4 +1,6 @@
1
- import { KeyboardDateTimePicker } from '@material-ui/pickers';
1
+ import { useState } from 'react';
2
+ import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
3
+ import dayjs, { Dayjs } from 'dayjs';
2
4
 
3
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
4
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
@@ -15,21 +17,9 @@ export default function DateTime(props: DateTimeProps) {
15
17
  const TextInput = getComponentFromMap('TextInput');
16
18
  const FieldValueList = getComponentFromMap('FieldValueList');
17
19
 
18
- const {
19
- getPConnect,
20
- label,
21
- required,
22
- disabled,
23
- value = '',
24
- validatemessage,
25
- status,
26
- onChange,
27
- readOnly,
28
- testId,
29
- helperText,
30
- displayMode,
31
- hideLabel
32
- } = props;
20
+ const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;
21
+
22
+ const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(value) : null);
33
23
 
34
24
  const pConn = getPConnect();
35
25
  const actions = pConn.getActionsApi();
@@ -64,11 +54,7 @@ export default function DateTime(props: DateTimeProps) {
64
54
  }
65
55
 
66
56
  const handleChange = date => {
67
- const changeValue = date && date.isValid() ? date.toISOString() : null;
68
- onChange({ value: changeValue });
69
- };
70
-
71
- const handleAccept = date => {
57
+ setDateValue(date);
72
58
  const changeValue = date && date.isValid() ? date.toISOString() : null;
73
59
  handleEvent(actions, 'changeNblur', propName, changeValue);
74
60
  };
@@ -79,25 +65,27 @@ export default function DateTime(props: DateTimeProps) {
79
65
  //
80
66
 
81
67
  return (
82
- <KeyboardDateTimePicker
83
- variant='inline'
84
- inputVariant='outlined'
85
- fullWidth
86
- autoOk
87
- required={required}
68
+ <DateTimePicker
69
+ // fullWidth
70
+ // autoOk
88
71
  disabled={disabled}
89
- placeholder={`${dateFormatInfo.dateFormatStringLC} hh:mm a`}
90
72
  format={`${dateFormatInfo.dateFormatString} hh:mm a`}
91
- mask={`${dateFormatInfo.dateFormatMask} __:__ _m`}
73
+ // mask={`${dateFormatInfo.dateFormatMask} __:__ _m`}
92
74
  minutesStep={5}
93
- error={status === 'error'}
94
- helperText={helperTextToDisplay}
95
- size='small'
96
75
  label={label}
97
- value={value || null}
76
+ value={dateValue}
98
77
  onChange={handleChange}
99
- onAccept={handleAccept}
100
78
  data-test-id={testId}
79
+ slotProps={{
80
+ textField: {
81
+ variant: 'outlined',
82
+ required,
83
+ placeholder: `${dateFormatInfo.dateFormatStringLC} hh:mm a`,
84
+ error: status === 'error',
85
+ helperText: helperTextToDisplay,
86
+ size: 'small'
87
+ }
88
+ }}
101
89
  />
102
90
  );
103
91
  }
@@ -1,5 +1,5 @@
1
- import { TextField } from '@material-ui/core';
2
1
  import { NumericFormat } from 'react-number-format';
2
+ import { TextField } from '@mui/material';
3
3
  import { useState } from 'react';
4
4
  import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils';
5
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useState } from 'react';
2
- import { TextField } from '@material-ui/core';
3
- import MenuItem from '@material-ui/core/MenuItem';
2
+ import { TextField } from '@mui/material';
3
+ import MenuItem from '@mui/material/MenuItem';
4
4
  import isDeepEqual from 'fast-deep-equal/react';
5
5
  import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
6
6
  import { getDataPage } from '@pega/react-sdk-components/lib/components/helpers/data_page';
@@ -1,5 +1,5 @@
1
- import { InputAdornment, TextField } from '@material-ui/core';
2
- import MailOutlineIcon from '@material-ui/icons/MailOutline';
1
+ import { InputAdornment, TextField } from '@mui/material';
2
+ import MailOutlineIcon from '@mui/icons-material/MailOutline';
3
3
 
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, useMemo } from 'react';
2
- import { Grid } from '@material-ui/core';
2
+ import { Grid } from '@mui/material';
3
3
  import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
4
4
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
@@ -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,15 +1,9 @@
1
- import { Checkbox, TextField } from '@material-ui/core';
2
- import Autocomplete from '@material-ui/lab/Autocomplete';
3
- import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';
4
- import CheckBoxIcon from '@material-ui/icons/CheckBox';
5
1
  import { useEffect, useMemo, useRef, useState } from 'react';
2
+ import { Autocomplete, TextField } from '@mui/material';
6
3
  import { doSearch, getDisplayFieldsMetaData, useDeepMemo, preProcessColumns, getGroupDataForItemsTree } from './utils';
7
4
  import { insertInstruction, deleteInstruction } from '@pega/react-sdk-components/lib/components/helpers/instructions-utils';
8
5
  import { debounce } from 'throttle-debounce';
9
6
 
10
- const icon = <CheckBoxOutlineBlankIcon fontSize='small' />;
11
- const checkedIcon = <CheckBoxIcon fontSize='small' />;
12
-
13
7
  export default function Multiselect(props) {
14
8
  const {
15
9
  getPConnect,
@@ -226,16 +220,16 @@ export default function Multiselect(props) {
226
220
  fullWidth
227
221
  options={itemsTree}
228
222
  disableCloseOnSelect
229
- getOptionSelected={(option: any, val: any) => option?.primary === val?.primary}
223
+ // getOptionSelected={(option: any, val: any) => option?.primary === val?.primary}
230
224
  getOptionLabel={(option: any) => option?.primary}
231
225
  onChange={handleChange}
232
226
  value={selectedItems}
233
- renderOption={(option: any, { selected }) => (
234
- <>
235
- <Checkbox icon={icon} checkedIcon={checkedIcon} style={{ marginRight: 8 }} checked={selected} />
236
- {option.primary}
237
- </>
238
- )}
227
+ // renderOption={(_props, option: any, { selected }) => (
228
+ // <>
229
+ // <Checkbox icon={icon} checkedIcon={checkedIcon} style={{ marginRight: 8 }} checked={selected} />
230
+ // {option.primary}
231
+ // </>
232
+ // )}
239
233
  renderInput={params => (
240
234
  <TextField {...params} variant='outlined' fullWidth label={label} placeholder={placeholder} size='small' onChange={onSearchHandler} />
241
235
  )}
@@ -1,6 +1,6 @@
1
- import { TextField } from '@material-ui/core';
2
- import { NumericFormat } from 'react-number-format';
3
1
  import { useState } from 'react';
2
+ import { NumericFormat } from 'react-number-format';
3
+ import { TextField } from '@mui/material';
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
  import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-components/lib/components/field/Currency/currency-utils';
@@ -1,5 +1,5 @@
1
- import MuiPhoneNumber from 'material-ui-phone-number';
2
1
  import { useEffect, useState } from 'react';
2
+ import MuiPhoneNumber from 'material-ui-phone-number-2';
3
3
 
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
5
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -1,5 +1,5 @@
1
1
  import { useState, useEffect } from 'react';
2
- import { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@material-ui/core';
2
+ import { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@mui/material';
3
3
 
4
4
  import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
5
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
@@ -91,7 +91,7 @@ export default function RadioButtons(props: RadioButtonsProps) {
91
91
  };
92
92
 
93
93
  return (
94
- <FormControl error={status === 'error'} required={required}>
94
+ <FormControl variant='standard' error={status === 'error'} required={required}>
95
95
  <FormLabel component='legend'>{label}</FormLabel>
96
96
  <RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>
97
97
  {theOptions.map(theOption => {
@@ -1,6 +1,6 @@
1
- import Typography from '@material-ui/core/Typography';
2
- import Grid from '@material-ui/core/Grid';
3
- import { makeStyles } from '@material-ui/core/styles';
1
+ import Typography from '@mui/material/Typography';
2
+ import Grid from '@mui/material/Grid';
3
+ import makeStyles from '@mui/styles/makeStyles';
4
4
 
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
6
  import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
@@ -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,4 +1,4 @@
1
- import { Typography } from '@material-ui/core';
1
+ import { Typography } from '@mui/material';
2
2
 
3
3
  import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { useState, useEffect } from 'react';
2
- import { TextField } from '@material-ui/core';
2
+ import { TextField } from '@mui/material';
3
3
 
4
4
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';