@pega/react-sdk-overrides 23.1.10 → 23.1.12
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 +6 -14
- package/lib/designSystemExtension/Banner/Banner.tsx +14 -11
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +27 -22
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +14 -20
- package/lib/designSystemExtension/DetailsFields/index.tsx +1 -1
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +44 -19
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +7 -12
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +21 -32
- package/lib/designSystemExtension/Operator/Operator.tsx +94 -82
- package/lib/designSystemExtension/Pulse/Pulse.tsx +14 -16
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +6 -5
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +14 -14
- package/lib/field/AutoComplete/AutoComplete.tsx +24 -26
- package/lib/field/AutoComplete/config-ext.json +2 -3
- package/lib/field/CancelAlert/CancelAlert.tsx +98 -84
- package/lib/field/CancelAlert/index.tsx +1 -1
- package/lib/field/Checkbox/Checkbox.tsx +120 -63
- package/lib/field/Checkbox/config-ext.json +2 -3
- package/lib/field/Currency/Currency.tsx +25 -50
- package/lib/field/Currency/config-ext.json +2 -3
- package/lib/field/Currency/currency-utils.ts +9 -16
- package/lib/field/Date/Date.tsx +15 -11
- package/lib/field/Date/config-ext.json +2 -3
- package/lib/field/DateTime/DateTime.tsx +9 -9
- package/lib/field/DateTime/config-ext.json +1 -2
- package/lib/field/Decimal/Decimal.tsx +33 -44
- package/lib/field/Decimal/config-ext.json +1 -2
- package/lib/field/Decimal/index.tsx +1 -1
- package/lib/field/Dropdown/Dropdown.tsx +122 -31
- package/lib/field/Dropdown/config-ext.json +1 -2
- package/lib/field/Email/Email.tsx +11 -10
- 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 +8 -7
- package/lib/field/Integer/config-ext.json +1 -2
- package/lib/field/MultiSelect/Multiselect.tsx +244 -0
- package/lib/field/MultiSelect/index.tsx +1 -0
- package/lib/field/MultiSelect/utils.ts +230 -0
- package/lib/field/Percentage/Percentage.tsx +46 -41
- package/lib/field/Percentage/config-ext.json +1 -2
- package/lib/field/Phone/Phone.tsx +13 -12
- package/lib/field/Phone/index.tsx +1 -1
- package/lib/field/RadioButtons/RadioButtons.tsx +20 -18
- package/lib/field/RadioButtons/config-ext.json +1 -2
- package/lib/field/RichText/RichText.tsx +8 -7
- package/lib/field/ScalarList/ScalarList.tsx +3 -13
- package/lib/field/ScalarList/config-ext.json +1 -2
- package/lib/field/SemanticLink/SemanticLink.tsx +7 -7
- package/lib/field/SemanticLink/config-ext.json +1 -2
- package/lib/field/SemanticLink/utils.ts +8 -11
- package/lib/field/TextArea/TextArea.tsx +7 -6
- package/lib/field/TextArea/config-ext.json +1 -2
- package/lib/field/TextContent/TextContent.tsx +4 -6
- package/lib/field/TextContent/config-ext.json +1 -2
- package/lib/field/TextInput/TextInput.tsx +9 -7
- package/lib/field/TextInput/config-ext.json +1 -2
- package/lib/field/TextInput/index.tsx +1 -1
- package/lib/field/Time/Time.tsx +11 -11
- package/lib/field/Time/config-ext.json +1 -2
- package/lib/field/URL/URL.tsx +9 -8
- package/lib/field/URL/config-ext.json +1 -2
- package/lib/field/URL/index.tsx +1 -1
- package/lib/field/UserReference/UserReference.tsx +18 -16
- package/lib/field/UserReference/UserReferenceUtils.ts +2 -2
- package/lib/field/UserReference/config-ext.json +1 -2
- package/lib/helpers/attachmentHelpers.ts +13 -8
- package/lib/helpers/case-utils.tsx +4 -8
- package/lib/helpers/common-utils.ts +5 -1
- package/lib/helpers/data_page.ts +3 -7
- package/lib/helpers/date-format-utils.ts +3 -3
- package/lib/helpers/event-utils.ts +3 -3
- package/lib/helpers/field-group-utils.ts +1 -1
- package/lib/helpers/formatters/Boolean.ts +9 -26
- package/lib/helpers/formatters/Currency.ts +15 -21
- package/lib/helpers/formatters/CurrencyMap.ts +505 -501
- package/lib/helpers/formatters/Date.ts +20 -26
- package/lib/helpers/formatters/common.ts +1 -2
- package/lib/helpers/formatters/index.ts +26 -19
- package/lib/helpers/instructions-utils.ts +38 -0
- package/lib/helpers/reactContextHelpers.ts +2 -2
- package/lib/helpers/simpleTableHelpers.ts +59 -83
- package/lib/helpers/state-utils.tsx +5 -9
- package/lib/helpers/template-utils.ts +3 -6
- package/lib/helpers/utils.ts +5 -5
- package/lib/helpers/versionHelpers.ts +1 -4
- package/lib/infra/ActionButtons/ActionButtons.tsx +38 -29
- package/lib/infra/ActionButtons/index.tsx +1 -1
- package/lib/infra/Assignment/Assignment.tsx +99 -79
- package/lib/infra/Assignment/index.tsx +1 -1
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +13 -16
- package/lib/infra/AssignmentCard/index.tsx +1 -1
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +67 -213
- package/lib/infra/Containers/FlowContainer/helpers.ts +34 -45
- 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 +227 -218
- 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 +36 -46
- package/lib/infra/Containers/helpers.ts +6 -0
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +21 -42
- package/lib/infra/DashboardFilter/filterUtils.tsx +12 -43
- package/lib/infra/DeferLoad/DeferLoad.tsx +22 -28
- package/lib/infra/DeferLoad/index.tsx +1 -1
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +16 -30
- package/lib/infra/MultiStep/MultiStep.css +11 -15
- package/lib/infra/MultiStep/MultiStep.tsx +176 -212
- package/lib/infra/MultiStep/index.tsx +1 -1
- package/lib/infra/NavBar/NavBar.css +103 -105
- package/lib/infra/NavBar/NavBar.tsx +19 -31
- package/lib/infra/Reference/Reference.tsx +16 -18
- package/lib/infra/Region/Region.tsx +4 -6
- package/lib/infra/RootContainer/RootContainer.tsx +75 -111
- package/lib/infra/RootContainer/index.tsx +1 -1
- package/lib/infra/Stages/Stages.tsx +32 -39
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +11 -11
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +21 -28
- package/lib/infra/View/View.tsx +17 -21
- package/lib/template/AppShell/AppShell.css +22 -23
- package/lib/template/AppShell/AppShell.tsx +39 -74
- package/lib/template/BannerPage/BannerPage.tsx +12 -14
- package/lib/template/CaseSummary/CaseSummary.tsx +58 -18
- package/lib/template/CaseSummary/config-ext.json +1 -2
- package/lib/template/CaseView/CaseView.tsx +34 -63
- package/lib/template/CaseView/config-ext.json +1 -2
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +63 -19
- package/lib/template/Confirmation/Confirmation.tsx +12 -17
- package/lib/template/Confirmation/config-ext.json +1 -2
- package/lib/template/DataReference/DataReference.tsx +95 -121
- package/lib/template/DataReference/config-ext.json +1 -2
- package/lib/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/template/DefaultForm/DefaultForm.tsx +13 -16
- package/lib/template/DefaultForm/config-ext.json +1 -2
- package/lib/template/Details/Details/Details.tsx +19 -22
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +9 -13
- package/lib/template/Details/DetailsSubTabs/config-ext.json +1 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +19 -24
- package/lib/template/Details/DetailsThreeColumn/config-ext.json +1 -2
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +19 -25
- 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 +15 -14
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +15 -22
- package/lib/template/InlineDashboard/InlineDashboard.tsx +12 -14
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +12 -16
- package/lib/template/ListPage/ListPage.tsx +5 -10
- package/lib/template/ListPage/config-ext.json +1 -2
- package/lib/template/ListView/DefaultViewMeta.ts +1 -3
- package/lib/template/ListView/ListView.tsx +185 -175
- package/lib/template/ListView/config-ext.json +1 -2
- package/lib/template/ListView/hooks.ts +24 -26
- package/lib/template/ListView/utils.ts +51 -87
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +20 -20
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +25 -38
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +20 -25
- 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 +14 -24
- package/lib/template/NarrowWide/NarrowWideForm/config-ext.json +1 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +9 -19
- package/lib/template/NarrowWide/NarrowWidePage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +14 -15
- package/lib/template/OneColumn/OneColumn/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +3 -10
- package/lib/template/OneColumn/OneColumnPage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +6 -10
- package/lib/template/OneColumn/OneColumnTab/config-ext.json +1 -2
- package/lib/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/template/PromotedFilters/PromotedFilters.tsx +32 -28
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +37 -33
- package/lib/template/SimpleTable/SimpleTable/config-ext.json +1 -2
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +187 -121
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +24 -25
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +30 -30
- package/lib/template/SubTabs/SubTabs.tsx +22 -40
- package/lib/template/SubTabs/config-ext.json +1 -2
- package/lib/template/SubTabs/tabUtils.ts +2 -5
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +30 -28
- package/lib/template/TwoColumn/TwoColumn/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +3 -10
- package/lib/template/TwoColumn/TwoColumnPage/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +30 -28
- 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 +22 -34
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +24 -28
- 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 +13 -21
- package/lib/template/WideNarrow/WideNarrowForm/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +8 -16
- 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 +18 -21
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +29 -28
- package/lib/widget/AppAnnouncement/config-ext.json +1 -2
- package/lib/widget/Attachment/Attachment.css +60 -1
- package/lib/widget/Attachment/Attachment.tsx +378 -405
- package/lib/widget/Attachment/index.tsx +1 -1
- package/lib/widget/CaseHistory/CaseHistory.tsx +64 -66
- package/lib/widget/CaseHistory/config-ext.json +1 -2
- package/lib/widget/CaseHistory/index.tsx +1 -1
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +16 -18
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +310 -246
- package/lib/widget/FileUtility/FileUtility/config-ext.json +1 -2
- package/lib/widget/Followers/Followers.tsx +23 -20
- package/lib/widget/Followers/config-ext.json +1 -2
- package/lib/widget/QuickCreate/QuickCreate.tsx +68 -42
- package/lib/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/widget/SummaryItem/SummaryItem.tsx +58 -58
- package/lib/widget/SummaryItem/index.tsx +1 -1
- package/lib/widget/SummaryList/SummaryList.tsx +7 -10
- package/lib/widget/ToDo/ToDo.css +4 -4
- package/lib/widget/ToDo/ToDo.tsx +52 -53
- package/lib/widget/ToDo/config-ext.json +1 -2
- package/package.json +5 -2
- package/lib/helpers/auth.js +0 -834
- package/lib/helpers/authManager.ts +0 -933
- package/lib/helpers/config_access.js +0 -186
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Breadcrumbs, Card, Typography } from "@material-ui/core";
|
|
1
|
+
import { Breadcrumbs, Card, Typography } from '@material-ui/core';
|
|
3
2
|
import DoubleArrowIcon from '@material-ui/icons/DoubleArrow';
|
|
4
3
|
import DoneIcon from '@material-ui/icons/Done';
|
|
5
4
|
import { makeStyles } from '@material-ui/core/styles';
|
|
6
|
-
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
5
|
|
|
6
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
7
|
|
|
9
8
|
interface StagesProps extends PConnProps {
|
|
10
9
|
// If any, enter additional props that only exist on this component
|
|
11
|
-
stages:
|
|
10
|
+
stages: any[];
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
// Remove this and use "real" PCore type once .d.ts is fixed (currently shows 1 error)
|
|
16
|
-
declare const PCore: any;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const useStyles = makeStyles((theme) => ({
|
|
13
|
+
const useStyles = makeStyles(theme => ({
|
|
20
14
|
root: {
|
|
21
15
|
paddingRight: theme.spacing(1),
|
|
22
16
|
paddingLeft: theme.spacing(1),
|
|
@@ -25,25 +19,23 @@ const useStyles = makeStyles((theme) => ({
|
|
|
25
19
|
marginRight: theme.spacing(1),
|
|
26
20
|
marginLeft: theme.spacing(1),
|
|
27
21
|
marginTop: theme.spacing(1),
|
|
28
|
-
marginBottom: theme.spacing(1)
|
|
22
|
+
marginBottom: theme.spacing(1)
|
|
29
23
|
},
|
|
30
24
|
completedStage: {
|
|
31
|
-
color: theme.palette.text.primary
|
|
25
|
+
color: theme.palette.text.primary
|
|
32
26
|
},
|
|
33
27
|
currentStage: {
|
|
34
28
|
color: theme.palette.info.dark,
|
|
35
|
-
fontWeight: 600
|
|
29
|
+
fontWeight: 600
|
|
36
30
|
},
|
|
37
31
|
futureStage: {
|
|
38
|
-
color: theme.palette.text.secondary
|
|
32
|
+
color: theme.palette.text.secondary
|
|
39
33
|
},
|
|
40
34
|
separatorIcon: {
|
|
41
|
-
color: theme.palette.text.disabled
|
|
35
|
+
color: theme.palette.text.disabled
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
}));
|
|
45
38
|
|
|
46
|
-
|
|
47
39
|
/**
|
|
48
40
|
* API to filter out the alternate stages which are not in active and return all other stages
|
|
49
41
|
* @param {Array} stages - Stages of a case type
|
|
@@ -55,11 +47,7 @@ function getFilteredStages(stages) {
|
|
|
55
47
|
return [];
|
|
56
48
|
}
|
|
57
49
|
|
|
58
|
-
return stages.filter(
|
|
59
|
-
(stage) =>
|
|
60
|
-
stage.type !== "Alternate" ||
|
|
61
|
-
(stage.type === "Alternate" && stage.visited_status === "active")
|
|
62
|
-
);
|
|
50
|
+
return stages.filter(stage => stage.type !== 'Alternate' || (stage.type === 'Alternate' && stage.visited_status === 'active'));
|
|
63
51
|
}
|
|
64
52
|
|
|
65
53
|
/* TODO - this component should be refactored and not exposed as top level DX Component -
|
|
@@ -71,17 +59,16 @@ export default function Stages(props: StagesProps) {
|
|
|
71
59
|
const pConn = getPConnect();
|
|
72
60
|
const key = `${pConn.getCaseInfo().getClassName()}!CASE!${pConn.getCaseInfo().getName()}`.toUpperCase();
|
|
73
61
|
|
|
74
|
-
|
|
75
62
|
const filteredStages = getFilteredStages(stages);
|
|
76
|
-
const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, '');
|
|
63
|
+
const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, ''); // 2nd arg empty string until typedef allows optional
|
|
77
64
|
const stagesObj = filteredStages.map((stage, index, arr) => {
|
|
78
65
|
const theID = stage.ID || stage.id;
|
|
79
66
|
return {
|
|
80
|
-
name: PCore.getLocaleUtils().getLocaleValue(stage.name,
|
|
67
|
+
name: PCore.getLocaleUtils().getLocaleValue(stage.name, undefined, key),
|
|
81
68
|
id: theID,
|
|
82
|
-
complete: stage.visited_status ===
|
|
83
|
-
current:
|
|
84
|
-
last:
|
|
69
|
+
complete: stage.visited_status === 'completed',
|
|
70
|
+
current: theID === currentStageID,
|
|
71
|
+
last: index === arr.length - 1
|
|
85
72
|
};
|
|
86
73
|
});
|
|
87
74
|
|
|
@@ -100,26 +87,32 @@ export default function Stages(props: StagesProps) {
|
|
|
100
87
|
theClass = classes.futureStage;
|
|
101
88
|
}
|
|
102
89
|
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
<
|
|
106
|
-
|
|
90
|
+
return (
|
|
91
|
+
<span key={index}>
|
|
92
|
+
{stage.complete ? <DoneIcon color='disabled' fontSize='small' /> : null}
|
|
93
|
+
<Typography variant='h5' component='span' display='inline' className={theClass}>
|
|
94
|
+
{stage.name}
|
|
95
|
+
</Typography>
|
|
96
|
+
</span>
|
|
97
|
+
);
|
|
107
98
|
}
|
|
108
99
|
|
|
109
100
|
function getStages(inStages) {
|
|
110
|
-
return
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
101
|
+
return (
|
|
102
|
+
<Breadcrumbs aria-label='stages' separator={<DoubleArrowIcon className={classes.separatorIcon} />}>
|
|
103
|
+
{inStages.map((stage, index) => {
|
|
104
|
+
return getStage(stage, index);
|
|
105
|
+
})}
|
|
106
|
+
</Breadcrumbs>
|
|
107
|
+
);
|
|
115
108
|
}
|
|
116
109
|
|
|
117
110
|
return (
|
|
118
|
-
<Card id=
|
|
111
|
+
<Card id='Stages' className={classes.root}>
|
|
119
112
|
{/* Stages<br />
|
|
120
113
|
currentStageID: {currentStageID}<br />
|
|
121
114
|
{JSON.stringify(stagesObj)}<br /><br /> */}
|
|
122
115
|
{getStages(stagesObj)}
|
|
123
116
|
</Card>
|
|
124
|
-
)
|
|
117
|
+
);
|
|
125
118
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
Tab,
|
|
5
|
-
Divider,
|
|
6
|
-
} from '@material-ui/core';
|
|
1
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
2
|
+
import { Tab, Divider } from '@material-ui/core';
|
|
7
3
|
|
|
8
4
|
// LeftAlignVerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps
|
|
9
5
|
|
|
@@ -11,7 +7,6 @@ interface LeftAlignVerticalTabsProps {
|
|
|
11
7
|
// If any, enter additional props that only exist on this component
|
|
12
8
|
}
|
|
13
9
|
|
|
14
|
-
|
|
15
10
|
// LeftAlignVerticalTab is a specialized Tab that has styles to make it
|
|
16
11
|
// left aligned and full width of the container Tabs
|
|
17
12
|
|
|
@@ -23,12 +18,17 @@ interface LeftAlignVerticalTabsProps {
|
|
|
23
18
|
const LeftAlignVerticalTabs: any = withStyles((/* theme */) => ({
|
|
24
19
|
root: {
|
|
25
20
|
width: '100%',
|
|
26
|
-
maxWidth: '100%'
|
|
21
|
+
maxWidth: '100%'
|
|
27
22
|
},
|
|
28
23
|
wrapper: {
|
|
29
24
|
display: 'block',
|
|
30
|
-
textAlign: 'left'
|
|
31
|
-
}
|
|
32
|
-
}))((props: LeftAlignVerticalTabsProps) =>
|
|
25
|
+
textAlign: 'left'
|
|
26
|
+
}
|
|
27
|
+
}))((props: LeftAlignVerticalTabsProps) => (
|
|
28
|
+
<div>
|
|
29
|
+
<Tab {...props} />
|
|
30
|
+
<Divider />
|
|
31
|
+
</div>
|
|
32
|
+
));
|
|
33
33
|
|
|
34
34
|
export default LeftAlignVerticalTabs;
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
import React, { useState, useEffect } from
|
|
2
|
-
import { makeStyles } from '@material-ui/core/styles'
|
|
3
|
-
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
4
3
|
import Tabs from '@material-ui/core/Tabs';
|
|
4
|
+
|
|
5
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
6
|
|
|
7
7
|
// VerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps
|
|
8
8
|
interface VerticalTabsProps {
|
|
9
9
|
// If any, enter additional props that only exist on this component
|
|
10
|
-
tabconfig:
|
|
10
|
+
tabconfig: any[];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
// The MuiTabs-indicator class is in a span whose parent is div (under the Tabs root component)
|
|
15
14
|
// So, we're going to make the selected vertical tab indicator use a color from our theme.
|
|
16
|
-
const useStyles = makeStyles(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
15
|
+
const useStyles = makeStyles(theme => ({
|
|
16
|
+
tabs: {
|
|
17
|
+
'& div > span': {
|
|
18
|
+
backgroundColor: theme.palette.info.dark,
|
|
19
|
+
width: '3px'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
24
22
|
}));
|
|
25
23
|
|
|
26
24
|
// Implementation of custom event inspired by:
|
|
27
25
|
// https://betterprogramming.pub/master-your-react-skills-with-event-listeners-ebc01dde4fad
|
|
28
|
-
const createCustomEvent = (eventName: string, additionalData: {[key: string]: string}): CustomEvent | null => {
|
|
26
|
+
const createCustomEvent = (eventName: string, additionalData: { [key: string]: string }): CustomEvent | null => {
|
|
29
27
|
if (window) {
|
|
30
28
|
return new CustomEvent(eventName, {
|
|
31
29
|
detail: { additionalData }
|
|
@@ -35,10 +33,9 @@ const createCustomEvent = (eventName: string, additionalData: {[key: string]: st
|
|
|
35
33
|
return null;
|
|
36
34
|
};
|
|
37
35
|
|
|
38
|
-
|
|
39
36
|
export default function VerticalTabs(props: VerticalTabsProps) {
|
|
40
37
|
// Get emitted components from map (so we can get any override that may exist)
|
|
41
|
-
const LeftAlignVerticalTab = getComponentFromMap(
|
|
38
|
+
const LeftAlignVerticalTab = getComponentFromMap('LeftAlignVerticalTabs');
|
|
42
39
|
|
|
43
40
|
// Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig
|
|
44
41
|
const { tabconfig = [] } = props;
|
|
@@ -46,14 +43,12 @@ export default function VerticalTabs(props: VerticalTabsProps) {
|
|
|
46
43
|
const [value, setValue] = useState(0);
|
|
47
44
|
|
|
48
45
|
useEffect(() => {
|
|
49
|
-
|
|
50
|
-
const eventData = {"itemClicked": value.toString()};
|
|
46
|
+
const eventData = { itemClicked: value.toString() };
|
|
51
47
|
const myEvent = createCustomEvent('VerticalTabClick', eventData);
|
|
52
48
|
|
|
53
49
|
if (myEvent !== null) {
|
|
54
|
-
document.dispatchEvent(
|
|
50
|
+
document.dispatchEvent(myEvent);
|
|
55
51
|
}
|
|
56
|
-
|
|
57
52
|
}, [value]);
|
|
58
53
|
|
|
59
54
|
const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {
|
|
@@ -61,15 +56,13 @@ export default function VerticalTabs(props: VerticalTabsProps) {
|
|
|
61
56
|
};
|
|
62
57
|
|
|
63
58
|
return (
|
|
64
|
-
<div id=
|
|
59
|
+
<div id='VerticalTabs'>
|
|
65
60
|
{/* VerticalTabs: {JSON.stringify(tabconfig)} */}
|
|
66
|
-
<Tabs
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
onChange={handleChange}>
|
|
71
|
-
{tabconfig.map((tab) => <LeftAlignVerticalTab {...props} label={tab.name} key={tab.name} />)}
|
|
61
|
+
<Tabs className={classes.tabs} orientation='vertical' value={value} onChange={handleChange}>
|
|
62
|
+
{tabconfig.map(tab => (
|
|
63
|
+
<LeftAlignVerticalTab {...props} label={tab.name} key={tab.name} />
|
|
64
|
+
))}
|
|
72
65
|
</Tabs>
|
|
73
66
|
</div>
|
|
74
|
-
)
|
|
67
|
+
);
|
|
75
68
|
}
|
package/lib/infra/View/View.tsx
CHANGED
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
// import { FieldGroup } from "@pega/cosmos-react-core";
|
|
3
|
-
// import { LazyMap as LazyComponentMap } from "../../components_map";
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
4
2
|
|
|
5
3
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
|
-
|
|
7
4
|
import { getAllFields } from '@pega/react-sdk-components/lib/components/helpers/template-utils';
|
|
5
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
6
|
|
|
9
7
|
// Need to import any templates that we might render
|
|
10
8
|
|
|
11
9
|
import './View.css';
|
|
12
10
|
|
|
13
|
-
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
|
-
|
|
15
|
-
|
|
16
11
|
interface ViewProps extends PConnProps {
|
|
17
12
|
// If any, enter additional props that only exist on this component
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
bInForm?: boolean
|
|
13
|
+
template?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
showLabel: boolean;
|
|
16
|
+
mode?: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
visibility?: boolean;
|
|
19
|
+
name?: string;
|
|
20
|
+
bInForm?: boolean;
|
|
27
21
|
}
|
|
28
22
|
|
|
29
|
-
|
|
30
23
|
//
|
|
31
24
|
// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
|
|
32
25
|
// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
|
|
@@ -46,14 +39,14 @@ const NO_HEADER_TEMPLATES = [
|
|
|
46
39
|
'DynamicTabs'
|
|
47
40
|
];
|
|
48
41
|
|
|
49
|
-
export default function View(props: ViewProps) {
|
|
42
|
+
export default function View(props: PropsWithChildren<ViewProps>) {
|
|
50
43
|
const { children, template, getPConnect, mode, visibility, name: pageName } = props;
|
|
51
44
|
let { label = '', showLabel = false } = props;
|
|
52
45
|
|
|
53
46
|
// Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views
|
|
54
47
|
// Putting this logic here instead of copy/paste in every Form template index.js
|
|
55
48
|
|
|
56
|
-
const inheritedProps: any = getPConnect().getInheritedProps();
|
|
49
|
+
const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed
|
|
57
50
|
label = inheritedProps.label || label;
|
|
58
51
|
showLabel = inheritedProps.showLabel || showLabel;
|
|
59
52
|
|
|
@@ -86,7 +79,11 @@ export default function View(props: ViewProps) {
|
|
|
86
79
|
// console.log(`View rendering template: ${template}`);
|
|
87
80
|
|
|
88
81
|
// spreading because all props should go to the template
|
|
89
|
-
let RenderedTemplate =
|
|
82
|
+
let RenderedTemplate = (
|
|
83
|
+
<ViewTemplate key={key} {...props}>
|
|
84
|
+
{children}
|
|
85
|
+
</ViewTemplate>
|
|
86
|
+
);
|
|
90
87
|
|
|
91
88
|
if (FORMTEMPLATES.includes(template) && showLabel) {
|
|
92
89
|
// Original:
|
|
@@ -130,7 +127,6 @@ export default function View(props: ViewProps) {
|
|
|
130
127
|
return null;
|
|
131
128
|
}
|
|
132
129
|
|
|
133
|
-
|
|
134
130
|
// Adapted from Constellation DX Component to add in additional props for some templates
|
|
135
131
|
View.additionalProps = (state, getPConnect) => {
|
|
136
132
|
const thePConn = getPConnect();
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
.appshell-top {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
display: flex;
|
|
3
|
+
background-color: var(--app-background-color);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
.appshell-main {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
position: relative;
|
|
8
|
+
min-height: 100vh;
|
|
9
|
+
display: block;
|
|
10
|
+
width: 100%;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
.psdk-icon {
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
padding: 0rem 0.125rem;
|
|
15
|
+
min-width: unset;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
.progress-box {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
height: 100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
background-color: whitesmoke;
|
|
26
|
+
position: fixed;
|
|
27
|
+
z-index: 999;
|
|
28
|
+
top: 0rem;
|
|
29
|
+
left: 0rem;
|
|
30
|
+
opacity: 0.5;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
.progress-spinner {
|
|
35
|
-
|
|
34
|
+
text-align: center;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
::ng-deep snack-bar-container.snackbar-newline {
|
|
39
|
-
|
|
38
|
+
white-space: pre-line;
|
|
40
39
|
}
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PropsWithChildren, useEffect, useState } from 'react';
|
|
2
2
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
|
-
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
4
3
|
import Avatar from '@material-ui/core/Avatar';
|
|
4
|
+
|
|
5
|
+
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
5
6
|
import { NavContext } from '@pega/react-sdk-components/lib/components/helpers/reactContextHelpers';
|
|
6
|
-
import './AppShell.css';
|
|
7
7
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
9
|
|
|
9
|
-
import
|
|
10
|
+
import './AppShell.css';
|
|
10
11
|
|
|
11
12
|
interface AppShellProps extends PConnProps {
|
|
12
13
|
// If any, enter additional props that only exist on this component
|
|
13
|
-
showAppName: boolean
|
|
14
|
-
pages:
|
|
15
|
-
pxPageViewIcon: string
|
|
16
|
-
pyClassName: string
|
|
17
|
-
pyLabel: string
|
|
18
|
-
pyRuleName: string
|
|
19
|
-
pyURLContent: string
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
portalLogo : string,
|
|
27
|
-
navDisplayOptions: { alignment: string, position: string }
|
|
14
|
+
showAppName: boolean;
|
|
15
|
+
pages: {
|
|
16
|
+
pxPageViewIcon: string;
|
|
17
|
+
pyClassName: string;
|
|
18
|
+
pyLabel: string;
|
|
19
|
+
pyRuleName: string;
|
|
20
|
+
pyURLContent: string;
|
|
21
|
+
}[];
|
|
22
|
+
caseTypes?: object[];
|
|
23
|
+
portalTemplate: string;
|
|
24
|
+
portalName: string;
|
|
25
|
+
portalLogo: string;
|
|
26
|
+
navDisplayOptions: { alignment: string; position: string };
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
|
|
31
29
|
const useStyles = makeStyles(theme => ({
|
|
32
30
|
root: {
|
|
33
31
|
display: 'flex'
|
|
@@ -47,29 +45,15 @@ const useStyles = makeStyles(theme => ({
|
|
|
47
45
|
}
|
|
48
46
|
}));
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
declare const PCore: any;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export default function AppShell(props:AppShellProps) {
|
|
48
|
+
export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
55
49
|
// Get emitted components from map (so we can get any override that may exist)
|
|
56
|
-
const NavBar = getComponentFromMap(
|
|
57
|
-
const WssNavBar = getComponentFromMap(
|
|
58
|
-
|
|
59
|
-
const {
|
|
60
|
-
pages = [],
|
|
61
|
-
caseTypes = [],
|
|
62
|
-
showAppName,
|
|
63
|
-
children = [],
|
|
64
|
-
getPConnect,
|
|
65
|
-
portalTemplate,
|
|
66
|
-
portalName,
|
|
67
|
-
portalLogo,
|
|
68
|
-
navDisplayOptions
|
|
69
|
-
} = props;
|
|
50
|
+
const NavBar = getComponentFromMap('NavBar');
|
|
51
|
+
const WssNavBar = getComponentFromMap('WssNavBar');
|
|
52
|
+
|
|
53
|
+
const { pages = [], caseTypes = [], showAppName, children = [], getPConnect, portalTemplate, portalName, portalLogo, navDisplayOptions } = props;
|
|
70
54
|
|
|
71
55
|
const [open, setOpen] = useState(true);
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
73
57
|
const [activeTab, setActiveTab] = useState(!pages ? null : pages[0]?.pyRuleName);
|
|
74
58
|
const pConn = getPConnect();
|
|
75
59
|
const envInfo = PCore.getEnvironmentInfo();
|
|
@@ -77,25 +61,25 @@ export default function AppShell(props:AppShellProps) {
|
|
|
77
61
|
const userName = envInfo.getOperatorName();
|
|
78
62
|
const currentUserInitials = Utils.getInitials(userName);
|
|
79
63
|
const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : '';
|
|
80
|
-
const portalClass = pConn.getValue('.classID', '');
|
|
64
|
+
const portalClass = pConn.getValue('.classID', ''); // 2nd arg empty string until typedef marked correctly
|
|
81
65
|
const envPortalName = envInfo.getPortalName();
|
|
82
66
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
83
67
|
|
|
84
68
|
const classes = useStyles();
|
|
85
69
|
const actionsAPI = pConn.getActionsApi();
|
|
86
|
-
const localeReference = pConn.getValue('.pyLocaleReference', '');
|
|
87
|
-
const [imageBlobUrl, setImageBlobUrl] = useState(null);
|
|
70
|
+
const localeReference = pConn.getValue('.pyLocaleReference', ''); // 2nd arg empty string until typedef marked correctly
|
|
71
|
+
const [imageBlobUrl, setImageBlobUrl] = useState<string | null>(null);
|
|
88
72
|
// useState for appName and mapChildren - note these are ONLY updated once (on component mount!)
|
|
89
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
90
74
|
const [appName, setAppName] = useState('');
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
92
76
|
const [mapChildren, setMapChildren] = useState([]);
|
|
93
77
|
|
|
94
78
|
// Initial setting of appName and mapChildren
|
|
95
79
|
useEffect(() => {
|
|
96
80
|
setAppName(PCore.getEnvironmentInfo().getApplicationName());
|
|
97
81
|
|
|
98
|
-
const tempMap: any = pConn.getChildren()?.
|
|
82
|
+
const tempMap: any = (pConn.getChildren() as any)?.map((child: any, index) => {
|
|
99
83
|
const theChildComp = child.getPConnect().getComponentName();
|
|
100
84
|
const theKey = `.${index}`;
|
|
101
85
|
return (
|
|
@@ -118,9 +102,7 @@ export default function AppShell(props:AppShellProps) {
|
|
|
118
102
|
portalLogo.toLowerCase().includes('py-logo') ||
|
|
119
103
|
portalLogo.toLowerCase().includes('py-full-logo')
|
|
120
104
|
) {
|
|
121
|
-
const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat(
|
|
122
|
-
'pzpega-logo-mark.svg'
|
|
123
|
-
);
|
|
105
|
+
const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat('pzpega-logo-mark.svg');
|
|
124
106
|
setIconURL(portalLogoImage);
|
|
125
107
|
setFullIconURL(`${Utils.getSDKStaticConentUrl()}static/py-full-logo.svg`);
|
|
126
108
|
}
|
|
@@ -134,10 +116,8 @@ export default function AppShell(props:AppShellProps) {
|
|
|
134
116
|
setFullIconURL(data);
|
|
135
117
|
})
|
|
136
118
|
.catch(() => {
|
|
137
|
-
|
|
138
|
-
console.error(
|
|
139
|
-
`${localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`
|
|
140
|
-
);
|
|
119
|
+
// eslint-disable-next-line no-console
|
|
120
|
+
console.error(`${localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`);
|
|
141
121
|
});
|
|
142
122
|
}
|
|
143
123
|
}, [portalLogo]);
|
|
@@ -176,10 +156,7 @@ export default function AppShell(props:AppShellProps) {
|
|
|
176
156
|
name,
|
|
177
157
|
icon: page.pxPageViewIcon.replace('pi pi-', ''),
|
|
178
158
|
active: page.pyRuleName === activeTab,
|
|
179
|
-
onClick: () =>
|
|
180
|
-
!page.pyURLContent || page.pyURLContent === ''
|
|
181
|
-
? showPage(page.pyRuleName, page.pyClassName)
|
|
182
|
-
: openURL(page.pyURLContent)
|
|
159
|
+
onClick: () => (!page.pyURLContent || page.pyURLContent === '' ? showPage(page.pyRuleName, page.pyClassName) : openURL(page.pyURLContent))
|
|
183
160
|
};
|
|
184
161
|
});
|
|
185
162
|
|
|
@@ -198,18 +175,10 @@ export default function AppShell(props:AppShellProps) {
|
|
|
198
175
|
portalName={portalName}
|
|
199
176
|
imageSrc={iconURL}
|
|
200
177
|
fullImageSrc={fullIconURL}
|
|
201
|
-
appName={localizedVal(
|
|
202
|
-
appNameToDisplay,
|
|
203
|
-
'',
|
|
204
|
-
`${portalClass}!PORTAL!${envPortalName}`.toUpperCase()
|
|
205
|
-
)}
|
|
178
|
+
appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
|
|
206
179
|
appInfo={{
|
|
207
180
|
imageSrc: iconURL,
|
|
208
|
-
appName: localizedVal(
|
|
209
|
-
appNameToDisplay,
|
|
210
|
-
'',
|
|
211
|
-
`${portalClass}!PORTAL!${envPortalName}`.toUpperCase()
|
|
212
|
-
),
|
|
181
|
+
appName: localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),
|
|
213
182
|
onClick: links[0] && /* links[0].onClick ? */ links[0].onClick /* : undefined */
|
|
214
183
|
}}
|
|
215
184
|
navLinks={links.filter((link, index) => {
|
|
@@ -220,24 +189,20 @@ export default function AppShell(props:AppShellProps) {
|
|
|
220
189
|
/>
|
|
221
190
|
<div className={classes.wsscontent}>{children}</div>
|
|
222
191
|
</div>
|
|
223
|
-
|
|
224
192
|
);
|
|
225
193
|
}
|
|
226
194
|
|
|
227
195
|
return (
|
|
196
|
+
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
228
197
|
<NavContext.Provider value={{ open, setOpen }}>
|
|
229
198
|
<div id='AppShell' className={classes.root}>
|
|
230
199
|
<NavBar
|
|
231
200
|
getPConnect={getPConnect}
|
|
232
201
|
pConn={getPConnect()}
|
|
233
|
-
appName={localizedVal(
|
|
234
|
-
appNameToDisplay,
|
|
235
|
-
'',
|
|
236
|
-
`${portalClass}!PORTAL!${envPortalName}`.toUpperCase()
|
|
237
|
-
)}
|
|
202
|
+
appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}
|
|
238
203
|
pages={pages}
|
|
239
204
|
caseTypes={caseTypes}
|
|
240
|
-
|
|
205
|
+
/>
|
|
241
206
|
<div className={classes.content}>{children}</div>
|
|
242
207
|
</div>
|
|
243
208
|
</NavContext.Provider>
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
1
|
+
import { Children, PropsWithChildren, useMemo } from 'react';
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
4
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
5
|
|
|
7
|
-
interface BannerPageProps {
|
|
6
|
+
interface BannerPageProps extends PConnProps {
|
|
8
7
|
// If any, enter additional props that only exist on this component
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
tintImage?: boolean
|
|
8
|
+
layout?: string;
|
|
9
|
+
heading?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
imageTheme?: string;
|
|
12
|
+
backgroundImage?: string;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
tintImage?: boolean;
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
/*
|
|
20
18
|
* BannerPage template.
|
|
21
19
|
*/
|
|
22
|
-
export default function BannerPage(props: BannerPageProps) {
|
|
20
|
+
export default function BannerPage(props: PropsWithChildren<BannerPageProps>) {
|
|
23
21
|
// Get emitted components from map (so we can get any override that may exist)
|
|
24
22
|
const Banner = getComponentFromMap('Banner');
|
|
25
23
|
|