@pega/react-sdk-overrides 0.23.26 → 0.23.28
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
package/lib/widget/ToDo/ToDo.tsx
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/* eslint-disable no-shadow */
|
|
2
1
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
3
|
-
import React, {
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
2
|
+
import React, { useState } from 'react';
|
|
6
3
|
import {
|
|
7
4
|
Box,
|
|
8
5
|
Button,
|
|
@@ -20,21 +17,36 @@ import {
|
|
|
20
17
|
import Snackbar from '@material-ui/core/Snackbar';
|
|
21
18
|
import IconButton from '@material-ui/core/IconButton';
|
|
22
19
|
import CloseIcon from '@material-ui/icons/Close';
|
|
23
|
-
|
|
24
20
|
import ArrowForwardIosOutlinedIcon from '@material-ui/icons/ArrowForwardIosOutlined';
|
|
25
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
26
|
-
import { useTheme } from '@material-ui/core/styles';
|
|
21
|
+
import { makeStyles, useTheme } from '@material-ui/core/styles';
|
|
27
22
|
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
28
23
|
|
|
24
|
+
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
25
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
26
|
+
|
|
29
27
|
import './ToDo.css';
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
interface ToDoProps extends PConnProps {
|
|
30
|
+
// If any, enter additional props that only exist on this component
|
|
31
|
+
datasource?: any;
|
|
32
|
+
myWorkList?: any;
|
|
33
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
34
|
+
caseInfoID?: string;
|
|
35
|
+
headerText?: string;
|
|
36
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
37
|
+
itemKey?: string;
|
|
38
|
+
showTodoList?: boolean;
|
|
39
|
+
type?: string;
|
|
40
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
41
|
+
context?: string;
|
|
42
|
+
isConfirm?: boolean;
|
|
43
|
+
}
|
|
32
44
|
|
|
33
45
|
const isChildCase = assignment => {
|
|
34
46
|
return assignment.isChild;
|
|
35
47
|
};
|
|
36
48
|
|
|
37
|
-
function topThreeAssignments(assignmentsSource:
|
|
49
|
+
function topThreeAssignments(assignmentsSource: any[]): any[] {
|
|
38
50
|
return Array.isArray(assignmentsSource) ? assignmentsSource.slice(0, 3) : [];
|
|
39
51
|
}
|
|
40
52
|
|
|
@@ -42,11 +54,10 @@ function getID(assignment: any) {
|
|
|
42
54
|
if (assignment.value) {
|
|
43
55
|
const refKey = assignment.value;
|
|
44
56
|
return refKey.substring(refKey.lastIndexOf(' ') + 1);
|
|
45
|
-
} else {
|
|
46
|
-
const refKey = assignment.ID;
|
|
47
|
-
const arKeys = refKey.split('!')[0].split(' ');
|
|
48
|
-
return arKeys[2];
|
|
49
57
|
}
|
|
58
|
+
const refKey = assignment.ID;
|
|
59
|
+
const arKeys = refKey.split('!')[0].split(' ');
|
|
60
|
+
return arKeys[2];
|
|
50
61
|
}
|
|
51
62
|
|
|
52
63
|
const useStyles = makeStyles(theme => ({
|
|
@@ -69,8 +80,8 @@ const useStyles = makeStyles(theme => ({
|
|
|
69
80
|
}
|
|
70
81
|
}));
|
|
71
82
|
|
|
72
|
-
export default function ToDo(props) {
|
|
73
|
-
const {
|
|
83
|
+
export default function ToDo(props: ToDoProps) {
|
|
84
|
+
const { getPConnect, datasource = [], headerText = 'To do', showTodoList = true, myWorkList = {}, type = 'worklist', isConfirm = false } = props;
|
|
74
85
|
|
|
75
86
|
const CONSTS = PCore.getConstants();
|
|
76
87
|
|
|
@@ -84,22 +95,26 @@ export default function ToDo(props) {
|
|
|
84
95
|
const [showSnackbar, setShowSnackbar] = useState(false);
|
|
85
96
|
const [snackbarMessage, setSnackbarMessage]: any = useState('');
|
|
86
97
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
87
|
-
const [assignments, setAssignments] = useState<
|
|
98
|
+
const [assignments, setAssignments] = useState<any[]>(initAssignments());
|
|
88
99
|
|
|
89
100
|
const thePConn = getPConnect();
|
|
90
101
|
const classes = useStyles();
|
|
91
102
|
const theme = useTheme();
|
|
92
103
|
const isDesktop = useMediaQuery(theme.breakpoints.up('md'));
|
|
104
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
105
|
+
const localeCategory = 'Todo';
|
|
106
|
+
const showlessLocalizedValue = localizedVal('show_less', 'CosmosFields');
|
|
107
|
+
const showMoreLocalizedValue = localizedVal('show_more', 'CosmosFields');
|
|
108
|
+
const canPerform = assignments?.[0]?.canPerform === 'true' || assignments?.[0]?.canPerform === true;
|
|
93
109
|
// const { setOpen } = useNavBar();
|
|
94
110
|
|
|
95
|
-
function initAssignments():
|
|
111
|
+
function initAssignments(): any[] {
|
|
96
112
|
if (assignmentsSource) {
|
|
97
113
|
assignmentCount = assignmentsSource.length;
|
|
98
114
|
return topThreeAssignments(assignmentsSource);
|
|
99
|
-
} else {
|
|
100
|
-
// turn off todolist
|
|
101
|
-
return [];
|
|
102
115
|
}
|
|
116
|
+
// turn off todolist
|
|
117
|
+
return [];
|
|
103
118
|
}
|
|
104
119
|
|
|
105
120
|
const getAssignmentId = assignment => {
|
|
@@ -145,20 +160,23 @@ export default function ToDo(props) {
|
|
|
145
160
|
const sTarget = thePConn.getContainerName();
|
|
146
161
|
const sTargetContainerName = sTarget;
|
|
147
162
|
|
|
148
|
-
const options = {
|
|
163
|
+
const options: any = {
|
|
164
|
+
containerName: sTargetContainerName,
|
|
165
|
+
channelName: ''
|
|
166
|
+
};
|
|
149
167
|
|
|
150
168
|
if (classname === null || classname === '') {
|
|
151
169
|
classname = thePConn.getCaseInfo().getClassName();
|
|
152
170
|
}
|
|
153
171
|
|
|
154
172
|
if (sTarget === 'workarea') {
|
|
155
|
-
options
|
|
156
|
-
options
|
|
157
|
-
options
|
|
158
|
-
options
|
|
173
|
+
options.isActionFromToDoList = true;
|
|
174
|
+
options.target = '';
|
|
175
|
+
options.context = null;
|
|
176
|
+
options.isChild = isChildCase(assignment);
|
|
159
177
|
} else {
|
|
160
|
-
options
|
|
161
|
-
options
|
|
178
|
+
options.isActionFromToDoList = false;
|
|
179
|
+
options.target = sTarget;
|
|
162
180
|
}
|
|
163
181
|
|
|
164
182
|
thePConn
|
|
@@ -180,9 +198,7 @@ export default function ToDo(props) {
|
|
|
180
198
|
|
|
181
199
|
if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {
|
|
182
200
|
/* Supress link for todo inside flow step */
|
|
183
|
-
return (
|
|
184
|
-
<Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>
|
|
185
|
-
);
|
|
201
|
+
return <Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>;
|
|
186
202
|
}
|
|
187
203
|
return displayID;
|
|
188
204
|
};
|
|
@@ -191,20 +207,18 @@ export default function ToDo(props) {
|
|
|
191
207
|
if (isDesktop) {
|
|
192
208
|
return (
|
|
193
209
|
<>
|
|
194
|
-
Task in
|
|
210
|
+
{localizedVal('Task in', localeCategory)}
|
|
195
211
|
{renderTaskId(type, getPConnect, showTodoList, assignment)}
|
|
196
212
|
{type === CONSTS.WORKLIST && assignment.status ? `\u2022 ` : undefined}
|
|
197
|
-
{type === CONSTS.WORKLIST && assignment.status ?
|
|
198
|
-
|
|
199
|
-
) : undefined}
|
|
200
|
-
{` \u2022 Urgency ${getPriority(assignment)}`}
|
|
213
|
+
{type === CONSTS.WORKLIST && assignment.status ? <span className='psdk-todo-assignment-status'>{assignment.status}</span> : undefined}
|
|
214
|
+
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
201
215
|
</>
|
|
202
216
|
);
|
|
203
217
|
}
|
|
204
218
|
return (
|
|
205
219
|
<>
|
|
206
220
|
<Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>
|
|
207
|
-
{` \u2022
|
|
221
|
+
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
208
222
|
</>
|
|
209
223
|
);
|
|
210
224
|
};
|
|
@@ -214,69 +228,57 @@ export default function ToDo(props) {
|
|
|
214
228
|
{showTodoList && (
|
|
215
229
|
<CardHeader
|
|
216
230
|
title={
|
|
217
|
-
<Badge badgeContent={assignmentCount} color='primary'>
|
|
231
|
+
<Badge badgeContent={assignmentCount} overlap='rectangular' color='primary'>
|
|
218
232
|
<Typography variant='h6'>{headerText} </Typography>
|
|
219
233
|
</Badge>
|
|
220
234
|
}
|
|
221
|
-
|
|
235
|
+
/>
|
|
222
236
|
)}
|
|
223
237
|
<List>
|
|
224
238
|
{assignments.map(assignment => (
|
|
225
|
-
|
|
226
|
-
<
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
showTodoList,
|
|
236
|
-
assignment
|
|
237
|
-
)} \u2022 Urgency ${getPriority(assignment)}`}
|
|
238
|
-
</div>
|
|
239
|
-
{!isConfirm && (
|
|
240
|
-
<div style={{ marginLeft: 'auto' }}>
|
|
241
|
-
<IconButton onClick={() => clickGo(assignment)}>
|
|
242
|
-
<ArrowForwardIosOutlinedIcon />
|
|
243
|
-
</IconButton>
|
|
244
|
-
</div>
|
|
245
|
-
)}
|
|
239
|
+
<div className='psdk-todo-avatar-header' key={getAssignmentId(assignment)}>
|
|
240
|
+
<Avatar className={classes.avatar} style={{ marginRight: '16px' }}>
|
|
241
|
+
{currentUserInitials}
|
|
242
|
+
</Avatar>
|
|
243
|
+
<div style={{ display: 'block' }}>
|
|
244
|
+
<Typography variant='h6'>{assignment?.name}</Typography>
|
|
245
|
+
{`${localizedVal('Task in', localeCategory)} ${renderTaskId(type, getPConnect, showTodoList, assignment)} \u2022 ${localizedVal(
|
|
246
|
+
'Urgency',
|
|
247
|
+
localeCategory
|
|
248
|
+
)} ${getPriority(assignment)}`}
|
|
246
249
|
</div>
|
|
247
|
-
|
|
250
|
+
{(!isConfirm || canPerform) && (
|
|
251
|
+
<div style={{ marginLeft: 'auto' }}>
|
|
252
|
+
<IconButton id='go-btn' onClick={() => clickGo(assignment)}>
|
|
253
|
+
<ArrowForwardIosOutlinedIcon />
|
|
254
|
+
</IconButton>
|
|
255
|
+
</div>
|
|
256
|
+
)}
|
|
257
|
+
</div>
|
|
248
258
|
))}
|
|
249
259
|
</List>
|
|
250
260
|
</>
|
|
251
261
|
);
|
|
252
262
|
|
|
253
263
|
return (
|
|
254
|
-
|
|
264
|
+
<>
|
|
255
265
|
{type === CONSTS.WORKLIST && (
|
|
256
266
|
<Card className={classes.root}>
|
|
257
267
|
{showTodoList && (
|
|
258
268
|
<CardHeader
|
|
259
269
|
title={
|
|
260
|
-
<Badge badgeContent={assignmentCount} color='primary'>
|
|
270
|
+
<Badge badgeContent={assignmentCount} overlap='rectangular' color='primary'>
|
|
261
271
|
<Typography variant='h6'>{headerText} </Typography>
|
|
262
272
|
</Badge>
|
|
263
273
|
}
|
|
264
274
|
avatar={<Avatar className={classes.avatar}>{currentUserInitials}</Avatar>}
|
|
265
|
-
|
|
275
|
+
/>
|
|
266
276
|
)}
|
|
267
277
|
<CardContent>
|
|
268
278
|
<List>
|
|
269
279
|
{assignments.map(assignment => (
|
|
270
|
-
<ListItem
|
|
271
|
-
|
|
272
|
-
dense
|
|
273
|
-
divider
|
|
274
|
-
onClick={() => clickGo(assignment)}
|
|
275
|
-
>
|
|
276
|
-
<ListItemText
|
|
277
|
-
primary={getAssignmentName(assignment)}
|
|
278
|
-
secondary={getListItemComponent(assignment)}
|
|
279
|
-
/>
|
|
280
|
+
<ListItem key={getAssignmentId(assignment)} dense divider onClick={() => clickGo(assignment)}>
|
|
281
|
+
<ListItemText primary={getAssignmentName(assignment)} secondary={getListItemComponent(assignment)} />
|
|
280
282
|
<ListItemSecondaryAction>
|
|
281
283
|
<IconButton onClick={() => clickGo(assignment)}>
|
|
282
284
|
<ArrowForwardIosOutlinedIcon />
|
|
@@ -289,19 +291,17 @@ export default function ToDo(props) {
|
|
|
289
291
|
</Card>
|
|
290
292
|
)}
|
|
291
293
|
|
|
292
|
-
{type === CONSTS.TODO && !isConfirm &&
|
|
293
|
-
|
|
294
|
-
)}
|
|
295
|
-
{type === CONSTS.TODO && isConfirm && <Fragment>{toDoContent}</Fragment>}
|
|
294
|
+
{type === CONSTS.TODO && !isConfirm && <Card className={classes.todoWrapper}>{toDoContent}</Card>}
|
|
295
|
+
{type === CONSTS.TODO && isConfirm && <>{toDoContent}</>}
|
|
296
296
|
|
|
297
297
|
{assignmentCount > 3 && (
|
|
298
298
|
<Box display='flex' justifyContent='center'>
|
|
299
299
|
{bShowMore ? (
|
|
300
300
|
<Button color='primary' onClick={_showMore}>
|
|
301
|
-
Show more
|
|
301
|
+
{showMoreLocalizedValue === 'show_more' ? 'Show more' : showMoreLocalizedValue}
|
|
302
302
|
</Button>
|
|
303
303
|
) : (
|
|
304
|
-
<Button onClick={_showLess}>Show less</Button>
|
|
304
|
+
<Button onClick={_showLess}>{showlessLocalizedValue === 'show_less' ? 'Show less' : showlessLocalizedValue}</Button>
|
|
305
305
|
)}
|
|
306
306
|
</Box>
|
|
307
307
|
)}
|
|
@@ -317,42 +317,6 @@ export default function ToDo(props) {
|
|
|
317
317
|
</IconButton>
|
|
318
318
|
}
|
|
319
319
|
/>
|
|
320
|
-
|
|
320
|
+
</>
|
|
321
321
|
);
|
|
322
322
|
}
|
|
323
|
-
|
|
324
|
-
ToDo.propTypes = {
|
|
325
|
-
datasource: PropTypes.instanceOf(Object),
|
|
326
|
-
myWorkList: PropTypes.instanceOf(Object),
|
|
327
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
328
|
-
caseInfoID: PropTypes.string,
|
|
329
|
-
// buildName: PropTypes.string,
|
|
330
|
-
getPConnect: PropTypes.func.isRequired,
|
|
331
|
-
headerText: PropTypes.string,
|
|
332
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
333
|
-
itemKey: PropTypes.string,
|
|
334
|
-
showTodoList: PropTypes.bool,
|
|
335
|
-
// target: PropTypes.string,
|
|
336
|
-
type: PropTypes.string,
|
|
337
|
-
// pageMessages: PropTypes.arrayOf(PropTypes.any),
|
|
338
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
339
|
-
context: PropTypes.string,
|
|
340
|
-
// hideActionButtons: PropTypes.bool
|
|
341
|
-
isConfirm: PropTypes.bool
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
ToDo.defaultProps = {
|
|
345
|
-
caseInfoID: '',
|
|
346
|
-
datasource: [],
|
|
347
|
-
myWorkList: {},
|
|
348
|
-
// buildName: "",
|
|
349
|
-
headerText: 'To do',
|
|
350
|
-
itemKey: '',
|
|
351
|
-
showTodoList: true,
|
|
352
|
-
// target: "",
|
|
353
|
-
type: 'worklist',
|
|
354
|
-
// pageMessages: null,
|
|
355
|
-
context: '',
|
|
356
|
-
// hideActionButtons: false
|
|
357
|
-
isConfirm: false
|
|
358
|
-
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/react-sdk-overrides",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.28",
|
|
4
4
|
"description": "React SDK - Code for overriding components",
|
|
5
5
|
"_filesComment": "During packing, npm ignores everything NOT in the files list",
|
|
6
6
|
"files": [
|
|
7
|
-
"lib"
|
|
7
|
+
"lib",
|
|
8
|
+
"README.md",
|
|
9
|
+
"SECURITY.md",
|
|
10
|
+
"LICENSE"
|
|
8
11
|
],
|
|
9
12
|
"scripts": {
|
|
10
13
|
"test": "echo \"Error: no test specified\" && exit 1"
|