@pega/react-sdk-overrides 0.23.17 → 0.23.19
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.
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +37 -3
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +1 -2
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +38 -56
- package/lib/field/AutoComplete/AutoComplete.tsx +6 -4
- package/lib/field/Checkbox/Checkbox.tsx +7 -5
- package/lib/field/Currency/Currency.tsx +31 -6
- package/lib/field/Currency/currency-utils.ts +76 -0
- package/lib/field/Date/Date.tsx +25 -9
- package/lib/field/DateTime/DateTime.tsx +24 -10
- package/lib/field/Decimal/Decimal.tsx +8 -6
- package/lib/field/Dropdown/Dropdown.tsx +6 -4
- package/lib/field/Email/Email.tsx +8 -8
- package/lib/field/Integer/Integer.tsx +8 -6
- package/lib/field/Percentage/Percentage.tsx +8 -6
- package/lib/field/Phone/Phone.tsx +8 -7
- package/lib/field/RadioButtons/RadioButtons.tsx +7 -5
- package/lib/field/SemanticLink/SemanticLink.tsx +6 -0
- package/lib/field/TextArea/TextArea.tsx +8 -6
- package/lib/field/TextInput/TextInput.tsx +8 -6
- package/lib/field/Time/Time.tsx +7 -5
- package/lib/field/URL/URL.tsx +8 -6
- package/lib/helpers/authManager.js +1 -0
- package/lib/helpers/date-format-utils.ts +66 -0
- package/lib/helpers/event-utils.js +1 -1
- package/lib/helpers/formatters/Currency.js +13 -5
- package/lib/helpers/formatters/common.js +5 -1
- package/lib/helpers/formatters/index.js +5 -0
- package/lib/helpers/template-utils.ts +80 -0
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +67 -72
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +0 -44
- package/lib/infra/MultiStep/MultiStep.css +4 -18
- package/lib/infra/NavBar/NavBar.tsx +129 -219
- package/lib/infra/RootContainer/RootContainer.tsx +2 -54
- package/lib/infra/Stages/Stages.tsx +1 -2
- package/lib/infra/View/View.tsx +28 -21
- package/lib/template/AppShell/AppShell.tsx +2 -343
- package/lib/template/CaseSummary/CaseSummary.tsx +1 -1
- package/lib/template/CaseView/CaseView.tsx +2 -5
- package/lib/template/DefaultForm/DefaultForm.tsx +4 -0
- package/lib/template/Details/Details/Details.tsx +52 -21
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +63 -31
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +64 -30
- package/lib/template/ListView/DefaultViewMeta.js +222 -0
- package/lib/template/ListView/ListView.tsx +155 -94
- package/lib/template/ListView/hooks.js +97 -0
- package/lib/template/ListView/utils.js +636 -0
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +69 -42
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +3 -24
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +69 -43
- package/lib/widget/Attachment/Attachment.css +7 -0
- package/lib/widget/Attachment/Attachment.tsx +37 -3
- package/lib/widget/SummaryItem/SummaryItem.tsx +1 -1
- package/package.json +1 -1
- package/lib/.DS_Store +0 -0
- package/lib/field/AutoComplete/.DS_Store +0 -0
- package/lib/field/Checkbox/.DS_Store +0 -0
- package/lib/field/Currency/.DS_Store +0 -0
- package/lib/field/Date/.DS_Store +0 -0
- package/lib/field/TextContent/.DS_Store +0 -0
- package/lib/infra/.DS_Store +0 -0
- package/lib/template/.DS_Store +0 -0
- package/lib/template/CaseView/.DS_Store +0 -0
- package/lib/template/SimpleTable/.DS_Store +0 -0
- package/lib/template/SimpleTable/SimpleTable/.DS_Store +0 -0
- package/lib/template/utils.ts +0 -23
|
@@ -34,7 +34,7 @@ mat-horizontal-stepper {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.psdk-sub-step-current {
|
|
37
|
-
padding-left: 0.625rem;
|
|
37
|
+
padding-left: 0.625rem;
|
|
38
38
|
font-weight: bold;
|
|
39
39
|
color: rgba(0,0,0,.87);
|
|
40
40
|
}
|
|
@@ -53,7 +53,7 @@ mat-horizontal-stepper {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.psdk-sub-step-list {
|
|
56
|
-
list-style: none;
|
|
56
|
+
list-style: none;
|
|
57
57
|
padding-bottom: 0.625rem;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -219,35 +219,21 @@ mat-horizontal-stepper {
|
|
|
219
219
|
.psdk-horizontal-step-label {
|
|
220
220
|
color: rgba(0,0,0,.54);
|
|
221
221
|
display: inline-block;
|
|
222
|
-
white-space: nowrap;
|
|
223
|
-
overflow: hidden;
|
|
224
|
-
text-overflow: ellipsis;
|
|
225
222
|
min-width: 50px;
|
|
226
223
|
vertical-align: middle;
|
|
227
224
|
font-size: 14px;
|
|
228
225
|
font-weight: 500;
|
|
229
|
-
|
|
230
|
-
overflow: hidden;
|
|
226
|
+
white-space: initial;
|
|
231
227
|
}
|
|
232
228
|
|
|
233
229
|
.psdk-horizontal-step-label-selected {
|
|
234
230
|
color: rgba(0,0,0,.87);
|
|
235
231
|
display: inline-block;
|
|
236
|
-
white-space: nowrap;
|
|
237
|
-
overflow: hidden;
|
|
238
|
-
text-overflow: ellipsis;
|
|
239
232
|
min-width: 50px;
|
|
240
233
|
vertical-align: middle;
|
|
241
234
|
font-size: 14px;
|
|
242
235
|
font-weight: 500;
|
|
243
|
-
|
|
244
|
-
overflow: hidden;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.psdk-horizontal-step-text-label {
|
|
248
|
-
text-overflow: ellipsis;
|
|
249
|
-
overflow: hidden;
|
|
250
|
-
display: block;
|
|
236
|
+
white-space: initial;
|
|
251
237
|
}
|
|
252
238
|
|
|
253
239
|
.psdk-horizontal-step-line {
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import React, { useEffect, useState } from
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { makeStyles, useTheme } from '@material-ui/core/styles';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import PropTypes from
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
5
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
6
|
-
|
|
7
6
|
import './NavBar.css';
|
|
8
|
-
|
|
9
7
|
import {
|
|
10
8
|
Drawer,
|
|
11
9
|
List,
|
|
@@ -34,145 +32,118 @@ import ClearOutlinedIcon from '@material-ui/icons/ClearOutlined';
|
|
|
34
32
|
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
|
|
35
33
|
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
36
34
|
|
|
37
|
-
import { useNavBar } from
|
|
35
|
+
import { useNavBar } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
|
|
38
36
|
import { logout } from '@pega/react-sdk-components/lib/components/helpers/authManager';
|
|
39
37
|
|
|
40
38
|
declare const PCore;
|
|
41
39
|
|
|
42
40
|
const iconMap = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
41
|
+
'pi pi-headline': <HomeOutlinedIcon fontSize='large' />,
|
|
42
|
+
'pi pi-flag-solid': <FlagOutlinedIcon fontSize='large' />
|
|
43
|
+
};
|
|
46
44
|
|
|
47
45
|
const drawerWidth = 300;
|
|
48
46
|
|
|
49
|
-
const useStyles = makeStyles(
|
|
47
|
+
const useStyles = makeStyles(theme => ({
|
|
50
48
|
drawerPaper: {
|
|
51
49
|
position: 'relative',
|
|
52
50
|
whiteSpace: 'nowrap',
|
|
53
51
|
width: drawerWidth,
|
|
54
52
|
transition: theme.transitions.create('width', {
|
|
55
53
|
easing: theme.transitions.easing.sharp,
|
|
56
|
-
duration: theme.transitions.duration.enteringScreen
|
|
54
|
+
duration: theme.transitions.duration.enteringScreen
|
|
57
55
|
}),
|
|
58
|
-
height:
|
|
56
|
+
height: '100vh'
|
|
59
57
|
},
|
|
60
58
|
drawerPaperClose: {
|
|
61
59
|
overflowX: 'hidden',
|
|
62
60
|
transition: theme.transitions.create('width', {
|
|
63
61
|
easing: theme.transitions.easing.sharp,
|
|
64
|
-
duration: theme.transitions.duration.leavingScreen
|
|
62
|
+
duration: theme.transitions.duration.leavingScreen
|
|
65
63
|
}),
|
|
66
64
|
width: theme.spacing(7),
|
|
67
65
|
[theme.breakpoints.up('md')]: {
|
|
68
|
-
width: theme.spacing(9)
|
|
66
|
+
width: theme.spacing(9)
|
|
69
67
|
},
|
|
70
|
-
height:
|
|
68
|
+
height: '100vh'
|
|
71
69
|
},
|
|
72
70
|
nested: {
|
|
73
|
-
paddingLeft: theme.spacing(4)
|
|
71
|
+
paddingLeft: theme.spacing(4)
|
|
74
72
|
},
|
|
75
73
|
appListItem: {
|
|
76
74
|
backgroundColor: theme.palette.primary.light,
|
|
77
|
-
color: theme.palette.getContrastText(theme.palette.primary.light)
|
|
75
|
+
color: theme.palette.getContrastText(theme.palette.primary.light)
|
|
78
76
|
},
|
|
79
77
|
appListLogo: {
|
|
80
78
|
marginRight: theme.spacing(2),
|
|
81
|
-
width:
|
|
79
|
+
width: '3.6rem'
|
|
82
80
|
},
|
|
83
81
|
appListIcon: {
|
|
84
|
-
color: theme.palette.getContrastText(theme.palette.primary.light)
|
|
82
|
+
color: theme.palette.getContrastText(theme.palette.primary.light)
|
|
85
83
|
},
|
|
86
84
|
appListDiv: {
|
|
87
85
|
backgroundColor: theme.palette.primary.light,
|
|
88
86
|
color: theme.palette.getContrastText(theme.palette.primary.light),
|
|
89
87
|
paddingTop: theme.spacing(2),
|
|
90
88
|
paddingBottom: theme.spacing(2),
|
|
91
|
-
display:
|
|
92
|
-
alignItems:
|
|
93
|
-
justifyContent:
|
|
89
|
+
display: 'flex',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
justifyContent: 'center'
|
|
92
|
+
},
|
|
93
|
+
applicationLabel: {
|
|
94
|
+
whiteSpace: 'initial'
|
|
94
95
|
}
|
|
95
96
|
}));
|
|
96
97
|
|
|
97
98
|
export default function NavBar(props) {
|
|
98
|
-
const {
|
|
99
|
-
pConn,
|
|
100
|
-
pages,
|
|
101
|
-
caseTypes
|
|
102
|
-
} = props;
|
|
103
|
-
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
105
|
-
const [navIcon, setNavIcon] = useState((PCore.getAssetLoader().getStaticServerUrl()).concat("pzpega-logo-mark.svg"));
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
107
|
-
const [navExpandCollapse, setNavExpandCollapse] = useState(Utils.getImageSrc("plus", PCore.getAssetLoader().getStaticServerUrl()));
|
|
108
|
-
const [navPages, setNavPages] = useState(JSON.parse(JSON.stringify(pages)));
|
|
109
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
110
|
-
const [portalLogoImage, setPortalLogoImage] = useState(Utils.getIconPath(PCore.getAssetLoader().getStaticServerUrl()).concat("pzpega-logo-mark.svg"));
|
|
111
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
112
|
-
const [portalOperator, setPortalOperator] = useState(PCore.getEnvironmentInfo().getOperatorName());
|
|
113
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
114
|
-
const [portalOperatorInitials, setPortalOperatorInitials] = useState(Utils.getInitials(portalOperator));
|
|
115
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
116
|
-
const [portalApp, setPortalApp] = useState(PCore.getEnvironmentInfo().getApplicationLabel());
|
|
117
|
-
const [bShowCaseTypes, setBShowCaseTypes] = useState(true);
|
|
118
|
-
const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false)
|
|
119
|
-
const {open, setOpen} = useNavBar();
|
|
120
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
99
|
+
const { pConn, pages, caseTypes } = props;
|
|
121
100
|
|
|
122
101
|
const classes = useStyles();
|
|
123
102
|
const theme = useTheme();
|
|
124
103
|
const isDesktop = useMediaQuery(theme.breakpoints.up('md'));
|
|
125
104
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
[
|
|
105
|
+
const { open, setOpen } = useNavBar();
|
|
106
|
+
const [navPages, setNavPages] = useState(JSON.parse(JSON.stringify(pages)));
|
|
107
|
+
const [bShowCaseTypes, setBShowCaseTypes] = useState(true);
|
|
108
|
+
const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);
|
|
109
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
130
110
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
111
|
+
const portalLogoImage = Utils.getIconPath(PCore.getAssetLoader().getStaticServerUrl()).concat(
|
|
112
|
+
'pzpega-logo-mark.svg'
|
|
113
|
+
);
|
|
114
|
+
const portalOperator = PCore.getEnvironmentInfo().getOperatorName();
|
|
115
|
+
const portalApp = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
135
116
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
// });
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
setNavPages(JSON.parse(JSON.stringify(pages)));
|
|
119
|
+
}, [pages]);
|
|
140
120
|
|
|
141
121
|
function navPanelButtonClick(oPageData: any) {
|
|
142
|
-
const {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
122
|
+
const { pyClassName, pyRuleName } = oPageData;
|
|
123
|
+
|
|
124
|
+
pConn
|
|
125
|
+
.getActionsApi()
|
|
126
|
+
.showPage(pyRuleName, pyClassName)
|
|
127
|
+
.then(() => {
|
|
128
|
+
// eslint-disable-next-line no-console
|
|
129
|
+
console.log(`showPage completed`);
|
|
130
|
+
});
|
|
151
131
|
}
|
|
152
132
|
|
|
153
|
-
// function navPanelCreateButtonClick() {
|
|
154
|
-
// if (navExpandCollapse.indexOf("plus") > 0) {
|
|
155
|
-
// setNavExpandCollapse(Utils.getImageSrc("times", PCore.getAssetLoader().getStaticServerUrl()));
|
|
156
|
-
// setBShowCaseTypes(true);
|
|
157
|
-
// }
|
|
158
|
-
// else {
|
|
159
|
-
// setNavExpandCollapse(Utils.getImageSrc("plus", PCore.getAssetLoader().getStaticServerUrl()));
|
|
160
|
-
// setBShowCaseTypes(false);
|
|
161
|
-
// }
|
|
162
|
-
// }
|
|
163
|
-
|
|
164
133
|
function navPanelCreateCaseType(sCaseType: string, sFlowType: string) {
|
|
165
134
|
setOpen(false);
|
|
166
135
|
const actionInfo = {
|
|
167
|
-
containerName:
|
|
168
|
-
flowType: sFlowType ||
|
|
136
|
+
containerName: 'primary',
|
|
137
|
+
flowType: sFlowType || 'pyStartCase'
|
|
169
138
|
};
|
|
170
139
|
|
|
171
|
-
pConn
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
140
|
+
pConn
|
|
141
|
+
.getActionsApi()
|
|
142
|
+
.createWork(sCaseType, actionInfo)
|
|
143
|
+
.then(() => {
|
|
144
|
+
// eslint-disable-next-line no-console
|
|
145
|
+
console.log(`createWork completed`);
|
|
146
|
+
});
|
|
176
147
|
}
|
|
177
148
|
|
|
178
149
|
// Toggle showing the Operator buttons
|
|
@@ -182,52 +153,6 @@ export default function NavBar(props) {
|
|
|
182
153
|
else setAnchorEl(null);
|
|
183
154
|
}
|
|
184
155
|
|
|
185
|
-
function navPanelLogoutClick() {
|
|
186
|
-
|
|
187
|
-
try {
|
|
188
|
-
// eslint-disable-next-line no-console
|
|
189
|
-
console.log(`--> navPanelLogoutClick clicked`);
|
|
190
|
-
// Commenting out until revokeToken API is available
|
|
191
|
-
// pConn.getActionsApi().logout().then(() => {
|
|
192
|
-
// // eslint-disable-next-line no-console
|
|
193
|
-
// console.log(`logout completed`);
|
|
194
|
-
// },
|
|
195
|
-
// error => {
|
|
196
|
-
// // eslint-disable-next-line no-console
|
|
197
|
-
// console.error(`onRejected function called: ${error.message}`);
|
|
198
|
-
// })
|
|
199
|
-
} catch (err) {
|
|
200
|
-
// eslint-disable-next-line no-console
|
|
201
|
-
console.log(`--> Attempt to call logout api failed: ${err}`);
|
|
202
|
-
}
|
|
203
|
-
finally {
|
|
204
|
-
// authLogout();
|
|
205
|
-
logout();
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// const theCaseTypeButtons = caseTypes.map((caseType) => <div style={{display: "flex"}}>
|
|
210
|
-
// <button className="btn btn-link text-white"
|
|
211
|
-
// onClick={() => { navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}}>{caseType.pyLabel}</button></div>
|
|
212
|
-
// );
|
|
213
|
-
|
|
214
|
-
// const theOperatorButtons = <button className="btn btn-link text-white" style={{marginLeft: "-0.05rem"}} onClick={navPanelLogoutClick}>Logoff</button>;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
// return <div id="NavBar" style={{border: "solid 1px silver", margin: "1px"}} >
|
|
218
|
-
// NavBar for <strong>{appName}</strong>
|
|
219
|
-
// <br></br>
|
|
220
|
-
// caseTypes:
|
|
221
|
-
// <ul>
|
|
222
|
-
// {caseTypesMap}
|
|
223
|
-
// </ul>
|
|
224
|
-
// Pages:
|
|
225
|
-
// <ul>
|
|
226
|
-
// {pagesMap}
|
|
227
|
-
// </ul>
|
|
228
|
-
// </div>;
|
|
229
|
-
|
|
230
|
-
|
|
231
156
|
const handleDrawerOpen = () => {
|
|
232
157
|
setOpen(!open);
|
|
233
158
|
};
|
|
@@ -237,118 +162,103 @@ export default function NavBar(props) {
|
|
|
237
162
|
setOpen(true);
|
|
238
163
|
setBShowCaseTypes(true);
|
|
239
164
|
} else setBShowCaseTypes(!bShowCaseTypes);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// const handlePopoverOpen = (event) => {
|
|
243
|
-
// setAnchorEl(event.currentTarget);
|
|
244
|
-
// };
|
|
245
|
-
|
|
246
|
-
// const handlePopoverClose = () => {
|
|
247
|
-
// setAnchorEl(null);
|
|
248
|
-
// };
|
|
249
|
-
|
|
165
|
+
};
|
|
250
166
|
|
|
251
167
|
useEffect(() => {
|
|
252
168
|
if (!isDesktop) setOpen(false);
|
|
253
169
|
else setOpen(true);
|
|
254
|
-
}, [isDesktop])
|
|
255
|
-
|
|
170
|
+
}, [isDesktop]);
|
|
256
171
|
|
|
257
172
|
return (
|
|
258
173
|
<Drawer
|
|
259
|
-
variant=
|
|
174
|
+
variant='permanent'
|
|
260
175
|
classes={{
|
|
261
|
-
paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)
|
|
176
|
+
paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)
|
|
262
177
|
}}
|
|
263
178
|
open={open && isDesktop}
|
|
264
179
|
>
|
|
265
|
-
{
|
|
266
|
-
|
|
267
|
-
<
|
|
268
|
-
<
|
|
269
|
-
<
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
180
|
+
{open ? (
|
|
181
|
+
<List className={classes.appListItem}>
|
|
182
|
+
<ListItem onClick={handleDrawerOpen}>
|
|
183
|
+
<ListItemIcon>
|
|
184
|
+
<img src={portalLogoImage} className={classes.appListLogo} />
|
|
185
|
+
</ListItemIcon>
|
|
186
|
+
<ListItemText
|
|
187
|
+
primary={
|
|
188
|
+
<Typography variant='h6' className={classes.applicationLabel}>
|
|
189
|
+
{portalApp}
|
|
190
|
+
</Typography>
|
|
191
|
+
}
|
|
192
|
+
/>
|
|
193
|
+
<ListItemSecondaryAction>
|
|
194
|
+
<IconButton edge='end' onClick={handleDrawerOpen}>
|
|
195
|
+
<ChevronLeftIcon className={classes.appListIcon} />
|
|
196
|
+
</IconButton>
|
|
197
|
+
</ListItemSecondaryAction>
|
|
198
|
+
</ListItem>
|
|
199
|
+
</List>
|
|
200
|
+
) : (
|
|
201
|
+
<div className={classes.appListDiv} onClick={handleDrawerOpen}>
|
|
202
|
+
<ChevronRightIcon
|
|
203
|
+
className={classes.appListIcon}
|
|
204
|
+
id='chevron-right-icon'
|
|
205
|
+
fontSize='large'
|
|
206
|
+
/>
|
|
207
|
+
</div>
|
|
208
|
+
)}
|
|
288
209
|
<List>
|
|
289
210
|
<ListItem button onClick={handleCaseItemClick}>
|
|
290
211
|
<ListItemIcon>
|
|
291
|
-
{
|
|
292
|
-
|
|
293
|
-
|
|
212
|
+
{bShowCaseTypes && open ? (
|
|
213
|
+
<ClearOutlinedIcon fontSize='large' />
|
|
214
|
+
) : (
|
|
215
|
+
<AddIcon fontSize='large' />
|
|
216
|
+
)}
|
|
294
217
|
</ListItemIcon>
|
|
295
|
-
<ListItemText primary=
|
|
218
|
+
<ListItemText primary='Create' />
|
|
296
219
|
{bShowCaseTypes ? <ExpandLess /> : <ExpandMore />}
|
|
297
220
|
</ListItem>
|
|
298
221
|
</List>
|
|
299
|
-
<Collapse in={bShowCaseTypes && open} timeout=
|
|
300
|
-
<List component=
|
|
301
|
-
{
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
>
|
|
309
|
-
<
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
))
|
|
315
|
-
}
|
|
222
|
+
<Collapse in={bShowCaseTypes && open} timeout='auto' unmountOnExit className='scrollable'>
|
|
223
|
+
<List component='div' disablePadding>
|
|
224
|
+
{caseTypes.map(caseType => (
|
|
225
|
+
<ListItem
|
|
226
|
+
button
|
|
227
|
+
className={classes.nested}
|
|
228
|
+
onClick={() => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}
|
|
229
|
+
key={caseType.pyLabel}
|
|
230
|
+
>
|
|
231
|
+
<ListItemIcon>
|
|
232
|
+
<WorkOutlineIcon fontSize='large' />
|
|
233
|
+
</ListItemIcon>
|
|
234
|
+
<ListItemText primary={caseType.pyLabel} />
|
|
235
|
+
</ListItem>
|
|
236
|
+
))}
|
|
316
237
|
</List>
|
|
317
238
|
</Collapse>
|
|
318
239
|
<List>
|
|
319
|
-
{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
>
|
|
326
|
-
<ListItemIcon>
|
|
327
|
-
{iconMap[page.pxPageViewIcon]}
|
|
328
|
-
</ListItemIcon>
|
|
329
|
-
<ListItemText primary={page.pyLabel} />
|
|
330
|
-
</ListItem>
|
|
331
|
-
))
|
|
332
|
-
}
|
|
240
|
+
{navPages.map(page => (
|
|
241
|
+
<ListItem button onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>
|
|
242
|
+
<ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>
|
|
243
|
+
<ListItemText primary={page.pyLabel} />
|
|
244
|
+
</ListItem>
|
|
245
|
+
))}
|
|
333
246
|
</List>
|
|
334
247
|
<Divider />
|
|
335
248
|
<List className='marginTopAuto'>
|
|
336
249
|
<>
|
|
337
250
|
<ListItem onClick={navPanelOperatorButtonClick}>
|
|
338
251
|
<ListItemIcon>
|
|
339
|
-
<PersonOutlineIcon fontSize=
|
|
252
|
+
<PersonOutlineIcon fontSize='large' />
|
|
340
253
|
</ListItemIcon>
|
|
341
254
|
<ListItemText primary={portalOperator} />
|
|
342
|
-
{
|
|
343
|
-
|
|
344
|
-
<
|
|
345
|
-
<
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
)
|
|
350
|
-
}
|
|
351
|
-
|
|
255
|
+
{open && (
|
|
256
|
+
<ListItemSecondaryAction>
|
|
257
|
+
<IconButton edge='end' onClick={navPanelOperatorButtonClick}>
|
|
258
|
+
<ChevronRightIcon />
|
|
259
|
+
</IconButton>
|
|
260
|
+
</ListItemSecondaryAction>
|
|
261
|
+
)}
|
|
352
262
|
</ListItem>
|
|
353
263
|
<Menu
|
|
354
264
|
anchorEl={anchorEl}
|
|
@@ -357,18 +267,18 @@ export default function NavBar(props) {
|
|
|
357
267
|
onClick={navPanelOperatorButtonClick}
|
|
358
268
|
anchorOrigin={{
|
|
359
269
|
vertical: 'top',
|
|
360
|
-
horizontal: 'right'
|
|
270
|
+
horizontal: 'right'
|
|
361
271
|
}}
|
|
362
272
|
transformOrigin={{
|
|
363
273
|
vertical: 'top',
|
|
364
|
-
horizontal: 'left'
|
|
274
|
+
horizontal: 'left'
|
|
365
275
|
}}
|
|
366
276
|
>
|
|
367
|
-
<MenuItem onClick={
|
|
277
|
+
<MenuItem onClick={logout}>
|
|
368
278
|
<ListItemIcon>
|
|
369
|
-
<ArrowBackIcon fontSize=
|
|
279
|
+
<ArrowBackIcon fontSize='large' />
|
|
370
280
|
</ListItemIcon>
|
|
371
|
-
<Typography variant=
|
|
281
|
+
<Typography variant='inherit'>Logout</Typography>
|
|
372
282
|
</MenuItem>
|
|
373
283
|
</Menu>
|
|
374
284
|
</>
|
|
@@ -379,9 +289,9 @@ export default function NavBar(props) {
|
|
|
379
289
|
|
|
380
290
|
NavBar.defaultProps = {
|
|
381
291
|
pConn: null,
|
|
382
|
-
appName:
|
|
292
|
+
appName: '',
|
|
383
293
|
pages: [],
|
|
384
|
-
caseTypes: []
|
|
294
|
+
caseTypes: []
|
|
385
295
|
};
|
|
386
296
|
|
|
387
297
|
NavBar.propTypes = {
|
|
@@ -66,8 +66,6 @@ const RootContainer = (props) => {
|
|
|
66
66
|
options["context"] = "root";
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
// Used for embedded mode
|
|
70
|
-
// let newPConn: any;
|
|
71
69
|
const [componentName, setComponentName] = useState("");
|
|
72
70
|
|
|
73
71
|
useEffect( () => {
|
|
@@ -78,7 +76,6 @@ const RootContainer = (props) => {
|
|
|
78
76
|
// debugging/investigation help
|
|
79
77
|
// console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);
|
|
80
78
|
|
|
81
|
-
// const bannerRef = useRef(null);
|
|
82
79
|
let hasBanner = false;
|
|
83
80
|
let banners: any = null;
|
|
84
81
|
const messages = httpMessages
|
|
@@ -87,21 +84,6 @@ const RootContainer = (props) => {
|
|
|
87
84
|
|
|
88
85
|
hasBanner = messages && messages.length > 0;
|
|
89
86
|
banners = hasBanner && (<div>RootContainer: trying to emit Banner with {messages}</div>);
|
|
90
|
-
// && (
|
|
91
|
-
// <Banner
|
|
92
|
-
// ref={bannerRef}
|
|
93
|
-
// id="appShellBanner"
|
|
94
|
-
// variant="urgent"
|
|
95
|
-
// heading="Error"
|
|
96
|
-
// onDismiss={() =>
|
|
97
|
-
// pConn.clearErrorMessages({
|
|
98
|
-
// category: "HTTP",
|
|
99
|
-
// context: "root"
|
|
100
|
-
// })
|
|
101
|
-
// }
|
|
102
|
-
// messages={messages}
|
|
103
|
-
// />
|
|
104
|
-
// );
|
|
105
87
|
|
|
106
88
|
const MemoizedModalViewContainer = useMemo(() => {
|
|
107
89
|
return createElement(
|
|
@@ -175,7 +157,6 @@ const RootContainer = (props) => {
|
|
|
175
157
|
}
|
|
176
158
|
|
|
177
159
|
|
|
178
|
-
// const rootViewRef: any = useRef(null);
|
|
179
160
|
let rootView : any;
|
|
180
161
|
let rootViewConfig: any = null;
|
|
181
162
|
|
|
@@ -187,7 +168,6 @@ const RootContainer = (props) => {
|
|
|
187
168
|
PCore.getContainerUtils().getContainerAPI().addContainerItems(items);
|
|
188
169
|
}, [routingInfo]);
|
|
189
170
|
|
|
190
|
-
// const { store } = useConstellationContext();
|
|
191
171
|
const items: any = getItemView(routingInfo, renderingMode);
|
|
192
172
|
|
|
193
173
|
if (items.length > 0) {
|
|
@@ -225,14 +205,6 @@ const RootContainer = (props) => {
|
|
|
225
205
|
);
|
|
226
206
|
}
|
|
227
207
|
|
|
228
|
-
// interior was
|
|
229
|
-
// <ModalManager>
|
|
230
|
-
// {rootViewRef.current}
|
|
231
|
-
// {MemoisedModalViewContainer}
|
|
232
|
-
// {MemoizedPreviewViewContainer}
|
|
233
|
-
// <ReAuthMessageModal openModal={false} key="reauthMessageModel" />
|
|
234
|
-
// </ModalManager> */}
|
|
235
|
-
|
|
236
208
|
// debugging/investigation help
|
|
237
209
|
// console.log(`rootView.props.getPConnect().getComponentName(): ${rootView.props.getPConnect().getComponentName()}`);
|
|
238
210
|
|
|
@@ -252,10 +224,7 @@ const RootContainer = (props) => {
|
|
|
252
224
|
|
|
253
225
|
const theChildren = pConn.getChildren();
|
|
254
226
|
if (theChildren && (theChildren.length === 1)) {
|
|
255
|
-
// this.createdPConnect = theChildren[0];
|
|
256
|
-
// this.createdPConnect = null;
|
|
257
227
|
const localPConn = theChildren[0].getPConnect();
|
|
258
|
-
// newPConn = pConn;
|
|
259
228
|
const localCompName = localPConn.getComponentName()
|
|
260
229
|
if (componentName !== localCompName) {
|
|
261
230
|
setComponentName(localCompName);
|
|
@@ -267,15 +236,6 @@ const RootContainer = (props) => {
|
|
|
267
236
|
return noPortalContent;
|
|
268
237
|
}
|
|
269
238
|
else if (children && children.length > 0) {
|
|
270
|
-
// interior was
|
|
271
|
-
// <ModalManager>
|
|
272
|
-
// {httpMessages ? <div id="root-container">{banners}</div> : ""}
|
|
273
|
-
// {children}
|
|
274
|
-
// {MemoizedModalViewContainer}
|
|
275
|
-
// <ReAuthMessageModal openModal={false} key="reauthMessageModel" />
|
|
276
|
-
// {MemoizedPreviewViewContainer}
|
|
277
|
-
// </ModalManager>
|
|
278
|
-
|
|
279
239
|
return (
|
|
280
240
|
<React.Fragment>
|
|
281
241
|
<div>RootContainer: Has children. Trying to show ModalManager with children, etc.</div>
|
|
@@ -285,14 +245,8 @@ const RootContainer = (props) => {
|
|
|
285
245
|
|
|
286
246
|
);
|
|
287
247
|
} else if (skeleton) {
|
|
288
|
-
//
|
|
289
|
-
|
|
290
|
-
const LoadingComponent = LazyComponentMap[skeleton];
|
|
291
|
-
// interior was
|
|
292
|
-
// <ModalManager>
|
|
293
|
-
// <ReAuthMessageModal openModal={false} key="reauthMessageModel" />
|
|
294
|
-
// <LoadingComponent />
|
|
295
|
-
// </ModalManager>
|
|
248
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
|
|
249
|
+
const LoadingComponent = LazyComponentMap[skeleton];
|
|
296
250
|
|
|
297
251
|
return (
|
|
298
252
|
<div id="root-container">
|
|
@@ -301,12 +255,6 @@ const RootContainer = (props) => {
|
|
|
301
255
|
</div>
|
|
302
256
|
);
|
|
303
257
|
} else {
|
|
304
|
-
// interior was
|
|
305
|
-
// <ModalManager>
|
|
306
|
-
// {MemoisedModalViewContainer}
|
|
307
|
-
// {MemoizedPreviewViewContainer}
|
|
308
|
-
// <ReAuthMessageModal openModal={false} key="reauthMessageModel" />
|
|
309
|
-
// </ModalManager>
|
|
310
258
|
return (
|
|
311
259
|
<div id="root-container">
|
|
312
260
|
<div>RootContainer: Should be ModalManager, etc.</div>
|