@pega/react-sdk-overrides 0.23.21 → 0.23.22
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.
|
@@ -74,11 +74,12 @@ export default function Currency(props) {
|
|
|
74
74
|
return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
|
|
77
78
|
function currOnChange(event, inValue) {
|
|
78
79
|
// console.log(`Currency currOnChange inValue: ${inValue}`);
|
|
79
80
|
|
|
80
81
|
// update internal value
|
|
81
|
-
setCurrValue(
|
|
82
|
+
setCurrValue(event?.target?.value);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
function currOnBlur(event, inValue) {
|
|
@@ -15,7 +15,7 @@ import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreCon
|
|
|
15
15
|
import DayjsUtils from '@date-io/dayjs';
|
|
16
16
|
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
17
17
|
|
|
18
|
-
import { addContainerItem, getToDoAssignments } from './helpers';
|
|
18
|
+
import { addContainerItem, getToDoAssignments, showBanner } from './helpers';
|
|
19
19
|
|
|
20
20
|
declare const PCore;
|
|
21
21
|
|
|
@@ -312,7 +312,6 @@ export default function FlowContainer(props) {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
|
|
316
315
|
// if have caseMessage show message and end
|
|
317
316
|
const theCaseMessages = thePConn.getValue('caseMessages');
|
|
318
317
|
|
|
@@ -337,70 +336,70 @@ export default function FlowContainer(props) {
|
|
|
337
336
|
}
|
|
338
337
|
|
|
339
338
|
// this check in routingInfo, mimic React to check and get the internals of the
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
}
|
|
339
|
+
// flowContainer and force updates to pConnect/redux
|
|
340
|
+
if (routingInfo && loadingInfo !== undefined) {
|
|
341
|
+
// debugging/investigation help
|
|
342
|
+
// console.log(`${thePConn.getComponentName()}: >>routingInfo: ${JSON.stringify(routingInfo)}`);
|
|
343
|
+
|
|
344
|
+
const currentOrder = routingInfo.accessedOrder;
|
|
345
|
+
const currentItems = routingInfo.items;
|
|
346
|
+
const type = routingInfo.type;
|
|
347
|
+
if (currentOrder && currentItems) {
|
|
348
|
+
// JA - making more similar to React version
|
|
349
|
+
const key = currentOrder[currentOrder.length - 1];
|
|
350
|
+
|
|
351
|
+
// save off itemKey to be used for finishAssignment, etc.
|
|
352
|
+
// debugger;
|
|
353
|
+
setItemKey(key);
|
|
354
|
+
|
|
355
|
+
if (
|
|
356
|
+
currentOrder.length > 0 &&
|
|
357
|
+
currentItems[key] &&
|
|
358
|
+
currentItems[key].view &&
|
|
359
|
+
type === 'single' &&
|
|
360
|
+
!Utils.isEmptyObject(currentItems[key].view)
|
|
361
|
+
) {
|
|
362
|
+
const currentItem = currentItems[key];
|
|
363
|
+
const rootView = currentItem.view;
|
|
364
|
+
const { context } = rootView.config;
|
|
365
|
+
const config = { meta: rootView };
|
|
366
|
+
|
|
367
|
+
config['options'] = {
|
|
368
|
+
context: currentItem.context,
|
|
369
|
+
pageReference: context || localPConn.getPageReference(),
|
|
370
|
+
hasForm: true,
|
|
371
|
+
isFlowContainer: true,
|
|
372
|
+
containerName: localPConn.getContainerName(),
|
|
373
|
+
containerItemName: key,
|
|
374
|
+
parentPageReference: localPConn.getPageReference()
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
const configObject = PCore.createPConnect(config);
|
|
378
|
+
|
|
379
|
+
// Since we're setting an array, need to add in an appropriate key
|
|
380
|
+
// to remove React warning.
|
|
381
|
+
configObject['key'] = config['options'].parentPageReference;
|
|
382
|
+
|
|
383
|
+
// keep track of these changes
|
|
384
|
+
const theNewChildren: Array<Object> = [];
|
|
385
|
+
theNewChildren.push(configObject);
|
|
386
|
+
setArNewChildren(theNewChildren);
|
|
387
|
+
|
|
388
|
+
// JEA - adapted from Constellation DX Components FlowContainer since we want to render children that are React components
|
|
389
|
+
const root = createElement(createPConnectComponent(), configObject);
|
|
390
|
+
setArNewChildrenAsReact([root]);
|
|
391
|
+
|
|
392
|
+
const oWorkItem = configObject.getPConnect(); // was theNewChildren[0].getPConnect()
|
|
393
|
+
const oWorkData = oWorkItem.getDataObject();
|
|
394
|
+
|
|
395
|
+
// check if have oWorkData, there are times due to timing of state change, when this
|
|
396
|
+
// may not be available
|
|
397
|
+
if (oWorkData) {
|
|
398
|
+
setContainerName(getActiveViewLabel() || oWorkData.caseInfo.assignments?.[0].name);
|
|
401
399
|
}
|
|
402
400
|
}
|
|
403
401
|
}
|
|
402
|
+
}
|
|
404
403
|
}, [props]);
|
|
405
404
|
|
|
406
405
|
const caseId = thePConn.getCaseSummary().content.pyID;
|
|
@@ -413,6 +412,8 @@ export default function FlowContainer(props) {
|
|
|
413
412
|
instructionText = '';
|
|
414
413
|
}
|
|
415
414
|
|
|
415
|
+
const bShowBanner = showBanner(getPConnect);
|
|
416
|
+
|
|
416
417
|
return (
|
|
417
418
|
<div style={{ textAlign: 'left' }} id={buildName} className='psdk-flow-container-top'>
|
|
418
419
|
{!bShowConfirm &&
|
|
@@ -465,7 +466,7 @@ export default function FlowContainer(props) {
|
|
|
465
466
|
<Alert severity='success'>{caseMessages}</Alert>
|
|
466
467
|
</div>
|
|
467
468
|
)}
|
|
468
|
-
{bShowConfirm && <div>{arNewChildrenAsReact}</div>}
|
|
469
|
+
{bShowConfirm && bShowBanner && <div>{arNewChildrenAsReact}</div>}
|
|
469
470
|
</div>
|
|
470
471
|
);
|
|
471
472
|
}
|
package/package.json
CHANGED