Skip to content

Commit 248a4e8

Browse files
authored
Merge branch 'master' into mod/tor/US-667623
2 parents b1d1f68 + 47ef2a3 commit 248a4e8

File tree

37 files changed

+3360
-5037
lines changed

37 files changed

+3360
-5037
lines changed

package-lock.json

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

package.json

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@
5050
"author": "Pegasystems",
5151
"license": "SEE LICENSE IN LICENSE",
5252
"dependencies": {
53-
"@emotion/react": "^11.13.3",
54-
"@emotion/styled": "^11.13.0",
53+
"@emotion/react": "^11.14.0",
54+
"@emotion/styled": "^11.14.0",
5555
"@mui/icons-material": "^5.16.7",
5656
"@mui/lab": "^5.0.0-alpha.173",
5757
"@mui/material": "^5.16.7",
5858
"@mui/styles": "^5.16.7",
5959
"@mui/x-date-pickers": "^7.20.0",
6060
"@pega/auth": "~0.2.15",
6161
"@tinymce/tinymce-react": "^5.1.1",
62-
"clsx": "^2.1.0",
62+
"clsx": "^2.1.1",
6363
"dayjs": "^1.11.13",
6464
"downloadjs": "^1.4.7",
6565
"fast-deep-equal": "^3.1.3",
@@ -68,21 +68,21 @@
6868
"react": "^17.0.2",
6969
"react-datepicker": "^4.25.0",
7070
"react-dom": "^17.0.2",
71-
"react-number-format": "^5.4.2",
71+
"react-number-format": "^5.4.4",
7272
"react-redux": "^8.1.3",
7373
"react-router-dom": "^6.22.3",
7474
"throttle-debounce": "^5.0.2"
7575
},
7676
"devDependencies": {
7777
"@pega/configs": "^0.7.1",
78-
"@pega/constellationjs": "~0.242.5",
78+
"@pega/constellationjs": "~24.2.1",
7979
"@pega/eslint-config": "^0.7.2",
80-
"@pega/pcore-pconnect-typedefs": "~3.0.0",
80+
"@pega/pcore-pconnect-typedefs": "~3.2.2",
8181
"@pega/tsconfig": "^0.6.0",
82-
"@playwright/test": "^1.40.1",
82+
"@playwright/test": "^1.52.0",
8383
"@testing-library/jest-dom": "^5.17.0",
8484
"@testing-library/react": "^14.1.2",
85-
"@types/jest": "^29.5.11",
85+
"@types/jest": "^29.5.14",
8686
"@types/react": "^17.0.83",
8787
"@typescript-eslint/eslint-plugin": "^5.62.0",
8888
"babel-loader": "^9.1.3",
@@ -92,36 +92,35 @@
9292
"cspell": "^8.3.2",
9393
"css-loader": "^6.9.0",
9494
"eslint": "^8.56.0",
95-
"eslint-plugin-import": "^2.29.1",
95+
"eslint-plugin-import": "^2.31.0",
9696
"eslint-plugin-jest": "^27.6.2",
97-
"eslint-plugin-jsx-a11y": "^6.8.0",
98-
"eslint-plugin-prettier": "^5.1.3",
99-
"eslint-plugin-react": "^7.33.2",
97+
"eslint-plugin-jsx-a11y": "^6.10.2",
98+
"eslint-plugin-prettier": "^5.4.0",
99+
"eslint-plugin-react": "^7.37.5",
100100
"eslint-plugin-react-hooks": "^4.6.0",
101101
"eslint-plugin-sonarjs": "^0.23.0",
102-
"html-webpack-plugin": "^5.6.0",
102+
"html-webpack-plugin": "^5.6.3",
103103
"http-server": "^14.1.1",
104104
"istanbul": "^0.4.5",
105-
"istanbul-instrumenter-loader": "^3.0.1",
106105
"jest": "^29.7.0",
107106
"jest-environment-jsdom": "^29.7.0",
108107
"json5": ">=2.2.3",
109-
"monocart-reporter": "^2.2.1",
108+
"monocart-reporter": "^2.9.19",
110109
"npm-run-all": "^4.1.5",
111110
"null-loader": "^4.0.1",
112-
"prettier": "^3.1.1",
111+
"prettier": "^3.5.3",
113112
"prop-types": "^15.8.1",
114113
"replace-in-file": "^7.1.0",
115114
"sass-loader": "^13.3.3",
116115
"shx": "^0.3.4",
117116
"style-loader": "^3.3.4",
118-
"stylelint": "^16.1.0",
119-
"tinymce": "^7.3.0",
120-
"ts-jest": "^29.1.1",
121-
"ts-loader": "^9.5.1",
117+
"stylelint": "^16.19.1",
118+
"tinymce": "^7.9.0",
119+
"ts-jest": "^29.3.4",
120+
"ts-loader": "^9.5.2",
122121
"typescript": "^4.9.5",
123-
"webpack": "^5.95.0",
122+
"webpack": "^5.99.8",
124123
"webpack-cli": "^5.1.4",
125-
"webpack-dev-server": "^5.1.0"
124+
"webpack-dev-server": "^5.2.1"
126125
}
127126
}

packages/react-sdk-components/src/auth.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// 3) Awaits a message from the host page and when received immediately postMessages back with the code
1111

1212
// For enabling logging via debugger (do not let it be a const...then can't change in debugger)
13-
// eslint-disable-next-line prefer-const
1413
let bDebug = false;
1514

1615
const queryString = window.location.search;
@@ -20,14 +19,12 @@
2019
const error = urlParams.get('error');
2120
const errorDesc = urlParams.get('error_description');
2221
// Silent authentication will work with just regular console.log
23-
// eslint-disable-next-line no-console
2422
let fnLog = console.log;
2523
try {
2624
// Check if in a popup window. If so use main window console.
2725
if (window.opener.console.log) {
2826
fnLog = window.opener.console.log;
2927
}
30-
// eslint-disable-next-line no-empty
3128
} catch (e0) {}
3229
const doLog = arg => {
3330
if (bDebug) {
@@ -44,15 +41,13 @@
4441
if (state) {
4542
embedOrigin = window.atob(state.split('.')[0]);
4643
}
47-
// eslint-disable-next-line no-empty
4844
} catch (e) {}
4945
if (!embedOrigin) {
5046
embedOrigin = window.location.origin;
5147
}
5248
return embedOrigin;
5349
};
5450

55-
// eslint-disable-next-line sonarjs/cognitive-complexity
5651
function main() {
5752
if (code || error) {
5853
try {

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,12 @@ export default function CancelAlert(props: CancelAlertProps) {
5858
function cancelHandler() {
5959
if (isReverseCoexistence) {
6060
dismiss(true);
61-
// @ts-ignore - An argument for 'payload' was not provided.
6261
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD);
6362
} else if (!isDataObject && !isLocalAction && !isBulkAction) {
6463
disableButton(btnIds.DELETE);
6564
actionsAPI
6665
.deleteCaseInCreateStage(containerItemID, hideDelete)
6766
.then(() => {
68-
// @ts-ignore - An argument for 'payload' was not provided.
6967
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);
7068
})
7169
.catch(() => {
@@ -78,13 +76,12 @@ export default function CancelAlert(props: CancelAlertProps) {
7876
});
7977
} else if (isLocalAction) {
8078
dismiss(true);
81-
actionsAPI.cancelAssignment(containerItemID);
79+
actionsAPI.cancelAssignment(containerItemID, false);
8280
} else if (isBulkAction) {
8381
dismiss(true);
8482
actionsAPI.cancelBulkAction(containerItemID);
8583
} else {
8684
dismiss(true);
87-
// @ts-ignore - Argument of type '{ containerItemID: string; skipReleaseLockRequest: any; }' is not assignable to parameter of type 'ContainerInfo'.
8885
containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });
8986
}
9087
}

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from 'react';
1+
import { useEffect, useState } from 'react';
22
import { NumericFormat } from 'react-number-format';
33
import { TextField } from '@mui/material';
44
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
@@ -45,9 +45,11 @@ export default function Currency(props: CurrrencyProps) {
4545
const helperTextToDisplay = validatemessage || helperText;
4646
const [values, setValues] = useState(value.toString());
4747

48-
const testProp = {
49-
'data-test-id': testId
50-
};
48+
const testProp = { 'data-test-id': testId };
49+
50+
useEffect(() => {
51+
setValues(value.toString());
52+
}, [value]);
5153

5254
// currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
5355
const theSymbols = getCurrencyCharacters(currencyISOCode);
@@ -56,7 +58,7 @@ export default function Currency(props: CurrrencyProps) {
5658
const theCurrSep = theSymbols.theDigitGroupSeparator;
5759

5860
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
59-
const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
61+
const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
6062

6163
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
6264

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function Decimal(props: DecimalProps) {
6868
if (formatter === 'Currency') {
6969
formattedValue = format(value, formatter.toLowerCase(), theCurrencyOptions);
7070
} else {
71-
formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
71+
formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
7272
}
7373

7474
if (displayMode === 'DISPLAY_ONLY') {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ export default function Dropdown(props: DropdownProps) {
230230
>
231231
{options.map((option: any) => (
232232
<MenuItem key={option.key} value={option.key}>
233-
{/* @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv' */}
234233
{thePConn.getLocalizedValue(option.value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
235234
</MenuItem>
236235
))}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default function Percentage(props: PercentageProps) {
5050
const helperTextToDisplay = validatemessage || helperText;
5151

5252
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
53-
const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
53+
const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);
5454

5555
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
5656

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export default function RadioButtons(props: RadioButtonsProps) {
6565
return (
6666
<FieldValueList
6767
name={hideLabel ? '' : label}
68-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
6968
value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
7069
/>
7170
);
@@ -75,7 +74,6 @@ export default function RadioButtons(props: RadioButtonsProps) {
7574
return (
7675
<FieldValueList
7776
name={hideLabel ? '' : label}
78-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
7977
value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
8078
variant='stacked'
8179
/>
@@ -102,7 +100,6 @@ export default function RadioButtons(props: RadioButtonsProps) {
102100
label={thePConn.getLocalizedValue(
103101
theOption.value,
104102
localePath,
105-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
106103
thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
107104
)}
108105
control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,15 @@ export default function ScalarList(props: ScalarListProps) {
3636
{
3737
type: componentType,
3838
config: {
39-
// @ts-ignore - Type '{ readOnly: true; displayInModal: boolean; value: any; displayMode: string; label: string; }' is not assignable to type 'ComponentMetadataConfig'.
4039
value: scalarValue,
4140
displayMode: 'DISPLAY_ONLY',
4241
label,
4342
...restProps,
44-
// @ts-ignore - Type 'string' is not assignable to type 'boolean | undefined'.
4543
readOnly: 'true'
4644
}
4745
},
4846
'',
47+
// @ts-ignore
4948
'',
5049
{}
5150
); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;

0 commit comments

Comments
 (0)