@pega/react-sdk-overrides 8.23.11 → 23.1.11
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/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/designSystemExtension/AlertBanner/AlertBanner.tsx +12 -16
- package/lib/designSystemExtension/Banner/Banner.tsx +21 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +36 -26
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +21 -28
- package/lib/designSystemExtension/DetailsFields/index.tsx +1 -1
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +50 -18
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +14 -11
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +18 -27
- package/lib/designSystemExtension/Operator/Operator.tsx +100 -84
- package/lib/designSystemExtension/Pulse/Pulse.tsx +21 -19
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +122 -0
- package/lib/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +21 -12
- package/lib/field/AutoComplete/AutoComplete.tsx +33 -16
- package/lib/field/AutoComplete/config-ext.json +2 -3
- package/lib/field/CancelAlert/CancelAlert.tsx +100 -81
- package/lib/field/CancelAlert/index.tsx +1 -1
- package/lib/field/Checkbox/Checkbox.tsx +27 -16
- package/lib/field/Checkbox/config-ext.json +2 -3
- package/lib/field/Currency/Currency.tsx +30 -47
- package/lib/field/Currency/config-ext.json +2 -3
- package/lib/field/Currency/currency-utils.ts +10 -21
- package/lib/field/Date/Date.tsx +24 -13
- package/lib/field/Date/config-ext.json +2 -3
- package/lib/field/DateTime/DateTime.tsx +21 -10
- package/lib/field/DateTime/config-ext.json +1 -2
- package/lib/field/Decimal/Decimal.tsx +31 -40
- package/lib/field/Decimal/config-ext.json +1 -2
- package/lib/field/Decimal/index.tsx +1 -1
- package/lib/field/Dropdown/Dropdown.tsx +128 -31
- package/lib/field/Dropdown/config-ext.json +1 -2
- package/lib/field/Email/Email.tsx +16 -7
- package/lib/field/Email/config-ext.json +1 -2
- package/lib/field/Email/index.tsx +1 -1
- package/lib/field/Group/Group.tsx +39 -0
- package/lib/field/Group/config-ext.json +7 -0
- package/lib/field/Group/index.tsx +1 -0
- package/lib/field/Integer/Integer.tsx +15 -6
- package/lib/field/Integer/config-ext.json +1 -2
- package/lib/field/Percentage/Percentage.tsx +52 -39
- package/lib/field/Percentage/config-ext.json +1 -2
- package/lib/field/Phone/Phone.tsx +15 -6
- package/lib/field/Phone/index.tsx +1 -1
- package/lib/field/RadioButtons/RadioButtons.tsx +26 -34
- package/lib/field/RadioButtons/config-ext.json +1 -2
- package/lib/field/RichText/RichText.tsx +96 -0
- package/lib/field/RichText/index.tsx +1 -0
- package/lib/field/ScalarList/ScalarList.tsx +63 -0
- package/lib/field/ScalarList/config-ext.json +7 -0
- package/lib/field/ScalarList/index.tsx +1 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +26 -25
- package/lib/field/SemanticLink/config-ext.json +1 -2
- package/lib/field/SemanticLink/utils.ts +8 -11
- package/lib/field/TextArea/TextArea.tsx +15 -5
- package/lib/field/TextArea/config-ext.json +1 -2
- package/lib/field/TextContent/TextContent.tsx +9 -2
- package/lib/field/TextContent/config-ext.json +1 -2
- package/lib/field/TextInput/TextInput.tsx +18 -7
- package/lib/field/TextInput/config-ext.json +1 -2
- package/lib/field/TextInput/index.tsx +1 -1
- package/lib/field/Time/Time.tsx +14 -19
- package/lib/field/Time/config-ext.json +1 -2
- package/lib/field/URL/URL.tsx +15 -6
- package/lib/field/URL/config-ext.json +1 -2
- package/lib/field/URL/index.tsx +1 -1
- package/lib/field/UserReference/UserReference.tsx +52 -60
- package/lib/field/UserReference/UserReferenceUtils.ts +2 -2
- package/lib/field/UserReference/config-ext.json +1 -2
- package/lib/helpers/attachmentHelpers.ts +15 -10
- package/lib/helpers/case-utils.tsx +5 -10
- package/lib/helpers/common-utils.ts +6 -2
- package/lib/helpers/data_page.ts +3 -7
- package/lib/helpers/date-format-utils.ts +4 -4
- package/lib/helpers/event-utils.ts +4 -4
- package/lib/helpers/field-group-utils.ts +6 -8
- package/lib/helpers/formatters/Boolean.ts +9 -26
- package/lib/helpers/formatters/Currency.ts +22 -28
- package/lib/helpers/formatters/CurrencyMap.ts +512 -505
- package/lib/helpers/formatters/Date.ts +20 -26
- package/lib/helpers/formatters/common.ts +2 -7
- package/lib/helpers/formatters/index.ts +29 -22
- package/lib/helpers/reactContextHelpers.ts +2 -2
- package/lib/helpers/simpleTableHelpers.ts +63 -87
- package/lib/helpers/state-utils.tsx +5 -12
- package/lib/helpers/template-utils.ts +4 -10
- package/lib/helpers/utils.ts +5 -5
- package/lib/helpers/versionHelpers.ts +1 -7
- package/lib/infra/ActionButtons/ActionButtons.tsx +44 -45
- package/lib/infra/ActionButtons/index.tsx +1 -1
- package/lib/infra/Assignment/Assignment.tsx +102 -86
- package/lib/infra/Assignment/index.tsx +1 -1
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +19 -26
- package/lib/infra/AssignmentCard/index.tsx +1 -1
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +93 -240
- package/lib/infra/Containers/FlowContainer/helpers.ts +34 -48
- package/lib/infra/Containers/FlowContainer/index.tsx +1 -1
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +65 -0
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +229 -223
- package/lib/infra/Containers/ModalViewContainer/index.tsx +1 -1
- package/lib/infra/Containers/SimpleView/SimpleView.tsx +48 -0
- package/lib/infra/Containers/SimpleView/helper.ts +125 -0
- package/lib/infra/Containers/SimpleView/index.tsx +1 -0
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +47 -64
- package/lib/infra/Containers/helpers.ts +6 -0
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +25 -54
- package/lib/infra/DashboardFilter/filterUtils.tsx +12 -42
- package/lib/infra/DeferLoad/DeferLoad.tsx +21 -33
- package/lib/infra/DeferLoad/index.tsx +1 -1
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +21 -39
- package/lib/infra/MultiStep/MultiStep.css +11 -15
- package/lib/infra/MultiStep/MultiStep.tsx +180 -216
- package/lib/infra/MultiStep/index.tsx +1 -1
- package/lib/infra/NavBar/NavBar.css +103 -105
- package/lib/infra/NavBar/NavBar.tsx +26 -45
- package/lib/infra/Reference/Reference.tsx +16 -22
- package/lib/infra/Region/Region.tsx +9 -9
- package/lib/infra/RootContainer/RootContainer.tsx +75 -120
- package/lib/infra/RootContainer/index.tsx +1 -1
- package/lib/infra/Stages/Stages.tsx +36 -41
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +17 -10
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +29 -36
- package/lib/infra/View/View.tsx +25 -29
- package/lib/template/AppShell/AppShell.css +22 -23
- package/lib/template/AppShell/AppShell.tsx +47 -71
- package/lib/template/BannerPage/BannerPage.tsx +26 -33
- package/lib/template/CaseSummary/CaseSummary.tsx +66 -19
- package/lib/template/CaseSummary/config-ext.json +1 -2
- package/lib/template/CaseView/CaseView.tsx +44 -74
- package/lib/template/CaseView/config-ext.json +1 -2
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +66 -31
- package/lib/template/Confirmation/Confirmation.tsx +24 -55
- package/lib/template/Confirmation/config-ext.json +1 -2
- package/lib/template/DataReference/DataReference.tsx +112 -142
- package/lib/template/DataReference/config-ext.json +1 -2
- package/lib/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/template/DefaultForm/DefaultForm.tsx +15 -16
- package/lib/template/DefaultForm/config-ext.json +1 -2
- package/lib/template/Details/Details/Details.tsx +24 -28
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +15 -22
- package/lib/template/Details/DetailsSubTabs/config-ext.json +1 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +25 -29
- package/lib/template/Details/DetailsThreeColumn/config-ext.json +1 -2
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +25 -29
- package/lib/template/Details/DetailsTwoColumn/config-ext.json +1 -2
- package/lib/template/Details/DetailsTwoColumn/index.tsx +1 -1
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +79 -0
- package/lib/template/Details/DynamicTabs/config.json +36 -0
- package/lib/template/Details/DynamicTabs/index.tsx +1 -0
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +22 -35
- package/lib/template/InlineDashboard/InlineDashboard.tsx +16 -14
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +19 -21
- package/lib/template/ListPage/ListPage.tsx +12 -16
- package/lib/template/ListPage/config-ext.json +1 -2
- package/lib/template/ListView/DefaultViewMeta.ts +1 -3
- package/lib/template/ListView/ListView.tsx +247 -309
- package/lib/template/ListView/config-ext.json +1 -2
- package/lib/template/ListView/hooks.ts +24 -26
- package/lib/template/ListView/utils.ts +205 -94
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +25 -34
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +31 -29
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +27 -31
- package/lib/template/NarrowWide/NarrowWideDetails/config-ext.json +1 -2
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +17 -19
- package/lib/template/NarrowWide/NarrowWideForm/config-ext.json +1 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +16 -26
- package/lib/template/NarrowWide/NarrowWidePage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +17 -17
- package/lib/template/OneColumn/OneColumn/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +9 -16
- package/lib/template/OneColumn/OneColumnPage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +8 -14
- package/lib/template/OneColumn/OneColumnTab/config-ext.json +1 -2
- package/lib/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/template/PromotedFilters/PromotedFilters.tsx +39 -33
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +113 -15
- package/lib/template/SimpleTable/SimpleTable/config-ext.json +1 -2
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +187 -104
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +33 -44
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +45 -48
- package/lib/template/SubTabs/SubTabs.tsx +26 -45
- package/lib/template/SubTabs/config-ext.json +1 -2
- package/lib/template/SubTabs/tabUtils.ts +2 -9
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +33 -36
- package/lib/template/TwoColumn/TwoColumn/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +9 -16
- package/lib/template/TwoColumn/TwoColumnPage/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +33 -33
- package/lib/template/TwoColumn/TwoColumnTab/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +29 -27
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +39 -33
- package/lib/template/WideNarrow/WideNarrowDetails/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +16 -18
- package/lib/template/WideNarrow/WideNarrowForm/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +15 -25
- package/lib/template/WideNarrow/WideNarrowPage/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowPage/index.tsx +1 -1
- package/lib/template/WssNavBar/WssNavBar.tsx +24 -10
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +34 -41
- package/lib/widget/AppAnnouncement/config-ext.json +1 -2
- package/lib/widget/Attachment/Attachment.css +60 -1
- package/lib/widget/Attachment/Attachment.tsx +379 -394
- package/lib/widget/Attachment/index.tsx +1 -1
- package/lib/widget/CaseHistory/CaseHistory.tsx +67 -67
- package/lib/widget/CaseHistory/config-ext.json +1 -2
- package/lib/widget/CaseHistory/index.tsx +1 -1
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +19 -9
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +322 -245
- package/lib/widget/FileUtility/FileUtility/config-ext.json +1 -2
- package/lib/widget/Followers/Followers.tsx +27 -25
- package/lib/widget/Followers/config-ext.json +1 -2
- package/lib/widget/QuickCreate/QuickCreate.tsx +71 -39
- package/lib/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/widget/SummaryItem/SummaryItem.tsx +62 -52
- package/lib/widget/SummaryItem/index.tsx +1 -1
- package/lib/widget/SummaryList/SummaryList.tsx +15 -4
- package/lib/widget/ToDo/ToDo.css +4 -4
- package/lib/widget/ToDo/ToDo.tsx +72 -116
- package/lib/widget/ToDo/config-ext.json +1 -2
- package/package.json +5 -2
- package/lib/helpers/auth.js +0 -483
- package/lib/helpers/authManager.js +0 -634
- package/lib/helpers/config_access.js +0 -259
|
@@ -1,45 +1,86 @@
|
|
|
1
|
-
import
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import isEqual from 'fast-deep-equal';
|
|
1
|
+
import { createElement, useEffect, useRef, useState } from 'react';
|
|
4
2
|
import Dialog from '@material-ui/core/Dialog';
|
|
5
3
|
import DialogContent from '@material-ui/core/DialogContent';
|
|
6
4
|
import DialogTitle from '@material-ui/core/DialogTitle';
|
|
7
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
6
|
+
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
7
|
+
import DayjsUtils from '@date-io/dayjs';
|
|
8
|
+
import difference from 'lodash.difference';
|
|
9
|
+
|
|
8
10
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
9
11
|
// Need to get correct implementation from component map for Assignment and CancelAlert
|
|
10
12
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
13
|
import { getBanners } from '@pega/react-sdk-components/lib/components/helpers/case-utils';
|
|
12
|
-
import {
|
|
14
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
15
|
+
|
|
16
|
+
interface ModalViewContainerProps extends PConnProps {
|
|
17
|
+
// If any, enter additional props that only exist on this component
|
|
18
|
+
loadingInfo?: string;
|
|
19
|
+
routingInfo?: any;
|
|
20
|
+
pageMessages?: string[];
|
|
21
|
+
}
|
|
13
22
|
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
function isOpenModalAction(prevModalCollection, currentModalList) {
|
|
24
|
+
return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length < currentModalList.length : false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function isUpdateModalAction(prevModalCollection, currentModalList) {
|
|
28
|
+
return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length === currentModalList.length : false;
|
|
29
|
+
}
|
|
16
30
|
|
|
31
|
+
function isCloseModalAction(prevModalCollection, currentModalList) {
|
|
32
|
+
return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length > currentModalList.length : false;
|
|
33
|
+
}
|
|
17
34
|
|
|
18
35
|
function buildName(pConnect, name = '') {
|
|
19
36
|
const context = pConnect.getContextName();
|
|
20
37
|
return `${context}/${name}`;
|
|
21
38
|
}
|
|
22
39
|
|
|
23
|
-
function getKeyAndLatestItem(routinginfo, pConn) {
|
|
40
|
+
function getKeyAndLatestItem(routinginfo, pConn, options) {
|
|
24
41
|
const containerName = pConn.getContainerName();
|
|
42
|
+
const { acTertiary = false } = options || {};
|
|
25
43
|
if (PCore.getContainerUtils().hasContainerItems(buildName(pConn, containerName))) {
|
|
26
44
|
const { accessedOrder, items } = routinginfo;
|
|
27
|
-
|
|
45
|
+
let key;
|
|
46
|
+
// eslint-disable-next-line no-plusplus
|
|
47
|
+
for (let i = accessedOrder.length - 1; i >= 0; i--) {
|
|
48
|
+
const tempkey = accessedOrder[i];
|
|
49
|
+
if ((acTertiary && items[tempkey].acTertiary) || (!acTertiary && !items[tempkey].acTertiary)) {
|
|
50
|
+
key = tempkey;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
28
54
|
const latestItem = items[key];
|
|
29
55
|
return { key, latestItem };
|
|
30
56
|
}
|
|
31
57
|
return {};
|
|
32
58
|
}
|
|
33
59
|
|
|
34
|
-
function getConfigObject(item, pConnect) {
|
|
60
|
+
function getConfigObject(item, pConnect, isReverseCoexistence = false) {
|
|
61
|
+
let config;
|
|
62
|
+
if (isReverseCoexistence) {
|
|
63
|
+
config = {
|
|
64
|
+
options: {
|
|
65
|
+
pageReference: pConnect?.getPageReference(),
|
|
66
|
+
hasForm: true,
|
|
67
|
+
containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return PCore.createPConnect(config);
|
|
71
|
+
}
|
|
35
72
|
if (item) {
|
|
36
|
-
const { context, view } = item;
|
|
37
|
-
const
|
|
73
|
+
const { context, view, isBulkAction } = item;
|
|
74
|
+
const target = PCore.getContainerUtils().getTargetFromContainerItemID(context);
|
|
75
|
+
config = {
|
|
38
76
|
meta: view,
|
|
39
77
|
options: {
|
|
40
78
|
context,
|
|
41
79
|
pageReference: view.config.context || pConnect.getPageReference(),
|
|
42
|
-
hasForm: true
|
|
80
|
+
hasForm: true,
|
|
81
|
+
...(isBulkAction && { isBulkAction }),
|
|
82
|
+
containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL,
|
|
83
|
+
target
|
|
43
84
|
}
|
|
44
85
|
};
|
|
45
86
|
return PCore.createPConnect(config);
|
|
@@ -53,95 +94,111 @@ const useStyles = makeStyles(theme => ({
|
|
|
53
94
|
marginRight: theme.spacing(2),
|
|
54
95
|
marginTop: theme.spacing(2),
|
|
55
96
|
marginBottom: theme.spacing(0)
|
|
56
|
-
// paddingLeft: theme.spacing(0),
|
|
57
|
-
// paddingRight: theme.spacing(0),
|
|
58
|
-
// paddingTop: theme.spacing(0),
|
|
59
|
-
// paddingBottom: theme.spacing(0),
|
|
60
97
|
},
|
|
61
98
|
dlgContent: {
|
|
62
99
|
marginLeft: theme.spacing(2),
|
|
63
100
|
marginRight: theme.spacing(2),
|
|
64
101
|
marginTop: theme.spacing(0),
|
|
65
102
|
marginBottom: theme.spacing(2)
|
|
66
|
-
// paddingLeft: theme.spacing(0),
|
|
67
|
-
// paddingRight: theme.spacing(0),
|
|
68
|
-
// paddingTop: theme.spacing(0),
|
|
69
|
-
// paddingBottom: theme.spacing(0),
|
|
70
103
|
}
|
|
71
104
|
}));
|
|
72
105
|
|
|
73
|
-
|
|
106
|
+
export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
74
107
|
// Get the proper implementation (local or Pega-provided) for these components that are emitted below
|
|
75
|
-
const Assignment = getComponentFromMap(
|
|
76
|
-
const CancelAlert = getComponentFromMap(
|
|
108
|
+
const Assignment = getComponentFromMap('Assignment');
|
|
109
|
+
const CancelAlert = getComponentFromMap('CancelAlert');
|
|
110
|
+
const ListViewActionButtons = getComponentFromMap('ListViewActionButtons');
|
|
77
111
|
|
|
78
112
|
const classes = useStyles();
|
|
79
113
|
|
|
114
|
+
const modalCollection = useRef({});
|
|
80
115
|
const routingInfoRef = useRef({});
|
|
81
|
-
const { getPConnect, routingInfo
|
|
116
|
+
const { getPConnect, routingInfo = null, pageMessages = [] } = props;
|
|
82
117
|
const pConn = getPConnect();
|
|
118
|
+
const { acTertiary } = pConn.getConfigProps() as any;
|
|
83
119
|
const {
|
|
84
120
|
CONTAINER_TYPE: { MULTIPLE },
|
|
85
121
|
PUB_SUB_EVENTS: { EVENT_SHOW_CANCEL_ALERT }
|
|
86
122
|
} = PCore.getConstants();
|
|
87
|
-
const { subscribe } = PCore.getPubSubUtils();
|
|
123
|
+
const { subscribe, unsubscribe } = PCore.getPubSubUtils();
|
|
88
124
|
const [bShowModal, setShowModal] = useState(false);
|
|
89
|
-
const [bSubscribed, setSubscribed] = useState(false);
|
|
90
125
|
const [bShowCancelAlert, setShowCancelAlert] = useState(false);
|
|
91
|
-
const [oCaseInfo, setOCaseInfo] = useState({});
|
|
92
126
|
const [createdView, setCreatedView] = useState<any>(null);
|
|
93
127
|
const [title, setTitle] = useState('');
|
|
94
|
-
const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState<
|
|
128
|
+
const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState<any[]>([]);
|
|
95
129
|
const [itemKey, setItemKey] = useState('');
|
|
96
|
-
const [
|
|
97
|
-
|
|
130
|
+
const [cancelAlertProps, setCancelAlertProps] = useState({});
|
|
131
|
+
const [isMultiRecordData, setMultiRecordData] = useState(false);
|
|
98
132
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
99
133
|
const localeCategory = 'Data Object';
|
|
100
134
|
|
|
135
|
+
const ERROR_WHILE_RENDERING = 'ERROR_WHILE_RENDERING';
|
|
101
136
|
|
|
102
137
|
function showAlert(payload) {
|
|
103
|
-
const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn);
|
|
104
|
-
const
|
|
138
|
+
const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn, { acTertiary });
|
|
139
|
+
const isReverseCoexistence = (PCore.getCoexistenceManager().getBroadcastUtils() as any).isReverseCoexistenceCaseLoaded();
|
|
140
|
+
const { isModalAction, hideDelete, isDataObject, skipReleaseLockRequest } = payload;
|
|
105
141
|
|
|
106
142
|
/*
|
|
107
143
|
If we are in create stage full page mode, created a new case and trying to click on cancel button
|
|
108
144
|
it will show two alert dialogs which is not expected. Hence isModalAction flag to avoid that.
|
|
109
145
|
*/
|
|
110
146
|
if (latestItem && isModalAction) {
|
|
111
|
-
const configObject = getConfigObject(latestItem, pConn);
|
|
112
|
-
|
|
147
|
+
const configObject = getConfigObject(latestItem, pConn, isReverseCoexistence);
|
|
148
|
+
const contextName = configObject?.getPConnect().getContextName();
|
|
149
|
+
setCancelAlertProps({
|
|
150
|
+
heading: 'Discard unsaved changes?',
|
|
151
|
+
content: 'You have unsaved changes. You can discard them or go back to keep working.',
|
|
152
|
+
getPConnect: configObject?.getPConnect,
|
|
153
|
+
itemKey: contextName,
|
|
154
|
+
hideDelete,
|
|
155
|
+
isDataObject,
|
|
156
|
+
skipReleaseLockRequest
|
|
157
|
+
});
|
|
113
158
|
setShowCancelAlert(true);
|
|
114
159
|
}
|
|
115
160
|
}
|
|
116
161
|
|
|
117
|
-
function
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
} else {
|
|
124
|
-
const sCurrentCaseInfo = JSON.stringify(oCurrentCaseInfo);
|
|
125
|
-
const sOldCaseInfo = JSON.stringify(oCaseInfo);
|
|
126
|
-
// stringify compare version
|
|
127
|
-
if (sCurrentCaseInfo !== sOldCaseInfo) {
|
|
128
|
-
bRet = true;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
162
|
+
function handleModalOpen(key) {
|
|
163
|
+
modalCollection.current = {
|
|
164
|
+
...modalCollection.current,
|
|
165
|
+
[key]: {}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
131
168
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
169
|
+
function handleModalClose(accessedOrder) {
|
|
170
|
+
const tempModalCollection = modalCollection.current;
|
|
171
|
+
const [closedModalKey] = difference(Object.keys(tempModalCollection), accessedOrder);
|
|
136
172
|
|
|
137
|
-
|
|
173
|
+
if (closedModalKey && tempModalCollection[closedModalKey]) {
|
|
174
|
+
const modifiedModalCollection = { ...tempModalCollection };
|
|
175
|
+
delete modifiedModalCollection[closedModalKey];
|
|
176
|
+
modalCollection.current = modifiedModalCollection;
|
|
177
|
+
setShowModal(false);
|
|
178
|
+
}
|
|
138
179
|
}
|
|
139
180
|
|
|
140
|
-
const
|
|
181
|
+
const dismissCancelAlert = dismissAllModals => {
|
|
141
182
|
setShowCancelAlert(false);
|
|
142
|
-
|
|
183
|
+
|
|
184
|
+
if (dismissAllModals) {
|
|
185
|
+
setShowModal(false);
|
|
186
|
+
}
|
|
143
187
|
};
|
|
144
188
|
|
|
189
|
+
function getModalHeading(dataObjectAction) {
|
|
190
|
+
return dataObjectAction === PCore.getConstants().RESOURCE_STATUS.CREATE
|
|
191
|
+
? localizedVal('Add Record', localeCategory)
|
|
192
|
+
: localizedVal('Edit Record', localeCategory);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function determineModalHeaderByAction(actionName, caseTypeName, ID, caseLocaleRef) {
|
|
196
|
+
if (actionName) {
|
|
197
|
+
return localizedVal(actionName, localeCategory);
|
|
198
|
+
}
|
|
199
|
+
return `${localizedVal('Create', localeCategory)} ${localizedVal(caseTypeName, undefined, caseLocaleRef)} (${ID})`;
|
|
200
|
+
}
|
|
201
|
+
|
|
145
202
|
useEffect(() => {
|
|
146
203
|
// Establish the necessary containers
|
|
147
204
|
const containerMgr = pConn.getContainerManager();
|
|
@@ -149,191 +206,140 @@ const ModalViewContainer = props => {
|
|
|
149
206
|
}, [MULTIPLE, pConn]);
|
|
150
207
|
|
|
151
208
|
useEffect(() => {
|
|
152
|
-
//
|
|
209
|
+
// Persisting routing information between the renders in showAlert
|
|
153
210
|
routingInfoRef.current = routingInfo;
|
|
154
|
-
}
|
|
211
|
+
});
|
|
155
212
|
|
|
156
213
|
useEffect(() => {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
214
|
+
subscribe(EVENT_SHOW_CANCEL_ALERT, showAlert, EVENT_SHOW_CANCEL_ALERT /* Unique string for subscription */);
|
|
215
|
+
subscribe(
|
|
216
|
+
ERROR_WHILE_RENDERING,
|
|
217
|
+
error => {
|
|
218
|
+
// setError(true);
|
|
219
|
+
// eslint-disable-next-line no-console
|
|
220
|
+
console.error(error);
|
|
221
|
+
},
|
|
222
|
+
`${ERROR_WHILE_RENDERING}-mc-${getPConnect().getContextName()}`,
|
|
223
|
+
false,
|
|
224
|
+
getPConnect().getContextName()
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
// Unsubscribe on component unmount
|
|
228
|
+
return () => {
|
|
229
|
+
unsubscribe(EVENT_SHOW_CANCEL_ALERT, EVENT_SHOW_CANCEL_ALERT /* Should be same unique string passed during subscription */);
|
|
230
|
+
};
|
|
231
|
+
});
|
|
163
232
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
// console.log(`---> ModalViewContainer created new ${newCompName}`);
|
|
215
|
-
|
|
216
|
-
// Use the newly created component (View) info but DO NOT replace
|
|
217
|
-
// this ModalViewContainer's pConn$, etc.
|
|
218
|
-
// Note that we're now using the newly created View's PConnect in the
|
|
219
|
-
// ViewContainer HTML template to guide what's rendered similar to what
|
|
220
|
-
// the React return of React.Fragment does
|
|
221
|
-
|
|
222
|
-
// right now need to check caseInfo for changes, to trigger redraw, not getting
|
|
223
|
-
// changes from angularPconnect except for first draw
|
|
224
|
-
if (newComp && caseInfo && compareCaseInfoIsDifferent(caseInfo)) {
|
|
225
|
-
setCreatedView(configObject);
|
|
226
|
-
|
|
227
|
-
const { actionName } = latestItem;
|
|
228
|
-
const theNewCaseInfo = newComp.getCaseInfo();
|
|
229
|
-
const caseName = theNewCaseInfo.getName();
|
|
230
|
-
const ID = theNewCaseInfo.getID();
|
|
231
|
-
|
|
232
|
-
setTitle(actionName || `${localizedVal('New', localeCategory)} ${caseName} (${ID})`);
|
|
233
|
-
|
|
234
|
-
let arChildrenAsReact: Array<any> = [];
|
|
235
|
-
|
|
236
|
-
if (newComp.getComponentName() === 'reference') {
|
|
237
|
-
// Reference component doesn't have children. It can build the View we want.
|
|
238
|
-
// The Reference component getPConnect is in configObject
|
|
239
|
-
|
|
240
|
-
arChildrenAsReact.push(
|
|
241
|
-
createElement(createPConnectComponent(), {
|
|
242
|
-
...configObject,
|
|
243
|
-
key: `${caseName}-${ID}`
|
|
244
|
-
})
|
|
245
|
-
);
|
|
246
|
-
} else {
|
|
247
|
-
// This is the 8.6 implementation. Leaving it in for reference for now.
|
|
248
|
-
// And create a similar array of the children as React components
|
|
249
|
-
// passed to Assignment component when rendered
|
|
250
|
-
arChildrenAsReact = newComp.getChildren().map(child => {
|
|
251
|
-
// Use Case Summary ID as the React element's key
|
|
252
|
-
const caseSummaryID = child.getPConnect().getCaseSummary().ID;
|
|
253
|
-
return createElement(createPConnectComponent(), { ...child, key: caseSummaryID });
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (arChildrenAsReact.length > 0) setArNewChildrenAsReact(arChildrenAsReact);
|
|
258
|
-
|
|
259
|
-
setShowModal(true);
|
|
260
|
-
|
|
261
|
-
// save off itemKey to be used for finishAssignment, etc.
|
|
262
|
-
setItemKey(key);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
} else {
|
|
266
|
-
if (bShowModal) {
|
|
267
|
-
setShowModal(false);
|
|
233
|
+
useEffect(() => {
|
|
234
|
+
if (routingInfo) {
|
|
235
|
+
const { accessedOrder, type } = routingInfo;
|
|
236
|
+
const { key, latestItem } = getKeyAndLatestItem(routingInfo, pConn, { acTertiary });
|
|
237
|
+
|
|
238
|
+
if (
|
|
239
|
+
latestItem &&
|
|
240
|
+
type === MULTIPLE &&
|
|
241
|
+
(isOpenModalAction(modalCollection.current, accessedOrder) || isUpdateModalAction(modalCollection.current, accessedOrder))
|
|
242
|
+
) {
|
|
243
|
+
const { actionName } = latestItem;
|
|
244
|
+
// const { isDockable = false } = latestItem?.modalOptions || {};
|
|
245
|
+
const configObject: any = getConfigObject(latestItem, null, false);
|
|
246
|
+
const pConnect = configObject.getPConnect();
|
|
247
|
+
const caseInfo: any = pConnect.getCaseInfo();
|
|
248
|
+
const caseName = caseInfo.getName();
|
|
249
|
+
const caseTypeName = caseInfo.getCaseTypeName();
|
|
250
|
+
const ID = caseInfo.getBusinessID() || caseInfo.getID();
|
|
251
|
+
const isDataObject = routingInfo.items[latestItem.context].resourceType === PCore.getConstants().RESOURCE_TYPES.DATA;
|
|
252
|
+
const dataObjectAction = routingInfo.items[latestItem.context].resourceStatus;
|
|
253
|
+
const isMultiRecord = routingInfo.items[latestItem.context].isMultiRecordData;
|
|
254
|
+
const headingValue =
|
|
255
|
+
isDataObject || isMultiRecord
|
|
256
|
+
? getModalHeading(dataObjectAction)
|
|
257
|
+
: determineModalHeaderByAction(actionName, caseTypeName, ID, `${caseInfo?.getClassName()}!CASE!${caseInfo.getName()}`.toUpperCase());
|
|
258
|
+
|
|
259
|
+
let arChildrenAsReact: any[] = [];
|
|
260
|
+
|
|
261
|
+
if (pConnect.getComponentName() === 'reference') {
|
|
262
|
+
// Reference component doesn't have children. It can build the View we want.
|
|
263
|
+
// The Reference component getPConnect is in configObject
|
|
264
|
+
|
|
265
|
+
arChildrenAsReact.push(
|
|
266
|
+
createElement(createPConnectComponent(), {
|
|
267
|
+
...configObject,
|
|
268
|
+
key: `${caseName}-${ID}`
|
|
269
|
+
})
|
|
270
|
+
);
|
|
271
|
+
} else {
|
|
272
|
+
// This is the 8.6 implementation. Leaving it in for reference for now.
|
|
273
|
+
// And create a similar array of the children as React components
|
|
274
|
+
// passed to Assignment component when rendered
|
|
275
|
+
arChildrenAsReact = (pConnect.getChildren() as []).map((child: any) => {
|
|
276
|
+
// Use Case Summary ID as the React element's key
|
|
277
|
+
const caseSummaryID = child.getPConnect().getCaseSummary().ID;
|
|
278
|
+
return createElement(createPConnectComponent(), {
|
|
279
|
+
...child,
|
|
280
|
+
key: caseSummaryID
|
|
281
|
+
});
|
|
282
|
+
});
|
|
268
283
|
}
|
|
269
|
-
|
|
270
|
-
|
|
284
|
+
|
|
285
|
+
if (arChildrenAsReact.length > 0) setArNewChildrenAsReact(arChildrenAsReact);
|
|
286
|
+
setMultiRecordData(isMultiRecord);
|
|
287
|
+
setTitle(headingValue);
|
|
288
|
+
setCreatedView({ configObject, latestItem });
|
|
289
|
+
setItemKey(key);
|
|
290
|
+
setShowModal(true);
|
|
291
|
+
|
|
292
|
+
// Update modal use case which happens when assignment in submitted in modal.
|
|
293
|
+
if (isUpdateModalAction(modalCollection.current, accessedOrder)) {
|
|
294
|
+
// handleModalUpdate(key);
|
|
295
|
+
} else if (isOpenModalAction(modalCollection.current, accessedOrder)) {
|
|
296
|
+
// New modal open scenario
|
|
297
|
+
handleModalOpen(key);
|
|
271
298
|
}
|
|
299
|
+
} else if (isCloseModalAction(modalCollection.current, accessedOrder)) {
|
|
300
|
+
handleModalClose(accessedOrder);
|
|
272
301
|
}
|
|
273
302
|
}
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
// function placeholderModalClose() {
|
|
277
|
-
// // Intentionally a no-op. Similar behavior in other SDKs.
|
|
278
|
-
// // Does NOT close the window. This forces the user to use
|
|
279
|
-
// // the cancel or submit button to close the modal (which, in turn, gets the right
|
|
280
|
-
// // Constellation code to run to clean up the containers, data, etc.)
|
|
281
|
-
|
|
282
|
-
// // console.log(`ModalViewContainer: placeholderModalClose setting bShowModal to false`) setShowModal(false);
|
|
283
|
-
// }
|
|
303
|
+
}, [routingInfo]);
|
|
284
304
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
// console.log(`--> arNewChildrenAsReact: ${JSON.stringify(arNewChildrenAsReact)}`);
|
|
290
|
-
// }
|
|
305
|
+
function closeActionsDialog() {
|
|
306
|
+
// actionsDialog.current = true;
|
|
307
|
+
setShowModal(false);
|
|
308
|
+
}
|
|
291
309
|
|
|
292
310
|
return (
|
|
293
311
|
<>
|
|
294
312
|
<Dialog open={bShowModal} aria-labelledby='form-dialog-title'>
|
|
295
|
-
<DialogTitle id='form-dialog-title' className={classes.dlgTitle}>
|
|
313
|
+
<DialogTitle id='form-dialog-title' className={`${classes.dlgTitle} psdk-dialog-title`}>
|
|
296
314
|
{title}
|
|
297
315
|
</DialogTitle>
|
|
298
|
-
<DialogContent className={classes.dlgContent}>
|
|
316
|
+
<DialogContent className={`${classes.dlgContent} psdk-dialog-content`}>
|
|
299
317
|
{bShowModal ? (
|
|
300
|
-
<
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
)}
|
|
318
|
+
<MuiPickersUtilsProvider utils={DayjsUtils}>
|
|
319
|
+
<Assignment
|
|
320
|
+
getPConnect={createdView.configObject.getPConnect}
|
|
321
|
+
itemKey={itemKey}
|
|
322
|
+
isInModal
|
|
323
|
+
banners={getBanners({
|
|
324
|
+
target: itemKey,
|
|
325
|
+
pageMessages
|
|
326
|
+
})}
|
|
327
|
+
>
|
|
328
|
+
{arNewChildrenAsReact}
|
|
329
|
+
</Assignment>
|
|
330
|
+
</MuiPickersUtilsProvider>
|
|
331
|
+
) : null}
|
|
314
332
|
</DialogContent>
|
|
333
|
+
|
|
334
|
+
{isMultiRecordData && (
|
|
335
|
+
<ListViewActionButtons
|
|
336
|
+
getPConnect={createdView.configObject.getPConnect}
|
|
337
|
+
context={createdView.latestItem.context}
|
|
338
|
+
closeActionsDialog={closeActionsDialog}
|
|
339
|
+
/>
|
|
340
|
+
)}
|
|
315
341
|
</Dialog>
|
|
316
|
-
{bShowCancelAlert &&
|
|
317
|
-
<CancelAlert
|
|
318
|
-
pConn={cancelPConn}
|
|
319
|
-
showAlert={bShowCancelAlert}
|
|
320
|
-
updateAlertState={updateAlertState}
|
|
321
|
-
/>
|
|
322
|
-
)}
|
|
342
|
+
{bShowCancelAlert && <CancelAlert {...cancelAlertProps} dismiss={dismissCancelAlert} />}
|
|
323
343
|
</>
|
|
324
344
|
);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export default ModalViewContainer;
|
|
328
|
-
|
|
329
|
-
ModalViewContainer.defaultProps = {
|
|
330
|
-
getPConnect: null,
|
|
331
|
-
loadingInfo: false,
|
|
332
|
-
routingInfo: null
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
ModalViewContainer.propTypes = {
|
|
336
|
-
getPConnect: PropTypes.func,
|
|
337
|
-
loadingInfo: PropTypes.bool,
|
|
338
|
-
routingInfo: PropTypes.objectOf(PropTypes.any)
|
|
339
|
-
};
|
|
345
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './ModalViewContainer';
|
|
1
|
+
export { default } from './ModalViewContainer';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { getActiveContainerItemID, getActiveContainerRootViewElement, getPConnectOfActiveContainerItem, useContainerInitializer } from './helper';
|
|
4
|
+
|
|
5
|
+
const SimpleViewContainer = props => {
|
|
6
|
+
const { CONTAINER_TYPE } = PCore.getConstants();
|
|
7
|
+
|
|
8
|
+
const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView, options = {} } = props;
|
|
9
|
+
|
|
10
|
+
const rootViewElement = useMemo(() => {
|
|
11
|
+
return getActiveContainerRootViewElement(containerInfo, {
|
|
12
|
+
isAssignmentView,
|
|
13
|
+
parentGetPConnect: getPConnect
|
|
14
|
+
});
|
|
15
|
+
}, [containerInfo, isAssignmentView, getPConnect]);
|
|
16
|
+
|
|
17
|
+
useContainerInitializer(getPConnect, options.mode || mode);
|
|
18
|
+
|
|
19
|
+
return rootViewElement;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const withSimpleViewContainerRenderer =
|
|
23
|
+
(Component, options: any = {}) =>
|
|
24
|
+
props => {
|
|
25
|
+
const { CONTAINER_TYPE } = PCore.getConstants();
|
|
26
|
+
|
|
27
|
+
const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView } = props;
|
|
28
|
+
|
|
29
|
+
const rootViewElement = <SimpleViewContainer {...props} options={options} />;
|
|
30
|
+
const activeContainerItemID = getActiveContainerItemID(containerInfo);
|
|
31
|
+
const getPConnectOfActiveItem = getPConnectOfActiveContainerItem(containerInfo, {
|
|
32
|
+
isAssignmentView,
|
|
33
|
+
parentGetPConnect: getPConnect
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
useContainerInitializer(getPConnect, options.mode || mode);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Component
|
|
40
|
+
{...props}
|
|
41
|
+
rootViewElement={rootViewElement}
|
|
42
|
+
activeContainerItemID={activeContainerItemID}
|
|
43
|
+
getPConnectOfActiveContainerItem={getPConnectOfActiveItem}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default SimpleViewContainer;
|