@pega/react-sdk-overrides 24.2.10 → 25.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/designSystemExtension/Banner/Banner.tsx +10 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +8 -9
- package/lib/designSystemExtension/Operator/Operator.tsx +21 -19
- package/lib/designSystemExtension/Pulse/Pulse.tsx +1 -1
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
- package/lib/field/AutoComplete/AutoComplete.tsx +1 -1
- package/lib/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/field/CancelAlert/CancelAlert.tsx +7 -10
- package/lib/field/Checkbox/Checkbox.tsx +97 -4
- package/lib/field/Currency/Currency.tsx +10 -7
- package/lib/field/Currency/currency-utils.ts +1 -2
- package/lib/field/Date/Date.tsx +8 -8
- package/lib/field/DateTime/DateTime.tsx +16 -13
- package/lib/field/Decimal/Decimal.tsx +10 -7
- package/lib/field/Dropdown/Dropdown.tsx +30 -25
- package/lib/field/Email/Email.tsx +11 -13
- package/lib/field/Group/Group.tsx +10 -8
- package/lib/field/Integer/Integer.tsx +5 -7
- package/lib/field/Location/Location.css +4 -0
- package/lib/field/Location/Location.tsx +258 -0
- package/lib/field/Location/config-ext.json +8 -0
- package/lib/field/Location/index.tsx +1 -0
- package/lib/field/Multiselect/utils.ts +1 -1
- package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
- package/lib/field/ObjectReference/index.tsx +1 -0
- package/lib/field/ObjectReference/utils.ts +111 -0
- package/lib/field/Percentage/Percentage.tsx +9 -9
- package/lib/field/Phone/Phone.tsx +7 -5
- package/lib/field/RadioButtons/RadioButtons.tsx +47 -5
- package/lib/field/RichText/RichText.css +79 -0
- package/lib/field/RichText/RichText.tsx +3 -1
- package/lib/field/ScalarList/ScalarList.tsx +2 -4
- package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
- package/lib/field/SelectableCard/index.tsx +1 -0
- package/lib/field/SelectableCard/utils.tsx +223 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +160 -28
- package/lib/field/SemanticLink/utils.ts +1 -1
- package/lib/field/TextArea/TextArea.tsx +5 -7
- package/lib/field/TextContent/TextContent.tsx +1 -2
- package/lib/field/TextInput/TextInput.tsx +5 -7
- package/lib/field/Time/Time.tsx +4 -8
- package/lib/field/URL/URL.tsx +5 -7
- package/lib/field/UserReference/UserReference.tsx +3 -6
- package/lib/helpers/attachmentShared.ts +6 -0
- package/lib/helpers/common-utils.ts +24 -2
- package/lib/helpers/data_page.ts +0 -1
- package/lib/helpers/field-group-utils.ts +1 -1
- package/lib/helpers/formatters/Currency.ts +20 -20
- package/lib/helpers/formatters/CurrencyMap.ts +0 -2
- package/lib/helpers/formatters/common.ts +2 -1
- package/lib/helpers/formatters/index.ts +2 -4
- package/lib/helpers/object-utils.ts +10 -0
- package/lib/helpers/simpleTableHelpers.ts +118 -6
- package/lib/helpers/utils.ts +8 -1
- package/lib/helpers/versionHelpers.ts +0 -1
- package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
- package/lib/infra/Assignment/Assignment.tsx +39 -36
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +21 -113
- package/lib/infra/Containers/FlowContainer/helpers.ts +1 -5
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +4 -3
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +7 -6
- package/lib/infra/Containers/SimpleView/helper.ts +1 -1
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +4 -5
- package/lib/infra/Containers/container-helpers.ts +52 -0
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +5 -9
- package/lib/infra/DashboardFilter/filterUtils.tsx +3 -6
- package/lib/infra/DeferLoad/DeferLoad.tsx +7 -9
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
- package/lib/infra/MultiStep/MultiStep.css +48 -70
- package/lib/infra/MultiStep/MultiStep.tsx +27 -58
- package/lib/infra/NavBar/NavBar.css +1 -1
- package/lib/infra/NavBar/NavBar.tsx +43 -32
- package/lib/infra/Reference/Reference.tsx +3 -4
- package/lib/infra/Region/Region.tsx +1 -1
- package/lib/infra/RootContainer/RootContainer.tsx +3 -4
- package/lib/infra/Stages/Stages.tsx +3 -4
- package/lib/infra/View/View.tsx +4 -3
- package/lib/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
- package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/lib/template/AdvancedSearch/config-ext.json +9 -0
- package/lib/template/AdvancedSearch/index.tsx +1 -0
- package/lib/template/AppShell/AppShell.css +1 -1
- package/lib/template/AppShell/AppShell.tsx +22 -23
- package/lib/template/BannerPage/BannerPage.tsx +2 -2
- package/lib/template/CaseSummary/CaseSummary.tsx +28 -41
- package/lib/template/CaseView/CaseView.tsx +32 -38
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/lib/template/Confirmation/Confirmation.tsx +3 -4
- package/lib/template/DataReference/DataReference.tsx +312 -106
- package/lib/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/lib/template/DataReference/SearchForm.tsx +149 -0
- package/lib/template/DataReference/utils.ts +90 -0
- package/lib/template/DefaultForm/DefaultForm.tsx +3 -3
- package/lib/template/DefaultForm/utils/index.ts +1 -3
- package/lib/template/DefaultPage/DefaultPage.tsx +108 -0
- package/lib/template/DefaultPage/index.tsx +1 -0
- package/lib/template/Details/Details/Details.tsx +11 -11
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +1 -2
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -5
- package/lib/template/InlineDashboard/InlineDashboard.tsx +14 -16
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
- package/lib/template/ListPage/ListPage.tsx +1 -1
- package/lib/template/ListView/ListView.tsx +285 -204
- package/lib/template/ListView/hooks.ts +1 -5
- package/lib/template/ListView/utils.ts +38 -6
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +5 -5
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -7
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
- package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -3
- package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +145 -0
- package/lib/template/SelfServiceCaseView/index.tsx +1 -0
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +2 -5
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +99 -84
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
- package/lib/template/SubTabs/SubTabs.tsx +2 -2
- package/lib/template/SubTabs/tabUtils.ts +118 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +9 -10
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +9 -10
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +5 -5
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
- package/lib/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/template/WssNavBar/WssNavBar.tsx +6 -6
- package/lib/template/utils.tsx +58 -0
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
- package/lib/widget/Attachment/Attachment.css +7 -8
- package/lib/widget/Attachment/Attachment.tsx +304 -231
- package/lib/widget/Attachment/Attachment.types.ts +96 -0
- package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
- package/lib/widget/CaseHistory/CaseHistory.tsx +5 -5
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +30 -23
- package/lib/widget/Followers/Followers.tsx +2 -4
- package/lib/widget/QuickCreate/QuickCreate.tsx +1 -3
- package/lib/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/widget/SummaryItem/SummaryItem.tsx +3 -3
- package/lib/widget/SummaryList/SummaryList.tsx +1 -1
- package/lib/widget/ToDo/ToDo.css +1 -13
- package/lib/widget/ToDo/ToDo.tsx +38 -37
- package/package.json +1 -1
- package/lib/helpers/attachmentHelpers.ts +0 -76
- package/lib/infra/Containers/helpers.ts +0 -6
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactElement } from 'react';
|
|
1
|
+
import type { PropsWithChildren, ReactElement } from 'react';
|
|
2
2
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
3
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
3
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
4
|
|
|
5
5
|
interface CaseSummaryProps extends PConnProps {
|
|
6
|
+
arPrimaryFields: any[];
|
|
7
|
+
arSecondaryFields: any[];
|
|
6
8
|
// If any, enter additional props that only exist on this component
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -11,26 +13,16 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
11
13
|
const CaseSummaryFields = getComponentFromMap('CaseSummaryFields');
|
|
12
14
|
|
|
13
15
|
const { getPConnect, children } = props;
|
|
16
|
+
let { arPrimaryFields = [], arSecondaryFields = [] } = props;
|
|
14
17
|
|
|
15
|
-
const thePConn = getPConnect();
|
|
16
|
-
const theConfigProps: any = thePConn
|
|
17
|
-
|
|
18
|
-
const status = theConfigProps
|
|
19
|
-
const showStatus = theConfigProps
|
|
18
|
+
const thePConn = getPConnect && getPConnect();
|
|
19
|
+
const theConfigProps: any = thePConn?.getConfigProps();
|
|
20
|
+
|
|
21
|
+
const status = theConfigProps?.status;
|
|
22
|
+
const showStatus = theConfigProps?.showStatus;
|
|
20
23
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
21
24
|
const localeCategory = 'ModalContainer';
|
|
22
|
-
// from Constellation DX Components
|
|
23
|
-
// get the primary and secondary fields with the raw data (which has the non-resolved property values)
|
|
24
|
-
// const regionsRaw = getPConnect().getRawMetadata().children;
|
|
25
|
-
// const primaryFieldsRaw = regionsRaw[0].children;
|
|
26
|
-
// const secondaryFieldsRaw = regionsRaw[1].children;
|
|
27
|
-
|
|
28
|
-
// From other SDKs
|
|
29
|
-
// may want to move these into useEffect/useState combo
|
|
30
|
-
let arPrimaryFields: any[] = [];
|
|
31
|
-
let arSecondaryFields: any[] = [];
|
|
32
25
|
|
|
33
|
-
/* eslint-disable @typescript-eslint/no-shadow */
|
|
34
26
|
function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
|
|
35
27
|
const { config, children } = pConnectMeta;
|
|
36
28
|
const pConnect = getPConnect();
|
|
@@ -62,32 +54,27 @@ export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>)
|
|
|
62
54
|
return summaryFieldChildren ? convertChildrenToSummaryData(summaryFieldChildren?.getChildren()) : undefined;
|
|
63
55
|
}
|
|
64
56
|
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
field.config
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
field
|
|
80
|
-
|
|
57
|
+
if (arPrimaryFields.length === 0 && arSecondaryFields.length === 0) {
|
|
58
|
+
for (const child of children as ReactElement[]) {
|
|
59
|
+
const childPConn = (child as ReactElement).props.getPConnect();
|
|
60
|
+
const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());
|
|
61
|
+
if (childPConnData.name.toLowerCase() === 'primary fields') {
|
|
62
|
+
arPrimaryFields = childPConnData.children;
|
|
63
|
+
arPrimaryFields.forEach(field => {
|
|
64
|
+
if (field.config?.value && typeof field.config?.value === 'string') {
|
|
65
|
+
field.config.value = localizedVal(field.config.value, localeCategory);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
} else if (childPConnData.name.toLowerCase() === 'secondary fields') {
|
|
69
|
+
const secondarySummaryFields = prepareCaseSummaryData(childPConn);
|
|
70
|
+
arSecondaryFields = childPConnData.children;
|
|
71
|
+
arSecondaryFields.forEach((field, index) => {
|
|
72
|
+
field.config.displayLabel = secondarySummaryFields[index]?.value?.props?.label;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
81
75
|
}
|
|
82
76
|
}
|
|
83
77
|
|
|
84
|
-
// At this point, should hand off to another component for layout and rendering
|
|
85
|
-
// of primary and secondary fields in the Case Summary
|
|
86
|
-
|
|
87
|
-
// debugging/investigation help
|
|
88
|
-
// console.log(`CaseSummary: arPrimaryFields: ${JSON.stringify(arPrimaryFields)}`);
|
|
89
|
-
// console.log(`CaseSummary: arSecondaryFields: ${JSON.stringify(arSecondaryFields)}`);
|
|
90
|
-
|
|
91
78
|
return (
|
|
92
79
|
<div id='CaseSummary'>
|
|
93
80
|
<CaseSummaryFields status={status} showStatus={showStatus} theFields={arPrimaryFields} />
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { PropsWithChildren, ReactElement, useContext, useEffect, useState } from 'react';
|
|
1
|
+
import { type PropsWithChildren, type ReactElement, useContext, useEffect, useState } from 'react';
|
|
4
2
|
import { Avatar, Card, CardHeader, Divider, Typography } from '@mui/material';
|
|
5
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
6
4
|
import Box from '@mui/material/Box';
|
|
7
5
|
import Button from '@mui/material/Button';
|
|
8
|
-
import
|
|
6
|
+
import Grid2 from '@mui/material/Grid2';
|
|
9
7
|
|
|
10
8
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
11
9
|
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
12
10
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
13
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
11
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
14
12
|
|
|
15
13
|
interface CaseViewProps extends PConnProps {
|
|
16
14
|
// If any, enter additional props that only exist on this component
|
|
@@ -19,6 +17,7 @@ interface CaseViewProps extends PConnProps {
|
|
|
19
17
|
header: string;
|
|
20
18
|
showIconInHeader: boolean;
|
|
21
19
|
caseInfo: any;
|
|
20
|
+
lastUpdateCaseTime: any;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
const useStyles = makeStyles(theme => ({
|
|
@@ -42,9 +41,6 @@ const useStyles = makeStyles(theme => ({
|
|
|
42
41
|
width: theme.spacing(8),
|
|
43
42
|
height: theme.spacing(8),
|
|
44
43
|
padding: theme.spacing(1)
|
|
45
|
-
},
|
|
46
|
-
caseViewIconImage: {
|
|
47
|
-
filter: 'invert(100%)'
|
|
48
44
|
}
|
|
49
45
|
}));
|
|
50
46
|
|
|
@@ -60,14 +56,11 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
60
56
|
header,
|
|
61
57
|
subheader,
|
|
62
58
|
children = [],
|
|
63
|
-
|
|
64
|
-
showIconInHeader = true,
|
|
65
|
-
caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '' }
|
|
59
|
+
caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '', caseTypeIcon }
|
|
66
60
|
} = props;
|
|
67
|
-
|
|
61
|
+
const { lastUpdateCaseTime = getPConnect().getValue('caseInfo.lastUpdateTime') } = props;
|
|
68
62
|
const currentCaseID = props.caseInfo.ID;
|
|
69
63
|
let isComponentMounted = true;
|
|
70
|
-
|
|
71
64
|
const { displayOnlyFA } = useContext<any>(StoreContext);
|
|
72
65
|
|
|
73
66
|
const thePConn = getPConnect();
|
|
@@ -77,8 +70,8 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
77
70
|
const editAction = availableActions.find(action => action.ID === 'pyUpdateCaseDetails');
|
|
78
71
|
|
|
79
72
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
73
|
+
const localizationService = thePConn.getLocalizationService();
|
|
80
74
|
const localeCategory = 'CaseView';
|
|
81
|
-
const localeKey = `${caseTypeID}!CASE!${caseTypeName}`.toUpperCase();
|
|
82
75
|
|
|
83
76
|
/**
|
|
84
77
|
*
|
|
@@ -86,9 +79,8 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
86
79
|
*/
|
|
87
80
|
function getChildRegionByName(inName: string): any {
|
|
88
81
|
for (const child of children as ReactElement[]) {
|
|
89
|
-
const theMetadataType: string = (child as ReactElement).props.getPConnect().getRawMetadata().type
|
|
90
|
-
const theMetadataName: string = (child as ReactElement).props.getPConnect().getRawMetadata().name
|
|
91
|
-
|
|
82
|
+
const theMetadataType: string = (child as ReactElement).props.getPConnect().getRawMetadata().type?.toLowerCase();
|
|
83
|
+
const theMetadataName: string = (child as ReactElement).props.getPConnect().getRawMetadata().name?.toLowerCase();
|
|
92
84
|
if (theMetadataType === 'region' && theMetadataName === inName) {
|
|
93
85
|
return child;
|
|
94
86
|
}
|
|
@@ -103,7 +95,12 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
103
95
|
const theUtilitiesRegion = getChildRegionByName('utilities');
|
|
104
96
|
const theTabsRegion = getChildRegionByName('tabs');
|
|
105
97
|
|
|
106
|
-
|
|
98
|
+
let iconForCaseType = caseTypeIcon ? caseTypeIcon.replace('pi pi-', '') : icon;
|
|
99
|
+
|
|
100
|
+
if (!iconForCaseType || iconForCaseType.includes('.')) {
|
|
101
|
+
iconForCaseType = 'polaris-solid';
|
|
102
|
+
}
|
|
103
|
+
const caseSvgIconUrl = Utils.getImageSrc(iconForCaseType, Utils.getSDKStaticConentUrl());
|
|
107
104
|
|
|
108
105
|
const [activeVertTab, setActiveVertTab] = useState(0);
|
|
109
106
|
|
|
@@ -111,10 +108,10 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
111
108
|
// const tmpLoadData2 = { config: { label: "Case History", name: "CaseHistory" }, type: "DeferLoad" };
|
|
112
109
|
|
|
113
110
|
// Extract the tabs we need to display from theTabsRegion (one tab per entry in theTabsRegionChildren)
|
|
114
|
-
const theTabsRegionChildren = theTabsRegion
|
|
111
|
+
const theTabsRegionChildren = theTabsRegion?.props.getPConnect().getChildren();
|
|
115
112
|
|
|
116
113
|
// vertTabInfo is sent to VerticalTabs component
|
|
117
|
-
const vertTabInfo:
|
|
114
|
+
const vertTabInfo: object[] = [];
|
|
118
115
|
|
|
119
116
|
// deferLoadInfo is sent to DeferLoad component (currently selected entry)
|
|
120
117
|
const deferLoadInfo: any[] = [];
|
|
@@ -169,7 +166,6 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
169
166
|
|
|
170
167
|
useEffect(() => {
|
|
171
168
|
if (hasNewAttachments) {
|
|
172
|
-
// @ts-ignore - Argument of type 'boolean' is not assignable to parameter of type 'object'
|
|
173
169
|
PCore.getPubSubUtils().publish((PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
174
170
|
}
|
|
175
171
|
}, [hasNewAttachments]);
|
|
@@ -209,8 +205,8 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
209
205
|
if (!displayOnlyFA) {
|
|
210
206
|
// show full portal
|
|
211
207
|
return (
|
|
212
|
-
<
|
|
213
|
-
<
|
|
208
|
+
<Grid2 container>
|
|
209
|
+
<Grid2 size={{ xs: 3 }}>
|
|
214
210
|
<div hidden={true} id='current-caseID'>
|
|
215
211
|
{currentCaseID}
|
|
216
212
|
</div>
|
|
@@ -219,7 +215,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
219
215
|
className={classes.caseViewHeader}
|
|
220
216
|
title={
|
|
221
217
|
<Typography variant='h6' component='div' id='case-name'>
|
|
222
|
-
{
|
|
218
|
+
{localizationService.getLocalizedText(header)}
|
|
223
219
|
</Typography>
|
|
224
220
|
}
|
|
225
221
|
subheader={
|
|
@@ -229,7 +225,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
229
225
|
}
|
|
230
226
|
avatar={
|
|
231
227
|
<Avatar className={classes.caseViewIconBox} variant='square'>
|
|
232
|
-
<img src={
|
|
228
|
+
<img src={caseSvgIconUrl} />
|
|
233
229
|
</Avatar>
|
|
234
230
|
}
|
|
235
231
|
/>
|
|
@@ -239,27 +235,25 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
239
235
|
<Divider />
|
|
240
236
|
{vertTabInfo.length > 1 && <VerticalTabs tabconfig={vertTabInfo} />}
|
|
241
237
|
</Card>
|
|
242
|
-
</
|
|
238
|
+
</Grid2>
|
|
243
239
|
|
|
244
|
-
<
|
|
240
|
+
<Grid2 size={{ xs: 6 }}>
|
|
245
241
|
{theStagesRegion}
|
|
246
242
|
{theTodoRegion}
|
|
247
|
-
{deferLoadInfo.length > 0 &&
|
|
248
|
-
|
|
243
|
+
{deferLoadInfo.length > 0 && (
|
|
244
|
+
<DeferLoad getPConnect={getPConnect} name={deferLoadInfo[activeVertTab].config.name} isTab lastUpdateCaseTime={lastUpdateCaseTime} />
|
|
245
|
+
)}
|
|
246
|
+
</Grid2>
|
|
249
247
|
|
|
250
|
-
<
|
|
251
|
-
|
|
252
|
-
</Grid>
|
|
253
|
-
</Grid>
|
|
248
|
+
<Grid2 size={{ xs: 3 }}>{theUtilitiesRegion}</Grid2>
|
|
249
|
+
</Grid2>
|
|
254
250
|
);
|
|
255
251
|
}
|
|
256
252
|
// displayOnlyFA - only show the "todo" region
|
|
257
253
|
return (
|
|
258
|
-
<
|
|
259
|
-
<
|
|
260
|
-
|
|
261
|
-
</Grid>
|
|
262
|
-
</Grid>
|
|
254
|
+
<Grid2 container>
|
|
255
|
+
<Grid2 size={{ xs: 12 }}>{theTodoRegion}</Grid2>
|
|
256
|
+
</Grid2>
|
|
263
257
|
);
|
|
264
258
|
}
|
|
265
259
|
|
|
@@ -3,7 +3,7 @@ import Button from '@mui/material/Button';
|
|
|
3
3
|
import Menu from '@mui/material/Menu';
|
|
4
4
|
import MenuItem from '@mui/material/MenuItem';
|
|
5
5
|
|
|
6
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
7
|
import Snackbar from '@mui/material/Snackbar';
|
|
8
8
|
import IconButton from '@mui/material/IconButton';
|
|
9
9
|
import CloseIcon from '@mui/icons-material/Close';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { PropsWithChildren, useState } from 'react';
|
|
1
|
+
import { type PropsWithChildren, useState } from 'react';
|
|
3
2
|
import { Button, Card } from '@mui/material';
|
|
4
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
5
4
|
|
|
6
5
|
import { getToDoAssignments } from '@pega/react-sdk-components/lib/components/infra/Containers/FlowContainer/helpers';
|
|
7
6
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
8
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
8
|
|
|
10
9
|
interface ConfirmationProps extends PConnProps {
|
|
11
10
|
// If any, enter additional props that only exist on this component
|
|
@@ -41,7 +40,7 @@ export default function Confirmation(props: PropsWithChildren<ConfirmationProps>
|
|
|
41
40
|
// Not using whatsNext at the moment, need to figure out the use of it
|
|
42
41
|
// const whatsNext = datasource?.source;
|
|
43
42
|
// const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';
|
|
44
|
-
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget());
|
|
43
|
+
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget() || '');
|
|
45
44
|
const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), activeContainerItemID);
|
|
46
45
|
const onConfirmViewClose = () => {
|
|
47
46
|
setShowConfirmView(false);
|