@pega/react-sdk-overrides 0.25.5 → 0.25.7
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/CaseSummaryFields/CaseSummaryFields.tsx +1 -1
- package/lib/field/RadioButtons/RadioButtons.tsx +1 -1
- package/lib/field/SelectableCard/utils.tsx +2 -5
- package/lib/field/SemanticLink/SemanticLink.tsx +1 -1
- package/lib/helpers/attachmentShared.ts +6 -0
- package/lib/helpers/common-utils.ts +1 -2
- package/lib/helpers/formatters/Currency.ts +9 -4
- package/lib/helpers/object-utils.ts +10 -0
- package/lib/infra/Assignment/Assignment.tsx +1 -1
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +2 -2
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +4 -3
- package/lib/infra/MultiStep/MultiStep.css +0 -2
- package/lib/infra/NavBar/NavBar.tsx +2 -3
- package/lib/infra/Stages/Stages.tsx +1 -1
- package/lib/template/AppShell/AppShell.tsx +5 -0
- package/lib/template/CaseSummary/CaseSummary.tsx +65 -4
- package/lib/template/CaseView/CaseView.tsx +3 -10
- package/lib/template/DataReference/DataReference.tsx +1 -2
- package/lib/template/ListView/ListView.tsx +1 -1
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +1 -1
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +9 -1
- package/lib/widget/Attachment/Attachment.tsx +284 -210
- package/lib/widget/Attachment/Attachment.types.ts +96 -0
- package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +25 -16
- package/lib/widget/ToDo/ToDo.tsx +10 -5
- package/package.json +1 -1
- package/lib/helpers/attachmentHelpers.ts +0 -97
|
@@ -223,7 +223,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
223
223
|
|
|
224
224
|
// Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render
|
|
225
225
|
useEffect(() => {
|
|
226
|
-
const arGridItems = theFieldsToRender
|
|
226
|
+
const arGridItems = theFieldsToRender?.map((field: any) => {
|
|
227
227
|
// display the field when either visibility property doesn't exist or is true(if exists)
|
|
228
228
|
if (field.config.visibility === undefined || field.config.visibility === true) {
|
|
229
229
|
return (
|
|
@@ -108,7 +108,7 @@ export default function RadioButtons(props: RadioButtonsProps) {
|
|
|
108
108
|
return (
|
|
109
109
|
<div>
|
|
110
110
|
<h4 style={{ marginTop: 0, marginBottom: 0 }}>{label}</h4>
|
|
111
|
-
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(200px, 100%), 1fr))', gap: '1rem' }}>
|
|
111
|
+
<div id='selectable-card' style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(200px, 100%), 1fr))', gap: '1rem' }}>
|
|
112
112
|
<SelectableCard
|
|
113
113
|
hideFieldLabels={hideFieldLabels}
|
|
114
114
|
additionalProps={additionalProps}
|
|
@@ -2,10 +2,6 @@ import { Link } from '@mui/material';
|
|
|
2
2
|
|
|
3
3
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
4
4
|
|
|
5
|
-
export const getResolvedConstantValue = (pConnect, key) => {
|
|
6
|
-
return pConnect.getValue(PCore.getResolvedConstantValue(key)) || pConnect.getValue(key);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
5
|
export const resolveReferencedPConnect = pConnect => {
|
|
10
6
|
if (!pConnect || !pConnect.meta) return undefined;
|
|
11
7
|
const type = pConnect?._type ?? undefined;
|
|
@@ -203,7 +199,8 @@ export function resolveReferenceFields(
|
|
|
203
199
|
...preset,
|
|
204
200
|
config: {
|
|
205
201
|
...preset.config,
|
|
206
|
-
displayMode: 'DISPLAY_ONLY'
|
|
202
|
+
displayMode: 'DISPLAY_ONLY',
|
|
203
|
+
contextName: pConnect.getContextName()
|
|
207
204
|
}
|
|
208
205
|
},
|
|
209
206
|
useCustomContext: item
|
|
@@ -9,8 +9,7 @@ export function isEmptyObject(obj: object): boolean {
|
|
|
9
9
|
* @returns The localized string or the key itself if no translation is found
|
|
10
10
|
*/
|
|
11
11
|
export function getGenericFieldsLocalizedValue(path: string, key: string): string {
|
|
12
|
-
const
|
|
13
|
-
const localeStore = PCore.getLocaleUtils().localeStore[GENERIC_BUNDLE_KEY];
|
|
12
|
+
const localeStore = PCore.getLocaleUtils().localeStore;
|
|
14
13
|
|
|
15
14
|
if (!localeStore) return key;
|
|
16
15
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { getLocale } from './common';
|
|
2
2
|
import CurrencyMap from './CurrencyMap';
|
|
3
3
|
|
|
4
|
+
const isValidValue = value => {
|
|
5
|
+
return value !== null && value !== undefined && value !== '';
|
|
6
|
+
};
|
|
7
|
+
|
|
4
8
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
9
|
function NumberFormatter(value, { locale = 'en-US', decPlaces = 2, style = '', currency = 'USD' } = {}): string {
|
|
6
10
|
const currentLocale: string | undefined = getLocale(locale);
|
|
7
|
-
if (value
|
|
11
|
+
if (isValidValue(value)) {
|
|
8
12
|
return Number(value).toLocaleString(currentLocale, { minimumFractionDigits: decPlaces, maximumFractionDigits: decPlaces });
|
|
9
13
|
}
|
|
10
14
|
return value;
|
|
@@ -16,7 +20,7 @@ function CurrencyFormatter(
|
|
|
16
20
|
): string {
|
|
17
21
|
const currentLocale: string | undefined = getLocale(locale);
|
|
18
22
|
let formattedValue: string = value;
|
|
19
|
-
if (value
|
|
23
|
+
if (isValidValue(value)) {
|
|
20
24
|
formattedValue = NumberFormatter(value, { locale: currentLocale, decPlaces, style, currency });
|
|
21
25
|
|
|
22
26
|
// For currency other than EUR, we need to determine the country code from currency code
|
|
@@ -55,7 +59,7 @@ function CurrencyFormatter(
|
|
|
55
59
|
|
|
56
60
|
function SymbolFormatter(value, { symbol = '$', suffix = true, locale = 'en-US' } = {}): string {
|
|
57
61
|
let formattedValue: string = value;
|
|
58
|
-
if (value
|
|
62
|
+
if (isValidValue(value)) {
|
|
59
63
|
formattedValue = NumberFormatter(value, { locale });
|
|
60
64
|
return suffix ? `${formattedValue}${symbol}` : `${symbol}${formattedValue}`;
|
|
61
65
|
}
|
|
@@ -68,5 +72,6 @@ export default {
|
|
|
68
72
|
Decimal: (value, options) => NumberFormatter(value, options),
|
|
69
73
|
'Decimal-Auto': (value, options) => NumberFormatter(value, { ...options, decPlaces: Number.isInteger(value) ? 0 : 2 }),
|
|
70
74
|
Integer: (value, options) => NumberFormatter(value, { ...options, decPlaces: 0 }),
|
|
71
|
-
Percentage: (value, options) => SymbolFormatter(value, { ...options, symbol: '%' })
|
|
75
|
+
Percentage: (value, options) => SymbolFormatter(value, { ...options, symbol: '%' }),
|
|
76
|
+
isValidValue
|
|
72
77
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the value of the key from objectInfo/caseInfo
|
|
3
|
+
* Added fallback to retrieve from caseInfo if objectInfo not present.
|
|
4
|
+
* @param pConnect
|
|
5
|
+
* @param key
|
|
6
|
+
* @returns the value of key
|
|
7
|
+
*/
|
|
8
|
+
export const getResolvedConstantValue = (pConnect: typeof PConnect, key: string) => {
|
|
9
|
+
return pConnect.getValue(PCore.getResolvedConstantValue(key)) || pConnect.getValue(key);
|
|
10
|
+
};
|
|
@@ -34,7 +34,7 @@ export default function Assignment(props: PropsWithChildren<AssignmentProps>) {
|
|
|
34
34
|
const actionsAPI = thePConn.getActionsApi();
|
|
35
35
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
36
36
|
const localeCategory = 'Assignment';
|
|
37
|
-
const localeReference =
|
|
37
|
+
const localeReference = getPConnect()?.getCaseLocaleReference();
|
|
38
38
|
|
|
39
39
|
// store off bound functions to above pointers
|
|
40
40
|
const finishAssignment = actionsAPI.finishAssignment.bind(actionsAPI);
|
|
@@ -96,7 +96,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
96
96
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
97
97
|
const localeCategory = 'Messages';
|
|
98
98
|
|
|
99
|
-
const key =
|
|
99
|
+
const key = getPConnect()?.getCaseLocaleReference();
|
|
100
100
|
const classes = useStyles();
|
|
101
101
|
|
|
102
102
|
function getBuildName(): string {
|
|
@@ -218,7 +218,7 @@ export const FlowContainer = (props: FlowContainerProps) => {
|
|
|
218
218
|
<CardHeader
|
|
219
219
|
id='assignment-header'
|
|
220
220
|
title={<Typography variant='h6'>{localizedVal(containerName, undefined, key)}</Typography>}
|
|
221
|
-
subheader={`${localizedVal('
|
|
221
|
+
subheader={`${localizedVal('In', 'Todo')} ${caseId} \u2022 ${localizedVal('Priority', 'Todo')} ${urgency}`}
|
|
222
222
|
avatar={<Avatar className={`${classes.avatar} psdk-avatar`}>{operatorInitials}</Avatar>}
|
|
223
223
|
/>
|
|
224
224
|
{displayPageMessages()}
|
|
@@ -96,6 +96,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
96
96
|
marginBottom: theme.spacing(0)
|
|
97
97
|
},
|
|
98
98
|
dlgContent: {
|
|
99
|
+
paddingTop: `${theme.spacing(1)} !important`,
|
|
99
100
|
marginLeft: theme.spacing(2),
|
|
100
101
|
marginRight: theme.spacing(2),
|
|
101
102
|
marginTop: theme.spacing(0),
|
|
@@ -130,7 +131,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
130
131
|
const [cancelAlertProps, setCancelAlertProps] = useState({});
|
|
131
132
|
const [isMultiRecordData, setMultiRecordData] = useState(false);
|
|
132
133
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
133
|
-
const localeCategory = '
|
|
134
|
+
const localeCategory = 'ModalContainer';
|
|
134
135
|
|
|
135
136
|
const ERROR_WHILE_RENDERING = 'ERROR_WHILE_RENDERING';
|
|
136
137
|
|
|
@@ -254,7 +255,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
254
255
|
const headingValue =
|
|
255
256
|
isDataObject || isMultiRecord
|
|
256
257
|
? getModalHeading(dataObjectAction)
|
|
257
|
-
: determineModalHeaderByAction(actionName, caseTypeName, ID,
|
|
258
|
+
: determineModalHeaderByAction(actionName, caseTypeName, ID, pConnect?.getCaseLocaleReference());
|
|
258
259
|
|
|
259
260
|
let arChildrenAsReact: any[] = [];
|
|
260
261
|
|
|
@@ -309,7 +310,7 @@ export default function ModalViewContainer(props: ModalViewContainerProps) {
|
|
|
309
310
|
|
|
310
311
|
return (
|
|
311
312
|
<>
|
|
312
|
-
<Dialog open={bShowModal} aria-labelledby='form-dialog-title'>
|
|
313
|
+
<Dialog open={bShowModal} aria-labelledby='form-dialog-title' maxWidth={false}>
|
|
313
314
|
<DialogTitle id='form-dialog-title' className={`${classes.dlgTitle} psdk-dialog-title`}>
|
|
314
315
|
{title}
|
|
315
316
|
</DialogTitle>
|
|
@@ -158,14 +158,12 @@ mat-horizontal-stepper {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.psdk-horizontal-step-header {
|
|
161
|
-
overflow: hidden;
|
|
162
161
|
outline: none;
|
|
163
162
|
cursor: pointer;
|
|
164
163
|
position: relative;
|
|
165
164
|
box-sizing: content-box;
|
|
166
165
|
display: flex;
|
|
167
166
|
height: 72px;
|
|
168
|
-
overflow: hidden;
|
|
169
167
|
align-items: center;
|
|
170
168
|
}
|
|
171
169
|
|
|
@@ -126,7 +126,6 @@ export default function NavBar(props: NavBarProps) {
|
|
|
126
126
|
const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);
|
|
127
127
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
128
128
|
const localeUtils = PCore.getLocaleUtils();
|
|
129
|
-
const localeReference = pConn.getValue('.pyLocaleReference');
|
|
130
129
|
|
|
131
130
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
132
131
|
const localeCategory = 'AppShell';
|
|
@@ -241,7 +240,7 @@ export default function NavBar(props: NavBarProps) {
|
|
|
241
240
|
<ListItemIcon>
|
|
242
241
|
<WorkOutlineIcon fontSize='large' />
|
|
243
242
|
</ListItemIcon>
|
|
244
|
-
<ListItemText primary={localeUtils.getLocaleValue(caseType.pyLabel, '',
|
|
243
|
+
<ListItemText primary={localeUtils.getLocaleValue(caseType.pyLabel, '', localeUtils.getCaseLocaleReference(caseType.pyClassName))} />
|
|
245
244
|
</ListItemButton>
|
|
246
245
|
))}
|
|
247
246
|
</List>
|
|
@@ -250,7 +249,7 @@ export default function NavBar(props: NavBarProps) {
|
|
|
250
249
|
{navPages.map(page => (
|
|
251
250
|
<ListItemButton onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>
|
|
252
251
|
<ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>
|
|
253
|
-
<ListItemText primary={localeUtils.getLocaleValue(page.pyLabel, '',
|
|
252
|
+
<ListItemText primary={localeUtils.getLocaleValue(page.pyLabel, '', localeUtils.getCaseLocaleReference(page.pyClassName))} />
|
|
254
253
|
</ListItemButton>
|
|
255
254
|
))}
|
|
256
255
|
</List>
|
|
@@ -57,7 +57,7 @@ export default function Stages(props: StagesProps) {
|
|
|
57
57
|
|
|
58
58
|
const { getPConnect, stages } = props;
|
|
59
59
|
const pConn = getPConnect();
|
|
60
|
-
const key =
|
|
60
|
+
const key = getPConnect()?.getCaseLocaleReference();
|
|
61
61
|
|
|
62
62
|
const filteredStages = getFilteredStages(stages);
|
|
63
63
|
const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, ''); // 2nd arg empty string until typedef allows optional
|
|
@@ -112,6 +112,11 @@ export default function AppShell(props: PropsWithChildren<AppShellProps>) {
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
setMapChildren(tempMap);
|
|
115
|
+
|
|
116
|
+
/* TODO: We're setting the `pyPortalTemplate` for now, this would be handled by the CoreJS in the future releases */
|
|
117
|
+
if (portalTemplate === 'wss') {
|
|
118
|
+
PCore.getEnvironmentInfo().setEnvironmentInfo({ ...PCore.getEnvironmentInfo().environmentInfoObject, pyPortalTemplate: 'wss' } as any);
|
|
119
|
+
}
|
|
115
120
|
}, []);
|
|
116
121
|
|
|
117
122
|
useEffect(() => {
|
|
@@ -1,22 +1,83 @@
|
|
|
1
|
-
import type { PropsWithChildren } 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
3
|
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
4
|
|
|
5
5
|
interface CaseSummaryProps extends PConnProps {
|
|
6
|
-
// If any, enter additional props that only exist on this component
|
|
7
6
|
arPrimaryFields: any[];
|
|
8
7
|
arSecondaryFields: any[];
|
|
8
|
+
// If any, enter additional props that only exist on this component
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>) {
|
|
12
12
|
// Get emitted components from map (so we can get any override that may exist)
|
|
13
13
|
const CaseSummaryFields = getComponentFromMap('CaseSummaryFields');
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const { getPConnect, children } = props;
|
|
16
|
+
let { arPrimaryFields = [], arSecondaryFields = [] } = props;
|
|
17
|
+
|
|
18
|
+
const thePConn = getPConnect && getPConnect();
|
|
19
|
+
const theConfigProps: any = thePConn?.getConfigProps();
|
|
20
|
+
|
|
21
|
+
const status = theConfigProps?.status;
|
|
22
|
+
const showStatus = theConfigProps?.showStatus;
|
|
23
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
24
|
+
const localeCategory = 'ModalContainer';
|
|
25
|
+
|
|
26
|
+
function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
|
|
27
|
+
const { config, children } = pConnectMeta;
|
|
28
|
+
const pConnect = getPConnect();
|
|
29
|
+
|
|
30
|
+
const caseSummaryComponentObject: any = {};
|
|
31
|
+
|
|
32
|
+
const { type } = pConnectMeta;
|
|
33
|
+
const createdComponent = pConnect.createComponent({
|
|
34
|
+
type,
|
|
35
|
+
children: children ? [...children] : [],
|
|
36
|
+
config: {
|
|
37
|
+
...config
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
caseSummaryComponentObject.value = createdComponent;
|
|
42
|
+
return caseSummaryComponentObject;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function prepareCaseSummaryData(summaryFieldChildren) {
|
|
46
|
+
const convertChildrenToSummaryData = kid => {
|
|
47
|
+
return kid?.map((childItem, index) => {
|
|
48
|
+
const childMeta = childItem.getPConnect().meta;
|
|
49
|
+
const caseSummaryComponentObject = prepareComponentInCaseSummary(childMeta, childItem.getPConnect);
|
|
50
|
+
caseSummaryComponentObject.id = index + 1;
|
|
51
|
+
return caseSummaryComponentObject;
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
return summaryFieldChildren ? convertChildrenToSummaryData(summaryFieldChildren?.getChildren()) : undefined;
|
|
55
|
+
}
|
|
56
|
+
|
|
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
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
16
77
|
|
|
17
78
|
return (
|
|
18
79
|
<div id='CaseSummary'>
|
|
19
|
-
<CaseSummaryFields theFields={arPrimaryFields} />
|
|
80
|
+
<CaseSummaryFields status={status} showStatus={showStatus} theFields={arPrimaryFields} />
|
|
20
81
|
<CaseSummaryFields theFields={arSecondaryFields} />
|
|
21
82
|
</div>
|
|
22
83
|
);
|
|
@@ -9,7 +9,6 @@ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
|
9
9
|
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
10
10
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
11
11
|
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
12
|
-
import { prepareCaseSummaryData } from '@pega/react-sdk-components/lib/components/template/utils';
|
|
13
12
|
|
|
14
13
|
interface CaseViewProps extends PConnProps {
|
|
15
14
|
// If any, enter additional props that only exist on this component
|
|
@@ -50,7 +49,6 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
50
49
|
const CaseViewActionsMenu = getComponentFromMap('CaseViewActionsMenu');
|
|
51
50
|
const VerticalTabs = getComponentFromMap('VerticalTabs');
|
|
52
51
|
const DeferLoad = getComponentFromMap('DeferLoad');
|
|
53
|
-
const CaseSummary = getComponentFromMap('CaseSummary');
|
|
54
52
|
|
|
55
53
|
const {
|
|
56
54
|
getPConnect,
|
|
@@ -73,7 +71,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
73
71
|
|
|
74
72
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
75
73
|
const localeCategory = 'CaseView';
|
|
76
|
-
const localeKey =
|
|
74
|
+
const localeKey = thePConn?.getCaseLocaleReference();
|
|
77
75
|
/**
|
|
78
76
|
*
|
|
79
77
|
* @param inName the metadata <em>name</em> that will cause a region to be returned
|
|
@@ -90,12 +88,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
90
88
|
return null;
|
|
91
89
|
}
|
|
92
90
|
|
|
93
|
-
const theSummaryRegion =
|
|
94
|
-
|
|
95
|
-
const data = prepareCaseSummaryData(theSummaryRegion);
|
|
96
|
-
const primarySummaryFields = data.primarySummaryFields;
|
|
97
|
-
const secondarySummaryFields = data.secondarySummaryFields;
|
|
98
|
-
|
|
91
|
+
const theSummaryRegion = getChildRegionByName('summary');
|
|
99
92
|
const theStagesRegion = getChildRegionByName('stages');
|
|
100
93
|
const theTodoRegion = getChildRegionByName('todo');
|
|
101
94
|
const theUtilitiesRegion = getChildRegionByName('utilities');
|
|
@@ -237,7 +230,7 @@ export default function CaseView(props: PropsWithChildren<CaseViewProps>) {
|
|
|
237
230
|
/>
|
|
238
231
|
{getActionButtonsHtml()}
|
|
239
232
|
<Divider />
|
|
240
|
-
|
|
233
|
+
{theSummaryRegion}
|
|
241
234
|
<Divider />
|
|
242
235
|
{vertTabInfo.length > 1 && <VerticalTabs tabconfig={vertTabInfo} />}
|
|
243
236
|
</Card>
|
|
@@ -88,8 +88,7 @@ export default function DataReference(props: PropsWithChildren<DataReferenceProp
|
|
|
88
88
|
let firstChildPConnect;
|
|
89
89
|
|
|
90
90
|
const localizedPlaceholderOption = placeholder => {
|
|
91
|
-
const
|
|
92
|
-
const localizedDefaultPlaceholder = pConn.getLocalizedValue('select_placeholder_default', 'CosmosFields', GENERIC_BUNDLE_KEY);
|
|
91
|
+
const localizedDefaultPlaceholder = pConn.getLocalizedValue('select_placeholder_default', '', 'CosmosFields');
|
|
93
92
|
// If we have a placeholder, push that option in the list of items
|
|
94
93
|
if (placeholder === 'Select...' && localizedDefaultPlaceholder !== 'select_placeholder_default') {
|
|
95
94
|
return localizedDefaultPlaceholder;
|
|
@@ -1212,7 +1212,7 @@ export default function ListView(props: ListViewProps) {
|
|
|
1212
1212
|
</TableBody>
|
|
1213
1213
|
</Table>
|
|
1214
1214
|
{(!arRows || arRows.length === 0) && (
|
|
1215
|
-
<div className='no-records'>{getGenericFieldsLocalizedValue('
|
|
1215
|
+
<div className='no-records'>{getGenericFieldsLocalizedValue('COSMOSFIELDS.lists', 'No records found.')}</div>
|
|
1216
1216
|
)}
|
|
1217
1217
|
</TableContainer>
|
|
1218
1218
|
)}
|
|
@@ -715,7 +715,7 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
715
715
|
</Table>
|
|
716
716
|
{((readOnlyMode && (!rowData || rowData?.length === 0)) || (editableMode && (!referenceList || referenceList?.length === 0))) && (
|
|
717
717
|
<div className='no-records' id='no-records'>
|
|
718
|
-
{getGenericFieldsLocalizedValue('
|
|
718
|
+
{getGenericFieldsLocalizedValue('COSMOSFIELDS.lists', 'No records found.')}
|
|
719
719
|
</div>
|
|
720
720
|
)}
|
|
721
721
|
</TableContainer>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FormControl, FormLabel } from '@mui/material';
|
|
1
2
|
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
2
3
|
|
|
3
4
|
interface SingleReferenceReadOnlyProps extends PConnProps {
|
|
@@ -59,5 +60,12 @@ export default function SingleReferenceReadOnly(props: SingleReferenceReadOnlyPr
|
|
|
59
60
|
{}
|
|
60
61
|
); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
61
62
|
|
|
62
|
-
return
|
|
63
|
+
return (
|
|
64
|
+
<>
|
|
65
|
+
<FormControl variant='standard' sx={{ display: 'flex', flexDirection: 'row' }}>
|
|
66
|
+
<FormLabel sx={{ marginRight: '2rem' }}>{label}</FormLabel>
|
|
67
|
+
{component}
|
|
68
|
+
</FormControl>
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
63
71
|
}
|