@pega/react-sdk-overrides 23.1.10 → 23.1.12
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 +21 -32
- 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 +120 -63
- 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 +33 -44
- 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/MultiSelect/Multiselect.tsx +244 -0
- package/lib/field/MultiSelect/index.tsx +1 -0
- package/lib/field/MultiSelect/utils.ts +230 -0
- 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 +8 -7
- 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/instructions-utils.ts +38 -0
- 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 +19 -31
- package/lib/infra/Reference/Reference.tsx +16 -18
- 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 +185 -175
- 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 +187 -121
- 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
package/lib/widget/ToDo/ToDo.tsx
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
/* eslint-disable no-shadow */
|
|
2
1
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
3
|
-
import React, {
|
|
4
|
-
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
2
|
+
import React, { useState } from 'react';
|
|
5
3
|
import {
|
|
6
4
|
Box,
|
|
7
5
|
Button,
|
|
@@ -19,15 +17,14 @@ import {
|
|
|
19
17
|
import Snackbar from '@material-ui/core/Snackbar';
|
|
20
18
|
import IconButton from '@material-ui/core/IconButton';
|
|
21
19
|
import CloseIcon from '@material-ui/icons/Close';
|
|
22
|
-
|
|
23
20
|
import ArrowForwardIosOutlinedIcon from '@material-ui/icons/ArrowForwardIosOutlined';
|
|
24
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
25
|
-
import { useTheme } from '@material-ui/core/styles';
|
|
21
|
+
import { makeStyles, useTheme } from '@material-ui/core/styles';
|
|
26
22
|
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
27
23
|
|
|
28
|
-
import '
|
|
24
|
+
import { Utils } from '@pega/react-sdk-components/lib/components/helpers/utils';
|
|
25
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
29
26
|
|
|
30
|
-
import
|
|
27
|
+
import './ToDo.css';
|
|
31
28
|
|
|
32
29
|
interface ToDoProps extends PConnProps {
|
|
33
30
|
// If any, enter additional props that only exist on this component
|
|
@@ -45,11 +42,11 @@ interface ToDoProps extends PConnProps {
|
|
|
45
42
|
isConfirm?: boolean;
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
const isChildCase =
|
|
45
|
+
const isChildCase = assignment => {
|
|
49
46
|
return assignment.isChild;
|
|
50
47
|
};
|
|
51
48
|
|
|
52
|
-
function topThreeAssignments(assignmentsSource:
|
|
49
|
+
function topThreeAssignments(assignmentsSource: any[]): any[] {
|
|
53
50
|
return Array.isArray(assignmentsSource) ? assignmentsSource.slice(0, 3) : [];
|
|
54
51
|
}
|
|
55
52
|
|
|
@@ -57,14 +54,13 @@ function getID(assignment: any) {
|
|
|
57
54
|
if (assignment.value) {
|
|
58
55
|
const refKey = assignment.value;
|
|
59
56
|
return refKey.substring(refKey.lastIndexOf(' ') + 1);
|
|
60
|
-
} else {
|
|
61
|
-
const refKey = assignment.ID;
|
|
62
|
-
const arKeys = refKey.split('!')[0].split(' ');
|
|
63
|
-
return arKeys[2];
|
|
64
57
|
}
|
|
58
|
+
const refKey = assignment.ID;
|
|
59
|
+
const arKeys = refKey.split('!')[0].split(' ');
|
|
60
|
+
return arKeys[2];
|
|
65
61
|
}
|
|
66
62
|
|
|
67
|
-
const useStyles = makeStyles(
|
|
63
|
+
const useStyles = makeStyles(theme => ({
|
|
68
64
|
root: {
|
|
69
65
|
marginTop: theme.spacing(1),
|
|
70
66
|
marginBottom: theme.spacing(1),
|
|
@@ -99,7 +95,7 @@ export default function ToDo(props: ToDoProps) {
|
|
|
99
95
|
const [showSnackbar, setShowSnackbar] = useState(false);
|
|
100
96
|
const [snackbarMessage, setSnackbarMessage]: any = useState('');
|
|
101
97
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
102
|
-
const [assignments, setAssignments] = useState<
|
|
98
|
+
const [assignments, setAssignments] = useState<any[]>(initAssignments());
|
|
103
99
|
|
|
104
100
|
const thePConn = getPConnect();
|
|
105
101
|
const classes = useStyles();
|
|
@@ -109,27 +105,27 @@ export default function ToDo(props: ToDoProps) {
|
|
|
109
105
|
const localeCategory = 'Todo';
|
|
110
106
|
const showlessLocalizedValue = localizedVal('show_less', 'CosmosFields');
|
|
111
107
|
const showMoreLocalizedValue = localizedVal('show_more', 'CosmosFields');
|
|
108
|
+
const canPerform = assignments?.[0]?.canPerform === 'true' || assignments?.[0]?.canPerform === true;
|
|
112
109
|
// const { setOpen } = useNavBar();
|
|
113
110
|
|
|
114
|
-
function initAssignments():
|
|
111
|
+
function initAssignments(): any[] {
|
|
115
112
|
if (assignmentsSource) {
|
|
116
113
|
assignmentCount = assignmentsSource.length;
|
|
117
114
|
return topThreeAssignments(assignmentsSource);
|
|
118
|
-
} else {
|
|
119
|
-
// turn off todolist
|
|
120
|
-
return [];
|
|
121
115
|
}
|
|
116
|
+
// turn off todolist
|
|
117
|
+
return [];
|
|
122
118
|
}
|
|
123
119
|
|
|
124
|
-
const getAssignmentId =
|
|
120
|
+
const getAssignmentId = assignment => {
|
|
125
121
|
return type === CONSTS.TODO ? assignment.ID : assignment.id;
|
|
126
122
|
};
|
|
127
123
|
|
|
128
|
-
const getPriority =
|
|
124
|
+
const getPriority = assignment => {
|
|
129
125
|
return type === CONSTS.TODO ? assignment.urgency : assignment.priority;
|
|
130
126
|
};
|
|
131
127
|
|
|
132
|
-
const getAssignmentName =
|
|
128
|
+
const getAssignmentName = assignment => {
|
|
133
129
|
return type === CONSTS.TODO ? assignment.name : assignment.stepName;
|
|
134
130
|
};
|
|
135
131
|
|
|
@@ -164,20 +160,23 @@ export default function ToDo(props: ToDoProps) {
|
|
|
164
160
|
const sTarget = thePConn.getContainerName();
|
|
165
161
|
const sTargetContainerName = sTarget;
|
|
166
162
|
|
|
167
|
-
const options = {
|
|
163
|
+
const options: any = {
|
|
164
|
+
containerName: sTargetContainerName,
|
|
165
|
+
channelName: ''
|
|
166
|
+
};
|
|
168
167
|
|
|
169
168
|
if (classname === null || classname === '') {
|
|
170
169
|
classname = thePConn.getCaseInfo().getClassName();
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
if (sTarget === 'workarea') {
|
|
174
|
-
options
|
|
175
|
-
options
|
|
176
|
-
options
|
|
177
|
-
options
|
|
173
|
+
options.isActionFromToDoList = true;
|
|
174
|
+
options.target = '';
|
|
175
|
+
options.context = null;
|
|
176
|
+
options.isChild = isChildCase(assignment);
|
|
178
177
|
} else {
|
|
179
|
-
options
|
|
180
|
-
options
|
|
178
|
+
options.isActionFromToDoList = false;
|
|
179
|
+
options.target = sTarget;
|
|
181
180
|
}
|
|
182
181
|
|
|
183
182
|
thePConn
|
|
@@ -199,26 +198,26 @@ export default function ToDo(props: ToDoProps) {
|
|
|
199
198
|
|
|
200
199
|
if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {
|
|
201
200
|
/* Supress link for todo inside flow step */
|
|
202
|
-
return <Button size=
|
|
201
|
+
return <Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>;
|
|
203
202
|
}
|
|
204
203
|
return displayID;
|
|
205
204
|
};
|
|
206
205
|
|
|
207
|
-
const getListItemComponent =
|
|
206
|
+
const getListItemComponent = assignment => {
|
|
208
207
|
if (isDesktop) {
|
|
209
208
|
return (
|
|
210
209
|
<>
|
|
211
210
|
{localizedVal('Task in', localeCategory)}
|
|
212
211
|
{renderTaskId(type, getPConnect, showTodoList, assignment)}
|
|
213
212
|
{type === CONSTS.WORKLIST && assignment.status ? `\u2022 ` : undefined}
|
|
214
|
-
{type === CONSTS.WORKLIST && assignment.status ? <span className=
|
|
213
|
+
{type === CONSTS.WORKLIST && assignment.status ? <span className='psdk-todo-assignment-status'>{assignment.status}</span> : undefined}
|
|
215
214
|
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
216
215
|
</>
|
|
217
216
|
);
|
|
218
217
|
}
|
|
219
218
|
return (
|
|
220
219
|
<>
|
|
221
|
-
<Button size=
|
|
220
|
+
<Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>
|
|
222
221
|
{` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}
|
|
223
222
|
</>
|
|
224
223
|
);
|
|
@@ -229,28 +228,28 @@ export default function ToDo(props: ToDoProps) {
|
|
|
229
228
|
{showTodoList && (
|
|
230
229
|
<CardHeader
|
|
231
230
|
title={
|
|
232
|
-
<Badge badgeContent={assignmentCount} overlap=
|
|
233
|
-
<Typography variant=
|
|
231
|
+
<Badge badgeContent={assignmentCount} overlap='rectangular' color='primary'>
|
|
232
|
+
<Typography variant='h6'>{headerText} </Typography>
|
|
234
233
|
</Badge>
|
|
235
234
|
}
|
|
236
|
-
|
|
235
|
+
/>
|
|
237
236
|
)}
|
|
238
237
|
<List>
|
|
239
|
-
{assignments.map(
|
|
240
|
-
<div className=
|
|
238
|
+
{assignments.map(assignment => (
|
|
239
|
+
<div className='psdk-todo-avatar-header' key={getAssignmentId(assignment)}>
|
|
241
240
|
<Avatar className={classes.avatar} style={{ marginRight: '16px' }}>
|
|
242
241
|
{currentUserInitials}
|
|
243
242
|
</Avatar>
|
|
244
243
|
<div style={{ display: 'block' }}>
|
|
245
|
-
<Typography variant=
|
|
244
|
+
<Typography variant='h6'>{assignment?.name}</Typography>
|
|
246
245
|
{`${localizedVal('Task in', localeCategory)} ${renderTaskId(type, getPConnect, showTodoList, assignment)} \u2022 ${localizedVal(
|
|
247
246
|
'Urgency',
|
|
248
247
|
localeCategory
|
|
249
248
|
)} ${getPriority(assignment)}`}
|
|
250
249
|
</div>
|
|
251
|
-
{!isConfirm && (
|
|
250
|
+
{(!isConfirm || canPerform) && (
|
|
252
251
|
<div style={{ marginLeft: 'auto' }}>
|
|
253
|
-
<IconButton onClick={() => clickGo(assignment)}>
|
|
252
|
+
<IconButton id='go-btn' onClick={() => clickGo(assignment)}>
|
|
254
253
|
<ArrowForwardIosOutlinedIcon />
|
|
255
254
|
</IconButton>
|
|
256
255
|
</div>
|
|
@@ -262,22 +261,22 @@ export default function ToDo(props: ToDoProps) {
|
|
|
262
261
|
);
|
|
263
262
|
|
|
264
263
|
return (
|
|
265
|
-
|
|
264
|
+
<>
|
|
266
265
|
{type === CONSTS.WORKLIST && (
|
|
267
266
|
<Card className={classes.root}>
|
|
268
267
|
{showTodoList && (
|
|
269
268
|
<CardHeader
|
|
270
269
|
title={
|
|
271
|
-
<Badge badgeContent={assignmentCount} overlap=
|
|
272
|
-
<Typography variant=
|
|
270
|
+
<Badge badgeContent={assignmentCount} overlap='rectangular' color='primary'>
|
|
271
|
+
<Typography variant='h6'>{headerText} </Typography>
|
|
273
272
|
</Badge>
|
|
274
273
|
}
|
|
275
274
|
avatar={<Avatar className={classes.avatar}>{currentUserInitials}</Avatar>}
|
|
276
|
-
|
|
275
|
+
/>
|
|
277
276
|
)}
|
|
278
277
|
<CardContent>
|
|
279
278
|
<List>
|
|
280
|
-
{assignments.map(
|
|
279
|
+
{assignments.map(assignment => (
|
|
281
280
|
<ListItem key={getAssignmentId(assignment)} dense divider onClick={() => clickGo(assignment)}>
|
|
282
281
|
<ListItemText primary={getAssignmentName(assignment)} secondary={getListItemComponent(assignment)} />
|
|
283
282
|
<ListItemSecondaryAction>
|
|
@@ -293,12 +292,12 @@ export default function ToDo(props: ToDoProps) {
|
|
|
293
292
|
)}
|
|
294
293
|
|
|
295
294
|
{type === CONSTS.TODO && !isConfirm && <Card className={classes.todoWrapper}>{toDoContent}</Card>}
|
|
296
|
-
{type === CONSTS.TODO && isConfirm &&
|
|
295
|
+
{type === CONSTS.TODO && isConfirm && <>{toDoContent}</>}
|
|
297
296
|
|
|
298
297
|
{assignmentCount > 3 && (
|
|
299
|
-
<Box display=
|
|
298
|
+
<Box display='flex' justifyContent='center'>
|
|
300
299
|
{bShowMore ? (
|
|
301
|
-
<Button color=
|
|
300
|
+
<Button color='primary' onClick={_showMore}>
|
|
302
301
|
{showMoreLocalizedValue === 'show_more' ? 'Show more' : showMoreLocalizedValue}
|
|
303
302
|
</Button>
|
|
304
303
|
) : (
|
|
@@ -313,11 +312,11 @@ export default function ToDo(props: ToDoProps) {
|
|
|
313
312
|
onClose={handleSnackbarClose}
|
|
314
313
|
message={snackbarMessage}
|
|
315
314
|
action={
|
|
316
|
-
<IconButton size=
|
|
317
|
-
<CloseIcon fontSize=
|
|
315
|
+
<IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>
|
|
316
|
+
<CloseIcon fontSize='small' />
|
|
318
317
|
</IconButton>
|
|
319
318
|
}
|
|
320
319
|
/>
|
|
321
|
-
|
|
320
|
+
</>
|
|
322
321
|
);
|
|
323
322
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/react-sdk-overrides",
|
|
3
|
-
"version": "23.1.
|
|
3
|
+
"version": "23.1.12",
|
|
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"
|