Skip to content

Commit 177858b

Browse files
Merge branch 'master' into mod/tor/themingChanges
2 parents 566c254 + 7a71403 commit 177858b

File tree

56 files changed

+2068
-448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2068
-448
lines changed

package-lock.json

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

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
"@mui/material": "^6.5.0",
5858
"@mui/styles": "^6.5.0",
5959
"@mui/x-date-pickers": "^7.29.4",
60-
"@pega/auth": "~0.2.31",
60+
"@pega/auth": "~0.2.33",
61+
"@react-google-maps/api": "^2.20.7",
6162
"@tinymce/tinymce-react": "^6.3.0",
6263
"clsx": "^2.1.1",
6364
"dayjs": "^1.11.13",
@@ -76,7 +77,7 @@
7677
},
7778
"devDependencies": {
7879
"@pega/configs": "^0.16.3",
79-
"@pega/constellationjs": "~24.2.2",
80+
"@pega/constellationjs": "^0.25.1",
8081
"@pega/eslint-config": "^0.17.0",
8182
"@pega/pcore-pconnect-typedefs": "~3.2.2",
8283
"@pega/tsconfig": "^0.17.0",

packages/react-sdk-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@mui/material": "^6.5.0",
2121
"@mui/styles": "^6.5.0",
2222
"@mui/x-date-pickers": "^7.29.4",
23+
"@react-google-maps/api": "^2.20.7",
2324
"@tinymce/tinymce-react": "^6.3.0",
2425
"clsx": "^2.1.1",
2526
"dayjs": "^1.11.13",

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable max-classes-per-file */
12
import { Component, createElement } from 'react';
23
import PropTypes from 'prop-types';
34
import { connect, shallowEqual } from 'react-redux';
@@ -100,6 +101,15 @@ const connectRedux = (component, c11nEnv) => {
100101
}
101102
}
102103
}
104+
// For CaseSummary, we need to compare changes in
105+
// primaryFields and secondary Fields
106+
if (next.template === 'CaseSummary') {
107+
for (const key of Object.keys(prev)) {
108+
if (!PCore.isDeepEqual(next[key], prev[key])) {
109+
return false;
110+
}
111+
}
112+
}
103113
/* TODO For some rawConfig we are not getting routingInfo under allStateProps */
104114
return !routingInfoCompare(next, prev);
105115
}

packages/react-sdk-components/src/common.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,8 @@
144144
color: var(--secondary-button-text-color) !important;
145145
font-size: 0.875rem !important;
146146
cursor: pointer !important;
147+
148+
/* Support for google map autocomplete */
149+
.pac-container {
150+
z-index: 2147483647;
147151
}

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Grid from '@mui/material/Grid';
1+
import Grid2 from '@mui/material/Grid2';
22
import './Banner.css';
33

44
// AlertBanner is one of the few components that does NOT have getPConnect.
@@ -37,14 +37,14 @@ export default function Banner(props: BannerProps) {
3737
</div>
3838
</div>
3939
</div>
40-
<Grid container item xs={12} className='banner-layout' spacing={1}>
41-
<Grid item xs={variantMap[variant][0]} style={{ padding: '1em' }}>
40+
<Grid2 container size={12} className='banner-layout' spacing={1}>
41+
<Grid2 size={{ xs: variantMap[variant][0] }} style={{ padding: '1em' }}>
4242
{a}
43-
</Grid>
44-
<Grid item xs={variantMap[variant][1]} style={{ padding: '1em' }}>
43+
</Grid2>
44+
<Grid2 size={{ xs: variantMap[variant][1] }} style={{ padding: '1em' }}>
4545
{b}
46-
</Grid>
47-
</Grid>
46+
</Grid2>
47+
</Grid2>
4848
</div>
4949
);
5050
}

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState, useEffect } from 'react';
22
import isDeepEqual from 'fast-deep-equal/react';
3-
import Grid from '@mui/material/Grid';
3+
import Grid2 from '@mui/material/Grid2';
44
import TextField from '@mui/material/TextField';
55

66
import { getDateFormatInfo } from '../../helpers/date-format-utils';
@@ -123,10 +123,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
123123
slotProps={{
124124
input: {
125125
readOnly: true,
126-
inputProps: {
127-
style: { cursor: 'pointer' },
128-
disableUnderline: true
129-
}
126+
disableUnderline: true,
127+
inputProps: { style: { cursor: 'pointer' } }
130128
}
131129
}}
132130
/>
@@ -229,9 +227,9 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
229227
// display the field when either visibility property doesn't exist or is true(if exists)
230228
if (field.config.visibility === undefined || field.config.visibility === true) {
231229
return (
232-
<Grid item xs={6} key={field.config.label}>
230+
<Grid2 size={{ xs: 6 }} key={field.config.label}>
233231
{getFieldValue(field)}
234-
</Grid>
232+
</Grid2>
235233
);
236234
}
237235

@@ -265,8 +263,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
265263
}
266264

267265
return (
268-
<Grid container className='psdk-case-summary-fields'>
266+
<Grid2 container className='psdk-case-summary-fields'>
269267
{theFieldsAsGridItems}
270-
</Grid>
268+
</Grid2>
271269
);
272270
}

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable react/no-array-index-key */
22
import React, { createElement, isValidElement } from 'react';
3-
import Grid from '@mui/material/Grid';
3+
import Grid2 from '@mui/material/Grid2';
44
import Typography from '@mui/material/Typography';
55
import makeStyles from '@mui/styles/makeStyles';
66

@@ -62,11 +62,11 @@ export default function DetailsFields(props: DetailsFieldsProps) {
6262
const dispValue = field.label;
6363

6464
return (
65-
<Grid item xs={6} key={keyVal}>
65+
<Grid2 size={{ xs: 6 }} key={keyVal}>
6666
<Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>
6767
{dispValue}
6868
</Typography>
69-
</Grid>
69+
</Grid2>
7070
);
7171
}
7272

@@ -97,21 +97,21 @@ export default function DetailsFields(props: DetailsFieldsProps) {
9797
const formattedValue = formatItemValue(field);
9898

9999
return (
100-
<Grid item xs={6} key={keyVal}>
100+
<Grid2 size={{ xs: 6 }} key={keyVal}>
101101
<Typography variant='body2' component='span' className={classes.fieldValue}>
102102
{formattedValue}
103103
</Typography>
104-
</Grid>
104+
</Grid2>
105105
);
106106
}
107107

108108
function getGridItem(field: any, keyVal: string) {
109109
return (
110-
<Grid item xs={12} key={keyVal}>
110+
<Grid2 size={{ xs: 12 }} key={keyVal}>
111111
<Typography variant='body2' component='span' className={classes.fieldValue}>
112112
{field?.value}
113113
</Typography>
114-
</Grid>
114+
</Grid2>
115115
);
116116
}
117117

@@ -122,16 +122,16 @@ export default function DetailsFields(props: DetailsFieldsProps) {
122122
}
123123
if (isValidElement(field?.value)) {
124124
return (
125-
<Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>
125+
<Grid2 container spacing={1} style={{ padding: '4px 0px' }} key={index}>
126126
{getGridItem(field, `${index}-item`)}
127-
</Grid>
127+
</Grid2>
128128
);
129129
}
130130
return (
131-
<Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>
131+
<Grid2 container spacing={1} style={{ padding: '4px 0px' }} key={index}>
132132
{getGridItemLabel(field, `${index}-label`)}
133133
{getGridItemValue(field, `${index}-value`)}
134-
</Grid>
134+
</Grid2>
135135
);
136136
});
137137
return gridItems;

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type PropsWithChildren, useState } from 'react';
2-
import Grid from '@mui/material/Grid';
2+
import Grid2 from '@mui/material/Grid2';
33
import makeStyles from '@mui/styles/makeStyles';
44
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
55
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
@@ -45,18 +45,18 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
4545
const [collapsed, setCollapsed] = useState(false);
4646

4747
const descAndChildren = (
48-
<Grid container>
48+
<Grid2 container>
4949
<div className={classes.fullWidth}>{children}</div>
50-
</Grid>
50+
</Grid2>
5151
);
5252

5353
const headerClickHandler = () => {
5454
setCollapsed(current => !current);
5555
};
5656

5757
return (
58-
<Grid container spacing={4} justifyContent='space-between'>
59-
<Grid item style={{ width: '100%' }}>
58+
<Grid2 container spacing={4} justifyContent='space-between'>
59+
<Grid2 style={{ width: '100%' }}>
6060
{name && (
6161
<div className={classes.fieldMargin}>
6262
{collapsible ? (
@@ -74,7 +74,7 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
7474
<div key='instructions' className={classes.instructionText} dangerouslySetInnerHTML={{ __html: instructions }} />
7575
)}
7676
{!collapsed && descAndChildren}
77-
</Grid>
78-
</Grid>
77+
</Grid2>
78+
</Grid2>
7979
);
8080
}

0 commit comments

Comments
 (0)