@pega/react-sdk-overrides 0.23.25 → 0.23.26

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.
@@ -33,3 +33,7 @@
33
33
  font-size: 1rem;
34
34
  font-weight: 400;
35
35
  }
36
+
37
+ .banner-layout {
38
+ padding: 1rem;
39
+ }
@@ -3,8 +3,13 @@ import Grid from '@material-ui/core/Grid';
3
3
  import './Banner.css';
4
4
 
5
5
  export default function Banner(props) {
6
- const { a, b, banner } = props;
6
+ const { a, b, banner, variant} = props;
7
7
  const { title, message, backgroundImage } = banner;
8
+ const variantMap = {
9
+ 'two-column': [6, 6],
10
+ 'narrow-wide': [4, 8],
11
+ 'wide-narrow': [8, 4]
12
+ };
8
13
  return (
9
14
  <div style={{ marginBottom: '2rem' }}>
10
15
  <div
@@ -18,16 +23,14 @@ export default function Banner(props) {
18
23
  </div>
19
24
  </div>
20
25
  </div>
21
- <div style={{ padding: '1rem' }}>
22
- <Grid container item xs={12} spacing={1}>
23
- <Grid item xs={8} style={{ padding: '1em' }}>
24
- {a}
25
- </Grid>
26
- <Grid item xs={4} style={{ padding: '1em' }}>
27
- {b}
28
- </Grid>
26
+ <Grid container item xs={12} className='banner-layout' spacing={1}>
27
+ <Grid item xs={variantMap[variant][0]} style={{ padding: '1em' }}>
28
+ {a}
29
29
  </Grid>
30
- </div>
30
+ <Grid item xs={variantMap[variant][1]} style={{ padding: '1em' }}>
31
+ {b}
32
+ </Grid>
33
+ </Grid>
31
34
  </div>
32
35
  );
33
36
  }
@@ -1,7 +1,7 @@
1
1
  .quick-link-ul-list {
2
2
  list-style: none;
3
3
  padding: 0;
4
- grid-template-columns: repeat(3, 1fr);
4
+ grid-template-columns: repeat(auto-fill, minmax(min(40ch, 100%), 1fr));
5
5
  display: grid;
6
6
  gap: calc(1rem);
7
7
  }
@@ -33,4 +33,8 @@
33
33
  display: flex;
34
34
  align-items: center;
35
35
  gap: 0.5rem;
36
- }
36
+ }
37
+
38
+ .quick-link-heading {
39
+ margin-top: 8px;
40
+ }
@@ -7,7 +7,7 @@ export default function WssQuickCreate(props) {
7
7
 
8
8
  return (
9
9
  <div>
10
- <h1>{heading}</h1>
10
+ <h1 className='quick-link-heading'>{heading}</h1>
11
11
  <ul className='quick-link-ul-list'>
12
12
  {actions &&
13
13
  actions.map(element => {
@@ -134,9 +134,9 @@ export default function View(props) {
134
134
 
135
135
  if (children) {
136
136
  return <>{children}</>;
137
- } else {
138
- return <div id='View'>View has no children.</div>;
139
137
  }
138
+
139
+ return null;
140
140
  }
141
141
 
142
142
  View.defaultProps = {
@@ -34,7 +34,7 @@ const useStyles = makeStyles(theme => ({
34
34
 
35
35
  export default function WssNavBar(props) {
36
36
  const { appInfo, navLinks, operator, navDisplayOptions } = props;
37
- const { alignment } = navDisplayOptions;
37
+ const { alignment, position } = navDisplayOptions;
38
38
  const classes = useStyles();
39
39
 
40
40
  const [anchorElNav, setAnchorElNav] = useState<null | HTMLElement>(null);
@@ -55,11 +55,24 @@ export default function WssNavBar(props) {
55
55
  setAnchorElUser(null);
56
56
  };
57
57
 
58
+ const navLinksContent = (
59
+ <Box
60
+ sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }}
61
+ style={{ justifyContent: alignment }}
62
+ >
63
+ {navLinks.map(link => (
64
+ <Button className='link-style' key={link.text} onClick={link.onClick}>
65
+ {link.text}
66
+ </Button>
67
+ ))}
68
+ </Box>
69
+ );
70
+
58
71
  return (
59
72
  <div id='NavBar' className='nav-bar'>
60
73
  <AppBar position='static' color='primary'>
61
74
  <Container maxWidth='xl'>
62
- <Toolbar disableGutters>
75
+ <Toolbar disableGutters style={{ justifyContent: 'space-between' }}>
63
76
  <Button style={{ textTransform: 'capitalize' }} onClick={appInfo.onClick}>
64
77
  <img src={appInfo.imageSrc} className={classes.appListLogo} />
65
78
  <span className={classes.appName}>{appInfo.appName}</span>
@@ -98,16 +111,7 @@ export default function WssNavBar(props) {
98
111
  </Menu>
99
112
  </Box>
100
113
 
101
- <Box
102
- sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }}
103
- style={{ justifyContent: alignment }}
104
- >
105
- {navLinks.map(link => (
106
- <Button className='link-style' key={link.text} onClick={link.onClick}>
107
- {link.text}
108
- </Button>
109
- ))}
110
- </Box>
114
+ {position === 'inline' && <>{navLinksContent}</>}
111
115
 
112
116
  <Box sx={{ flexGrow: 0 }}>
113
117
  <IconButton onClick={handleOpenUserMenu}>
@@ -134,6 +138,7 @@ export default function WssNavBar(props) {
134
138
  </Menu>
135
139
  </Box>
136
140
  </Toolbar>
141
+ {position === 'below' && <>{navLinksContent}</>}
137
142
  </Container>
138
143
  </AppBar>
139
144
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/react-sdk-overrides",
3
- "version": "0.23.25",
3
+ "version": "0.23.26",
4
4
  "description": "React SDK - Code for overriding components",
5
5
  "_filesComment": "During packing, npm ignores everything NOT in the files list",
6
6
  "files": [