@pega/react-sdk-overrides 0.23.12 → 0.23.13
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 +202 -0
- package/lib/{designSystemExtensions → designSystemExtension}/DetailsFields/DetailsFields.tsx +1 -1
- package/lib/{designSystemExtensions → designSystemExtension}/Operator/Operator.tsx +1 -0
- package/lib/{forms → field}/AutoComplete/AutoComplete.tsx +11 -4
- package/lib/{forms → field}/Checkbox/Checkbox.tsx +11 -1
- package/lib/{forms → field}/Currency/Currency.tsx +1 -1
- package/lib/{forms → field}/Date/Date.tsx +2 -2
- package/lib/{forms → field}/DateTime/DateTime.tsx +2 -2
- package/lib/{forms → field}/Decimal/Decimal.tsx +2 -2
- package/lib/{forms → field}/Dropdown/Dropdown.tsx +10 -1
- package/lib/{forms → field}/Email/Email.tsx +2 -2
- package/lib/{forms → field}/Integer/Integer.tsx +2 -2
- package/lib/{forms → field}/Percentage/Percentage.tsx +2 -2
- package/lib/{forms → field}/Phone/Phone.tsx +1 -1
- package/lib/{forms → field}/RadioButtons/RadioButtons.tsx +16 -6
- package/lib/{forms → field}/TextArea/TextArea.tsx +1 -1
- package/lib/{forms → field}/TextInput/TextInput.tsx +1 -1
- package/lib/{forms → field}/Time/Time.tsx +2 -2
- package/lib/{forms → field}/URL/URL.tsx +2 -2
- package/lib/{forms → field}/UserReference/UserReference.tsx +2 -2
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +1 -1
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +1 -1
- package/lib/infra/View/View.tsx +2 -2
- package/lib/{templates → template}/CaseSummary/CaseSummary.tsx +1 -1
- package/lib/{templates → template}/CaseView/CaseView.tsx +1 -1
- package/lib/{templates → template}/DataReference/DataReference.tsx +2 -2
- package/lib/{templates → template}/Details/Details/Details.tsx +1 -1
- package/lib/{templates → template}/Details/DetailsSubTabs/DetailsSubTabs.tsx +1 -1
- package/lib/{templates → template}/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
- package/lib/{templates → template}/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
- package/lib/{templates → template}/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -2
- package/lib/{templates → template}/InlineDashboardPage/InlineDashboardPage.tsx +1 -1
- package/lib/{templates → template}/ListPage/ListPage.tsx +1 -1
- package/lib/{templates → template}/ListView/ListView.tsx +29 -5
- package/lib/{templates → template}/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
- package/lib/{templates → template}/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +1 -1
- package/lib/{templates → template}/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
- package/lib/{templates → template}/PromotedFilters/PromotedFilters.tsx +5 -4
- package/lib/{templates → template}/SimpleTable/SimpleTable/SimpleTable.tsx +2 -2
- package/lib/{templates → template}/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +1 -1
- package/lib/{templates → template}/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +4 -3
- package/lib/{templates → template}/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
- package/lib/{templates → template}/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +1 -1
- package/lib/{templates → template}/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +1 -1
- package/lib/{templates → template}/utils.ts +1 -1
- package/lib/{widgets → widget}/Attachment/Attachment.tsx +1 -1
- package/lib/{widgets → widget}/FileUtility/FileUtility/FileUtility.tsx +2 -2
- package/lib/{widgets → widget}/SummaryList/SummaryList.tsx +1 -1
- package/package.json +1 -1
- package/lib/designSystemExtensions/CaseSummaryFields/CaseSummaryFields.tsx +0 -156
- /package/lib/{designSystemExtensions → designSystemExtension}/CaseSummaryFields/CaseSummaryFields.css +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/CaseSummaryFields/index.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/DetailsFields/index.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/FieldGroup/FieldGroup.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/FieldGroup/index.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/FieldGroupList/FieldGroupList.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/FieldGroupList/index.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/FieldValueList/FieldValueList.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/FieldValueList/index.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/Operator/index.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/Pulse/Pulse.tsx +0 -0
- /package/lib/{designSystemExtensions → designSystemExtension}/Pulse/index.tsx +0 -0
- /package/lib/{forms → field}/AutoComplete/config-ext.json +0 -0
- /package/lib/{forms → field}/AutoComplete/index.tsx +0 -0
- /package/lib/{forms → field}/CancelAlert/CancelAlert.css +0 -0
- /package/lib/{forms → field}/CancelAlert/CancelAlert.tsx +0 -0
- /package/lib/{forms → field}/CancelAlert/index.tsx +0 -0
- /package/lib/{forms → field}/Checkbox/config-ext.json +0 -0
- /package/lib/{forms → field}/Checkbox/index.tsx +0 -0
- /package/lib/{forms → field}/Currency/config-ext.json +0 -0
- /package/lib/{forms → field}/Currency/index.tsx +0 -0
- /package/lib/{forms → field}/Date/config-ext.json +0 -0
- /package/lib/{forms → field}/Date/index.tsx +0 -0
- /package/lib/{forms → field}/DateTime/config-ext.json +0 -0
- /package/lib/{forms → field}/DateTime/index.tsx +0 -0
- /package/lib/{forms → field}/Decimal/config-ext.json +0 -0
- /package/lib/{forms → field}/Decimal/index.tsx +0 -0
- /package/lib/{forms → field}/Dropdown/config-ext.json +0 -0
- /package/lib/{forms → field}/Dropdown/index.tsx +0 -0
- /package/lib/{forms → field}/Email/config-ext.json +0 -0
- /package/lib/{forms → field}/Email/index.tsx +0 -0
- /package/lib/{forms → field}/Integer/config-ext.json +0 -0
- /package/lib/{forms → field}/Integer/index.tsx +0 -0
- /package/lib/{forms → field}/Percentage/config-ext.json +0 -0
- /package/lib/{forms → field}/Percentage/index.tsx +0 -0
- /package/lib/{forms → field}/Phone/index.tsx +0 -0
- /package/lib/{forms → field}/RadioButtons/config-ext.json +0 -0
- /package/lib/{forms → field}/RadioButtons/index.tsx +0 -0
- /package/lib/{forms → field}/SemanticLink/SemanticLink.tsx +0 -0
- /package/lib/{forms → field}/SemanticLink/config-ext.json +0 -0
- /package/lib/{forms → field}/SemanticLink/index.tsx +0 -0
- /package/lib/{forms → field}/SemanticLink/utils.ts +0 -0
- /package/lib/{forms → field}/TextArea/config-ext.json +0 -0
- /package/lib/{forms → field}/TextArea/index.tsx +0 -0
- /package/lib/{forms → field}/TextContent/TextContent.tsx +0 -0
- /package/lib/{forms → field}/TextContent/config-ext.json +0 -0
- /package/lib/{forms → field}/TextContent/index.tsx +0 -0
- /package/lib/{forms → field}/TextInput/config-ext.json +0 -0
- /package/lib/{forms → field}/TextInput/index.tsx +0 -0
- /package/lib/{forms → field}/Time/config-ext.json +0 -0
- /package/lib/{forms → field}/Time/index.tsx +0 -0
- /package/lib/{forms → field}/URL/config-ext.json +0 -0
- /package/lib/{forms → field}/URL/index.tsx +0 -0
- /package/lib/{forms → field}/UserReference/UserReferenceUtils.ts +0 -0
- /package/lib/{forms → field}/UserReference/config-ext.json +0 -0
- /package/lib/{forms → field}/UserReference/index.tsx +0 -0
- /package/lib/{templates → template}/AppShell/AppShell.css +0 -0
- /package/lib/{templates → template}/AppShell/AppShell.tsx +0 -0
- /package/lib/{templates → template}/AppShell/index.tsx +0 -0
- /package/lib/{templates → template}/CaseSummary/config-ext.json +0 -0
- /package/lib/{templates → template}/CaseSummary/index.tsx +0 -0
- /package/lib/{templates → template}/CaseView/config-ext.json +0 -0
- /package/lib/{templates → template}/CaseView/index.tsx +0 -0
- /package/lib/{templates → template}/CaseViewActionsMenu/CaseViewActionsMenu.tsx +0 -0
- /package/lib/{templates → template}/CaseViewActionsMenu/index.tsx +0 -0
- /package/lib/{templates → template}/DataReference/config-ext.json +0 -0
- /package/lib/{templates → template}/DataReference/index.tsx +0 -0
- /package/lib/{templates → template}/DefaultForm/DefaultForm.css +0 -0
- /package/lib/{templates → template}/DefaultForm/DefaultForm.tsx +0 -0
- /package/lib/{templates → template}/DefaultForm/config-ext.json +0 -0
- /package/lib/{templates → template}/DefaultForm/index.tsx +0 -0
- /package/lib/{templates → template}/Details/Details/index.tsx +0 -0
- /package/lib/{templates → template}/Details/DetailsSubTabs/config-ext.json +0 -0
- /package/lib/{templates → template}/Details/DetailsSubTabs/index.tsx +0 -0
- /package/lib/{templates → template}/Details/DetailsThreeColumn/config-ext.json +0 -0
- /package/lib/{templates → template}/Details/DetailsThreeColumn/index.tsx +0 -0
- /package/lib/{templates → template}/Details/DetailsTwoColumn/config-ext.json +0 -0
- /package/lib/{templates → template}/Details/DetailsTwoColumn/index.tsx +0 -0
- /package/lib/{templates → template}/FieldGroupTemplate/index.tsx +0 -0
- /package/lib/{templates → template}/InlineDashboard/InlineDashboard.tsx +0 -0
- /package/lib/{templates → template}/InlineDashboard/index.tsx +0 -0
- /package/lib/{templates → template}/InlineDashboardPage/index.tsx +0 -0
- /package/lib/{templates → template}/ListPage/config-ext.json +0 -0
- /package/lib/{templates → template}/ListPage/index.tsx +0 -0
- /package/lib/{templates → template}/ListView/ListView.css +0 -0
- /package/lib/{templates → template}/ListView/config-ext.json +0 -0
- /package/lib/{templates → template}/ListView/index.tsx +0 -0
- /package/lib/{templates → template}/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +0 -0
- /package/lib/{templates → template}/MultiReferenceReadOnly/index.tsx +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWide/NarrowWide.css +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWide/NarrowWide.tsx +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWide/index.tsx +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWideDetails/config-ext.json +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWideDetails/index.tsx +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWideForm/config-ext.json +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWideForm/index.tsx +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWidePage/config-ext.json +0 -0
- /package/lib/{templates → template}/NarrowWide/NarrowWidePage/index.tsx +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumn/OneColumn.tsx +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumn/config-ext.json +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumn/index.tsx +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumnPage/config-ext.json +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumnPage/index.tsx +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumnTab/OneColumnTab.tsx +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumnTab/config-ext.json +0 -0
- /package/lib/{templates → template}/OneColumn/OneColumnTab/index.tsx +0 -0
- /package/lib/{templates → template}/PromotedFilters/PromotedFilters.css +0 -0
- /package/lib/{templates → template}/PromotedFilters/index.tsx +0 -0
- /package/lib/{templates → template}/SimpleTable/SimpleTable/config-ext.json +0 -0
- /package/lib/{templates → template}/SimpleTable/SimpleTable/index.tsx +0 -0
- /package/lib/{templates → template}/SimpleTable/SimpleTableManual/index.tsx +0 -0
- /package/lib/{templates → template}/SimpleTable/SimpleTableSelect/index.tsx +0 -0
- /package/lib/{templates → template}/SimpleTable/simpleTableHelpers.ts +0 -0
- /package/lib/{templates → template}/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +0 -0
- /package/lib/{templates → template}/SingleReferenceReadOnly/index.tsx +0 -0
- /package/lib/{templates → template}/SubTabs/SubTabs.tsx +0 -0
- /package/lib/{templates → template}/SubTabs/config-ext.json +0 -0
- /package/lib/{templates → template}/SubTabs/index.tsx +0 -0
- /package/lib/{templates → template}/SubTabs/tabUtils.ts +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumn/TwoColumn.css +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumn/TwoColumn.tsx +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumn/config-ext.json +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumn/index.tsx +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumnPage/config-ext.json +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumnPage/index.tsx +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumnTab/TwoColumnTab.css +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumnTab/config-ext.json +0 -0
- /package/lib/{templates → template}/TwoColumn/TwoColumnTab/index.tsx +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrow/WideNarrow.css +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrow/WideNarrow.tsx +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrow/index.tsx +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowDetails/config-ext.json +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowDetails/index.tsx +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowForm/config-ext.json +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowForm/index.tsx +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowPage/config-ext.json +0 -0
- /package/lib/{templates → template}/WideNarrow/WideNarrowPage/index.tsx +0 -0
- /package/lib/{widgets → widget}/AppAnnouncement/AppAnnouncement.tsx +0 -0
- /package/lib/{widgets → widget}/AppAnnouncement/config-ext.json +0 -0
- /package/lib/{widgets → widget}/AppAnnouncement/index.tsx +0 -0
- /package/lib/{widgets → widget}/Attachment/Attachment.css +0 -0
- /package/lib/{widgets → widget}/Attachment/index.tsx +0 -0
- /package/lib/{widgets → widget}/CaseHistory/CaseHistory.tsx +0 -0
- /package/lib/{widgets → widget}/CaseHistory/config-ext.json +0 -0
- /package/lib/{widgets → widget}/CaseHistory/index.tsx +0 -0
- /package/lib/{widgets → widget}/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -0
- /package/lib/{widgets → widget}/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +0 -0
- /package/lib/{widgets → widget}/FileUtility/ActionButtonsForFileUtil/index.tsx +0 -0
- /package/lib/{widgets → widget}/FileUtility/FileUtility/FileUtility.css +0 -0
- /package/lib/{widgets → widget}/FileUtility/FileUtility/config-ext.json +0 -0
- /package/lib/{widgets → widget}/FileUtility/FileUtility/index.tsx +0 -0
- /package/lib/{widgets → widget}/Followers/Followers.tsx +0 -0
- /package/lib/{widgets → widget}/Followers/config-ext.json +0 -0
- /package/lib/{widgets → widget}/Followers/index.tsx +0 -0
- /package/lib/{widgets → widget}/SummaryItem/SummaryItem.css +0 -0
- /package/lib/{widgets → widget}/SummaryItem/SummaryItem.tsx +0 -0
- /package/lib/{widgets → widget}/SummaryItem/index.tsx +0 -0
- /package/lib/{widgets → widget}/SummaryList/index.tsx +0 -0
- /package/lib/{widgets → widget}/ToDo/ToDo.css +0 -0
- /package/lib/{widgets → widget}/ToDo/ToDo.tsx +0 -0
- /package/lib/{widgets → widget}/ToDo/config-ext.json +0 -0
- /package/lib/{widgets → widget}/ToDo/index.tsx +0 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import isDeepEqual from 'fast-deep-equal/react';
|
|
4
|
+
|
|
5
|
+
import Grid from '@material-ui/core/Grid';
|
|
6
|
+
import TextField from '@material-ui/core/TextField';
|
|
7
|
+
import Operator from '@pega/react-sdk-components/lib/components/designSystemExtension/Operator';
|
|
8
|
+
|
|
9
|
+
import './CaseSummaryFields.css';
|
|
10
|
+
|
|
11
|
+
import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
|
|
12
|
+
|
|
13
|
+
export default function CaseSummaryFields(props) {
|
|
14
|
+
const { status, showStatus, theFields } = props;
|
|
15
|
+
|
|
16
|
+
const [theFieldsToRender, setFieldsToRender] = useState([]);
|
|
17
|
+
const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<Array<any>>([]);
|
|
18
|
+
|
|
19
|
+
function getFieldValue(field: any): any {
|
|
20
|
+
const fieldTypeLower = field.type.toLowerCase();
|
|
21
|
+
|
|
22
|
+
if (field.config.value === null || field.config.value === '') {
|
|
23
|
+
// Special handling for missing value
|
|
24
|
+
// eslint-disable-next-line sonarjs/no-small-switch
|
|
25
|
+
switch (fieldTypeLower) {
|
|
26
|
+
case 'caseoperator':
|
|
27
|
+
return <Operator caseOpConfig={field.config} />;
|
|
28
|
+
break;
|
|
29
|
+
|
|
30
|
+
default:
|
|
31
|
+
return (
|
|
32
|
+
<TextField
|
|
33
|
+
value='---'
|
|
34
|
+
label={field.config.label}
|
|
35
|
+
InputProps={{
|
|
36
|
+
readOnly: true,
|
|
37
|
+
disableUnderline: true
|
|
38
|
+
}}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
switch (fieldTypeLower) {
|
|
45
|
+
case 'textinput':
|
|
46
|
+
case 'decimal':
|
|
47
|
+
case 'integer':
|
|
48
|
+
case 'dropdown':
|
|
49
|
+
return (
|
|
50
|
+
<TextField
|
|
51
|
+
value={field.config.value}
|
|
52
|
+
label={field.config.label}
|
|
53
|
+
InputProps={{
|
|
54
|
+
readOnly: true,
|
|
55
|
+
disableUnderline: true
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
case 'checkbox': {
|
|
61
|
+
const { caption, label, value, trueLabel, falseLabel } = field.config;
|
|
62
|
+
const fieldLabel = label || caption;
|
|
63
|
+
const fieldValue = value ? trueLabel : falseLabel;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<TextField
|
|
67
|
+
value={fieldValue}
|
|
68
|
+
label={fieldLabel}
|
|
69
|
+
InputProps={{
|
|
70
|
+
readOnly: true,
|
|
71
|
+
disableUnderline: true
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
case 'status':
|
|
78
|
+
return (
|
|
79
|
+
<TextField
|
|
80
|
+
className='psdk-csf-status-style'
|
|
81
|
+
value={field.config.value}
|
|
82
|
+
label={field.config.label}
|
|
83
|
+
InputProps={{
|
|
84
|
+
readOnly: true,
|
|
85
|
+
disableUnderline: true
|
|
86
|
+
}}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
case 'phone': {
|
|
91
|
+
const displayPhone = field.config.value !== '' ? field.config.value : '---';
|
|
92
|
+
return (
|
|
93
|
+
<a href={`tel:${displayPhone}`}>
|
|
94
|
+
<TextField
|
|
95
|
+
value={field.config.value}
|
|
96
|
+
label={field.config.label}
|
|
97
|
+
InputProps={{
|
|
98
|
+
readOnly: true,
|
|
99
|
+
inputProps: { style: { cursor: 'pointer' }, disableUnderline: true }
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
102
|
+
</a>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
case 'email': {
|
|
107
|
+
const displayEmail = format(field.config.value, field.type);
|
|
108
|
+
return (
|
|
109
|
+
<a href={`mailto:${displayEmail}`}>
|
|
110
|
+
<TextField
|
|
111
|
+
value={field.config.value}
|
|
112
|
+
label={field.config.label}
|
|
113
|
+
InputProps={{
|
|
114
|
+
readOnly: true,
|
|
115
|
+
disableUnderline: true,
|
|
116
|
+
inputProps: { style: { cursor: 'pointer' } }
|
|
117
|
+
}}
|
|
118
|
+
/>
|
|
119
|
+
</a>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
case 'date':
|
|
124
|
+
case 'datetime':
|
|
125
|
+
case 'currency':
|
|
126
|
+
case 'boolean':
|
|
127
|
+
return (
|
|
128
|
+
<TextField
|
|
129
|
+
value={format(field.config.value, field.type)}
|
|
130
|
+
label={field.config.label}
|
|
131
|
+
InputProps={{
|
|
132
|
+
readOnly: true,
|
|
133
|
+
disableUnderline: true
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
case 'caseoperator':
|
|
139
|
+
return <Operator caseOpConfig={field.config} />;
|
|
140
|
+
break;
|
|
141
|
+
|
|
142
|
+
default:
|
|
143
|
+
return (
|
|
144
|
+
<span>
|
|
145
|
+
{field.type.toLowerCase()} {field.config.value}
|
|
146
|
+
</span>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
const arGridItems = theFieldsToRender.map((field: any) => {
|
|
154
|
+
// display the field when either visibility property doesn't exist or is true(if exists)
|
|
155
|
+
if (field.config.visibility === undefined || field.config.visibility === true) {
|
|
156
|
+
return (
|
|
157
|
+
<Grid item xs={6} key={field.config.label}>
|
|
158
|
+
{getFieldValue(field)}
|
|
159
|
+
</Grid>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return null;
|
|
164
|
+
});
|
|
165
|
+
setFieldsAsGridItems(arGridItems);
|
|
166
|
+
}, [theFieldsToRender]);
|
|
167
|
+
|
|
168
|
+
const theFieldsModifiable = theFields;
|
|
169
|
+
|
|
170
|
+
// Special Case: if showStatus is true, splice the status value to be 2nd in theFields
|
|
171
|
+
// if it's not already there
|
|
172
|
+
if (showStatus && theFields?.[1].type !== 'status') {
|
|
173
|
+
const oStatus = { type: 'status', config: { value: status, label: 'Status' } };
|
|
174
|
+
|
|
175
|
+
const count = theFieldsModifiable.length;
|
|
176
|
+
if (count < 2) {
|
|
177
|
+
theFieldsModifiable.push(oStatus);
|
|
178
|
+
} else {
|
|
179
|
+
theFieldsModifiable.splice(1, 0, oStatus);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// At this point, we know what fields we want to render...
|
|
184
|
+
// So, update our state if it's changed
|
|
185
|
+
if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {
|
|
186
|
+
setFieldsToRender(theFieldsModifiable);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return (
|
|
190
|
+
<React.Fragment>
|
|
191
|
+
<Grid container className='psdk-case-summary-fields'>
|
|
192
|
+
{theFieldsAsGridItems}
|
|
193
|
+
</Grid>
|
|
194
|
+
</React.Fragment>
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
CaseSummaryFields.propTypes = {
|
|
199
|
+
status: PropTypes.string,
|
|
200
|
+
showStatus: PropTypes.bool,
|
|
201
|
+
theFields: PropTypes.arrayOf(PropTypes.object)
|
|
202
|
+
};
|
package/lib/{designSystemExtensions → designSystemExtension}/DetailsFields/DetailsFields.tsx
RENAMED
|
@@ -42,7 +42,7 @@ export default function DetailsFields(props) {
|
|
|
42
42
|
const theCompType = thePConn.getComponentName().toLowerCase();
|
|
43
43
|
const { label } = thePConn.getConfigProps();
|
|
44
44
|
const configObj = thePConn?.getReferencedView();
|
|
45
|
-
configObj.config.readOnly =
|
|
45
|
+
configObj.config.readOnly = true;
|
|
46
46
|
configObj.config.displayMode = 'LABELS_LEFT';
|
|
47
47
|
const propToUse = { ...thePConn.getInheritedProps() };
|
|
48
48
|
configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;
|
|
@@ -2,10 +2,11 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
3
|
import Autocomplete from '@material-ui/lab/Autocomplete';
|
|
4
4
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
5
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
5
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
6
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
7
7
|
import { getDataPage } from '@pega/react-sdk-components/lib/components/helpers/data_page';
|
|
8
8
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
9
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
9
10
|
|
|
10
11
|
interface IOption {
|
|
11
12
|
key: string;
|
|
@@ -64,7 +65,6 @@ export default function AutoComplete(props) {
|
|
|
64
65
|
const actionsApi = thePConn.getActionsApi();
|
|
65
66
|
const propName = thePConn.getStateProps().value;
|
|
66
67
|
|
|
67
|
-
|
|
68
68
|
if (!isDeepEqual(datasource, theDatasource)) {
|
|
69
69
|
// inbound datasource is different, so update theDatasource (to trigger useEffect)
|
|
70
70
|
setDatasource(datasource);
|
|
@@ -72,7 +72,7 @@ export default function AutoComplete(props) {
|
|
|
72
72
|
|
|
73
73
|
const flattenParameters = (params = {}) => {
|
|
74
74
|
const flatParams = {};
|
|
75
|
-
Object.keys(params).forEach(
|
|
75
|
+
Object.keys(params).forEach(key => {
|
|
76
76
|
const { name, value: theVal } = params[key];
|
|
77
77
|
flatParams[name] = theVal;
|
|
78
78
|
});
|
|
@@ -132,6 +132,13 @@ export default function AutoComplete(props) {
|
|
|
132
132
|
}
|
|
133
133
|
}, []);
|
|
134
134
|
|
|
135
|
+
if (displayMode === 'LABELS_LEFT') {
|
|
136
|
+
const field = {
|
|
137
|
+
[label]: value
|
|
138
|
+
};
|
|
139
|
+
return <FieldValueList item={field} />;
|
|
140
|
+
}
|
|
141
|
+
|
|
135
142
|
if (value) {
|
|
136
143
|
const index = options?.findIndex(element => element.key === value);
|
|
137
144
|
if (index > -1) {
|
|
@@ -142,7 +149,7 @@ export default function AutoComplete(props) {
|
|
|
142
149
|
}
|
|
143
150
|
|
|
144
151
|
const handleChange = (event: object, newValue) => {
|
|
145
|
-
const val = newValue ? newValue.key : ''
|
|
152
|
+
const val = newValue ? newValue.key : '';
|
|
146
153
|
handleEvent(actionsApi, 'changeNblur', propName, val);
|
|
147
154
|
};
|
|
148
155
|
|
|
@@ -7,17 +7,20 @@ import {
|
|
|
7
7
|
FormHelperText
|
|
8
8
|
} from '@material-ui/core';
|
|
9
9
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
10
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
10
11
|
|
|
11
12
|
export default function CheckboxComponent(props) {
|
|
12
13
|
const {
|
|
13
14
|
getPConnect,
|
|
15
|
+
label,
|
|
14
16
|
value = false,
|
|
15
17
|
readOnly,
|
|
16
18
|
testId,
|
|
17
19
|
required,
|
|
18
20
|
status,
|
|
19
21
|
helperText,
|
|
20
|
-
validatemessage
|
|
22
|
+
validatemessage,
|
|
23
|
+
displayMode
|
|
21
24
|
} = props;
|
|
22
25
|
const helperTextToDisplay = validatemessage || helperText;
|
|
23
26
|
|
|
@@ -33,6 +36,13 @@ export default function CheckboxComponent(props) {
|
|
|
33
36
|
setChecked(value);
|
|
34
37
|
}, [value]);
|
|
35
38
|
|
|
39
|
+
if (displayMode === 'LABELS_LEFT') {
|
|
40
|
+
const field = {
|
|
41
|
+
[label]: value
|
|
42
|
+
};
|
|
43
|
+
return <FieldValueList item={field} />;
|
|
44
|
+
}
|
|
45
|
+
|
|
36
46
|
const handleChange = event => {
|
|
37
47
|
handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);
|
|
38
48
|
};
|
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
// import { TextField } from "@material-ui/core";
|
|
3
3
|
import CurrencyTextField from '@unicef/material-ui-currency-textfield';
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
5
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
|
|
7
7
|
// Using control from: https://github.com/unicef/material-ui-currency-textfield
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDatePicker } from '@material-ui/pickers';
|
|
3
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
5
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
|
|
7
7
|
export default function Date(props) {
|
|
8
8
|
const {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardDateTimePicker } from '@material-ui/pickers';
|
|
3
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
4
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
5
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
|
|
7
7
|
export default function DateTime(props) {
|
|
8
8
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
4
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
5
|
|
|
6
6
|
export default function Decimal(props) {
|
|
7
7
|
const {
|
|
@@ -3,6 +3,7 @@ import { TextField } from '@material-ui/core';
|
|
|
3
3
|
import MenuItem from '@material-ui/core/MenuItem';
|
|
4
4
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
5
5
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
6
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
7
|
|
|
7
8
|
interface IOption {
|
|
8
9
|
key: string;
|
|
@@ -22,7 +23,8 @@ export default function Dropdown(props) {
|
|
|
22
23
|
status,
|
|
23
24
|
readOnly,
|
|
24
25
|
testId,
|
|
25
|
-
helperText
|
|
26
|
+
helperText,
|
|
27
|
+
displayMode
|
|
26
28
|
} = props;
|
|
27
29
|
const [options, setOptions] = useState<Array<IOption>>([]);
|
|
28
30
|
const helperTextToDisplay = validatemessage || helperText;
|
|
@@ -39,6 +41,13 @@ export default function Dropdown(props) {
|
|
|
39
41
|
|
|
40
42
|
let readOnlyProp = {};
|
|
41
43
|
|
|
44
|
+
if (displayMode === 'LABELS_LEFT') {
|
|
45
|
+
const field = {
|
|
46
|
+
[label]: value
|
|
47
|
+
};
|
|
48
|
+
return <FieldValueList item={field} />;
|
|
49
|
+
}
|
|
50
|
+
|
|
42
51
|
if (readOnly) {
|
|
43
52
|
readOnlyProp = { readOnly: true };
|
|
44
53
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField, InputAdornment } from '@material-ui/core';
|
|
3
3
|
import MailOutlineIcon from '@material-ui/icons/MailOutline';
|
|
4
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
5
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
4
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
5
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
6
6
|
|
|
7
7
|
export default function Email(props) {
|
|
8
8
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
4
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
5
|
|
|
6
6
|
export default function Integer(props) {
|
|
7
7
|
const {
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
4
|
|
|
5
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
5
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
6
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
|
|
8
8
|
// Inspired by https://stackoverflow.com/questions/50823182/material-ui-remove-up-down-arrow-dials-from-textview
|
|
9
9
|
const useStyles = makeStyles((/* theme */) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
|
|
5
5
|
export default function Phone(props) {
|
|
6
6
|
const {
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
12
12
|
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
13
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
13
14
|
|
|
14
15
|
export default function RadioButtons(props) {
|
|
15
16
|
const {
|
|
@@ -21,7 +22,8 @@ export default function RadioButtons(props) {
|
|
|
21
22
|
helperText,
|
|
22
23
|
status,
|
|
23
24
|
required,
|
|
24
|
-
inline
|
|
25
|
+
inline,
|
|
26
|
+
displayMode
|
|
25
27
|
} = props;
|
|
26
28
|
const [theSelectedButton, setSelectedButton] = useState(value);
|
|
27
29
|
|
|
@@ -40,6 +42,13 @@ export default function RadioButtons(props) {
|
|
|
40
42
|
setSelectedButton(value);
|
|
41
43
|
}, [value]);
|
|
42
44
|
|
|
45
|
+
if (displayMode === 'LABELS_LEFT') {
|
|
46
|
+
const field = {
|
|
47
|
+
[label]: value
|
|
48
|
+
};
|
|
49
|
+
return <FieldValueList item={field} />;
|
|
50
|
+
}
|
|
51
|
+
|
|
43
52
|
const handleChange = event => {
|
|
44
53
|
handleEvent(actionsApi, 'changeNblur', propName, event.target.value);
|
|
45
54
|
};
|
|
@@ -51,11 +60,12 @@ export default function RadioButtons(props) {
|
|
|
51
60
|
return (
|
|
52
61
|
<FormControl error={status === 'error'} required={required}>
|
|
53
62
|
<FormLabel component='legend'>{label}</FormLabel>
|
|
54
|
-
<RadioGroup
|
|
55
|
-
value={theSelectedButton}
|
|
56
|
-
onChange={handleChange}
|
|
57
|
-
onBlur={!readOnly ? handleBlur : undefined}
|
|
58
|
-
row={inline}
|
|
63
|
+
<RadioGroup
|
|
64
|
+
value={theSelectedButton}
|
|
65
|
+
onChange={handleChange}
|
|
66
|
+
onBlur={!readOnly ? handleBlur : undefined}
|
|
67
|
+
row={inline}
|
|
68
|
+
>
|
|
59
69
|
{theOptions.map(theOption => {
|
|
60
70
|
return (
|
|
61
71
|
<FormControlLabel
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
|
|
5
5
|
export default function TextArea(props) {
|
|
6
6
|
const {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
4
4
|
|
|
5
5
|
export default function TextInput(props) {
|
|
6
6
|
const {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { KeyboardTimePicker } from '@material-ui/pickers';
|
|
3
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import AccessTimeIcon from '@material-ui/icons/AccessTime';
|
|
6
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
6
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
7
7
|
|
|
8
8
|
export default function Time(props) {
|
|
9
9
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextField } from '@material-ui/core';
|
|
3
|
-
import TextInput from '@pega/react-sdk-components/lib/components/
|
|
4
|
-
import FieldValueList from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import TextInput from '@pega/react-sdk-components/lib/components/field/TextInput';
|
|
4
|
+
import FieldValueList from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldValueList';
|
|
5
5
|
|
|
6
6
|
// NOTE: that we had to change the name from URL to URLComponent
|
|
7
7
|
// Otherwise, we were getting all kinds of weird errors when we
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Fragment, memo, useEffect, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Typography } from '@material-ui/core';
|
|
4
|
-
import AutoComplete from '@pega/react-sdk-components/lib/components/
|
|
5
|
-
import Dropdown from '@pega/react-sdk-components/lib/components/
|
|
4
|
+
import AutoComplete from '@pega/react-sdk-components/lib/components/field/AutoComplete';
|
|
5
|
+
import Dropdown from '@pega/react-sdk-components/lib/components/field/Dropdown';
|
|
6
6
|
import { getUserId, isUserNameAvailable } from './UserReferenceUtils';
|
|
7
7
|
|
|
8
8
|
declare const PCore: any;
|
|
@@ -8,7 +8,7 @@ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
|
8
8
|
import { Alert } from '@material-ui/lab';
|
|
9
9
|
|
|
10
10
|
import Assignment from '@pega/react-sdk-components/lib/components/infra/Assignment';
|
|
11
|
-
import ToDo from "@pega/react-sdk-components/lib/components/
|
|
11
|
+
import ToDo from "@pega/react-sdk-components/lib/components/widget/ToDo";
|
|
12
12
|
|
|
13
13
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
14
14
|
import StoreContext from "@pega/react-sdk-components/lib/bridge/Context/StoreContext";
|
|
@@ -7,7 +7,7 @@ import DialogTitle from '@material-ui/core/DialogTitle';
|
|
|
7
7
|
import { makeStyles } from '@material-ui/core/styles';
|
|
8
8
|
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
9
9
|
import Assignment from '@pega/react-sdk-components/lib/components/infra/Assignment';
|
|
10
|
-
import CancelAlert from '@pega/react-sdk-components/lib/components/
|
|
10
|
+
import CancelAlert from '@pega/react-sdk-components/lib/components/field/CancelAlert';
|
|
11
11
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
12
12
|
|
|
13
13
|
declare const PCore;
|
package/lib/infra/View/View.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { SdkComponentMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
7
7
|
import ErrorBoundary from '@pega/react-sdk-components/lib/components/infra/ErrorBoundary';
|
|
8
8
|
|
|
9
|
-
import { getAllFields } from '@pega/react-sdk-components/lib/components/
|
|
9
|
+
import { getAllFields } from '@pega/react-sdk-components/lib/components/template/utils';
|
|
10
10
|
|
|
11
11
|
// Need to import any templates that we might render
|
|
12
12
|
|
|
@@ -73,7 +73,7 @@ export default function View(props) {
|
|
|
73
73
|
|
|
74
74
|
// eslint-disable-next-line no-console
|
|
75
75
|
console.error(`View: Trying to render an unknown template: ${template}`);
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
// for debugging/investigation
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
import CaseSummaryFields from '@pega/react-sdk-components/lib/components/
|
|
4
|
+
import CaseSummaryFields from '@pega/react-sdk-components/lib/components/designSystemExtension/CaseSummaryFields';
|
|
5
5
|
|
|
6
6
|
export default function CaseSummary(props) {
|
|
7
7
|
const { getPConnect, children } = props;
|
|
@@ -10,7 +10,7 @@ import Button from '@material-ui/core/Button';
|
|
|
10
10
|
import Grid from '@material-ui/core/Grid';
|
|
11
11
|
|
|
12
12
|
import StoreContext from "@pega/react-sdk-components/lib/bridge/Context/StoreContext";
|
|
13
|
-
import CaseViewActionsMenu from "@pega/react-sdk-components/lib/components/
|
|
13
|
+
import CaseViewActionsMenu from "@pega/react-sdk-components/lib/components/template/CaseViewActionsMenu";
|
|
14
14
|
import VerticalTabs from '@pega/react-sdk-components/lib/components/infra/VerticalTabs/VerticalTabs';
|
|
15
15
|
import DeferLoad from '@pega/react-sdk-components/lib/components/infra/DeferLoad';
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useState, useEffect } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import SingleReferenceReadonly from '@pega/react-sdk-components/lib/components/
|
|
4
|
-
import MultiReferenceReadonly from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import SingleReferenceReadonly from '@pega/react-sdk-components/lib/components/template/SingleReferenceReadOnly';
|
|
4
|
+
import MultiReferenceReadonly from '@pega/react-sdk-components/lib/components/template/MultiReferenceReadOnly';
|
|
5
5
|
|
|
6
6
|
const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
// import PropTypes from "prop-types";
|
|
3
3
|
import Grid from '@material-ui/core/Grid';
|
|
4
|
-
import DetailsFields from '@pega/react-sdk-components/lib/components/
|
|
4
|
+
import DetailsFields from '@pega/react-sdk-components/lib/components/designSystemExtension/DetailsFields';
|
|
5
5
|
|
|
6
6
|
export default function Details(props) {
|
|
7
7
|
const { children } = props;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, Fragment } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/react-sdk-components/lib/components/
|
|
3
|
+
import { getTransientTabs, getVisibleTabs, tabClick } from '@pega/react-sdk-components/lib/components/template/SubTabs/tabUtils';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Tab, Tabs, TextField } from '@material-ui/core';
|
|
6
6
|
import { TabContext, TabPanel } from '@material-ui/lab';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// import PropTypes from "prop-types";
|
|
3
3
|
import Grid from '@material-ui/core/Grid';
|
|
4
|
-
import DetailsFields from '@pega/react-sdk-components/lib/components/
|
|
4
|
+
import DetailsFields from '@pega/react-sdk-components/lib/components/designSystemExtension/DetailsFields';
|
|
5
5
|
|
|
6
6
|
export default function DetailsThreeColumn(props) {
|
|
7
7
|
const { children } = props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
// import PropTypes from "prop-types";
|
|
3
3
|
import Grid from '@material-ui/core/Grid';
|
|
4
|
-
import DetailsFields from '@pega/react-sdk-components/lib/components/
|
|
4
|
+
import DetailsFields from '@pega/react-sdk-components/lib/components/designSystemExtension/DetailsFields';
|
|
5
5
|
|
|
6
6
|
export default function DetailsTwoColumn(props) {
|
|
7
7
|
const { children } = props;
|