@pega/react-sdk-overrides 24.2.10 → 25.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/designSystemExtension/Banner/Banner.tsx +10 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +8 -9
- package/lib/designSystemExtension/Operator/Operator.tsx +21 -19
- package/lib/designSystemExtension/Pulse/Pulse.tsx +1 -1
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
- package/lib/field/AutoComplete/AutoComplete.tsx +1 -1
- package/lib/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/field/CancelAlert/CancelAlert.tsx +7 -10
- package/lib/field/Checkbox/Checkbox.tsx +97 -4
- package/lib/field/Currency/Currency.tsx +10 -7
- package/lib/field/Currency/currency-utils.ts +1 -2
- package/lib/field/Date/Date.tsx +8 -8
- package/lib/field/DateTime/DateTime.tsx +16 -13
- package/lib/field/Decimal/Decimal.tsx +10 -7
- package/lib/field/Dropdown/Dropdown.tsx +30 -25
- package/lib/field/Email/Email.tsx +11 -13
- package/lib/field/Group/Group.tsx +10 -8
- package/lib/field/Integer/Integer.tsx +5 -7
- package/lib/field/Location/Location.css +4 -0
- package/lib/field/Location/Location.tsx +258 -0
- package/lib/field/Location/config-ext.json +8 -0
- package/lib/field/Location/index.tsx +1 -0
- package/lib/field/Multiselect/utils.ts +1 -1
- package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
- package/lib/field/ObjectReference/index.tsx +1 -0
- package/lib/field/ObjectReference/utils.ts +111 -0
- package/lib/field/Percentage/Percentage.tsx +9 -9
- package/lib/field/Phone/Phone.tsx +7 -5
- package/lib/field/RadioButtons/RadioButtons.tsx +47 -5
- package/lib/field/RichText/RichText.css +79 -0
- package/lib/field/RichText/RichText.tsx +3 -1
- package/lib/field/ScalarList/ScalarList.tsx +2 -4
- package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
- package/lib/field/SelectableCard/index.tsx +1 -0
- package/lib/field/SelectableCard/utils.tsx +223 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +160 -28
- package/lib/field/SemanticLink/utils.ts +1 -1
- package/lib/field/TextArea/TextArea.tsx +5 -7
- package/lib/field/TextContent/TextContent.tsx +1 -2
- package/lib/field/TextInput/TextInput.tsx +5 -7
- package/lib/field/Time/Time.tsx +4 -8
- package/lib/field/URL/URL.tsx +5 -7
- package/lib/field/UserReference/UserReference.tsx +3 -6
- package/lib/helpers/attachmentShared.ts +6 -0
- package/lib/helpers/common-utils.ts +24 -2
- package/lib/helpers/data_page.ts +0 -1
- package/lib/helpers/field-group-utils.ts +1 -1
- package/lib/helpers/formatters/Currency.ts +20 -20
- package/lib/helpers/formatters/CurrencyMap.ts +0 -2
- package/lib/helpers/formatters/common.ts +2 -1
- package/lib/helpers/formatters/index.ts +2 -4
- package/lib/helpers/object-utils.ts +10 -0
- package/lib/helpers/simpleTableHelpers.ts +118 -6
- package/lib/helpers/utils.ts +8 -1
- package/lib/helpers/versionHelpers.ts +0 -1
- package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
- package/lib/infra/Assignment/Assignment.tsx +39 -36
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +21 -113
- package/lib/infra/Containers/FlowContainer/helpers.ts +1 -5
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +4 -3
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +7 -6
- package/lib/infra/Containers/SimpleView/helper.ts +1 -1
- package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +4 -5
- package/lib/infra/Containers/container-helpers.ts +52 -0
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +5 -9
- package/lib/infra/DashboardFilter/filterUtils.tsx +3 -6
- package/lib/infra/DeferLoad/DeferLoad.tsx +7 -9
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
- package/lib/infra/MultiStep/MultiStep.css +48 -70
- package/lib/infra/MultiStep/MultiStep.tsx +27 -58
- package/lib/infra/NavBar/NavBar.css +1 -1
- package/lib/infra/NavBar/NavBar.tsx +43 -32
- package/lib/infra/Reference/Reference.tsx +3 -4
- package/lib/infra/Region/Region.tsx +1 -1
- package/lib/infra/RootContainer/RootContainer.tsx +3 -4
- package/lib/infra/Stages/Stages.tsx +3 -4
- package/lib/infra/View/View.tsx +4 -3
- package/lib/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
- package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
- package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
- package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
- package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
- package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
- package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
- package/lib/template/AdvancedSearch/config-ext.json +9 -0
- package/lib/template/AdvancedSearch/index.tsx +1 -0
- package/lib/template/AppShell/AppShell.css +1 -1
- package/lib/template/AppShell/AppShell.tsx +22 -23
- package/lib/template/BannerPage/BannerPage.tsx +2 -2
- package/lib/template/CaseSummary/CaseSummary.tsx +28 -41
- package/lib/template/CaseView/CaseView.tsx +32 -38
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/lib/template/Confirmation/Confirmation.tsx +3 -4
- package/lib/template/DataReference/DataReference.tsx +312 -106
- package/lib/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
- package/lib/template/DataReference/SearchForm.tsx +149 -0
- package/lib/template/DataReference/utils.ts +90 -0
- package/lib/template/DefaultForm/DefaultForm.tsx +3 -3
- package/lib/template/DefaultForm/utils/index.ts +1 -3
- package/lib/template/DefaultPage/DefaultPage.tsx +108 -0
- package/lib/template/DefaultPage/index.tsx +1 -0
- package/lib/template/Details/Details/Details.tsx +11 -11
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
- package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +1 -2
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -5
- package/lib/template/InlineDashboard/InlineDashboard.tsx +14 -16
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
- package/lib/template/ListPage/ListPage.tsx +1 -1
- package/lib/template/ListView/ListView.tsx +285 -204
- package/lib/template/ListView/hooks.ts +1 -5
- package/lib/template/ListView/utils.ts +38 -6
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +5 -5
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
- package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -7
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
- package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -3
- package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +145 -0
- package/lib/template/SelfServiceCaseView/index.tsx +1 -0
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +2 -5
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +99 -84
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +3 -5
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
- package/lib/template/SubTabs/SubTabs.tsx +2 -2
- package/lib/template/SubTabs/tabUtils.ts +118 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +9 -10
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +9 -10
- package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +5 -5
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
- package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
- package/lib/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/template/WssNavBar/WssNavBar.tsx +6 -6
- package/lib/template/utils.tsx +58 -0
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
- package/lib/widget/Attachment/Attachment.css +7 -8
- package/lib/widget/Attachment/Attachment.tsx +304 -231
- package/lib/widget/Attachment/Attachment.types.ts +96 -0
- package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
- package/lib/widget/CaseHistory/CaseHistory.tsx +5 -5
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +30 -23
- package/lib/widget/Followers/Followers.tsx +2 -4
- package/lib/widget/QuickCreate/QuickCreate.tsx +1 -3
- package/lib/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/widget/SummaryItem/SummaryItem.tsx +3 -3
- package/lib/widget/SummaryList/SummaryList.tsx +1 -1
- package/lib/widget/ToDo/ToDo.css +1 -13
- package/lib/widget/ToDo/ToDo.tsx +38 -37
- package/package.json +1 -1
- package/lib/helpers/attachmentHelpers.ts +0 -76
- package/lib/infra/Containers/helpers.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Grid2 from '@mui/material/Grid2';
|
|
2
2
|
import './Banner.css';
|
|
3
3
|
|
|
4
4
|
// AlertBanner is one of the few components that does NOT have getPConnect.
|
|
@@ -37,14 +37,17 @@ export default function Banner(props: BannerProps) {
|
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
|
-
<
|
|
41
|
-
<
|
|
40
|
+
<Grid2 container size={12} className='banner-layout' spacing={1}>
|
|
41
|
+
<Grid2
|
|
42
|
+
size={{ xs: variantMap[variant][0] }}
|
|
43
|
+
style={{ padding: '1rem', backgroundColor: 'var(--app-form-bg-color)', borderRadius: '16px', height: 'fit-content' }}
|
|
44
|
+
>
|
|
42
45
|
{a}
|
|
43
|
-
</
|
|
44
|
-
<
|
|
46
|
+
</Grid2>
|
|
47
|
+
<Grid2 size={{ xs: variantMap[variant][1] }} style={{ padding: '0rem 1rem' }}>
|
|
45
48
|
{b}
|
|
46
|
-
</
|
|
47
|
-
</
|
|
49
|
+
</Grid2>
|
|
50
|
+
</Grid2>
|
|
48
51
|
</div>
|
|
49
52
|
);
|
|
50
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
3
|
-
import
|
|
3
|
+
import Grid2 from '@mui/material/Grid2';
|
|
4
4
|
import TextField from '@mui/material/TextField';
|
|
5
5
|
|
|
6
6
|
import { getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
|
|
@@ -34,7 +34,7 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
34
34
|
|
|
35
35
|
if (field.config.value === null || field.config.value === '') {
|
|
36
36
|
// Special handling for missing value
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
switch (fieldTypeLower) {
|
|
39
39
|
case 'caseoperator':
|
|
40
40
|
return <Operator {...field.config} />;
|
|
@@ -46,9 +46,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
46
46
|
variant='standard'
|
|
47
47
|
value='---'
|
|
48
48
|
label={field.config.label}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
slotProps={{
|
|
50
|
+
input: {
|
|
51
|
+
readOnly: true,
|
|
52
|
+
disableUnderline: true
|
|
53
|
+
}
|
|
52
54
|
}}
|
|
53
55
|
/>
|
|
54
56
|
);
|
|
@@ -65,9 +67,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
65
67
|
variant='standard'
|
|
66
68
|
value={field.config.value}
|
|
67
69
|
label={field.config.label}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
slotProps={{
|
|
71
|
+
input: {
|
|
72
|
+
readOnly: true,
|
|
73
|
+
disableUnderline: true
|
|
74
|
+
}
|
|
71
75
|
}}
|
|
72
76
|
/>
|
|
73
77
|
);
|
|
@@ -82,9 +86,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
82
86
|
variant='standard'
|
|
83
87
|
value={fieldValue}
|
|
84
88
|
label={fieldLabel}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
slotProps={{
|
|
90
|
+
input: {
|
|
91
|
+
readOnly: true,
|
|
92
|
+
disableUnderline: true
|
|
93
|
+
}
|
|
88
94
|
}}
|
|
89
95
|
/>
|
|
90
96
|
);
|
|
@@ -97,9 +103,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
97
103
|
className='psdk-csf-status-style'
|
|
98
104
|
value={field.config.value}
|
|
99
105
|
label={field.config.label}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
106
|
+
slotProps={{
|
|
107
|
+
input: {
|
|
108
|
+
readOnly: true,
|
|
109
|
+
disableUnderline: true
|
|
110
|
+
}
|
|
103
111
|
}}
|
|
104
112
|
/>
|
|
105
113
|
);
|
|
@@ -112,11 +120,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
112
120
|
variant='standard'
|
|
113
121
|
value={field.config.value}
|
|
114
122
|
label={field.config.label}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
123
|
+
slotProps={{
|
|
124
|
+
input: {
|
|
125
|
+
readOnly: true,
|
|
126
|
+
disableUnderline: true,
|
|
127
|
+
inputProps: { style: { cursor: 'pointer' } }
|
|
120
128
|
}
|
|
121
129
|
}}
|
|
122
130
|
/>
|
|
@@ -132,10 +140,12 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
132
140
|
variant='standard'
|
|
133
141
|
value={field.config.value}
|
|
134
142
|
label={field.config.label}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
slotProps={{
|
|
144
|
+
input: {
|
|
145
|
+
readOnly: true,
|
|
146
|
+
disableUnderline: true,
|
|
147
|
+
inputProps: { style: { cursor: 'pointer' } }
|
|
148
|
+
}
|
|
139
149
|
}}
|
|
140
150
|
/>
|
|
141
151
|
</a>
|
|
@@ -156,9 +166,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
156
166
|
format: theFormat
|
|
157
167
|
})}
|
|
158
168
|
label={field.config.label}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
169
|
+
slotProps={{
|
|
170
|
+
input: {
|
|
171
|
+
readOnly: true,
|
|
172
|
+
disableUnderline: true
|
|
173
|
+
}
|
|
162
174
|
}}
|
|
163
175
|
/>
|
|
164
176
|
);
|
|
@@ -171,9 +183,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
171
183
|
variant='standard'
|
|
172
184
|
value={format(field.config.value, field.type, theCurrencyOptions)}
|
|
173
185
|
label={field.config.label}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
186
|
+
slotProps={{
|
|
187
|
+
input: {
|
|
188
|
+
readOnly: true,
|
|
189
|
+
disableUnderline: true
|
|
190
|
+
}
|
|
177
191
|
}}
|
|
178
192
|
/>
|
|
179
193
|
);
|
|
@@ -186,9 +200,11 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
186
200
|
variant='standard'
|
|
187
201
|
value={format(field.config.value, field.type)}
|
|
188
202
|
label={field.config.label}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
203
|
+
slotProps={{
|
|
204
|
+
input: {
|
|
205
|
+
readOnly: true,
|
|
206
|
+
disableUnderline: true
|
|
207
|
+
}
|
|
192
208
|
}}
|
|
193
209
|
/>
|
|
194
210
|
);
|
|
@@ -207,13 +223,13 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
207
223
|
|
|
208
224
|
// Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render
|
|
209
225
|
useEffect(() => {
|
|
210
|
-
const arGridItems = theFieldsToRender
|
|
226
|
+
const arGridItems = theFieldsToRender?.map((field: any) => {
|
|
211
227
|
// display the field when either visibility property doesn't exist or is true(if exists)
|
|
212
228
|
if (field.config.visibility === undefined || field.config.visibility === true) {
|
|
213
229
|
return (
|
|
214
|
-
<
|
|
230
|
+
<Grid2 size={{ xs: 6 }} key={field.config.label}>
|
|
215
231
|
{getFieldValue(field)}
|
|
216
|
-
</
|
|
232
|
+
</Grid2>
|
|
217
233
|
);
|
|
218
234
|
}
|
|
219
235
|
|
|
@@ -247,8 +263,8 @@ export default function CaseSummaryFields(props: CaseSummaryFieldsProps) {
|
|
|
247
263
|
}
|
|
248
264
|
|
|
249
265
|
return (
|
|
250
|
-
<
|
|
266
|
+
<Grid2 container className='psdk-case-summary-fields'>
|
|
251
267
|
{theFieldsAsGridItems}
|
|
252
|
-
</
|
|
268
|
+
</Grid2>
|
|
253
269
|
);
|
|
254
270
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/* eslint-disable react/no-array-index-key */
|
|
2
1
|
import React, { createElement, isValidElement } from 'react';
|
|
3
|
-
import
|
|
2
|
+
import Grid2 from '@mui/material/Grid2';
|
|
4
3
|
import Typography from '@mui/material/Typography';
|
|
5
4
|
import makeStyles from '@mui/styles/makeStyles';
|
|
6
5
|
|
|
@@ -62,11 +61,11 @@ export default function DetailsFields(props: DetailsFieldsProps) {
|
|
|
62
61
|
const dispValue = field.label;
|
|
63
62
|
|
|
64
63
|
return (
|
|
65
|
-
<
|
|
64
|
+
<Grid2 size={{ xs: 6 }} key={keyVal}>
|
|
66
65
|
<Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>
|
|
67
66
|
{dispValue}
|
|
68
67
|
</Typography>
|
|
69
|
-
</
|
|
68
|
+
</Grid2>
|
|
70
69
|
);
|
|
71
70
|
}
|
|
72
71
|
|
|
@@ -74,7 +73,6 @@ export default function DetailsFields(props: DetailsFieldsProps) {
|
|
|
74
73
|
const { type, value } = inField;
|
|
75
74
|
let formattedVal = value;
|
|
76
75
|
|
|
77
|
-
// eslint-disable-next-line sonarjs/no-small-switch
|
|
78
76
|
switch (type) {
|
|
79
77
|
case 'date':
|
|
80
78
|
formattedVal = format(value, type);
|
|
@@ -97,21 +95,21 @@ export default function DetailsFields(props: DetailsFieldsProps) {
|
|
|
97
95
|
const formattedValue = formatItemValue(field);
|
|
98
96
|
|
|
99
97
|
return (
|
|
100
|
-
<
|
|
98
|
+
<Grid2 size={{ xs: 6 }} key={keyVal}>
|
|
101
99
|
<Typography variant='body2' component='span' className={classes.fieldValue}>
|
|
102
100
|
{formattedValue}
|
|
103
101
|
</Typography>
|
|
104
|
-
</
|
|
102
|
+
</Grid2>
|
|
105
103
|
);
|
|
106
104
|
}
|
|
107
105
|
|
|
108
106
|
function getGridItem(field: any, keyVal: string) {
|
|
109
107
|
return (
|
|
110
|
-
<
|
|
108
|
+
<Grid2 size={{ xs: 12 }} key={keyVal}>
|
|
111
109
|
<Typography variant='body2' component='span' className={classes.fieldValue}>
|
|
112
110
|
{field?.value}
|
|
113
111
|
</Typography>
|
|
114
|
-
</
|
|
112
|
+
</Grid2>
|
|
115
113
|
);
|
|
116
114
|
}
|
|
117
115
|
|
|
@@ -122,16 +120,16 @@ export default function DetailsFields(props: DetailsFieldsProps) {
|
|
|
122
120
|
}
|
|
123
121
|
if (isValidElement(field?.value)) {
|
|
124
122
|
return (
|
|
125
|
-
<
|
|
123
|
+
<Grid2 container spacing={1} style={{ padding: '4px 0px' }} key={index}>
|
|
126
124
|
{getGridItem(field, `${index}-item`)}
|
|
127
|
-
</
|
|
125
|
+
</Grid2>
|
|
128
126
|
);
|
|
129
127
|
}
|
|
130
128
|
return (
|
|
131
|
-
<
|
|
129
|
+
<Grid2 container spacing={1} style={{ padding: '4px 0px' }} key={index}>
|
|
132
130
|
{getGridItemLabel(field, `${index}-label`)}
|
|
133
131
|
{getGridItemValue(field, `${index}-value`)}
|
|
134
|
-
</
|
|
132
|
+
</Grid2>
|
|
135
133
|
);
|
|
136
134
|
});
|
|
137
135
|
return gridItems;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren, useState } from 'react';
|
|
2
|
-
import
|
|
1
|
+
import { type PropsWithChildren, useState } from 'react';
|
|
2
|
+
import Grid2 from '@mui/material/Grid2';
|
|
3
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
|
5
5
|
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
@@ -45,9 +45,9 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
|
|
|
45
45
|
const [collapsed, setCollapsed] = useState(false);
|
|
46
46
|
|
|
47
47
|
const descAndChildren = (
|
|
48
|
-
<
|
|
48
|
+
<Grid2 container>
|
|
49
49
|
<div className={classes.fullWidth}>{children}</div>
|
|
50
|
-
</
|
|
50
|
+
</Grid2>
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
const headerClickHandler = () => {
|
|
@@ -55,8 +55,8 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
|
-
<
|
|
59
|
-
<
|
|
58
|
+
<Grid2 container spacing={4} justifyContent='space-between'>
|
|
59
|
+
<Grid2 style={{ width: '100%' }}>
|
|
60
60
|
{name && (
|
|
61
61
|
<div className={classes.fieldMargin}>
|
|
62
62
|
{collapsible ? (
|
|
@@ -70,11 +70,10 @@ export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {
|
|
|
70
70
|
</div>
|
|
71
71
|
)}
|
|
72
72
|
{instructions && instructions !== 'none' && (
|
|
73
|
-
// eslint-disable-next-line react/no-danger
|
|
74
73
|
<div key='instructions' className={classes.instructionText} dangerouslySetInnerHTML={{ __html: instructions }} />
|
|
75
74
|
)}
|
|
76
75
|
{!collapsed && descAndChildren}
|
|
77
|
-
</
|
|
78
|
-
</
|
|
76
|
+
</Grid2>
|
|
77
|
+
</Grid2>
|
|
79
78
|
);
|
|
80
79
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Grid2 from '@mui/material/Grid2';
|
|
2
2
|
import Divider from '@mui/material/Divider';
|
|
3
3
|
import Link from '@mui/material/Link';
|
|
4
4
|
|
|
@@ -20,11 +20,11 @@ export default function FieldGroupList(props: FieldGroupListProps) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
23
|
+
<Grid2 container spacing={4} justifyContent='space-between'>
|
|
24
|
+
<Grid2 style={{ width: '100%' }}>
|
|
25
|
+
<Grid2 container spacing={1}>
|
|
26
26
|
{props.items.map(item => (
|
|
27
|
-
<
|
|
27
|
+
<Grid2 style={{ width: '100%' }}>
|
|
28
28
|
<b>{item.name}</b>
|
|
29
29
|
{props.onDelete && (
|
|
30
30
|
<button
|
|
@@ -44,15 +44,15 @@ export default function FieldGroupList(props: FieldGroupListProps) {
|
|
|
44
44
|
<br />
|
|
45
45
|
{props.onAdd && <Divider />}
|
|
46
46
|
<br />
|
|
47
|
-
</
|
|
47
|
+
</Grid2>
|
|
48
48
|
))}
|
|
49
49
|
{props.onAdd && (
|
|
50
50
|
<Link onClick={props.onAdd} style={{ cursor: 'pointer' }} underline='hover'>
|
|
51
51
|
+Add
|
|
52
52
|
</Link>
|
|
53
53
|
)}
|
|
54
|
-
</
|
|
55
|
-
</
|
|
56
|
-
</
|
|
54
|
+
</Grid2>
|
|
55
|
+
</Grid2>
|
|
56
|
+
</Grid2>
|
|
57
57
|
);
|
|
58
58
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Grid2 from '@mui/material/Grid2';
|
|
2
2
|
import Typography from '@mui/material/Typography';
|
|
3
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
|
|
@@ -51,11 +51,11 @@ export default function FieldValueList(props: FieldValueListProps) {
|
|
|
51
51
|
|
|
52
52
|
function getGridItemLabel() {
|
|
53
53
|
return (
|
|
54
|
-
<
|
|
54
|
+
<Grid2 size={{ xs: variant === 'stacked' ? 12 : 4 }} className={variant === 'stacked' ? classes.noPaddingBottom : ''}>
|
|
55
55
|
<Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>
|
|
56
56
|
{name}
|
|
57
57
|
</Typography>
|
|
58
|
-
</
|
|
58
|
+
</Grid2>
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -63,23 +63,22 @@ export default function FieldValueList(props: FieldValueListProps) {
|
|
|
63
63
|
const formattedValue = formatItemValue(value);
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
|
-
<
|
|
66
|
+
<Grid2 size={{ xs: variant === 'stacked' || !name ? 12 : 8 }} className={variant === 'stacked' ? classes.noPaddingTop : ''}>
|
|
67
67
|
{isHtml ? (
|
|
68
|
-
// eslint-disable-next-line react/no-danger
|
|
69
68
|
<div dangerouslySetInnerHTML={{ __html: formattedValue }} />
|
|
70
69
|
) : (
|
|
71
70
|
<Typography variant={variant === 'stacked' ? 'h6' : 'body2'} component='span' className={classes.fieldValue}>
|
|
72
71
|
{formattedValue}
|
|
73
72
|
</Typography>
|
|
74
73
|
)}
|
|
75
|
-
</
|
|
74
|
+
</Grid2>
|
|
76
75
|
);
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
return (
|
|
80
|
-
<
|
|
81
|
-
{getGridItemLabel()}
|
|
79
|
+
<Grid2 container spacing={4} justifyContent='space-between'>
|
|
80
|
+
{name ? getGridItemLabel() : null}
|
|
82
81
|
{getGridItemValue()}
|
|
83
|
-
</
|
|
82
|
+
</Grid2>
|
|
84
83
|
);
|
|
85
84
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import TextField from '@mui/material/TextField';
|
|
3
3
|
import Popover from '@mui/material/Popover';
|
|
4
|
-
import
|
|
4
|
+
import Grid2 from '@mui/material/Grid2';
|
|
5
5
|
import Typography from '@mui/material/Typography';
|
|
6
6
|
import makeStyles from '@mui/styles/makeStyles';
|
|
7
7
|
|
|
8
8
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
9
|
-
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
9
|
+
import type { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
10
10
|
|
|
11
11
|
// Operator is one of the few components that does NOT have getPConnect.
|
|
12
12
|
// So, no need to extend PConnProps
|
|
@@ -112,7 +112,6 @@ export default function Operator(props: OperatorProps) {
|
|
|
112
112
|
}
|
|
113
113
|
];
|
|
114
114
|
} else {
|
|
115
|
-
// eslint-disable-next-line no-console
|
|
116
115
|
console.log(
|
|
117
116
|
`Operator: PCore.getUserApi().getOperatorDetails(${caseOpId}); returned empty res.data.pyOperatorInfo.pyUserName - adding default`
|
|
118
117
|
);
|
|
@@ -162,25 +161,25 @@ export default function Operator(props: OperatorProps) {
|
|
|
162
161
|
|
|
163
162
|
// There are fields, so build the grid.
|
|
164
163
|
return (
|
|
165
|
-
<
|
|
166
|
-
<
|
|
164
|
+
<Grid2 container className={classes.popover} spacing={1}>
|
|
165
|
+
<Grid2 size={{ xs: 12 }}>
|
|
167
166
|
<Typography variant='h6'>{caseOpName}</Typography>
|
|
168
|
-
</
|
|
167
|
+
</Grid2>
|
|
169
168
|
{popoverFields.map(field => {
|
|
170
169
|
return (
|
|
171
170
|
<React.Fragment key={field.id}>
|
|
172
|
-
<
|
|
173
|
-
<
|
|
171
|
+
<Grid2 container size={{ xs: 12 }} spacing={1}>
|
|
172
|
+
<Grid2 size={{ xs: 6 }}>
|
|
174
173
|
<Typography variant='caption'>{field.name}</Typography>
|
|
175
|
-
</
|
|
176
|
-
<
|
|
174
|
+
</Grid2>
|
|
175
|
+
<Grid2 size={{ xs: 6 }}>
|
|
177
176
|
<Typography variant='subtitle2'>{field.value}</Typography>
|
|
178
|
-
</
|
|
179
|
-
</
|
|
177
|
+
</Grid2>
|
|
178
|
+
</Grid2>
|
|
180
179
|
</React.Fragment>
|
|
181
180
|
);
|
|
182
181
|
})}
|
|
183
|
-
</
|
|
182
|
+
</Grid2>
|
|
184
183
|
);
|
|
185
184
|
}
|
|
186
185
|
|
|
@@ -193,15 +192,16 @@ export default function Operator(props: OperatorProps) {
|
|
|
193
192
|
defaultValue={caseOpName}
|
|
194
193
|
label={caseOpLabel}
|
|
195
194
|
onClick={showOperatorDetails}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
slotProps={{
|
|
196
|
+
input: {
|
|
197
|
+
readOnly: true,
|
|
198
|
+
disableUnderline: true,
|
|
199
|
+
inputProps: { style: { cursor: 'pointer' } }
|
|
200
|
+
}
|
|
200
201
|
}}
|
|
201
202
|
/>
|
|
202
203
|
<br />
|
|
203
204
|
{Utils.generateDateTime(caseTime, 'DateTime-Since')}
|
|
204
|
-
|
|
205
205
|
<Popover
|
|
206
206
|
id={popoverId}
|
|
207
207
|
open={popoverOpen}
|
|
@@ -209,7 +209,9 @@ export default function Operator(props: OperatorProps) {
|
|
|
209
209
|
onClose={handlePopoverClose}
|
|
210
210
|
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
|
211
211
|
transformOrigin={{ vertical: 'top', horizontal: 'center' }}
|
|
212
|
-
|
|
212
|
+
slotProps={{
|
|
213
|
+
paper: { style: { maxWidth: '45ch' } }
|
|
214
|
+
}}
|
|
213
215
|
>
|
|
214
216
|
{getPopoverGrid()}
|
|
215
217
|
</Popover>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { Editor } from '@tinymce/tinymce-react';
|
|
3
|
-
import { FormControl, FormHelperText, InputLabel } from '@mui/material';
|
|
3
|
+
import { FormControl, FormHelperText, InputLabel, useTheme } from '@mui/material';
|
|
4
4
|
import makeStyles from '@mui/styles/makeStyles';
|
|
5
|
-
|
|
6
5
|
import { useAfterInitialEffect, useConsolidatedRef, useUID } from '@pega/react-sdk-components/lib/hooks';
|
|
7
6
|
|
|
8
7
|
const useStyles = makeStyles(theme => ({
|
|
@@ -31,6 +30,7 @@ interface RichTextEditorProps {
|
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorProps, ref) {
|
|
33
|
+
const theme = useTheme();
|
|
34
34
|
const classes = useStyles();
|
|
35
35
|
const uid = useUID();
|
|
36
36
|
const { id = uid, defaultValue, label, labelHidden, info, testId, placeholder, disabled, required, readOnly, error, onBlur, onChange } = props;
|
|
@@ -74,7 +74,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
|
|
|
74
74
|
|
|
75
75
|
if (readOnly) {
|
|
76
76
|
const value = defaultValue || '--';
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
richTextComponent = <div key={id} id={id} className='readonly-richtext-editor' dangerouslySetInnerHTML={{ __html: value }} />;
|
|
79
79
|
} else {
|
|
80
80
|
richTextComponent = (
|
|
@@ -87,6 +87,34 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
|
|
|
87
87
|
initialValue={defaultValue}
|
|
88
88
|
disabled={disabled}
|
|
89
89
|
init={{
|
|
90
|
+
skin: theme.palette.mode === 'dark' ? 'oxide-dark' : 'oxide',
|
|
91
|
+
// ...other TinyMCE config...
|
|
92
|
+
content_style: `
|
|
93
|
+
body {
|
|
94
|
+
font-family: ${theme.typography.fontFamily};
|
|
95
|
+
font-size: ${theme.typography.fontSize}px;
|
|
96
|
+
color: ${theme.palette.text.primary};
|
|
97
|
+
background: ${theme.palette.background.paper};
|
|
98
|
+
}
|
|
99
|
+
a { color: ${theme.palette.primary.main}; }
|
|
100
|
+
h1, h2, h3, h4, h5, h6 { color: ${theme.palette.text.primary}; font-family: ${theme.typography.fontFamily}; }
|
|
101
|
+
blockquote { color: ${theme.palette.text.secondary}; border-left: 4px solid ${theme.palette.primary.light}; padding-left: 8px; }
|
|
102
|
+
ul, ol { color: ${theme.palette.text.primary}; }
|
|
103
|
+
input, textarea, select {
|
|
104
|
+
background: ${theme.palette.background.paper};
|
|
105
|
+
color: ${theme.palette.text.primary};
|
|
106
|
+
border: 1px solid ${theme.palette.divider};
|
|
107
|
+
border-radius: 4px;
|
|
108
|
+
padding: 6px 10px;
|
|
109
|
+
font-size: 1em;
|
|
110
|
+
font-family: inherit;
|
|
111
|
+
}
|
|
112
|
+
.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
|
|
113
|
+
color: ${theme.palette.text.secondary};
|
|
114
|
+
opacity: 0.7;
|
|
115
|
+
}
|
|
116
|
+
/* Add more styles as needed */
|
|
117
|
+
`,
|
|
90
118
|
placeholder,
|
|
91
119
|
menubar: false,
|
|
92
120
|
statusbar: false,
|
|
@@ -95,7 +123,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
|
|
|
95
123
|
autoresize_bottom_margin: 0,
|
|
96
124
|
toolbar: disabled ? false : 'blocks | bold italic strikethrough | bullist numlist outdent indent | link image',
|
|
97
125
|
toolbar_location: 'bottom',
|
|
98
|
-
content_style: 'body { font-family:Helvetica, Arial,sans-serif; font-size:14px }',
|
|
126
|
+
// content_style: 'body { font-family:Helvetica, Arial,sans-serif; font-size:14px }',
|
|
99
127
|
branding: false,
|
|
100
128
|
paste_data_images: true,
|
|
101
129
|
file_picker_types: 'image',
|
|
@@ -1,36 +1,29 @@
|
|
|
1
1
|
.quick-link-ul-list {
|
|
2
2
|
list-style: none;
|
|
3
3
|
padding: 0;
|
|
4
|
-
grid-template-columns: repeat(auto-
|
|
4
|
+
grid-template-columns: repeat(auto-fit, minmax(min(20ch, 100%), 1fr));
|
|
5
5
|
display: grid;
|
|
6
6
|
gap: calc(1rem);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.quick-link-list {
|
|
10
|
-
background-color: #3f51b5;
|
|
11
|
-
color: white;
|
|
12
|
-
border-radius: 8px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
9
|
.quick-link-button {
|
|
16
10
|
text-transform: capitalize !important;
|
|
17
11
|
font-size: 16px !important;
|
|
18
|
-
color:
|
|
19
|
-
|
|
20
|
-
height: 6rem;
|
|
12
|
+
color: var(--app-text-color) !important;
|
|
13
|
+
height: 10rem;
|
|
21
14
|
width: 100%;
|
|
22
|
-
justify-content: start !important;
|
|
23
15
|
}
|
|
24
16
|
|
|
25
17
|
.quick-link-icon {
|
|
26
|
-
width: 1em;
|
|
27
|
-
height: 1em;
|
|
28
18
|
flex-shrink: 0;
|
|
29
|
-
|
|
19
|
+
object-fit: contain;
|
|
20
|
+
width: 3rem;
|
|
21
|
+
height: 3rem;
|
|
30
22
|
}
|
|
31
23
|
|
|
32
24
|
.quick-link-button-span {
|
|
33
25
|
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
34
27
|
align-items: center;
|
|
35
28
|
gap: 0.5rem;
|
|
36
29
|
}
|