@pega/react-sdk-overrides 0.23.18 → 0.23.20

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.
@@ -543,6 +543,7 @@ export const authTokenUpdated = (tokenInfo ) => {
543
543
  };
544
544
 
545
545
  export const logout = () => {
546
+ sessionStorage.removeItem('rsdk_portalName');
546
547
  return new Promise((resolve) => {
547
548
  const fnClearAndResolve = () => {
548
549
  clearAuthMgr();
@@ -1,4 +1,4 @@
1
- // From npm-nebula/src/utils/event-utils.js
1
+ // From DX Components src/utils/event-utils.js
2
2
 
3
3
  const handleEvent = (actions, eventType, propName, value) => {
4
4
  switch (eventType) {
@@ -1,19 +1,19 @@
1
1
  /* eslint-disable no-nested-ternary */
2
2
  /* eslint-disable camelcase */
3
- import React, { useState, useEffect, useContext, createElement } from "react";
4
- import PropTypes from "prop-types";
3
+ import React, { useState, useEffect, useContext, createElement } from 'react';
4
+ import PropTypes from 'prop-types';
5
5
  import { makeStyles } from '@material-ui/core/styles';
6
- import { Card, CardHeader, Avatar, Typography } from "@material-ui/core";
6
+ import { Card, CardHeader, Avatar, Typography } from '@material-ui/core';
7
7
  import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
8
8
  import { Alert } from '@material-ui/lab';
9
9
 
10
10
  import Assignment from '@pega/react-sdk-components/lib/components/infra/Assignment';
11
- import ToDo from "@pega/react-sdk-components/lib/components/widget/ToDo";
11
+ import ToDo from '@pega/react-sdk-components/lib/components/widget/ToDo';
12
12
 
13
13
  import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
14
- import StoreContext from "@pega/react-sdk-components/lib/bridge/Context/StoreContext";
15
- import DayjsUtils from "@date-io/dayjs";
16
- import { MuiPickersUtilsProvider } from "@material-ui/pickers";
14
+ import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
15
+ import DayjsUtils from '@date-io/dayjs';
16
+ import { MuiPickersUtilsProvider } from '@material-ui/pickers';
17
17
 
18
18
  import { addContainerItem, getToDoAssignments } from './helpers';
19
19
 
@@ -25,8 +25,7 @@ declare const PCore;
25
25
  // is totally at your own risk.
26
26
  //
27
27
 
28
-
29
- const useStyles = makeStyles((theme) => ({
28
+ const useStyles = makeStyles(theme => ({
30
29
  root: {
31
30
  paddingRight: theme.spacing(2),
32
31
  paddingLeft: theme.spacing(2),
@@ -35,28 +34,26 @@ const useStyles = makeStyles((theme) => ({
35
34
  marginRight: theme.spacing(1),
36
35
  marginLeft: theme.spacing(1),
37
36
  marginTop: theme.spacing(1),
38
- marginBottom: theme.spacing(1),
37
+ marginBottom: theme.spacing(1)
39
38
  },
40
39
  alert: {
41
40
  marginRight: theme.spacing(1),
42
- marginLeft: theme.spacing(1),
41
+ marginLeft: theme.spacing(1)
43
42
  },
44
43
  avatar: {
45
44
  backgroundColor: theme.palette.primary.light,
46
- color: theme.palette.getContrastText(theme.palette.primary.light),
45
+ color: theme.palette.getContrastText(theme.palette.primary.light)
47
46
  }
48
47
  }));
49
48
 
50
-
51
-
52
49
  export default function FlowContainer(props) {
53
50
  const pCoreConstants = PCore.getConstants();
54
51
  const { TODO } = pCoreConstants;
55
- const todo_headerText = "To do";
52
+ const todo_headerText = 'To do';
56
53
 
57
54
  const { getPConnect, routingInfo } = props;
58
55
 
59
- const {displayOnlyFA} = useContext(StoreContext);
56
+ const { displayOnlyFA } = useContext(StoreContext);
60
57
 
61
58
  const thePConn = getPConnect();
62
59
 
@@ -66,39 +63,36 @@ export default function FlowContainer(props) {
66
63
  const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState<Array<any>>([]);
67
64
 
68
65
  const [todo_showTodo, setShowTodo] = useState(false);
69
- const [todo_caseInfoID, setCaseInfoID] = useState("");
66
+ const [todo_caseInfoID, setCaseInfoID] = useState('');
70
67
  const [todo_showTodoList, setShowTodoList] = useState(false);
71
68
  const [todo_datasource, setTodoDatasource] = useState({});
72
69
  // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
73
- const [todo_context, setTodoContext] = useState("");
70
+ const [todo_context, setTodoContext] = useState('');
74
71
 
75
-
76
- const [caseMessages, setCaseMessages] = useState("");
72
+ const [caseMessages, setCaseMessages] = useState('');
77
73
  const [bHasCaseMessages, setHasCaseMessages] = useState(false);
78
74
  // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
79
- const [checkSvg, setCheckSvg] = useState("");
80
-
75
+ const [checkSvg, setCheckSvg] = useState('');
81
76
 
82
- const [itemKey, setItemKey] = useState("");
83
- const [containerName, setContainerName] = useState("");
84
- const [buildName, setBuildName] = useState("");
77
+ const [itemKey, setItemKey] = useState('');
78
+ const [containerName, setContainerName] = useState('');
79
+ const [buildName, setBuildName] = useState('');
80
+ const [bShowConfirm, setShowConfirm] = useState(false);
85
81
 
86
82
  const classes = useStyles();
87
83
 
88
84
  function initContainer() {
89
-
90
85
  const ourPConn = getPConnect();
91
86
  const containerMgr = ourPConn.getContainerManager();
92
87
  const baseContext = ourPConn.getContextName();
93
88
  const theContainerName = ourPConn.getContainerName();
94
- const containerType = "single";
89
+ const containerType = 'single';
95
90
 
96
91
  const flowContainerTarget = `${baseContext}/${theContainerName}`;
97
- const isContainerItemAvailable = PCore.getContainerUtils().getActiveContainerItemName(
98
- flowContainerTarget
99
- );
92
+ const isContainerItemAvailable =
93
+ PCore.getContainerUtils().getActiveContainerItemName(flowContainerTarget);
100
94
 
101
- window.sessionStorage.setItem("okToInitFlowContainer", "false");
95
+ window.sessionStorage.setItem('okToInitFlowContainer', 'false');
102
96
 
103
97
  if (!isContainerItemAvailable) {
104
98
  containerMgr.initializeContainers({
@@ -110,7 +104,6 @@ export default function FlowContainer(props) {
110
104
  }
111
105
  }
112
106
 
113
-
114
107
  function getBuildName(): string {
115
108
  const ourPConn = getPConnect();
116
109
 
@@ -118,27 +111,24 @@ export default function FlowContainer(props) {
118
111
  const context = ourPConn.getContextName();
119
112
  let viewContainerName = ourPConn.getContainerName();
120
113
 
121
- if (!viewContainerName) viewContainerName = "";
114
+ if (!viewContainerName) viewContainerName = '';
122
115
  return `${context.toUpperCase()}/${viewContainerName.toUpperCase()}`;
123
116
  }
124
117
 
125
-
126
118
  function getTodoVisibility() {
127
- const caseViewMode = getPConnect().getValue("context_data.caseViewMode");
128
- if (caseViewMode && caseViewMode === "review") {
119
+ const caseViewMode = getPConnect().getValue('context_data.caseViewMode');
120
+ if (caseViewMode && caseViewMode === 'review') {
129
121
  return true;
130
122
  }
131
123
  // eslint-disable-next-line sonarjs/prefer-single-boolean-return
132
- if (caseViewMode && caseViewMode === "perform") {
124
+ if (caseViewMode && caseViewMode === 'perform') {
133
125
  return false;
134
126
  }
135
127
 
136
128
  return true;
137
129
  }
138
130
 
139
-
140
131
  function initComponent(bLoadChildren: boolean) {
141
-
142
132
  const ourPConn = getPConnect();
143
133
 
144
134
  // when true, update arChildren from pConn, otherwise, arChilren will be updated in updateSelf()
@@ -166,19 +156,17 @@ export default function FlowContainer(props) {
166
156
  const acName = ourPConn.getContainerName();
167
157
 
168
158
  // for now, in general this should be overridden by updateSelf(), and not be blank
169
- if (itemKey === "") {
159
+ if (itemKey === '') {
170
160
  // debugger;
171
- setItemKey(baseContext.concat("/").concat(acName));
161
+ setItemKey(baseContext.concat('/').concat(acName));
172
162
  }
173
163
 
174
-
175
164
  ourPConn.isBoundToState();
176
165
 
177
-
178
166
  // inside
179
167
  // get fist kid, get the name and displa
180
168
  // pass first kid to a view container, which will disperse it to a view which will use one column, two column, etc.
181
- const oWorkItem = arNewChildren[0].getPConnect(); // child0_getPConnect;
169
+ const oWorkItem = arNewChildren[0].getPConnect(); // child0_getPConnect;
182
170
  const oWorkData = oWorkItem.getDataObject();
183
171
 
184
172
  if (bLoadChildren && oWorkData) {
@@ -188,17 +176,14 @@ export default function FlowContainer(props) {
188
176
 
189
177
  // debugger;
190
178
  setBuildName(getBuildName());
191
-
192
179
  }
193
180
 
194
-
195
181
  useEffect(() => {
196
182
  // from WC SDK connectedCallback (mount)
197
183
  initComponent(true);
198
184
  initContainer();
199
185
  }, []);
200
186
 
201
-
202
187
  function isCaseWideLocalAction() {
203
188
  const ourPConn = getPConnect();
204
189
 
@@ -206,17 +191,14 @@ export default function FlowContainer(props) {
206
191
  const caseActions = ourPConn.getValue(pCoreConstants.CASE_INFO.AVAILABLEACTIONS);
207
192
  let bCaseWideAction = false;
208
193
  if (caseActions && actionID) {
209
- const actionObj = caseActions.find(
210
- (caseAction) => caseAction.ID === actionID
211
- );
194
+ const actionObj = caseActions.find(caseAction => caseAction.ID === actionID);
212
195
  if (actionObj) {
213
- bCaseWideAction = actionObj.type === "Case";
196
+ bCaseWideAction = actionObj.type === 'Case';
214
197
  }
215
198
  }
216
199
  return bCaseWideAction;
217
200
  }
218
201
 
219
-
220
202
  function hasChildCaseAssignments() {
221
203
  const ourPConn = getPConnect();
222
204
 
@@ -229,12 +211,13 @@ export default function FlowContainer(props) {
229
211
  return false;
230
212
  }
231
213
 
232
-
233
214
  function hasAssignments() {
234
215
  const ourPConn = getPConnect();
235
216
 
236
217
  let bHasAssignments = false;
237
- const assignmentsList: Array<any> = ourPConn.getValue(pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS);
218
+ const assignmentsList: Array<any> = ourPConn.getValue(
219
+ pCoreConstants.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS
220
+ );
238
221
  const thisOperator = PCore.getEnvironmentInfo().getOperatorIdentifier();
239
222
  // 8.7 includes assignments in Assignments List that may be assigned to
240
223
  // a different operator. So, see if there are any assignments for
@@ -247,47 +230,37 @@ export default function FlowContainer(props) {
247
230
  }
248
231
 
249
232
  for (const assignment of assignmentsList) {
250
- if (assignment["assigneeInfo"]["ID"] === thisOperator) {
233
+ if (assignment['assigneeInfo']['ID'] === thisOperator) {
251
234
  bAssignmentsForThisOperator = true;
252
235
  }
253
236
  }
254
237
 
255
238
  const bHasChildCaseAssignments = hasChildCaseAssignments();
256
239
 
257
- if (
258
- bAssignmentsForThisOperator ||
259
- bHasChildCaseAssignments ||
260
- isCaseWideLocalAction()
261
- ) {
240
+ if (bAssignmentsForThisOperator || bHasChildCaseAssignments || isCaseWideLocalAction()) {
262
241
  bHasAssignments = true;
263
242
  }
264
243
 
265
244
  return bHasAssignments;
266
245
  }
267
246
 
268
-
269
-
270
247
  function getActiveViewLabel() {
271
248
  const ourPConn = getPConnect();
272
249
 
273
- let activeActionLabel = "";
250
+ let activeActionLabel = '';
274
251
 
275
252
  const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
276
253
 
277
254
  const caseActions = ourPConn.getValue(CASE_CONSTS.CASE_INFO_ACTIONS);
278
255
  const activeActionID = ourPConn.getValue(CASE_CONSTS.ACTIVE_ACTION_ID);
279
- const activeAction = caseActions.find(
280
- (action) => action.ID === activeActionID
281
- );
256
+ const activeAction = caseActions.find(action => action.ID === activeActionID);
282
257
  if (activeAction) {
283
258
  activeActionLabel = activeAction.name;
284
259
  }
285
260
  return activeActionLabel;
286
261
  }
287
262
 
288
-
289
- // From WC SDK updateSelf - so do this in useEffect that's run only when the props change...
290
-
263
+ // From SDK-WC updateSelf - so do this in useEffect that's run only when the props change...
291
264
  useEffect(() => {
292
265
  const localPConn = arNewChildren[0].getPConnect();
293
266
 
@@ -299,8 +272,7 @@ export default function FlowContainer(props) {
299
272
  let loadingInfo: any;
300
273
  try {
301
274
  loadingInfo = thePConn.getLoadingStatus();
302
- }
303
- catch (ex) {
275
+ } catch (ex) {
304
276
  // eslint-disable-next-line no-console
305
277
  console.error(`${thePConn.getComponentName()}: loadingInfo catch block`);
306
278
  }
@@ -312,9 +284,9 @@ export default function FlowContainer(props) {
312
284
  // this.psService.sendMessage(false);
313
285
  }
314
286
 
315
- const caseViewMode = thePConn.getValue("context_data.caseViewMode");
287
+ const caseViewMode = thePConn.getValue('context_data.caseViewMode');
316
288
  const { CASE_INFO: CASE_CONSTS } = pCoreConstants;
317
- if (caseViewMode && caseViewMode === "review") {
289
+ if (caseViewMode && caseViewMode === 'review') {
318
290
  setTimeout(() => {
319
291
  // updated for 8.7 - 30-Mar-2022
320
292
  const todoAssignments = getToDoAssignments(thePConn);
@@ -329,45 +301,71 @@ export default function FlowContainer(props) {
329
301
  // in React, when cancel is called, somehow the constructor for flowContainer is called which
330
302
  // does init/add of containers. This mimics that
331
303
  initContainer();
332
- }
333
- else if (caseViewMode && caseViewMode === "perform") {
304
+ } else if (caseViewMode && caseViewMode === 'perform') {
334
305
  // perform
335
306
  // debugger;
336
307
  setShowTodo(false);
337
308
 
338
309
  // this is different than Angular SDK, as we need to initContainer if root container reloaded
339
- if (window.sessionStorage.getItem("okToInitFlowContainer") === "true") {
310
+ if (window.sessionStorage.getItem('okToInitFlowContainer') === 'true') {
340
311
  initContainer();
341
312
  }
313
+ }
314
+
315
+
316
+ // if have caseMessage show message and end
317
+ const theCaseMessages = thePConn.getValue('caseMessages');
342
318
 
343
- // this check in routingInfo, mimic React to check and get the internals of the
319
+ if (theCaseMessages || !hasAssignments()) {
320
+ // Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
321
+ // So, if we get here and caseMessages$ is empty, use default value in DX API response
322
+ setCaseMessages(
323
+ theCaseMessages || 'Thank you! The next step in this case has been routed appropriately.'
324
+ );
325
+ setHasCaseMessages(true);
326
+ setShowConfirm(true);
327
+
328
+ // publish this "assignmentFinished" for mashup, need to get approved as a standard
329
+ PCore.getPubSubUtils().publish('assignmentFinished');
330
+
331
+ // debugger;
332
+ setCheckSvg(Utils.getImageSrc('check', PCore.getAssetLoader().getStaticServerUrl()));
333
+ } else {
334
+ // debugger;
335
+ setHasCaseMessages(false);
336
+ setShowConfirm(false);
337
+ }
338
+
339
+ // this check in routingInfo, mimic React to check and get the internals of the
344
340
  // flowContainer and force updates to pConnect/redux
345
341
  if (routingInfo && loadingInfo !== undefined) {
346
-
347
342
  // debugging/investigation help
348
343
  // console.log(`${thePConn.getComponentName()}: >>routingInfo: ${JSON.stringify(routingInfo)}`);
349
344
 
350
345
  const currentOrder = routingInfo.accessedOrder;
351
346
  const currentItems = routingInfo.items;
352
347
  const type = routingInfo.type;
353
- if (currentOrder && currentItems) { // JA - making more similar to React version
348
+ if (currentOrder && currentItems) {
349
+ // JA - making more similar to React version
354
350
  const key = currentOrder[currentOrder.length - 1];
355
351
 
356
352
  // save off itemKey to be used for finishAssignment, etc.
357
353
  // debugger;
358
354
  setItemKey(key);
359
355
 
360
- if (currentOrder.length > 0 &&
356
+ if (
357
+ currentOrder.length > 0 &&
361
358
  currentItems[key] &&
362
359
  currentItems[key].view &&
363
- type === "single" &&
364
- !Utils.isEmptyObject(currentItems[key].view)) {
360
+ type === 'single' &&
361
+ !Utils.isEmptyObject(currentItems[key].view)
362
+ ) {
365
363
  const currentItem = currentItems[key];
366
364
  const rootView = currentItem.view;
367
365
  const { context } = rootView.config;
368
366
  const config = { meta: rootView };
369
367
 
370
- config["options"] = {
368
+ config['options'] = {
371
369
  context: currentItem.context,
372
370
  pageReference: context || localPConn.getPageReference(),
373
371
  hasForm: true,
@@ -381,21 +379,20 @@ export default function FlowContainer(props) {
381
379
 
382
380
  // Since we're setting an array, need to add in an appropriate key
383
381
  // to remove React warning.
384
- configObject["key"] = config["options"].parentPageReference;
382
+ configObject['key'] = config['options'].parentPageReference;
385
383
 
386
384
  // keep track of these changes
387
385
  const theNewChildren: Array<Object> = [];
388
386
  theNewChildren.push(configObject);
389
387
  setArNewChildren(theNewChildren);
390
388
 
391
- // JEA - adapted from Nebula FlowContainer since we want to render children that are React components
389
+ // JEA - adapted from Constellation DX Components FlowContainer since we want to render children that are React components
392
390
  const root = createElement(createPConnectComponent(), configObject);
393
391
  setArNewChildrenAsReact([root]);
394
392
 
395
393
  const oWorkItem = configObject.getPConnect(); // was theNewChildren[0].getPConnect()
396
394
  const oWorkData = oWorkItem.getDataObject();
397
395
 
398
-
399
396
  // check if have oWorkData, there are times due to timing of state change, when this
400
397
  // may not be available
401
398
  if (oWorkData) {
@@ -403,94 +400,80 @@ export default function FlowContainer(props) {
403
400
  }
404
401
  }
405
402
  }
406
-
407
403
  }
408
- }
409
-
410
- // if have caseMessage show message and end
411
- const theCaseMessages = thePConn.getValue("caseMessages");
412
-
413
- if (theCaseMessages || !hasAssignments()) {
414
-
415
- // Temp fix for 8.7 change: confirmationNote no longer coming through in caseMessages$.
416
- // So, if we get here and caseMessages$ is empty, use default value in DX API response
417
- setCaseMessages(theCaseMessages || "Thank you! The next step in this case has been routed appropriately.");
418
- setHasCaseMessages(true);
419
-
420
-
421
- // publish this "assignmentFinished" for mashup, need to get approved as a standard
422
- PCore.getPubSubUtils().publish(
423
- "assignmentFinished");
424
-
425
-
426
- // debugger;
427
- setCheckSvg(Utils.getImageSrc("check", PCore.getAssetLoader().getStaticServerUrl()));
428
- }
429
- else {
430
- // debugger;
431
- setHasCaseMessages(false);
432
- }
433
404
  }, [props]);
434
405
 
435
406
  const caseId = thePConn.getCaseSummary().content.pyID;
436
- const urgency = getPConnect().getCaseSummary().assignments ? getPConnect().getCaseSummary().assignments[0].urgency : "";
407
+ const urgency = getPConnect().getCaseSummary().assignments
408
+ ? getPConnect().getCaseSummary().assignments[0].urgency
409
+ : '';
437
410
  const operatorInitials = Utils.getInitials(PCore.getEnvironmentInfo().getOperatorName());
438
411
  let instructionText = thePConn.getCaseSummary()?.assignments?.[0]?.instructions;
439
412
  if (instructionText === undefined) {
440
- instructionText = "";
413
+ instructionText = '';
441
414
  }
442
415
 
443
416
  return (
444
- <div style={{ textAlign: "left" }} id={buildName} className="psdk-flow-container-top">
445
- {!bHasCaseMessages ?
446
- (!todo_showTodo) ?
447
- (!displayOnlyFA) ?
417
+ <div style={{ textAlign: 'left' }} id={buildName} className='psdk-flow-container-top'>
418
+ {!bShowConfirm &&
419
+ (!todo_showTodo ? (
420
+ !displayOnlyFA ? (
448
421
  <Card className={classes.root}>
449
422
  <CardHeader
450
- title={<Typography variant="h6">{containerName}</Typography>}
423
+ title={<Typography variant='h6'>{containerName}</Typography>}
451
424
  subheader={`Task in ${caseId} \u2022 Priority ${urgency}`}
452
- avatar={
453
- <Avatar className={classes.avatar}>
454
- {operatorInitials}
455
- </Avatar>
456
- }
425
+ avatar={<Avatar className={classes.avatar}>{operatorInitials}</Avatar>}
457
426
  ></CardHeader>
458
- { instructionText !== '' ? <Typography variant="caption">{instructionText}</Typography> : null }
427
+ {instructionText !== '' ? (
428
+ <Typography variant='caption'>{instructionText}</Typography>
429
+ ) : null}
459
430
  <MuiPickersUtilsProvider utils={DayjsUtils}>
460
431
  <Assignment getPConnect={getPConnect} itemKey={itemKey}>
461
432
  {arNewChildrenAsReact}
462
433
  </Assignment>
463
434
  </MuiPickersUtilsProvider>
464
435
  </Card>
465
- :
436
+ ) : (
466
437
  <Card className={classes.root}>
467
- <Typography variant="h6">{containerName}</Typography>
468
- { instructionText !== '' ? <Typography variant="caption">{instructionText}</Typography> : null }
438
+ <Typography variant='h6'>{containerName}</Typography>
439
+ {instructionText !== '' ? (
440
+ <Typography variant='caption'>{instructionText}</Typography>
441
+ ) : null}
469
442
  <MuiPickersUtilsProvider utils={DayjsUtils}>
470
443
  <Assignment getPConnect={getPConnect} itemKey={itemKey}>
471
444
  {arNewChildrenAsReact}
472
445
  </Assignment>
473
446
  </MuiPickersUtilsProvider>
474
447
  </Card>
475
- :
448
+ )
449
+ ) : (
476
450
  <div>
477
- <ToDo getPConnect={getPConnect} caseInfoID={todo_caseInfoID} datasource={todo_datasource}
478
- showTodoList={todo_showTodoList} headerText={todo_headerText} type={TODO}
479
- context={todo_context} itemKey={itemKey}></ToDo>
451
+ <ToDo
452
+ getPConnect={getPConnect}
453
+ caseInfoID={todo_caseInfoID}
454
+ datasource={todo_datasource}
455
+ showTodoList={todo_showTodoList}
456
+ headerText={todo_headerText}
457
+ type={TODO}
458
+ context={todo_context}
459
+ itemKey={itemKey}
460
+ ></ToDo>
480
461
  </div>
481
- :
462
+ ))}
463
+ {bHasCaseMessages && (
482
464
  <div className={classes.alert}>
483
- <Alert severity="success">{caseMessages}</Alert>
465
+ <Alert severity='success'>{caseMessages}</Alert>
484
466
  </div>
485
- }
467
+ )}
468
+ {bShowConfirm && <Card className={classes.root}>{arNewChildrenAsReact}</Card>}
486
469
  </div>
487
- )
470
+ );
488
471
  }
489
472
 
490
473
  FlowContainer.defaultProps = {
491
474
  children: null,
492
475
  getPConnect: null,
493
- name: "",
476
+ name: '',
494
477
  routingInfo: null,
495
478
  pageMessages: null
496
479
  };
@@ -1,5 +1,3 @@
1
- // Adapted from nebula ErrorBoundary (remove Cosmos dependencies)
2
-
3
1
  import React from "react";
4
2
  import PropTypes from "prop-types";
5
3
 
@@ -16,18 +14,6 @@ function ErrorBoundary(props) {
16
14
  if (!getPConnect) {
17
15
  return (
18
16
  theErrorDiv
19
- // <Flex
20
- // container={{
21
- // alignItems: "center",
22
- // justify: "center",
23
- // itemGap: 1
24
- // }}
25
- // >
26
- // <Text status="error">
27
- // <Icon name="warn-solid" />
28
- // </Text>
29
- // <Text data-testid="errorText">{ERROR_TEXT}</Text>
30
- // </Flex>
31
17
  );
32
18
  }
33
19
 
@@ -43,12 +29,6 @@ function ErrorBoundary(props) {
43
29
  if (pConn.getConfigProps().type === "page") {
44
30
  return (
45
31
  theErrorDiv
46
- // <Banner
47
- // data-testid="errorBanner"
48
- // variant="urgent"
49
- // heading="Error"
50
- // messages={[ERROR_TEXT]}
51
- // />
52
32
  );
53
33
  }
54
34
 
@@ -64,30 +44,6 @@ function ErrorBoundary(props) {
64
44
 
65
45
  return (
66
46
  theErrorDiv
67
- // <Card>
68
- // <CardHeader>
69
- // <Text variant="h3">
70
- // {pConn.getConfigProps().label || pConn.getComponentName()}
71
- // </Text>
72
- // </CardHeader>
73
- // <CardContent
74
- // direction="row"
75
- // style={{ minHeight: "5rem", justifyContent: "center" }}
76
- // >
77
- // <Flex
78
- // container={{
79
- // alignItems: "center",
80
- // justify: "center",
81
- // itemGap: 1
82
- // }}
83
- // >
84
- // <Text status="error">
85
- // <Icon name="warn-solid" />
86
- // </Text>
87
- // <Text>{ERROR_TEXT}</Text>
88
- // </Flex>
89
- // </CardContent>
90
- // </Card>
91
47
  );
92
48
  }
93
49
  ErrorBoundary.propTypes = {