@pega/react-sdk-overrides 23.1.10 → 23.1.11
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 +12 -29
- 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 +23 -44
- 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 +23 -43
- 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/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 +7 -6
- 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/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 +18 -30
- package/lib/infra/Reference/Reference.tsx +15 -17
- 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 +179 -169
- 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 +184 -118
- 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,5 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import Grid from '@material-ui/core/Grid';
|
|
4
2
|
import Divider from '@material-ui/core/Divider';
|
|
5
3
|
import Link from '@material-ui/core/Link';
|
|
@@ -10,19 +8,15 @@ import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
|
10
8
|
// So, no need to extend PConnProps
|
|
11
9
|
interface FieldGroupListProps {
|
|
12
10
|
// If any, enter additional props that only exist on this component
|
|
13
|
-
items:
|
|
14
|
-
onDelete: any
|
|
15
|
-
onAdd: any
|
|
11
|
+
items: any[] | any;
|
|
12
|
+
onDelete: any;
|
|
13
|
+
onAdd: any;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
|
|
19
16
|
export default function FieldGroupList(props: FieldGroupListProps) {
|
|
20
17
|
let menuIconOverride$ = 'trash';
|
|
21
18
|
if (menuIconOverride$) {
|
|
22
|
-
menuIconOverride$ = Utils.getImageSrc(
|
|
23
|
-
menuIconOverride$,
|
|
24
|
-
Utils.getSDKStaticConentUrl()
|
|
25
|
-
);
|
|
19
|
+
menuIconOverride$ = Utils.getImageSrc(menuIconOverride$, Utils.getSDKStaticConentUrl());
|
|
26
20
|
}
|
|
27
21
|
|
|
28
22
|
return (
|
|
@@ -38,11 +32,12 @@ export default function FieldGroupList(props: FieldGroupListProps) {
|
|
|
38
32
|
style={{ float: 'right' }}
|
|
39
33
|
className='psdk-utility-button'
|
|
40
34
|
id={`delete-row-${item.id}`}
|
|
35
|
+
aria-label='Delete Row'
|
|
41
36
|
onClick={() => {
|
|
42
37
|
props.onDelete(item.id);
|
|
43
38
|
}}
|
|
44
39
|
>
|
|
45
|
-
<img className='psdk-utility-card-action-svg-icon' src={menuIconOverride$}
|
|
40
|
+
<img className='psdk-utility-card-action-svg-icon' src={menuIconOverride$} />
|
|
46
41
|
</button>
|
|
47
42
|
)}
|
|
48
43
|
{item.children}
|
|
@@ -60,4 +55,4 @@ export default function FieldGroupList(props: FieldGroupListProps) {
|
|
|
60
55
|
</Grid>
|
|
61
56
|
</Grid>
|
|
62
57
|
);
|
|
63
|
-
}
|
|
58
|
+
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import Grid from '@material-ui/core/Grid';
|
|
4
2
|
import Typography from '@material-ui/core/Typography';
|
|
5
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
6
4
|
|
|
7
5
|
// FieldValueList is one of the few components that does NOT have getPConnect.
|
|
8
6
|
// So, no need to extend PConnProps
|
|
9
|
-
interface FieldValueListProps{
|
|
7
|
+
interface FieldValueListProps {
|
|
10
8
|
// If any, enter additional props that only exist on this component
|
|
11
|
-
name?: string
|
|
12
|
-
value: any
|
|
13
|
-
variant?: string
|
|
9
|
+
name?: string;
|
|
10
|
+
value: any;
|
|
11
|
+
variant?: string;
|
|
14
12
|
}
|
|
15
13
|
|
|
16
|
-
|
|
17
14
|
const useStyles = makeStyles(theme => ({
|
|
18
15
|
root: {
|
|
19
16
|
marginRight: theme.spacing(1),
|
|
@@ -53,11 +50,7 @@ export default function FieldValueList(props: FieldValueListProps) {
|
|
|
53
50
|
|
|
54
51
|
function getGridItemLabel() {
|
|
55
52
|
return (
|
|
56
|
-
<Grid
|
|
57
|
-
item
|
|
58
|
-
xs={variant === 'stacked' ? 12 : 6}
|
|
59
|
-
className={variant === 'stacked' ? classes.noPaddingBottom : ''}
|
|
60
|
-
>
|
|
53
|
+
<Grid item xs={variant === 'stacked' ? 12 : 6} className={variant === 'stacked' ? classes.noPaddingBottom : ''}>
|
|
61
54
|
<Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>
|
|
62
55
|
{name}
|
|
63
56
|
</Typography>
|
|
@@ -69,16 +62,8 @@ export default function FieldValueList(props: FieldValueListProps) {
|
|
|
69
62
|
const formattedValue = formatItemValue(value);
|
|
70
63
|
|
|
71
64
|
return (
|
|
72
|
-
<Grid
|
|
73
|
-
|
|
74
|
-
xs={variant === 'stacked' ? 12 : 6}
|
|
75
|
-
className={variant === 'stacked' ? classes.noPaddingTop : ''}
|
|
76
|
-
>
|
|
77
|
-
<Typography
|
|
78
|
-
variant={variant === 'stacked' ? 'h6' : 'body2'}
|
|
79
|
-
component='span'
|
|
80
|
-
className={classes.fieldValue}
|
|
81
|
-
>
|
|
65
|
+
<Grid item xs={variant === 'stacked' ? 12 : 6} className={variant === 'stacked' ? classes.noPaddingTop : ''}>
|
|
66
|
+
<Typography variant={variant === 'stacked' ? 'h6' : 'body2'} component='span' className={classes.fieldValue}>
|
|
82
67
|
{formattedValue}
|
|
83
68
|
</Typography>
|
|
84
69
|
</Grid>
|
|
@@ -86,11 +71,9 @@ export default function FieldValueList(props: FieldValueListProps) {
|
|
|
86
71
|
}
|
|
87
72
|
|
|
88
73
|
return (
|
|
89
|
-
<
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</Grid>
|
|
94
|
-
</React.Fragment>
|
|
74
|
+
<Grid container spacing={4} justifyContent='space-between'>
|
|
75
|
+
{getGridItemLabel()}
|
|
76
|
+
{getGridItemValue()}
|
|
77
|
+
</Grid>
|
|
95
78
|
);
|
|
96
|
-
}
|
|
79
|
+
}
|
|
@@ -1,142 +1,144 @@
|
|
|
1
|
-
import React, {useState} from
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import TextField from '@material-ui/core/TextField';
|
|
3
3
|
import Popover from '@material-ui/core/Popover';
|
|
4
4
|
import Grid from '@material-ui/core/Grid';
|
|
5
5
|
import Typography from '@material-ui/core/Typography';
|
|
6
|
-
|
|
7
6
|
import { makeStyles } from '@material-ui/core/styles';
|
|
8
7
|
|
|
9
8
|
import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
9
|
+
import { 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
|
|
13
|
-
interface OperatorProps{
|
|
13
|
+
interface OperatorProps extends PConnProps {
|
|
14
14
|
// If any, enter additional props that only exist on this component
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
15
|
+
label: string;
|
|
16
|
+
createDateTime: string;
|
|
17
|
+
createLabel: string;
|
|
18
|
+
createOperator: { userName: string; userId: string };
|
|
19
|
+
updateDateTime: string;
|
|
20
|
+
updateLabel: string;
|
|
21
|
+
updateOperator: { userName: string; userId: string };
|
|
22
|
+
displayLabel?: any;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const useStyles = makeStyles((theme) => ({
|
|
25
|
+
const useStyles = makeStyles(theme => ({
|
|
29
26
|
root: {
|
|
30
27
|
padding: theme.spacing(1),
|
|
31
|
-
margin: theme.spacing(1)
|
|
28
|
+
margin: theme.spacing(1)
|
|
32
29
|
},
|
|
33
30
|
popover: {
|
|
34
31
|
padding: theme.spacing(1),
|
|
35
|
-
margin: theme.spacing(1)
|
|
32
|
+
margin: theme.spacing(1)
|
|
36
33
|
}
|
|
37
34
|
}));
|
|
38
35
|
|
|
39
36
|
export default function Operator(props: OperatorProps) {
|
|
40
37
|
// const componentName = "Operator";
|
|
41
|
-
const { caseOpConfig } = props;
|
|
42
38
|
const classes = useStyles();
|
|
43
39
|
|
|
44
|
-
const fieldLabel =
|
|
45
|
-
|
|
46
|
-
let
|
|
47
|
-
let
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
40
|
+
const fieldLabel = props?.label?.toLowerCase();
|
|
41
|
+
const displayLabel = props?.displayLabel?.toLowerCase();
|
|
42
|
+
let caseOpLabel = '---';
|
|
43
|
+
let caseOpName = '---';
|
|
44
|
+
let caseOpId = '';
|
|
45
|
+
let caseTime = '';
|
|
46
|
+
|
|
47
|
+
if (fieldLabel === 'create operator' || displayLabel === 'create operator') {
|
|
48
|
+
caseOpLabel = props.createLabel;
|
|
49
|
+
caseOpName = props.createOperator.userName;
|
|
50
|
+
caseTime = props.createDateTime;
|
|
51
|
+
caseOpId = props.createOperator.userId;
|
|
52
|
+
} else if (fieldLabel === 'update operator' || displayLabel === 'update operator') {
|
|
53
|
+
caseOpLabel = props.updateLabel;
|
|
54
|
+
caseOpName = props.updateOperator.userName;
|
|
55
|
+
caseTime = props.updateDateTime;
|
|
56
|
+
caseOpId = props.updateOperator.userId;
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
// Popover-related
|
|
63
60
|
const [popoverAnchorEl, setPopoverAnchorEl] = useState(null);
|
|
64
|
-
const [popoverFields, setPopoverFields] = useState<
|
|
61
|
+
const [popoverFields, setPopoverFields] = useState<any[]>([]);
|
|
65
62
|
|
|
66
63
|
const popoverOpen = Boolean(popoverAnchorEl);
|
|
67
64
|
const popoverId = popoverOpen ? 'operator-details-popover' : undefined;
|
|
68
65
|
|
|
69
|
-
const handlePopoverClose = (
|
|
66
|
+
const handlePopoverClose = () => {
|
|
70
67
|
setPopoverAnchorEl(null);
|
|
71
|
-
}
|
|
68
|
+
};
|
|
72
69
|
|
|
73
70
|
function showOperatorDetails(event) {
|
|
74
|
-
|
|
75
71
|
const operatorPreviewPromise = PCore.getUserApi().getOperatorDetails(caseOpId);
|
|
76
72
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
77
73
|
const localeCategory = 'Operator';
|
|
78
74
|
|
|
79
|
-
operatorPreviewPromise.then((res) => {
|
|
80
|
-
const fillerString =
|
|
75
|
+
operatorPreviewPromise.then((res: any) => {
|
|
76
|
+
const fillerString = '---';
|
|
81
77
|
let fields: any = [];
|
|
82
|
-
if (
|
|
83
|
-
res.data &&
|
|
84
|
-
res.data.pyOperatorInfo &&
|
|
85
|
-
res.data.pyOperatorInfo.pyUserName
|
|
86
|
-
) {
|
|
78
|
+
if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {
|
|
87
79
|
fields = [
|
|
88
80
|
{
|
|
89
|
-
id:
|
|
90
|
-
name: localizedVal(
|
|
81
|
+
id: 'pyPosition',
|
|
82
|
+
name: localizedVal('Position', localeCategory),
|
|
91
83
|
value: res.data.pyOperatorInfo.pyPosition ? res.data.pyOperatorInfo.pyPosition : fillerString
|
|
92
84
|
},
|
|
93
85
|
{
|
|
94
|
-
id:
|
|
95
|
-
name: localizedVal(
|
|
86
|
+
id: 'pyOrganization',
|
|
87
|
+
name: localizedVal('Organization', localeCategory),
|
|
96
88
|
value: res.data.pyOperatorInfo.pyOrganization ? res.data.pyOperatorInfo.pyOrganization : fillerString
|
|
97
89
|
},
|
|
98
90
|
{
|
|
99
|
-
id:
|
|
91
|
+
id: 'ReportToUserName',
|
|
100
92
|
name: localizedVal('Reports to', localeCategory),
|
|
101
93
|
value: res.data.pyOperatorInfo.pyReportToUserName ? res.data.pyOperatorInfo.pyReportToUserName : fillerString
|
|
102
94
|
},
|
|
103
95
|
{
|
|
104
|
-
id:
|
|
96
|
+
id: 'pyTelephone',
|
|
105
97
|
name: localizedVal('Telephone', localeCategory),
|
|
106
|
-
value: res.data.pyOperatorInfo.pyTelephone ?
|
|
98
|
+
value: res.data.pyOperatorInfo.pyTelephone ? (
|
|
99
|
+
<a href={`tel:${res.data.pyOperatorInfo.pyTelephone}`}>{res.data.pyOperatorInfo.pyTelephone}</a>
|
|
100
|
+
) : (
|
|
101
|
+
fillerString
|
|
102
|
+
)
|
|
107
103
|
},
|
|
108
104
|
{
|
|
109
|
-
id:
|
|
105
|
+
id: 'pyEmailAddress',
|
|
110
106
|
name: localizedVal('Email address', localeCategory),
|
|
111
|
-
value: res.data.pyOperatorInfo.pyEmailAddress ?
|
|
107
|
+
value: res.data.pyOperatorInfo.pyEmailAddress ? (
|
|
108
|
+
<a href={`mailto:${res.data.pyOperatorInfo.pyEmailAddress}`}>{res.data.pyOperatorInfo.pyEmailAddress}</a>
|
|
109
|
+
) : (
|
|
110
|
+
fillerString
|
|
111
|
+
)
|
|
112
112
|
}
|
|
113
113
|
];
|
|
114
114
|
} else {
|
|
115
115
|
// eslint-disable-next-line no-console
|
|
116
|
-
console.log(
|
|
116
|
+
console.log(
|
|
117
|
+
`Operator: PCore.getUserApi().getOperatorDetails(${caseOpId}); returned empty res.data.pyOperatorInfo.pyUserName - adding default`
|
|
118
|
+
);
|
|
117
119
|
fields = [
|
|
118
120
|
{
|
|
119
|
-
id:
|
|
120
|
-
name: localizedVal(
|
|
121
|
+
id: 'pyPosition',
|
|
122
|
+
name: localizedVal('Position', localeCategory),
|
|
121
123
|
value: fillerString
|
|
122
124
|
},
|
|
123
125
|
{
|
|
124
|
-
id:
|
|
125
|
-
name: localizedVal(
|
|
126
|
+
id: 'pyOrganization',
|
|
127
|
+
name: localizedVal('Organization', localeCategory),
|
|
126
128
|
value: fillerString
|
|
127
129
|
},
|
|
128
130
|
{
|
|
129
|
-
id:
|
|
131
|
+
id: 'ReportToUserName',
|
|
130
132
|
name: localizedVal('Reports to', localeCategory),
|
|
131
133
|
value: fillerString
|
|
132
134
|
},
|
|
133
135
|
{
|
|
134
|
-
id:
|
|
136
|
+
id: 'pyTelephone',
|
|
135
137
|
name: localizedVal('Telephone', localeCategory),
|
|
136
138
|
value: fillerString
|
|
137
139
|
},
|
|
138
140
|
{
|
|
139
|
-
id:
|
|
141
|
+
id: 'pyEmailAddress',
|
|
140
142
|
name: localizedVal('Email address', localeCategory),
|
|
141
143
|
value: fillerString
|
|
142
144
|
}
|
|
@@ -159,23 +161,33 @@ export default function Operator(props: OperatorProps) {
|
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
// There are fields, so build the grid.
|
|
162
|
-
return
|
|
163
|
-
<Grid
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
164
|
+
return (
|
|
165
|
+
<Grid container className={classes.popover} spacing={1}>
|
|
166
|
+
<Grid item xs={12}>
|
|
167
|
+
<Typography variant='h6'>{caseOpName}</Typography>
|
|
168
|
+
</Grid>
|
|
169
|
+
{popoverFields.map(field => {
|
|
170
|
+
return (
|
|
171
|
+
<React.Fragment key={field.id}>
|
|
172
|
+
<Grid container item xs={12} spacing={1}>
|
|
173
|
+
<Grid item xs={6}>
|
|
174
|
+
<Typography variant='caption'>{field.name}</Typography>
|
|
175
|
+
</Grid>
|
|
176
|
+
<Grid item xs={6}>
|
|
177
|
+
<Typography variant='subtitle2'>{field.value}</Typography>
|
|
178
|
+
</Grid>
|
|
179
|
+
</Grid>
|
|
180
|
+
</React.Fragment>
|
|
181
|
+
);
|
|
182
|
+
})}
|
|
183
|
+
</Grid>
|
|
184
|
+
);
|
|
174
185
|
}
|
|
175
186
|
|
|
176
187
|
// End of popover-related
|
|
177
188
|
|
|
178
|
-
return
|
|
189
|
+
return (
|
|
190
|
+
<>
|
|
179
191
|
<TextField
|
|
180
192
|
defaultValue={caseOpName}
|
|
181
193
|
label={caseOpLabel}
|
|
@@ -183,23 +195,23 @@ export default function Operator(props: OperatorProps) {
|
|
|
183
195
|
InputProps={{
|
|
184
196
|
readOnly: true,
|
|
185
197
|
disableUnderline: true,
|
|
186
|
-
inputProps: {style: {cursor: 'pointer'}}
|
|
198
|
+
inputProps: { style: { cursor: 'pointer' } }
|
|
187
199
|
}}
|
|
188
200
|
/>
|
|
189
201
|
<br />
|
|
190
|
-
{Utils.generateDateTime(caseTime,
|
|
202
|
+
{Utils.generateDateTime(caseTime, 'DateTime-Since')}
|
|
191
203
|
|
|
192
204
|
<Popover
|
|
193
205
|
id={popoverId}
|
|
194
206
|
open={popoverOpen}
|
|
195
207
|
anchorEl={popoverAnchorEl}
|
|
196
208
|
onClose={handlePopoverClose}
|
|
197
|
-
anchorOrigin={{ vertical: 'bottom', horizontal: 'center'}}
|
|
198
|
-
transformOrigin={{ vertical: 'top', horizontal: 'center'}}
|
|
199
|
-
PaperProps={{ style: {maxWidth: '45ch'}}}
|
|
209
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
|
210
|
+
transformOrigin={{ vertical: 'top', horizontal: 'center' }}
|
|
211
|
+
PaperProps={{ style: { maxWidth: '45ch' } }}
|
|
200
212
|
>
|
|
201
213
|
{getPopoverGrid()}
|
|
202
214
|
</Popover>
|
|
203
|
-
|
|
204
|
-
|
|
215
|
+
</>
|
|
216
|
+
);
|
|
205
217
|
}
|
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Card, CardContent, CardHeader, Typography } from
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Card, CardContent, CardHeader, Typography } from '@material-ui/core';
|
|
3
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
4
4
|
|
|
5
5
|
// Pulse is one of the few components that does NOT have getPConnect.
|
|
6
6
|
// So, no need to extend PConnProps
|
|
7
7
|
interface PulseProps {
|
|
8
8
|
// If any, enter additional props that only exist on this component
|
|
9
|
-
children?: Array<any>
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
const useStyles = makeStyles((theme) => ({
|
|
11
|
+
const useStyles = makeStyles(theme => ({
|
|
14
12
|
root: {
|
|
15
13
|
marginTop: theme.spacing(1),
|
|
16
14
|
marginBottom: theme.spacing(1),
|
|
17
|
-
borderLeft:
|
|
15
|
+
borderLeft: '6px solid',
|
|
18
16
|
borderLeftColor: theme.palette.primary.light
|
|
19
|
-
}
|
|
17
|
+
}
|
|
20
18
|
}));
|
|
21
19
|
|
|
22
|
-
export default function Pulse(props: PulseProps) {
|
|
23
|
-
// eslint-disable-next-line
|
|
20
|
+
export default function Pulse(props: PropsWithChildren<PulseProps>) {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24
22
|
const { children } = props;
|
|
25
23
|
const classes = useStyles();
|
|
26
24
|
|
|
27
25
|
return (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
<Card className={classes.root}>
|
|
27
|
+
<CardHeader title={<Typography variant='h6'>Pulse</Typography>} />
|
|
28
|
+
<CardContent>
|
|
29
|
+
<Typography>Pulse</Typography>
|
|
30
|
+
</CardContent>
|
|
31
|
+
</Card>
|
|
32
|
+
);
|
|
35
33
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { Editor } from '@tinymce/tinymce-react';
|
|
3
3
|
import { FormControl, FormHelperText, InputLabel, makeStyles } from '@material-ui/core';
|
|
4
|
+
|
|
4
5
|
import { useAfterInitialEffect, useConsolidatedRef, useUID } from '@pega/react-sdk-components/lib/hooks';
|
|
5
6
|
|
|
6
|
-
const useStyles = makeStyles(
|
|
7
|
+
const useStyles = makeStyles(theme => ({
|
|
7
8
|
fieldLabel: {
|
|
8
9
|
position: 'relative',
|
|
9
10
|
transform: 'translate(0, 0px) scale(1)',
|
|
@@ -40,7 +41,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
|
|
|
40
41
|
editorRef?.current.mode.set(readOnly || disabled ? 'readonly' : 'design');
|
|
41
42
|
}, [readOnly, disabled]);
|
|
42
43
|
|
|
43
|
-
const filePickerCallback =
|
|
44
|
+
const filePickerCallback = cb => {
|
|
44
45
|
const input = document.createElement('input');
|
|
45
46
|
input.setAttribute('type', 'file');
|
|
46
47
|
input.setAttribute('accept', 'image/*');
|
|
@@ -73,11 +74,11 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
|
|
|
73
74
|
if (readOnly) {
|
|
74
75
|
const value = defaultValue || '--';
|
|
75
76
|
// eslint-disable-next-line react/no-danger
|
|
76
|
-
richTextComponent = <div key={id} id={id} className=
|
|
77
|
+
richTextComponent = <div key={id} id={id} className='readonly-richtext-editor' dangerouslySetInnerHTML={{ __html: value }} />;
|
|
77
78
|
} else {
|
|
78
79
|
richTextComponent = (
|
|
79
80
|
<Editor
|
|
80
|
-
tinymceScriptSrc=
|
|
81
|
+
tinymceScriptSrc='tinymce/tinymce.min.js'
|
|
81
82
|
onInit={(_evt, editor) => {
|
|
82
83
|
editorRef.current = editor;
|
|
83
84
|
}}
|
|
@@ -108,7 +109,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
|
|
|
108
109
|
return (
|
|
109
110
|
<FormControl data-test-id={testId} error={error} required={required}>
|
|
110
111
|
{!labelHidden && (
|
|
111
|
-
<InputLabel id=
|
|
112
|
+
<InputLabel id='demo-simple-select-error-label' className={classes.fieldLabel}>
|
|
112
113
|
{label}
|
|
113
114
|
</InputLabel>
|
|
114
115
|
)}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Button } from '@material-ui/core';
|
|
3
2
|
import './WssQuickCreate.css';
|
|
4
3
|
|
|
@@ -6,29 +5,30 @@ import './WssQuickCreate.css';
|
|
|
6
5
|
// So, no need to extend PConnProps
|
|
7
6
|
interface WssQuickCreateProps {
|
|
8
7
|
// If any, enter additional props that only exist on this component
|
|
9
|
-
heading: string
|
|
10
|
-
actions?:
|
|
8
|
+
heading: string;
|
|
9
|
+
actions?: any[];
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
|
|
14
12
|
export default function WssQuickCreate(props: WssQuickCreateProps) {
|
|
15
13
|
const { heading, actions } = props;
|
|
16
14
|
|
|
17
15
|
return (
|
|
18
16
|
<div>
|
|
19
|
-
<h1 id=
|
|
20
|
-
|
|
17
|
+
<h1 id='quick-links-heading' className='quick-link-heading'>
|
|
18
|
+
{heading}
|
|
19
|
+
</h1>
|
|
20
|
+
<ul id='quick-links' className='quick-link-ul-list'>
|
|
21
21
|
{actions &&
|
|
22
22
|
actions.map(element => {
|
|
23
23
|
return (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
<li className='quick-link-list' key={element.label}>
|
|
25
|
+
<Button className='quick-link-button' onClick={element.onClick}>
|
|
26
|
+
<span className='quick-link-button-span'>
|
|
27
|
+
{element.icon && <img className='quick-link-icon' src={element.icon} />}
|
|
28
|
+
<span>{element.label}</span>
|
|
29
|
+
</span>
|
|
30
|
+
</Button>
|
|
31
|
+
</li>
|
|
32
32
|
);
|
|
33
33
|
})}
|
|
34
34
|
</ul>
|