@pega/react-sdk-overrides 0.23.26 → 0.23.27
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 +39 -0
- package/lib/designSystemExtension/AlertBanner/index.tsx +1 -0
- package/lib/designSystemExtension/Banner/Banner.tsx +21 -7
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +36 -26
- package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +21 -28
- package/lib/designSystemExtension/DetailsFields/index.tsx +1 -1
- package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +50 -18
- package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +13 -12
- package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +18 -27
- package/lib/designSystemExtension/Operator/Operator.tsx +106 -87
- package/lib/designSystemExtension/Pulse/Pulse.tsx +21 -19
- package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +122 -0
- package/lib/designSystemExtension/RichTextEditor/index.tsx +1 -0
- package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +21 -12
- package/lib/field/AutoComplete/AutoComplete.tsx +33 -16
- package/lib/field/AutoComplete/config-ext.json +2 -3
- package/lib/field/CancelAlert/CancelAlert.tsx +21 -15
- package/lib/field/CancelAlert/index.tsx +1 -1
- package/lib/field/Checkbox/Checkbox.tsx +29 -19
- package/lib/field/Checkbox/config-ext.json +2 -3
- package/lib/field/Currency/Currency.tsx +27 -38
- package/lib/field/Currency/config-ext.json +2 -3
- package/lib/field/Currency/currency-utils.ts +10 -18
- package/lib/field/Date/Date.tsx +33 -15
- package/lib/field/Date/config-ext.json +2 -3
- package/lib/field/DateTime/DateTime.tsx +22 -11
- package/lib/field/DateTime/config-ext.json +1 -2
- package/lib/field/Decimal/Decimal.tsx +64 -17
- package/lib/field/Decimal/config-ext.json +1 -2
- package/lib/field/Decimal/index.tsx +1 -1
- package/lib/field/Dropdown/Dropdown.tsx +154 -18
- package/lib/field/Dropdown/config-ext.json +1 -2
- package/lib/field/Email/Email.tsx +16 -7
- package/lib/field/Email/config-ext.json +1 -2
- package/lib/field/Email/index.tsx +1 -1
- package/lib/field/Group/Group.tsx +37 -0
- package/lib/field/Group/config-ext.json +7 -0
- package/lib/field/Group/index.tsx +1 -0
- package/lib/field/Integer/Integer.tsx +15 -6
- package/lib/field/Integer/config-ext.json +1 -2
- package/lib/field/Percentage/Percentage.tsx +14 -6
- package/lib/field/Percentage/config-ext.json +1 -2
- package/lib/field/Phone/Phone.tsx +17 -7
- package/lib/field/Phone/index.tsx +1 -1
- package/lib/field/RadioButtons/RadioButtons.tsx +55 -24
- package/lib/field/RadioButtons/config-ext.json +1 -2
- package/lib/field/RichText/RichText.tsx +96 -0
- package/lib/field/RichText/index.tsx +1 -0
- package/lib/field/ScalarList/ScalarList.tsx +63 -0
- package/lib/field/ScalarList/config-ext.json +7 -0
- package/lib/field/ScalarList/index.tsx +1 -0
- package/lib/field/SemanticLink/SemanticLink.tsx +26 -25
- package/lib/field/SemanticLink/config-ext.json +1 -2
- package/lib/field/SemanticLink/utils.ts +8 -10
- package/lib/field/TextArea/TextArea.tsx +15 -5
- package/lib/field/TextArea/config-ext.json +1 -2
- package/lib/field/TextContent/TextContent.tsx +9 -2
- package/lib/field/TextContent/config-ext.json +1 -2
- package/lib/field/TextInput/TextInput.tsx +41 -10
- package/lib/field/TextInput/config-ext.json +1 -2
- package/lib/field/TextInput/index.tsx +1 -1
- package/lib/field/Time/Time.tsx +21 -18
- package/lib/field/Time/config-ext.json +1 -2
- package/lib/field/URL/URL.tsx +23 -6
- package/lib/field/URL/config-ext.json +1 -2
- package/lib/field/URL/index.tsx +1 -1
- package/lib/field/UserReference/UserReference.tsx +52 -58
- package/lib/field/UserReference/UserReferenceUtils.ts +2 -2
- package/lib/field/UserReference/config-ext.json +1 -2
- package/lib/helpers/{attachmentHelpers.js → attachmentHelpers.ts} +16 -11
- package/lib/helpers/case-utils.tsx +99 -0
- package/lib/helpers/common-utils.ts +8 -0
- package/lib/helpers/data_page.ts +3 -6
- package/lib/helpers/date-format-utils.ts +29 -19
- package/lib/helpers/{event-utils.js → event-utils.ts} +4 -4
- package/lib/helpers/{field-group-utils.js → field-group-utils.ts} +9 -10
- package/lib/helpers/formatters/Boolean.ts +21 -0
- package/lib/helpers/formatters/{Currency.js → Currency.ts} +22 -27
- package/lib/helpers/formatters/CurrencyMap.ts +915 -0
- package/lib/helpers/formatters/{Date.js → Date.ts} +20 -26
- package/lib/helpers/formatters/{common.js → common.ts} +3 -4
- package/lib/helpers/formatters/{index.js → index.ts} +22 -22
- package/lib/helpers/{reactContextHelpers.js → reactContextHelpers.ts} +2 -2
- package/lib/helpers/simpleTableHelpers.ts +65 -85
- package/lib/helpers/state-utils.tsx +43 -0
- package/lib/helpers/template-utils.ts +4 -8
- package/lib/helpers/utils.ts +16 -8
- package/lib/helpers/versionHelpers.ts +1 -5
- package/lib/infra/ActionButtons/ActionButtons.tsx +46 -42
- package/lib/infra/ActionButtons/index.tsx +1 -1
- package/lib/infra/Assignment/Assignment.tsx +99 -84
- package/lib/infra/Assignment/index.tsx +1 -1
- package/lib/infra/AssignmentCard/AssignmentCard.tsx +19 -26
- package/lib/infra/AssignmentCard/index.tsx +1 -1
- package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +98 -232
- package/lib/infra/Containers/FlowContainer/helpers.ts +138 -0
- package/lib/infra/Containers/FlowContainer/index.tsx +1 -1
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +66 -0
- package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +105 -70
- 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 +49 -64
- package/lib/infra/Containers/helpers.ts +6 -0
- package/lib/infra/DashboardFilter/DashboardFilter.tsx +26 -51
- package/lib/infra/DashboardFilter/filterUtils.tsx +12 -40
- package/lib/infra/DeferLoad/DeferLoad.tsx +22 -31
- package/lib/infra/DeferLoad/index.tsx +1 -1
- package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +25 -38
- package/lib/infra/MultiStep/MultiStep.css +11 -15
- package/lib/infra/MultiStep/MultiStep.tsx +180 -216
- package/lib/infra/MultiStep/index.tsx +1 -1
- package/lib/infra/NavBar/NavBar.css +103 -105
- package/lib/infra/NavBar/NavBar.tsx +28 -43
- package/lib/infra/Reference/Reference.tsx +16 -22
- package/lib/infra/Region/Region.tsx +9 -9
- package/lib/infra/RootContainer/RootContainer.tsx +82 -125
- package/lib/infra/RootContainer/index.tsx +1 -1
- package/lib/infra/Stages/Stages.tsx +38 -39
- package/lib/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx +17 -10
- package/lib/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx +29 -36
- package/lib/infra/View/View.tsx +32 -63
- package/lib/template/AppShell/AppShell.css +22 -23
- package/lib/template/AppShell/AppShell.tsx +51 -69
- package/lib/template/BannerPage/BannerPage.tsx +26 -33
- package/lib/template/CaseSummary/CaseSummary.tsx +23 -18
- package/lib/template/CaseSummary/config-ext.json +1 -2
- package/lib/template/CaseView/CaseView.tsx +122 -114
- package/lib/template/CaseView/config-ext.json +1 -2
- package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +46 -35
- package/lib/template/Confirmation/Confirmation.tsx +25 -53
- package/lib/template/Confirmation/config-ext.json +1 -2
- package/lib/template/DataReference/DataReference.tsx +112 -140
- package/lib/template/DataReference/config-ext.json +1 -2
- package/lib/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/template/DefaultForm/DefaultForm.tsx +26 -20
- package/lib/template/DefaultForm/config-ext.json +1 -2
- package/lib/template/DefaultForm/utils/index.ts +33 -0
- package/lib/template/Details/Details/Details.tsx +24 -28
- package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +15 -22
- package/lib/template/Details/DetailsSubTabs/config-ext.json +1 -2
- package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +25 -29
- package/lib/template/Details/DetailsThreeColumn/config-ext.json +1 -2
- package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +25 -29
- 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 +79 -0
- package/lib/template/Details/DynamicTabs/config.json +36 -0
- package/lib/template/Details/DynamicTabs/index.tsx +1 -0
- package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +24 -34
- package/lib/template/InlineDashboard/InlineDashboard.tsx +16 -14
- package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +19 -21
- package/lib/template/ListPage/ListPage.tsx +12 -16
- package/lib/template/ListPage/config-ext.json +1 -2
- package/lib/template/ListView/{DefaultViewMeta.js → DefaultViewMeta.ts} +1 -3
- package/lib/template/ListView/ListView.tsx +245 -306
- package/lib/template/ListView/config-ext.json +1 -2
- package/lib/template/ListView/{hooks.js → hooks.ts} +24 -24
- package/lib/template/ListView/{utils.js → utils.ts} +202 -91
- package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +25 -30
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +31 -29
- package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +27 -31
- 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 +17 -19
- package/lib/template/NarrowWide/NarrowWideForm/config-ext.json +1 -2
- package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +16 -26
- package/lib/template/NarrowWide/NarrowWidePage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumn/OneColumn.tsx +17 -17
- package/lib/template/OneColumn/OneColumn/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +9 -16
- package/lib/template/OneColumn/OneColumnPage/config-ext.json +1 -2
- package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +8 -14
- package/lib/template/OneColumn/OneColumnTab/config-ext.json +1 -2
- package/lib/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/template/PromotedFilters/PromotedFilters.tsx +44 -34
- package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +115 -14
- package/lib/template/SimpleTable/SimpleTable/config-ext.json +1 -2
- package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +171 -100
- package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +34 -40
- package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +45 -48
- package/lib/template/SubTabs/SubTabs.tsx +26 -45
- package/lib/template/SubTabs/config-ext.json +1 -2
- package/lib/template/SubTabs/tabUtils.ts +2 -7
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +33 -36
- package/lib/template/TwoColumn/TwoColumn/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +9 -16
- package/lib/template/TwoColumn/TwoColumnPage/config-ext.json +1 -2
- package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +33 -33
- 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 +29 -27
- package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +39 -33
- 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 +16 -18
- package/lib/template/WideNarrow/WideNarrowForm/config-ext.json +1 -2
- package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +15 -25
- 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 +20 -9
- package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +34 -41
- package/lib/widget/AppAnnouncement/config-ext.json +1 -2
- package/lib/widget/Attachment/Attachment.css +75 -4
- package/lib/widget/Attachment/Attachment.tsx +370 -388
- package/lib/widget/Attachment/index.tsx +1 -1
- package/lib/widget/CaseHistory/CaseHistory.tsx +67 -67
- package/lib/widget/CaseHistory/config-ext.json +1 -2
- package/lib/widget/CaseHistory/index.tsx +1 -1
- package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +19 -9
- package/lib/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +324 -246
- package/lib/widget/FileUtility/FileUtility/config-ext.json +1 -2
- package/lib/widget/Followers/Followers.tsx +27 -25
- package/lib/widget/Followers/config-ext.json +1 -2
- package/lib/widget/QuickCreate/QuickCreate.tsx +24 -16
- package/lib/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/widget/SummaryItem/SummaryItem.tsx +62 -54
- package/lib/widget/SummaryItem/index.tsx +1 -1
- package/lib/widget/SummaryList/SummaryList.tsx +15 -4
- package/lib/widget/ToDo/ToDo.css +4 -4
- package/lib/widget/ToDo/ToDo.tsx +80 -116
- package/lib/widget/ToDo/config-ext.json +1 -2
- package/package.json +5 -2
- package/lib/helpers/auth.js +0 -483
- package/lib/helpers/authManager.js +0 -631
- package/lib/helpers/config_access.js +0 -268
- package/lib/helpers/formatters/Boolean.js +0 -38
- package/lib/helpers/formatters/CurrencyMap.js +0 -908
- package/lib/infra/Containers/FlowContainer/helpers.js +0 -147
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Card, CardContent, CardHeader, Typography } from "@material-ui/core";
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Card, CardContent, CardHeader, Typography } from '@material-ui/core';
|
|
4
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
|
|
4
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
interface FollowersProps extends PConnProps {
|
|
7
|
+
// If any, enter additional props that only exist on this component
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const useStyles = makeStyles(theme => ({
|
|
8
11
|
root: {
|
|
9
12
|
paddingRight: theme.spacing(1),
|
|
10
13
|
paddingLeft: theme.spacing(1),
|
|
@@ -13,31 +16,30 @@ const useStyles = makeStyles((theme) => ({
|
|
|
13
16
|
marginRight: theme.spacing(1),
|
|
14
17
|
marginLeft: theme.spacing(1),
|
|
15
18
|
marginTop: theme.spacing(1),
|
|
16
|
-
marginBottom: theme.spacing(1)
|
|
19
|
+
marginBottom: theme.spacing(1)
|
|
17
20
|
// borderLeft: "6px solid",
|
|
18
21
|
// borderLeftColor: green[300]
|
|
19
|
-
}
|
|
22
|
+
}
|
|
20
23
|
}));
|
|
21
24
|
|
|
22
|
-
export default function Followers(
|
|
23
|
-
const componentName =
|
|
24
|
-
//
|
|
25
|
+
export default function Followers(props: PropsWithChildren<FollowersProps>) {
|
|
26
|
+
const componentName = 'Followers';
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const { children } = props;
|
|
25
29
|
const classes = useStyles();
|
|
26
30
|
|
|
27
31
|
return (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<Typography
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<Card className={classes.root}>
|
|
33
|
+
<CardHeader
|
|
34
|
+
title={
|
|
35
|
+
<Typography variant='h6' component='div'>
|
|
36
|
+
{componentName} - <em>unsupported</em>
|
|
37
|
+
</Typography>
|
|
38
|
+
}
|
|
39
|
+
/>
|
|
40
|
+
<CardContent>
|
|
41
|
+
<Typography>{componentName} content</Typography>
|
|
42
|
+
</CardContent>
|
|
43
|
+
</Card>
|
|
44
|
+
);
|
|
35
45
|
}
|
|
36
|
-
|
|
37
|
-
Followers.defaultProps = {
|
|
38
|
-
// children: []
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
Followers.propTypes = {
|
|
42
|
-
// children: PropTypes.arrayOf(PropTypes.node)
|
|
43
|
-
};
|
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import WssQuickCreate from '@pega/react-sdk-components/lib/components/designSystemExtension/WssQuickCreate';
|
|
3
1
|
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
2
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
3
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
interface QuickCreateProps extends PConnProps {
|
|
6
|
+
// If any, enter additional props that only exist on this component
|
|
7
|
+
heading: string;
|
|
8
|
+
showCaseIcons: boolean;
|
|
9
|
+
classFilter: any[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function QuickCreate(props: QuickCreateProps) {
|
|
13
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
14
|
+
const WssQuickCreate = getComponentFromMap('WssQuickCreate');
|
|
6
15
|
|
|
7
|
-
export default function QuickCreate(props) {
|
|
8
16
|
const { getPConnect, heading, showCaseIcons, classFilter } = props;
|
|
9
17
|
const pConn = getPConnect();
|
|
10
|
-
const createCase =
|
|
18
|
+
const createCase = className => {
|
|
11
19
|
pConn
|
|
12
20
|
.getActionsApi()
|
|
13
|
-
.createWork(className, {})
|
|
14
|
-
.catch(
|
|
21
|
+
.createWork(className, {} as any)
|
|
22
|
+
.catch(error => {
|
|
15
23
|
// eslint-disable-next-line no-console
|
|
16
|
-
console.log('Error in case creation: ', error?.message)
|
|
24
|
+
console.log('Error in case creation: ', error?.message);
|
|
17
25
|
});
|
|
18
26
|
};
|
|
19
27
|
|
|
@@ -25,12 +33,12 @@ export default function QuickCreate(props) {
|
|
|
25
33
|
envInfo.environmentInfoObject.pyCaseTypeList &&
|
|
26
34
|
envInfo.environmentInfoObject.pyCaseTypeList.length > 0
|
|
27
35
|
) {
|
|
28
|
-
classFilter.forEach(
|
|
29
|
-
let icon = Utils.getImageSrc('polaris-solid',
|
|
36
|
+
classFilter.forEach(item => {
|
|
37
|
+
let icon = Utils.getImageSrc('polaris-solid', Utils.getSDKStaticConentUrl());
|
|
30
38
|
let label = '';
|
|
31
|
-
envInfo.environmentInfoObject.pyCaseTypeList.forEach(
|
|
39
|
+
envInfo.environmentInfoObject.pyCaseTypeList.forEach(casetype => {
|
|
32
40
|
if (casetype.pyWorkTypeImplementationClassName === item) {
|
|
33
|
-
icon = casetype.pxIcon && Utils.getImageSrc(casetype?.pxIcon,
|
|
41
|
+
icon = casetype.pxIcon && Utils.getImageSrc(casetype?.pxIcon, Utils.getSDKStaticConentUrl());
|
|
34
42
|
label = casetype.pyWorkTypeName ?? '';
|
|
35
43
|
}
|
|
36
44
|
});
|
|
@@ -47,8 +55,8 @@ export default function QuickCreate(props) {
|
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
<div>
|
|
59
|
+
<WssQuickCreate heading={heading} actions={cases} />
|
|
60
|
+
</div>
|
|
61
|
+
);
|
|
54
62
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: row;
|
|
12
12
|
padding: 0.25rem 0rem 0.25rem 0.25rem;
|
|
13
|
-
margin-bottom: 0.5rem
|
|
13
|
+
margin-bottom: 0.5rem;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.psdk-utility-card-icon {
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.psdk-utility-card {
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
border: 0.0625rem solid rgb(207, 207, 207);
|
|
49
|
-
border-radius: calc(0.25rem);
|
|
50
|
-
min-height: 3rem;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
border: 0.0625rem solid rgb(207, 207, 207);
|
|
49
|
+
border-radius: calc(0.25rem);
|
|
50
|
+
min-height: 3rem;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.psdk-utility-button {
|
|
54
|
-
background: none;
|
|
55
|
-
border: none;
|
|
56
|
-
cursor: pointer;
|
|
54
|
+
background: none;
|
|
55
|
+
border: none;
|
|
56
|
+
cursor: pointer;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.psdk-utility-action {
|
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import './SummaryItem.css'
|
|
4
|
-
import { IconButton, Menu, MenuItem } from '@material-ui/core';
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { IconButton, Menu, MenuItem } from '@material-ui/core';
|
|
5
3
|
import MoreVertIcon from '@material-ui/icons/MoreVert';
|
|
4
|
+
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
5
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
import './SummaryItem.css';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
interface SummaryItemProps extends PConnProps {
|
|
10
|
+
// If any, enter additional props that only exist on this component
|
|
11
|
+
menuIconOverride$: string;
|
|
12
|
+
menuIconOverrideAction$: any;
|
|
13
|
+
arItems$: any[] | any;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function SummaryItem(props: SummaryItemProps) {
|
|
17
|
+
let imagePath$ = '';
|
|
11
18
|
let menuIconOverride$;
|
|
12
|
-
menuIconOverride$ = props.menuIconOverride
|
|
13
|
-
imagePath$ = Utils.getIconPath(
|
|
19
|
+
menuIconOverride$ = props.menuIconOverride$;
|
|
20
|
+
imagePath$ = Utils.getIconPath(Utils.getSDKStaticConentUrl());
|
|
14
21
|
const item = props.arItems$;
|
|
15
|
-
const srcImg = `${imagePath$}${item.visual.icon}.svg
|
|
22
|
+
const srcImg = `${imagePath$}${item.visual.icon}.svg`;
|
|
16
23
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
17
24
|
const open = Boolean(anchorEl);
|
|
18
25
|
if (menuIconOverride$) {
|
|
19
|
-
menuIconOverride$ = Utils.getImageSrc(menuIconOverride
|
|
26
|
+
menuIconOverride$ = Utils.getImageSrc(menuIconOverride$, Utils.getSDKStaticConentUrl());
|
|
20
27
|
}
|
|
21
28
|
|
|
22
29
|
function removeAttachment() {
|
|
23
|
-
props.menuIconOverrideAction$(item)
|
|
30
|
+
props.menuIconOverrideAction$(item);
|
|
24
31
|
}
|
|
25
32
|
|
|
26
|
-
const handleClick =
|
|
33
|
+
const handleClick = event => {
|
|
27
34
|
setAnchorEl(event.currentTarget);
|
|
28
35
|
};
|
|
29
36
|
|
|
@@ -32,49 +39,50 @@ export default function SummaryItem(props) {
|
|
|
32
39
|
};
|
|
33
40
|
|
|
34
41
|
return (
|
|
35
|
-
<div className=
|
|
36
|
-
<div className=
|
|
37
|
-
<img className=
|
|
42
|
+
<div className='psdk-utility-card'>
|
|
43
|
+
<div className='psdk-utility-card-icon'>
|
|
44
|
+
<img className='psdk-utility-card-svg-icon' src={srcImg} />
|
|
38
45
|
</div>
|
|
39
|
-
<div className=
|
|
40
|
-
{item.primary.type !== 'URL' &&
|
|
41
|
-
{item.primary.type === 'URL' && (
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
<div className='psdk-utility-card-main'>
|
|
47
|
+
{item.primary.type !== 'URL' && <div className='psdk-utility-card-main-primary-label'>{item.primary.name}</div>}
|
|
48
|
+
{item.primary.type === 'URL' && (
|
|
49
|
+
<div className='psdk-utility-card-main-primary-url'>
|
|
50
|
+
<button type='button' className='psdk-link-button'>
|
|
51
|
+
{item.primary.name}
|
|
52
|
+
<img className='psdk-utility-card-actions-svg-icon' src={`${imagePath$}${item.primary.icon}.svg`} />
|
|
53
|
+
</button>
|
|
54
|
+
</div>
|
|
55
|
+
)}
|
|
56
|
+
{item.secondary.text && <div style={{ color: item.secondary.error ? 'red' : undefined }}>{item.secondary.text}</div>}
|
|
48
57
|
</div>
|
|
49
|
-
<div className=
|
|
50
|
-
{menuIconOverride$ && (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
keepMounted
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
</
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
</div>)}
|
|
58
|
+
<div className='psdk-utility-action'>
|
|
59
|
+
{menuIconOverride$ && (
|
|
60
|
+
<button type='button' className='psdk-utility-button' aria-label='Delete Attachment' onClick={removeAttachment}>
|
|
61
|
+
<img className='psdk-utility-card-action-svg-icon' src={menuIconOverride$} />
|
|
62
|
+
</button>
|
|
63
|
+
)}
|
|
64
|
+
{!menuIconOverride$ && (
|
|
65
|
+
<div>
|
|
66
|
+
<IconButton
|
|
67
|
+
id='setting-button'
|
|
68
|
+
aria-controls={open ? 'file-menu' : undefined}
|
|
69
|
+
aria-expanded={open ? 'true' : undefined}
|
|
70
|
+
aria-haspopup='true'
|
|
71
|
+
onClick={handleClick}
|
|
72
|
+
>
|
|
73
|
+
<MoreVertIcon />
|
|
74
|
+
</IconButton>
|
|
75
|
+
<Menu style={{ marginTop: '3rem' }} id='file-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>
|
|
76
|
+
{item.actions &&
|
|
77
|
+
item.actions.map(option => (
|
|
78
|
+
<MenuItem style={{ fontSize: '14px' }} key={option.id || option.text} onClick={option.onClick}>
|
|
79
|
+
{option.text}
|
|
80
|
+
</MenuItem>
|
|
81
|
+
))}
|
|
82
|
+
</Menu>
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
77
85
|
</div>
|
|
78
86
|
</div>
|
|
79
|
-
)
|
|
87
|
+
);
|
|
80
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './SummaryItem';
|
|
1
|
+
export { default } from './SummaryItem';
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
2
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface SummaryListProps extends PConnProps {
|
|
5
|
+
// If any, enter additional props that only exist on this component
|
|
6
|
+
arItems$: any[];
|
|
7
|
+
menuIconOverride$?: string;
|
|
8
|
+
menuIconOverrideAction$?: any;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function SummaryList(props: SummaryListProps) {
|
|
12
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
13
|
+
const SummaryItem = getComponentFromMap('SummaryItem');
|
|
14
|
+
|
|
15
|
+
const { menuIconOverride$: menuOverride = '' } = props;
|
|
5
16
|
return (
|
|
6
17
|
<div>
|
|
7
18
|
{props.arItems$.map(file => (
|
|
8
|
-
<SummaryItem key={file.id} menuIconOverride$={
|
|
19
|
+
<SummaryItem key={file.id} menuIconOverride$={menuOverride} arItems$={file} menuIconOverrideAction$={props.menuIconOverrideAction$} />
|
|
9
20
|
))}
|
|
10
21
|
</div>
|
|
11
22
|
);
|
package/lib/widget/ToDo/ToDo.css
CHANGED
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
.psdk-assignment-count {
|
|
20
20
|
background-color: var(--app-primary-light-color);
|
|
21
|
-
margin: .5rem;
|
|
21
|
+
margin: 0.5rem;
|
|
22
22
|
border-radius: 45%;
|
|
23
|
-
padding: 0.15rem .4rem;
|
|
23
|
+
padding: 0.15rem 0.4rem;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.psdk-todo-id {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
.psdk-todo-assignment {
|
|
50
50
|
display: inline-flex;
|
|
51
|
-
width:100%;
|
|
51
|
+
width: 100%;
|
|
52
52
|
padding: 0.625rem 0rem;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
text-align: center;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.psdk-todo-avatar-header{
|
|
89
|
+
.psdk-todo-avatar-header {
|
|
90
90
|
display: flex;
|
|
91
91
|
align-items: center;
|
|
92
92
|
padding: 16px;
|