@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,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
1
|
+
import { PropsWithChildren, ReactElement, useEffect, useMemo, useState } from 'react';
|
|
3
2
|
|
|
4
|
-
import
|
|
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';
|
|
5
5
|
|
|
6
6
|
// ReferenceProps can't be used until getComponentConfig() is NOT private
|
|
7
7
|
interface DataReferenceProps extends PConnProps {
|
|
8
8
|
// If any, enter additional props that only exist on this component
|
|
9
|
-
children: Array<any>;
|
|
10
9
|
label: string;
|
|
11
10
|
showLabel: any;
|
|
12
11
|
displayMode: string;
|
|
@@ -15,18 +14,13 @@ interface DataReferenceProps extends PConnProps {
|
|
|
15
14
|
selectionMode: string;
|
|
16
15
|
displayAs: string;
|
|
17
16
|
ruleClass: string;
|
|
18
|
-
parameters:
|
|
17
|
+
parameters: string[]; // need to fix
|
|
19
18
|
hideLabel: boolean;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
|
|
23
21
|
const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
declare const PCore: any;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export default function DataReference(props: DataReferenceProps) {
|
|
23
|
+
export default function DataReference(props: PropsWithChildren<DataReferenceProps>) {
|
|
30
24
|
// Get emitted components from map (so we can get any override that may exist)
|
|
31
25
|
const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');
|
|
32
26
|
const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');
|
|
@@ -45,17 +39,17 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
45
39
|
parameters,
|
|
46
40
|
hideLabel
|
|
47
41
|
} = props;
|
|
48
|
-
let childrenToRender = children;
|
|
42
|
+
let childrenToRender = children as ReactElement[];
|
|
49
43
|
const pConn = getPConnect();
|
|
50
44
|
const [dropDownDataSource, setDropDownDataSource] = useState(null);
|
|
51
45
|
const propsToUse: any = { label, showLabel, ...pConn.getInheritedProps() };
|
|
52
46
|
if (propsToUse.showLabel === false) {
|
|
53
47
|
propsToUse.label = '';
|
|
54
48
|
}
|
|
55
|
-
const rawViewMetadata = pConn.getRawMetadata();
|
|
56
|
-
const viewName = rawViewMetadata
|
|
57
|
-
const [firstChildMeta] = rawViewMetadata
|
|
58
|
-
const refList = rawViewMetadata
|
|
49
|
+
const rawViewMetadata: any = pConn.getRawMetadata();
|
|
50
|
+
const viewName = rawViewMetadata.name;
|
|
51
|
+
const [firstChildMeta] = rawViewMetadata.children;
|
|
52
|
+
const refList = rawViewMetadata.config.referenceList;
|
|
59
53
|
const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');
|
|
60
54
|
let propName;
|
|
61
55
|
const isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode);
|
|
@@ -63,32 +57,34 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
63
57
|
|
|
64
58
|
/* Only for dropdown when it has param use data api to get the data back and add it to datasource */
|
|
65
59
|
useEffect(() => {
|
|
66
|
-
if (
|
|
67
|
-
firstChildMeta?.type === "Dropdown" &&
|
|
68
|
-
rawViewMetadata["config"]?.parameters
|
|
69
|
-
) {
|
|
60
|
+
if (firstChildMeta?.type === 'Dropdown' && rawViewMetadata.config?.parameters) {
|
|
70
61
|
const { value, key, text } = firstChildMeta.config.datasource.fields;
|
|
71
|
-
|
|
72
|
-
.getData(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
62
|
+
(
|
|
63
|
+
PCore.getDataApiUtils().getData(
|
|
64
|
+
refList,
|
|
65
|
+
{
|
|
66
|
+
dataViewParameters: parameters
|
|
67
|
+
} as any,
|
|
68
|
+
''
|
|
69
|
+
) as Promise<any>
|
|
70
|
+
)
|
|
71
|
+
.then(res => {
|
|
76
72
|
if (res.data.data !== null) {
|
|
77
73
|
const ddDataSource = res.data.data
|
|
78
|
-
.map(
|
|
79
|
-
key: listItem[key.split(
|
|
80
|
-
text: listItem[text.split(
|
|
81
|
-
value: listItem[value.split(
|
|
74
|
+
.map(listItem => ({
|
|
75
|
+
key: listItem[key.split(' .', 2)[1]],
|
|
76
|
+
text: listItem[text.split(' .', 2)[1]],
|
|
77
|
+
value: listItem[value.split(' .', 2)[1]]
|
|
82
78
|
}))
|
|
83
|
-
.filter(
|
|
79
|
+
.filter(item => item.key);
|
|
84
80
|
// Filtering out undefined entries that will break preview
|
|
85
81
|
setDropDownDataSource(ddDataSource);
|
|
86
82
|
} else {
|
|
87
|
-
const ddDataSource: any = []
|
|
83
|
+
const ddDataSource: any = [];
|
|
88
84
|
setDropDownDataSource(ddDataSource);
|
|
89
85
|
}
|
|
90
86
|
})
|
|
91
|
-
.catch(
|
|
87
|
+
.catch(err => {
|
|
92
88
|
// eslint-disable-next-line no-console
|
|
93
89
|
console.error(err?.stack);
|
|
94
90
|
return Promise.resolve({
|
|
@@ -105,14 +101,14 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
105
101
|
delete firstChildMeta.config.readOnly;
|
|
106
102
|
}
|
|
107
103
|
if (firstChildMeta?.type === 'Dropdown') {
|
|
108
|
-
firstChildMeta.config.datasource.source = rawViewMetadata
|
|
104
|
+
firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters
|
|
109
105
|
? dropDownDataSource
|
|
110
106
|
: '@DATASOURCE '.concat(refList).concat('.pxResults');
|
|
111
107
|
} else if (firstChildMeta?.type === 'AutoComplete') {
|
|
112
108
|
firstChildMeta.config.datasource = refList;
|
|
113
109
|
|
|
114
110
|
/* Insert the parameters to the component only if present */
|
|
115
|
-
if (rawViewMetadata
|
|
111
|
+
if (rawViewMetadata.config?.parameters) {
|
|
116
112
|
firstChildMeta.config.parameters = parameters;
|
|
117
113
|
}
|
|
118
114
|
}
|
|
@@ -130,10 +126,9 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
130
126
|
const handleSelection = event => {
|
|
131
127
|
const caseKey = pConn.getCaseInfo().getKey();
|
|
132
128
|
const refreshOptions = { autoDetectRefresh: true };
|
|
133
|
-
if (canBeChangedInReviewMode && pConn.getValue('__currentPageTabViewName', '')) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
.refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName', ''), null, refreshOptions); // 2nd arg empty string until typedef marked correctly
|
|
129
|
+
if (canBeChangedInReviewMode && pConn.getValue('__currentPageTabViewName', '')) {
|
|
130
|
+
// 2nd arg empty string until typedef marked correctly
|
|
131
|
+
getPConnect().getActionsApi().refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName', ''), null, refreshOptions); // 2nd arg empty string until typedef marked correctly
|
|
137
132
|
PCore.getDeferLoadManager().refreshActiveComponents(pConn.getContextName());
|
|
138
133
|
} else {
|
|
139
134
|
const pgRef = pConn.getPageReference().replace('caseInfo.content', '');
|
|
@@ -143,45 +138,41 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
143
138
|
// AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value
|
|
144
139
|
const propValue = event?.id || event?.target.value;
|
|
145
140
|
if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {
|
|
146
|
-
PCore.getDataApiUtils()
|
|
147
|
-
.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
let curr = {};
|
|
151
|
-
const commitData = curr;
|
|
141
|
+
(PCore.getDataApiUtils().getCaseEditLock(caseKey, '') as Promise<any>).then(caseResponse => {
|
|
142
|
+
const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');
|
|
143
|
+
let curr = {};
|
|
144
|
+
const commitData = curr;
|
|
152
145
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
146
|
+
pageTokens.forEach(el => {
|
|
147
|
+
if (el !== '') {
|
|
148
|
+
curr[el] = {};
|
|
149
|
+
curr = curr[el];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
159
152
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
153
|
+
// expecting format like {Customer: {pyID:"C-100"}}
|
|
154
|
+
const propArr = propName.split('.');
|
|
155
|
+
propArr.forEach((element, idx) => {
|
|
156
|
+
if (idx + 1 === propArr.length) {
|
|
157
|
+
curr[element] = propValue;
|
|
158
|
+
} else {
|
|
159
|
+
curr[element] = {};
|
|
160
|
+
curr = curr[element];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
170
163
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
response.headers.etag
|
|
182
|
-
);
|
|
183
|
-
});
|
|
164
|
+
(
|
|
165
|
+
PCore.getDataApiUtils().updateCaseEditFieldsData(
|
|
166
|
+
caseKey,
|
|
167
|
+
{ [caseKey]: commitData },
|
|
168
|
+
caseResponse.headers.etag,
|
|
169
|
+
pConn.getContextName()
|
|
170
|
+
) as Promise<any>
|
|
171
|
+
).then(response => {
|
|
172
|
+
PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
173
|
+
PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);
|
|
184
174
|
});
|
|
175
|
+
});
|
|
185
176
|
}
|
|
186
177
|
};
|
|
187
178
|
|
|
@@ -191,7 +182,8 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
191
182
|
const recreatedFirstChild = useMemo(() => {
|
|
192
183
|
const { type, config } = firstChildMeta;
|
|
193
184
|
if (firstChildMeta?.type !== 'Region') {
|
|
194
|
-
pConn.clearErrorMessages({
|
|
185
|
+
pConn.clearErrorMessages({
|
|
186
|
+
// Need to add empty string for category and context to match typdef
|
|
195
187
|
property: propName,
|
|
196
188
|
category: '',
|
|
197
189
|
context: ''
|
|
@@ -208,69 +200,51 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
208
200
|
ruleClass={ruleClass}
|
|
209
201
|
referenceType={referenceType}
|
|
210
202
|
hideLabel={hideLabel}
|
|
211
|
-
dataRelationshipContext={
|
|
212
|
-
rawViewMetadata["config"].contextClass && rawViewMetadata["config"].name ? rawViewMetadata["config"].name : null
|
|
213
|
-
}
|
|
203
|
+
dataRelationshipContext={rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null}
|
|
214
204
|
/>
|
|
215
205
|
);
|
|
216
206
|
}
|
|
217
207
|
|
|
218
208
|
if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {
|
|
219
|
-
return
|
|
220
|
-
<MultiReferenceReadonly
|
|
221
|
-
config={config}
|
|
222
|
-
getPConnect={firstChildPConnect}
|
|
223
|
-
label={propsToUse.label}
|
|
224
|
-
hideLabel={hideLabel}
|
|
225
|
-
/>
|
|
226
|
-
);
|
|
209
|
+
return <MultiReferenceReadonly config={config} getPConnect={firstChildPConnect} label={propsToUse.label} hideLabel={hideLabel} />;
|
|
227
210
|
}
|
|
228
211
|
|
|
229
212
|
// In the case of a datasource with parameters you cannot load the dropdown before the parameters
|
|
230
|
-
if (
|
|
231
|
-
type === 'Dropdown' &&
|
|
232
|
-
rawViewMetadata["config"]?.parameters &&
|
|
233
|
-
dropDownDataSource === null
|
|
234
|
-
) {
|
|
213
|
+
if (type === 'Dropdown' && rawViewMetadata.config?.parameters && dropDownDataSource === null) {
|
|
235
214
|
return null;
|
|
236
215
|
}
|
|
237
216
|
|
|
238
|
-
return firstChildPConnect().createComponent(
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
rawViewMetadata
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
onRecordChange: handleSelection
|
|
217
|
+
return firstChildPConnect().createComponent(
|
|
218
|
+
{
|
|
219
|
+
type,
|
|
220
|
+
config: {
|
|
221
|
+
...config,
|
|
222
|
+
required: propsToUse.required,
|
|
223
|
+
visibility: propsToUse.visibility,
|
|
224
|
+
disabled: propsToUse.disabled,
|
|
225
|
+
label: propsToUse.label,
|
|
226
|
+
viewName: getPConnect().getCurrentView(),
|
|
227
|
+
parameters: rawViewMetadata.config.parameters,
|
|
228
|
+
readOnly: false,
|
|
229
|
+
localeReference: rawViewMetadata.config.localeReference,
|
|
230
|
+
...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),
|
|
231
|
+
dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,
|
|
232
|
+
hideLabel,
|
|
233
|
+
onRecordChange: handleSelection
|
|
234
|
+
}
|
|
257
235
|
},
|
|
258
|
-
|
|
259
|
-
|
|
236
|
+
'',
|
|
237
|
+
'',
|
|
238
|
+
{}
|
|
239
|
+
); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
260
240
|
}
|
|
261
|
-
}, [
|
|
262
|
-
firstChildMeta.config?.datasource?.source,
|
|
263
|
-
parameters,
|
|
264
|
-
dropDownDataSource,
|
|
265
|
-
propsToUse.required,
|
|
266
|
-
propsToUse.disabled
|
|
267
|
-
]);
|
|
241
|
+
}, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);
|
|
268
242
|
|
|
269
243
|
// Only include the views region for rendering when it has content
|
|
270
244
|
if (firstChildMeta?.type !== 'Region') {
|
|
271
|
-
const viewsRegion = rawViewMetadata
|
|
245
|
+
const viewsRegion = rawViewMetadata.children[1];
|
|
272
246
|
if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {
|
|
273
|
-
childrenToRender = [recreatedFirstChild, ...children.slice(1)];
|
|
247
|
+
childrenToRender = [recreatedFirstChild, ...(children as ReactElement[]).slice(1)];
|
|
274
248
|
} else {
|
|
275
249
|
childrenToRender = [recreatedFirstChild];
|
|
276
250
|
}
|
|
@@ -281,7 +255,7 @@ export default function DataReference(props: DataReferenceProps) {
|
|
|
281
255
|
) : (
|
|
282
256
|
<div>
|
|
283
257
|
{childrenToRender.map(child => (
|
|
284
|
-
|
|
258
|
+
<>{child}</>
|
|
285
259
|
))}
|
|
286
260
|
</div>
|
|
287
261
|
);
|
|
@@ -16,15 +16,19 @@
|
|
|
16
16
|
gap: calc(1rem);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
.psdk-default-form-three-column .grid-column {
|
|
20
|
+
grid-column: 1 / span 3;
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.psdk-default-form-two-column .grid-column {
|
|
20
24
|
grid-column: 1 / span 2;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
.psdk-default-form-
|
|
24
|
-
grid-column: 1
|
|
27
|
+
.psdk-default-form-one-column .grid-column {
|
|
28
|
+
grid-column: 1;
|
|
25
29
|
}
|
|
26
30
|
|
|
27
|
-
.psdk-default-form-instruction-text{
|
|
31
|
+
.psdk-default-form-instruction-text {
|
|
28
32
|
padding-top: 0.625rem;
|
|
29
33
|
padding-bottom: 0.625rem;
|
|
30
34
|
}
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createElement, PropsWithChildren } from 'react';
|
|
2
|
+
|
|
2
3
|
import { getInstructions } from '@pega/react-sdk-components/lib/components/helpers/template-utils';
|
|
3
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
4
5
|
import connectToState from '@pega/react-sdk-components/lib/components/helpers/state-utils';
|
|
5
|
-
import { getKeyForMappedField, mapStateToProps } from './utils';
|
|
6
|
-
// import type { PConnProps } from '../../../types/PConnProps';
|
|
7
6
|
|
|
7
|
+
import { getKeyForMappedField, mapStateToProps } from './utils';
|
|
8
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
9
|
|
|
9
10
|
import './DefaultForm.css';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// NumCols: string
|
|
17
|
-
|
|
18
|
-
// }
|
|
19
|
-
|
|
12
|
+
interface DefaultFormProps extends PConnProps {
|
|
13
|
+
// If any, enter additional props that only exist on this component
|
|
14
|
+
NumCols: string;
|
|
15
|
+
instructions: string;
|
|
16
|
+
}
|
|
20
17
|
|
|
21
18
|
const Child = connectToState(mapStateToProps)(props => {
|
|
22
19
|
const { key, visibility, ...rest } = props;
|
|
@@ -24,7 +21,7 @@ const Child = connectToState(mapStateToProps)(props => {
|
|
|
24
21
|
return createElement(createPConnectComponent(), { ...rest, key, visibility });
|
|
25
22
|
});
|
|
26
23
|
|
|
27
|
-
export default function DefaultForm(props
|
|
24
|
+
export default function DefaultForm(props: PropsWithChildren<DefaultFormProps>) {
|
|
28
25
|
const { getPConnect, NumCols = '1' } = props;
|
|
29
26
|
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
30
27
|
|
|
@@ -52,15 +49,15 @@ export default function DefaultForm(props /* : DefaultFormProps */) {
|
|
|
52
49
|
// to take the children and create components for them, put in an array and pass as the
|
|
53
50
|
// defaultForm kids
|
|
54
51
|
const arChildren = getPConnect().getChildren()[0].getPConnect().getChildren();
|
|
55
|
-
const dfChildren = arChildren
|
|
52
|
+
const dfChildren = arChildren?.map(kid => <Child key={getKeyForMappedField(kid)} {...kid} />);
|
|
56
53
|
|
|
57
54
|
return (
|
|
58
55
|
<>
|
|
59
56
|
{instructions && (
|
|
60
57
|
<div className='psdk-default-form-instruction-text'>
|
|
61
58
|
{/* server performs sanitization method for instructions html content */}
|
|
62
|
-
{
|
|
63
|
-
<div key=
|
|
59
|
+
{/* eslint-disable react/no-danger */}
|
|
60
|
+
<div key='instructions' id='instruction-text' dangerouslySetInnerHTML={{ __html: instructions }} />
|
|
64
61
|
</div>
|
|
65
62
|
)}
|
|
66
63
|
<div className={divClass}>{dfChildren}</div>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createElement } from 'react';
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
|
+
|
|
3
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
4
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// }
|
|
13
|
-
|
|
8
|
+
interface DetailsProps extends PConnProps {
|
|
9
|
+
// If any, enter additional props that only exist on this component
|
|
10
|
+
label: string;
|
|
11
|
+
showLabel: boolean;
|
|
12
|
+
showHighlightedData: boolean;
|
|
13
|
+
}
|
|
14
14
|
|
|
15
|
-
export default function Details(props
|
|
15
|
+
export default function Details(props: DetailsProps) {
|
|
16
16
|
// Get emitted components from map (so we can get any override that may exist)
|
|
17
17
|
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
18
18
|
|
|
@@ -25,20 +25,18 @@ export default function Details(props /* : DetailsProps */) {
|
|
|
25
25
|
// in a readonly (display) mode instead of a editable
|
|
26
26
|
getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');
|
|
27
27
|
getPConnect().setInheritedProp('readOnly', true);
|
|
28
|
-
const children = getPConnect()
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})
|
|
36
|
-
);
|
|
28
|
+
const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
|
|
29
|
+
createElement(createPConnectComponent(), {
|
|
30
|
+
...configObject,
|
|
31
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
32
|
+
key: index.toString()
|
|
33
|
+
})
|
|
34
|
+
);
|
|
37
35
|
|
|
38
36
|
// Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent
|
|
39
37
|
let highlightedDataArr = [];
|
|
40
38
|
if (showHighlightedData) {
|
|
41
|
-
const { highlightedData = [] } = getPConnect().getRawMetadata().config;
|
|
39
|
+
const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;
|
|
42
40
|
highlightedDataArr = highlightedData.map(field => {
|
|
43
41
|
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
44
42
|
|
|
@@ -48,8 +46,7 @@ export default function Details(props /* : DetailsProps */) {
|
|
|
48
46
|
field.config.displayAsStatus = true;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
return getPConnect().createComponent(field,
|
|
52
|
-
'', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
49
|
+
return getPConnect().createComponent(field, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
53
50
|
});
|
|
54
51
|
}
|
|
55
52
|
|
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/react-sdk-components/lib/components/template/SubTabs/tabUtils';
|
|
3
|
-
import React from 'react';
|
|
1
|
+
import { Children, PropsWithChildren, useEffect, useState } from 'react';
|
|
4
2
|
import { Tab, Tabs, TextField } from '@material-ui/core';
|
|
5
3
|
import { TabContext, TabPanel } from '@material-ui/lab';
|
|
6
|
-
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
4
|
|
|
5
|
+
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/react-sdk-components/lib/components/template/SubTabs/tabUtils';
|
|
6
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
7
|
|
|
9
8
|
interface DetailsSubTabsProps extends PConnProps {
|
|
10
9
|
// If any, enter additional props that only exist on this component
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
label: string
|
|
14
|
-
|
|
10
|
+
showLabel: boolean;
|
|
11
|
+
label: string;
|
|
15
12
|
}
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
export default function DetailsSubTabs(props: DetailsSubTabsProps) {
|
|
14
|
+
export default function DetailsSubTabs(props: PropsWithChildren<DetailsSubTabsProps>) {
|
|
19
15
|
const { children = [], label, showLabel = true, getPConnect } = props;
|
|
20
16
|
// Get the inherited props from the parent to determine label settings
|
|
21
17
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
22
18
|
|
|
23
19
|
const defaultTabIndex = 0;
|
|
24
|
-
const deferLoadedTabs = children[0];
|
|
20
|
+
const deferLoadedTabs = Children.toArray(children)[0];
|
|
25
21
|
let availableTabs = [];
|
|
26
22
|
|
|
27
23
|
useEffect(() => {
|
|
@@ -42,7 +38,7 @@ export default function DetailsSubTabs(props: DetailsSubTabsProps) {
|
|
|
42
38
|
};
|
|
43
39
|
|
|
44
40
|
return (
|
|
45
|
-
|
|
41
|
+
<>
|
|
46
42
|
{propsToUse.showLabel && <TextField>{propsToUse.label}</TextField>}
|
|
47
43
|
<TabContext value={currentTabId.toString()}>
|
|
48
44
|
<Tabs onChange={handleTabClick} value={currentTabId}>
|
|
@@ -57,6 +53,6 @@ export default function DetailsSubTabs(props: DetailsSubTabsProps) {
|
|
|
57
53
|
</TabPanel>
|
|
58
54
|
))}
|
|
59
55
|
</TabContext>
|
|
60
|
-
|
|
56
|
+
</>
|
|
61
57
|
);
|
|
62
58
|
}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createElement } from 'react';
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
|
+
|
|
3
4
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
4
5
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// label: string,
|
|
13
|
-
// showHighlightedData: boolean
|
|
14
|
-
// }
|
|
15
|
-
|
|
8
|
+
interface DetailsThreeColumnProps extends PConnProps {
|
|
9
|
+
// If any, enter additional props that only exist on this component
|
|
10
|
+
showLabel: boolean;
|
|
11
|
+
label: string;
|
|
12
|
+
showHighlightedData: boolean;
|
|
13
|
+
}
|
|
16
14
|
|
|
17
|
-
export default function DetailsThreeColumn(props
|
|
15
|
+
export default function DetailsThreeColumn(props: DetailsThreeColumnProps) {
|
|
18
16
|
// Get emitted components from map (so we can get any override that may exist)
|
|
19
17
|
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
20
18
|
|
|
@@ -27,20 +25,18 @@ export default function DetailsThreeColumn(props /* : DetailsThreeColumnProps */
|
|
|
27
25
|
// in a readonly (display) mode instead of a editable
|
|
28
26
|
getPConnect().setInheritedProp('displayMode', 'LABELS_LEFT');
|
|
29
27
|
getPConnect().setInheritedProp('readOnly', true);
|
|
30
|
-
const children = getPConnect()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
38
|
-
);
|
|
28
|
+
const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>
|
|
29
|
+
createElement(createPConnectComponent(), {
|
|
30
|
+
...configObject,
|
|
31
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
32
|
+
key: index.toString()
|
|
33
|
+
})
|
|
34
|
+
);
|
|
39
35
|
|
|
40
36
|
// Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent
|
|
41
37
|
let highlightedDataArr = [];
|
|
42
38
|
if (showHighlightedData) {
|
|
43
|
-
const { highlightedData = [] } = getPConnect().getRawMetadata().config;
|
|
39
|
+
const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;
|
|
44
40
|
highlightedDataArr = highlightedData.map(field => {
|
|
45
41
|
field.config.displayMode = 'STACKED_LARGE_VAL';
|
|
46
42
|
|
|
@@ -50,8 +46,7 @@ export default function DetailsThreeColumn(props /* : DetailsThreeColumnProps */
|
|
|
50
46
|
field.config.displayAsStatus = true;
|
|
51
47
|
}
|
|
52
48
|
|
|
53
|
-
return getPConnect().createComponent(field,
|
|
54
|
-
'', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
49
|
+
return getPConnect().createComponent(field, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
55
50
|
});
|
|
56
51
|
}
|
|
57
52
|
|