Skip to content

Commit b1e9eba

Browse files
committed
fix(security): resolve vulnerabilities in dependencies
Resolve vulnerabilities in dependencies
1 parent 50872ba commit b1e9eba

File tree

14 files changed

+22
-19
lines changed

14 files changed

+22
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function CancelAlert(props: CancelAlertProps) {
7878
});
7979
} else if (isLocalAction) {
8080
dismiss(true);
81-
actionsAPI.cancelAssignment(containerItemID);
81+
actionsAPI.cancelAssignment(containerItemID, false);
8282
} else if (isBulkAction) {
8383
dismiss(true);
8484
actionsAPI.cancelBulkAction(containerItemID);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function Currency(props: CurrrencyProps) {
5656
const theCurrSep = theSymbols.theDigitGroupSeparator;
5757

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

6161
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
6262

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/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/ScalarList/ScalarList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export default function ScalarList(props: ScalarListProps) {
4646
}
4747
},
4848
'',
49+
// @ts-ignore
4950
'',
5051
{}
5152
); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;

packages/react-sdk-components/src/components/infra/Assignment/Assignment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
147147
}
148148

149149
function onSaveActionSuccess(data) {
150-
actionsAPI.cancelAssignment(itemKey).then(() => {
150+
actionsAPI.cancelAssignment(itemKey, false).then(() => {
151151
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED, data);
152152
});
153153
}
@@ -206,7 +206,7 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
206206
showToast(`${localizedVal('Cancel failed!', localeCategory)}`);
207207
});
208208
} else {
209-
const cancelPromise = cancelAssignment(itemKey);
209+
const cancelPromise = cancelAssignment(itemKey, false);
210210

211211
cancelPromise
212212
.then(data => {

packages/react-sdk-components/src/components/infra/Containers/FlowContainer/FlowContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
290290

291291
const caseId = thePConn.getCaseSummary().content.pyID;
292292
const urgency = getPConnect().getCaseSummary().assignments ? getPConnect().getCaseSummary().assignments?.[0].urgency : '';
293-
const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName());
293+
const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName() || '');
294294

295295
const bShowBanner = showBanner(getPConnect);
296296

packages/react-sdk-components/src/components/infra/DeferLoad/DeferLoad.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export default function DeferLoad(props: DeferLoadProps) {
6969
const getViewOptions = () => ({
7070
viewContext: resourceType,
7171
pageClass: loadViewCaseID ? '' : (pConnect.getDataObject('') as any).pyPortal.classID, // 2nd arg empty string until typedef allows optional
72-
container: isContainerPreview ? 'preview' : null,
73-
containerName: isContainerPreview ? 'preview' : null,
72+
container: isContainerPreview ? 'preview' : undefined,
73+
containerName: isContainerPreview ? 'preview' : undefined,
7474
updateData: isContainerPreview
7575
});
7676

packages/react-sdk-components/src/components/infra/RootContainer/RootContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default function RootContainer(props: PropsWithChildren<RootContainerProp
179179
}
180180
};
181181

182-
if (!PCore.isDeepEqual(currentRootConfig, prevRootConfig)) {
182+
if (prevRootConfig && !PCore.isDeepEqual(currentRootConfig, prevRootConfig)) {
183183
rootView.current = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig)) as any;
184184
}
185185

packages/react-sdk-components/src/components/template/AppShell/AppShell.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
7373
const pConn = getPConnect();
7474
const envInfo = PCore.getEnvironmentInfo();
7575
const imageKey = envInfo.getOperatorImageInsKey();
76-
const userName = envInfo.getOperatorName();
76+
const userName = envInfo.getOperatorName() || '';
7777
const currentUserInitials = Utils.getInitials(userName);
7878
const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : '';
7979
const portalClass = pConn.getValue('.classID', ''); // 2nd arg empty string until typedef marked correctly
@@ -101,7 +101,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
101101
);
102102
// Initial setting of appName and mapChildren
103103
useEffect(() => {
104-
setAppName(PCore.getEnvironmentInfo().getApplicationName());
104+
setAppName(PCore.getEnvironmentInfo().getApplicationName() || '');
105105

106106
const tempMap: any = (pConn.getChildren() as any)?.map((child: any, index) => {
107107
const theChildComp = child.getPConnect().getComponentName();
@@ -125,7 +125,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
125125
.getPageDataAsync(caseTypesAvailableToCreateDP, pConn.getContextName(), {
126126
PortalName: portalID
127127
})
128-
.then(response => {
128+
.then((response: { pyCaseTypesAvailableToCreate?: any }) => {
129129
if (response?.pyCaseTypesAvailableToCreate) {
130130
pConn.replaceState('.pyCaseTypesAvailableToCreate', response.pyCaseTypesAvailableToCreate, {
131131
skipDirtyValidation: true
@@ -218,10 +218,10 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
218218
portalName={portalName}
219219
imageSrc={iconURL}
220220
fullImageSrc={fullIconURL}
221-
appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
221+
appName={localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
222222
appInfo={{
223223
imageSrc: iconURL,
224-
appName: localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),
224+
appName: localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),
225225
onClick: links[0] && /* links[0].onClick ? */ links[0].onClick /* : undefined */
226226
}}
227227
navLinks={links.filter((link, index) => {
@@ -245,7 +245,7 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
245245
<NavBar
246246
getPConnect={getPConnect}
247247
pConn={getPConnect()}
248-
appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
248+
appName={localizedVal(appNameToDisplay || '', '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
249249
pages={pages}
250250
caseTypes={caseTypes}
251251
/>

0 commit comments

Comments
 (0)