Skip to content

Commit f79c94b

Browse files
committed
chore: update dependencies and improve component code
1 parent ebdd588 commit f79c94b

File tree

26 files changed

+1341
-1383
lines changed

26 files changed

+1341
-1383
lines changed

package-lock.json

Lines changed: 1157 additions & 1184 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,76 +51,77 @@
5151
"license": "SEE LICENSE IN LICENSE",
5252
"dependencies": {
5353
"@emotion/react": "^11.14.0",
54-
"@emotion/styled": "^11.14.0",
55-
"@mui/icons-material": "^6.4.11",
56-
"@mui/lab": "^6.0.1-beta.34",
57-
"@mui/material": "^6.4.11",
58-
"@mui/styles": "^6.4.8",
59-
"@mui/x-date-pickers": "^7.29.3",
60-
"@pega/auth": "~0.2.24",
61-
"@tinymce/tinymce-react": "^5.1.1",
54+
"@emotion/styled": "^11.14.1",
55+
"@mui/icons-material": "^6.5.0",
56+
"@mui/lab": "^6.0.1-beta.36",
57+
"@mui/material": "^6.5.0",
58+
"@mui/styles": "^6.5.0",
59+
"@mui/x-date-pickers": "^7.29.4",
60+
"@pega/auth": "~0.2.30",
61+
"@tinymce/tinymce-react": "^6.3.0",
6262
"clsx": "^2.1.1",
6363
"dayjs": "^1.11.13",
6464
"downloadjs": "^1.4.7",
6565
"fast-deep-equal": "^3.1.3",
6666
"lodash.difference": "^4.5.0",
67-
"mui-tel-input": "^6.0.1",
67+
"mui-tel-input": "^8.0.1",
6868
"react": "^18.3.1",
69-
"react-datepicker": "^4.25.0",
69+
"react-datepicker": "^8.4.0",
7070
"react-dom": "^18.3.1",
7171
"react-number-format": "^5.4.4",
7272
"react-redux": "^9.2.0",
73-
"react-router-dom": "^7.6.0",
73+
"react-router": "^7.8.0",
7474
"throttle-debounce": "^5.0.2"
7575
},
7676
"devDependencies": {
7777
"@pega/configs": "^0.16.3",
78-
"@pega/constellationjs": "~0.242.5",
79-
"@pega/eslint-config": "^0.16.3",
80-
"@pega/pcore-pconnect-typedefs": "~3.2.1",
81-
"@pega/tsconfig": "^0.16.3",
82-
"@playwright/test": "^1.52.0",
78+
"@pega/constellationjs": "~24.2.2",
79+
"@pega/eslint-config": "^0.17.0",
80+
"@pega/pcore-pconnect-typedefs": "~3.2.2",
81+
"@pega/tsconfig": "^0.17.0",
82+
"@playwright/test": "^1.54.2",
8383
"@testing-library/jest-dom": "^5.17.0",
8484
"@testing-library/react": "^14.1.2",
85-
"@types/jest": "^29.5.14",
86-
"@types/react": "^18.3.21",
85+
"@types/jest": "^30.0.0",
86+
"@types/react": "^18.3.23",
87+
"@types/react-dom": "^18.3.7",
8788
"@typescript-eslint/eslint-plugin": "^5.62.0",
8889
"babel-loader": "^10.0.0",
8990
"commitlint": "^18.4.4",
9091
"compression-webpack-plugin": "^11.1.0",
91-
"copy-webpack-plugin": "^13.0.0",
92+
"copy-webpack-plugin": "^13.0.1",
9293
"cspell": "^8.3.2",
9394
"css-loader": "^7.1.2",
9495
"eslint": "^8.56.0",
95-
"eslint-plugin-import": "^2.31.0",
96+
"eslint-plugin-import": "^2.32.0",
9697
"eslint-plugin-jest": "^27.6.2",
9798
"eslint-plugin-jsx-a11y": "^6.10.2",
98-
"eslint-plugin-prettier": "^5.4.0",
99+
"eslint-plugin-prettier": "^5.5.4",
99100
"eslint-plugin-react": "^7.37.5",
100101
"eslint-plugin-react-hooks": "^4.6.0",
101102
"eslint-plugin-sonarjs": "^0.23.0",
102-
"html-webpack-plugin": "^5.6.3",
103+
"html-webpack-plugin": "^5.6.4",
103104
"http-server": "^14.1.1",
104105
"istanbul": "^0.4.5",
105106
"jest": "^29.7.0",
106107
"jest-environment-jsdom": "^29.7.0",
107108
"json5": ">=2.2.3",
108-
"monocart-reporter": "^2.9.19",
109+
"monocart-reporter": "^2.9.21",
109110
"npm-run-all": "^4.1.5",
110111
"null-loader": "^4.0.1",
111-
"prettier": "^3.5.3",
112+
"prettier": "^3.6.2",
112113
"prop-types": "^15.8.1",
113114
"replace-in-file": "^7.2.0",
114-
"sass-loader": "^14.2.1",
115+
"sass-loader": "^16.0.5",
115116
"shx": "^0.4.0",
116117
"style-loader": "^4.0.0",
117-
"stylelint": "^16.19.1",
118-
"tinymce": "^7.8.0",
119-
"ts-jest": "^29.3.2",
118+
"stylelint": "^16.23.1",
119+
"tinymce": "^6.8.6",
120+
"ts-jest": "^29.4.1",
120121
"ts-loader": "^9.5.2",
121-
"typescript": "^5.8.3",
122-
"webpack": "^5.99.8",
122+
"typescript": "^5.9.2",
123+
"webpack": "^5.101.2",
123124
"webpack-cli": "^6.0.1",
124-
"webpack-dev-server": "^5.2.1"
125+
"webpack-dev-server": "^5.2.2"
125126
}
126127
}

packages/react-sdk-components/src/bridge/react_pconnect.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-classes-per-file */
21
import { Component, createElement } from 'react';
32
import PropTypes from 'prop-types';
43
import { connect, shallowEqual } from 'react-redux';

packages/react-sdk-components/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
font-weight: bold;
88
line-height: calc(0.5rem * 2.5);
99
height: calc(0.5rem * 2.5);
10-
padding: 0 0.5rem;
1110
text-transform: uppercase;
1211
}
1312

packages/react-sdk-components/src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
4646
variant='standard'
4747
value='---'
4848
label={field.config.label}
49-
InputProps={{
50-
readOnly: true,
51-
disableUnderline: true
49+
slotProps={{
50+
input: {
51+
readOnly: true,
52+
disableUnderline: true
53+
}
5254
}}
5355
/>
5456
);
@@ -65,9 +67,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
6567
variant='standard'
6668
value={field.config.value}
6769
label={field.config.label}
68-
InputProps={{
69-
readOnly: true,
70-
disableUnderline: true
70+
slotProps={{
71+
input: {
72+
readOnly: true,
73+
disableUnderline: true
74+
}
7175
}}
7276
/>
7377
);
@@ -82,9 +86,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
8286
variant='standard'
8387
value={fieldValue}
8488
label={fieldLabel}
85-
InputProps={{
86-
readOnly: true,
87-
disableUnderline: true
89+
slotProps={{
90+
input: {
91+
readOnly: true,
92+
disableUnderline: true
93+
}
8894
}}
8995
/>
9096
);
@@ -97,9 +103,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
97103
className='psdk-csf-status-style'
98104
value={field.config.value}
99105
label={field.config.label}
100-
InputProps={{
101-
readOnly: true,
102-
disableUnderline: true
106+
slotProps={{
107+
input: {
108+
readOnly: true,
109+
disableUnderline: true
110+
}
103111
}}
104112
/>
105113
);
@@ -112,11 +120,13 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
112120
variant='standard'
113121
value={field.config.value}
114122
label={field.config.label}
115-
InputProps={{
116-
readOnly: true,
117-
inputProps: {
118-
style: { cursor: 'pointer' },
119-
disableUnderline: true
123+
slotProps={{
124+
input: {
125+
readOnly: true,
126+
inputProps: {
127+
style: { cursor: 'pointer' },
128+
disableUnderline: true
129+
}
120130
}
121131
}}
122132
/>
@@ -132,10 +142,12 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
132142
variant='standard'
133143
value={field.config.value}
134144
label={field.config.label}
135-
InputProps={{
136-
readOnly: true,
137-
disableUnderline: true,
138-
inputProps: { style: { cursor: 'pointer' } }
145+
slotProps={{
146+
input: {
147+
readOnly: true,
148+
disableUnderline: true,
149+
inputProps: { style: { cursor: 'pointer' } }
150+
}
139151
}}
140152
/>
141153
</a>
@@ -156,9 +168,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
156168
format: theFormat
157169
})}
158170
label={field.config.label}
159-
InputProps={{
160-
readOnly: true,
161-
disableUnderline: true
171+
slotProps={{
172+
input: {
173+
readOnly: true,
174+
disableUnderline: true
175+
}
162176
}}
163177
/>
164178
);
@@ -171,9 +185,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
171185
variant='standard'
172186
value={format(field.config.value, field.type, theCurrencyOptions)}
173187
label={field.config.label}
174-
InputProps={{
175-
readOnly: true,
176-
disableUnderline: true
188+
slotProps={{
189+
input: {
190+
readOnly: true,
191+
disableUnderline: true
192+
}
177193
}}
178194
/>
179195
);
@@ -186,9 +202,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
186202
variant='standard'
187203
value={format(field.config.value, field.type)}
188204
label={field.config.label}
189-
InputProps={{
190-
readOnly: true,
191-
disableUnderline: true
205+
slotProps={{
206+
input: {
207+
readOnly: true,
208+
disableUnderline: true
209+
}
192210
}}
193211
/>
194212
);

packages/react-sdk-components/src/components/designSystemExtension/Operator/Operator.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,23 +193,26 @@ export default function Operator(props: OperatorProps) {
193193
defaultValue={caseOpName}
194194
label={caseOpLabel}
195195
onClick={showOperatorDetails}
196-
InputProps={{
197-
readOnly: true,
198-
disableUnderline: true,
199-
inputProps: { style: { cursor: 'pointer' } }
196+
slotProps={{
197+
input: {
198+
readOnly: true,
199+
disableUnderline: true,
200+
inputProps: { style: { cursor: 'pointer' } }
201+
}
200202
}}
201203
/>
202204
<br />
203205
{Utils.generateDateTime(caseTime, 'DateTime-Since')}
204-
205206
<Popover
206207
id={popoverId}
207208
open={popoverOpen}
208209
anchorEl={popoverAnchorEl}
209210
onClose={handlePopoverClose}
210211
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
211212
transformOrigin={{ vertical: 'top', horizontal: 'center' }}
212-
PaperProps={{ style: { maxWidth: '45ch' } }}
213+
slotProps={{
214+
paper: { style: { maxWidth: '45ch' } }
215+
}}
213216
>
214217
{getPopoverGrid()}
215218
</Popover>

packages/react-sdk-components/src/components/field/Currency/Currency.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function Currency(props: CurrrencyProps) {
4545
const helperTextToDisplay = validatemessage || helperText;
4646
const [values, setValues] = useState(value.toString());
4747

48-
const testProp = { 'data-test-id': testId };
48+
const testProps: any = { 'data-test-id': testId };
4949

5050
useEffect(() => {
5151
setValues(value.toString());
@@ -104,7 +104,7 @@ export default function Currency(props: CurrrencyProps) {
104104
{...currencyProp}
105105
decimalScale={allowDecimals !== false ? 2 : 0}
106106
fixedDecimalScale={allowDecimals}
107-
InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}
107+
slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}
108108
customInput={TextField}
109109
/>
110110
);

packages/react-sdk-components/src/components/field/Date/Date.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ export default function Date(props: DateProps) {
6262
return <TextInput {...props} />;
6363
}
6464

65-
let testProp = {};
66-
67-
testProp = {
68-
'data-test-id': testId
69-
};
65+
const testProps: any = { 'data-test-id': testId };
7066

7167
const handleChange = date => {
7268
if (date && date.isValid()) {
@@ -89,7 +85,7 @@ export default function Date(props: DateProps) {
8985
error: status === 'error',
9086
helperText: helperTextToDisplay,
9187
size: 'small',
92-
InputProps: { ...testProp }
88+
InputProps: { ...testProps }
9389
}
9490
}}
9591
onChange={handleChange}

packages/react-sdk-components/src/components/field/DateTime/DateTime.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ export default function DateTime(props: DateTimeProps) {
6060
return <TextInput {...props} value={formattedDateTime} />;
6161
}
6262

63-
let testProp = {};
64-
65-
testProp = {
66-
'data-test-id': testId
67-
};
63+
const testProps: any = { 'data-test-id': testId };
6864

6965
const handleChange = date => {
7066
const timeZoneDateTime = (dayjs as any).tz(date.format('YYYY-MM-DDTHH:mm:ss'), timezone);
@@ -89,7 +85,6 @@ export default function DateTime(props: DateTimeProps) {
8985
label={label}
9086
value={dateValue}
9187
onChange={handleChange}
92-
data-test-id={testId}
9388
slotProps={{
9489
textField: {
9590
variant: 'outlined',
@@ -98,7 +93,7 @@ export default function DateTime(props: DateTimeProps) {
9893
error: status === 'error',
9994
helperText: helperTextToDisplay,
10095
size: 'small',
101-
InputProps: { ...testProp }
96+
InputProps: { ...testProps }
10297
}
10398
}}
10499
/>

packages/react-sdk-components/src/components/field/Decimal/Decimal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ export default function Decimal(props: DecimalProps) {
8383
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;
8484
}
8585

86-
const testProp = {
87-
'data-test-id': testId
88-
};
86+
const testProps: any = { 'data-test-id': testId };
8987

9088
function decimalOnBlur() {
9189
handleEvent(actions, 'changeNblur', propName, values);
@@ -117,7 +115,7 @@ export default function Decimal(props: DecimalProps) {
117115
decimalSeparator={theCurrDec}
118116
thousandSeparator={showGroupSeparators ? theCurrSep : ''}
119117
decimalScale={readOnly && formatter === 'Currency' ? undefined : decimalPrecision}
120-
InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}
118+
slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}
121119
customInput={TextField}
122120
/>
123121
);

0 commit comments

Comments
 (0)