@pega/react-sdk-overrides 0.24.4 → 0.25.2

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 (139) 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 -2
  4. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +59 -32
  5. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +4 -4
  6. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +5 -5
  7. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +4 -4
  8. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +6 -6
  9. package/lib/designSystemExtension/Operator/Operator.tsx +16 -12
  10. package/lib/designSystemExtension/Pulse/Pulse.tsx +3 -3
  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 +5 -5
  14. package/lib/field/CancelAlert/CancelAlert.tsx +5 -8
  15. package/lib/field/Checkbox/Checkbox.tsx +5 -5
  16. package/lib/field/Currency/Currency.tsx +12 -9
  17. package/lib/field/Date/Date.tsx +29 -48
  18. package/lib/field/DateTime/DateTime.tsx +37 -39
  19. package/lib/field/Decimal/Decimal.tsx +12 -9
  20. package/lib/field/Dropdown/Dropdown.tsx +34 -27
  21. package/lib/field/Email/Email.tsx +39 -20
  22. package/lib/field/Group/Group.tsx +4 -4
  23. package/lib/field/Integer/Integer.tsx +27 -15
  24. package/lib/field/Multiselect/Multiselect.tsx +8 -14
  25. package/lib/field/Multiselect/utils.ts +1 -1
  26. package/lib/field/Percentage/Percentage.tsx +11 -11
  27. package/lib/field/Phone/Phone.tsx +13 -10
  28. package/lib/field/Phone/config-ext.json +8 -0
  29. package/lib/field/RadioButtons/RadioButtons.tsx +4 -7
  30. package/lib/field/RichText/RichText.tsx +2 -2
  31. package/lib/field/RichText/config-ext.json +10 -0
  32. package/lib/field/ScalarList/ScalarList.tsx +4 -5
  33. package/lib/field/SemanticLink/SemanticLink.tsx +5 -5
  34. package/lib/field/TextArea/TextArea.tsx +30 -14
  35. package/lib/field/TextContent/TextContent.tsx +2 -2
  36. package/lib/field/TextInput/TextInput.tsx +7 -9
  37. package/lib/field/Time/Time.tsx +30 -27
  38. package/lib/field/URL/URL.tsx +29 -12
  39. package/lib/field/UserReference/UserReference.tsx +4 -6
  40. package/lib/helpers/common-utils.ts +24 -1
  41. package/lib/helpers/field-group-utils.ts +3 -3
  42. package/lib/helpers/formatters/Currency.ts +11 -16
  43. package/lib/helpers/formatters/common.ts +2 -1
  44. package/lib/helpers/formatters/index.ts +2 -4
  45. package/lib/helpers/simpleTableHelpers.ts +1 -1
  46. package/lib/infra/ActionButtons/ActionButtons.tsx +3 -3
  47. package/lib/infra/Assignment/Assignment.tsx +14 -14
  48. package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
  49. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +17 -29
  50. package/lib/infra/Containers/FlowContainer/helpers.ts +1 -5
  51. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +10 -5
  52. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +9 -9
  53. package/lib/infra/Containers/SimpleView/helper.ts +1 -1
  54. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +2 -2
  55. package/lib/infra/DashboardFilter/DashboardFilter.tsx +6 -8
  56. package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
  57. package/lib/infra/DeferLoad/DeferLoad.tsx +9 -9
  58. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -1
  59. package/lib/infra/MultiStep/MultiStep.tsx +17 -16
  60. package/lib/infra/NavBar/NavBar.css +1 -0
  61. package/lib/infra/NavBar/NavBar.tsx +49 -38
  62. package/lib/infra/Reference/Reference.tsx +1 -1
  63. package/lib/infra/Region/Region.tsx +1 -1
  64. package/lib/infra/RootContainer/RootContainer.tsx +7 -8
  65. package/lib/infra/Stages/Stages.tsx +5 -5
  66. package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +4 -3
  67. package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +2 -2
  68. package/lib/infra/View/View.tsx +38 -4
  69. package/lib/template/AdvancedSearch/AdvancedSearch.tsx +87 -0
  70. package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +58 -0
  71. package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +245 -0
  72. package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
  73. package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
  74. package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
  75. package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
  76. package/lib/template/AdvancedSearch/config-ext.json +9 -0
  77. package/lib/template/AdvancedSearch/index.tsx +1 -0
  78. package/lib/template/AppShell/AppShell.tsx +62 -12
  79. package/lib/template/BannerPage/BannerPage.tsx +2 -2
  80. package/lib/template/BannerPage/config-ext.json +9 -0
  81. package/lib/template/CaseSummary/CaseSummary.tsx +2 -2
  82. package/lib/template/CaseView/CaseView.tsx +12 -11
  83. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +8 -8
  84. package/lib/template/Confirmation/Confirmation.tsx +5 -4
  85. package/lib/template/DataReference/DataReference.tsx +318 -108
  86. package/lib/template/DataReference/DataReferenceAdvancedSearchContext.js +10 -0
  87. package/lib/template/DataReference/SearchForm.tsx +148 -0
  88. package/lib/template/DataReference/utils.js +90 -0
  89. package/lib/template/DefaultForm/DefaultForm.tsx +2 -2
  90. package/lib/template/DefaultForm/utils/index.ts +1 -3
  91. package/lib/template/Details/Details/Details.tsx +3 -3
  92. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +5 -5
  93. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +3 -3
  94. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +3 -3
  95. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +5 -5
  96. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +11 -6
  97. package/lib/template/InlineDashboard/InlineDashboard.tsx +4 -4
  98. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
  99. package/lib/template/InlineDashboardPage/config-ext.json +9 -0
  100. package/lib/template/ListPage/ListPage.tsx +1 -1
  101. package/lib/template/ListView/ListView.tsx +201 -95
  102. package/lib/template/ListView/utils.ts +38 -6
  103. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  104. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +2 -2
  105. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +3 -3
  106. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
  107. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
  108. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +4 -4
  109. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
  110. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
  111. package/lib/template/PromotedFilters/PromotedFilters.tsx +2 -3
  112. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +1 -3
  113. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +112 -88
  114. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
  115. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
  116. package/lib/template/SubTabs/SubTabs.tsx +4 -4
  117. package/lib/template/SubTabs/tabUtils.ts +118 -1
  118. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +10 -10
  119. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
  120. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +10 -10
  121. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +2 -2
  122. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +3 -3
  123. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
  124. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
  125. package/lib/template/WssNavBar/WssNavBar.tsx +10 -10
  126. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +3 -3
  127. package/lib/widget/Attachment/Attachment.css +1 -0
  128. package/lib/widget/Attachment/Attachment.tsx +8 -10
  129. package/lib/widget/CaseHistory/CaseHistory.tsx +13 -11
  130. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +2 -2
  131. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +6 -5
  132. package/lib/widget/Followers/Followers.tsx +4 -4
  133. package/lib/widget/QuickCreate/QuickCreate.tsx +1 -2
  134. package/lib/widget/QuickCreate/config-ext.json +9 -0
  135. package/lib/widget/SummaryItem/SummaryItem.tsx +5 -4
  136. package/lib/widget/SummaryList/SummaryList.tsx +1 -1
  137. package/lib/widget/ToDo/ToDo.tsx +102 -40
  138. package/package.json +1 -1
  139. /package/lib/infra/Containers/{helpers.ts → container-helpers.ts} +0 -0
@@ -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.
@@ -7,12 +7,10 @@
7
7
  font-weight: bold;
8
8
  line-height: calc(0.5rem * 2.5);
9
9
  height: calc(0.5rem * 2.5);
10
- padding: 0 0.5rem;
11
10
  text-transform: uppercase;
12
11
  }
13
12
 
14
13
  .psdk-case-summary-fields {
15
14
  padding: calc(2 * 0.5rem);
16
- display: grid;
17
15
  grid-row-gap: calc(2 * 0.5rem);
18
16
  }
@@ -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,11 +43,14 @@ 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
- InputProps={{
49
- readOnly: true,
50
- disableUnderline: true
49
+ slotProps={{
50
+ input: {
51
+ readOnly: true,
52
+ disableUnderline: true
53
+ }
51
54
  }}
52
55
  />
53
56
  );
@@ -61,11 +64,14 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
61
64
  case 'dropdown':
62
65
  return (
63
66
  <TextField
67
+ variant='standard'
64
68
  value={field.config.value}
65
69
  label={field.config.label}
66
- InputProps={{
67
- readOnly: true,
68
- disableUnderline: true
70
+ slotProps={{
71
+ input: {
72
+ readOnly: true,
73
+ disableUnderline: true
74
+ }
69
75
  }}
70
76
  />
71
77
  );
@@ -77,11 +83,14 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
77
83
 
78
84
  return (
79
85
  <TextField
86
+ variant='standard'
80
87
  value={fieldValue}
81
88
  label={fieldLabel}
82
- InputProps={{
83
- readOnly: true,
84
- disableUnderline: true
89
+ slotProps={{
90
+ input: {
91
+ readOnly: true,
92
+ disableUnderline: true
93
+ }
85
94
  }}
86
95
  />
87
96
  );
@@ -90,12 +99,15 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
90
99
  case 'status':
91
100
  return (
92
101
  <TextField
102
+ variant='standard'
93
103
  className='psdk-csf-status-style'
94
104
  value={field.config.value}
95
105
  label={field.config.label}
96
- InputProps={{
97
- readOnly: true,
98
- disableUnderline: true
106
+ slotProps={{
107
+ input: {
108
+ readOnly: true,
109
+ disableUnderline: true
110
+ }
99
111
  }}
100
112
  />
101
113
  );
@@ -105,13 +117,16 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
105
117
  return (
106
118
  <a href={`tel:${displayPhone}`}>
107
119
  <TextField
120
+ variant='standard'
108
121
  value={field.config.value}
109
122
  label={field.config.label}
110
- InputProps={{
111
- readOnly: true,
112
- inputProps: {
113
- style: { cursor: 'pointer' },
114
- disableUnderline: true
123
+ slotProps={{
124
+ input: {
125
+ readOnly: true,
126
+ inputProps: {
127
+ style: { cursor: 'pointer' },
128
+ disableUnderline: true
129
+ }
115
130
  }
116
131
  }}
117
132
  />
@@ -124,12 +139,15 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
124
139
  return (
125
140
  <a href={`mailto:${displayEmail}`}>
126
141
  <TextField
142
+ variant='standard'
127
143
  value={field.config.value}
128
144
  label={field.config.label}
129
- InputProps={{
130
- readOnly: true,
131
- disableUnderline: true,
132
- inputProps: { style: { cursor: 'pointer' } }
145
+ slotProps={{
146
+ input: {
147
+ readOnly: true,
148
+ disableUnderline: true,
149
+ inputProps: { style: { cursor: 'pointer' } }
150
+ }
133
151
  }}
134
152
  />
135
153
  </a>
@@ -145,13 +163,16 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
145
163
 
146
164
  return (
147
165
  <TextField
166
+ variant='standard'
148
167
  value={format(field.config.value, field.type, {
149
168
  format: theFormat
150
169
  })}
151
170
  label={field.config.label}
152
- InputProps={{
153
- readOnly: true,
154
- disableUnderline: true
171
+ slotProps={{
172
+ input: {
173
+ readOnly: true,
174
+ disableUnderline: true
175
+ }
155
176
  }}
156
177
  />
157
178
  );
@@ -161,11 +182,14 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
161
182
  const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);
162
183
  return (
163
184
  <TextField
185
+ variant='standard'
164
186
  value={format(field.config.value, field.type, theCurrencyOptions)}
165
187
  label={field.config.label}
166
- InputProps={{
167
- readOnly: true,
168
- disableUnderline: true
188
+ slotProps={{
189
+ input: {
190
+ readOnly: true,
191
+ disableUnderline: true
192
+ }
169
193
  }}
170
194
  />
171
195
  );
@@ -175,11 +199,14 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
175
199
  case 'userreference':
176
200
  return (
177
201
  <TextField
202
+ variant='standard'
178
203
  value={format(field.config.value, field.type)}
179
204
  label={field.config.label}
180
- InputProps={{
181
- readOnly: true,
182
- disableUnderline: true
205
+ slotProps={{
206
+ input: {
207
+ readOnly: true,
208
+ disableUnderline: true
209
+ }
183
210
  }}
184
211
  />
185
212
  );
@@ -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';
@@ -48,7 +48,7 @@ export default function DetailsFields(props: DetailsFieldsProps) {
48
48
  const { label } = thePConn.getConfigProps();
49
49
  const configObj = thePConn?.getReferencedView();
50
50
  configObj.config.readOnly = true;
51
- configObj.config.displayMode = 'LABELS_LEFT';
51
+ configObj.config.displayMode = 'DISPLAY_ONLY';
52
52
  const propToUse = { ...thePConn.getInheritedProps() };
53
53
  configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;
54
54
  fieldComponents.push({
@@ -1,8 +1,8 @@
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';
1
+ import { type PropsWithChildren, useState } from 'react';
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
@@ -51,7 +51,7 @@ export default function FieldValueList(props: FieldValueListProps) {
51
51
 
52
52
  function getGridItemLabel() {
53
53
  return (
54
- <Grid item xs={variant === 'stacked' ? 12 : 6} className={variant === 'stacked' ? classes.noPaddingBottom : ''}>
54
+ <Grid item xs={variant === 'stacked' ? 12 : 4} className={variant === 'stacked' ? classes.noPaddingBottom : ''}>
55
55
  <Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>
56
56
  {name}
57
57
  </Typography>
@@ -63,7 +63,7 @@ export default function FieldValueList(props: FieldValueListProps) {
63
63
  const formattedValue = formatItemValue(value);
64
64
 
65
65
  return (
66
- <Grid item xs={variant === 'stacked' ? 12 : 6} className={variant === 'stacked' ? classes.noPaddingTop : ''}>
66
+ <Grid item xs={variant === 'stacked' || !name ? 12 : 8} className={variant === 'stacked' ? classes.noPaddingTop : ''}>
67
67
  {isHtml ? (
68
68
  // eslint-disable-next-line react/no-danger
69
69
  <div dangerouslySetInnerHTML={{ __html: formattedValue }} />
@@ -78,7 +78,7 @@ export default function FieldValueList(props: FieldValueListProps) {
78
78
 
79
79
  return (
80
80
  <Grid container spacing={4} justifyContent='space-between'>
81
- {getGridItemLabel()}
81
+ {name ? getGridItemLabel() : null}
82
82
  {getGridItemValue()}
83
83
  </Grid>
84
84
  );
@@ -1,12 +1,12 @@
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
- import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
+ import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
10
 
11
11
  // Operator is one of the few components that does NOT have getPConnect.
12
12
  // So, no need to extend PConnProps
@@ -189,18 +189,20 @@ 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}
195
- InputProps={{
196
- readOnly: true,
197
- disableUnderline: true,
198
- inputProps: { style: { cursor: 'pointer' } }
196
+ slotProps={{
197
+ input: {
198
+ readOnly: true,
199
+ disableUnderline: true,
200
+ inputProps: { style: { cursor: 'pointer' } }
201
+ }
199
202
  }}
200
203
  />
201
204
  <br />
202
205
  {Utils.generateDateTime(caseTime, 'DateTime-Since')}
203
-
204
206
  <Popover
205
207
  id={popoverId}
206
208
  open={popoverOpen}
@@ -208,7 +210,9 @@ export default function Operator(props: OperatorProps) {
208
210
  onClose={handlePopoverClose}
209
211
  anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
210
212
  transformOrigin={{ vertical: 'top', horizontal: 'center' }}
211
- PaperProps={{ style: { maxWidth: '45ch' } }}
213
+ slotProps={{
214
+ paper: { style: { maxWidth: '45ch' } }
215
+ }}
212
216
  >
213
217
  {getPopoverGrid()}
214
218
  </Popover>
@@ -1,6 +1,6 @@
1
- import { PropsWithChildren } from 'react';
2
- import { Card, CardContent, CardHeader, Typography } from '@material-ui/core';
3
- import { makeStyles } from '@material-ui/core/styles';
1
+ import type { PropsWithChildren } from 'react';
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,13 +1,13 @@
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';
7
7
  import { getDataPage } from '@pega/react-sdk-components/lib/components/helpers/data_page';
8
8
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
9
9
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
10
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
11
11
 
12
12
  interface IOption {
13
13
  key: string;
@@ -150,7 +150,7 @@ export default function AutoComplete(props: AutoCompleteProps) {
150
150
  }
151
151
  }, []);
152
152
 
153
- if (displayMode === 'LABELS_LEFT') {
153
+ if (displayMode === 'DISPLAY_ONLY') {
154
154
  return <FieldValueList name={hideLabel ? '' : label} value={value} />;
155
155
  }
156
156
 
@@ -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,8 +1,8 @@
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
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
  import './CancelAlert.css';
7
7
 
8
8
  interface CancelAlertProps extends PConnFieldProps {
@@ -58,14 +58,12 @@ export default function CancelAlert(props: CancelAlertProps) {
58
58
  function cancelHandler() {
59
59
  if (isReverseCoexistence) {
60
60
  dismiss(true);
61
- // @ts-ignore - An argument for 'payload' was not provided.
62
61
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD);
63
62
  } else if (!isDataObject && !isLocalAction && !isBulkAction) {
64
63
  disableButton(btnIds.DELETE);
65
64
  actionsAPI
66
65
  .deleteCaseInCreateStage(containerItemID, hideDelete)
67
66
  .then(() => {
68
- // @ts-ignore - An argument for 'payload' was not provided.
69
67
  PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);
70
68
  })
71
69
  .catch(() => {
@@ -78,18 +76,17 @@ export default function CancelAlert(props: CancelAlertProps) {
78
76
  });
79
77
  } else if (isLocalAction) {
80
78
  dismiss(true);
81
- actionsAPI.cancelAssignment(containerItemID);
79
+ actionsAPI.cancelAssignment(containerItemID, false);
82
80
  } else if (isBulkAction) {
83
81
  dismiss(true);
84
82
  actionsAPI.cancelBulkAction(containerItemID);
85
83
  } else {
86
84
  dismiss(true);
87
- // @ts-ignore - Argument of type '{ containerItemID: string; skipReleaseLockRequest: any; }' is not assignable to parameter of type 'ContainerInfo'.
88
85
  containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });
89
86
  }
90
87
  }
91
88
 
92
- function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {
89
+ function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {
93
90
  if (reason === 'clickaway') {
94
91
  return;
95
92
  }
@@ -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
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
- import { makeStyles } from '@material-ui/core/styles';
9
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
10
 
11
11
  interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
12
12
  // If any, enter additional props that only exist on Checkbox here
@@ -77,7 +77,7 @@ export default function CheckboxComponent(props: CheckboxProps) {
77
77
  }
78
78
  }, [thePConn]);
79
79
 
80
- if (displayMode === 'LABELS_LEFT') {
80
+ if (displayMode === 'DISPLAY_ONLY') {
81
81
  return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;
82
82
  }
83
83
 
@@ -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,8 +1,8 @@
1
- import { TextField } from '@material-ui/core';
2
- import { useState } from 'react';
1
+ import { useEffect, 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
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
7
7
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
8
8
  import { getCurrencyCharacters, getCurrencyOptions } from './currency-utils';
@@ -45,9 +45,11 @@ export default function Currency(props: CurrrencyProps) {
45
45
  const helperTextToDisplay = validatemessage || helperText;
46
46
  const [values, setValues] = useState(value.toString());
47
47
 
48
- const testProp = {
49
- 'data-test-id': testId
50
- };
48
+ const testProps: any = { 'data-test-id': testId };
49
+
50
+ useEffect(() => {
51
+ setValues(value.toString());
52
+ }, [value]);
51
53
 
52
54
  // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
53
55
  const theSymbols = getCurrencyCharacters(currencyISOCode);
@@ -56,7 +58,7 @@ export default function Currency(props: CurrrencyProps) {
56
58
  const theCurrSep = theSymbols.theDigitGroupSeparator;
57
59
 
58
60
  const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
59
- const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
61
+ const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
60
62
 
61
63
  let readOnlyProp = {}; // Note: empty if NOT ReadOnly
62
64
 
@@ -67,7 +69,7 @@ export default function Currency(props: CurrrencyProps) {
67
69
  let currencyProp = {};
68
70
  currencyProp = { prefix: theCurrSym, decimalSeparator: theCurrDec, thousandSeparator: theCurrSep };
69
71
 
70
- if (displayMode === 'LABELS_LEFT') {
72
+ if (displayMode === 'DISPLAY_ONLY') {
71
73
  return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;
72
74
  }
73
75
 
@@ -86,6 +88,7 @@ export default function Currency(props: CurrrencyProps) {
86
88
  return (
87
89
  <NumericFormat
88
90
  valueIsNumericString
91
+ variant={readOnly ? 'standard' : 'outlined'}
89
92
  label={label}
90
93
  helperText={helperTextToDisplay}
91
94
  placeholder={placeholder ?? ''}
@@ -101,7 +104,7 @@ export default function Currency(props: CurrrencyProps) {
101
104
  {...currencyProp}
102
105
  decimalScale={allowDecimals !== false ? 2 : 0}
103
106
  fixedDecimalScale={allowDecimals}
104
- InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}
107
+ slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}
105
108
  customInput={TextField}
106
109
  />
107
110
  );